diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/aspect/StoreLogAspect.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/aspect/StoreLogAspect.java index 167a24a5..da5df570 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/aspect/StoreLogAspect.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/aspect/StoreLogAspect.java @@ -202,6 +202,8 @@ public class StoreLogAspect { } bmStorageLogList.add(bmStorageLog); } + //修饰入库库存变化 /repair_input_details/warehouse + } } } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/controller/ComplexQueryController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/controller/ComplexQueryController.java index 5275cfa9..4d1984bf 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/controller/ComplexQueryController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/controller/ComplexQueryController.java @@ -79,6 +79,136 @@ public class ComplexQueryController extends BaseController { util.exportExcel(response, list, "综合查询--保有设备总量查询"); } + /** + * 查询在库机具设备详情 + * @param bean + * @return + */ + @ApiOperation(value = "综合查询--查询在库机具设备详情") + @GetMapping("/getStorageInfoList") + public AjaxResult getStorageInfoList(StorageInfo bean) { + startPage(); + List list = complexQueryService.getMaCodeList(bean); + return AjaxResult.success(getDataTable(list)); + } + + /** + * 导出查询在库机具设备详情 + * @param bean + * @return + */ + @ApiOperation(value = "综合查询--查询在库机具设备详情") + @GetMapping("/exportStorageInfoList") + public void exportStorageInfoList(HttpServletResponse response, StorageInfo bean) { + List list = complexQueryService.getMaCodeList(bean); + ExcelUtil util = new ExcelUtil<>(StorageInfo.class); + util.exportExcel(response, list, "综合查询--在库机具设备详情"); + } + + /** + * 查询在用设备详情 + * @param bean + * @return + */ + @ApiOperation(value = "综合查询--查询在用设备详情") + @GetMapping("/getUserRecordList") + public AjaxResult getUserRecords(UseStorageInfo bean) { + startPage(); + List list = complexQueryService.getUserRecords(bean); + return AjaxResult.success(getDataTable(list)); + } + + /** + * 导出在用设备详情 + * @param response + * @param bean + */ + @ApiOperation(value = "综合查询--导出在用设备详情") + @GetMapping("/exportUserRecordList") + public void exportUserRecordList(HttpServletResponse response, UseStorageInfo bean) { + List list = complexQueryService.getUserRecords(bean); + ExcelUtil util = new ExcelUtil<>(UseStorageInfo.class); + util.exportExcel(response, list, "综合查询--导出在用设备详情"); + } + + /** + * 查询在修设备详情 + * @param bean + * @return + */ + @ApiOperation(value = "综合查询--查询在修设备详情") + @GetMapping("/getRepairRecordList") + public AjaxResult getRepairRecordList(RepairStorageInfo bean) { + startPage(); + List list = complexQueryService.getRepairRecordList(bean); + return AjaxResult.success(getDataTable(list)); + } + + /** + * 导出在修设备详情 + * @param response + * @param bean + */ + @ApiOperation(value = "综合查询--导出在修设备详情") + @GetMapping("/exportRepairRecordList") + public void exportRepairRecordList(HttpServletResponse response, RepairStorageInfo bean) { + List list = complexQueryService.getRepairRecordList(bean); + ExcelUtil util = new ExcelUtil<>(RepairStorageInfo.class); + util.exportExcel(response, list, "综合查询--导出在修设备详情"); + } + + /** + * 查询新购待入库设备详情 + * @param bean + * @return + */ + @ApiOperation(value = "综合查询--查询新购待入库设备详情") + @GetMapping("/getPurchaseRecordList") + public AjaxResult getPurchaseRecordList(PurchaseInputInfo bean) { + startPage(); + List list = complexQueryService.getPurchaseRecordList(bean); + return AjaxResult.success(getDataTable(list)); + } + + /** + * 导出新购待入库详情 + * @param response + * @param bean + */ + @ApiOperation(value = "综合查询--导出新购待入库详情") + @GetMapping("/exportPurchaseRecordList") + public void exportPurchaseRecordList(HttpServletResponse response, PurchaseInputInfo bean) { + List list = complexQueryService.getPurchaseRecordList(bean); + ExcelUtil util = new ExcelUtil<>(PurchaseInputInfo.class); + util.exportExcel(response, list, "综合查询--导出新购待入库详情"); + } + + /** + * 查询修饰待入库设备详情 + * @param bean + * @return + */ + @ApiOperation(value = "综合查询--查询修饰待入库设备详情") + @GetMapping("/getRepairInputList") + public AjaxResult getRepairInputList(RepairInputRecord bean) { + startPage(); + List list = complexQueryService.getRepairInputList(bean); + return AjaxResult.success(getDataTable(list)); + } + + /** + * 导出修饰待入库详情 + * @param response + * @param bean + */ + @ApiOperation(value = "综合查询--导出修饰待入库详情") + @GetMapping("/exportRepairInputList") + public void exportRepairInputList(HttpServletResponse response, RepairInputRecord bean) { + List list = complexQueryService.getRepairInputList(bean); + ExcelUtil util = new ExcelUtil<>(RepairInputRecord.class); + util.exportExcel(response, list, "综合查询--导出修饰待入库详情"); + } + /** * 工程机具使用列表 * @param bean diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/PurchaseInputInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/PurchaseInputInfo.java new file mode 100644 index 00000000..ef975cf3 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/PurchaseInputInfo.java @@ -0,0 +1,65 @@ +package com.bonus.material.basic.domain; + +import com.bonus.common.core.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 综合查询新购待入库详情 + * @Author ma_sh + * @create 2024/12/19 13:22 + */ +@Data +public class PurchaseInputInfo { + + @ApiModelProperty(value = "主键id") + private Integer id; + + @ApiModelProperty(value = "机具名称") + @Excel(name = "机具名称") + private String typeName; + + @ApiModelProperty(value = "规格ID") + private Integer typeId; + + @ApiModelProperty(value = "任务ID") + private Long taskId; + + @ApiModelProperty(value = "规格型号") + @Excel(name = "规格型号") + private String typeModelName; + + @ApiModelProperty(value = "新购待入库数量") + @Excel(name = "新购待入库数量") + private BigDecimal inputNum; + + @ApiModelProperty(value = "购置单价") + @Excel(name = "原值(元)") + private BigDecimal buyPrice; + + @ApiModelProperty(value = "设备编码") + @Excel(name = "设备编码") + private String maCode; + + @ApiModelProperty(value = "库管员") + @Excel(name = "库管员") + private String maKeeper; + + @ApiModelProperty(value = "验收完成时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "验收完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date checkTime; + + @ApiModelProperty(value = "新购待入库单号") + @Excel(name = "新购待入库单号") + private String purchaseCode; + + @ApiModelProperty(value = "关键字") + private String keyWord; +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/RepairInputRecord.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/RepairInputRecord.java new file mode 100644 index 00000000..75026e21 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/RepairInputRecord.java @@ -0,0 +1,66 @@ +package com.bonus.material.basic.domain; + +import com.bonus.common.core.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 综合查询 维修待入库详情 + * @Author ma_sh + * @create 2024/12/19 13:29 + */ +@Data +public class RepairInputRecord { + + @ApiModelProperty(value = "主键id") + private Integer id; + + @ApiModelProperty(value = "机具名称") + @Excel(name = "机具名称") + private String typeName; + + @ApiModelProperty(value = "规格ID") + private Integer typeId; + + @ApiModelProperty(value = "规格型号") + @Excel(name = "规格型号") + private String typeModelName; + + @ApiModelProperty(value = "修饰待入库数量") + @Excel(name = "修饰待入库数量") + private BigDecimal repairInputNum; + + @ApiModelProperty(value = "购置单价") + @Excel(name = "原值(元)") + private BigDecimal buyPrice; + + @ApiModelProperty(value = "设备编码") + @Excel(name = "设备编码") + private String maCode; + + @ApiModelProperty(value = "库管员") + @Excel(name = "库管员") + private String maKeeper; + + @ApiModelProperty(value = "维修员") + @Excel(name = "维修员") + private String repairer; + + @ApiModelProperty(value = "修饰提交时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "修饰提交时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date repairInputTime; + + @ApiModelProperty(value = "修饰待入库单号") + @Excel(name = "修饰待入库单号") + private String repairInputCode; + + @ApiModelProperty(value = "关键字") + private String keyWord; +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/RepairStorageInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/RepairStorageInfo.java new file mode 100644 index 00000000..ac9af58b --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/RepairStorageInfo.java @@ -0,0 +1,66 @@ +package com.bonus.material.basic.domain; + +import com.bonus.common.core.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 综合查询在修数量详情 + * @Author ma_sh + * @create 2024/12/19 13:09 + */ +@Data +public class RepairStorageInfo { + + @ApiModelProperty(value = "主键id") + private Integer id; + + @ApiModelProperty(value = "机具名称") + @Excel(name = "机具名称") + private String typeName; + + @ApiModelProperty(value = "规格ID") + private Integer typeId; + + @ApiModelProperty(value = "规格型号") + @Excel(name = "规格型号") + private String typeModelName; + + @ApiModelProperty(value = "在修数量") + @Excel(name = "在修数量") + private BigDecimal repairNum; + + @ApiModelProperty(value = "购置单价") + @Excel(name = "原值(元)") + private BigDecimal buyPrice; + + @ApiModelProperty(value = "设备编码") + @Excel(name = "设备编码") + private String maCode; + + @ApiModelProperty(value = "维修员") + @Excel(name = "维修员") + private String repairer; + + @ApiModelProperty(value = "操作人") + @Excel(name = "操作人") + private String creator; + + @ApiModelProperty(value = "退料时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "退料时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date leaseTime; + + @ApiModelProperty(value = "维修单号") + @Excel(name = "维修单号") + private String repairCode; + + @ApiModelProperty(value = "关键字") + private String keyWord; +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/StorageInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/StorageInfo.java new file mode 100644 index 00000000..b57fad42 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/StorageInfo.java @@ -0,0 +1,66 @@ +package com.bonus.material.basic.domain; + +import com.bonus.common.core.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 机具入库查询详情 + * @Author ma_sh + * @create 2024/12/19 9:50 + */ +@Data +public class StorageInfo { + + @ApiModelProperty(value = "主键id") + private Integer id; + + @ApiModelProperty(value = "机具名称") + @Excel(name = "机具名称") + private String typeName; + + @ApiModelProperty(value = "规格ID") + private Integer typeId; + + @ApiModelProperty(value = "规格型号") + @Excel(name = "规格型号") + private String typeModelName; + + @ApiModelProperty(value = "入库数量") + @Excel(name = "入库数量") + private BigDecimal storeNum; + + @ApiModelProperty(value = "购置单价") + @Excel(name = "原值(元)") + private BigDecimal buyPrice; + + @ApiModelProperty(value = "设备编码") + @Excel(name = "设备编码") + private String maCode; + + @ApiModelProperty(value = "库管员") + @Excel(name = "库管员") + private String maKeeper; + + @ApiModelProperty(value = "操作人") + @Excel(name = "操作人") + private String inputUser; + + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date inputTime; + + @ApiModelProperty(value = "入库方式") + @Excel(name = "入库方式") + private String inputType; + + @ApiModelProperty(value = "关键字") + private String keyWord; +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/UseStorageInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/UseStorageInfo.java new file mode 100644 index 00000000..b0426469 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/UseStorageInfo.java @@ -0,0 +1,66 @@ +package com.bonus.material.basic.domain; + +import com.bonus.common.core.annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 在用机具查询详情 + * @Author ma_sh + * @create 2024/12/19 10:41 + */ +@Data +public class UseStorageInfo { + + @ApiModelProperty(value = "主键id") + private Integer id; + + @ApiModelProperty(value = "机具名称") + @Excel(name = "机具名称") + private String typeName; + + @ApiModelProperty(value = "规格ID") + private Integer typeId; + + @ApiModelProperty(value = "规格型号") + @Excel(name = "规格型号") + private String typeModelName; + + @ApiModelProperty(value = "在用数量") + @Excel(name = "在用数量") + private BigDecimal usNum; + + @ApiModelProperty(value = "购置单价") + @Excel(name = "原值(元)") + private BigDecimal buyPrice; + + @ApiModelProperty(value = "设备编码") + @Excel(name = "设备编码") + private String maCode; + + @ApiModelProperty(value = "库管员") + @Excel(name = "库管员") + private String maKeeper; + + @ApiModelProperty(value = "操作人") + @Excel(name = "操作人") + private String creator; + + @ApiModelProperty(value = "出库时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "出库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date outTime; + + @ApiModelProperty(value = "领料单号") + @Excel(name = "领料单号") + private String leaseCode; + + @ApiModelProperty(value = "关键字") + private String keyWord; +} diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/mapper/ComplexQueryMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/mapper/ComplexQueryMapper.java index 67ee91d8..9da4e220 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/mapper/ComplexQueryMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/mapper/ComplexQueryMapper.java @@ -1,6 +1,7 @@ package com.bonus.material.basic.mapper; import com.bonus.material.basic.domain.*; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -44,4 +45,47 @@ public interface ComplexQueryMapper { * @return */ List getRetainedEquipmentList(RetainedEquipmentInfo bean); + + /** + * 查询机具编码 + * @param bean + * @return + */ + List getMaCodeList(StorageInfo bean); + + /** + * 查询在用设备详情 + * @param bean + * @return + */ + List getUserRecords(UseStorageInfo bean); + + /** + * 查询在修设备详情 + * @param bean + * @return + */ + List getRepairRecordList(RepairStorageInfo bean); + + /** + * 查询新购待入库设备详情 + * @param bean + * @return + */ + List getPurchaseRecordList(PurchaseInputInfo bean); + + /** + * 查询修饰待入库设备详情 + * @param bean + * @return + */ + List getRepairInputList(RepairInputRecord bean); + + /** + * 根据任务ID和机具规格ID查询机具编码 + * @param taskId + * @param typeId + * @return + */ + List selectMaCodeByTaskIdAndTypeId(@Param("taskId") Long taskId, @Param("typeId") Integer typeId); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/ComplexQueryService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/ComplexQueryService.java index ddfc4fb9..c0b81b28 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/ComplexQueryService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/ComplexQueryService.java @@ -51,4 +51,39 @@ public interface ComplexQueryService { * @return */ List getRetainedEquipmentList(RetainedEquipmentInfo bean); + + /** + * 查询机具编码 + * @param bean + * @return + */ + List getMaCodeList(StorageInfo bean); + + /** + * 查询在用设备详情 + * @param bean + * @return + */ + List getUserRecords(UseStorageInfo bean); + + /** + * 查询在修设备详情 + * @param bean + * @return + */ + List getRepairRecordList(RepairStorageInfo bean); + + /** + * 查询新购待入库设备详情 + * @param bean + * @return + */ + List getPurchaseRecordList(PurchaseInputInfo bean); + + /** + * 查询修饰待入库设备详情 + * @param bean + * @return + */ + List getRepairInputList(RepairInputRecord bean); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/ComplexQueryServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/ComplexQueryServiceImpl.java index fd931e6f..2cf0444f 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/ComplexQueryServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/ComplexQueryServiceImpl.java @@ -98,6 +98,7 @@ public class ComplexQueryServiceImpl implements ComplexQueryService { InputRecordInfo newRecord = new InputRecordInfo(); BeanUtils.copyProperties(inputRecordInfo, newRecord); newRecord.setMaCode(code); + newRecord.setInputNum(BigDecimal.ONE); list.add(newRecord); } } else { @@ -246,4 +247,128 @@ public class ComplexQueryServiceImpl implements ComplexQueryService { return recordList; } + /** + * 查询机具编码 + * @param bean + * @return + */ + @Override + public List getMaCodeList(StorageInfo bean) { + List recordList = complexQueryMapper.getMaCodeList(bean); + List list = new ArrayList<>(); + if (CollectionUtils.isNotEmpty(recordList)) { + for (StorageInfo storageInfo : recordList) { + if (StringUtils.isNotBlank(storageInfo.getMaCode())) { + String[] split = storageInfo.getMaCode().split(","); + if (split.length > 1) { + for (String code : split) { + StorageInfo newRecord = new StorageInfo(); + BeanUtils.copyProperties(storageInfo, newRecord); + newRecord.setMaCode(code); + newRecord.setStoreNum(BigDecimal.ONE); + list.add(newRecord); + } + } else { + list.add(storageInfo); + } + } else { + list.add(storageInfo); + } + } + } + if (StringUtils.isNotBlank(bean.getKeyWord())) { + String keyword = bean.getKeyWord(); + return list.stream().filter(item -> { + return (StringUtils.isNotBlank(item.getMaCode()) && item.getMaCode().contains(keyword)) || + (StringUtils.isNotBlank(item.getTypeName()) && item.getTypeName().contains(keyword)) || + (StringUtils.isNotBlank(item.getTypeModelName()) && item.getTypeModelName().contains(keyword)) || + (StringUtils.isNotBlank(item.getInputUser()) && item.getInputUser().contains(keyword)) || + (StringUtils.isNotBlank(item.getMaKeeper()) && item.getMaKeeper().contains(keyword)) || + (StringUtils.isNotBlank(item.getInputType()) && item.getInputType().contains(keyword)); + }).collect(Collectors.toList()); + } + return list; + } + + /** + * 查询在用设备详情 + * @param bean + * @return + */ + @Override + public List getUserRecords(UseStorageInfo bean) { + return complexQueryMapper.getUserRecords(bean); + } + + /** + * 查询在修设备详情 + * @param bean + * @return + */ + @Override + public List getRepairRecordList(RepairStorageInfo bean) { + return complexQueryMapper.getRepairRecordList(bean); + } + + /** + * 查询新购待入库设备详情 + * @param bean + * @return + */ + @Override + public List getPurchaseRecordList(PurchaseInputInfo bean) { + List recordList = complexQueryMapper.getPurchaseRecordList(bean); + List tempList = new ArrayList<>(); + + Iterator iterator = recordList.iterator(); + while (iterator.hasNext()) { + PurchaseInputInfo purchaseInputInfo = iterator.next(); + // 根据任务id和类型id查询未入库编码信息 + List maCodeList = complexQueryMapper.selectMaCodeByTaskIdAndTypeId(purchaseInputInfo.getTaskId(), bean.getTypeId()); + if (CollectionUtils.isNotEmpty(maCodeList)) { + boolean addedPurchaseInputInfo = false; + for (PurchaseInputInfo info : maCodeList) { + if (purchaseInputInfo.getInputNum().compareTo(BigDecimal.valueOf(maCodeList.size())) > 0) { + purchaseInputInfo.setInputNum(purchaseInputInfo.getInputNum().subtract(BigDecimal.valueOf(maCodeList.size()))); + String maCode = info.getMaCode(); + BeanUtils.copyProperties(purchaseInputInfo, info); + info.setMaCode(maCode); + info.setInputNum(BigDecimal.ONE); + tempList.add(info); + if (!addedPurchaseInputInfo) { + tempList.add(purchaseInputInfo); + addedPurchaseInputInfo = true; + } + } else if (purchaseInputInfo.getInputNum().compareTo(BigDecimal.valueOf(maCodeList.size())) == 0) { + String maCode = info.getMaCode(); + BeanUtils.copyProperties(purchaseInputInfo, info); + info.setMaCode(maCode); + info.setInputNum(BigDecimal.ONE); + tempList.add(info); + } + } + } + } + if (StringUtils.isNotBlank(bean.getKeyWord())) { + String keyword = bean.getKeyWord(); + return tempList.stream().filter(item -> { + return (StringUtils.isNotBlank(item.getMaCode()) && item.getMaCode().contains(keyword)) || + (StringUtils.isNotBlank(item.getTypeName()) && item.getTypeName().contains(keyword)) || + (StringUtils.isNotBlank(item.getTypeModelName()) && item.getTypeModelName().contains(keyword)) || + (StringUtils.isNotBlank(item.getMaKeeper()) && item.getMaKeeper().contains(keyword)); + }).collect(Collectors.toList()); + } + return tempList; + } + + /** + * 查询修饰待入库设备详情 + * @param bean + * @return + */ + @Override + public List getRepairInputList(RepairInputRecord bean) { + return complexQueryMapper.getRepairInputList(bean); + } + } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml index e54998f3..18d74b4a 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml @@ -344,6 +344,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + + + + + + diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckDetailsMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckDetailsMapper.xml index 0fa3ead1..235ed967 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckDetailsMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/purchase/PurchaseCheckDetailsMapper.xml @@ -337,6 +337,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" `status` = #{status}, check_result = #{checkResult}, check_num = purchase_num, + check_time = NOW(), warn_documents = #{warnDocuments},