From 09dd7a4ae9621239a19176ec22fca9754b57c4bd Mon Sep 17 00:00:00 2001 From: erdanergou Date: Tue, 25 Jul 2023 14:55:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=A2=9C=E8=89=B2=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DepositoryRecordMapper.xml | 3 ++- .../entity/ApplicationOutRecord.java | 5 +++++ .../pojo/ApplicationOutRecordP.java | 9 +++++++- .../templates/pages/depository/table-out.html | 21 ++++++++++++------- .../depository_manage/QyWxCallBackTest.java | 8 ++++--- 5 files changed, 34 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/dreamchaser/depository_manage/depository_mapper/DepositoryRecordMapper.xml b/src/main/java/com/dreamchaser/depository_manage/depository_mapper/DepositoryRecordMapper.xml index eaca53bb..9caeb988 100644 --- a/src/main/java/com/dreamchaser/depository_manage/depository_mapper/DepositoryRecordMapper.xml +++ b/src/main/java/com/dreamchaser/depository_manage/depository_mapper/DepositoryRecordMapper.xml @@ -103,6 +103,7 @@ + @@ -191,7 +192,7 @@ aorid,aormid,mid,mname,depositoryId,dname,applicantId,applicantTime,applyRemark,aorcode,aorpirce,aorquantity,departmenthead,departmentheadPass,departmentHeadTime,departmentheadMessage, depositoryManager,depositoryManagerPass,depositoryManagerTime,depositoryManagerMessage,aorstate,istransfer,mcode,placeId,pass,aormUnit,aorconstructionunitid,aoradminorgid,cuname, - cuintroduce,cuaddress,outTime,abstract,outType,munit,mprice,editUser,mbrand,mversion,flagForOpenDepository,createUid,flagForAgency,balancePoster,balancePosterTime,balancePosterPass,balancePosterMessage,outTypeName + cuintroduce,cuaddress,aormTrueOut,outTime,abstract,outType,munit,mprice,editUser,mbrand,mversion,flagForOpenDepository,createUid,flagForAgency,balancePoster,balancePosterTime,balancePosterPass,balancePosterMessage,outTypeName diff --git a/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationOutRecord.java b/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationOutRecord.java index b9298eb5..09897343 100644 --- a/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationOutRecord.java +++ b/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationOutRecord.java @@ -77,6 +77,11 @@ public class ApplicationOutRecord { */ private Integer quantity; + /** + * 出数量 + */ + private Integer aormTrueOut; + /** * 物料单价 */ diff --git a/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationOutRecordP.java b/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationOutRecordP.java index f04594f2..95b34f9a 100644 --- a/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationOutRecordP.java +++ b/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationOutRecordP.java @@ -91,6 +91,12 @@ public class ApplicationOutRecordP { */ private Double quantity; + + /** + * 出库数量 + */ + private Double aormTrueOut; + /** * 部门负责人编号 */ @@ -317,7 +323,8 @@ public class ApplicationOutRecordP { this.applyRemark = aor.getApplyRemark(); this.code = aor.getCode(); this.price = aor.getPrice(); - this.quantity = (double) aor.getQuantity() / 100; + this.quantity = ObjectFormatUtil.divide(aor.getQuantity(),100.0,2); + this.aormTrueOut = ObjectFormatUtil.divide(aor.getAormTrueOut(),100.0,2); this.departmenthead = aor.getDepartmenthead(); this.departmentheadName = aor.getDepartmentheadName(); this.departmentheadPass = aor.getDepartmentheadPass(); diff --git a/src/main/resources/templates/pages/depository/table-out.html b/src/main/resources/templates/pages/depository/table-out.html index 0c6568fd..14e8ff21 100644 --- a/src/main/resources/templates/pages/depository/table-out.html +++ b/src/main/resources/templates/pages/depository/table-out.html @@ -118,17 +118,24 @@ {{# let allApproval = d.allApproval; let pass = d.pass; + let trueOutQuantity = d.aormTrueOut; + let quantity = d.quantity; let colorString = ""; if (pass === 3) { - if (allApproval) { - colorString = '#31bdeca1'; - } else { - colorString = '#ffb800a1'; - } + + if (allApproval) { + if(trueOutQuantity === quantity){ + colorString = '#16b777a1'; + }else{ + colorString = '#31bdeca1'; + } + } else { + colorString = '#ffb800a1'; + } } else if (pass === 1) { - colorString = '#16b777a1'; + colorString = '#16b777a1'; } else { - colorString = '#ff211ea1'; + colorString = '#ff211ea1'; } }}
{{d.state}}
diff --git a/src/test/java/com/dreamchaser/depository_manage/QyWxCallBackTest.java b/src/test/java/com/dreamchaser/depository_manage/QyWxCallBackTest.java index 00c4eaaa..0185e391 100644 --- a/src/test/java/com/dreamchaser/depository_manage/QyWxCallBackTest.java +++ b/src/test/java/com/dreamchaser/depository_manage/QyWxCallBackTest.java @@ -154,7 +154,9 @@ public class QyWxCallBackTest { // 获取当前的主订单 ApplicationOutRecordP applicationOutRecordPById = depositoryRecordService.findApplicationOutRecordPById(ObjectFormatUtil.toLong(mainId)); - + if(applicationOutRecordPById == null){ + return; + } if (Integer.compare(applicationOutRecordPById.getFlagForOpenDepository(), 2) == 0) { // 如果是申请的开放仓库 @@ -241,7 +243,7 @@ public class QyWxCallBackTest { ApprovalInfo approvalInfo = new ApprovalInfo(); approvalInfo.setTemplateId("3WKiKVCzyLv3Y1LaHZxp4DimQEpCdvYP52HsAUtF"); - approvalInfo.setSpNo("202307240005"); + approvalInfo.setSpNo("202307250014"); // 模拟第一个节点(部门负责人) @@ -251,7 +253,7 @@ public class QyWxCallBackTest { List approvalInfo_Details1 = new ArrayList<>(); ApprovalInfo_Details ad1 = new ApprovalInfo_Details(); ad1.setSpStatus("2"); - ad1.setSpTime("1690159327000"); + ad1.setSpTime("1690266027000"); ApprovalInfo_Details_Approver approver1 = new ApprovalInfo_Details_Approver(); approver1.setUserId("WoBenShanLiang_3"); ad1.setApprover(approver1);