Browse Source

Merge branch 'sprint/S3' into release/S3

master
郑贵龙 1 year ago
parent
commit
79387ee54f
4 changed files with 31 additions and 17 deletions
  1. +3
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/CollectionDetailEntity.java
  2. +6
    -2
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/ReceivablesDetailEntity.java
  3. +18
    -15
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesInitialCreateEAIService.java
  4. +4
    -0
      doc/sql/app-20230912-ddl.sql

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

@ -123,6 +123,9 @@ public class CollectionDetailEntity extends BaseMgrEntity<CollectionDetailEntity
@SerializedName(value = "processed_by") @SerializedName(value = "processed_by")
private String processedBy; private String processedBy;
/** 额度占用百分比 */
@SerializedName(value = "quota_details")
private String quotaDetails;
} }

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

@ -3,7 +3,6 @@ package com.digiwin.athena.app.ptc.infra.entity;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity; import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
@ -128,7 +127,11 @@ public class ReceivablesDetailEntity extends BaseMgrEntity<ReceivablesDetailEnti
@SerializedName(value = "email") @SerializedName(value = "email")
private String email; private String email;
public ReceivablesDetailEntity(String customerName, String customerNo, String contacts, String contactInformation, BigDecimal priceTax, BigDecimal quantity, BigDecimal amountTax, BigDecimal limitAmount, Date receivableDate) {
/** 额度占用百分比 */
@SerializedName(value = "quota_details")
private String quotaDetails;
public ReceivablesDetailEntity(String customerName, String customerNo, String contacts, String contactInformation, BigDecimal priceTax, BigDecimal quantity, BigDecimal amountTax, BigDecimal limitAmount, Date receivableDate,String quotaDetails) {
this.customerNo = customerNo; this.customerNo = customerNo;
this.customerName = customerName; this.customerName = customerName;
this.contacts = contacts; this.contacts = contacts;
@ -138,6 +141,7 @@ public class ReceivablesDetailEntity extends BaseMgrEntity<ReceivablesDetailEnti
this.amountTax = amountTax; this.amountTax = amountTax;
this.limitAmount = limitAmount; this.limitAmount = limitAmount;
this.receivableDate = receivableDate; this.receivableDate = receivableDate;
this.quotaDetails = quotaDetails;
} }
public ReceivablesDetailEntity(String skuCode, String skuName, String skuSpec) { public ReceivablesDetailEntity(String skuCode, String skuName, String skuSpec) {


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

@ -94,19 +94,19 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService {
//随机赋值list //随机赋值list
List<ReceivablesDetailEntity> list = Arrays.asList( List<ReceivablesDetailEntity> 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(); Long tenantSid = SecurityUtil.getUserProfile().getTenantSid();
@ -124,6 +124,8 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService {
int no = 1;
//随机新增 //随机新增
for (ReceivablesDetailEntity receivablesDetailEntity : list) { for (ReceivablesDetailEntity receivablesDetailEntity : list) {
@ -133,11 +135,11 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService {
receivablesDetailEntity.setSkuName(sku.getSkuName()); receivablesDetailEntity.setSkuName(sku.getSkuName());
receivablesDetailEntity.setSkuSpec(sku.getSkuSpec()); receivablesDetailEntity.setSkuSpec(sku.getSkuSpec());
receivablesDetailEntity.setReceivableNo("RE-"+SnowflakeWorker.nextId()); receivablesDetailEntity.setReceivableNo("RE-"+SnowflakeWorker.nextId());
receivablesDetailEntity.setReceivableNon("SEQ-"+SnowflakeWorker.nextId());
receivablesDetailEntity.setReceivableNon("SEQ-000"+no);
receivablesDetailEntity.setContractNo("CO"+ SnowflakeWorker.nextId()); receivablesDetailEntity.setContractNo("CO"+ SnowflakeWorker.nextId());
receivablesDetailEntity.setStatus("1"); receivablesDetailEntity.setStatus("1");
receivablesDetailEntity.setSalesOrder("SO-"+SnowflakeWorker.nextId()); receivablesDetailEntity.setSalesOrder("SO-"+SnowflakeWorker.nextId());
receivablesDetailEntity.setSalesOrderNumber("SON-"+SnowflakeWorker.nextId());
receivablesDetailEntity.setSalesOrderNumber("SON-000"+no);
receivablesDetailEntity.setSalesmanAssistant("Sp0001"); receivablesDetailEntity.setSalesmanAssistant("Sp0001");
receivablesDetailEntity.setSalesmanBoss("qcsupplier001"); receivablesDetailEntity.setSalesmanBoss("qcsupplier001");
receivablesDetailEntity.setSalesman("qcuser001"); receivablesDetailEntity.setSalesman("qcuser001");
@ -145,6 +147,7 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService {
receivablesDetailEntity.setEmail("ath_Sp0001@163.com"); receivablesDetailEntity.setEmail("ath_Sp0001@163.com");
receivablesDetailEntity.setWorkNo("work-"+SnowflakeWorker.nextId()); receivablesDetailEntity.setWorkNo("work-"+SnowflakeWorker.nextId());
receivablesDetailEntity.setOverdueDays(String.valueOf((new Date().getTime()-receivablesDetailEntity.getReceivableDate().getTime())/86400000L)); receivablesDetailEntity.setOverdueDays(String.valueOf((new Date().getTime()-receivablesDetailEntity.getReceivableDate().getTime())/86400000L));
no = no +1;
} }
receivablesDetailService.saveBatch(list); receivablesDetailService.saveBatch(list);


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

@ -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_receivables_detail` MODIFY COLUMN `sku_spec` varchar (255);
ALTER TABLE `cim_collection_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 '消费额度';

Loading…
Cancel
Save