Browse Source

Merge branch 'sprint/S3' into release/S3

master
郑贵龙 1 year ago
parent
commit
e142d87a8b
27 changed files with 839 additions and 0 deletions
  1. +59
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/LimitManagementDetailEntity.java
  2. +49
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/LimitManagementEntity.java
  3. +112
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/entity/PaymentDetailsEntity.java
  4. +24
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/mapper/LimitManagementDetailMapper.xml
  5. +9
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/mapper/LimitManagementMapper.xml
  6. +17
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/repository/LimitManagementDetailRepository.java
  7. +11
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/repository/LimitManagementRepository.java
  8. +11
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/repository/PaymentDetailsRepository.java
  9. +11
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/LimitManagementDetailService.java
  10. +11
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/LimitManagementService.java
  11. +11
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/PaymentDetailsService.java
  12. +15
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/impl/LimitManagementDetailServiceImpl.java
  13. +15
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/impl/LimitManagementServiceImpl.java
  14. +15
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/impl/PaymentDetailsServiceImpl.java
  15. +21
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/LimitManagementDetailEAIService.java
  16. +19
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/LimitManagementEAIService.java
  17. +18
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/PaymentDetailsEAIService.java
  18. +29
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/impl/LimitManagementDetailEAIServiceImpl.java
  19. +25
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/impl/LimitManagementEAIServiceImpl.java
  20. +23
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/impl/PaymentDetailsEAIServiceImpl.java
  21. +48
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/management/LimitManagementGetEAIService.java
  22. +94
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/managementdetail/LimitManagementDetailGetEAIService.java
  23. +55
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/managementdetail/LimitManagementDetailUpdateEAIService.java
  24. +14
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/managementdetail/LimitManagementDetailUtil.java
  25. +10
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/paymentdetails/PaymentDetailsUtil.java
  26. +40
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/paymentdetails/ReceivablesGetEAIService.java
  27. +73
    -0
      doc/sql/app-20230703-ddl.sql

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

@ -0,0 +1,59 @@
package com.digiwin.athena.app.ptc.infra.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* @auther: zhenggl
* @date: 2023/9/11
* @description 额度管理基础资料
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "cim_limit_management_detail", autoResultMap = true)
public class LimitManagementDetailEntity extends BaseMgrEntity<LimitManagementDetailEntity> {
@SerializedName(value = "limit_management_id")
private Long LimitManagementId;
@SerializedName(value = "user_id")
private String user_id;
@SerializedName(value = "min_percentage")
private BigDecimal minPercentage;
@SerializedName(value = "max_percentage")
private BigDecimal maxPercentage;
@SerializedName(value = "overdue_date_range")
private String overdueDateRange;
@SerializedName(value = "processed_by")
private String processedBy;
@SerializedName(value = "handling_method")
private String handlingMethod;
@SerializedName(value = "processed_by_type")
private String processedByType;
@SerializedName(value = "class_interval_name")
@TableField(exist = false)
private String classIntervalName;
}

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

@ -0,0 +1,49 @@
package com.digiwin.athena.app.ptc.infra.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.List;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "cim_limit_management", autoResultMap = true)
public class LimitManagementEntity extends BaseMgrEntity<LimitManagementEntity> {
@SerializedName(value = "class_interval_name")
private String classIntervalName;
@SerializedName(value = "class_interval_no")
private String classIntervalNo;
@SerializedName(value = "min_percentage")
private BigDecimal minPercentage;
@SerializedName(value = "max_percentage")
private BigDecimal maxPercentage;
@TableField(exist = false)
@SerializedName(value = "quota_ratio")
private BigDecimal quotaRatio;
@TableField(exist = false)
@SerializedName(value = "info")
private List<LimitManagementDetailEntity> info;
}

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

