@ -1,3 +1,3 @@ | |||||
# demo-athenaopt | # demo-athenaopt | ||||
测试 release/S2 打包 | |||||
测试 release/S3 打包 |
@ -0,0 +1,97 @@ | |||||
package com.digiwin.athena.app.infra.common.utils; | |||||
import com.digiwin.athena.app.infra.constant.ParameterConstant; | |||||
import java.lang.reflect.Field; | |||||
import java.util.ArrayList; | |||||
import java.util.HashMap; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
/** | |||||
* @description 响应结果转换 | |||||
* @throws | |||||
* @time 2023/8/30 13:21 | |||||
*/ | |||||
public class ResponseUtil { | |||||
/** | |||||
* 把对象中的 String 类型的null字段,转换为空字符串 | |||||
* | |||||
* @param <T> 待转化对象类型 | |||||
* @param cls 待转化对象 | |||||
* @return 转化好的对象 | |||||
*/ | |||||
public static <T> T noNullStringAttr(T cls) { | |||||
Field[] fields = cls.getClass().getDeclaredFields(); | |||||
if (fields == null || fields.length == 0) { | |||||
return cls; | |||||
} | |||||
for (Field field : fields) { | |||||
if (ParameterConstant.STRING.equals(field.getType().getSimpleName())) { | |||||
field.setAccessible(true); | |||||
try { | |||||
Object value = field.get(cls); | |||||
if (value == null) { | |||||
field.set(cls, ""); | |||||
} | |||||
} catch (IllegalArgumentException | IllegalAccessException e) { | |||||
e.printStackTrace(); | |||||
} | |||||
} | |||||
} | |||||
return cls; | |||||
} | |||||
/** | |||||
* 把集合中的所有对象中的String类型的null字段,转换为空字符串 | |||||
* 注意:只能转换String类型的字段 | |||||
* | |||||
* @param sourceList 待转化的集合 | |||||
* @return 转化好的集合 | |||||
*/ | |||||
public static <T> List<T> listNullToString(List<T> sourceList) { | |||||
ArrayList<T> resultList = new ArrayList<>(); | |||||
for (T cls : sourceList) { | |||||
Field[] fields = cls.getClass().getDeclaredFields(); | |||||
if (fields == null || fields.length == 0) { | |||||
resultList.add(cls); | |||||
} | |||||
for (Field field : fields) { | |||||
if (ParameterConstant.STRING.equals(field.getType().getSimpleName())) { | |||||
field.setAccessible(true); | |||||
try { | |||||
Object value = field.get(cls); | |||||
if (value == null) { | |||||
field.set(cls, ""); | |||||
} | |||||
} catch (IllegalArgumentException | IllegalAccessException e) { | |||||
e.printStackTrace(); | |||||
} | |||||
} | |||||
} | |||||
resultList.add(cls); | |||||
} | |||||
return resultList; | |||||
} | |||||
/** | |||||
* 注意:只能转换String类型的字段 | |||||
* | |||||
* @param sourceList 待转化的集合 | |||||
* @return 转化好的集合 | |||||
*/ | |||||
public static List<Map<String, Object>> listMapToLowerCase(List<Map<String, Object>> sourceList) { | |||||
List<Map<String, Object>> response = new ArrayList<>(); | |||||
for (Map<String, Object> map : sourceList) { | |||||
Map<String, Object> newMap = new HashMap<>(); | |||||
for (Map.Entry<String, Object> entry : map.entrySet()) { | |||||
String key = entry.getKey().toLowerCase(); | |||||
Object value = entry.getValue(); | |||||
newMap.put(key, value); | |||||
} | |||||
response.add(newMap); | |||||
} | |||||
return response; | |||||
} | |||||
} |
@ -0,0 +1,146 @@ | |||||
package com.digiwin.athena.app.infra.dto; | |||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |||||
import com.fasterxml.jackson.annotation.JsonProperty; | |||||
import com.google.gson.annotations.SerializedName; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Data; | |||||
import lombok.NoArgsConstructor; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
/** | |||||
* @author lz | |||||
* @version 1.0 | |||||
* @title CaPurchaseOrderDetailDTO | |||||
* @description | |||||
* @create 2023/8/30 11:14 | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@JsonIgnoreProperties(ignoreUnknown = true) | |||||
public class PurchaseOrderDetailDTO { | |||||
/** | |||||
* 请购单号 | |||||
*/ | |||||
@JsonProperty(value = "purchase_order_no") | |||||
private String purchaseOrderNo; | |||||
/** | |||||
* 请购单序号 | |||||
*/ | |||||
@JsonProperty(value = "purchase_order_seq") | |||||
private String purchaseOrderSeq; | |||||
/** | |||||
* 品号 | |||||
*/ | |||||
@JsonProperty(value = "item_no") | |||||
private String itemNo; | |||||
/** | |||||
* 品名 | |||||
*/ | |||||
@JsonProperty(value = "item_name") | |||||
private String itemName; | |||||
/** | |||||
* 规格 | |||||
*/ | |||||
@JsonProperty(value = "item_spec") | |||||
private String itemSpec; | |||||
/** | |||||
* 供应商名称 | |||||
*/ | |||||
@JsonProperty(value = "supplier_name") | |||||
private String supplierName; | |||||
/** | |||||
* 供应商编号 | |||||
*/ | |||||
@JsonProperty(value = "supplier_no") | |||||
private String supplierNo; | |||||
/** | |||||
* 请购数量 | |||||
*/ | |||||
@JsonProperty(value = "requisition_num") | |||||
private Integer requisitionNum; | |||||
/** | |||||
* 采购数量 | |||||
*/ | |||||
@JsonProperty(value = "purchase_num") | |||||
private Integer purchaseNum; | |||||
/** | |||||
* 采购单价 | |||||
*/ | |||||
@JsonProperty(value = "purchase_price") | |||||
private BigDecimal purchasePrice; | |||||
/** | |||||
* 金额 | |||||
*/ | |||||
@JsonProperty(value = "amount") | |||||
private BigDecimal amount; | |||||
/** | |||||
* 采购剩余数量 | |||||
*/ | |||||
@JsonProperty(value = "purchase_residue_num") | |||||
private Integer purchaseResidueNum; | |||||
/** | |||||
* 采购执行人 | |||||
*/ | |||||
@JsonProperty(value = "procurement_executor_code") | |||||
private String procurementExecutorCode; | |||||
/** | |||||
* 采购需求日期 | |||||
*/ | |||||
@JsonProperty(value = "purchase_date") | |||||
private Date purchaseDate; | |||||
/** | |||||
* 预计到货日 | |||||
*/ | |||||
@JsonProperty(value = "expected_date") | |||||
private Date expectedDate; | |||||
/** | |||||
* 异常处理方式 | |||||
*/ | |||||
@JsonProperty(value = "abnormal_handle_plan") | |||||
private String abnormalHandlePlan; | |||||
/** | |||||
* 任务卡状态 | |||||
*/ | |||||
@JsonProperty(value = "tab_status") | |||||
private String tabStatus; | |||||
/** | |||||
* 交期回复任务卡状态 | |||||
*/ | |||||
@JsonProperty(value = "reply_tab_status") | |||||
private String replyTabStatus; | |||||
/** | |||||
* 异常排除任务卡状态 | |||||
*/ | |||||
@JsonProperty(value = "abnormal_tab_status") | |||||
private String abnormalTabStatus; | |||||
/** | |||||
* 任务卡类型:1是采购任务,2是交期回复任务,3是异常排除任务 | |||||
*/ | |||||
@JsonProperty(value = "task_type") | |||||
private String taskType; | |||||
} |
@ -0,0 +1,46 @@ | |||||
package com.digiwin.athena.app.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; | |||||
/** | |||||
* 人资报道对象 cim_item_supplier | |||||
* | |||||
* @author bk | |||||
* @date 2023-04-28 | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@Builder | |||||
@TableName(value = "cim_item_supplier", autoResultMap = true) | |||||
public class FontSupplierEntity extends BaseMgrEntity<FontSupplierEntity> { | |||||
private static final long serialVersionUID = 1L; | |||||
/** 品号 */ | |||||
@SerializedName("item_no") | |||||
private String itemNo; | |||||
/** 品名 */ | |||||
@SerializedName("item_name") | |||||
private String itemName; | |||||
/** 供应商编号 */ | |||||
@SerializedName("supplier_no") | |||||
private String supplierNo; | |||||
/** 供应商名称 */ | |||||
@SerializedName("supplier_name") | |||||
private String supplierName; | |||||
/** 单价 */ | |||||
@SerializedName("price") | |||||
private String price; | |||||
} |
@ -0,0 +1,56 @@ | |||||
package com.digiwin.athena.app.infra.entity; | |||||
import com.baomidou.mybatisplus.annotation.TableName; | |||||
import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity; | |||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |||||
import com.fasterxml.jackson.annotation.JsonProperty; | |||||
import com.google.gson.annotations.SerializedName; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Builder; | |||||
import lombok.Data; | |||||
import lombok.NoArgsConstructor; | |||||
/** | |||||
* @Author: xieps | |||||
* @Date: 2023/8/30 14:03 | |||||
* @Version 1.0 | |||||
* @Description | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@Builder | |||||
@JsonIgnoreProperties(ignoreUnknown = true) | |||||
@TableName(value = "cim_item_execute", autoResultMap = true) | |||||
public class ItemExecutorEntity extends BaseMgrEntity<ItemExecutorEntity> { | |||||
/** | |||||
* 品号 | |||||
*/ | |||||
@SerializedName(value = "item_no") | |||||
@JsonProperty(value = "item_no") | |||||
private String itemNo; | |||||
/** | |||||
* 品名 | |||||
*/ | |||||
@SerializedName(value = "item_name") | |||||
@JsonProperty(value = "item_name") | |||||
private String itemName; | |||||
/** | |||||
* 执行人编号 | |||||
*/ | |||||
@SerializedName(value = "procurement_executor_code") | |||||
@JsonProperty(value = "procurement_executor_code") | |||||
private String procurementExecutorCode; | |||||
/** | |||||
* 执行人名称 | |||||
*/ | |||||
@SerializedName(value = "procurement_executor_name") | |||||
@JsonProperty(value = "procurement_executor_name") | |||||
private String procurementExecutorName; | |||||
} |
@ -0,0 +1,45 @@ | |||||
package com.digiwin.athena.app.infra.entity; | |||||
import java.math.BigDecimal; | |||||
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; | |||||
/** | |||||
* 品号供应商对象 cim_item_supplier | |||||
* | |||||
* @author zhenggl | |||||
* @date 2023-08-31 | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@Builder | |||||
@TableName(value = "cim_item_supplier", autoResultMap = true) | |||||
public class ItemSupplierEntity extends BaseMgrEntity<ItemSupplierEntity> { | |||||
/** 品号 */ | |||||
@SerializedName(value = "item_no") | |||||
private String itemNo; | |||||
/** 品名 */ | |||||
@SerializedName(value = "item_name") | |||||
private String itemName; | |||||
/** 供应商编号 */ | |||||
@SerializedName(value = "supplier_no") | |||||
private String supplierNo; | |||||
/** 供应商名称 */ | |||||
@SerializedName(value = "supplier_name") | |||||
private String supplierName; | |||||
/** 单价 */ | |||||
@SerializedName(value = "price") | |||||
private BigDecimal price; | |||||
} |
@ -0,0 +1,163 @@ | |||||
package com.digiwin.athena.app.infra.entity; | |||||
import com.baomidou.mybatisplus.annotation.TableName; | |||||
import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity; | |||||
import com.fasterxml.jackson.annotation.JsonProperty; | |||||
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.Date; | |||||
/** | |||||
* @author lz | |||||
* @description 请购采购单表 | |||||
* @throws | |||||
* @time 2023/8/29 16:21 | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@Builder | |||||
@TableName(value = "cim_purchase_order_detail", autoResultMap = true) | |||||
public class PurchaseOrderDetailEntity extends BaseMgrEntity<PurchaseOrderDetailEntity> { | |||||
/** | |||||
* 请购单号 | |||||
*/ | |||||
@SerializedName(value = "purchase_order_no") | |||||
@JsonProperty(value = "purchase_order_no") | |||||
private String purchaseOrderNo; | |||||
/** | |||||
* 请购单序号 | |||||
*/ | |||||
@SerializedName(value = "purchase_order_seq") | |||||
@JsonProperty(value = "purchase_order_seq") | |||||
private String purchaseOrderSeq; | |||||
/** | |||||
* 品号 | |||||
*/ | |||||
@SerializedName(value = "item_no") | |||||
@JsonProperty(value = "item_no") | |||||
private String itemNo; | |||||
/** | |||||
* 品名 | |||||
*/ | |||||
@SerializedName(value = "item_name") | |||||
@JsonProperty(value = "item_name") | |||||
private String itemName; | |||||
/** | |||||
* 供应商名称 | |||||
*/ | |||||
@SerializedName(value = "supplier_name") | |||||
@JsonProperty(value = "supplier_name") | |||||
private String supplierName; | |||||
/** | |||||
* 供应商编号 | |||||
*/ | |||||
@SerializedName(value = "supplier_no") | |||||
@JsonProperty(value = "supplier_no") | |||||
private String supplierNo; | |||||
/** | |||||
* 请购数量 | |||||
*/ | |||||
@SerializedName(value = "requisition_num") | |||||
@JsonProperty(value = "requisition_num") | |||||
private Integer requisitionNum; | |||||
/** | |||||
* 采购数量 | |||||
*/ | |||||
@SerializedName(value = "purchase_num") | |||||
@JsonProperty(value = "purchase_num") | |||||
private Integer purchaseNum; | |||||
/** | |||||
* 采购单价 | |||||
*/ | |||||
@SerializedName(value = "purchase_price") | |||||
@JsonProperty(value = "purchase_price") | |||||
private BigDecimal purchasePrice; | |||||
/** | |||||
* 金额 | |||||
*/ | |||||
@SerializedName(value = "amount") | |||||
@JsonProperty(value = "amount") | |||||
private BigDecimal amount; | |||||
/** | |||||
* 采购剩余数量 | |||||
*/ | |||||
@SerializedName(value = "purchase_residue_num") | |||||
@JsonProperty(value = "purchase_residue_num") | |||||
private Integer purchaseResidueNum; | |||||
/** | |||||
* 采购执行人 | |||||
*/ | |||||
@SerializedName(value = "procurement_executor_code") | |||||
@JsonProperty(value = "procurement_executor_code") | |||||
private String procurementExecutorCode; | |||||
/** | |||||
* 采购需求日期 | |||||
*/ | |||||
@SerializedName(value = "purchase_date") | |||||
@JsonProperty(value = "purchase_date") | |||||
private Date purchaseDate; | |||||
/** | |||||
* 预计到货日 | |||||
*/ | |||||
@SerializedName(value = "expected_date") | |||||
@JsonProperty(value = "expected_date") | |||||
private Date expectedDate; | |||||
/** | |||||
* 异常处理方式 | |||||
*/ | |||||
@SerializedName(value = "abnormal_handle_plan") | |||||
@JsonProperty(value = "abnormal_handle_plan") | |||||
private String abnormalHandlePlan; | |||||
/** | |||||
* 任务卡状态 | |||||
*/ | |||||
@SerializedName(value = "tab_status") | |||||
@JsonProperty(value = "tab_status") | |||||
private String tabStatus; | |||||
/** | |||||
* 交期回复任务卡状态 | |||||
*/ | |||||
@SerializedName(value = "reply_tab_status") | |||||
@JsonProperty(value = "reply_tab_status") | |||||
private String replyTabStatus; | |||||
/** | |||||
* 异常排除任务卡状态 | |||||
*/ | |||||
@SerializedName(value = "abnormal_tab_status") | |||||
@JsonProperty(value = "abnormal_tab_status") | |||||
private String abnormalTabStatus; | |||||
/** | |||||
* 任务卡类型:1是采购任务,2是交期回复任务,3是异常排除任务 | |||||
*/ | |||||
@SerializedName(value = "task_type") | |||||
@JsonProperty(value = "task_type") | |||||
private String taskType; | |||||
} |
@ -0,0 +1,44 @@ | |||||
package com.digiwin.athena.app.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.Data; | |||||
import lombok.NoArgsConstructor; | |||||
/** | |||||
* @author CR-7 | |||||
* create: 2023-09-01 16:12 | |||||
* Description: | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@TableName(value = "cim_supplier_contact", autoResultMap = true) | |||||
public class SupplierContactEntity extends BaseMgrEntity<SupplierContactEntity> { | |||||
/** | |||||
* 供应商编号 | |||||
*/ | |||||
@SerializedName(value = "supplier_no") | |||||
private String supplierNo; | |||||
/** | |||||
* 供应商名称 | |||||
*/ | |||||
@SerializedName(value = "supplier_name") | |||||
private String supplierName; | |||||
/** | |||||
* 联系人名称 | |||||
*/ | |||||
@SerializedName(value = "contact_name") | |||||
private String contactName; | |||||
/** | |||||
* 联系人邮箱 | |||||
*/ | |||||
@SerializedName(value = "contact_email") | |||||
private String contactEmail; | |||||
} |
@ -0,0 +1,21 @@ | |||||
<?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.infra.repository.ItemExecutorRepository"> | |||||
<update id="updateBatch"> | |||||
<foreach collection="list" item="item" index="index" separator=";" open="" close=""> | |||||
UPDATE cim_item_execute | |||||
<set> | |||||
`item_name` = #{item.itemName}, | |||||
`procurement_executor_name` = #{item.procurementExecutorName} | |||||
</set> | |||||
WHERE `tenantsid`=#{tenantSid} AND | |||||
`item_no`= #{item.itemNo} AND `procurement_executor_code` = #{item.procurementExecutorCode} | |||||
</foreach> | |||||
</update> | |||||
</mapper> |
@ -0,0 +1,91 @@ | |||||
<?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.infra.repository.PurchaseOrderDetailRepository"> | |||||
<update id="updateAbnormalHandlePlan"> | |||||
<foreach collection="list" item="item" index="index" separator=";" open="" close=""> | |||||
UPDATE cim_purchase_order_detail | |||||
<set> | |||||
abnormal_handle_plan = #{item.abnormal_handle_plan} | |||||
<if test="item.purchaseDate !=null"> | |||||
,purchase_date = #{item.purchaseDate} | |||||
</if> | |||||
<if test="item.expectedDate !=null"> | |||||
,expected_date = #{item.expectedDate} | |||||
</if> | |||||
</set> | |||||
where id = #{item.id} | |||||
</foreach> | |||||
</update> | |||||
<update id="updateBatch"> | |||||
<foreach collection="list" item="item" index="index" separator=";" open="" close=""> | |||||
UPDATE cim_purchase_order_detail | |||||
<set> | |||||
<if test="item.itemNo != null and '' != item.itemNo"> | |||||
item_no = #{item.itemNo}, | |||||
</if> | |||||
<if test="item.itemName != null and '' != item.itemName"> | |||||
item_name = #{item.itemName}, | |||||
</if> | |||||
<if test="item.supplierName != null and '' != item.supplierName"> | |||||
supplier_name = #{item.supplierName}, | |||||
</if> | |||||
<if test="item.supplierNo != null and '' != item.supplierNo"> | |||||
supplier_no = #{item.supplierNo}, | |||||
</if> | |||||
<if test="item.requisitionNum != null "> | |||||
requisition_num = #{item.requisitionNum}, | |||||
</if> | |||||
<if test="item.purchaseNum != null "> | |||||
purchase_num = #{item.purchaseNum}, | |||||
</if> | |||||
<if test="item.purchasePrice != null "> | |||||
purchase_price = #{item.purchasePrice}, | |||||
</if> | |||||
<if test="item.amount != null "> | |||||
amount = #{item.amount}, | |||||
</if> | |||||
<if test="item.purchaseResidueNum != null "> | |||||
purchase_residue_num = #{item.purchaseResidueNum}, | |||||
</if> | |||||
<if test="item.procurementExecutorCode != null "> | |||||
procurement_executor_code = #{item.procurementExecutorCode}, | |||||
</if> | |||||
<if test="item.purchaseDate != null "> | |||||
purchase_date = #{item.purchaseDate}, | |||||
</if> | |||||
<if test="item.expectedDate != null "> | |||||
expected_date = #{item.expectedDate}, | |||||
</if> | |||||
<if test="item.abnormalHandlePlan != null and '' != item.abnormalHandlePlan"> | |||||
abnormal_handle_plan = #{item.abnormalHandlePlan}, | |||||
</if> | |||||
<if test="item.tabStatus != null and '' != item.tabStatus"> | |||||
tab_status = #{item.tabStatus}, | |||||
</if> | |||||
<if test="item.abnormalTabStatus != null and '' != item.abnormalTabStatus"> | |||||
abnormal_tab_status = #{item.abnormalTabStatus}, | |||||
</if> | |||||
<if test="item.replyTabStatus != null and '' != item.replyTabStatus"> | |||||
reply_tab_status = #{item.replyTabStatus}, | |||||
</if> | |||||
<if test="item.taskType != null and '' != item.taskType"> | |||||
task_type = #{item.taskType}, | |||||
</if> | |||||
modified_by = #{item.modifiedBy}, | |||||
modified_date = #{item.modifiedDate} | |||||
</set> | |||||
WHERE tenantsid = #{item.tenantSid} AND purchase_order_no = #{item.purchaseOrderNo} | |||||
AND purchase_order_seq = #{item.purchaseOrderSeq} | |||||
</foreach> | |||||
</update> | |||||
</mapper> |
@ -0,0 +1,11 @@ | |||||
package com.digiwin.athena.app.infra.repository; | |||||
import com.digiwin.athena.app.infra.entity.FontSupplierEntity; | |||||
import com.digiwin.athena.opt.persistence.repository.BaseRepository; | |||||
/** | |||||
* @auther: bk | |||||
* @date: 2023/9/1 | |||||
*/ | |||||
public interface FontSupplierRepository extends BaseRepository<FontSupplierEntity> { | |||||
} |
@ -0,0 +1,24 @@ | |||||
package com.digiwin.athena.app.infra.repository; | |||||
import com.digiwin.athena.app.infra.entity.ItemExecutorEntity; | |||||
import com.digiwin.athena.opt.persistence.repository.BaseRepository; | |||||
import org.apache.ibatis.annotations.Param; | |||||
import java.util.List; | |||||
/** | |||||
* @Author: xieps | |||||
* @Date: 2023/8/30 14:21 | |||||
* @Version 1.0 | |||||
* @Description | |||||
*/ | |||||
public interface ItemExecutorRepository extends BaseRepository<ItemExecutorEntity> { | |||||
/** | |||||
* 批量更新 | |||||
* | |||||
* @param itemExecutorInfo | |||||
* @param tenantSid | |||||
*/ | |||||
void updateBatch(@Param("list") List<ItemExecutorEntity> itemExecutorInfo, @Param("tenantSid") long tenantSid); | |||||
} |
@ -0,0 +1,26 @@ | |||||
package com.digiwin.athena.app.infra.repository; | |||||
import com.digiwin.athena.app.infra.entity.PurchaseOrderDetailEntity; | |||||
import com.digiwin.athena.opt.persistence.repository.BaseRepository; | |||||
import org.apache.ibatis.annotations.Param; | |||||
import java.util.List; | |||||
/** | |||||
* @author lz | |||||
* @description | |||||
* @throws | |||||
* @time 2023/8/29 16:35 | |||||
*/ | |||||
public interface PurchaseOrderDetailRepository extends BaseRepository<PurchaseOrderDetailEntity> { | |||||
public void updateAbnormalHandlePlan(@Param("list") List<PurchaseOrderDetailEntity> list); | |||||
/** | |||||
* 请购采购更新 | |||||
* | |||||
* @param entityList | |||||
*/ | |||||
void updateBatch(@Param("list") List<PurchaseOrderDetailEntity> entityList); | |||||
} |
@ -0,0 +1,7 @@ | |||||
package com.digiwin.athena.app.infra.repository; | |||||
import com.digiwin.athena.app.infra.entity.SupplierContactEntity; | |||||
import com.digiwin.athena.opt.persistence.repository.BaseRepository; | |||||
public interface SupplierContactInfoRepository extends BaseRepository<SupplierContactEntity> { | |||||
} |
@ -0,0 +1,11 @@ | |||||
package com.digiwin.athena.app.infra.repository; | |||||
import com.digiwin.athena.app.infra.entity.ItemSupplierEntity; | |||||
import com.digiwin.athena.opt.persistence.repository.BaseRepository; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/1 | |||||
*/ | |||||
public interface SupplierRepository extends BaseRepository<ItemSupplierEntity> { | |||||
} |
@ -0,0 +1,11 @@ | |||||
package com.digiwin.athena.app.infra.service; | |||||
import com.digiwin.athena.app.infra.entity.FontSupplierEntity; | |||||
import com.digiwin.athena.opt.persistence.service.IBaseService; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/1 | |||||
*/ | |||||
public interface FontSupplierService extends IBaseService<FontSupplierEntity> { | |||||
} |
@ -0,0 +1,16 @@ | |||||
package com.digiwin.athena.app.infra.service.Impl; | |||||
import com.digiwin.athena.app.infra.entity.FontSupplierEntity; | |||||
import com.digiwin.athena.app.infra.repository.FontSupplierRepository; | |||||
import com.digiwin.athena.app.infra.service.FontSupplierService; | |||||
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* @auther: bk | |||||
* @date: 2023/9/1 | |||||
*/ | |||||
@Service | |||||
public class FontSupplierServiceImpl extends AbsBaseService<FontSupplierRepository, FontSupplierEntity> implements FontSupplierService { | |||||
} |
@ -0,0 +1,17 @@ | |||||
package com.digiwin.athena.app.infra.service.Impl; | |||||
import com.digiwin.athena.app.infra.entity.ItemExecutorEntity; | |||||
import com.digiwin.athena.app.infra.repository.ItemExecutorRepository; | |||||
import com.digiwin.athena.app.infra.service.ItemExecutorService; | |||||
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* @Author: xieps | |||||
* @Date: 2023/8/30 14:20 | |||||
* @Version 1.0 | |||||
* @Description | |||||
*/ | |||||
@Service | |||||
public class ItemExecutorServiceImpl extends AbsBaseService<ItemExecutorRepository, ItemExecutorEntity> implements ItemExecutorService { | |||||
} |
@ -0,0 +1,18 @@ | |||||
package com.digiwin.athena.app.infra.service.Impl; | |||||
import com.digiwin.athena.app.infra.entity.PurchaseOrderDetailEntity; | |||||
import com.digiwin.athena.app.infra.repository.PurchaseOrderDetailRepository; | |||||
import com.digiwin.athena.app.infra.service.PurchaseDemoService; | |||||
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* @author lz | |||||
* @description 请购单业务类 | |||||
* @throws | |||||
* @time 2023/8/29 16:38 | |||||
*/ | |||||
@Service | |||||
public class PurchaseDemoServiceImpl extends AbsBaseService<PurchaseOrderDetailRepository, PurchaseOrderDetailEntity> implements PurchaseDemoService { | |||||
} |
@ -0,0 +1,16 @@ | |||||
package com.digiwin.athena.app.infra.service.Impl; | |||||
import com.digiwin.athena.app.infra.entity.SupplierContactEntity; | |||||
import com.digiwin.athena.app.infra.repository.SupplierContactInfoRepository; | |||||
import com.digiwin.athena.app.infra.service.SupplierContactInfoService; | |||||
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* @author CR-7 | |||||
* create: 2023-09-01 16:16 | |||||
* Description: | |||||
*/ | |||||
@Service | |||||
public class SupplierContactInfoServiceImpl extends AbsBaseService<SupplierContactInfoRepository, SupplierContactEntity> implements SupplierContactInfoService { | |||||
} |
@ -0,0 +1,16 @@ | |||||
package com.digiwin.athena.app.infra.service.Impl; | |||||
import com.digiwin.athena.app.infra.entity.ItemSupplierEntity; | |||||
import com.digiwin.athena.app.infra.repository.SupplierRepository; | |||||
import com.digiwin.athena.app.infra.service.SupplierService; | |||||
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/1 | |||||
*/ | |||||
@Service | |||||
public class SupplierServiceImpl extends AbsBaseService<SupplierRepository, ItemSupplierEntity> implements SupplierService { | |||||
} |
@ -0,0 +1,13 @@ | |||||
package com.digiwin.athena.app.infra.service; | |||||
import com.digiwin.athena.app.infra.entity.ItemExecutorEntity; | |||||
import com.digiwin.athena.opt.persistence.service.IBaseService; | |||||
/** | |||||
* @Author: xieps | |||||
* @Date: 2023/8/30 14:19 | |||||
* @Version 1.0 | |||||
* @Description | |||||
*/ | |||||
public interface ItemExecutorService extends IBaseService<ItemExecutorEntity> { | |||||
} |
@ -0,0 +1,16 @@ | |||||
package com.digiwin.athena.app.infra.service; | |||||
import com.digiwin.athena.app.infra.entity.PurchaseOrderDetailEntity; | |||||
import com.digiwin.athena.opt.persistence.service.IBaseService; | |||||
import java.util.List; | |||||
/** | |||||
* @description | |||||
* @author lz | |||||
* @throws | |||||
* @time 2023/8/29 16:18 | |||||
*/ | |||||
public interface PurchaseDemoService extends IBaseService<PurchaseOrderDetailEntity> { | |||||
} |
@ -0,0 +1,7 @@ | |||||
package com.digiwin.athena.app.infra.service; | |||||
import com.digiwin.athena.app.infra.entity.SupplierContactEntity; | |||||
import com.digiwin.athena.opt.persistence.service.IBaseService; | |||||
public interface SupplierContactInfoService extends IBaseService<SupplierContactEntity> { | |||||
} |
@ -0,0 +1,11 @@ | |||||
package com.digiwin.athena.app.infra.service; | |||||
import com.digiwin.athena.app.infra.entity.ItemSupplierEntity; | |||||
import com.digiwin.athena.opt.persistence.service.IBaseService; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/1 | |||||
*/ | |||||
public interface SupplierService extends IBaseService<ItemSupplierEntity> { | |||||
} |
@ -0,0 +1,72 @@ | |||||
package com.digiwin.athena.app.kcfr.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.util.Date; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/7 | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@Builder | |||||
@TableName(value = "cim_chat_file", autoResultMap = true) | |||||
public class ChatFileEntity extends BaseMgrEntity<ChatFileEntity> { | |||||
@SerializedName(value = "question") | |||||
private String question; | |||||
@SerializedName(value = "user_id") | |||||
private String userId; | |||||
@SerializedName(value = "question_no") | |||||
private String questionNo; | |||||
@SerializedName(value = "feedback_person") | |||||
private String feedbackPerson; | |||||
@SerializedName(value = "feedback_date") | |||||
private Date feedbackDate; | |||||
@SerializedName(value = "urgency") | |||||
private Integer urgency; | |||||
@SerializedName(value = "question_type") | |||||
private Integer questionType; | |||||
@SerializedName(value = "question_source") | |||||
private Integer questionSource; | |||||
@SerializedName(value = "question_complete_by") | |||||
private String questionCompleteBy; | |||||
@SerializedName(value = "complete_date") | |||||
private Date completeDate; | |||||
@SerializedName(value = "complete_explain") | |||||
private String completeExplain; | |||||
@SerializedName(value = "is_join") | |||||
private Boolean isJoin; | |||||
@SerializedName(value = "tab_status") | |||||
private Integer tabStatus; | |||||
} |
@ -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.kcfr.infra.repository.ChatFileRepository"> | |||||
<update id="updateBatch" parameterType="com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity"> | |||||
UPDATE cim_chat_file | |||||
<set> | |||||
`question` = #{question}, | |||||
`question_source` = #{questionSource}, | |||||
`question_type` = #{questionType}, | |||||
`urgency` = #{urgency}, | |||||
`question_complete_by` = #{questionCompleteBy}, | |||||
`complete_explain` = #{completeExplain}, | |||||
`complete_date` = #{completeDate}, | |||||
`is_join` = #{isJoin} | |||||
</set> | |||||
WHERE `id`=#{id} | |||||
</update> | |||||
</mapper> |
@ -0,0 +1,14 @@ | |||||
package com.digiwin.athena.app.kcfr.infra.repository; | |||||
import com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity; | |||||
import com.digiwin.athena.opt.persistence.repository.BaseRepository; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/7 | |||||
*/ | |||||
public interface ChatFileRepository extends BaseRepository<ChatFileEntity> { | |||||
void updateBatch(ChatFileEntity chatFile); | |||||
} |
@ -0,0 +1,11 @@ | |||||
package com.digiwin.athena.app.kcfr.infra.service; | |||||
import com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity; | |||||
import com.digiwin.athena.opt.persistence.service.IBaseService; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/7 | |||||
*/ | |||||
public interface ChatFileService extends IBaseService<ChatFileEntity> { | |||||
} |
@ -0,0 +1,15 @@ | |||||
package com.digiwin.athena.app.kcfr.infra.service.impl; | |||||
import com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity; | |||||
import com.digiwin.athena.app.kcfr.infra.repository.ChatFileRepository; | |||||
import com.digiwin.athena.app.kcfr.infra.service.ChatFileService; | |||||
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/7 | |||||
*/ | |||||
@Service | |||||
public class ChatFileServiceImpl extends AbsBaseService<ChatFileRepository, ChatFileEntity> implements ChatFileService { | |||||
} |
@ -0,0 +1,24 @@ | |||||
package com.digiwin.athena.app.kcfr.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.kcfr.service.ChatFileUtil; | |||||
import java.util.Map; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/7 | |||||
*/ | |||||
public interface ChatFileEAIService extends DWService { | |||||
@EAIService(id = ChatFileUtil.CA_CHAT_FILE_INFO_GET) | |||||
DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception; | |||||
@EAIService(id = ChatFileUtil.CA_CHAT_FILE_INFO_CREATE) | |||||
DWEAIResult create(Map<String, String> headers, String messageBody) throws Exception; | |||||
@EAIService(id = ChatFileUtil.CA_CHAT_FILE_INFO_UPDATE) | |||||
DWEAIResult update(Map<String, String> headers, String messageBody) throws Exception; | |||||
} |
@ -0,0 +1,35 @@ | |||||
package com.digiwin.athena.app.kcfr.provider.impl; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.kcfr.provider.ChatFileEAIService; | |||||
import com.digiwin.athena.app.kcfr.service.ChatFileUtil; | |||||
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; | |||||
import javax.annotation.Resource; | |||||
import java.util.Map; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/7 | |||||
*/ | |||||
public class ChatFileEAIServiceImpl implements ChatFileEAIService { | |||||
@Resource | |||||
private EAIServiceContext eaiServiceContext; | |||||
@Override | |||||
public DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ChatFileUtil.CA_CHAT_FILE_INFO_GET,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult create(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ChatFileUtil.CA_CHAT_FILE_INFO_CREATE,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult update(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ChatFileUtil.CA_CHAT_FILE_INFO_UPDATE,headers,messageBody); | |||||
} | |||||
} |
@ -0,0 +1,52 @@ | |||||
package com.digiwin.athena.app.kcfr.service; | |||||
import com.alibaba.fastjson.TypeReference; | |||||
import com.digiwin.app.container.exceptions.DWBusinessException; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity; | |||||
import com.digiwin.athena.app.kcfr.infra.service.ChatFileService; | |||||
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.Date; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
import java.util.Objects; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/7 | |||||
*/ | |||||
@Service | |||||
@Log4j2 | |||||
public class ChatFileCreateEAIService extends AbsEAIService { | |||||
@Resource | |||||
private ChatFileService chatFileService; | |||||
@Override | |||||
public String getServiceName() { | |||||
return ChatFileUtil.CA_CHAT_FILE_INFO_CREATE; | |||||
} | |||||
@Override | |||||
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { | |||||
EAIRequest eaiRequest = EAIRequest.build(messageBody); | |||||
List<ChatFileEntity> chatFileInfoList = eaiRequest.getObject("chat_file_info", new TypeReference<List<ChatFileEntity>>(){}); | |||||
ChatFileEntity chatFileInfo = chatFileInfoList.get(0); | |||||
if (Objects.isNull(chatFileInfo)){ | |||||
throw new DWBusinessException("缺少必要参数chat_file_info"); | |||||
} | |||||
//反馈时间 | |||||
chatFileInfo.setFeedbackDate(new Date()); | |||||
chatFileService.save(chatFileInfo); | |||||
return buildOK("chat_file_info",chatFileInfo); | |||||
} | |||||
} |
@ -0,0 +1,52 @@ | |||||
package com.digiwin.athena.app.kcfr.service; | |||||
import com.alibaba.fastjson.TypeReference; | |||||
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.kcfr.infra.entity.ChatFileEntity; | |||||
import com.digiwin.athena.app.kcfr.infra.service.ChatFileService; | |||||
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.Map; | |||||
import java.util.Objects; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/7 | |||||
*/ | |||||
@Service | |||||
@Log4j2 | |||||
public class ChatFileGetEAIService extends AbsEAIService { | |||||
@Resource | |||||
private ChatFileService chatFileService; | |||||
@Override | |||||
public String getServiceName() { | |||||
return ChatFileUtil.CA_CHAT_FILE_INFO_GET; | |||||
} | |||||
@Override | |||||
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { | |||||
EAIRequest eaiRequest = EAIRequest.build(messageBody); | |||||
ChatFileEntity chatFileInfo = eaiRequest.getObject("chat_file_info", new TypeReference<ChatFileEntity>(){}); | |||||
if (Objects.isNull(chatFileInfo)){ | |||||
throw new DWBusinessException("缺少必要参数chat_file_info"); | |||||
} | |||||
LambdaQueryWrapper<ChatFileEntity> lmq = new LambdaQueryWrapper<>(); | |||||
lmq.eq(ChatFileEntity::getId,chatFileInfo.getId()); | |||||
ChatFileEntity chatFileServiceOne = chatFileService.getOne(lmq); | |||||
return buildOK("chat_file_info",chatFileServiceOne); | |||||
} | |||||
} |
@ -0,0 +1,44 @@ | |||||
package com.digiwin.athena.app.kcfr.service; | |||||
import com.alibaba.fastjson.TypeReference; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.kcfr.infra.entity.ChatFileEntity; | |||||
import com.digiwin.athena.app.kcfr.infra.repository.ChatFileRepository; | |||||
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.*; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/7 | |||||
*/ | |||||
@Service | |||||
@Log4j2 | |||||
public class ChatFileUpdateEAIService extends AbsEAIService { | |||||
@Resource | |||||
private ChatFileRepository chatFileRepository; | |||||
@Override | |||||
public String getServiceName() { | |||||
return ChatFileUtil.CA_CHAT_FILE_INFO_UPDATE; | |||||
} | |||||
@Override | |||||
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { | |||||
EAIRequest eaiRequest = EAIRequest.build(messageBody); | |||||
ChatFileEntity chatFileInfo = eaiRequest.getObject("chat_file_info", new TypeReference<ChatFileEntity>(){}); | |||||
if (Objects.isNull(chatFileInfo.getCompleteDate())){ | |||||
chatFileInfo.setCompleteDate(new Date()); | |||||
} | |||||
chatFileRepository.updateBatch(chatFileInfo); | |||||
return buildOK(new HashMap<>()); | |||||
} | |||||
} |
@ -0,0 +1,17 @@ | |||||
package com.digiwin.athena.app.kcfr.service; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/7 | |||||
*/ | |||||
public class ChatFileUtil { | |||||
/*** | |||||
* 工博会chat_file | |||||
*/ | |||||
public static final String CA_CHAT_FILE_INFO_CREATE = "demo.kcfr.chat.file.info.create"; | |||||
public static final String CA_CHAT_FILE_INFO_UPDATE = "demo.kcfr.chat.file.info.update"; | |||||
public static final String CA_CHAT_FILE_INFO_GET = "demo.kcfr.chat.file.info.get"; | |||||
} |
@ -0,0 +1,56 @@ | |||||
package com.digiwin.athena.app.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.service.supplier.FontSupplierUtil; | |||||
import java.util.Map; | |||||
/** | |||||
* @auther: bk | |||||
* @date: 2023/9/1 | |||||
*/ | |||||
public interface FontSupplierEAIService extends DWService { | |||||
/** | |||||
* 品号供应商修改 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = FontSupplierUtil.DEMO_FONT_ITEM_SUPPLIER_INFO_UPDATE) | |||||
DWEAIResult update(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 品号供应商获取 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = FontSupplierUtil.DEMO_FONT_ITEM_SUPPLIER_INFO_GET) | |||||
DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 品号供应商新增 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = FontSupplierUtil.DEMO_FONT_ITEM_SUPPLIER_INFO_CREATE) | |||||
DWEAIResult create(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 品号供应商删除 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = FontSupplierUtil.DEMO_FONT_ITEM_SUPPLIER_INFO_DELETE) | |||||
DWEAIResult delete(Map<String, String> headers, String messageBody) throws Exception; | |||||
} |
@ -0,0 +1,71 @@ | |||||
package com.digiwin.athena.app.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.service.executor.ExecutorUtil; | |||||
import java.util.Map; | |||||
/** | |||||
* @Author: xieps | |||||
* @Date: 2023/9/4 10:28 | |||||
* @Version 1.0 | |||||
* @Description | |||||
*/ | |||||
public interface ItemExecutorEAIService extends DWService { | |||||
/** | |||||
* 品号执行人信息新增 | |||||
* | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = ExecutorUtil.DEMO_ITEM_EXECUTOR_INFO_CREATE) | |||||
DWEAIResult itemExecutorInfoCreate(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 品号执行人信息查询 | |||||
* | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = ExecutorUtil.DEMO_ITEM_EXECUTOR_INFO_GET) | |||||
DWEAIResult itemExecutorInfoGet(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 品号执行人信息删除 | |||||
* | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = ExecutorUtil.DEMO_ITEM_EXECUTOR_INFO_DELETE) | |||||
DWEAIResult itemExecutorInfoDelete(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 品号执行人信息更新 | |||||
* | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = ExecutorUtil.DEMO_ITEM_EXECUTOR_INFO_UPDATE) | |||||
DWEAIResult itemExecutorInfoUpdate(Map<String, String> headers, String messageBody) throws Exception; | |||||
} |
@ -0,0 +1,32 @@ | |||||
package com.digiwin.athena.app.provider; | |||||
import com.digiwin.app.service.AllowAnonymous; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.app.service.DWService; | |||||
import com.digiwin.app.service.eai.EAIService; | |||||
import com.digiwin.athena.app.service.purchase.PurchaseUtil; | |||||
import java.util.Map; | |||||
/** | |||||
* @author lz | |||||
* @description 请购单EAI | |||||
* @throws | |||||
* @time 2023/8/29 16:41 | |||||
*/ | |||||
public interface PurchaseDemoEAIService extends DWService { | |||||
@EAIService(id = PurchaseUtil.DEMO_PURCHASE_DEMO_CREATE) | |||||
DWEAIResult create(Map<String, String> headers, String messageBody) throws Exception; | |||||
@EAIService(id = PurchaseUtil.DEMO_PURCHASE_DEMO_GET) | |||||
DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception; | |||||
@EAIService(id = PurchaseUtil.DEMO_PURCHASE_ORDER_ABNORMAL_UPDATE) | |||||
DWEAIResult abnormalUpdate(Map<String, String> headers, String messageBody) throws Exception; | |||||
@EAIService(id = PurchaseUtil.DEMO_PURCHASE_ORDER_UPDATE) | |||||
DWEAIResult purchaseOrderUpdate(Map<String, String> headers, String messageBody) throws Exception; | |||||
} |
@ -0,0 +1,52 @@ | |||||
package com.digiwin.athena.app.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.service.supplier.SupplierContactUtil; | |||||
import java.util.Map; | |||||
public interface SupplierContactInfoEAIService extends DWService { | |||||
/** | |||||
* 供应商联系人查询 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = SupplierContactUtil.DEMO_DATA_CONTACT_INFO_GET) | |||||
DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 供应商联系人新增 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = SupplierContactUtil.DEMO_DATA_CONTACT_INFO_CREATE) | |||||
DWEAIResult create(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 供应商联系人修改 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = SupplierContactUtil.DEMO_DATA_CONTACT_INFO_UPDATE) | |||||
DWEAIResult update(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 供应商联系人删除 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = SupplierContactUtil.DEMO_DATA_CONTACT_INFO_DELETE) | |||||
DWEAIResult delete(Map<String, String> headers, String messageBody) throws Exception; | |||||
} |
@ -0,0 +1,56 @@ | |||||
package com.digiwin.athena.app.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.service.supplier.SupplierUtil; | |||||
import java.util.Map; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/1 | |||||
*/ | |||||
public interface SupplierEAIService extends DWService { | |||||
/** | |||||
* 品号供应商修改 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = SupplierUtil.DEMO_ITEM_SUPPLIER_INFO_UPDATE) | |||||
DWEAIResult update(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 品号供应商获取 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = SupplierUtil.DEMO_ITEM_SUPPLIER_INFO_GET) | |||||
DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 品号供应商新增 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = SupplierUtil.DEMO_ITEM_SUPPLIER_INFO_CREATE) | |||||
DWEAIResult create(Map<String, String> headers, String messageBody) throws Exception; | |||||
/** | |||||
* 品号供应商删除 | |||||
* @param headers | |||||
* @param messageBody | |||||
* @return | |||||
* @throws Exception | |||||
*/ | |||||
@EAIService(id = SupplierUtil.DEMO_ITEM_SUPPLIER_INFO_DELETE) | |||||
DWEAIResult delete(Map<String, String> headers, String messageBody) throws Exception; | |||||
} |
@ -0,0 +1,40 @@ | |||||
package com.digiwin.athena.app.provider.impl; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.provider.FontSupplierEAIService; | |||||
import com.digiwin.athena.app.service.supplier.FontSupplierUtil; | |||||
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; | |||||
import javax.annotation.Resource; | |||||
import java.util.Map; | |||||
/** | |||||
* @auther: bk | |||||
* @date: 2023/9/1 | |||||
*/ | |||||
public class FontSupplierEAIServiceImpl implements FontSupplierEAIService { | |||||
@Resource | |||||
private EAIServiceContext eaiServiceContext; | |||||
@Override | |||||
public DWEAIResult update(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(FontSupplierUtil.DEMO_FONT_ITEM_SUPPLIER_INFO_UPDATE,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(FontSupplierUtil.DEMO_FONT_ITEM_SUPPLIER_INFO_GET,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult create(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(FontSupplierUtil.DEMO_FONT_ITEM_SUPPLIER_INFO_CREATE,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult delete(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(FontSupplierUtil.DEMO_FONT_ITEM_SUPPLIER_INFO_DELETE,headers,messageBody); | |||||
} | |||||
} |
@ -0,0 +1,44 @@ | |||||
package com.digiwin.athena.app.provider.impl; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.provider.ItemExecutorEAIService; | |||||
import com.digiwin.athena.app.service.executor.ExecutorUtil; | |||||
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; | |||||
import javax.annotation.Resource; | |||||
import java.util.Map; | |||||
/** | |||||
* @Author: xieps | |||||
* @Date: 2023/9/4 10:31 | |||||
* @Version 1.0 | |||||
* @Description | |||||
*/ | |||||
public class ItemExecutorEAIServiceImpl implements ItemExecutorEAIService { | |||||
@Resource | |||||
private EAIServiceContext eaiServiceContext; | |||||
@Override | |||||
public DWEAIResult itemExecutorInfoCreate(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ExecutorUtil.DEMO_ITEM_EXECUTOR_INFO_CREATE, headers, messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult itemExecutorInfoGet(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ExecutorUtil.DEMO_ITEM_EXECUTOR_INFO_GET, headers, messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult itemExecutorInfoDelete(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ExecutorUtil.DEMO_ITEM_EXECUTOR_INFO_DELETE, headers, messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult itemExecutorInfoUpdate(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ExecutorUtil.DEMO_ITEM_EXECUTOR_INFO_UPDATE, headers, messageBody); | |||||
} | |||||
} |
@ -0,0 +1,42 @@ | |||||
package com.digiwin.athena.app.provider.impl; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.provider.PurchaseDemoEAIService; | |||||
import com.digiwin.athena.app.service.purchase.PurchaseUtil; | |||||
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; | |||||
import javax.annotation.Resource; | |||||
import java.util.Map; | |||||
/** | |||||
* @author lz | |||||
* @version 1.0 | |||||
* @title PurchaseDemoEAIServiceImpl | |||||
* @description | |||||
* @create 2023/8/30 16:50 | |||||
*/ | |||||
public class PurchaseDemoEAIServiceImpl implements PurchaseDemoEAIService { | |||||
@Resource | |||||
private EAIServiceContext eaiServiceContext; | |||||
@Override | |||||
public DWEAIResult create(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(PurchaseUtil.DEMO_PURCHASE_DEMO_CREATE, headers, messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(PurchaseUtil.DEMO_PURCHASE_DEMO_GET, headers, messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult abnormalUpdate(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(PurchaseUtil.DEMO_PURCHASE_ORDER_ABNORMAL_UPDATE, headers, messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult purchaseOrderUpdate(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(PurchaseUtil.DEMO_PURCHASE_ORDER_UPDATE, headers, messageBody); | |||||
} | |||||
} |
@ -0,0 +1,41 @@ | |||||
package com.digiwin.athena.app.provider.impl; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.provider.SupplierContactInfoEAIService; | |||||
import com.digiwin.athena.app.service.supplier.SupplierContactUtil; | |||||
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; | |||||
import javax.annotation.Resource; | |||||
import java.util.Map; | |||||
/** | |||||
* @author CR-7 | |||||
* create: 2023-09-01 15:54 | |||||
* Description: | |||||
*/ | |||||
public class SupplierContactInfoEAIServiceImpl implements SupplierContactInfoEAIService { | |||||
@Resource | |||||
private EAIServiceContext eaiServiceContext; | |||||
@Override | |||||
public DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(SupplierContactUtil.DEMO_DATA_CONTACT_INFO_GET,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult create(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(SupplierContactUtil.DEMO_DATA_CONTACT_INFO_CREATE,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult update(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(SupplierContactUtil.DEMO_DATA_CONTACT_INFO_UPDATE,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult delete(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(SupplierContactUtil.DEMO_DATA_CONTACT_INFO_DELETE,headers,messageBody); | |||||
} | |||||
} |
@ -0,0 +1,40 @@ | |||||
package com.digiwin.athena.app.provider.impl; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.provider.SupplierEAIService; | |||||
import com.digiwin.athena.app.service.supplier.SupplierUtil; | |||||
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; | |||||
import javax.annotation.Resource; | |||||
import java.util.Map; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/1 | |||||
*/ | |||||
public class SupplierEAIServiceImpl implements SupplierEAIService { | |||||
@Resource | |||||
private EAIServiceContext eaiServiceContext; | |||||
@Override | |||||
public DWEAIResult update(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(SupplierUtil.DEMO_ITEM_SUPPLIER_INFO_UPDATE,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult get(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(SupplierUtil.DEMO_ITEM_SUPPLIER_INFO_GET,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult create(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(SupplierUtil.DEMO_ITEM_SUPPLIER_INFO_CREATE,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult delete(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(SupplierUtil.DEMO_ITEM_SUPPLIER_INFO_DELETE,headers,messageBody); | |||||
} | |||||
} |
@ -0,0 +1,131 @@ | |||||
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; | |||||
import java.util.Date; | |||||
/** | |||||
* cim_collection_detail | |||||
* | |||||
* @author zhenggl | |||||
* @date 2023-09-12 | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@Builder | |||||
@TableName(value = "cim_collection_detail", autoResultMap = true) | |||||
public class CollectionDetailEntity extends BaseMgrEntity<CollectionDetailEntity> | |||||
{ | |||||
/** 应收单号 */ | |||||
@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 = "amount_tax") | |||||
private BigDecimal amountTax; | |||||
/** 品号 */ | |||||
@SerializedName(value = "sku_code") | |||||
private String skuCode; | |||||
/** 品名 */ | |||||
@SerializedName(value = "sku_name") | |||||
private String skuName; | |||||
/** 规格 */ | |||||
@SerializedName(value = "sku_spec") | |||||
private String skuSpec; | |||||
/** 含税单价 */ | |||||
@SerializedName(value = "price_tax") | |||||
private BigDecimal priceTax; | |||||
/** 数量 */ | |||||
@SerializedName(value = "quantity") | |||||
private BigDecimal quantity; | |||||
/** 应收日期 */ | |||||
@SerializedName(value = "receivable_date") | |||||
private Date receivableDate; | |||||
/** 联系人 */ | |||||
@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 = "work_no") | |||||
private String workNo; | |||||
/** 生产主管 */ | |||||
@SerializedName(value = "produce_boss") | |||||
private String produceBoss; | |||||
/** 逾期天数 */ | |||||
@SerializedName(value = "overdue_days") | |||||
private String overdueDays; | |||||
/** 处理人 */ | |||||
@SerializedName(value = "processed_by") | |||||
private String processedBy; | |||||
/** 额度占用百分比 */ | |||||
@SerializedName(value = "quota_details") | |||||
private String quotaDetails; | |||||
} |
@ -0,0 +1,34 @@ | |||||
package com.digiwin.athena.app.ptc.infra.entity; | |||||
import com.baomidou.mybatisplus.annotation.TableName; | |||||
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/12 | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@Builder | |||||
@TableName(value = "cim_limit_credit", autoResultMap = true) | |||||
public class LimitCreditEntity { | |||||
/** 客户编号 */ | |||||
@SerializedName(value = "customer_no") | |||||
private String customerNo; | |||||
/** 客户名称 */ | |||||
@SerializedName(value = "customer_name") | |||||
private String customerName; | |||||
/** 信用额度 */ | |||||
@SerializedName(value = "limit_amount") | |||||
private BigDecimal limitAmount; | |||||
} |
@ -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; | |||||
} |
@ -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; | |||||
} |
@ -0,0 +1,118 @@ | |||||
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 | |||||
*/ | |||||
@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; | |||||
/** 限制金额 */ | |||||
@TableField(exist = false) | |||||
@SerializedName(value = "limit_amount") | |||||
private BigDecimal limitAmount; | |||||
} |
@ -0,0 +1,119 @@ | |||||
package com.digiwin.athena.app.ptc.infra.entity; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
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; | |||||
/** | |||||
* cim_production_details | |||||
* | |||||
* @author zhenggl | |||||
* @date 2023-09-12 | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@Builder | |||||
@TableName(value = "cim_production_details", autoResultMap = true) | |||||
public class ProductionDetailsEntity extends BaseMgrEntity<ProductionDetailsEntity> | |||||
{ | |||||
/** 工厂编号 */ | |||||
@SerializedName(value = "factory_no") | |||||
private String factoryNo; | |||||
/** 工厂名称 */ | |||||
@SerializedName(value = "factory_name") | |||||
private String factoryName; | |||||
/** 性质 */ | |||||
@SerializedName(value = "nature") | |||||
private String nature; | |||||
/** 预计产量 */ | |||||
@SerializedName(value = "expected_quantity") | |||||
private BigDecimal expectedQuantity; | |||||
/** 预计开工日期 */ | |||||
@SerializedName(value = "expected_commencement_date") | |||||
private Date expectedCommencementDate; | |||||
/** 预计完工日期 */ | |||||
@SerializedName(value = "estimated_completion_date") | |||||
private Date estimatedCompletionDate; | |||||
/** 生管人员 */ | |||||
@SerializedName(value = "production_management_person") | |||||
private String productionManagementPerson; | |||||
/** 生管部门 */ | |||||
@SerializedName(value = "production_management_department") | |||||
private String productionManagementDepartment; | |||||
/** 工单单号 */ | |||||
@SerializedName(value = "work_no") | |||||
private String workNo; | |||||
/** 状态 */ | |||||
@SerializedName(value = "production_status") | |||||
private String productionStatus; | |||||
/** 生产批号 */ | |||||
@SerializedName(value = "batch_no") | |||||
private String batchNo; | |||||
/** 品号 */ | |||||
@SerializedName(value = "sku_code") | |||||
private String skuCode; | |||||
/** 品名 */ | |||||
@SerializedName(value = "sku_name") | |||||
private String skuName; | |||||
/** 规格 */ | |||||
@SerializedName(value = "sku_spec") | |||||
private String skuSpec; | |||||
/** 单位 */ | |||||
@SerializedName(value = "unit") | |||||
private String unit; | |||||
/** 生产主管 */ | |||||
@SerializedName(value = "produce_boss") | |||||
private String produceBoss; | |||||
/** 逾期天数 */ | |||||
@SerializedName(value = "overdue_days") | |||||
private String overdueDays; | |||||
/** 额度占用百分比 */ | |||||
@SerializedName(value = "quota_details") | |||||
private String quotaDetails; | |||||
/** 冻结原因 */ | |||||
@SerializedName(value = "freeze_reason") | |||||
private String freezeReason; | |||||
/** 客户名称 */ | |||||
@SerializedName(value = "customer_name") | |||||
private String customerName; | |||||
/** 客户编号 */ | |||||
@SerializedName(value = "customer_no") | |||||
private String customerNo; | |||||
public ProductionDetailsEntity(String factoryNo, String factoryName, String productionManagementPerson) { | |||||
this.factoryNo = factoryNo; | |||||
this.factoryName = factoryName; | |||||
this.productionManagementPerson = productionManagementPerson; | |||||
} | |||||
} |
@ -0,0 +1,152 @@ | |||||
package com.digiwin.athena.app.ptc.infra.entity; | |||||
import java.math.BigDecimal; | |||||
import java.util.Date; | |||||
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; | |||||
/** | |||||
* cim_receivables_detail | |||||
* | |||||
* @author zhenggl | |||||
* @date 2023-09-12 | |||||
*/ | |||||
@Data | |||||
@AllArgsConstructor | |||||
@NoArgsConstructor | |||||
@Builder | |||||
@TableName(value = "cim_receivables_detail", autoResultMap = true) | |||||
public class ReceivablesDetailEntity extends BaseMgrEntity<ReceivablesDetailEntity> | |||||
{ | |||||
/** 应收单号 */ | |||||
@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 = "amount_tax") | |||||
private BigDecimal amountTax; | |||||
/** 品号 */ | |||||
@SerializedName(value = "sku_code") | |||||
private String skuCode; | |||||
/** 品名 */ | |||||
@SerializedName(value = "sku_name") | |||||
private String skuName; | |||||
/** 规格 */ | |||||
@SerializedName(value = "sku_spec") | |||||
private String skuSpec; | |||||
/** 含税单价 */ | |||||
@SerializedName(value = "price_tax") | |||||
private BigDecimal priceTax; | |||||
/** 数量 */ | |||||
@SerializedName(value = "quantity") | |||||
private BigDecimal quantity; | |||||
/** 应收日期 */ | |||||
@SerializedName(value = "receivable_date") | |||||
private Date receivableDate; | |||||
/** 联系人 */ | |||||
@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 = "work_no") | |||||
private String workNo; | |||||
/** 逾期天数 */ | |||||
@SerializedName(value = "overdue_days") | |||||
private String overdueDays; | |||||
/** 生产主管 */ | |||||
@SerializedName(value = "produce_boss") | |||||
private String produceBoss; | |||||
/** 限制金额 */ | |||||
@SerializedName(value = "limit_amount") | |||||
private BigDecimal limitAmount; | |||||
/** 邮箱 */ | |||||
@SerializedName(value = "email") | |||||
private String email; | |||||
/** 额度占用百分比 */ | |||||
@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.customerName = customerName; | |||||
this.contacts = contacts; | |||||
this.contactInformation = contactInformation; | |||||
this.priceTax = priceTax; | |||||
this.quantity = quantity; | |||||
this.amountTax = amountTax; | |||||
this.limitAmount = limitAmount; | |||||
this.receivableDate = receivableDate; | |||||
this.quotaDetails = quotaDetails; | |||||
} | |||||
public ReceivablesDetailEntity(String skuCode, String skuName, String skuSpec) { | |||||
this.skuCode = skuCode; | |||||
this.skuName = skuName; | |||||
this.skuSpec = skuSpec; | |||||
} | |||||
} |
@ -0,0 +1,18 @@ | |||||
<?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.CollectionDetailRepository"> | |||||
<delete id="deleteBatch"> | |||||
delete from cim_collection_detail where tenantsid=#{tenantSid} and | |||||
<foreach collection="list" item="item" index="index" separator=" or" open="" close=""> | |||||
( | |||||
sales_order = #{item.salesOrder} | |||||
and sales_order_number = #{item.salesOrderNumber} | |||||
) | |||||
</foreach> | |||||
</delete> | |||||
</mapper> |
@ -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> |
@ -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> |
@ -0,0 +1,17 @@ | |||||
<?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.ReceivablesDetailRepository"> | |||||
<delete id="deleteBatch"> | |||||
delete from cim_receivables_detail where tenantsid=#{tenantSid} and | |||||
<foreach collection="list" item="item" index="index" separator=" or" open="" close=""> | |||||
( | |||||
sales_order = #{item.salesOrder} | |||||
and sales_order_number = #{item.salesOrderNumber} | |||||
) | |||||
</foreach> | |||||
</delete> | |||||
</mapper> |
@ -0,0 +1,16 @@ | |||||
package com.digiwin.athena.app.ptc.infra.repository; | |||||
import com.digiwin.athena.app.ptc.infra.entity.CollectionDetailEntity; | |||||
import com.digiwin.athena.opt.persistence.repository.BaseRepository; | |||||
import org.apache.ibatis.annotations.Param; | |||||
import java.util.List; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public interface CollectionDetailRepository extends BaseRepository<CollectionDetailEntity> { | |||||
void deleteBatch(@Param("list") List<CollectionDetailEntity> list,@Param("tenantSid")Long tenantSid); | |||||
} |
@ -0,0 +1,11 @@ | |||||
package com.digiwin.athena.app.ptc.infra.repository; | |||||
import com.digiwin.athena.app.ptc.infra.entity.LimitCreditEntity; | |||||
import com.digiwin.athena.opt.persistence.repository.BaseRepository; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public interface LimitCreditRepository extends BaseRepository<LimitCreditEntity> { | |||||
} |
@ -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); | |||||
} |
@ -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> { | |||||
} |
@ -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> { | |||||
} |
@ -0,0 +1,11 @@ | |||||
package com.digiwin.athena.app.ptc.infra.repository; | |||||
import com.digiwin.athena.app.ptc.infra.entity.ProductionDetailsEntity; | |||||
import com.digiwin.athena.opt.persistence.repository.BaseRepository; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public interface ProductionDetailsRepository extends BaseRepository<ProductionDetailsEntity> { | |||||
} |
@ -0,0 +1,16 @@ | |||||
package com.digiwin.athena.app.ptc.infra.repository; | |||||
import com.digiwin.athena.app.ptc.infra.entity.CollectionDetailEntity; | |||||
import com.digiwin.athena.app.ptc.infra.entity.ReceivablesDetailEntity; | |||||
import com.digiwin.athena.opt.persistence.repository.BaseRepository; | |||||
import org.apache.ibatis.annotations.Param; | |||||
import java.util.List; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public interface ReceivablesDetailRepository extends BaseRepository<ReceivablesDetailEntity> { | |||||
void deleteBatch(@Param("list") List<CollectionDetailEntity> list, @Param("tenantSid")Long tenantSid); | |||||
} |
@ -0,0 +1,11 @@ | |||||
package com.digiwin.athena.app.ptc.infra.service; | |||||
import com.digiwin.athena.app.ptc.infra.entity.CollectionDetailEntity; | |||||
import com.digiwin.athena.opt.persistence.service.IBaseService; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public interface CollectionDetailService extends IBaseService<CollectionDetailEntity> { | |||||
} |
@ -0,0 +1,11 @@ | |||||
package com.digiwin.athena.app.ptc.infra.service; | |||||
import com.digiwin.athena.app.ptc.infra.entity.LimitCreditEntity; | |||||
import com.digiwin.athena.opt.persistence.service.IBaseService; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public interface LimitCreditService extends IBaseService<LimitCreditEntity> { | |||||
} |
@ -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>{ | |||||
} |
@ -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> { | |||||
} |
@ -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> { | |||||
} |
@ -0,0 +1,11 @@ | |||||
package com.digiwin.athena.app.ptc.infra.service; | |||||
import com.digiwin.athena.app.ptc.infra.entity.ProductionDetailsEntity; | |||||
import com.digiwin.athena.opt.persistence.service.IBaseService; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public interface ProductionDetailsService extends IBaseService<ProductionDetailsEntity> { | |||||
} |
@ -0,0 +1,11 @@ | |||||
package com.digiwin.athena.app.ptc.infra.service; | |||||
import com.digiwin.athena.app.ptc.infra.entity.ReceivablesDetailEntity; | |||||
import com.digiwin.athena.opt.persistence.service.IBaseService; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public interface ReceivablesDetailService extends IBaseService<ReceivablesDetailEntity> { | |||||
} |
@ -0,0 +1,15 @@ | |||||
package com.digiwin.athena.app.ptc.infra.service.impl; | |||||
import com.digiwin.athena.app.ptc.infra.entity.CollectionDetailEntity; | |||||
import com.digiwin.athena.app.ptc.infra.repository.CollectionDetailRepository; | |||||
import com.digiwin.athena.app.ptc.infra.service.CollectionDetailService; | |||||
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
@Service | |||||
public class CollectionDetailServiceImpl extends AbsBaseService<CollectionDetailRepository, CollectionDetailEntity> implements CollectionDetailService { | |||||
} |
@ -0,0 +1,15 @@ | |||||
package com.digiwin.athena.app.ptc.infra.service.impl; | |||||
import com.digiwin.athena.app.ptc.infra.entity.LimitCreditEntity; | |||||
import com.digiwin.athena.app.ptc.infra.repository.LimitCreditRepository; | |||||
import com.digiwin.athena.app.ptc.infra.service.LimitCreditService; | |||||
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
@Service | |||||
public class LimitCreditServiceImpl extends AbsBaseService<LimitCreditRepository, LimitCreditEntity> implements LimitCreditService { | |||||
} |
@ -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 { | |||||
} |
@ -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 { | |||||
} |
@ -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 { | |||||
} |
@ -0,0 +1,15 @@ | |||||
package com.digiwin.athena.app.ptc.infra.service.impl; | |||||
import com.digiwin.athena.app.ptc.infra.entity.ProductionDetailsEntity; | |||||
import com.digiwin.athena.app.ptc.infra.repository.ProductionDetailsRepository; | |||||
import com.digiwin.athena.app.ptc.infra.service.ProductionDetailsService; | |||||
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
@Service | |||||
public class ProductionDetailsServiceImpl extends AbsBaseService<ProductionDetailsRepository, ProductionDetailsEntity> implements ProductionDetailsService { | |||||
} |
@ -0,0 +1,15 @@ | |||||
package com.digiwin.athena.app.ptc.infra.service.impl; | |||||
import com.digiwin.athena.app.ptc.infra.entity.ReceivablesDetailEntity; | |||||
import com.digiwin.athena.app.ptc.infra.repository.ReceivablesDetailRepository; | |||||
import com.digiwin.athena.app.ptc.infra.service.ReceivablesDetailService; | |||||
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
@Service | |||||
public class ReceivablesDetailServiceImpl extends AbsBaseService<ReceivablesDetailRepository, ReceivablesDetailEntity> implements ReceivablesDetailService { | |||||
} |
@ -0,0 +1,10 @@ | |||||
package com.digiwin.athena.app.ptc.provider; | |||||
import com.digiwin.app.service.DWService; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public interface LimitCreditEAIService extends DWService { | |||||
} |
@ -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; | |||||
} |
@ -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; | |||||
} |
@ -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; | |||||
} |
@ -0,0 +1,25 @@ | |||||
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.production.ProductionUtil; | |||||
import java.util.Map; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public interface ProductionDetailsEAIService extends DWService { | |||||
@EAIService(id = ProductionUtil.PRODUCTION_TASK_GET) | |||||
DWEAIResult taskGet(Map<String, String> headers, String messageBody) throws Exception; | |||||
@EAIService(id = ProductionUtil.PRODUCTION_TASK_UPDATE) | |||||
DWEAIResult taskUpdate(Map<String, String> headers, String messageBody) throws Exception; | |||||
@EAIService(id = ProductionUtil.PRODUCTION_TASK_CREATE) | |||||
DWEAIResult taskCreate(Map<String, String> headers, String messageBody) throws Exception; | |||||
} |
@ -0,0 +1,30 @@ | |||||
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.receivables.ReceivablesUtil; | |||||
import java.util.Map; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public interface ReceivablesDetailEAIService extends DWService { | |||||
@EAIService(id = ReceivablesUtil.RECEIVABLES_TASK_GET) | |||||
DWEAIResult taskGet(Map<String, String> headers, String messageBody) throws Exception; | |||||
@EAIService(id = ReceivablesUtil.RECEIVABLES_TASK_CREATE) | |||||
DWEAIResult taskCreate(Map<String, String> headers, String messageBody) throws Exception; | |||||
@EAIService(id = ReceivablesUtil.RECEIVABLES_TASK_UPDATE) | |||||
DWEAIResult taskUpdate(Map<String, String> headers, String messageBody) throws Exception; | |||||
@EAIService(id = ReceivablesUtil.RECEIVABLES_INITIAL_CREATE) | |||||
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; | |||||
} |
@ -0,0 +1,16 @@ | |||||
package com.digiwin.athena.app.ptc.provider.impl; | |||||
import com.digiwin.athena.app.ptc.provider.LimitCreditEAIService; | |||||
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; | |||||
import javax.annotation.Resource; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public class LimitCreditEAIServiceImpl implements LimitCreditEAIService { | |||||
@Resource | |||||
private EAIServiceContext eaiServiceContext; | |||||
} |
@ -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); | |||||
} | |||||
} |
@ -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); | |||||
} | |||||
} |
@ -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); | |||||
} | |||||
} |
@ -0,0 +1,34 @@ | |||||
package com.digiwin.athena.app.ptc.provider.impl; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.ptc.provider.ProductionDetailsEAIService; | |||||
import com.digiwin.athena.app.ptc.service.production.ProductionUtil; | |||||
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; | |||||
import javax.annotation.Resource; | |||||
import java.util.Map; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public class ProductionDetailsEAIServiceImpl implements ProductionDetailsEAIService { | |||||
@Resource | |||||
private EAIServiceContext eaiServiceContext; | |||||
@Override | |||||
public DWEAIResult taskGet(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ProductionUtil.PRODUCTION_TASK_GET,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult taskUpdate(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ProductionUtil.PRODUCTION_TASK_UPDATE,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult taskCreate(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ProductionUtil.PRODUCTION_TASK_CREATE,headers,messageBody); | |||||
} | |||||
} |
@ -0,0 +1,44 @@ | |||||
package com.digiwin.athena.app.ptc.provider.impl; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.ptc.provider.ReceivablesDetailEAIService; | |||||
import com.digiwin.athena.app.ptc.service.receivables.ReceivablesUtil; | |||||
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; | |||||
import javax.annotation.Resource; | |||||
import java.util.Map; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
public class ReceivablesDetailEAIServiceImpl implements ReceivablesDetailEAIService { | |||||
@Resource | |||||
private EAIServiceContext eaiServiceContext; | |||||
@Override | |||||
public DWEAIResult taskGet(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ReceivablesUtil.RECEIVABLES_TASK_GET,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult taskCreate(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ReceivablesUtil.RECEIVABLES_TASK_CREATE,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult taskUpdate(Map<String, String> headers, String messageBody) throws Exception { | |||||
return eaiServiceContext.execute(ReceivablesUtil.RECEIVABLES_TASK_UPDATE,headers,messageBody); | |||||
} | |||||
@Override | |||||
public DWEAIResult initialCreate(Map<String, String> headers, String messageBody) throws Exception { | |||||
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); | |||||
} | |||||
} |
@ -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); | |||||
} | |||||
} |
@ -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<>()); | |||||
} | |||||
} |
@ -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); | |||||
} | |||||
} |
@ -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"; | |||||
} |
@ -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"; | |||||
} |
@ -0,0 +1,82 @@ | |||||
package com.digiwin.athena.app.ptc.service.paymentdetails; | |||||
import com.alibaba.nacos.common.utils.CollectionUtils; | |||||
import com.alibaba.nacos.common.utils.StringUtils; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.ptc.infra.entity.LimitCreditEntity; | |||||
import com.digiwin.athena.app.ptc.infra.entity.ReceivablesDetailEntity; | |||||
import com.digiwin.athena.app.ptc.infra.service.LimitCreditService; | |||||
import com.digiwin.athena.app.ptc.infra.service.ReceivablesDetailService; | |||||
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.List; | |||||
import java.util.Map; | |||||
import java.util.Objects; | |||||
import java.util.stream.Collectors; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/11 | |||||
*/ | |||||
@Service | |||||
@Log4j2 | |||||
public class ReceivablesGetEAIService extends AbsEAIService { | |||||
@Resource | |||||
private ReceivablesDetailService receivablesDetailService; | |||||
@Resource | |||||
private LimitCreditService limitCreditService; | |||||
@Override | |||||
public String getServiceName() { | |||||
return PaymentDetailsUtil.RECEIVABLES_GET; | |||||
} | |||||
@Override | |||||
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { | |||||
EAIRequest build = EAIRequest.build(messageBody); | |||||
String startTime = build.getString("start_datetime"); | |||||
String endTime = build.getString("end_datetime"); | |||||
LambdaQueryWrapper<ReceivablesDetailEntity> lmq = new LambdaQueryWrapper<>(); | |||||
lmq.eq(ReceivablesDetailEntity::getTenantSid, SecurityUtil.getUserProfile().getTenantSid()); | |||||
if (StringUtils.isNotEmpty(startTime)&&StringUtils.isNotEmpty(endTime)){ | |||||
lmq.gt(ReceivablesDetailEntity::getCreateDate,startTime); | |||||
lmq.le(ReceivablesDetailEntity::getCreateDate,endTime); | |||||
} | |||||
List<ReceivablesDetailEntity> list = receivablesDetailService.list(lmq); | |||||
if (CollectionUtils.isEmpty(list)){ | |||||
return buildOK("query_result",list); | |||||
} | |||||
//查询限制额度 | |||||
List<String> customerNoList = list.stream().map(ReceivablesDetailEntity::getCustomerNo).collect(Collectors.toList()); | |||||
LambdaQueryWrapper<LimitCreditEntity> creditLmq = new LambdaQueryWrapper<>(); | |||||
creditLmq.in(LimitCreditEntity::getCustomerNo,customerNoList); | |||||
List<LimitCreditEntity> limitCreditEntityList = limitCreditService.list(creditLmq); | |||||
if (CollectionUtils.isNotEmpty(limitCreditEntityList)){ | |||||
for (ReceivablesDetailEntity receivablesDetailEntity : list) { | |||||
for (LimitCreditEntity limitCreditEntity : limitCreditEntityList) { | |||||
if (Objects.nonNull(limitCreditEntity.getLimitAmount())&&receivablesDetailEntity.getCustomerNo().equals(limitCreditEntity.getCustomerNo())){ | |||||
receivablesDetailEntity.setLimitAmount(limitCreditEntity.getLimitAmount()); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
return buildOK("query_result",list); | |||||
} | |||||
} |
@ -0,0 +1,99 @@ | |||||
package com.digiwin.athena.app.ptc.service.production; | |||||
import com.alibaba.fastjson.TypeReference; | |||||
import com.alibaba.nacos.common.utils.CollectionUtils; | |||||
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.ProductionDetailsEntity; | |||||
import com.digiwin.athena.app.ptc.infra.entity.ReceivablesDetailEntity; | |||||
import com.digiwin.athena.app.ptc.infra.service.ProductionDetailsService; | |||||
import com.digiwin.athena.app.ptc.infra.service.ReceivablesDetailService; | |||||
import com.digiwin.athena.opt.common.eai.EAIRequest; | |||||
import com.digiwin.athena.opt.common.eai.service.AbsEAIService; | |||||
import org.apache.commons.lang.time.DateUtils; | |||||
import org.springframework.stereotype.Service; | |||||
import javax.annotation.Resource; | |||||
import java.util.*; | |||||
import java.util.stream.Collectors; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
@Service | |||||
public class ProductionCreateEAIService extends AbsEAIService { | |||||
@Resource | |||||
private ProductionDetailsService productionDetailsService; | |||||
@Resource | |||||
private ReceivablesDetailService receivablesDetailService; | |||||
@Override | |||||
public String getServiceName() { | |||||
return ProductionUtil.PRODUCTION_TASK_CREATE; | |||||
} | |||||
//随机赋值list | |||||
private List<ProductionDetailsEntity> list = Arrays.asList( | |||||
new ProductionDetailsEntity("001", "一号工厂", "一号工厂刘晓鹏"), | |||||
new ProductionDetailsEntity("002", "二号工厂", "二号工厂饶文豪"), | |||||
new ProductionDetailsEntity("003", "三号工厂", "三号工厂卢人辅")); | |||||
@Override | |||||
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { | |||||
EAIRequest eaiRequest = EAIRequest.build(messageBody); | |||||
List<ProductionDetailsEntity> productionDetailsEntities = eaiRequest.getObject("get_data", new TypeReference<List<ProductionDetailsEntity>>() { | |||||
}); | |||||
//根据工单单号查询应收表 | |||||
List<String> woNoList = productionDetailsEntities.stream().map(ProductionDetailsEntity::getWorkNo).collect(Collectors.toList()); | |||||
LambdaQueryWrapper<ReceivablesDetailEntity> receivablesLmq = new LambdaQueryWrapper(); | |||||
receivablesLmq.in(ReceivablesDetailEntity::getWorkNo, woNoList); | |||||
List<ReceivablesDetailEntity> receivablesDetailEntities = receivablesDetailService.list(receivablesLmq); | |||||
Random random = new Random(); | |||||
//默认赋值 | |||||
Integer batchNo = 1; | |||||
for (ProductionDetailsEntity productionDetailsEntity : productionDetailsEntities) { | |||||
int randomNumber = random.nextInt(3); | |||||
int nature = random.nextInt(2)+1; | |||||
productionDetailsEntity.setFactoryNo(this.list.get(randomNumber).getFactoryNo()); | |||||
productionDetailsEntity.setFactoryName(this.list.get(randomNumber).getFactoryName()); | |||||
productionDetailsEntity.setProductionManagementPerson(this.list.get(randomNumber).getProductionManagementPerson()); | |||||
productionDetailsEntity.setProductionManagementDepartment("生管一部"); | |||||
productionDetailsEntity.setProduceBoss("23467345221"); | |||||
productionDetailsEntity.setProductionStatus(TabStatusEnums.PENDING.getValue().toString()); | |||||
productionDetailsEntity.setNature(String.valueOf(nature)); | |||||
productionDetailsEntity.setBatchNo("MMDD-000"+batchNo); | |||||
productionDetailsEntity.setUnit("pcs"); | |||||
productionDetailsEntity.setFreezeReason("剩余信用额度比例不足"); | |||||
batchNo = batchNo+1; | |||||
//预计产量赋值 | |||||
if (CollectionUtils.isNotEmpty(receivablesDetailEntities)) { | |||||
for (ReceivablesDetailEntity receivablesDetailEntity : receivablesDetailEntities) { | |||||
productionDetailsEntity.setExpectedQuantity(receivablesDetailEntity.getQuantity()); | |||||
//取应收日期前后5天 | |||||
productionDetailsEntity.setExpectedCommencementDate(DateUtils.addDays(receivablesDetailEntity.getReceivableDate(), random.nextInt(11) - 5)); | |||||
//取预计开工日期后5-10天 | |||||
productionDetailsEntity.setEstimatedCompletionDate(DateUtils.addDays(productionDetailsEntity.getExpectedCommencementDate(), random.nextInt(6) + 5)); | |||||
productionDetailsEntity.setSkuCode(receivablesDetailEntity.getSkuCode()); | |||||
productionDetailsEntity.setSkuName(receivablesDetailEntity.getSkuName()); | |||||
productionDetailsEntity.setSkuSpec(receivablesDetailEntity.getSkuSpec()); | |||||
} | |||||
} | |||||
} | |||||
productionDetailsService.saveBatch(productionDetailsEntities); | |||||
return buildOK(); | |||||
} | |||||
} |
@ -0,0 +1,59 @@ | |||||
package com.digiwin.athena.app.ptc.service.production; | |||||
import com.alibaba.fastjson.TypeReference; | |||||
import com.alibaba.nacos.common.utils.StringUtils; | |||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | |||||
import com.digiwin.app.container.exceptions.DWBusinessException; | |||||
import com.digiwin.app.service.DWEAIResult; | |||||
import com.digiwin.athena.app.infra.common.enums.TabStatusEnums; | |||||
import com.digiwin.athena.app.ptc.infra.entity.ProductionDetailsEntity; | |||||
import com.digiwin.athena.app.ptc.infra.service.ProductionDetailsService; | |||||
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.List; | |||||
import java.util.Map; | |||||
import java.util.stream.Collectors; | |||||
/** | |||||
* @auther: zhenggl | |||||
* @date: 2023/9/12 | |||||
*/ | |||||
@Service | |||||
@Log4j2 | |||||
public class ProductionTasUpdateEAIService extends AbsEAIService { | |||||
@Resource | |||||
private ProductionDetailsService productionDetailsService; | |||||
@Override | |||||
public String getServiceName() { | |||||
return ProductionUtil.PRODUCTION_TASK_UPDATE; | |||||
} | |||||
@Override | |||||
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { | |||||
//根据bk更新状态为已完成 | |||||
EAIRequest eaiRequest = EAIRequest.build(messageBody); | |||||
List<ProductionDetailsEntity> productionDetailsEntities = eaiRequest.getObject("get_data", new TypeReference<List<ProductionDetailsEntity>>() {}); | |||||
for (ProductionDetailsEntity productionDetailsEntity : productionDetailsEntities) { | |||||
if (StringUtils.isEmpty(productionDetailsEntity.getWorkNo())){ | |||||
throw new DWBusinessException("缺少必填参数"); | |||||
} | |||||
} | |||||
LambdaUpdateWrapper<ProductionDetailsEntity> ump = new LambdaUpdateWrapper<>(); | |||||
ump.set(ProductionDetailsEntity::getProductionStatus, TabStatusEnums.COMPLETED.getValue().toString()); | |||||
List<String> woNoList = productionDetailsEntities.stream().map(ProductionDetailsEntity::getWorkNo).collect(Collectors.toList()); | |||||
ump.in(ProductionDetailsEntity::getWorkNo,woNoList); | |||||
productionDetailsService.update(ump); | |||||
return buildOK(); | |||||
} | |||||
} |