Browse Source

Merge branch 'sprint/S3' into release/S3

master
郑贵龙 1 year ago
parent
commit
77febe9ba4
7 changed files with 70 additions and 2 deletions
  1. +4
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/CollectionDetailEntity.java
  2. +4
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/ReceivablesDetailEAIService.java
  3. +5
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/impl/ReceivablesDetailEAIServiceImpl.java
  4. +48
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesTaskDeleteEAIService.java
  5. +4
    -1
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesTaskGetEAIService.java
  6. +2
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesUtil.java
  7. +3
    -0
      doc/sql/app-20230912-ddl.sql

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

@ -119,6 +119,10 @@ public class CollectionDetailEntity extends BaseMgrEntity<CollectionDetailEntity
@SerializedName(value = "overdue_days") @SerializedName(value = "overdue_days")
private String overdueDays; private String overdueDays;
/** 处理人 */
@SerializedName(value = "processed_by")
private String processedBy;
public CollectionDetailEntity(String customerName, String customerNo, String contacts, String contactInformation) { public CollectionDetailEntity(String customerName, String customerNo, String contacts, String contactInformation) {
this.customerNo = customerNo; this.customerNo = customerNo;
this.customerName = customerName; this.customerName = customerName;


+ 4
- 1
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/ReceivablesDetailEAIService.java View File

@ -22,6 +22,9 @@ public interface ReceivablesDetailEAIService extends DWService {
@EAIService(id = ReceivablesUtil.RECEIVABLES_TASK_UPDATE) @EAIService(id = ReceivablesUtil.RECEIVABLES_TASK_UPDATE)
DWEAIResult taskUpdate(Map<String, String> headers, String messageBody) throws Exception; DWEAIResult taskUpdate(Map<String, String> headers, String messageBody) throws Exception;
@EAIService(id = ReceivablesUtil.RECEIVABLES_TASK_GET)
@EAIService(id = ReceivablesUtil.RECEIVABLES_INITIAL_CREATE)
DWEAIResult initialCreate(Map<String, String> headers, String messageBody) throws Exception; DWEAIResult initialCreate(Map<String, String> headers, String messageBody) throws Exception;
@EAIService(id = ReceivablesUtil.RECEIVABLES_TASK_DELETE)
DWEAIResult taskDelete(Map<String, String> headers, String messageBody) throws Exception;
} }

+ 5
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/impl/ReceivablesDetailEAIServiceImpl.java View File

@ -36,4 +36,9 @@ public class ReceivablesDetailEAIServiceImpl implements ReceivablesDetailEAIServ
public DWEAIResult initialCreate(Map<String, String> headers, String messageBody) throws Exception { public DWEAIResult initialCreate(Map<String, String> headers, String messageBody) throws Exception {
return eaiServiceContext.execute(ReceivablesUtil.RECEIVABLES_INITIAL_CREATE,headers,messageBody); return eaiServiceContext.execute(ReceivablesUtil.RECEIVABLES_INITIAL_CREATE,headers,messageBody);
} }
@Override
public DWEAIResult taskDelete(Map<String, String> headers, String messageBody) throws Exception {
return eaiServiceContext.execute(ReceivablesUtil.RECEIVABLES_TASK_DELETE,headers,messageBody);
}
} }

+ 48
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesTaskDeleteEAIService.java View File

@ -0,0 +1,48 @@
package com.digiwin.athena.app.ptc.service.receivables;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.nacos.common.utils.StringUtils;
import com.digiwin.app.container.exceptions.DWBusinessException;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.ptc.infra.entity.CollectionDetailEntity;
import com.digiwin.athena.app.ptc.infra.repository.CollectionDetailRepository;
import com.digiwin.athena.opt.common.eai.EAIRequest;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import com.digiwin.athena.opt.common.security.SecurityUtil;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @auther: zhenggl
* @date: 2023/9/13
*/
public class ReceivablesTaskDeleteEAIService extends AbsEAIService {
@Resource
private CollectionDetailRepository collectionDetailRepository;
@Override
public String getServiceName() {
return ReceivablesUtil.RECEIVABLES_TASK_DELETE;
}
@Override
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception {
EAIRequest eaiRequest = EAIRequest.build(messageBody);
List<CollectionDetailEntity> collectionDetailEntities = eaiRequest.getObject("receivables_info", new TypeReference<List<CollectionDetailEntity>>() {});
for (CollectionDetailEntity collectionDetailEntity : collectionDetailEntities) {
if (StringUtils.isEmpty(collectionDetailEntity.getSalesOrder())
||StringUtils.isEmpty(collectionDetailEntity.getSalesOrderNumber())){
throw new DWBusinessException("缺少必要参数");
}
}
collectionDetailRepository.deleteBatch(collectionDetailEntities, SecurityUtil.getUserProfile().getTenantSid());
return buildOK();
}
}

+ 4
- 1
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesTaskGetEAIService.java View File

@ -41,7 +41,9 @@ public class ReceivablesTaskGetEAIService extends AbsEAIService {
List<CollectionDetailEntity> collectionDetailEntities = eaiRequest.getObject("get_data", new TypeReference<List<CollectionDetailEntity>>() {}); List<CollectionDetailEntity> collectionDetailEntities = eaiRequest.getObject("get_data", new TypeReference<List<CollectionDetailEntity>>() {});
for (CollectionDetailEntity collectionDetailEntity : collectionDetailEntities) { for (CollectionDetailEntity collectionDetailEntity : collectionDetailEntities) {
if (StringUtils.isEmpty(collectionDetailEntity.getSalesOrder())||StringUtils.isEmpty(collectionDetailEntity.getSalesOrderNumber())){
if (StringUtils.isEmpty(collectionDetailEntity.getSalesOrder())
||StringUtils.isEmpty(collectionDetailEntity.getSalesOrderNumber())
||StringUtils.isEmpty(collectionDetailEntity.getProcessedBy())){
throw new DWBusinessException("缺少必要参数"); throw new DWBusinessException("缺少必要参数");
} }
} }
@ -55,6 +57,7 @@ public class ReceivablesTaskGetEAIService extends AbsEAIService {
wrapper -> wrapper wrapper -> wrapper
.eq(CollectionDetailEntity::getSalesOrder, collectionDetailEntity.getSalesOrder()) .eq(CollectionDetailEntity::getSalesOrder, collectionDetailEntity.getSalesOrder())
.eq(CollectionDetailEntity::getSalesOrderNumber, collectionDetailEntity.getSalesOrderNumber()) .eq(CollectionDetailEntity::getSalesOrderNumber, collectionDetailEntity.getSalesOrderNumber())
.eq(CollectionDetailEntity::getProcessedBy, collectionDetailEntity.getProcessedBy())
); );
} }


+ 2
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesUtil.java View File

@ -13,4 +13,6 @@ public class ReceivablesUtil {
public static final String RECEIVABLES_TASK_CREATE = "demo.ptc.athenapot.receivables.create"; public static final String RECEIVABLES_TASK_CREATE = "demo.ptc.athenapot.receivables.create";
public static final String RECEIVABLES_INITIAL_CREATE = "demo.ptc.athenapot.receivables.initial.create"; public static final String RECEIVABLES_INITIAL_CREATE = "demo.ptc.athenapot.receivables.initial.create";
public static final String RECEIVABLES_TASK_DELETE = "demo.ptc.athenapot.receivables.task.delete";
} }

doc/sql/app-2023-09-12-ddl.sql → doc/sql/app-20230912-ddl.sql View File

@ -116,3 +116,6 @@ CREATE TABLE `cim_limit_credit` (
-- 修改问题明细长度 -- 修改问题明细长度
ALTER TABLE `cim_chat_file` MODIFY COLUMN `question` varchar (500); ALTER TABLE `cim_chat_file` MODIFY COLUMN `question` varchar (500);
-- 催收表新增处理人
alter table cim_collection_detail Add column processed_by varchar(32) null default '' COMMENT '处理人';

Loading…
Cancel
Save