@ -0,0 +1,112 @@
package com.digiwin.athena.app.ptc.infra.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "cim_payment_details", autoResultMap = true)
public class PaymentDetailsEntity extends BaseMgrEntity<PaymentDetailsEntity> {
/** 应收单号 */
@SerializedName(value = "receivable_no")
private String receivableNo;
/** 应收序号 */
@SerializedName(value = "receivable_non")
private String receivableNon;
/** 客户编号 */
@SerializedName(value = "customer_no")
private String customerNo;
/** 客户名称 */
@SerializedName(value = "customer_name")
private String customerName;
/** 状态 */
@SerializedName(value = "status")
private String status;
/** 销售单号 */
@SerializedName(value = "sales_order")
private String salesOrder;
/** 销售单序号 */
@SerializedName(value = "sales_order_number")
private String salesOrderNumber;
/** 合同编号 */
@SerializedName(value = "contract_no")
private String contractNo;
/** 品号 */
@SerializedName(value = "sku_code")
private String skuCode;
/** 品名 */
@SerializedName(value = "sku_name")
private String skuName;
/** 规格 */
@SerializedName(value = "sku_spec")
private String skuSpec;
/** 联系人 */
@SerializedName(value = "contacts")
private String contacts;
/** 联系方式 */
@SerializedName(value = "contact_information")
private String contactInformation;
/** 业务助理 */
@SerializedName(value = "salesman_assistant")
private String salesmanAssistant;
/** 业务员 */
@SerializedName(value = "salesman")
private String salesman;
/** 业务主管 */
@SerializedName(value = "salesman_boss")
private String salesmanBoss;
/** 生产主管 */
@SerializedName(value = "produce_boss")
private String produceBoss;
/** 工单单号 */
@SerializedName(value = "work_no")
private String workNo;
/** 含税金额 */
@SerializedName(value = "amount_tax")
private BigDecimal amountTax;
/** 含税单价 */
@SerializedName(value = "price_tax")
private BigDecimal priceTax;
/** 数量 */
@SerializedName(value = "quantity")
private BigDecimal quantity;
/** 逾期天数 */
@SerializedName(value = "overdue_days")
private Long overdueDays;
}

+ 24
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/mapper/LimitManagementDetailMapper.xml View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.digiwin.athena.app.ptc.infra.repository.LimitManagementDetailRepository">
<update id="updateBatch">
<foreach collection="list" item="item" index="index" separator=";" open="" close="">
UPDATE cim_limit_management_detail
<set>
`overdue_date_range` = #{item.overdueDateRange},
`processed_by` = #{item.processedBy},
`handling_method` = #{item.handlingMethod},
`processed_by_type` = #{item.processedByType},
`modified_date` = now(),
`modified_by` = #{item.modifiedBy}
</set>
WHERE `id` = #{item.id}
</foreach>
</update>
</mapper>

+ 9
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/mapper/LimitManagementMapper.xml View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.digiwin.athena.app.ptc.infra.repository.LimitManagementRepository">
</mapper>

+ 17
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/repository/LimitManagementDetailRepository.java View File

@ -0,0 +1,17 @@
package com.digiwin.athena.app.ptc.infra.repository;
import com.digiwin.athena.app.ptc.infra.entity.LimitManagementDetailEntity;
import com.digiwin.athena.opt.persistence.repository.BaseRepository;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public interface LimitManagementDetailRepository extends BaseRepository<LimitManagementDetailEntity> {
void updateBatch(@Param("list")List<LimitManagementDetailEntity> list);
}

+ 11
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/repository/LimitManagementRepository.java View File

@ -0,0 +1,11 @@
package com.digiwin.athena.app.ptc.infra.repository;
import com.digiwin.athena.app.ptc.infra.entity.LimitManagementEntity;
import com.digiwin.athena.opt.persistence.repository.BaseRepository;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public interface LimitManagementRepository extends BaseRepository<LimitManagementEntity> {
}

+ 11
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/repository/PaymentDetailsRepository.java View File

@ -0,0 +1,11 @@
package com.digiwin.athena.app.ptc.infra.repository;
import com.digiwin.athena.app.ptc.infra.entity.PaymentDetailsEntity;
import com.digiwin.athena.opt.persistence.repository.BaseRepository;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public interface PaymentDetailsRepository extends BaseRepository<PaymentDetailsEntity> {
}

+ 11
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/LimitManagementDetailService.java View File

@ -0,0 +1,11 @@
package com.digiwin.athena.app.ptc.infra.service;
import com.digiwin.athena.app.ptc.infra.entity.LimitManagementDetailEntity;
import com.digiwin.athena.opt.persistence.service.IBaseService;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public interface LimitManagementDetailService extends IBaseService<LimitManagementDetailEntity>{
}

+ 11
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/LimitManagementService.java View File

@ -0,0 +1,11 @@
package com.digiwin.athena.app.ptc.infra.service;
import com.digiwin.athena.app.ptc.infra.entity.LimitManagementEntity;
import com.digiwin.athena.opt.persistence.service.IBaseService;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public interface LimitManagementService extends IBaseService<LimitManagementEntity> {
}

+ 11
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/PaymentDetailsService.java View File

@ -0,0 +1,11 @@
package com.digiwin.athena.app.ptc.infra.service;
import com.digiwin.athena.app.ptc.infra.entity.PaymentDetailsEntity;
import com.digiwin.athena.opt.persistence.service.IBaseService;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public interface PaymentDetailsService extends IBaseService<PaymentDetailsEntity> {
}

+ 15
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/impl/LimitManagementDetailServiceImpl.java View File

@ -0,0 +1,15 @@
package com.digiwin.athena.app.ptc.infra.service.impl;
import com.digiwin.athena.app.ptc.infra.entity.LimitManagementDetailEntity;
import com.digiwin.athena.app.ptc.infra.repository.LimitManagementDetailRepository;
import com.digiwin.athena.app.ptc.infra.service.LimitManagementDetailService;
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService;
import org.springframework.stereotype.Service;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
@Service
public class LimitManagementDetailServiceImpl extends AbsBaseService<LimitManagementDetailRepository, LimitManagementDetailEntity> implements LimitManagementDetailService {
}

+ 15
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/impl/LimitManagementServiceImpl.java View File

@ -0,0 +1,15 @@
package com.digiwin.athena.app.ptc.infra.service.impl;
import com.digiwin.athena.app.ptc.infra.entity.LimitManagementEntity;
import com.digiwin.athena.app.ptc.infra.repository.LimitManagementRepository;
import com.digiwin.athena.app.ptc.infra.service.LimitManagementService;
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService;
import org.springframework.stereotype.Service;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
@Service
public class LimitManagementServiceImpl extends AbsBaseService<LimitManagementRepository, LimitManagementEntity> implements LimitManagementService {
}

+ 15
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/infra/service/impl/PaymentDetailsServiceImpl.java View File

@ -0,0 +1,15 @@
package com.digiwin.athena.app.ptc.infra.service.impl;
import com.digiwin.athena.app.ptc.infra.entity.PaymentDetailsEntity;
import com.digiwin.athena.app.ptc.infra.repository.PaymentDetailsRepository;
import com.digiwin.athena.app.ptc.infra.service.PaymentDetailsService;
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService;
import org.springframework.stereotype.Service;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
@Service
public class PaymentDetailsServiceImpl extends AbsBaseService<PaymentDetailsRepository, PaymentDetailsEntity> implements PaymentDetailsService {
}

+ 21
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/LimitManagementDetailEAIService.java View File

@ -0,0 +1,21 @@
package com.digiwin.athena.app.ptc.provider;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.app.service.DWService;
import com.digiwin.app.service.eai.EAIService;
import com.digiwin.athena.app.ptc.service.managementdetail.LimitManagementDetailUtil;
import java.util.Map;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public interface LimitManagementDetailEAIService extends DWService {
@EAIService(id = LimitManagementDetailUtil.LIMIT_MANAGEMENT_DETAIL_GET)
DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception;
@EAIService(id = LimitManagementDetailUtil.LIMIT_MANAGEMENT_DETAIL_UPDATE)
DWEAIResult update(Map<String, String> headers, String messageBody) throws Exception;
}

+ 19
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/LimitManagementEAIService.java View File

