From f28f3b6c86b3e144f510b51145464cc4516448c9 Mon Sep 17 00:00:00 2001
From: 15856 <15856818120@163.com>
Date: Fri, 28 Jun 2024 16:35:01 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E9=A2=84=E6=8A=A5=E5=BA=9F=E9=A9=B3?=
=?UTF-8?q?=E5=9B=9E=E9=80=80=E6=96=99=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/resources/mapper/app/BackReceiveMapper.xml | 7 +++++--
.../bonus/sgzb/material/mapper/BackApplyMapper.java | 2 ++
.../service/impl/ScrapApplyDetailsServiceImpl.java | 13 +++++++++++--
.../resources/mapper/material/BackApplyMapper.xml | 4 ++++
4 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml
index bdcccede..d83012e2 100644
--- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml
+++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml
@@ -1075,6 +1075,7 @@
mt.type_id AS typeId,
mm.ma_code AS maCode,
mm.ma_id AS maId,
+ bad.remark AS remark,
sd.NAME AS maStatus
FROM
ma_type mt
@@ -1084,9 +1085,11 @@
LEFT JOIN sys_dic sd ON sd.id = mm.ma_status
WHERE
mm.ma_status = '16'
- AND mt.type_id = #{typeId}
- AND sai.`type_id` = #{typeId}
AND sai.agreement_id = #{agreementId}
+
+ AND mt.type_id = #{typeId}
+ AND sai.`type_id` = #{typeId}
+
AND mm.ma_code like concat('%', #{maCode}, '%')
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java
index 19c8eeb5..db985384 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java
@@ -157,4 +157,6 @@ public interface BackApplyMapper {
BackApplyDetailsPo getBackApplyDetailsByParentId(ScrapApplyDetails scrapApplyDetail);
void insertBackApplyDetails(BackApplyDetailsPo backApplyDetailsPoNew);
+
+ void updateBackApplyDetailsByParentId(BackApplyDetailsPo backApplyDetailsPoNew);
}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapApplyDetailsServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapApplyDetailsServiceImpl.java
index 5de2ebf3..7227115e 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapApplyDetailsServiceImpl.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ScrapApplyDetailsServiceImpl.java
@@ -270,8 +270,17 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
backApplyDetailsPoNew.setCreateBy(backApplyDetailsPo.getCreateBy());
backApplyDetailsPoNew.setCompanyId(backApplyDetailsPo.getCompanyId());
backApplyDetailsPoNew.setRemark(scrapApplyDetail.getAuditRemark());
- backApplyMapper.insertBackApplyDetails(backApplyDetailsPoNew);
-
+ //在存入的时候判断是否有同类型的机具,如果有数量加1,针对编码的机具
+ scrapApplyDetail.setParentId(backApplyInfoPo.getId());
+ scrapApplyDetail.setTypeId(Long.valueOf(backApplyDetailsPo.getTypeId()));
+ BackApplyDetailsPo backApplyDetailsPoResult = backApplyMapper.getBackApplyDetailsByParentId(scrapApplyDetail);
+ if (backApplyDetailsPoResult!=null){
+ backApplyDetailsPoNew.setPreNum(backApplyDetailsPoResult.getPreNum().add(BigDecimal.ONE));
+ backApplyDetailsPoNew.setAuditNum(backApplyDetailsPoResult.getAuditNum().add(BigDecimal.ONE));
+ backApplyMapper.updateBackApplyDetailsByParentId(backApplyDetailsPoNew);
+ }else {
+ backApplyMapper.insertBackApplyDetails(backApplyDetailsPoNew);
+ }
//修改协议表的状态
SltAgreementInfo sltAgreementInfo = new SltAgreementInfo();
sltAgreementInfo.setAgreementId(agreementId.toString());
diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml
index d9e6f05f..6bba77d0 100644
--- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml
+++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml
@@ -521,6 +521,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
bai.id = #{id}
+
+ UPDATE back_apply_details set pre_num = #{preNum} ,audit_num = #{auditNum}
+ WHERE parent_id = #{parentId} and type_id = #{typeId}
+
DELETE
From 3fad8444ebf8fe921f8d844e0d6fbeccbecff4bc Mon Sep 17 00:00:00 2001
From: binbin_pan
Date: Fri, 28 Jun 2024 16:52:28 +0800
Subject: [PATCH 2/5] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=9F=A5=E8=AF=A2-?=
=?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sgzb-ui/src/views/stquery/deviceStatusRecord.vue | 4 ++--
sgzb-ui/src/views/stquery/deviceStatusRecordDeBug.vue | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sgzb-ui/src/views/stquery/deviceStatusRecord.vue b/sgzb-ui/src/views/stquery/deviceStatusRecord.vue
index beefb80c..3d439ce4 100644
--- a/sgzb-ui/src/views/stquery/deviceStatusRecord.vue
+++ b/sgzb-ui/src/views/stquery/deviceStatusRecord.vue
@@ -320,11 +320,11 @@ export default {
/** 导出按钮操作 */
handleExport() {
this.download(
- 'material/backRecord/export',
+ 'material/storageStatus/export',
{
...this.queryParams,
},
- `综合查询_退料记录_${new Date().getTime()}.xlsx`,
+ `综合查询_机具仓储状态_${new Date().getTime()}.xlsx`,
)
},
diff --git a/sgzb-ui/src/views/stquery/deviceStatusRecordDeBug.vue b/sgzb-ui/src/views/stquery/deviceStatusRecordDeBug.vue
index d667f930..06898712 100644
--- a/sgzb-ui/src/views/stquery/deviceStatusRecordDeBug.vue
+++ b/sgzb-ui/src/views/stquery/deviceStatusRecordDeBug.vue
@@ -320,11 +320,11 @@ export default {
/** 导出按钮操作 */
handleExport() {
this.download(
- 'material/backRecord/export',
+ 'material/storageStatus/export',
{
...this.queryParams,
},
- `综合查询_退料记录_${new Date().getTime()}.xlsx`,
+ `综合查询_调试仓储状态_${new Date().getTime()}.xlsx`,
)
},
From 049f353e5059d735ffc1309a3bd9972b386b6557 Mon Sep 17 00:00:00 2001
From: binbin_pan
Date: Fri, 28 Jun 2024 17:03:01 +0800
Subject: [PATCH 3/5] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=9F=A5=E8=AF=A2-?=
=?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sgzb-ui/src/views/stquery/deviceStatusRecord.vue | 1 +
sgzb-ui/src/views/stquery/deviceStatusRecordDeBug.vue | 1 +
2 files changed, 2 insertions(+)
diff --git a/sgzb-ui/src/views/stquery/deviceStatusRecord.vue b/sgzb-ui/src/views/stquery/deviceStatusRecord.vue
index 3d439ce4..f5b17ea1 100644
--- a/sgzb-ui/src/views/stquery/deviceStatusRecord.vue
+++ b/sgzb-ui/src/views/stquery/deviceStatusRecord.vue
@@ -239,6 +239,7 @@ export default {
proId: null, //工程id
types: 1, // 1申请列表 2审核列表
+ maType: '1', // 1机具 2调试
},
unitList: [], //来往单位集合
proList: [], //工程集合
diff --git a/sgzb-ui/src/views/stquery/deviceStatusRecordDeBug.vue b/sgzb-ui/src/views/stquery/deviceStatusRecordDeBug.vue
index 06898712..d8c9888b 100644
--- a/sgzb-ui/src/views/stquery/deviceStatusRecordDeBug.vue
+++ b/sgzb-ui/src/views/stquery/deviceStatusRecordDeBug.vue
@@ -239,6 +239,7 @@ export default {
proId: null, //工程id
types: 1, // 1申请列表 2审核列表
+ maType: '2', // 1机具 2调试
},
unitList: [], //来往单位集合
proList: [], //工程集合
From 763746b314a150f2eea683c29a7ab1c6c247a915 Mon Sep 17 00:00:00 2001
From: "liang.chao" <1360241448@qq.com>
Date: Mon, 1 Jul 2024 14:20:24 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E8=AF=95=E8=BF=90=E8=A1=8C=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/LeaseOutDetailsServiceImpl.java | 44 +++++++++----------
.../bonus/sgzb/base/domain/BmProjectInfo.java | 10 +++++
.../bonus/sgzb/base/domain/BmProjectLot.java | 16 +++++++
.../resources/mapper/app/TmTaskMapper.xml | 6 +--
.../mapper/base/BmProjectInfoMapper.xml | 10 +++--
.../mapper/base/BmProjectLotMapper.xml | 8 +++-
.../InventoryAndWarehousingMapper.xml | 2 +-
.../mapper/material/LeaseRecordMapper.xml | 1 +
.../material/PurchaseAccessoryMapper.xml | 2 +-
.../material/PurchaseCheckInfoMapper.xml | 6 +--
.../material/ReturnOfMaterialsInfoMapper.xml | 2 +-
11 files changed, 72 insertions(+), 35 deletions(-)
diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java
index 950db6b3..ece9bbc4 100644
--- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java
+++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java
@@ -203,33 +203,33 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
// 首先更新领料任务详情表的领料数及状态(lease_apply_details)
res = leaseOutDetailsMapper.updateLeaseApplyDetailsOutNum(record);
LeaseApplyDetails leaseApplyDetails = leaseOutDetailsMapper.getLeaseApplyDetails(record);
- if (leaseApplyDetails.getPreNum().equals(leaseApplyDetails.getAlNum()) || leaseApplyDetails.getAuditNum().equals(leaseApplyDetails.getAlNum())){
+ if (leaseApplyDetails.getPreNum().equals(leaseApplyDetails.getAlNum()) || leaseApplyDetails.getAuditNum().equals(leaseApplyDetails.getAlNum())) {
leaseOutDetailsMapper.updateLeaseApplyDetails(record);
}
+ if (res > 0) {
+ // 插入领料出库明细表(lease_out_details)
+ res = leaseOutDetailsMapper.insertSelective(record);
if (res > 0) {
- // 插入领料出库明细表(lease_out_details)
- res = leaseOutDetailsMapper.insertSelective(record);
- if (res > 0) {
- if (record.getManageType() == 2) {
- // 成套机具减少 (ma_type 设备规格表)的库存数量
- res = leaseOutDetailsMapper.updateMaTypeStockNum(record);
- // 成套机具减少 (ma_type 设备规格表)配件的库存数量
- List typeIds = leaseOutDetailsMapper.getMaTypeDetails(record);
- typeIds.removeIf(item -> item == null);
- for (TmTask typeId : typeIds) {
- MachinePart machinePart = leaseOutDetailsMapper.getMachineParts(typeId);
- machinePart.setPartNum((typeId.getPartNum() * record.getOutNum()));
- typeId.setNum(machinePart.getNum() - machinePart.getPartNum());
- res = leaseOutDetailsMapper.updateMaTypeStockNumCt(typeId);
- }
- } else {
- // 普通机具减少 (ma_type 设备规格表)的库存数量
- res = leaseOutDetailsMapper.updateMaTypeStockNum(record);
+ if (record.getManageType() == 2) {
+ // 成套机具减少 (ma_type 设备规格表)的库存数量
+ res = leaseOutDetailsMapper.updateMaTypeStockNum(record);
+ // 成套机具减少 (ma_type 设备规格表)配件的库存数量
+ List typeIds = leaseOutDetailsMapper.getMaTypeDetails(record);
+ typeIds.removeIf(item -> item == null);
+ for (TmTask typeId : typeIds) {
+ MachinePart machinePart = leaseOutDetailsMapper.getMachineParts(typeId);
+ machinePart.setPartNum((typeId.getPartNum() * record.getOutNum()));
+ typeId.setNum(machinePart.getNum() - machinePart.getPartNum());
+ res = leaseOutDetailsMapper.updateMaTypeStockNumCt(typeId);
}
- // 更新 (ma_machine 设备表)的状态
- leaseOutDetailsMapper.updateMaMachineStatus(record);
+ } else {
+ // 普通机具减少 (ma_type 设备规格表)的库存数量
+ res = leaseOutDetailsMapper.updateMaTypeStockNum(record);
}
+ // 更新 (ma_machine 设备表)的状态
+ leaseOutDetailsMapper.updateMaMachineStatus(record);
}
+ }
return res;
}
@@ -239,7 +239,7 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
List leaseApplyDetailsList = leaseApplyDetailsMapper.getByParentId(record.getParentId());
int i = 0;
for (LeaseApplyDetails bean : leaseApplyDetailsList) {
- if (Objects.equals(bean.getPreNum(), bean.getAlNum())) {
+ if (Objects.equals(bean.getPreNum(), bean.getAlNum()) || "2".equals(bean.getStatus())) {
i++;
}
}
diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/BmProjectInfo.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/BmProjectInfo.java
index 9dd1eb17..e3eb3fb8 100644
--- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/BmProjectInfo.java
+++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/BmProjectInfo.java
@@ -2,10 +2,12 @@ package com.bonus.sgzb.base.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.sql.Timestamp;
+import java.util.Date;
import java.util.List;
@Data
@@ -59,6 +61,14 @@ public class BmProjectInfo {
/**数据所属组织*/
@ApiModelProperty(value = "数据所属组织")
private String companyId;
+ /**开工日期*/
+ @ApiModelProperty(value = "开工日期")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private String startDate;
+ /**竣工日期*/
+ @ApiModelProperty(value = "竣工日期")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private String completionDate;
/**数据所属组织*/
@Excel(name = "所属上级")
diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/BmProjectLot.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/BmProjectLot.java
index f9381511..8a5e2ffc 100644
--- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/BmProjectLot.java
+++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/base/domain/BmProjectLot.java
@@ -2,10 +2,12 @@ package com.bonus.sgzb.base.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
+import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.sql.Timestamp;
+import java.util.Date;
import java.util.List;
@Data
@@ -112,6 +114,20 @@ public class BmProjectLot {
*/
@ApiModelProperty(value = "数据所属组织")
private String companyId;
+ /**
+ /**
+ * 开工日期
+ */
+ @ApiModelProperty(value = "开工日期")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private String startDate;
+ /**
+ /**
+ * 竣工日期
+ */
+ @ApiModelProperty(value = "竣工日期")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private String completionDate;
/**
* 数据所属组织
*/
diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml
index 043e85ea..7ce2b91e 100644
--- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml
+++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml
@@ -671,15 +671,15 @@
bui.unit_id as unitId,bui.unit_name as unitName,
su.nick_name as applyFor,d.`name` as taskName,
- su2.user_name as companyAuditBy,
+ su2.nick_name as companyAuditBy,
lai.company_audit_time as companyAuditTime,
lai.company_audit_remark as companyAuditRemark,
- su3.user_name as deptAuditBy,
+ su3.nick_name as deptAuditBy,
lai.dept_audit_time as deptAuditTime,
lai.dept_audit_remark as deptAuditRemark,
- su4.user_name as directAuditBy,
+ su4.nick_name as directAuditBy,
lai.direct_audit_time as directAuditTime,
lai.direct_audit_remark as directAuditRemark,
lai.lease_type as leaseType,
diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml
index b510be9a..023ab8ff 100644
--- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml
+++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml
@@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"