Browse Source

Merge branch 'sprint/S3' into release/S3

master
郑贵龙 1 year ago
parent
commit
98637d5361
4 changed files with 50 additions and 33 deletions
  1. +2
    -6
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/CollectionDetailEntity.java
  2. +10
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/ReceivablesDetailEntity.java
  3. +32
    -27
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesInitialCreateEAIService.java
  4. +6
    -0
      doc/sql/app-20230912-ddl.sql

+ 2
- 6
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/CollectionDetailEntity.java View File

@ -123,10 +123,6 @@ public class CollectionDetailEntity extends BaseMgrEntity<CollectionDetailEntity
@SerializedName(value = "processed_by")
private String processedBy;
public CollectionDetailEntity(String customerName, String customerNo, String contacts, String contactInformation) {
this.customerNo = customerNo;
this.customerName = customerName;
this.contacts = contacts;
this.contactInformation = contactInformation;
}
}

+ 10
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/ReceivablesDetailEntity.java View File

@ -116,9 +116,19 @@ public class ReceivablesDetailEntity extends BaseMgrEntity<ReceivablesDetailEnti
@SerializedName(value = "overdue_days")
private String overdueDays;
/** 生产主管 */
@SerializedName(value = "produce_boss")
private String produceBoss;
/** 限制金额 */
@TableField(exist = false)
@SerializedName(value = "limit_amount")
private BigDecimal limitAmount;
public ReceivablesDetailEntity(String customerName, String customerNo, String contacts, String contactInformation) {
this.customerNo = customerNo;
this.customerName = customerName;
this.contacts = contacts;
this.contactInformation = contactInformation;
}
}

+ 32
- 27
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesInitialCreateEAIService.java View File

@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.infra.common.enums.TabStatusEnums;
import com.digiwin.athena.app.ptc.infra.entity.CollectionDetailEntity;
import com.digiwin.athena.app.ptc.infra.entity.ReceivablesDetailEntity;
import com.digiwin.athena.app.ptc.infra.repository.CollectionDetailRepository;
import com.digiwin.athena.app.ptc.infra.repository.ReceivablesDetailRepository;
import com.digiwin.athena.app.ptc.infra.service.CollectionDetailService;
import com.digiwin.athena.app.ptc.infra.service.ReceivablesDetailService;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import com.digiwin.athena.opt.common.security.SecurityUtil;
import com.digiwin.athena.opt.common.util.DateUtils;
@ -33,6 +35,10 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService {
@Resource
private ReceivablesDetailRepository receivablesDetailRepository;
@Resource
private ReceivablesDetailService receivablesDetailService;
@Resource
private CollectionDetailService collectionDetailService;
@ -44,16 +50,16 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService {
//随机赋值list
private List<CollectionDetailEntity> 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<ReceivablesDetailEntity> 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);


+ 6
- 0
doc/sql/app-20230912-ddl.sql View File

@ -119,3 +119,9 @@ ALTER TABLE `cim_chat_file` MODIFY COLUMN `question` varchar (500);
-- 催收表新增处理人
alter table cim_collection_detail Add column processed_by varchar(32) null default '' COMMENT '处理人';
--
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 '生产主管';

Loading…
Cancel
Save