@ -0,0 +1,19 @@
package com.digiwin.athena.app.ptc.provider;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.app.service.DWService;
import com.digiwin.app.service.eai.EAIService;
import com.digiwin.athena.app.ptc.service.managementdetail.LimitManagementDetailUtil;
import java.util.Map;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public interface LimitManagementEAIService extends DWService {
@EAIService(id = LimitManagementDetailUtil.LIMIT_MANAGEMENT_GET)
DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception;
}

+ 18
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/provider/PaymentDetailsEAIService.java View File

@ -0,0 +1,18 @@
package com.digiwin.athena.app.ptc.provider;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.app.service.DWService;
import com.digiwin.app.service.eai.EAIService;
import com.digiwin.athena.app.ptc.service.paymentdetails.PaymentDetailsUtil;
import java.util.Map;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public interface PaymentDetailsEAIService extends DWService {
@EAIService(id = PaymentDetailsUtil.RECEIVABLES_GET)
DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception;
}

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

@ -0,0 +1,29 @@
package com.digiwin.athena.app.ptc.provider.impl;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.ptc.provider.LimitManagementDetailEAIService;
import com.digiwin.athena.app.ptc.service.managementdetail.LimitManagementDetailUtil;
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext;
import javax.annotation.Resource;
import java.util.Map;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public class LimitManagementDetailEAIServiceImpl implements LimitManagementDetailEAIService{
@Resource
private EAIServiceContext eaiServiceContext;
@Override
public DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception {
return eaiServiceContext.execute(LimitManagementDetailUtil.LIMIT_MANAGEMENT_DETAIL_GET,headers,messageBody);
}
@Override
public DWEAIResult update(Map<String, String> headers, String messageBody) throws Exception {
return eaiServiceContext.execute(LimitManagementDetailUtil.LIMIT_MANAGEMENT_DETAIL_UPDATE,headers,messageBody);
}
}

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

@ -0,0 +1,25 @@
package com.digiwin.athena.app.ptc.provider.impl;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.ptc.provider.LimitManagementEAIService;
import com.digiwin.athena.app.ptc.service.managementdetail.LimitManagementDetailUtil;
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext;
import javax.annotation.Resource;
import java.util.Map;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public class LimitManagementEAIServiceImpl implements LimitManagementEAIService {
@Resource
private EAIServiceContext eaiServiceContext;
@Override
public DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception {
return eaiServiceContext.execute(LimitManagementDetailUtil.LIMIT_MANAGEMENT_GET,headers,messageBody);
}
}

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

@ -0,0 +1,23 @@
package com.digiwin.athena.app.ptc.provider.impl;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.ptc.provider.PaymentDetailsEAIService;
import com.digiwin.athena.app.ptc.service.paymentdetails.PaymentDetailsUtil;
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext;
import javax.annotation.Resource;
import java.util.Map;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public class PaymentDetailsEAIServiceImpl implements PaymentDetailsEAIService {
@Resource
private EAIServiceContext eaiServiceContext;
@Override
public DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception {
return eaiServiceContext.execute(PaymentDetailsUtil.RECEIVABLES_GET,headers,messageBody);
}
}

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

@ -0,0 +1,48 @@
package com.digiwin.athena.app.ptc.service.management;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.ptc.infra.entity.LimitManagementEntity;
import com.digiwin.athena.app.ptc.infra.service.LimitManagementDetailService;
import com.digiwin.athena.app.ptc.infra.service.LimitManagementService;
import com.digiwin.athena.app.ptc.service.managementdetail.LimitManagementDetailUtil;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import com.digiwin.athena.opt.common.security.SecurityUtil;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
@Service
@Log4j2
public class LimitManagementGetEAIService extends AbsEAIService {
@Resource
private LimitManagementService limitManagementService;
@Resource
private LimitManagementDetailService limitManagementDetailService;
@Override
public String getServiceName() {
return LimitManagementDetailUtil.LIMIT_MANAGEMENT_GET;
}
@Override
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception {
//直接捞两个表的数据
LambdaQueryWrapper<LimitManagementEntity> lmq = new LambdaQueryWrapper<>();
lmq.eq(LimitManagementEntity::getTenantSid, SecurityUtil.getUserProfile().getTenantSid());
List<LimitManagementEntity> list = limitManagementService.list(lmq);
return buildOK("query_result",list);
}
}

