fix:新维保查询页面
parent
504379f3e3
commit
6a26d412c4
|
|
@ -1,28 +1,40 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询产品信息
|
function normalizeSerialNumbers(input) {
|
||||||
export function getProductInfo(serialNumber) {
|
const values = Array.isArray(input) ? input : [input]
|
||||||
|
return [...new Set(values
|
||||||
|
.map(item => (item || '').toString().trim())
|
||||||
|
.filter(Boolean))]
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildQueryPayload(input) {
|
||||||
|
const serialNumbers = normalizeSerialNumbers(input)
|
||||||
|
return {
|
||||||
|
serialNumber: serialNumbers[0] || '',
|
||||||
|
serialNumbers
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getProductInfo(serialNumberOrNumbers) {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/service/product',
|
url: '/manage/service/product',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: { serialNumber }
|
data: buildQueryPayload(serialNumberOrNumbers)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询相关合同信息
|
export function getOrderInfo(serialNumberOrNumbers) {
|
||||||
export function getOrderInfo(serialNumber) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/service/order',
|
url: '/manage/service/order',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: { serialNumber }
|
data: buildQueryPayload(serialNumberOrNumbers)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询标准保修信息
|
export function getWarrantyInfo(serialNumberOrNumbers) {
|
||||||
export function getWarrantyInfo(serialNumber) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/service/query',
|
url: '/manage/service/query',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: { serialNumber }
|
data: buildQueryPayload(serialNumberOrNumbers)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 152 KiB |
|
|
@ -92,7 +92,7 @@
|
||||||
size="80%"
|
size="80%"
|
||||||
append-to-body
|
append-to-body
|
||||||
:modal-append-to-body="true"
|
:modal-append-to-body="true"
|
||||||
:z-index="3000"
|
:z-index="pruchaseDrawerZIndex"
|
||||||
>
|
>
|
||||||
<ApproveLayout title="采购单详情" v-if="showPruchaseDetailDrawer">
|
<ApproveLayout title="采购单详情" v-if="showPruchaseDetailDrawer">
|
||||||
<purchase-order-detail-view
|
<purchase-order-detail-view
|
||||||
|
|
@ -143,7 +143,8 @@ export default {
|
||||||
projectDrawerVisible: false,
|
projectDrawerVisible: false,
|
||||||
currentProjectId: null,
|
currentProjectId: null,
|
||||||
showPruchaseDetailDrawer: false,
|
showPruchaseDetailDrawer: false,
|
||||||
pruchaseDetailOrderData: null
|
pruchaseDetailOrderData: null,
|
||||||
|
pruchaseDrawerZIndex: 5000
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -212,6 +213,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleViewPruchaseDetail(row, purchaseItem) {
|
handleViewPruchaseDetail(row, purchaseItem) {
|
||||||
|
this.pruchaseDrawerZIndex += 2;
|
||||||
const purchaseId = purchaseItem && purchaseItem.purchaseId ? purchaseItem.purchaseId : (row.purchaseId || row.purchaseOrderId);
|
const purchaseId = purchaseItem && purchaseItem.purchaseId ? purchaseItem.purchaseId : (row.purchaseId || row.purchaseOrderId);
|
||||||
if (purchaseId) {
|
if (purchaseId) {
|
||||||
getPurchaseorder(purchaseId).then(response => {
|
getPurchaseorder(purchaseId).then(response => {
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,21 +1,26 @@
|
||||||
package com.ruoyi.sip.controller;
|
package com.ruoyi.sip.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.ruoyi.common.annotation.Anonymous;
|
import com.ruoyi.common.annotation.Anonymous;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||||
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
||||||
import com.ruoyi.sip.service.*;
|
import com.ruoyi.sip.service.IMaintenanceService;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import com.ruoyi.sip.service.IProductInfoService;
|
||||||
|
import com.ruoyi.sip.service.IProjectOrderInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : ch
|
* @author : ch
|
||||||
* @version : 1.0
|
* @version : 1.0
|
||||||
|
|
@ -32,57 +37,92 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/manage/service")
|
@RequestMapping("/manage/service")
|
||||||
public class MaintenanceController {
|
public class MaintenanceController {
|
||||||
private String prefix = "manage/service";
|
private final String prefix = "manage/service";
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IMaintenanceService service;
|
private IMaintenanceService service;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProductInfoService productInfoService;
|
private IProductInfoService productInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOrderInfoService orderInfoService;
|
|
||||||
@Autowired
|
|
||||||
private IProjectOrderInfoService projectOrderInfoService;
|
private IProjectOrderInfoService projectOrderInfoService;
|
||||||
|
|
||||||
@Anonymous
|
@Anonymous
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String service(@RequestParam(value = "code",required = false)String code, ModelMap modelMap)
|
public String service(@RequestParam(value = "code", required = false) String code, ModelMap modelMap) {
|
||||||
{
|
modelMap.put("code", code);
|
||||||
modelMap.put("code",code);
|
|
||||||
return prefix + "/service";
|
return prefix + "/service";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/query")
|
@GetMapping("/query")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Anonymous
|
@Anonymous
|
||||||
public AjaxResult query(MaintenanceRecordsDto dto)
|
public AjaxResult query(MaintenanceRecordsDto dto) {
|
||||||
{
|
return doQuery(dto);
|
||||||
if (StringUtils.isEmpty(dto.getSerialNumber())){
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
}
|
||||||
return AjaxResult.success(service.query(dto));
|
|
||||||
|
@PostMapping("/query")
|
||||||
|
@ResponseBody
|
||||||
|
@Anonymous
|
||||||
|
public AjaxResult queryPost(@RequestBody MaintenanceRecordsDto dto) {
|
||||||
|
return doQuery(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/product")
|
@GetMapping("/product")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Anonymous
|
@Anonymous
|
||||||
public AjaxResult product(MaintenanceRecordsDto dto)
|
public AjaxResult product(MaintenanceRecordsDto dto) {
|
||||||
{
|
return doProduct(dto);
|
||||||
return AjaxResult.success(productInfoService.query(dto));
|
}
|
||||||
|
|
||||||
|
@PostMapping("/product")
|
||||||
|
@ResponseBody
|
||||||
|
@Anonymous
|
||||||
|
public AjaxResult productPost(@RequestBody MaintenanceRecordsDto dto) {
|
||||||
|
return doProduct(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/order")
|
@GetMapping("/order")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@Anonymous
|
@Anonymous
|
||||||
public AjaxResult order(MaintenanceRecordsDto dto)
|
public AjaxResult order(MaintenanceRecordsDto dto) {
|
||||||
{
|
return doOrder(dto);
|
||||||
if (StringUtils.isEmpty(dto.getSerialNumber())){
|
}
|
||||||
return AjaxResult.success();
|
|
||||||
|
@PostMapping("/order")
|
||||||
|
@ResponseBody
|
||||||
|
@Anonymous
|
||||||
|
public AjaxResult orderPost(@RequestBody MaintenanceRecordsDto dto) {
|
||||||
|
return doOrder(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
private AjaxResult doQuery(MaintenanceRecordsDto dto) {
|
||||||
|
if (!hasSerialNumbers(dto)) {
|
||||||
|
return AjaxResult.success(Collections.emptyList());
|
||||||
|
}
|
||||||
|
return AjaxResult.success(service.query(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
private AjaxResult doProduct(MaintenanceRecordsDto dto) {
|
||||||
|
if (!hasSerialNumbers(dto) && StringUtils.isEmpty(dto.getProductCode())) {
|
||||||
|
return AjaxResult.success(Collections.emptyList());
|
||||||
|
}
|
||||||
|
return AjaxResult.success(productInfoService.query(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
private AjaxResult doOrder(MaintenanceRecordsDto dto) {
|
||||||
|
List<String> serialNumbers = dto.getResolvedSerialNumbers();
|
||||||
|
if (serialNumbers.isEmpty()) {
|
||||||
|
return AjaxResult.success(Collections.emptyList());
|
||||||
|
}
|
||||||
|
ApiDataQueryDto queryDto = new ApiDataQueryDto();
|
||||||
|
queryDto.setSerialNumbers(serialNumbers);
|
||||||
|
if (serialNumbers.size() == 1) {
|
||||||
|
queryDto.setSerialNumber(serialNumbers.get(0));
|
||||||
}
|
}
|
||||||
ApiDataQueryDto queryDto=new ApiDataQueryDto();
|
|
||||||
queryDto.setSerialNumber(dto.getSerialNumber());
|
|
||||||
return AjaxResult.success(projectOrderInfoService.getOrderInfo(queryDto));
|
return AjaxResult.success(projectOrderInfoService.getOrderInfo(queryDto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean hasSerialNumbers(MaintenanceRecordsDto dto) {
|
||||||
|
return dto != null && !dto.getResolvedSerialNumbers().isEmpty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
package com.ruoyi.sip.domain;
|
package com.ruoyi.sip.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : ch
|
* @author : ch
|
||||||
* @version : 1.0
|
* @version : 1.0
|
||||||
|
|
@ -18,8 +22,22 @@ import lombok.Data;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class MaintenanceRecordsDto {
|
public class MaintenanceRecordsDto {
|
||||||
//序列号
|
|
||||||
private String serialNumber;
|
private String serialNumber;
|
||||||
|
private List<String> serialNumbers;
|
||||||
private String productCode;
|
private String productCode;
|
||||||
|
|
||||||
|
public List<String> getResolvedSerialNumbers() {
|
||||||
|
LinkedHashSet<String> values = new LinkedHashSet<>();
|
||||||
|
if (StringUtils.isNotEmpty(serialNumber)) {
|
||||||
|
values.add(serialNumber.trim());
|
||||||
|
}
|
||||||
|
if (serialNumbers != null) {
|
||||||
|
for (String item : serialNumbers) {
|
||||||
|
if (StringUtils.isNotEmpty(item)) {
|
||||||
|
values.add(item.trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new ArrayList<>(values);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -180,6 +180,7 @@ public class ProjectOrderInfo extends BaseEntity {
|
||||||
private Date updateTimeStart;
|
private Date updateTimeStart;
|
||||||
private Date updateTimeEnd;
|
private Date updateTimeEnd;
|
||||||
private String productSn;
|
private String productSn;
|
||||||
|
private List<String> productSnList;
|
||||||
/**
|
/**
|
||||||
* 公司直发
|
* 公司直发
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
package com.ruoyi.sip.dto;
|
package com.ruoyi.sip.dto;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author : ch
|
* @author : ch
|
||||||
|
|
@ -29,5 +32,20 @@ public class ApiDataQueryDto {
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date queryEndTime;
|
private Date queryEndTime;
|
||||||
private String serialNumber;
|
private String serialNumber;
|
||||||
|
private List<String> serialNumbers;
|
||||||
|
|
||||||
|
public List<String> getResolvedSerialNumbers() {
|
||||||
|
LinkedHashSet<String> values = new LinkedHashSet<>();
|
||||||
|
if (StringUtils.isNotEmpty(serialNumber)) {
|
||||||
|
values.add(serialNumber.trim());
|
||||||
|
}
|
||||||
|
if (serialNumbers != null) {
|
||||||
|
for (String item : serialNumbers) {
|
||||||
|
if (StringUtils.isNotEmpty(item)) {
|
||||||
|
values.add(item.trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new ArrayList<>(values);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
package com.ruoyi.sip.service.impl;
|
package com.ruoyi.sip.service.impl;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.ruoyi.sip.domain.MaintenanceRecord;
|
|
||||||
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
import com.ruoyi.sip.domain.MaintenanceRecordsDto;
|
||||||
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
||||||
import com.ruoyi.sip.mapper.MaintenanceMapper;
|
import com.ruoyi.sip.mapper.MaintenanceMapper;
|
||||||
|
|
@ -15,6 +13,7 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -44,13 +43,33 @@ public class MaintenanceServiceImpl implements IMaintenanceService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DeliveryInfoVo.ServiceInfo> query(MaintenanceRecordsDto dto) {
|
public List<DeliveryInfoVo.ServiceInfo> query(MaintenanceRecordsDto dto) {
|
||||||
|
List<String> serialNumbers = dto.getResolvedSerialNumbers();
|
||||||
ApiDataQueryDto apiDataQueryDto = new ApiDataQueryDto();
|
if (CollUtil.isEmpty(serialNumbers)) {
|
||||||
apiDataQueryDto.setSerialNumber(dto.getSerialNumber());
|
|
||||||
List<DeliveryInfoVo> numberInfo = deliveryService.getNumberInfo(apiDataQueryDto);
|
|
||||||
if (CollUtil.isEmpty(numberInfo)){
|
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
return numberInfo.get(0).getServiceInfo();
|
|
||||||
|
ApiDataQueryDto apiDataQueryDto = new ApiDataQueryDto();
|
||||||
|
apiDataQueryDto.setSerialNumbers(serialNumbers);
|
||||||
|
if (serialNumbers.size() == 1) {
|
||||||
|
apiDataQueryDto.setSerialNumber(serialNumbers.get(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<DeliveryInfoVo> numberInfo = deliveryService.getNumberInfo(apiDataQueryDto);
|
||||||
|
if (CollUtil.isEmpty(numberInfo)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<DeliveryInfoVo.ServiceInfo> result = new ArrayList<>();
|
||||||
|
for (DeliveryInfoVo deliveryInfoVo : numberInfo) {
|
||||||
|
if (CollUtil.isEmpty(deliveryInfoVo.getServiceInfo())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (DeliveryInfoVo.ServiceInfo serviceInfo : deliveryInfoVo.getServiceInfo()) {
|
||||||
|
serviceInfo.setSerialNumber(deliveryInfoVo.getSerialNumber());
|
||||||
|
serviceInfo.setProductCode(deliveryInfoVo.getProductCode());
|
||||||
|
result.add(serviceInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -120,7 +120,7 @@ public class ProductInfoServiceImpl implements IProductInfoService
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProductInfo> query(MaintenanceRecordsDto dto) {
|
public List<ProductInfo> query(MaintenanceRecordsDto dto) {
|
||||||
if (StringUtils.isEmpty(dto.getSerialNumber()) && StringUtils.isEmpty(dto.getProductCode())){
|
if (CollUtil.isEmpty(dto.getResolvedSerialNumbers()) && StringUtils.isEmpty(dto.getProductCode())) {
|
||||||
dto.setSerialNumber("-23232$$$$32");
|
dto.setSerialNumber("-23232$$$$32");
|
||||||
}
|
}
|
||||||
return productInfoMapper.query(dto);
|
return productInfoMapper.query(dto);
|
||||||
|
|
|
||||||
|
|
@ -1764,14 +1764,18 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
||||||
@Override
|
@Override
|
||||||
public List<OrderInfoVo> getOrderInfo(ApiDataQueryDto dto) {
|
public List<OrderInfoVo> getOrderInfo(ApiDataQueryDto dto) {
|
||||||
ProjectOrderInfo queryParams = new ProjectOrderInfo();
|
ProjectOrderInfo queryParams = new ProjectOrderInfo();
|
||||||
if (dto.getQueryStartTime()!=null) {
|
if (dto.getQueryStartTime() != null) {
|
||||||
queryParams.setUpdateTimeStart(dto.getQueryStartTime());
|
queryParams.setUpdateTimeStart(dto.getQueryStartTime());
|
||||||
}
|
}
|
||||||
if (dto.getQueryEndTime()!=null) {
|
if (dto.getQueryEndTime() != null) {
|
||||||
queryParams.setUpdateTimeEnd(dto.getQueryEndTime());
|
queryParams.setUpdateTimeEnd(dto.getQueryEndTime());
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(dto.getSerialNumber())){
|
List<String> serialNumbers = dto.getResolvedSerialNumbers();
|
||||||
queryParams.setProductSn(dto.getSerialNumber());
|
if (CollUtil.isNotEmpty(serialNumbers)) {
|
||||||
|
queryParams.setProductSnList(serialNumbers);
|
||||||
|
if (serialNumbers.size() == 1) {
|
||||||
|
queryParams.setProductSn(serialNumbers.get(0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return projectOrderInfoMapper.listOrderInfoVo(queryParams);
|
return projectOrderInfoMapper.listOrderInfoVo(queryParams);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.ruoyi.sip.vo;
|
package com.ruoyi.sip.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -47,14 +46,14 @@ public class DeliveryInfoVo {
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private String productType;
|
private String productType;
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ServiceInfo {
|
public class ServiceInfo {
|
||||||
//服务级别
|
//服务级别
|
||||||
private String serviceLevel;
|
private String serviceLevel;
|
||||||
//服务描述
|
//服务描述
|
||||||
private String serviceDescribe;
|
private String serviceDescribe;
|
||||||
|
private String serialNumber;
|
||||||
|
private String productCode;
|
||||||
//服务开始时间
|
//服务开始时间
|
||||||
private Date serviceStartTime;
|
private Date serviceStartTime;
|
||||||
//服务结束时间
|
//服务结束时间
|
||||||
|
|
|
||||||
|
|
@ -111,9 +111,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and t1.update_time <![CDATA[ <= ]]> #{queryEndTime}
|
and t1.update_time <![CDATA[ <= ]]> #{queryEndTime}
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
<if test="serialNumber!=null and serialNumber!=''">
|
<choose>
|
||||||
|
<when test="serialNumbers != null and serialNumbers.size > 0">
|
||||||
|
and t2.product_sn in
|
||||||
|
<foreach item="item" collection="serialNumbers" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
<when test="serialNumber!=null and serialNumber!=''">
|
||||||
and t2.product_sn = #{serialNumber}
|
and t2.product_sn = #{serialNumber}
|
||||||
</if>
|
</when>
|
||||||
|
</choose>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -374,9 +374,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
|
|
||||||
<if test="productSn!=null and productSn!=''">
|
<choose>
|
||||||
|
<when test="productSnList != null and productSnList.size > 0">
|
||||||
|
and t1.order_code in (
|
||||||
|
select distinct order_code
|
||||||
|
from oms_inventory_outer
|
||||||
|
where outer_code in (
|
||||||
|
select outer_code
|
||||||
|
from oms_inventory_info
|
||||||
|
where product_sn in
|
||||||
|
<foreach item="item" collection="productSnList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
</when>
|
||||||
|
<when test="productSn!=null and productSn!=''">
|
||||||
and t1.order_code in (select DISTINCT order_code from oms_inventory_outer where outer_code in (select outer_code from oms_inventory_info where product_sn=#{productSn} ) )
|
and t1.order_code in (select DISTINCT order_code from oms_inventory_outer where outer_code in (select outer_code from oms_inventory_info where product_sn=#{productSn} ) )
|
||||||
</if>
|
</when>
|
||||||
|
</choose>
|
||||||
</select>
|
</select>
|
||||||
<select id="listByCodeList" resultType="com.ruoyi.sip.domain.ProjectOrderInfo">
|
<select id="listByCodeList" resultType="com.ruoyi.sip.domain.ProjectOrderInfo">
|
||||||
<include refid="selectProjectOrderInfoRelationVo"/>
|
<include refid="selectProjectOrderInfoRelationVo"/>
|
||||||
|
|
|
||||||
|
|
@ -91,9 +91,17 @@
|
||||||
FROM
|
FROM
|
||||||
product_info t1 left join oms_inventory_info t2 on t1.product_code=t2.product_code
|
product_info t1 left join oms_inventory_info t2 on t1.product_code=t2.product_code
|
||||||
<where>
|
<where>
|
||||||
<if test="serialNumber!=null and serialNumber!=''">
|
<choose>
|
||||||
|
<when test="serialNumbers != null and serialNumbers.size > 0">
|
||||||
|
and t2.product_sn in
|
||||||
|
<foreach item="item" collection="serialNumbers" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
<when test="serialNumber!=null and serialNumber!=''">
|
||||||
and t2.product_sn=#{serialNumber}
|
and t2.product_sn=#{serialNumber}
|
||||||
</if>
|
</when>
|
||||||
|
</choose>
|
||||||
<if test="productCode!=null and productCode!=''">
|
<if test="productCode!=null and productCode!=''">
|
||||||
and t1.product_code=#{productCode}
|
and t1.product_code=#{productCode}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue