From d4a943ce4664a9c89b615ba2b0327acef8356919 Mon Sep 17 00:00:00 2001 From: dingjie Date: Sat, 23 Dec 2023 15:57:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=B4=AD=E5=85=A5=E5=BA=93=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bonus/sgzb/base/api/domain/MaMachine.java | 258 ++---------------- .../bonus/sgzb/base/domain/MaHouseSet.java | 11 + .../mapper/base/MaHouseSetMapper.xml | 3 +- .../resources/mapper/base/MaMachineMapper.xml | 26 +- .../mapper/base/MaTypeFileMapper.xml | 2 +- .../impl/PurchaseCheckInfoServiceImpl.java | 2 + .../impl/PurchaseMacodeInfoServiceImpl.java | 3 + .../material/PurchaseCheckInfoMapper.xml | 3 +- sgzb-modules/sgzb-system/pom.xml | 2 +- 9 files changed, 61 insertions(+), 249 deletions(-) diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java index af2927ab..7d72ab42 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java @@ -22,8 +22,18 @@ public class MaMachine extends BaseEntity { /** * 类型ID */ - @ApiModelProperty(value = "类型ID") + @ApiModelProperty(value = "资产属性id") private long propId; + /** + * 物品种类 + */ + @ApiModelProperty(value = "物品种类id") + private long itemId; + /** + * 设备类型 + */ + @ApiModelProperty(value = "设备类型id") + private long deviceId; /** * 物品种类 */ @@ -151,246 +161,12 @@ public class MaMachine extends BaseEntity { private String labelCode; + @ApiModelProperty(value = "筛选名称") + private String keyWord; + @ApiModelProperty(value = "开始时间") + private String beginTime; - public void setMaId(long maId) { - this.maId = maId; - } - - - public long getTypeId() { - return typeId; - } - - public void setTypeId(long typeId) { - this.typeId = typeId; - } - - - public String getMaCode() { - return maCode; - } - - public void setMaCode(String maCode) { - this.maCode = maCode; - } - - - public String getPreCode() { - return preCode; - } - - public void setPreCode(String preCode) { - this.preCode = preCode; - } - - - public String getMaStatus() { - return maStatus; - } - - public void setMaStatus(String maStatus) { - this.maStatus = maStatus; - } - - - public String getQrCode() { - return qrCode; - } - - public void setQrCode(String qrCode) { - this.qrCode = qrCode; - } - - - public String getBuyPrice() { - return buyPrice; - } - - public void setBuyPrice(String buyPrice) { - this.buyPrice = buyPrice; - } - - - public String getMaVender() { - return maVender; - } - - public void setMaVender(String maVender) { - this.maVender = maVender; - } - - - public String getOutFacTime() { - return outFacTime; - } - - public void setOutFacTime(String outFacTime) { - this.outFacTime = outFacTime; - } - - - public String getOutFacCode() { - return outFacCode; - } - - public void setOutFacCode(String outFacCode) { - this.outFacCode = outFacCode; - } - - - public String getAssetsCode() { - return assetsCode; - } - - public void setAssetsCode(String assetsCode) { - this.assetsCode = assetsCode; - } - - - public String getCheckMan() { - return checkMan; - } - - public void setCheckMan(String checkMan) { - this.checkMan = checkMan; - } - - - public String getThisCheckTime() { - return thisCheckTime; - } - - public void setThisCheckTime(String thisCheckTime) { - this.thisCheckTime = thisCheckTime; - } - - - public String getNextCheckTime() { - return nextCheckTime; - } - - public void setNextCheckTime(String nextCheckTime) { - this.nextCheckTime = nextCheckTime; - } - - - public String getGpsCode() { - return gpsCode; - } - - public void setGpsCode(String gpsCode) { - this.gpsCode = gpsCode; - } - - - public String getRfidCode() { - return rfidCode; - } - - public void setRfidCode(String rfidCode) { - this.rfidCode = rfidCode; - } - - - public String getErpCode() { - return erpCode; - } - - public void setErpCode(String erpCode) { - this.erpCode = erpCode; - } - - - public String getTransferCode() { - return transferCode; - } - - public void setTransferCode(String transferCode) { - this.transferCode = transferCode; - } - - - public String getInOutNum() { - return inOutNum; - } - - public void setInOutNum(String inOutNum) { - this.inOutNum = inOutNum; - } - - - public String getBuyTask() { - return buyTask; - } - - public void setBuyTask(String buyTask) { - this.buyTask = buyTask; - } - - - public String getOwnHouse() { - return ownHouse; - } - - public void setOwnHouse(String ownHouse) { - this.ownHouse = ownHouse; - } - - - public String getCompanyId() { - return companyId; - } - - public void setCompanyId(String companyId) { - this.companyId = companyId; - } - - public String getItemType() { - return itemType; - } - - public void setItemType(String itemType) { - this.itemType = itemType; - } - - public String getDeviceType() { - return deviceType; - } - - public void setDeviceType(String deviceType) { - this.deviceType = deviceType; - } - - public String getSpecificationType() { - return specificationType; - } - - public void setSpecificationType(String specificationType) { - this.specificationType = specificationType; - } - - public String getMaStatusName() { - return maStatusName; - } - - public void setMaStatusName(String maStatusName) { - this.maStatusName = maStatusName; - } - - public String getLabelCode() { - return labelCode; - } - - public void setLabelCode(String labelCode) { - this.labelCode = labelCode; - } - - public long getPropId() { - return propId; - } - - public void setPropId(long propId) { - this.propId = propId; - } + @ApiModelProperty(value = "结束时间") + private String endTime; } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaHouseSet.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaHouseSet.java index be0734d0..080c02fc 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaHouseSet.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/MaHouseSet.java @@ -15,6 +15,9 @@ public class MaHouseSet { */ @ApiModelProperty(value="仓库ID") private long houseId; + + @ApiModelProperty(value="仓库名称") + private String houseName; /** * 机具类型ID */ @@ -255,4 +258,12 @@ public class MaHouseSet { public void setMaCode(String maCode) { this.maCode = maCode; } + + public String getHouseName() { + return houseName; + } + + public void setHouseName(String houseName) { + this.houseName = houseName; + } } diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaHouseSetMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaHouseSetMapper.xml index 4e1fde98..10af974e 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaHouseSetMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaHouseSetMapper.xml @@ -91,12 +91,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select m.ma_id, m.type_id, m.ma_code, m.pre_code, m.ma_status, dic.name maStatusName, m.qr_code, m.buy_price, m.ma_vender, m.out_fac_time, m.out_fac_code, - m.assets_code, m.check_man, m.this_check_time, m.next_check_time, m.gps_code, m.rfid_code, m.erp_code, m.transfer_code, - m.in_out_num, m.buy_task, m.own_house ,m.company_id ,mt.type_name specificationType,mt1.type_name deviceType, mt2.type_name itemType, + select m.ma_id, m.type_id, m.ma_code, m.pre_code, m.ma_status, dic.name maStatusName, m.qr_code, m.buy_price, + m.ma_vender, m.out_fac_time, m.out_fac_code, m.assets_code, m.check_man, m.this_check_time, m.next_check_time, + m.gps_code, m.rfid_code, m.erp_code, m.transfer_code,m.create_time ,m.in_out_num, m.buy_task, m.own_house , + m.company_id ,mt.type_name specificationType,mt1.type_name deviceType, mt2.type_name itemType, mmb.label_code labelCode from ma_machine m left join (select id,p_id,name from sys_dic where p_id in (select id from sys_dic where value = 'ma_status')) dic on m.ma_status = dic.id @@ -47,12 +49,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join ma_type mt1 on mt.parent_id = mt1.type_id left join ma_type mt2 on mt1.parent_id = mt2.type_id left join ma_label_bind mmb on m.ma_id = mmb.ma_id and m.type_id = mmb.type_id + left join ma_prop_set mps on mt.type_id = mps.type_id AND ma_id = #{maId} - AND type_id = #{typeId} + AND mt.type_id = #{typeId} + + + AND mt1.type_id = #{deviceId} + + + AND mt2.type_id = #{itemId} + + + AND mps.prop_id = #{propId} + + + AND (m.ma_code like concat('%',#{keyWord},'%') or m.buy_task like concat('%',#{keyWord},'%')) + + + AND m.create_time between #{beginTime} and #{endTime} order by m.ma_id desc diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaTypeFileMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaTypeFileMapper.xml index f1623879..5e5e32b3 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaTypeFileMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/MaTypeFileMapper.xml @@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where type_id = #{typeId} and file_type = #{fileType} - + delete from ma_type_file where type_id = #{typeId} and file_type = #{fileType} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java index e88422c5..3d93fb33 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java @@ -5,6 +5,7 @@ import java.util.Date; import java.util.List; import com.bonus.sgzb.base.api.domain.TmTask; +import com.bonus.sgzb.common.security.utils.SecurityUtils; import com.bonus.sgzb.material.domain.BmNoticeInfo; import com.bonus.sgzb.material.domain.PurchaseCheckDetails; import com.bonus.sgzb.material.domain.PurchaseCheckInfo; @@ -112,6 +113,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService task.setCode(purchaseCodeRule()); task.setCreateTime(DateUtils.getNowDate()); task.setCompanyId(purchaseCheckInfo.getCompanyId()); + task.setCreateBy(SecurityUtils.getUsername()); // 创建任务信息 taskMapper.insertTmTask(task); purchaseCheckInfo.setTaskId(task.getTaskId()); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java index c2b3bb23..17cadf5e 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java @@ -96,6 +96,8 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService } PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails(); for (PurchaseMacodeInfo purchaseMacodeInfo : purchaseMacodeInfoList) { + Long taskId = purchaseMacodeInfo.getTaskId(); + TmTask task = taskMapper.selectTmTaskByTaskId(taskId); Long typeId = purchaseMacodeInfo.getTypeId(); String maCode = purchaseMacodeInfo.getMaCode(); purchaseCheckDetails.setTypeId(typeId); @@ -109,6 +111,7 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService maMachine.setTypeId(typeId); maMachine.setMaStatus("14"); maMachine.setQrCode(qrCode); + maMachine.setBuyTask(task.getCode()); // 设备原厂编号 String fixCode = purchaseMacodeInfo.getFixCode(); if ("0".equals(fixCode)) { diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml index 7c64189a..9da62c3c 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml @@ -144,7 +144,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"