+ 94
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/managementdetail/LimitManagementDetailGetEAIService.java View File

@ -0,0 +1,94 @@
package com.digiwin.athena.app.ptc.service.managementdetail;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.nacos.common.utils.CollectionUtils;
import com.alibaba.nacos.common.utils.Objects;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.digiwin.app.container.exceptions.DWBusinessException;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.ptc.infra.entity.LimitManagementDetailEntity;
import com.digiwin.athena.app.ptc.infra.entity.LimitManagementEntity;
import com.digiwin.athena.app.ptc.infra.service.LimitManagementDetailService;
import com.digiwin.athena.app.ptc.infra.service.LimitManagementService;
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 lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
@Service
@Log4j2
public class LimitManagementDetailGetEAIService extends AbsEAIService {
@Resource
private LimitManagementDetailService limitManagementDetailService;
@Resource
private LimitManagementService limitManagementService;
@Override
public String getServiceName() {
return LimitManagementDetailUtil.LIMIT_MANAGEMENT_DETAIL_GET;
}
@Override
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception {
//根据id查子表
EAIRequest eaiRequest = EAIRequest.build(messageBody);
List<LimitManagementEntity> limitManagementEntities = eaiRequest.getObject("get_data", new TypeReference<List<LimitManagementEntity>>() {});
if (CollectionUtils.isEmpty(limitManagementEntities)){
throw new DWBusinessException("必填参数为空");
}
LimitManagementEntity limitManagementEntity = limitManagementEntities.get(0);
Long tenantSid = SecurityUtil.getUserProfile().getTenantSid();
if (Objects.nonNull(limitManagementEntity.getId())){
LambdaQueryWrapper<LimitManagementEntity> mfLmq = new LambdaQueryWrapper<>();
mfLmq.eq(LimitManagementEntity::getId,limitManagementEntity.getId());
LimitManagementEntity one = limitManagementService.getOne(mfLmq);
LambdaQueryWrapper<LimitManagementDetailEntity> dfLmq = new LambdaQueryWrapper<>();
dfLmq.eq(LimitManagementDetailEntity::getTenantSid,tenantSid);
dfLmq.eq(LimitManagementDetailEntity::getLimitManagementId,limitManagementEntity.getId());
List<LimitManagementDetailEntity> list = limitManagementDetailService.list(dfLmq);
one.setInfo(list);
return buildOK("query_result",one);
}
if (Objects.nonNull(limitManagementEntity.getQuotaRatio())){
//根据间距查询主表
LambdaQueryWrapper<LimitManagementEntity> lmq = new LambdaQueryWrapper<>();
lmq.eq(LimitManagementEntity::getTenantSid,tenantSid);
lmq.le(LimitManagementEntity::getMinPercentage,limitManagementEntity.getQuotaRatio());
lmq.ge(LimitManagementEntity::getMaxPercentage,limitManagementEntity.getQuotaRatio());
LimitManagementEntity one = limitManagementService.getOne(lmq);
//根据id查询子表
if (Objects.nonNull(one)){
LambdaQueryWrapper<LimitManagementDetailEntity> dfLmq = new LambdaQueryWrapper<>();
dfLmq.eq(LimitManagementDetailEntity::getTenantSid,tenantSid);
dfLmq.eq(LimitManagementDetailEntity::getLimitManagementId,one.getId());
List<LimitManagementDetailEntity> list = limitManagementDetailService.list(dfLmq);
one.setInfo(list);
return buildOK("query_result",one);
}
}
return buildOK("query_result",new HashMap<>());
}
}

+ 55
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/managementdetail/LimitManagementDetailUpdateEAIService.java View File

