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 6b9792f..7afbe51 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,10 +123,6 @@ public class CollectionDetailEntity extends BaseMgrEntity list = Arrays.asList( - new CollectionDetailEntity("鼎捷A半导体有限公司","dj001","张三","186****9498"), - new CollectionDetailEntity("鼎捷B半导体有限公司","dj002","李四","158****4794"), - new CollectionDetailEntity("鼎捷C半导体有限公司","dj003","王五","150****9529"), - new CollectionDetailEntity("鼎新A半导体有限公司","dj004","赵六","139****0530"), - new CollectionDetailEntity("鼎新B半导体有限公司","dj005","陈七","136****5333"), - new CollectionDetailEntity("鼎新C半导体有限公司","dj006","刘八","188****9299"), - new CollectionDetailEntity("鼎华A半导体有限公司","dj007","韩九","130****3555"), - new CollectionDetailEntity("鼎华B半导体有限公司","dj008","管十一","138****9999"), - new CollectionDetailEntity("鼎华C半导体有限公司","dj009","谢十二","187****6160")); + private List list = Arrays.asList( + new ReceivablesDetailEntity("鼎捷A半导体有限公司","dj001","张三","186****9498"), + new ReceivablesDetailEntity("鼎捷B半导体有限公司","dj002","李四","158****4794"), + new ReceivablesDetailEntity("鼎捷C半导体有限公司","dj003","王五","150****9529"), + new ReceivablesDetailEntity("鼎新A半导体有限公司","dj004","赵六","139****0530"), + new ReceivablesDetailEntity("鼎新B半导体有限公司","dj005","陈七","136****5333"), + new ReceivablesDetailEntity("鼎新C半导体有限公司","dj006","刘八","188****9299"), + new ReceivablesDetailEntity("鼎华A半导体有限公司","dj007","韩九","130****3555"), + new ReceivablesDetailEntity("鼎华B半导体有限公司","dj008","管十一","138****9999"), + new ReceivablesDetailEntity("鼎华C半导体有限公司","dj009","谢十二","187****6160")); @Override @@ -76,28 +82,27 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService { Random random = new Random(); //随机新增 - for (CollectionDetailEntity collectionDetailEntity : this.list) { + for (ReceivablesDetailEntity receivablesDetailEntity : this.list) { int randomNumber = random.nextInt(100); int nextInt = random.nextInt(30); int dayInt = random.nextInt(10); - collectionDetailEntity.setReceivableNo("RE-"+DateUtils.currentTimeString()); - collectionDetailEntity.setReceivableNo("SEQ-"+DateUtils.currentTimeString()); - collectionDetailEntity.setStatus("1"); - collectionDetailEntity.setSalesOrder("SO-"+DateUtils.currentTimeString()); - collectionDetailEntity.setSalesOrderNumber("SON-"+DateUtils.currentTimeString()); - collectionDetailEntity.setContractNo(UUID.randomUUID().toString()); - collectionDetailEntity.setPriceTax(new BigDecimal(String.valueOf(randomNumber))); - collectionDetailEntity.setQuantity(new BigDecimal(String.valueOf(nextInt))); - collectionDetailEntity.setReceivableDate(org.apache.commons.lang.time.DateUtils.addDays(new Date(),dayInt)); - collectionDetailEntity.setSalesmanAssistant("qcsupplierqcuser001"); - collectionDetailEntity.setSalesmanBoss("Sp0001"); - collectionDetailEntity.setSalesman("qcuser001"); - collectionDetailEntity.setProduceBoss("Sp0002"); - collectionDetailEntity.setWorkNo("work-"+DateUtils.currentTimeString()); - collectionDetailEntity.setOverdueDays(String.valueOf(DateUtils.getDayInterval(new Date(),collectionDetailEntity.getReceivableDate()))); + receivablesDetailEntity.setReceivableNo("RE-"+DateUtils.currentTimeString()); + receivablesDetailEntity.setReceivableNo("SEQ-"+DateUtils.currentTimeString()); + receivablesDetailEntity.setStatus("1"); + receivablesDetailEntity.setSalesOrder("SO-"+DateUtils.currentTimeString()); + receivablesDetailEntity.setSalesOrderNumber("SON-"+DateUtils.currentTimeString()); + receivablesDetailEntity.setPriceTax(new BigDecimal(String.valueOf(randomNumber))); + receivablesDetailEntity.setQuantity(new BigDecimal(String.valueOf(nextInt))); + receivablesDetailEntity.setReceivableDate(org.apache.commons.lang.time.DateUtils.addDays(new Date(),dayInt)); + receivablesDetailEntity.setSalesmanAssistant("qcsupplierqcuser001"); + receivablesDetailEntity.setSalesmanBoss("Sp0001"); + receivablesDetailEntity.setSalesman("qcuser001"); + receivablesDetailEntity.setProduceBoss("Sp0002"); + receivablesDetailEntity.setWorkNo("work-"+DateUtils.currentTimeString()); + receivablesDetailEntity.setOverdueDays(String.valueOf(DateUtils.getDayInterval(new Date(),receivablesDetailEntity.getReceivableDate()))); } - collectionDetailService.saveBatch(this.list); + receivablesDetailService.saveBatch(this.list); diff --git a/doc/sql/app-20230912-ddl.sql b/doc/sql/app-20230912-ddl.sql index 786cf7f..777dce4 100644 --- a/doc/sql/app-20230912-ddl.sql +++ b/doc/sql/app-20230912-ddl.sql @@ -123,3 +123,5 @@ alter table cim_collection_detail Add column processed_by varchar(32) null defau --新增生产主管字段 alter table cim_collection_detail Add column produce_boss varchar(100) null default '' COMMENT '生产主管'; + +alter table cim_receivables_detail Add column produce_boss varchar(100) null default '' COMMENT '生产主管';