From c681cc934dc7bf59f3333cfe0e59472addd457d0 Mon Sep 17 00:00:00 2001 From: zhenggl Date: Fri, 15 Sep 2023 10:48:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E6=B6=88=E8=80=97?= =?UTF-8?q?=E9=A2=9D=E5=BA=A6=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infra/entity/CollectionDetailEntity.java | 3 ++ .../infra/entity/ReceivablesDetailEntity.java | 8 +++-- .../ReceivablesInitialCreateEAIService.java | 33 ++++++++++--------- doc/sql/app-20230912-ddl.sql | 4 +++ 4 files changed, 31 insertions(+), 17 deletions(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/CollectionDetailEntity.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/CollectionDetailEntity.java index 7afbe51..2c662de 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/CollectionDetailEntity.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/CollectionDetailEntity.java @@ -123,6 +123,9 @@ public class CollectionDetailEntity extends BaseMgrEntity list = Arrays.asList( - new ReceivablesDetailEntity("鼎捷"+abcArray[indexList.get(0)]+"半导体有限公司",abcArray[indexList.get(0)]+indexList.get(0),"张三","186****9498",new BigDecimal("10000"),new BigDecimal("135"),new BigDecimal("1350000"),new BigDecimal("20000000"),date), - new ReceivablesDetailEntity("鼎捷"+abcArray[indexList.get(0)]+"半导体有限公司",abcArray[indexList.get(0)]+indexList.get(0),"李四","158****4794",new BigDecimal("800"),new BigDecimal("2500"),new BigDecimal("2000000"),new BigDecimal("20000000"),date1), - new ReceivablesDetailEntity("鼎捷"+abcArray[indexList.get(0)]+"半导体有限公司",abcArray[indexList.get(0)]+indexList.get(0),"王五","150****9529",new BigDecimal("50000"),new BigDecimal("70"),new BigDecimal("3500000"),new BigDecimal("20000000"),date2), - new ReceivablesDetailEntity("鼎新"+abcArray[indexList.get(1)]+"半导体有限公司",abcArray[indexList.get(1)]+indexList.get(1),"赵六","139****0530",new BigDecimal("250000"),new BigDecimal("26"),new BigDecimal("6500000"),new BigDecimal("20000000"),date1), - new ReceivablesDetailEntity("鼎新"+abcArray[indexList.get(1)]+"半导体有限公司",abcArray[indexList.get(1)]+indexList.get(1),"陈七","136****5333",new BigDecimal("2500"),new BigDecimal("3400"),new BigDecimal("8500000"),new BigDecimal("20000000"),date2), - new ReceivablesDetailEntity("鼎新"+abcArray[indexList.get(2)]+"半导体有限公司",abcArray[indexList.get(2)]+indexList.get(2),"刘八","188****9299",new BigDecimal("10000"),new BigDecimal("20"),new BigDecimal("200000"),new BigDecimal("5000000"),date1), - new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(2)]+"半导体有限公司",abcArray[indexList.get(2)]+indexList.get(2),"韩九","130****3555",new BigDecimal("360"),new BigDecimal("5000"),new BigDecimal("1800000"),new BigDecimal("5000000"),date2), - new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(3)]+"半导体有限公司",abcArray[indexList.get(3)]+indexList.get(3),"管十一","138****9999",new BigDecimal("2500"),new BigDecimal("800"),new BigDecimal("2000000"),new BigDecimal("10000000"),date1), - new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(3)]+"半导体有限公司",abcArray[indexList.get(3)]+indexList.get(3),"丁十三","187****6160",new BigDecimal("30000"),new BigDecimal("100"),new BigDecimal("3000000"),new BigDecimal("10000000"),date2), - new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(4)]+"半导体有限公司",abcArray[indexList.get(4)]+indexList.get(4),"包十四","187****6160",new BigDecimal("400"),new BigDecimal("10000"),new BigDecimal("4000000"),new BigDecimal("15000000"),date1), - new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(4)]+"半导体有限公司",abcArray[indexList.get(4)]+indexList.get(4),"董十五","187****6160",new BigDecimal("100"),new BigDecimal("80000"),new BigDecimal("8000000"),new BigDecimal("15000000"),date2), - new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(5)]+"半导体有限公司",abcArray[indexList.get(5)]+indexList.get(5),"肖十六","187****6160",new BigDecimal("3500"),new BigDecimal("200"),new BigDecimal("7000000"),new BigDecimal("10000000"),date1), - new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(5)]+"半导体有限公司",abcArray[indexList.get(5)]+indexList.get(5),"肖十六","187****6160",new BigDecimal("4000"),new BigDecimal("250"),new BigDecimal("1000000"),new BigDecimal("10000000"),date2)); + new ReceivablesDetailEntity("鼎捷"+abcArray[indexList.get(0)]+"半导体有限公司",abcArray[indexList.get(0)]+indexList.get(0),"张三","186****9498",new BigDecimal("10000"),new BigDecimal("135"),new BigDecimal("1350000"),new BigDecimal("20000000"),date,"34.2%"), + new ReceivablesDetailEntity("鼎捷"+abcArray[indexList.get(0)]+"半导体有限公司",abcArray[indexList.get(0)]+indexList.get(0),"李四","158****4794",new BigDecimal("800"),new BigDecimal("2500"),new BigDecimal("2000000"),new BigDecimal("20000000"),date1,"34.2%"), + new ReceivablesDetailEntity("鼎捷"+abcArray[indexList.get(0)]+"半导体有限公司",abcArray[indexList.get(0)]+indexList.get(0),"王五","150****9529",new BigDecimal("50000"),new BigDecimal("70"),new BigDecimal("3500000"),new BigDecimal("20000000"),date2,"34.2%"), + new ReceivablesDetailEntity("鼎新"+abcArray[indexList.get(1)]+"半导体有限公司",abcArray[indexList.get(1)]+indexList.get(1),"赵六","139****0530",new BigDecimal("250000"),new BigDecimal("26"),new BigDecimal("6500000"),new BigDecimal("20000000"),date1,"75%"), + new ReceivablesDetailEntity("鼎新"+abcArray[indexList.get(1)]+"半导体有限公司",abcArray[indexList.get(1)]+indexList.get(1),"陈七","136****5333",new BigDecimal("2500"),new BigDecimal("3400"),new BigDecimal("8500000"),new BigDecimal("20000000"),date2,"75%"), + new ReceivablesDetailEntity("鼎新"+abcArray[indexList.get(2)]+"半导体有限公司",abcArray[indexList.get(2)]+indexList.get(2),"刘八","188****9299",new BigDecimal("10000"),new BigDecimal("20"),new BigDecimal("200000"),new BigDecimal("5000000"),date1,"40%"), + new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(2)]+"半导体有限公司",abcArray[indexList.get(2)]+indexList.get(2),"韩九","130****3555",new BigDecimal("360"),new BigDecimal("5000"),new BigDecimal("1800000"),new BigDecimal("5000000"),date2,"40%"), + new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(3)]+"半导体有限公司",abcArray[indexList.get(3)]+indexList.get(3),"管十一","138****9999",new BigDecimal("2500"),new BigDecimal("800"),new BigDecimal("2000000"),new BigDecimal("10000000"),date1,"50%"), + new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(3)]+"半导体有限公司",abcArray[indexList.get(3)]+indexList.get(3),"丁十三","187****6160",new BigDecimal("30000"),new BigDecimal("100"),new BigDecimal("3000000"),new BigDecimal("10000000"),date2,"50%"), + new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(4)]+"半导体有限公司",abcArray[indexList.get(4)]+indexList.get(4),"包十四","187****6160",new BigDecimal("400"),new BigDecimal("10000"),new BigDecimal("4000000"),new BigDecimal("15000000"),date1,"80%"), + new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(4)]+"半导体有限公司",abcArray[indexList.get(4)]+indexList.get(4),"董十五","187****6160",new BigDecimal("100"),new BigDecimal("80000"),new BigDecimal("8000000"),new BigDecimal("15000000"),date2,"80%"), + new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(5)]+"半导体有限公司",abcArray[indexList.get(5)]+indexList.get(5),"肖十六","187****6160",new BigDecimal("3500"),new BigDecimal("200"),new BigDecimal("7000000"),new BigDecimal("10000000"),date1,"80%"), + new ReceivablesDetailEntity("鼎华"+abcArray[indexList.get(5)]+"半导体有限公司",abcArray[indexList.get(5)]+indexList.get(5),"肖十六","187****6160",new BigDecimal("4000"),new BigDecimal("250"),new BigDecimal("1000000"),new BigDecimal("10000000"),date2,"80%")); Long tenantSid = SecurityUtil.getUserProfile().getTenantSid(); @@ -124,6 +124,8 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService { + + int no = 1; //随机新增 for (ReceivablesDetailEntity receivablesDetailEntity : list) { @@ -133,11 +135,11 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService { receivablesDetailEntity.setSkuName(sku.getSkuName()); receivablesDetailEntity.setSkuSpec(sku.getSkuSpec()); receivablesDetailEntity.setReceivableNo("RE-"+SnowflakeWorker.nextId()); - receivablesDetailEntity.setReceivableNon("SEQ-"+SnowflakeWorker.nextId()); + receivablesDetailEntity.setReceivableNon("SEQ-000"+no); receivablesDetailEntity.setContractNo("CO"+ SnowflakeWorker.nextId()); receivablesDetailEntity.setStatus("1"); receivablesDetailEntity.setSalesOrder("SO-"+SnowflakeWorker.nextId()); - receivablesDetailEntity.setSalesOrderNumber("SON-"+SnowflakeWorker.nextId()); + receivablesDetailEntity.setSalesOrderNumber("SON-000"+no); receivablesDetailEntity.setSalesmanAssistant("Sp0001"); receivablesDetailEntity.setSalesmanBoss("qcsupplier001"); receivablesDetailEntity.setSalesman("qcuser001"); @@ -145,6 +147,7 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService { receivablesDetailEntity.setEmail("ath_Sp0001@163.com"); receivablesDetailEntity.setWorkNo("work-"+SnowflakeWorker.nextId()); receivablesDetailEntity.setOverdueDays(String.valueOf((new Date().getTime()-receivablesDetailEntity.getReceivableDate().getTime())/86400000L)); + no = no +1; } receivablesDetailService.saveBatch(list); diff --git a/doc/sql/app-20230912-ddl.sql b/doc/sql/app-20230912-ddl.sql index 6fb5920..55ec73e 100644 --- a/doc/sql/app-20230912-ddl.sql +++ b/doc/sql/app-20230912-ddl.sql @@ -135,3 +135,7 @@ alter table cim_receivables_detail Add column email varchar(50) null default '' --修改规格字段长度 ALTER TABLE `cim_receivables_detail` MODIFY COLUMN `sku_spec` varchar (255); ALTER TABLE `cim_collection_detail` MODIFY COLUMN `sku_spec` varchar (255); + +--添加消费额度字段 +alter table cim_collection_detail Add column quota_details varchar(32) null default '' COMMENT '消费额度'; +alter table cim_receivables_detail Add column quota_details varchar(32) null default '' COMMENT '消费额度';