@ -0,0 +1,55 @@
package com.digiwin.athena.app.ptc.service.managementdetail;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.nacos.common.utils.CollectionUtils;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.ptc.infra.entity.LimitManagementDetailEntity;
import com.digiwin.athena.app.ptc.infra.entity.LimitManagementEntity;
import com.digiwin.athena.app.ptc.infra.repository.LimitManagementDetailRepository;
import com.digiwin.athena.opt.common.eai.EAIRequest;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
@Service
@Log4j2
public class LimitManagementDetailUpdateEAIService extends AbsEAIService {
@Resource
private LimitManagementDetailRepository limitManagementDetailRepository;
@Override
public String getServiceName() {
return LimitManagementDetailUtil.LIMIT_MANAGEMENT_DETAIL_UPDATE;
}
@Override
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception {
//修改子表
EAIRequest eaiRequest = EAIRequest.build(messageBody);
List<LimitManagementEntity> managementDetailEntities = eaiRequest.getObject("get_data", new TypeReference<List<LimitManagementEntity>>() {});
if (CollectionUtils.isEmpty(managementDetailEntities)){
return buildOK("query_result",new HashMap<>());
}
//获取单身数据
List<LimitManagementDetailEntity> info = managementDetailEntities.get(0).getInfo();
if (CollectionUtils.isNotEmpty(info)){
limitManagementDetailRepository.updateBatch(info);
}
return buildOK("query_result",managementDetailEntities);
}
}

+ 14
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/managementdetail/LimitManagementDetailUtil.java View File

@ -0,0 +1,14 @@
package com.digiwin.athena.app.ptc.service.managementdetail;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public class LimitManagementDetailUtil {
public static final String LIMIT_MANAGEMENT_DETAIL_UPDATE ="demo.ptc.athenapot.limit.management.detail.update";
public static final String LIMIT_MANAGEMENT_DETAIL_GET ="demo.ptc.athenapot.limit.management.detail.get";
public static final String LIMIT_MANAGEMENT_GET ="demo.ptc.athenapot.limit.management.get";
}

+ 10
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/paymentdetails/PaymentDetailsUtil.java View File

@ -0,0 +1,10 @@
package com.digiwin.athena.app.ptc.service.paymentdetails;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
public class PaymentDetailsUtil {
public static final String RECEIVABLES_GET = "demo.ptc.athenapot.receivables.get";
}

+ 40
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/paymentdetails/ReceivablesGetEAIService.java View File

@ -0,0 +1,40 @@
package com.digiwin.athena.app.ptc.service.paymentdetails;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.ptc.infra.entity.PaymentDetailsEntity;
import com.digiwin.athena.app.ptc.infra.service.PaymentDetailsService;
import com.digiwin.athena.opt.common.eai.service.AbsEAIService;
import com.digiwin.athena.opt.common.security.SecurityUtil;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @auther: zhenggl
* @date: 2023/9/11
*/
@Service
@Log4j2
public class ReceivablesGetEAIService extends AbsEAIService {
@Resource
private PaymentDetailsService paymentDetailsService;
@Override
public String getServiceName() {
return PaymentDetailsUtil.RECEIVABLES_GET;
}
@Override
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception {
LambdaQueryWrapper<PaymentDetailsEntity> lmq = new LambdaQueryWrapper<>();
lmq.eq(PaymentDetailsEntity::getTenantSid, SecurityUtil.getUserProfile().getTenantSid());
List<PaymentDetailsEntity> list = paymentDetailsService.list(lmq);
return buildOK("query_result",list);
}
}

+ 73
- 0
doc/sql/app-20230703-ddl.sql View File

@ -29,3 +29,76 @@ alter table cim_chat_file Add column question_no varchar(32) null default '' COM
alter table cim_chat_file Add column user_id varchar(32) null default '' COMMENT '用户id'; alter table cim_chat_file Add column user_id varchar(32) null default '' COMMENT '用户id';
ALTER TABLE `cim_chat_file` MODIFY COLUMN `is_join` tinyint(255); ALTER TABLE `cim_chat_file` MODIFY COLUMN `is_join` tinyint(255);
CREATE TABLE `cim_limit_management_detail` (
`id` bigint(20) NOT NULL,
`limit_management_id` bigint(20) NOT NULL,
`min_percentage` decimal(15,3) DEFAULT NULL COMMENT '区间最小',
`max_percentage` decimal(15,3) DEFAULT NULL COMMENT '区间最大',
`overdue_date_range` varchar(100) DEFAULT '' COMMENT '逾期日期区间',
`processed_by` varchar(50) DEFAULT '' COMMENT '处理人',
`handling_method` varchar(1) DEFAULT '' COMMENT '处理方式',
`processed_by_type` varchar(1) DEFAULT '' COMMENT '处理人类型',
`user_id` varchar(50) DEFAULT '' COMMENT '用户id',
`tenantsid` bigint(20) DEFAULT NULL COMMENT '租户sid',
`tenant_id` varchar(20) DEFAULT NULL,
`create_by` varchar(50) DEFAULT NULL,
`create_date` datetime DEFAULT NULL,
`modified_by` varchar(50) DEFAULT NULL,
`modified_date` datetime DEFAULT NULL,
`version` int(11) DEFAULT NULL,
`deleted` tinyint(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `cim_payment_details` (
`id` bigint(20) NOT NULL,
`receivable_no` varchar(100) DEFAULT '' COMMENT '应收单号',
`receivable_non` varchar(100) DEFAULT '' COMMENT '应收序号',
`customer_no` varchar(100) DEFAULT '' COMMENT '客户编号',
`customer_name` varchar(100) DEFAULT '' COMMENT '客户名称',
`status` varchar(100) DEFAULT '' COMMENT '状态',
`sales_order` varchar(100) DEFAULT '' COMMENT '销售单号',
`sales_order_number` varchar(100) DEFAULT '' COMMENT '销售单序号',
`contract_no` varchar(100) DEFAULT '' COMMENT '合同编号',
`sku_code` varchar(100) DEFAULT '' COMMENT '品号',
`sku_name` varchar(100) DEFAULT '' COMMENT '品名',
`sku_spec` varchar(100) DEFAULT '' COMMENT '规格',
`contacts` varchar(100) DEFAULT '' COMMENT '联系人',
`contact_information` varchar(100) DEFAULT '' COMMENT '联系方式',
`salesman_assistant` varchar(100) DEFAULT '' COMMENT '业务助理',
`salesman` varchar(100) DEFAULT '' COMMENT '业务员',
`salesman_boss` varchar(100) DEFAULT '' COMMENT '业务主管',
`produce_boss` varchar(100) DEFAULT '' COMMENT '生产主管',
`work_no` varchar(100) DEFAULT '' COMMENT '工单单号',
`amount_tax` decimal(15,3) DEFAULT NULL COMMENT '含税金额',
`price_tax` decimal(15,3) DEFAULT NULL COMMENT '含税单价',
`quantity` decimal(15,3) DEFAULT NULL COMMENT '数量',
`overdue_days` int(11) DEFAULT NULL COMMENT '逾期天数',
`tenantsid` bigint(20) DEFAULT NULL COMMENT '租户sid',
`tenant_id` varchar(20) DEFAULT NULL,
`create_by` varchar(50) DEFAULT NULL,
`create_date` datetime DEFAULT NULL,
`modified_by` varchar(50) DEFAULT NULL,
`modified_date` datetime DEFAULT NULL,
`version` int(11) DEFAULT NULL,
`deleted` tinyint(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `cim_limit_management` (
`id` bigint(20) NOT NULL,
`min_percentage` decimal(15,3) DEFAULT NULL COMMENT '区间最小',
`max_percentage` decimal(15,3) DEFAULT NULL COMMENT '区间最大',
`class_interval_name` varchar(100) DEFAULT '' COMMENT '级距名称',
`class_interval_no` varchar(100) DEFAULT '' COMMENT '序号',
`tenantsid` bigint(20) DEFAULT NULL COMMENT '租户sid',
`tenant_id` varchar(20) DEFAULT NULL,
`create_by` varchar(50) DEFAULT NULL,
`create_date` datetime DEFAULT NULL,
`modified_by` varchar(50) DEFAULT NULL,
`modified_date` datetime DEFAULT NULL,
`version` int(11) DEFAULT NULL,
`deleted` tinyint(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Loading…
Cancel
Save