提交委外流程、采购流程优化、删除与项目无关的代码

This commit is contained in:
liuy 2024-08-27 15:40:25 +08:00
parent e1f5db92ed
commit e8b79e4074
62 changed files with 1331 additions and 4212 deletions

View File

@ -1,15 +0,0 @@
package com.hzya.frame.plugin.a8bill.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
/**
* 组织档案(mdm_org: table)表数据库访问层
*
* @author makejava
* @since 2024-06-07 18:30:04
*/
public interface IPayBillDao extends IBaseDao<PayBillEntity, String> {
}

View File

@ -1,16 +0,0 @@
package com.hzya.frame.plugin.a8bill.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.plugin.a8bill.dao.IPayBillDao;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
/**
* 组织档案(MdmOrg)表数据库访问层
*
* @author makejava
* @since 2024-06-07 18:30:04
*/
public class PayBillDaoImpl extends MybatisGenericDao<PayBillEntity, String> implements IPayBillDao {
}

View File

@ -1,14 +0,0 @@
package com.hzya.frame.plugin.a8bill.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 付款单
*
* @author makejava
* @since 2024-06-07 18:30:04
*/
public class PayBillEntity extends BaseEntity {
}

View File

@ -1,16 +0,0 @@
<?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.hzya.frame.plugin.a8bill.dao.impl.PayBillDaoImpl">
<resultMap id="get-PayBillEntity-result" type="com.hzya.frame.plugin.a8bill.entity.PayBillEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "PayBillEntity_Base_Column_List">
id
</sql>
</mapper>

View File

@ -1,63 +0,0 @@
package com.hzya.frame.plugin.a8bill.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.seeyon.paybill.service.IPayBillService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* 付款单(PayBill)表服务接口
*
* @author makejava
* @since 2024-06-07 18:30:05
*/
public class PayBillPluginInitializer extends PluginBaseEntity{
Logger logger = LoggerFactory.getLogger(PayBillPluginInitializer.class);
@Autowired
private IPayBillService payBillService;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
@Override
public String getPluginId() {
return "PayBillPlugin";
}
@Override
public String getPluginName() {
return "PayBillPlugin插件";
}
@Override
public String getPluginLabel() {
return "PayBillPlugin";
}
@Override
public String getPluginType() {
return "1";
}
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) {
try {
logger.info("======开始执行付款单据信息同步========");
return payBillService.sendEngineerPayBillToBip(requestJson);
}catch (Exception e){
logger.info("======执行付款单据同步失败:{}========",e.getMessage());
e.printStackTrace();
}
return null;
}
}

View File

@ -1,63 +0,0 @@
package com.hzya.frame.plugin.a8bill.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.seeyon.paybill.service.IPayBillService;
import com.hzya.frame.seeyon.recbill.service.IRecBillService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* 收款单(RecBill)表服务接口
*
* @author makejava
* @since 2024-06-07 18:30:05
*/
public class RecBillPluginInitializer extends PluginBaseEntity{
Logger logger = LoggerFactory.getLogger(RecBillPluginInitializer.class);
@Autowired
private IRecBillService recBillService;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
@Override
public String getPluginId() {
return "RecBillPluginInitializer";
}
@Override
public String getPluginName() {
return "RecBillPluginInitializer插件";
}
@Override
public String getPluginLabel() {
return "RecBillPluginInitializer";
}
@Override
public String getPluginType() {
return "1";
}
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) {
try {
logger.info("======开始执行收款单据信息同步========");
return recBillService.sendRecBillToBip(requestJson);
}catch (Exception e){
logger.info("======执行收款单据同步失败:{}========",e.getMessage());
e.printStackTrace();
}
return null;
}
}

View File

@ -1,13 +0,0 @@
package com.hzya.frame.plugin.a8bill.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
/**
* 付款单
*
* @author makejava
* @since 2024-06-07 18:30:05
*/
public interface IPayBillService extends IBaseService<PayBillEntity, String>{
}

View File

@ -1,22 +0,0 @@
package com.hzya.frame.plugin.a8bill.service.impl;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
import com.hzya.frame.plugin.a8bill.service.IPayBillService;
/**
* private IMdmOrgDao mdmOrgDao;
*
* @Autowired
* public void setMdmOrgDao(IMdmOrgDao dao) {
* this.mdmOrgDao = dao;
* this.dao = dao;
* }
*
* @author makejava
* @since 2024-06-07 18:30:05
*/
public class PayBillServiceImpl extends BaseService<PayBillEntity, String> implements IPayBillService {
}

View File

@ -1,114 +0,0 @@
package com.hzya.frame.plugin.cbs8.plugin;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.cbs8.dto.req.AgentPayResultRequestDTO;
import com.hzya.frame.cbs8.dto.res.AgentPayQueryDTO;
import com.hzya.frame.cbs8.dto.res.AgentPayResultResDTO;
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/18 17:22
**/
public class AgentPayResultPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(AgentPayResultPluginInitializer.class);
@Autowired
private ICbsPluginService cbsPluginService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "CBS8AgentPayResultPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "cbs8代发代扣详情查询插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "cbs8代发代扣详情查询插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
//1查询代发代扣交易未完成代
//2调用cbs接口
AgentPayResultRequestDTO agentPayResultRequestDTO = new AgentPayResultRequestDTO();
agentPayResultRequestDTO.setBusNum("PA00034224062600011");
AgentPayResultResDTO agentPayResultResDTO = cbsPluginService.agentPayResult(agentPayResultRequestDTO);
//记录日志
return null;
}
}

View File

@ -1,101 +0,0 @@
package com.hzya.frame.plugin.cbs8.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description 电子回单定时任务
* @Author xiangerlin
* @Date 2024/6/17 14:03
**/
public class ElecBillPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private ICbsPluginService cbsPluginService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "CBS8ElecBillPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "cbs8电子回单插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "cbs8电子回单插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
cbsPluginService.elecBillUpload(requestJson);
return null;
}
}

View File

@ -1,116 +0,0 @@
package com.hzya.frame.plugin.cbs8.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.cbs8.dto.res.PayResponseDTO;
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/18 14:03
**/
public class PayApplyAgentPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(PayApplyAgentPluginInitializer.class);
@Autowired
private ICbsPluginService cbsPluginService;
@Autowired
private IAgentPaymentService agentPaymentService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "CBS8PayApplyAgentPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "cbs8代发代扣插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "cbs8代发代扣插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
//1查询代支付的
AgentPaymentEntity agentPaymentEntity = new AgentPaymentEntity();
agentPaymentEntity.setOaId("4442823497745714629");
cbsPluginService.applyAgentPay(agentPaymentEntity);
return null;
}
}

View File

@ -1,112 +0,0 @@
package com.hzya.frame.plugin.cbs8.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description 经办支付申请
* @Author xiangerlin
* @Date 2024/6/7 13:42
**/
public class PayApplyPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(PayApplyPluginInitializer.class);
@Autowired
private ICbsPluginService cbsPluginService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "CBS8PayApplyPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "cbs8支付申请插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "cbs8支付申请插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
PaymentEntity paymentEntity = null;
if (null != requestJson){
requestJson.remove("jsonStr");
paymentEntity = JSONObject.parseObject(requestJson.toString(),PaymentEntity.class);
}
if (null == paymentEntity)
paymentEntity = new PaymentEntity();
//支付申请
paymentEntity.setOaId("8475071606892874568");
cbsPluginService.applyPay(paymentEntity);
return null;
}
}

View File

@ -1,110 +0,0 @@
package com.hzya.frame.plugin.cbs8.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description 查询支付结果
* @Author xiangerlin
* @Date 2024/6/14 16:24
**/
public class PayResultPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(PayResultPluginInitializer.class);
@Autowired
private ICbsPluginService cbsPluginService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "CBS8PayResultPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "cbs8支付结果查询插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "cbs8支付结果查询插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
CbsLogEntity cbsLogEntity = null;
if (null != requestJson){
requestJson.remove("jsonStr");
cbsLogEntity = JSONObject.parseObject(requestJson.toString(),CbsLogEntity.class);
}
if (null == cbsLogEntity){
cbsLogEntity = new CbsLogEntity();
}
cbsPluginService.queryResult(cbsLogEntity);
return null;
}
}

View File

@ -1,126 +0,0 @@
package com.hzya.frame.plugin.cbs8.plugin;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.cbs8.dto.req.TransactionDetailReqDTO;
import com.hzya.frame.cbs8.dto.res.TransactionDetailDTO;
import com.hzya.frame.cbs8.util.CBSUtil;
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @Description 交易明细查询
* @Author xiangerlin
* @Date 2024/6/17 16:03
**/
public class TransactionDetailPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private ICbsPluginService cbsPluginService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "CBS8TransactionDetailQueryPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "cbs8交易明细查询插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "cbs8交易明细查询插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
TransactionDetailReqDTO transactionDetailReqDTO = null;
if (null != requestJson){
requestJson.remove("jsonStr");
transactionDetailReqDTO = JSONObject.parseObject(requestJson.toString(),TransactionDetailReqDTO.class);
}
if (null == transactionDetailReqDTO){
transactionDetailReqDTO = new TransactionDetailReqDTO();
}
transactionDetailReqDTO.setCurrentPage(CBSUtil.DEFAULT_CURRENT_PAGE);
transactionDetailReqDTO.setPageSize(CBSUtil.DEFAULT_PAGE_SIZE);
transactionDetailReqDTO.setStartDate(DateUtil.today());
transactionDetailReqDTO.setEndDate(DateUtil.today());
transactionDetailReqDTO.setDateType("0");
transactionDetailReqDTO.setLoanType("2");
//1查询交易明细
List<TransactionDetailDTO> transactionDetailList = cbsPluginService.queryTransactionDetail(transactionDetailReqDTO);
//保存交易明细到OA底表
cbsPluginService.saveTransactionDetail(transactionDetailList);
return new JsonResultEntity("成功",true,transactionDetailList);
//return null;
}
}

View File

@ -1,76 +0,0 @@
package com.hzya.frame.plugin.cbs8.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.cbs8.dto.req.AgentPayResultRequestDTO;
import com.hzya.frame.cbs8.dto.req.TransactionDetailReqDTO;
import com.hzya.frame.cbs8.dto.res.AgentPayResultResDTO;
import com.hzya.frame.cbs8.dto.res.PayResponseDTO;
import com.hzya.frame.cbs8.dto.res.TransactionDetailDTO;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import java.util.List;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/17 08:46
**/
public interface ICbsPluginService {
/**
* 支付申请
* @param entity
*/
void applyPay(PaymentEntity entity)throws Exception;
/**
* 保存支付申请日志
* @param entity
* @throws Exception
*/
void savePayLog(PaymentEntity entity,PayResponseDTO payResponseDTO)throws Exception;
/**
* 查询支付申请的交易结果
* @param cbsLogEntity
* @throws Exception
*/
void queryResult(CbsLogEntity cbsLogEntity)throws Exception;
/**
* 电子回单查询 并上传OA
* @param requestJson
* @throws Exception
*/
void elecBillUpload(JSONObject requestJson)throws Exception;
/**
* 查询交易明细
* transactionDetailReqDTO.currentPage transactionDetailReqDTO.pageSize 必填
* @param transactionDetailReqDTO
*/
List<TransactionDetailDTO> queryTransactionDetail(TransactionDetailReqDTO transactionDetailReqDTO);
/**
* 代发代扣 支付申请
* @param paymentEntity
*/
void applyAgentPay(AgentPaymentEntity paymentEntity);
/**
* 代发代扣 结果详情查询
* @param agentPayResultRequestDTO
* @return
*/
AgentPayResultResDTO agentPayResult(AgentPayResultRequestDTO agentPayResultRequestDTO);
/**
* 保存交易明细到OA底表
* @param transactionDetailList
*/
void saveTransactionDetail(List<TransactionDetailDTO> transactionDetailList);
}

View File

@ -1,513 +0,0 @@
package com.hzya.frame.plugin.cbs8.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.hzya.frame.cbs8.dto.req.*;
import com.hzya.frame.cbs8.dto.res.*;
import com.hzya.frame.cbs8.service.ICbs8Service;
import com.hzya.frame.cbs8.util.CBSUtil;
import com.hzya.frame.cbs8.util.CurrencyEnum;
import com.hzya.frame.cbs8.util.PayState;
import com.hzya.frame.plugin.cbs8.service.ICbsPluginService;
import com.hzya.frame.seeyon.cap4.form.dto.*;
import com.hzya.frame.seeyon.cbs8.entity.*;
import com.hzya.frame.seeyon.cbs8.service.*;
import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
import com.hzya.frame.seeyon.entity.CtpFileEntity;
import com.hzya.frame.seeyon.service.ICtpAttachmentService;
import com.hzya.frame.seeyon.util.RestUtil;
import com.hzya.frame.uuid.UUIDLong;
import com.hzya.frame.web.exception.BaseSystemException;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/17 08:46
**/
public class CbsPluginServiceImpl implements ICbsPluginService {
Logger logger = LoggerFactory.getLogger(CbsPluginServiceImpl.class);
@Autowired
private ICbs8Service cbs8Service;
@Autowired
private IPaymentService paymentService;
@Autowired
private ICbsLogService cbsLogService;
@Autowired
private ICtpAttachmentService ctpAttachmentService;
@Autowired
private ITransactionDetailService transactionDetailService;
@Autowired
private IAgentPaymentService agentPaymentService;
@Autowired
private IAgentPaymentDetailService agentPaymentDetailService;
@Autowired
private RestUtil restUtil;
@Value("${cbs8.elec_path}")
private String elec_path;
@Value("${OA.data_source_code}")
private String oa_data_source_code;
/**
* 支付申请
*
* @param paymentEntity
*/
@Override
public void applyPay(PaymentEntity paymentEntity) throws Exception{
//查询待支付的列表
if (null == paymentEntity){
paymentEntity = new PaymentEntity();
}
paymentEntity.setDataSourceCode(oa_data_source_code);
List<PaymentEntity> paymentList = paymentService.queryUnpaid(paymentEntity);
/* List<PaymentEntity> paymentList = new ArrayList<>();
paymentEntity.setReferenceNum("CL202406140001");
paymentEntity.setPayAccount("655905707410000");
paymentEntity.setPayBankName("");
paymentEntity.setAmount("99");
paymentEntity.setRevAccount("123456778");
paymentEntity.setRevBankName("中国工商银行总行清算中心");
paymentEntity.setRevBankType("ICB");
paymentEntity.setRevAccountName("测试账户");
paymentEntity.setCnapsCode("102100099996");
paymentEntity.setPurpose("测试用途");
paymentEntity.setBusType("202");
paymentEntity.setCurrency("10");
paymentEntity.setPurpose("测试用途");
paymentList.add(paymentEntity);*/
if (CollectionUtils.isNotEmpty(paymentList)){
for (PaymentEntity pay : paymentList) {
//调用支付申请接口
PayResponseDTO payResponseDTO = cbs8Service.payApply(pay);
boolean successed = payResponseDTO.getSuccessed();
if (successed){
pay.setPayResult(PayState.p.getValue());
}else {
pay.setPayResult("推送失败");
}
//4更新OA表单
pay.setDataSourceCode(oa_data_source_code);
pay.setApplyCode(payResponseDTO.getBusNum());
paymentService.updatePayState(pay);
//5记录操作日志
savePayLog(pay,payResponseDTO);
}
}
}
/**
* 保存支付申请日志
*
* @param entity
* @throws Exception
*/
@Override
public void savePayLog(PaymentEntity entity,PayResponseDTO payResponseDTO) throws Exception {
//4. 保存日志
CbsLogEntity cbsLogEntity = new CbsLogEntity();
cbsLogEntity.setTitle(entity.getTitle());
cbsLogEntity.setPay_company(entity.getPayCompany());
cbsLogEntity.setPayee(entity.getRevAccountName());
cbsLogEntity.setAmount(entity.getAmount());
cbsLogEntity.setOa_id(entity.getOaId());
cbsLogEntity.setBill_code(Convert.toStr(entity.getReferenceNumNew(),entity.getReferenceNum()));
cbsLogEntity.setTab_name_ch(entity.getBillName());
cbsLogEntity.setTab_name_en(entity.getTableName());
Boolean successed = payResponseDTO.getSuccessed();
if (successed){
cbsLogEntity.setPay_state(PayState.p.getValue());
cbsLogEntity.setApply_state(PayState.two.getValue());
cbsLogEntity.setCbs_apply_code(payResponseDTO.getBusNum());
cbsLogEntity.setSuccessed("true");
entity.setPayResult(PayState.p.getValue());
}else {
cbsLogEntity.setPay_state("推送失败");
cbsLogEntity.setMessage(payResponseDTO.getErrorMsg());
cbsLogEntity.setSuccessed("false");
entity.setPayResult("推送失败");
}
cbsLogService.saveLog(cbsLogEntity);
}
/**
* 查询支付申请的交易结果
*
* @param cbsLogEntity
* @throws Exception
*/
@Override
public void queryResult(CbsLogEntity cbsLogEntity) throws Exception {
if (null == cbsLogEntity){
cbsLogEntity = new CbsLogEntity();
}
cbsLogEntity.setDataSourceCode(oa_data_source_code);
// 1查询支付中的日志
List<CbsLogEntity> inPayList = cbsLogService.queryInPayment(cbsLogEntity);
if (CollectionUtils.isNotEmpty(inPayList)){
for (CbsLogEntity entity : inPayList) {
try {
List<PayResultResDTO> payResultResList = cbs8Service.queryPayResult(new PayResultRequestDTO(entity.getBill_code()));
if (CollectionUtils.isNotEmpty(payResultResList)){
PayResultResDTO payResultResDTO = payResultResList.get(0);
//支付申请状态
String status = payResultResDTO.getStatus();
//支付状态
String pay_status = payResultResDTO.getPayStatus();
//不等于支付中的时候 更新支付状态
if (!PayState.p.getType().equals(pay_status)){
//如果支付状态为空保存支付申请状态如果支付状态不为空则保存支付状态
PaymentEntity paymentEntity = new PaymentEntity();
paymentEntity.setOaId(entity.getOa_id());
paymentEntity.setApplyCode(entity.getCbs_apply_code());
paymentEntity.setDataSourceCode(oa_data_source_code);
List<PaymentEntity> paymentList = paymentService.query(paymentEntity);
if (CollectionUtils.isNotEmpty(paymentList)){
paymentEntity = paymentList.get(0);
if (StrUtil.isEmpty(pay_status)) {
//支付申请状态 支付状态和支付申请状态用一个
paymentEntity.setPayResult(PayState.payStateGetValue(status));
} else {
//支付状态 支付状态和支付申请状态用一个
paymentEntity.setPayResult(PayState.payStateGetValue(pay_status));
}
if (StrUtil.isNotEmpty(pay_status) && pay_status.equals(PayState.g.getType())) {
//支付时间
paymentEntity.setPayDate(CBSUtil.convertTimestampToString(payResultResDTO.getPayDate()));
}
//更新视图单据状态
paymentEntity.setDataSourceCode(oa_data_source_code);
paymentService.updatePayState(paymentEntity);
//更新日志表状态
entity.setPay_state(paymentEntity.getPayResult());
entity.setApply_state(PayState.payStateGetValue(status));
entity.setDataSourceCode(oa_data_source_code);
cbsLogService.updateLog(entity);
}
}
}
}catch (Exception e){
e.printStackTrace();
logger.error("查询交易结果出错",e);
}
}
}
}
/**
* 电子回单查询 并上传OA
*
* @param requestJson
* @throws Exception
*/
@Override
public void elecBillUpload(JSONObject requestJson) throws Exception {
//查询支付成功 没有电子回单的数据
PaymentEntity paymentEntity = new PaymentEntity();
// List<PaymentEntity> paymentList = paymentService.queryElecIsNull(paymentEntity);
paymentEntity.setPayDate("2024-06-20");
paymentEntity.setReferenceNum("41");
List<PaymentEntity> paymentList = Arrays.asList(paymentEntity);
if (CollectionUtils.isNotEmpty(paymentList)) {
for (PaymentEntity pay : paymentList) {
try {
String payDate = DateUtil.format(DateUtil.parse(pay.getPayDate()), "yyyy-MM-dd");
//查询cbs电子回单
List<ElecResponseDTO> elecResList = cbs8Service.queryElecBill(new ElecRequestDTO(payDate,DateUtil.today(),pay.getReferenceNum()));
if (CollectionUtils.isNotEmpty(elecResList)){
ElecResponseDTO elecResponseDTO = elecResList.get(0);
String bucketFileUrl = elecResponseDTO.getBucketFileUrl();
String bucketFileName = elecResponseDTO.getBucketFileName();
//上传电子回单到OA
HttpUtil.downloadFile(bucketFileUrl, FileUtil.file(elec_path));//附件下载
String pdfUrl = elec_path + bucketFileName;
File file = new File(pdfUrl);
if (file.exists()) {
CtpFileEntity cpFileEntity = new CtpFileEntity();
cpFileEntity.setFile(file);
cpFileEntity.setDataSourceCode(oa_data_source_code);
JSONObject jsonObjectUpload = restUtil.fileUpload(file,"8000240005");
String file_url = jsonObjectUpload.getString("fileUrl");
if (null != jsonObjectUpload && StrUtil.isNotEmpty(file_url)) {
String sub_reference = String.valueOf(UUIDLong.longUUID());
pay.setReceipt(sub_reference);
//更新表单的电子回单值
paymentService.updateElec(pay);
//保存附件关系
CtpAttachmentEntity ctpAttachmentEntity = new CtpAttachmentEntity();
ctpAttachmentEntity.setFile_url(file_url);
ctpAttachmentService.saveAttachment(file_url, pay.getSummaryId(), sub_reference);
}
//删除本地临时文件
file.delete();
}
}
}catch (Exception e){
logger.error("电子回单查询出错",e);
}
}
}
}
/**
* 查询交易明细
* transactionDetailReqDTO.currentPage transactionDetailReqDTO.pageSize 必填
* @param transactionDetailReqDTO
*/
@Override
public List<TransactionDetailDTO> queryTransactionDetail(TransactionDetailReqDTO transactionDetailReqDTO) {
boolean hasNextPage = true;//是否有下一页
int currentPage = transactionDetailReqDTO.getCurrentPage();
int pageSize = transactionDetailReqDTO.getPageSize();
if (currentPage == 0){
currentPage = CBSUtil.DEFAULT_CURRENT_PAGE;//页码
}
if (pageSize == 0){
pageSize = CBSUtil.DEFAULT_PAGE_SIZE;//每页条数
transactionDetailReqDTO.setPageSize(pageSize);
}
List<TransactionDetailDTO> resultList = new ArrayList<>();
do{
transactionDetailReqDTO.setCurrentPage(currentPage);//页码
currentPage++;//页码自增
hasNextPage = false;//保护功能防止出现死循环
CbsResDataDTO dataDTO = cbs8Service.queryTransactionDetail(transactionDetailReqDTO);
if (null != dataDTO){
hasNextPage = dataDTO.getHasNextPage();
List<TransactionDetailDTO> transactionDetailDTOList = CBSUtil.convertJsonArrayToList(dataDTO.getList(), TransactionDetailDTO.class);
resultList.addAll(transactionDetailDTOList);
}
}while (hasNextPage);
return resultList;
}
/**
* 代发代扣 支付申请
*
* @param paymentEntity
*/
@Override
public void applyAgentPay(AgentPaymentEntity paymentEntity) {
try {
if (null != paymentEntity ){
paymentEntity.setDataSourceCode(oa_data_source_code);
List<AgentPaymentEntity> agentPaymentList = agentPaymentService.queryUnpaid(paymentEntity);
if (CollectionUtils.isNotEmpty(agentPaymentList)){
for (AgentPaymentEntity agentPay : agentPaymentList) {
AgentPaymentDetailEntity detailEntity = new AgentPaymentDetailEntity();
detailEntity.setFormmainId(agentPay.getOaId());
detailEntity.setDataSourceCode(oa_data_source_code);
List<AgentPaymentDetailEntity> agentPaymentDetailList = agentPaymentService.queryDetails(detailEntity);
if (CollectionUtils.isNotEmpty(agentPaymentDetailList)){
PaymentApplySubmitReqDTO paymentApplySubmitReqDTO = BeanUtil.copyProperties(agentPay,PaymentApplySubmitReqDTO.class);
List<PaymentApplyAgentDTO> paymentApplyAgentList = new ArrayList<>();
for (AgentPaymentDetailEntity detail : agentPaymentDetailList) {
PaymentApplyAgentDTO detailDTO = BeanUtil.copyProperties(detail,PaymentApplyAgentDTO.class);
paymentApplyAgentList.add(detailDTO);
}
//招行这里要传203
paymentApplySubmitReqDTO.setBankExtend5("203");
PayResponseDTO payResponseDTO = cbs8Service.agentPayApply(paymentApplySubmitReqDTO,paymentApplyAgentList);
if (null != payResponseDTO){
Boolean successed = payResponseDTO.getSuccessed();
AgentPaymentEntity pay = new AgentPaymentEntity();
pay.setOaId(paymentEntity.getOaId());
pay.setDataSourceCode(oa_data_source_code);
if (successed){
//更新申请单号到OA
pay.setApplyCode(payResponseDTO.getBusNum());
pay.setPayResult("审批中");
}else {
pay.setPayResult(payResponseDTO.getErrorMsg());
}
agentPaymentService.updateResult(pay);
System.out.println(JSONObject.toJSONString(payResponseDTO));
}
}
}
}
}else {
throw new BaseSystemException("参数不能为空");
}
}catch (Exception e){
logger.error("代发代扣出错:{}",e);
}
}
/**
* 代发代扣 结果详情查询
*
* @param agentPayResultRequestDTO
* @return
*/
@Override
public AgentPayResultResDTO agentPayResult(AgentPayResultRequestDTO agentPayResultRequestDTO) {
try {
if (null != agentPayResultRequestDTO && StrUtil.isNotEmpty(agentPayResultRequestDTO.getBusNum())){
AgentPayResultResDTO agentPayResultResDTO = cbs8Service.agentPayResult(agentPayResultRequestDTO);
//更新OA表单
String busNum = agentPayResultResDTO.getBusNum();
if (StringUtils.isNotEmpty(busNum)){
AgentPaymentEntity agentPaymentEntity = new AgentPaymentEntity();
agentPaymentEntity.setApplyCode(busNum);
agentPaymentEntity.setDataSourceCode(oa_data_source_code);
AgentPaymentEntity entity = agentPaymentService.queryByApplyCode(agentPaymentEntity);
String pay_status = agentPayResultResDTO.getPayStatus();
String status = agentPayResultResDTO.getStatus();
if (null != entity){
AgentPaymentEntity result = new AgentPaymentEntity();
result.setOaId(entity.getOaId());
result.setDataSourceCode(oa_data_source_code);
//更新主表
if (StrUtil.isEmpty(pay_status)) {
result.setPayResult(PayState.payStateGetValue(status));//支付申请状态 支付状态和支付申请状态用一个
} else {
result.setPayResult(PayState.payStateGetValue(pay_status));//支付状态 支付状态和支付申请状态用一个
}
agentPaymentService.updateResult(result);
//更新明细表
List<AgentPayQueryDTO> agentDetails = agentPayResultResDTO.getAgentDetails();
for (AgentPayQueryDTO d : agentDetails) {
AgentPaymentDetailEntity detail = new AgentPaymentDetailEntity();
detail.setFormmainId(entity.getOaId());
detail.setDtlAmount(d.getDtlAmount());
detail.setDtlCnapsCode(d.getDtlCnapsCode());
detail.setDtlRevName(d.getDtlRevName());
detail.setDtlSeqNum(Integer.valueOf(d.getDtlSeqNum()));
detail.setPayResult(PayState.payStateGetValue(d.getDtlStatus()));
detail.setPayDate(CBSUtil.convertTimestampToString(d.getDtlPayTime()));
detail.setDataSourceCode(oa_data_source_code);
agentPaymentDetailService.updatePayResult(detail);
}
}
}
return agentPayResultResDTO;
}
}catch (Exception e){
logger.error("代发代扣详情结果查询出错{}",e);
}
return null;
}
/**
* 保存交易明细到OA底表
*
* @param transactionlList
*/
@Override
public void saveTransactionDetail(List<TransactionDetailDTO> transactionlList) {
if (CollectionUtils.isNotEmpty(transactionlList)){
//过滤已经保存过的数据
//收款档案表的数据
TransactionDetailEntity transactionDetailEntity = new TransactionDetailEntity();
transactionDetailEntity.setBankTransactionDate(DateUtil.lastWeek().toDateStr());
transactionDetailEntity.setDataSourceCode(oa_data_source_code);
List<TransactionDetailEntity> transactionDetailList = transactionDetailService.querySerialNumber(transactionDetailEntity);
//过滤已经保存的数据
if (CollectionUtils.isNotEmpty(transactionDetailList)){
//过滤transactionlList 去除已经存在transactionDetailList中的数据条件为transactionSerialNumber相等
if (CollectionUtils.isNotEmpty(transactionlList)){
transactionlList = transactionlList.stream()
.filter(item -> transactionDetailList.stream()
.noneMatch(detailItem -> item.getTransactionSerialNumber().equals(detailItem.getTransactionSerialNumber())))
.collect(Collectors.toList());
}
}
if (CollectionUtils.isNotEmpty(transactionlList)){
//保存到OA底表
for (TransactionDetailDTO dto : transactionlList) {
TransactionDetailEntity transactionDetail = new TransactionDetailEntity();
BeanUtil.copyProperties(dto,transactionDetail);
transactionDetail.setCurrency(CurrencyEnum.getChineseNameByCode(dto.getCurrency()));
if (NumberUtil.isNumber(dto.getBankTransactionDate())){//如果是时间戳 转换成日期字符串
transactionDetail.setBankTransactionDate(CBSUtil.convertTimestampToString(dto.getBankTransactionDate()));
}
transactionDetailService.restSave(transactionDetail);
}
}
}
}
//这个方法没用用的是8.0批量保存方式我没有测试
private void saveTransactionDetailTemp(List<TransactionDetailDTO> transactionDetailList) {
if (CollectionUtils.isNotEmpty(transactionDetailList)){
//过滤已经保存过的数据
for (TransactionDetailDTO dto : transactionDetailList) {
List<FormDataDTO> dataList = new ArrayList<>();
FormDTO formDTO = new FormDTO();
formDTO.setFormCode("formmain_0233");
formDTO.setLoginName("yonyou");
formDTO.setRightId("6603635988997229999.-8611088937958683581");
String field0001=dto.getAccountNo();//我方银行账号
String field0002=dto.getAccountName();//我方户名
String field0003=dto.getOpenBank();//我方开户行
String field0004=dto.getBankType();//我方银行类型
String field0005=dto.getTransactionSerialNumber();//交易流水号
String field0006=dto.getBankTransactionDate();//交易日期
String field0007=dto.getBankSerialNumber();//银行流水号
String field0008=dto.getCurrency();//币种
String field0009=dto.getIncurredAmount();//收款金额
String field0010=dto.getPurpose();//用途
String field0011=dto.getDigest();//摘要
String field0012=dto.getOppositeAccount();//对方账号
String field0013=dto.getOppositeName();//对方户名
String field0014=dto.getOppositeOpeningBank();//对方开户行
String field0015=dto.getRemark();//备注
//fields
List<RecordFieldDTO> fields = new ArrayList<>();
fields.add(new RecordFieldDTO("field0001",field0001,field0001));
fields.add(new RecordFieldDTO("field0002",field0002,field0002));
fields.add(new RecordFieldDTO("field0003",field0003,field0003));
fields.add(new RecordFieldDTO("field0004",field0004,field0004));
fields.add(new RecordFieldDTO("field0005",field0005,field0005));
fields.add(new RecordFieldDTO("field0006",field0006,field0006));
fields.add(new RecordFieldDTO("field0007",field0007,field0007));
fields.add(new RecordFieldDTO("field0008",field0008,field0008));
fields.add(new RecordFieldDTO("field0009",field0009,field0009));
fields.add(new RecordFieldDTO("field0010",field0010,field0010));
fields.add(new RecordFieldDTO("field0011",field0011,field0011));
fields.add(new RecordFieldDTO("field0012",field0012,field0012));
fields.add(new RecordFieldDTO("field0013",field0013,field0013));
fields.add(new RecordFieldDTO("field0014",field0014,field0014));
fields.add(new RecordFieldDTO("field0015",field0015,field0015));
//masterTable
MasterTableDTO masterTableDTO = new MasterTableDTO();
masterTableDTO.setName("formmain_1284");
RecordDTO recordDTO = new RecordDTO();
recordDTO.setId(UUIDLong.longUUID());
recordDTO.setFields(fields);
masterTableDTO.setRecord(recordDTO);
//dataList
FormDataDTO formDataDTO = new FormDataDTO();
formDataDTO.setMasterTable(masterTableDTO);
dataList.add(formDataDTO);
formDTO.setDataList(dataList);
}
}
}
}

View File

@ -12,18 +12,15 @@ import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.plugin.purchase.ProxyPurchaseReturn;
import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.OfsStandardUtil;
import com.hzya.frame.plugin.lets.util.OnlyImplementProxyOrderUtil;
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
import com.hzya.frame.plugin.lets.util.RdclUtil;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderHeader;
import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrderDetails;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import com.hzya.frame.ttxofs.service.OfsUnifiedService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -73,6 +70,9 @@ public class ConsignmachiningIn extends PluginBaseEntity {
@Autowired
private IScOrderBDao iScOrderBDao;
@Autowired
private OnlyImplementProxyOrderUtil onlyImplementProxyOrder;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
@ -358,6 +358,12 @@ public class ConsignmachiningIn extends PluginBaseEntity {
OfsPoOrderHeader ofsPoOrderDataHeader = ofsPoOrderData.getHeader();
List<OfsPoOrderDetails> ofsPoOrderDataDetails = ofsPoOrderData.getDetails();
//如果该O采购订单对应的类型为委外加工则继续代码逻辑否则就跳过代码逻辑
boolean checkResult = onlyImplementProxyOrder.onlyImplementProxyOrder(ofsPoOrderData, "WWJG");
if (!checkResult) {
continue;
}
//2024年8月25日 09:42:58 查询委外订单如果这一步报错后续的逻辑就没有必要执行了
String ofsId = ofsPoOrderDataHeader.getId();
Assert.notNull(ofsId, "通过接口查询到OFS采购订单但是没有采购订单主键业务逻辑无法完成");

View File

@ -1,15 +1,767 @@
package com.hzya.frame.plugin.lets.plugin.outsourc;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.beanutil.BeanUtil;
import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.dao.*;
import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.*;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderHeader;
import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrder;
import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrderDetails;
import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrderHeader;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
import com.hzya.frame.ttxofs.dto.stock.StockinOrderSearchResponse;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.math.BigDecimal;
import java.util.*;
/**
* O采退出库 -> U8C红字委外加工入库
* O采退出库 -> U8C红字委外订单
*
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.plugin.outsourc
* @ProjectkangarooDataCenterV3
* @nameConsignmachiningIn
* @Date2024/8/22 23:49
* @Date2024年8月26日 15:34:34
* @FilenameConsignmachiningIn
*/
public class ConsignmachiningInReturn {
public class ConsignmachiningInReturn extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(ConsignmachiningInReturn.class);
@Autowired
private QueryBdBusitypeUtil queryBdBusitypeUtil;
@Autowired
private IBdCorpDao iBdCorpDao;
@Autowired
private IBdInvmandocDao iBdInvmandocDao;
@Autowired
private IBdCalbodyDao iBdCalbodyDao;
@Autowired
private RdclUtil rdclUtil;
@Autowired
private OfsStandardUtil ofsStandardUtil;
@Autowired
private IBdCumandocDao iBdCumandocDao;
// @Autowired
// private IScOrderDao iScOrderDao;
// @Autowired
// private IScOrderBDao iScOrderBDao;
@Autowired
private IBdCubasdocDao iBdCubasdocDao;
@Autowired
private IBdPurorgDao iBdPurorgDao;
@Autowired
private OnlyImplementProxyOrderUtil onlyImplementProxyOrder;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
@Override
public String getPluginId() {
return "com.hzya.frame.plugin.lets.plugin.outsourc.ConsignmachiningInReturn";
}
@Override
public String getPluginName() {
return "OFS采退出库单生成U8C红字委外订单";
}
@Override
public String getPluginLabel() {
return "OFS采退出库单生成U8C红字委外订单";
}
@Override
public String getPluginType() {
return "3";
}
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
return null;
}
/**
* 根据单号查询
*
* @author liuyang
*/
public void startImplement(String startTime, String endTime) {
String threadNameStrStart = StrUtil.format("开始委外采退OFS采退出库单生成U8红字C委外订单 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
//OFS采退出库
List<HeaderDetailsDto> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setClosedAt_start(startTime);
queryOfsSoSaleOutVo.setClosedAt_end(endTime);
queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setInternalInstructionType("PURCHASE_RETURN");
queryOfsSoSaleOutVo.setStatus(900L);
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.shipment.search");
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
getSet(returnGoodHeaderDetailsDataDtoArrayList);
} else {
logger.info("没有查询到任何数据!不需要发起同步逻辑!!");
}
} catch (Exception e) {
logger.error("startImplement方法抛出异常", e);
}
}
}, threadNameStrStart);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
}
String threadNameStrEnd = StrUtil.format("结束委外采退OFS采退出库单生成U8红字C委外订单 开始时间:{} 结束时间:{}", startTime, endTime);
logger.info(threadNameStrEnd);
}
/**
* 根据单号查询
*
* @author liuyang
*/
public void startImplement(String code) {
String threadNameStrStart = StrUtil.format("开始委外采退OFS采退出库单生成U8红字C委外订单 OFS采购入库单号{}", code);
logger.info(threadNameStrStart);
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
List<HeaderDetailsDto> returnGoodHeaderDetailsDataDtoArrayList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L);
queryOfsSoSaleOutVo.setCode(code);
queryOfsSoSaleOutVo.setInternalInstructionType("PURCHASE_RETURN");
queryOfsSoSaleOutVo.setStatus(900L);
ofsStandardUtil.queryOfsSaleOrder(queryOfsSoSaleOutVo, returnGoodHeaderDetailsDataDtoArrayList, 1L, "ofs.shipment.search");
logger.info("数据返回行数:{}", returnGoodHeaderDetailsDataDtoArrayList.size());
if (returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
getSet(returnGoodHeaderDetailsDataDtoArrayList);
} else {
logger.info("没有查询到任何数据!不需要发起同步逻辑!!");
}
} catch (Exception e) {
logger.error("startImplement方法抛出异常", e);
}
}
}, threadNameStrStart);
thread.start();
try {
thread.join();
} catch (Exception e) {
logger.error("thread.join()异常", e);
}
String threadNameStrEnd = StrUtil.format("结束委外采退OFS采退出库单生成U8红字C委外订单 OFS采购入库单号{}", code);
logger.info(threadNameStrEnd);
}
/**
* 环境预配置
*
* @param returnGoodHeaderDetailsDataDtoArrayList 采退出库单
* @author liuyang
*/
private void getSet(List<HeaderDetailsDto> returnGoodHeaderDetailsDataDtoArrayList) throws Exception {
//过滤成功的数据
List<HeaderDetailsDto> headerDetailsDtos = filterData(returnGoodHeaderDetailsDataDtoArrayList);
//执行推送主逻辑
implement(headerDetailsDtos);
}
/**
* 过滤掉成功的数据
*
* @author liuyang
*/
private List<HeaderDetailsDto> filterData(List<HeaderDetailsDto> returnGoodHeaderDetailsDataDtoArrayList) {
List<HeaderDetailsDto> headerDetailsDtoList1 = new ArrayList<>();
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//TODO 出库单明细主键需要O返回目前没有已经提需求
headerDetailsDtoList1.addAll(returnGoodHeaderDetailsDataDtoArrayList);
}
return headerDetailsDtoList1;
}
/**
* 执行主逻辑
*
* @author liuyang
*/
private void implement(List<HeaderDetailsDto> headerDetailsDtos) throws Exception {
if (headerDetailsDtos != null && headerDetailsDtos.size() > 0) {
try {
// 查询基本档案
List<ReturnOrderHeaderDto> returnOrderHeaderDtos = queryBasicArchives(headerDetailsDtos);
// 查询采购收发类别
BdRdclEntity bdRdclEntity = rdclUtil.queryRdClObject("105");
if (returnOrderHeaderDtos != null && returnOrderHeaderDtos.size() > 0) {
for (int i = 0; i < returnOrderHeaderDtos.size(); i++) {
ReturnOrderHeaderDto returnOrderHeaderDto = returnOrderHeaderDtos.get(i);
List<DetailsDto> details = returnOrderHeaderDto.getDetails();
String generateBusinessDate = createGenerateBusinessDate(returnOrderHeaderDto); //生成业务日期
PurchaseReturnOrder purchaseReturnOrder = returnOrderHeaderDto.getPurchaseReturnOrder();//OFS采退订单
PurchaseReturnOrderHeader header = purchaseReturnOrder.getHeader();
List<PurchaseReturnOrderDetails> details2 = purchaseReturnOrder.getDetails();
BdCorpEntity bdCorpEntity = returnOrderHeaderDto.getBdCorpEntity();//公司
BdCalbodyEntity bdCalbodyEntity = returnOrderHeaderDto.getBdCalbodyEntity();//库存组织
BdCubasdocEntity bdCubasdocEntity = returnOrderHeaderDto.getBdCubasdocEntity();//供应商基本档案
BdCumandocEntity bdCumandocEntity = returnOrderHeaderDto.getBdCumandocEntity();//供应商管理档案
BdPurorgEntity bdPurorgEntity = returnOrderHeaderDto.getBdPurorgEntity();//采购组织
BdBusitypeEntity bdBusitypeEntity1 = returnOrderHeaderDto.getBdBusitypeEntity();//业务流程
List<DetailsDto> details1 = returnOrderHeaderDto.getDetails();//OFS采退出库单明细行
//委外订单
ScorderHeadDto scorderHeadDto = new ScorderHeadDto();
scorderHeadDto.setPk_corp(bdCorpEntity.getPkCorp());
scorderHeadDto.setCbiztype(bdBusitypeEntity1.getPkBusitype());
scorderHeadDto.setCoperator("0001A110000000000U3D");
scorderHeadDto.setCpurorganization(bdPurorgEntity.getPkPurorg());
scorderHeadDto.setCvendormangid(bdCumandocEntity.getPkCumandoc());
scorderHeadDto.setCwareid(bdCalbodyEntity.getPkCalbody());
scorderHeadDto.setDorderdate(generateBusinessDate);
scorderHeadDto.setVdef3(bdRdclEntity.getPkRdcl());
scorderHeadDto.setVdef17(ProfilesActiveConstant.sourceSystem1);
scorderHeadDto.setVdef19(returnOrderHeaderDto.getCode());
scorderHeadDto.setVdef20(returnOrderHeaderDto.getId());
//委外入库表头明细行
List<ScorderBodyDto> scorderBodyDtoArrayList = new ArrayList<>();
for (int j = 0; j < details.size(); j++) {
DetailsDto detailsDto = details.get(j);
//查询存货管理档案
BdInvmandocEntity bdInvmandocEntity = queryInventoryMan(detailsDto, bdCorpEntity.getPkCorp());
//根据存货基础档案编码查询当前存货的税率
BdTaxitemsEntity bdTaxitemsEntity1 = queryBdTaxitems(bdInvmandocEntity.getInvcode());
//查找OFS采购订单明细行
PurchaseReturnOrderDetails ofsPoOrderDetail = findOfsPoOrderDetail(details2, detailsDto);
String receivedQty = detailsDto.getShipQty();//实发数量
String fulfillAmount = ofsPoOrderDetail.getFulfillAmount();//实际进价
String tax = "0." + new BigDecimal(bdTaxitemsEntity1.getTaxratio()).stripTrailingZeros().toPlainString();
BigDecimal noriginalcurtaxprice = null;//含税单价
BigDecimal noriginalnetprice = null;//无税单价
try {
noriginalcurtaxprice = new BigDecimal(fulfillAmount).divide(new BigDecimal(receivedQty), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP);
noriginalnetprice = noriginalcurtaxprice.divide(new BigDecimal(1).add(new BigDecimal(tax)), 20, BigDecimal.ROUND_HALF_UP).setScale(4, BigDecimal.ROUND_HALF_UP);
logger.info("O采退订单单号{} O采购入库单单号{} 含税单价:{} 无税单价:{} 存货编码:{} 存货名称:{}", header.getCode(), returnOrderHeaderDto.getCode(), noriginalcurtaxprice, noriginalnetprice, detailsDto.getSkuCode(), detailsDto.getSkuName());
} catch (Exception e) {
logger.error("委外订单无税单价", e);
}
ScorderBodyDto scorderBodyDto = new ScorderBodyDto();
scorderBodyDto.setCmangid(bdInvmandocEntity.getPkInvmandoc());//加工品
scorderBodyDto.setNordernum("-" + new BigDecimal(detailsDto.getShipQty()).stripTrailingZeros().toPlainString());//数量
scorderBodyDto.setNoriginalnetprice(noriginalnetprice.stripTrailingZeros().toPlainString());//净单价(无税)
scorderBodyDto.setDplanarrvdate(generateBusinessDate);
scorderBodyDtoArrayList.add(scorderBodyDto);
}
List<ScorderDto> scorderDtoArrayList = new ArrayList<>();
ScorderDto scorderDto = new ScorderDto();
scorderDto.setParentvo(scorderHeadDto);
scorderDto.setChildrenvo(scorderBodyDtoArrayList);
scorderDtoArrayList.add(scorderDto);
Map<String, List<ScorderDto>> stringStringMap = new HashMap<>();
stringStringMap.put("OrderVO", scorderDtoArrayList);
IcGeneralHResultDto icGeneralHResultDto = sendU8cScorder(JSON.toJSONString(stringStringMap));
String cgeneralhid = null;
String vbillcode = null;
IcGeneralHResultHeadDto parentvo = icGeneralHResultDto.getParentvo();
List<IcGeneralHResultBodyDto> childrenvo = icGeneralHResultDto.getChildrenvo();
if (parentvo != null) {
cgeneralhid = parentvo.getCgeneralhid();
}
if (childrenvo != null) {
vbillcode = parentvo.getVbillcode();
}
logger.info("推送U8C委外订单成功委外入库单主键{} 委外入库单编码:{}", cgeneralhid, vbillcode);
//生成委外入库单红字
}
} else {
logger.info("returnOrderHeaderDtos.size为0");
}
} catch (Exception e) {
logger.error("implement方法抛出异常", e);
}
}
}
/**
* 档案转换(OFS->U8C)
* 2024年8月23日 12:02:47 和妮姐沟通单据流程U8C成品委外订单 -> 备料计划 -> U8C委外发料(核销)
*
* @author liuyang
*/
private List<ReturnOrderHeaderDto> queryBasicArchives(List<HeaderDetailsDto> headerDetailsDtos) {
List<ReturnOrderHeaderDto> returnOrderHeaderDtoArrayList = new ArrayList<>();
if (headerDetailsDtos != null && headerDetailsDtos.size() > 0) {
try {
for (int i = 0; i < headerDetailsDtos.size(); i++) {
HeaderDetailsDto headerDetailsDto = headerDetailsDtos.get(i);
HeaderDto header = headerDetailsDto.getHeader();
List<DetailsDto> details = headerDetailsDto.getDetails();
//2024年8月25日 09:54:31 查询OFS采退订单
PurchaseReturnOrder purchaseReturnOrder = queryPurchaseReturnOrder(header.getRefOrderCode());
Assert.notNull(purchaseReturnOrder, "无法查询到采退订单 refOrderCode:{}", header.getRefOrderCode());
PurchaseReturnOrderHeader ofsWithdrawalHead = purchaseReturnOrder.getHeader();
List<PurchaseReturnOrderDetails> ofsWithdrawalDetails = purchaseReturnOrder.getDetails();
//如果该O采购订单对应的类型为委外加工则继续代码逻辑否则就跳过代码逻辑
boolean checkResult = onlyImplementProxyOrder.onlyImplementProxyOrder(purchaseReturnOrder, "WWJG");
if (!checkResult) {
continue;
}
//2024年8月26日 16:08:05 委外订单对应的公司
String companyCode = header.getCompanyCode();
Assert.notNull(companyCode, "O表头货主编码不能为空");
BdCorpEntity bdCorpEntity = new BdCorpEntity();
bdCorpEntity.setDr(0);
bdCorpEntity.setDataSourceCode("lets_u8c");
bdCorpEntity.setUnitcode(companyCode);
List<BdCorpEntity> bdCorpEntityList = iBdCorpDao.query(bdCorpEntity);
if (bdCorpEntityList.size() == 0) {
Assert.state(false, "根据O货主编码{}无法匹配到U8C销售公司", companyCode);
} else if (bdCorpEntityList.size() >= 2) {
Assert.state(false, "根据O货主编码{}匹配到U8C销售公司{}个", companyCode, bdCorpEntityList.size());
}
// 2024年8月26日 16:10:00 公司对应的库存组织
BdCalbodyEntity bdCalbodyEntity = new BdCalbodyEntity();
bdCalbodyEntity.setDr(0);
bdCalbodyEntity.setDataSourceCode("lets_u8c");
bdCalbodyEntity.setPkCorp(bdCorpEntityList.get(0).getPkCorp());
List<BdCalbodyEntity> bdCalbodyEntities = iBdCalbodyDao.query(bdCalbodyEntity);
if (bdCalbodyEntities.size() == 0) {
Assert.state(false, "根据U8C采购公司{}无法匹配到U8C发货库存组织", bdCorpEntityList.get(0).getPkCorp());
} else if (bdCalbodyEntities.size() >= 2) {
Assert.state(false, "根据U8C采购公司{}匹配到U8C发货库存组织{}个", bdCorpEntityList.get(0).getPkCorp(), bdCalbodyEntities.size());
}
//2024年8月26日 16:11:24 供应商基本档案
String shipFromCode = ofsWithdrawalHead.getShipFromCode();
Assert.notNull(shipFromCode, "O供应商编码不能为空没有办法完成业务逻辑请配置供应商编码(采退)");
Assert.state(!"".equals(shipFromCode.trim()), "O供应商编码不能为空没有办法完成业务逻辑请配置供应商编码");
BdCubasdocEntity bdCubasdocEntity = new BdCubasdocEntity();
bdCubasdocEntity.setDataSourceCode("lets_u8c");
bdCubasdocEntity.setDr(0L);
bdCubasdocEntity.setDef1(shipFromCode);
List<BdCubasdocEntity> bdCubasdocEntityList = iBdCubasdocDao.query(bdCubasdocEntity);
if (bdCubasdocEntityList == null || bdCubasdocEntityList.size() == 0) {
Assert.state(false, "根据OFS供应商业务编码{}无法查询到U8C客商档案信息(供应商)", shipFromCode);
} else if (bdCubasdocEntityList.size() >= 2) {
Assert.state(false, "根据OFS供应商业务编码{}查询到多个U8C客商档案信息(供应商)", shipFromCode);
}
//客商管理档案
BdCumandocEntity bdCumandocEntity1 = new BdCumandocEntity();
bdCumandocEntity1.setDataSourceCode("lets_u8c");
bdCumandocEntity1.setDr(0L);
bdCumandocEntity1.setPkCorp(bdCorpEntityList.get(0).getPkCorp());
bdCumandocEntity1.setCustflags(ProfilesActiveConstant.SUPPLIER);
bdCumandocEntity1.setPkCubasdoc(bdCubasdocEntityList.get(0).getPkCubasdoc());
List<BdCumandocEntity> bdCumandocEntityList = iBdCumandocDao.query(bdCumandocEntity1);
if (bdCumandocEntityList == null || bdCumandocEntityList.size() == 0) {
Assert.state(false, "根据客商基本档案(供应商)主键{},无法匹配到客商管理档案", bdCubasdocEntityList.get(0).getPkCubasdoc());
} else if (bdCumandocEntityList.size() >= 2) {
Assert.state(false, "根据客商基本档案(供应商)主键{},匹配到多个客商管理档案", bdCubasdocEntityList.get(0).getPkCubasdoc());
}
// 采购组织
BdPurorgEntity bdPurorgEntity = new BdPurorgEntity();
bdPurorgEntity.setDr("0");
bdPurorgEntity.setDataSourceCode("lets_u8c");
bdPurorgEntity.setOwnercorp(bdCorpEntityList.get(0).getPkCorp());
List<BdPurorgEntity> bdPurorgEntityList = iBdPurorgDao.query(bdPurorgEntity);
if (bdPurorgEntityList.size() == 0) {
Assert.state(false, "根据采购公司主键:{} 无法匹配到采购组织", bdCorpEntityList.get(0).getPkCorp());
} else if (bdPurorgEntityList.size() >= 2) {
Assert.state(false, "根据采购公司主键:{} 匹配到多个采购组织", bdCorpEntityList.get(0).getPkCorp());
}
//业务流程
String busitypeName = "委外加工";
BdBusitypeEntity bdBusitypeEntity = queryBdBusitypeUtil.queryBdBusitype(busitypeName, bdCalbodyEntities.get(0).getPkCorp());
Assert.notNull(bdBusitypeEntity, "根据业务名称{} 公司:{}无法匹配到U8C业务类型", busitypeName, bdCalbodyEntities.get(0).getPkCorp());
ReturnOrderHeaderDto returnOrderHeaderDto = new ReturnOrderHeaderDto();
returnOrderHeaderDto.setPurchaseReturnOrder(purchaseReturnOrder);
returnOrderHeaderDto.setBdCorpEntity(bdCorpEntityList.get(0));
returnOrderHeaderDto.setBdCalbodyEntity(bdCalbodyEntities.get(0));
returnOrderHeaderDto.setBdCubasdocEntity(bdCubasdocEntityList.get(0));
returnOrderHeaderDto.setBdCumandocEntity(bdCumandocEntityList.get(0));
returnOrderHeaderDto.setBdPurorgEntity(bdPurorgEntityList.get(0));
returnOrderHeaderDto.setBdBusitypeEntity(bdBusitypeEntity);
BeanUtil.copyPropertiesV2(header, returnOrderHeaderDto);
returnOrderHeaderDtoArrayList.add(returnOrderHeaderDto);
}
//成功
} catch (Exception e) {
logger.error("委外订单OFS档案转换", e);
//失败
}
} else {
logger.info("queryBasicArchives对应returnGoodHeaderDetailsDataDtoList.size为0");
}
return returnOrderHeaderDtoArrayList;
}
/**
* 查询委外订单表头对象
*
* @author liuyang
*/
// private ScOrderEntity queryScOrder(String ofsPoOrderId) {
// Assert.notNull(ofsPoOrderId, "ofsPoOrderId不能为空!");
// Assert.state(!"".equals(ofsPoOrderId.trim()), "ofsPoOrderId不能为空");
//
// ScOrderEntity scOrderEntity = new ScOrderEntity();
// scOrderEntity.setVdef20(ofsPoOrderId);
// scOrderEntity.setDr("0");
// scOrderEntity.setDataSourceCode("lets_u8c");
// List<ScOrderEntity> scOrderEntityList = iScOrderDao.query(scOrderEntity);
// if (scOrderEntityList == null || scOrderEntityList.size() == 0) {
// Assert.state(false, "根据O采购订单主键:{}(u委外订单自定义项20存储O采购订单主键)无法匹配到U8C委外订单", ofsPoOrderId);
// } else if (scOrderEntityList.size() >= 2) {
// Assert.state(false, "根据O采购订单主键:{}(u委外订单自定义项20存储O采购订单主键),匹配到{}个U8C委外订单", ofsPoOrderId, scOrderEntityList.size());
// }
// return scOrderEntityList.get(0);
// }
/**
* 2024年8月25日 14:11:31 查询U8C委外订单明细
*
* @param corderid 委外订单表头主键
* @author liuyang
*/
// private List<ScOrderBEntity> queryScOrderDetail(String corderid) throws Exception {
// Assert.notNull(corderid, "委外订单表头主键不能为空!");
// Assert.state(!"".equals(corderid), "委外订单表头主键不能为空!");
//
// ScOrderBEntity scOrderBEntity = new ScOrderBEntity();
// scOrderBEntity.setCorderid(corderid);
// scOrderBEntity.setDr("0");
// scOrderBEntity.setDataSourceCode("lets_u8c");
// List<ScOrderBEntity> scOrderBEntityList = iScOrderBDao.query(scOrderBEntity);
// if (scOrderBEntityList == null || scOrderBEntityList.size() == 0) {
// //2024年8月25日 14:16:31 这个验证非常要必要单据如果没有表体没有行是很可疑的
// Assert.state(false, "根据U8C委外订单主键({})无法查询到委外订单表体明细行!", corderid);
// }
// return scOrderBEntityList;
// }
/**
* 2024年8月6日 10:59:03 查询U8C业务流程
*
* @param pkCorp 公司主键
* @author liuyang
*/
// private BdBusitypeEntity u8cOperationFlow(String pkCorp) throws Exception {
// Assert.notNull(pkCorp, "公司主键不能为空!");
// Assert.state(!"".equals(pkCorp.trim()), "公司主键不能为空!");
// //查询业务流程
// //2024年8月6日 11:33:07 具体的业务流程名称还需要实施提供
// String processName = "委外加工";
// BdBusitypeEntity bdBusitypeEntity = queryBdBusitypeUtil.queryBdBusitype(processName, pkCorp);
// Assert.notNull(bdBusitypeEntity, "根据业务流程名称({})没有查询到业务流程", processName);
// return bdBusitypeEntity;
// }
/**
* 匹配U8C采购订单明细行
* 通过O采购入库单明细行得到采购订单明细行最后查找到U8C采购订单明细行
*
* @param stockinB OFS采购入库单明细行
* @param ofsPoOrderData OFS采购订单
* @param scOrderBEntityList U8C委外订单明细行
* @author liuyang
*/
// private ScOrderBEntity findOfsPoOrderDetailAndU8cPoOrderDetail(StockinOrderSearchResponse.StockinOrder.StockinB stockinB, OfsPoOrderData ofsPoOrderData, List<ScOrderBEntity> scOrderBEntityList) {
// Assert.notNull(stockinB, "stockinB不能为空");
// Assert.notNull(ofsPoOrderData, "ofsPoOrderData不能为空");
// Assert.notNull(scOrderBEntityList, "scOrderBEntityList删除不能为空");
//
//// OfsPoOrderHeader header = ofsPoOrderData.getHeader();
// List<OfsPoOrderDetails> details = ofsPoOrderData.getDetails();
//
// //查找采购订单明细行
// OfsPoOrderDetails tarGetOfsPoOrderDetails = null;
// for (int i = 0; i < details.size(); i++) {
// OfsPoOrderDetails ofsPoOrderDetails = details.get(i);
// if (ofsPoOrderDetails.getId().equals(stockinB.getRefOrderDetailId())) {
// tarGetOfsPoOrderDetails = ofsPoOrderDetails;
// }
// }
// Assert.notNull(tarGetOfsPoOrderDetails, "无法匹配到采购订单明细行! 目标主键:{}", stockinB.getRefOrderDetailId());
//
// //根据采购订单明细行主键查找U8C采购订单明细行
// for (int i = 0; i < scOrderBEntityList.size(); i++) {
// ScOrderBEntity scOrderBEntity = scOrderBEntityList.get(i);
// Assert.notNull(scOrderBEntity.getVdef20(), "委外订单明细行v20不能为空(明细行v20存储O采购订单明细行主键)");
// Assert.state(!"".equals(scOrderBEntity.getVdef20()), "委外订单明细行v20不能为空(明细行v20存储O采购订单明细行主键)");
// if (tarGetOfsPoOrderDetails.getId().equals(scOrderBEntity.getVdef20())) {
// return scOrderBEntity;
// }
// }
// Assert.state(false, "通过U8C采购订单明细行主键层层匹配到U8C采购明细失败");
// return null;
// }
/**
* 匹配U8C采购订单明细行
* 通过O采购入库单明细行得到采购订单明细行最后查找到U8C采购订单明细行
*
* @param stockinB OFS采购入库单明细行
* @param ofsPoOrderData OFS采购订单
* @author liuyang
*/
// private OfsPoOrderDetails findOfsPoOrderDetailRowTraget(StockinOrderSearchResponse.StockinOrder.StockinB stockinB, OfsPoOrderData ofsPoOrderData) {
// Assert.notNull(stockinB, "stockinB不能为空");
// Assert.notNull(ofsPoOrderData, "ofsPoOrderData不能为空");
//
// List<OfsPoOrderDetails> details = ofsPoOrderData.getDetails();
// for (int i = 0; i < details.size(); i++) {
// OfsPoOrderDetails ofsPoOrderDetails = details.get(i);
// if (ofsPoOrderDetails.getId().equals(stockinB.getRefOrderDetailId())) {
// return ofsPoOrderDetails;
// }
// }
// Assert.state(false, "通过OFS采购入库单无法匹配到OFS采购订单明细行 目标主键:{}", stockinB.getRefOrderDetailId());
// return null;
// }
/**
* 查询存货管理档案
*
* @param pkCorp 发货公司主键
* @param detailsDto 采购入库单明细行
* @author liuyang
*/
private BdInvmandocEntity queryInventoryMan(DetailsDto detailsDto, String pkCorp) throws Exception {
Assert.notNull(detailsDto, "sonDetailsDto不能为空");
Assert.notNull(detailsDto.getSkuCode(), "O存货商家编码不能为空");
Assert.notNull(pkCorp, "发货公司主键不能为空");
BdInvmandocEntity bdInvmandocEntity = new BdInvmandocEntity();
bdInvmandocEntity.setInvcode(detailsDto.getSkuCode());
bdInvmandocEntity.setPkCorp(pkCorp);
List<BdInvmandocEntity> bdInvmandocEntity2 = iBdInvmandocDao.queryBdInvmandocByInvcodeList(bdInvmandocEntity);
if (bdInvmandocEntity2.size() == 0) {
Assert.state(false, "根据O商家编码{} U8C发货公司主键{}没有查询到存货管理档案", detailsDto.getSkuCode(), pkCorp);
} else if (bdInvmandocEntity2.size() >= 2) {
Assert.state(false, "根据O商家编码{} U8C发货公司主键{}没有查询到存货管理档案", detailsDto.getSkuCode(), pkCorp);
}
return bdInvmandocEntity2.get(0);
}
/**
* 2024年8月25日 15:12:22
* 推送U8C委外订单
*
* @param param 原数据json
* @author liuyang
*/
public IcGeneralHResultDto sendU8cScorder(String param) throws Exception {
long startLong = System.currentTimeMillis();
logger.info("U8C委外订单推送开始推送参数" + param + ",U8C_URL:" + ProfilesActiveConstant.U8C_URL);
String result = HttpRequest.post(ProfilesActiveConstant.U8C_URL).header("appId", "800037")//头信息多个头信息多次调用此方法即可
.header("usercode", "admin").header("password", "21232f297a57a5a743894a0e4a801fc3").header("system", "lz").header("trantype", "PK").header("apiCode", "8000370037")//头信息多个头信息多次调用此方法即可
.header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")//头信息多个头信息多次调用此方法即可
.header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息多个头信息多次调用此方法即可
.body(param)//表单内容
.timeout(20000)//超时毫秒
.execute().body();
logger.info("U8C委外订单推送结束返回参数" + result);
long endLong = System.currentTimeMillis();
logger.info("U8C委外订单推送耗时" + (endLong - startLong));
if (result == null) {
result = "";
}
JSONObject jsonObject = JSON.parseObject(result);
result = String.valueOf(jsonObject.get("attribute"));
boolean isSuccess = false;
IcGeneralHResultDto icGeneralHResultDto = null;
if (result != null && !"".equals(result)) {
ReusltStrDto reusltStrDto = JSON.parseObject(result, ReusltStrDto.class);
if ("success".equals(reusltStrDto.getStatus())) {
icGeneralHResultDto = resultDataHandle(reusltStrDto.getData());
isSuccess = true;
}
}
if (!isSuccess) {
Assert.state(false, "O采购入库业务推送U8C委外订单失败 接口返回结果:{}", result);
}
return icGeneralHResultDto;
}
/**
* 返回结果解析处理在确认了success后调用
*
* @author liuyang
*/
private IcGeneralHResultDto resultDataHandle(String resultData) {
try {
if (resultData != null && !"".equals(resultData)) {
if (resultData.contains("[")) {
resultData = resultData.substring(1, resultData.length() - 1);
}
return JSON.parseObject(resultData, IcGeneralHResultDto.class);
}
} catch (Exception e) {
logger.error("resultDataHandle方法解析返回参数失败的错误", e);
//如果解析失败记录原因但是不能影响结果的记录
}
return null;
}
/**
* 查询采退订单
*
* @param code 采退订单号
* @author liuyang
*/
private PurchaseReturnOrder queryPurchaseReturnOrder(String code) throws Exception {
List<PurchaseReturnOrder> headerDetailsDtoList = new ArrayList<>();
QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
queryOfsSoSaleOutVo.setCode(code);
queryOfsSoSaleOutVo.setClientCode("LETS");
queryOfsSoSaleOutVo.setPageNo(1L);
queryOfsSoSaleOutVo.setPageSize(50L);
ofsStandardUtil.queryPurchaseReturnOrder(queryOfsSoSaleOutVo, headerDetailsDtoList, 1L, "ofs.purchaseReturnOrder.search");
if (headerDetailsDtoList.size() > 0) {
return headerDetailsDtoList.get(0);
}
Assert.state(false, "根据OFS采购订单号:{}无法查询到OFS采购订单信息", code);
return null;
}
/**
* 2024年8月20日 15:46:10
* 生成业务日期以发货时间作为业务日期
*
* @author liuyang
*/
private String createGenerateBusinessDate(ReturnOrderHeaderDto returnOrderHeaderDto) throws Exception {
if (returnOrderHeaderDto != null && returnOrderHeaderDto.getShipAt() != null) {
String shipAt = returnOrderHeaderDto.getShipAt();
String businessFormat = null;
try {
Date dbill = DateUtil.parse(shipAt);
businessFormat = DateUtil.format(dbill, "yyyy-MM-dd");
} catch (Exception e) {
logger.error("业务日期生成失败!", e);
}
return businessFormat;
} else {
logger.error("生成采退出库日期失败或者shipAt为空! json{}", JSON.toJSON(returnOrderHeaderDto));
Assert.state(false, "生成采退出库日期失败或者shipAt为空! json{}", JSON.toJSON(returnOrderHeaderDto));
return null;
}
}
/**
* 2024年8月7日 14:58:34
* 查询税目档案
*
* @author liuyang
*/
private BdTaxitemsEntity queryBdTaxitems(String invcode) {
Assert.notNull(invcode, "存货编码不能为空");
BdTaxitemsEntity bdTaxitemsEntity = TocOrderBasicArchivesCacheUtil.stringBdTaxitemsEntityHashMap.get(invcode);
Assert.notNull(bdTaxitemsEntity, "根据存货编码({}),无法匹配到税率!", invcode);
return bdTaxitemsEntity;
}
/**
* 2024年8月20日 16:42:14
* 查找对应的采购订单明细行
* 2024年8月20日 17:42:15
* 应该通过明细行主键匹配但是只能根据sku匹配目前的实现逻辑
* 查找OFS采购订单明细行主要是为了带出实付金额通过实付金额/实收数量=含税单价
*
* @param ofsPoOrderDataDetails OFS采退订单明细行所有对象
* @param detailsDto OFS采退入库单明细行对象
* @author liuyang
*/
private PurchaseReturnOrderDetails findOfsPoOrderDetail(List<PurchaseReturnOrderDetails> ofsPoOrderDataDetails, DetailsDto detailsDto) {
if (ofsPoOrderDataDetails != null && ofsPoOrderDataDetails.size() > 0 && detailsDto != null) {
for (int i = 0; i < ofsPoOrderDataDetails.size(); i++) {
Assert.notNull(ofsPoOrderDataDetails.get(i).getId(), "采退订单明细行主键不能为空!");
Assert.notNull(detailsDto.getRefOrderDetailId(), "采退出库单明细行对应的关联采退订单的明细行主键不能为空!");
if (ofsPoOrderDataDetails.get(i).getId().equals(detailsDto.getRefOrderDetailId())) {
return ofsPoOrderDataDetails.get(0);
}
}
} else {
logger.error("findOfsPoOrderDetail方法对应的ofsPoOrderDataDetails不能为空否则业务目标无法完成");
}
Assert.state(false, "无法匹配到采退订单明细行,业务逻辑无法完成!");
return null;
}
}

View File

@ -14,6 +14,7 @@ import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.OfsStandardUtil;
import com.hzya.frame.plugin.lets.util.OnlyImplementProxyOrderUtil;
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
import com.hzya.frame.plugin.lets.util.RdclUtil;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
@ -84,6 +85,9 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
@Autowired
private OfsStandardUtil ofsStandardUtil;
@Autowired
private OnlyImplementProxyOrderUtil onlyImplementProxyOrder;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
@ -415,6 +419,15 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
HeaderDto header = headerDetailsDto.getHeader();
List<DetailsDto> details = headerDetailsDto.getDetails();
//2024年8月22日 15:30:09 如果purchaseReturnOrder为null那么在queryPurchaseReturnOrder会抛出异常此处不需要验证purchaseReturnOrder是否为null
PurchaseReturnOrder purchaseReturnOrder = queryPurchaseReturnOrder(header.getRefOrderCode());
PurchaseReturnOrderHeader header1 = purchaseReturnOrder.getHeader();
List<PurchaseReturnOrderDetails> details1 = purchaseReturnOrder.getDetails();
boolean checkResult = onlyImplementProxyOrder.onlyImplementProxyOrder(purchaseReturnOrder, "DLCG");
if (!checkResult) {
continue;
}
//采购公司
String companyCode = header.getCompanyCode();
Assert.notNull(companyCode, "O表头公司不能为空");
@ -455,11 +468,6 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
Assert.state(false, "根据采购公司主键:{} 匹配到多个采购组织", bdCorpEntityList.get(0).getPkCorp());
}
//2024年8月22日 15:30:09 如果purchaseReturnOrder为null那么在queryPurchaseReturnOrder会抛出异常此处不需要验证purchaseReturnOrder是否为null
PurchaseReturnOrder purchaseReturnOrder = queryPurchaseReturnOrder(header.getRefOrderCode());
PurchaseReturnOrderHeader header1 = purchaseReturnOrder.getHeader();
// List<PurchaseReturnOrderDetails> details1 = purchaseReturnOrder.getDetails();
//客商基本档案(供应商类型)
//2024年8月20日 14:47:55 丽知商城OFS 供应商客商档案传递到U8C的客商
//其中自定义项1作为原系统编码因此统一传到自定义项一已经和大家确认好了没有关系的放心大胆传吧宝贝
@ -762,12 +770,12 @@ public class ProxyPurchaseReturn extends PluginBaseEntity {
* @param returnGoodHeaderDetailsDataDtoArrayList 查询得到的采购入库单
* @author liuyang
*/
private List<HeaderDetailsDto> onlyImplementProxyOrder(List<HeaderDetailsDto> returnGoodHeaderDetailsDataDtoArrayList) {
List<HeaderDetailsDto> headerDetailsDtos = new ArrayList<>();
// TODO 2024年8月23日 10:27:40 O采购单查询接口没有采购类型字段虽然接口文档里有一个类似的类型
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
}
return headerDetailsDtos;
}
// private List<HeaderDetailsDto> onlyImplementProxyOrder(List<HeaderDetailsDto> returnGoodHeaderDetailsDataDtoArrayList) {
// List<HeaderDetailsDto> headerDetailsDtos = new ArrayList<>();
// // TODO 2024年8月23日 10:27:40 O采购单查询接口没有采购类型字段虽然接口文档里有一个类似的类型
// if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
//
// }
// return headerDetailsDtos;
// }
}

View File

@ -14,6 +14,7 @@ import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.plugin.lets.ofsvo.QueryOfsSoSaleOutVo;
import com.hzya.frame.plugin.lets.u8cdto.*;
import com.hzya.frame.plugin.lets.util.OfsStandardUtil;
import com.hzya.frame.plugin.lets.util.OnlyImplementProxyOrderUtil;
import com.hzya.frame.plugin.lets.util.QueryBdBusitypeUtil;
import com.hzya.frame.plugin.lets.util.RdclUtil;
import com.hzya.frame.ttxofs.dto.InterfaceParamDto;
@ -81,6 +82,9 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
@Autowired
private OfsStandardUtil ofsStandardUtil;
@Autowired
private OnlyImplementProxyOrderUtil onlyImplementProxyOrder;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
@ -407,6 +411,14 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
StockinOrderSearchResponse.StockinOrder.StockinH header = stockinOrder.getHeader();
List<StockinOrderSearchResponse.StockinOrder.StockinB> details = stockinOrder.getDetails();
//查询OFS采购订单
OfsPoOrderData ofsPoOrderData = ofsStandardUtil.queryOfsPoOrder(header.getRefOrderCode());
Assert.notNull(ofsPoOrderData, "根据O表头编码{}无法匹配到OFS采购订单", header.getRefOrderCode());
boolean checkResult = onlyImplementProxyOrder.onlyImplementProxyOrder(ofsPoOrderData, "DLCG");
if (!checkResult) {
continue;
}
//采购公司
String companyCode = header.getCompanyCode();
Assert.notNull(companyCode, "O表头公司不能为空");
@ -505,9 +517,6 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
Assert.state(false, "根据O仓库编码+U8C收货库存组织主键匹配到U8C仓库多个", facilityCode, bdCalbodyEntities.get(0).getPkCalbody());
}
//查询OFS采购订单
OfsPoOrderData ofsPoOrderData = ofsStandardUtil.queryOfsPoOrder(header.getRefOrderCode());
PoOrderSonDto poOrderSonDto = new PoOrderSonDto();
poOrderSonDto.setBdCorpEntity(bdCorpEntityList.get(0));
poOrderSonDto.setBdDeptdocEntity(bdDeptdocEntityList.get(0));
@ -554,8 +563,6 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
* @author liuyang
*/
private String createGenerateBusinessDate(PoOrderSonDto poOrderSonDto) {
//TODO 测试
poOrderSonDto.setShipAt("2024-08-19");
if (poOrderSonDto != null && poOrderSonDto.getShipAt() != null) {
String shipAt = poOrderSonDto.getShipAt();
String businessFormat = null;
@ -689,17 +696,4 @@ public class ProxyPurchaseWarehous extends PluginBaseEntity {
}
return null;
}
/**
* 仅保留代理品牌的采退出库单
*
* @author liuyang
*/
private List<StockinOrderSearchResponse.StockinOrder> onlyImplementProxyOrder(List<StockinOrderSearchResponse.StockinOrder> returnGoodHeaderDetailsDataDtoArrayList) {
List<StockinOrderSearchResponse.StockinOrder> stockinOrderList = new ArrayList<>();
if (returnGoodHeaderDetailsDataDtoArrayList != null && returnGoodHeaderDetailsDataDtoArrayList.size() > 0) {
}
return stockinOrderList;
}
}

View File

@ -0,0 +1,60 @@
package com.hzya.frame.plugin.lets.u8cdto;
import com.hzya.frame.plugin.lets.entity.*;
import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrder;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.DetailsDto;
import com.hzya.frame.ttxofs.dto.ofssaleorderoutsearch.HeaderDto;
import lombok.Data;
import java.util.List;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.u8cdto
* @ProjectkangarooDataCenterV3
* @nameOrderOutTobHeaderDto
* @Date2024/8/12 18:07
* @FilenameOrderOutTobHeaderDto
*/
@Data
public class ReturnOrderHeaderDto extends HeaderDto {
/**
* OFS采购订单
*/
private PurchaseReturnOrder purchaseReturnOrder;
/**
* 委外订单公司
*/
private BdCorpEntity bdCorpEntity;
/**
* 库存组织
*/
private BdCalbodyEntity bdCalbodyEntity;
/**
* 供应商基本档案
*/
private BdCubasdocEntity bdCubasdocEntity;
/**
* 供应商管理档案
*/
private BdCumandocEntity bdCumandocEntity;
/**
* 采购组织
*/
private BdPurorgEntity bdPurorgEntity;
/**
* 业务流程
*/
private BdBusitypeEntity bdBusitypeEntity;
/**
* OFS采退出库单明细行
*/
private List<DetailsDto> details;
}

View File

@ -0,0 +1,95 @@
package com.hzya.frame.plugin.lets.u8cdto;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.u8cdto
* @ProjectkangarooDataCenterV3
* @nameScorderHeadDto
* @Date2024/8/26 17:14
* @FilenameScorderHeadDto
*/
@Data
public class ScorderBodyDto {
private String bisactive;
private String bomversion;
private String cassistunit;
private String ccurrencytypeid;
private String cmangid;
private String corder_bid;
private String cordersource;
private String cprojectid;
private String cprojectphaseid;
private String csourcebillcode;
private String csourcebillid;
private String csourcebillrow;
private String csourcebillrowno;
private String cupsourcebillid;
private String cupsourcebillrowid;
private String cupsourcebilltype;
private String cwarehouseid;
private String dplanarrvdate;
private String nassistnum;
private String ndiscountrate;
private String nexchangeotobrate;
private String nmoney;
private String nordernum;
private String norgnettaxprice;
private String norgtaxprice;
private String noriginalcurmny;
private String noriginalcurprice;
private String noriginalnetprice;
private String noriginalsummny;
private String noriginaltaxmny;
private String nsummny;
private String ntaxmny;
private String ntaxrate;
private String pk_defdoc1;
private String pk_defdoc10;
private String pk_defdoc11;
private String pk_defdoc12;
private String pk_defdoc13;
private String pk_defdoc14;
private String pk_defdoc15;
private String pk_defdoc16;
private String pk_defdoc17;
private String pk_defdoc18;
private String pk_defdoc19;
private String pk_defdoc2;
private String pk_defdoc20;
private String pk_defdoc3;
private String pk_defdoc4;
private String pk_defdoc5;
private String pk_defdoc6;
private String pk_defdoc7;
private String pk_defdoc8;
private String pk_defdoc9;
private String vdef1;
private String vdef10;
private String vdef11;
private String vdef12;
private String vdef13;
private String vdef14;
private String vdef15;
private String vdef16;
private String vdef17;
private String vdef18;
private String vdef19;
private String vdef2;
private String vdef20;
private String vdef3;
private String vdef4;
private String vdef5;
private String vdef6;
private String vdef7;
private String vdef8;
private String vdef9;
private String vfree1;
private String vfree2;
private String vfree3;
private String vfree4;
private String vfree5;
private String vmemo;
private String vproducenum;
}

View File

@ -0,0 +1,19 @@
package com.hzya.frame.plugin.lets.u8cdto;
import lombok.Data;
import java.util.List;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.u8cdto
* @ProjectkangarooDataCenterV3
* @nameScorderHeadDto
* @Date2024/8/26 17:14
* @FilenameScorderHeadDto
*/
@Data
public class ScorderDto {
private ScorderHeadDto parentvo;
private List<ScorderBodyDto> childrenvo;
}

View File

@ -0,0 +1,70 @@
package com.hzya.frame.plugin.lets.u8cdto;
import lombok.Data;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.u8cdto
* @ProjectkangarooDataCenterV3
* @nameScorderHeadDto
* @Date2024/8/26 17:14
* @FilenameScorderHeadDto
*/
@Data
public class ScorderHeadDto {
private String caccountbankid;
private String cbiztype;
private String cdeptid;
private String cemployeeid;
private String cgiveinvoicevendor;
private String coperator;
private String corderid;
private String cpurorganization;
private String creciever;
private String cvendormangid;
private String cwareid;
private String dorderdate;
private String pk_corp;
private String pk_defdoc1;
private String pk_defdoc10;
private String pk_defdoc11;
private String pk_defdoc12;
private String pk_defdoc13;
private String pk_defdoc14;
private String pk_defdoc15;
private String pk_defdoc16;
private String pk_defdoc17;
private String pk_defdoc18;
private String pk_defdoc19;
private String pk_defdoc2;
private String pk_defdoc20;
private String pk_defdoc3;
private String pk_defdoc4;
private String pk_defdoc5;
private String pk_defdoc6;
private String pk_defdoc7;
private String pk_defdoc8;
private String pk_defdoc9;
private String vdef1;
private String vdef10;
private String vdef11;
private String vdef12;
private String vdef13;
private String vdef14;
private String vdef15;
private String vdef16;
private String vdef17;
private String vdef18;
private String vdef19;
private String vdef2;
private String vdef20;
private String vdef3;
private String vdef4;
private String vdef5;
private String vdef6;
private String vdef7;
private String vdef8;
private String vdef9;
private String vmemo;
private String vordercode;
}

View File

@ -0,0 +1,66 @@
package com.hzya.frame.plugin.lets.util;
import cn.hutool.core.lang.Assert;
import com.hzya.frame.plugin.lets.plugin.purchase.ProxyPurchaseWarehous;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderData;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderDetails;
import com.hzya.frame.ttxofs.dto.ofspoorder.OfsPoOrderHeader;
import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrder;
import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrderDetails;
import com.hzya.frame.ttxofs.dto.ofspurchasereturnorder.PurchaseReturnOrderHeader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.util
* @ProjectkangarooDataCenterV3
* @nameOnlyImplementProxyOrderUtil
* @Date2024/8/27 13:43
* @FilenameOnlyImplementProxyOrderUtil
*/
@Component
public class OnlyImplementProxyOrderUtil {
Logger logger = LoggerFactory.getLogger(OnlyImplementProxyOrderUtil.class);
/**
* 判断是代理品牌采购还是委外加工采购订单
*
* @author liuyang
*/
public boolean onlyImplementProxyOrder(OfsPoOrderData ofsPoOrderData, String targetName) {
Assert.state(ofsPoOrderData != null, "ofsPoOrderData不能为空");
OfsPoOrderHeader header = ofsPoOrderData.getHeader();
List<OfsPoOrderDetails> details = ofsPoOrderData.getDetails();
String purchaseOrderType = header.getPurchaseOrderType();
// String targetName = "DLCG";
if (targetName.equals(purchaseOrderType)) {
return true;
}
logger.info("采购订单单号:{} 为:{}不触发代理品牌采购业务流程", header.getCode(), purchaseOrderType);
return false;
}
/**
* 判断是代理品牌采购还是委外加工采退订单
*
* @author liuyang
*/
public boolean onlyImplementProxyOrder(PurchaseReturnOrder purchaseReturnOrder, String targetName) {
Assert.state(purchaseReturnOrder != null, "ofsPoOrderData不能为空");
PurchaseReturnOrderHeader header = purchaseReturnOrder.getHeader();
List<PurchaseReturnOrderDetails> details = purchaseReturnOrder.getDetails();
String purchaseOrderType = header.getPurchaseOrderType();
if (targetName.equals(purchaseOrderType)) {
return true;
}
logger.info("采购订单单号:{} 为:{}不触发代理品牌采购业务流程", header.getCode(), purchaseOrderType);
return false;
}
}

View File

@ -1,15 +0,0 @@
package com.hzya.frame.plugin.masterData.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.plugin.masterData.entity.MdmEntity;
/**
* 客户档案(mdm_customer: table)表数据库访问层
*
* @author makejava
* @since 2024-06-21 13:52:35
*/
public interface IMdmDao extends IBaseDao<MdmEntity, String> {
}

View File

@ -1,15 +0,0 @@
package com.hzya.frame.plugin.masterData.dao.impl;
import com.hzya.frame.plugin.masterData.entity.MdmEntity;
import com.hzya.frame.plugin.masterData.dao.IMdmDao;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
/**
* 客户档案(MdmCustomer)表数据库访问层
*
* @author makejava
* @since 2024-06-21 13:52:35
*/
public class MdmDaoImpl extends MybatisGenericDao<MdmEntity, String> implements IMdmDao {
}

View File

@ -1,186 +0,0 @@
package com.hzya.frame.plugin.masterData.entity;
import java.util.Date;
import com.hzya.frame.web.entity.BaseEntity;
/**
* 客户档案(MdmCustomer)实体类
*
* @author makejava
* @since 2024-06-21 13:52:35
*/
public class MdmEntity extends BaseEntity {
/** 单据规则 */
private String documentRule;
/** 单据规则流水号 */
private Long documentRuleNum;
/** 数据状态 Y正常 N删除 F修改 */
private String dataStatus;
/** 新增数据状态 0待下发 1已下发 */
private String addStatus;
/** 修改数据状态 0待下发 1已下发 */
private String updateStatus;
/** 删除数据状态 0待下发 1已下发 */
private String deleteStatus;
/** 公司id */
private String companyId;
/** 客户编码 */
private String code;
/** 客户类型 */
private String custprop;
/** 客户状态 */
private String custstate;
/** 启用状态 */
private String enablestate;
/** 客户名称 */
private String name;
/** 国家/地区 */
private String pkCountry;
/** 客户基本分类 */
private String pkCustclass;
/** 所属集团 */
private String pkGroup;
/** 所属组织 */
private String pkOrg;
/** 纳税人登记号 */
private String taxpayerid;
public String getDocumentRule() {
return documentRule;
}
public void setDocumentRule(String documentRule) {
this.documentRule = documentRule;
}
public Long getDocumentRuleNum() {
return documentRuleNum;
}
public void setDocumentRuleNum(Long documentRuleNum) {
this.documentRuleNum = documentRuleNum;
}
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public String getAddStatus() {
return addStatus;
}
public void setAddStatus(String addStatus) {
this.addStatus = addStatus;
}
public String getUpdateStatus() {
return updateStatus;
}
public void setUpdateStatus(String updateStatus) {
this.updateStatus = updateStatus;
}
public String getDeleteStatus() {
return deleteStatus;
}
public void setDeleteStatus(String deleteStatus) {
this.deleteStatus = deleteStatus;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getCustprop() {
return custprop;
}
public void setCustprop(String custprop) {
this.custprop = custprop;
}
public String getCuststate() {
return custstate;
}
public void setCuststate(String custstate) {
this.custstate = custstate;
}
public String getEnablestate() {
return enablestate;
}
public void setEnablestate(String enablestate) {
this.enablestate = enablestate;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPkCountry() {
return pkCountry;
}
public void setPkCountry(String pkCountry) {
this.pkCountry = pkCountry;
}
public String getPkCustclass() {
return pkCustclass;
}
public void setPkCustclass(String pkCustclass) {
this.pkCustclass = pkCustclass;
}
public String getPkGroup() {
return pkGroup;
}
public void setPkGroup(String pkGroup) {
this.pkGroup = pkGroup;
}
public String getPkOrg() {
return pkOrg;
}
public void setPkOrg(String pkOrg) {
this.pkOrg = pkOrg;
}
public String getTaxpayerid() {
return taxpayerid;
}
public void setTaxpayerid(String taxpayerid) {
this.taxpayerid = taxpayerid;
}
}

View File

@ -1,375 +0,0 @@
<?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.hzya.frame.plugin.masterData.dao.impl.MdmDaoImpl">
<resultMap id="get-MdmCustomerEntity-result" type="com.hzya.frame.plugin.masterData.entity.MdmEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="documentRule" column="document_rule" jdbcType="VARCHAR"/>
<result property="documentRuleNum" column="document_rule_num" jdbcType="INTEGER"/>
<result property="dataStatus" column="data_status" jdbcType="VARCHAR"/>
<result property="addStatus" column="add_status" jdbcType="VARCHAR"/>
<result property="updateStatus" column="update_status" jdbcType="VARCHAR"/>
<result property="deleteStatus" column="delete_status" jdbcType="VARCHAR"/>
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
<result property="code" column="code" jdbcType="VARCHAR"/>
<result property="custprop" column="custprop" jdbcType="VARCHAR"/>
<result property="custstate" column="custstate" jdbcType="VARCHAR"/>
<result property="enablestate" column="enablestate" jdbcType="VARCHAR"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="pkCountry" column="pk_country" jdbcType="VARCHAR"/>
<result property="pkCustclass" column="pk_custclass" jdbcType="VARCHAR"/>
<result property="pkGroup" column="pk_group" jdbcType="VARCHAR"/>
<result property="pkOrg" column="pk_org" jdbcType="VARCHAR"/>
<result property="taxpayerid" column="taxpayerid" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "MdmCustomerEntity_Base_Column_List">
id
,document_rule
,document_rule_num
,data_status
,add_status
,update_status
,delete_status
,sorts
,create_user_id
,create_time
,modify_user_id
,modify_time
,sts
,org_id
,company_id
,code
,custprop
,custstate
,enablestate
,name
,pk_country
,pk_custclass
,pk_group
,pk_org
,taxpayerid
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity">
select
<include refid="MdmCustomerEntity_Base_Column_List" />
from mdm_customer
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
<if test="code != null and code != ''"> and code = #{code} </if>
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
<if test="name != null and name != ''"> and name = #{name} </if>
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity">
select count(1) from mdm_customer
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
<if test="create_time != null"> and create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
<if test="code != null and code != ''"> and code = #{code} </if>
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
<if test="name != null and name != ''"> and name = #{name} </if>
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity">
select
<include refid="MdmCustomerEntity_Base_Column_List" />
from mdm_customer
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
<if test="documentRule != null and documentRule != ''"> and document_rule like concat('%',#{documentRule},'%') </if>
<if test="documentRuleNum != null"> and document_rule_num like concat('%',#{documentRuleNum},'%') </if>
<if test="dataStatus != null and dataStatus != ''"> and data_status like concat('%',#{dataStatus},'%') </if>
<if test="addStatus != null and addStatus != ''"> and add_status like concat('%',#{addStatus},'%') </if>
<if test="updateStatus != null and updateStatus != ''"> and update_status like concat('%',#{updateStatus},'%') </if>
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status like concat('%',#{deleteStatus},'%') </if>
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
<if test="code != null and code != ''"> and code like concat('%',#{code},'%') </if>
<if test="custprop != null and custprop != ''"> and custprop like concat('%',#{custprop},'%') </if>
<if test="custstate != null and custstate != ''"> and custstate like concat('%',#{custstate},'%') </if>
<if test="enablestate != null and enablestate != ''"> and enablestate like concat('%',#{enablestate},'%') </if>
<if test="name != null and name != ''"> and name like concat('%',#{name},'%') </if>
<if test="pkCountry != null and pkCountry != ''"> and pk_country like concat('%',#{pkCountry},'%') </if>
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass like concat('%',#{pkCustclass},'%') </if>
<if test="pkGroup != null and pkGroup != ''"> and pk_group like concat('%',#{pkGroup},'%') </if>
<if test="pkOrg != null and pkOrg != ''"> and pk_org like concat('%',#{pkOrg},'%') </if>
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid like concat('%',#{taxpayerid},'%') </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="MdmCustomerentity_list_or" resultMap="get-MdmCustomerEntity-result" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity">
select
<include refid="MdmCustomerEntity_Base_Column_List" />
from mdm_customer
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> or id = #{id} </if>
<if test="documentRule != null and documentRule != ''"> or document_rule = #{documentRule} </if>
<if test="documentRuleNum != null"> or document_rule_num = #{documentRuleNum} </if>
<if test="dataStatus != null and dataStatus != ''"> or data_status = #{dataStatus} </if>
<if test="addStatus != null and addStatus != ''"> or add_status = #{addStatus} </if>
<if test="updateStatus != null and updateStatus != ''"> or update_status = #{updateStatus} </if>
<if test="deleteStatus != null and deleteStatus != ''"> or delete_status = #{deleteStatus} </if>
<if test="sorts != null"> or sorts = #{sorts} </if>
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
<if test="create_time != null"> or create_time = #{create_time} </if>
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
<if test="code != null and code != ''"> or code = #{code} </if>
<if test="custprop != null and custprop != ''"> or custprop = #{custprop} </if>
<if test="custstate != null and custstate != ''"> or custstate = #{custstate} </if>
<if test="enablestate != null and enablestate != ''"> or enablestate = #{enablestate} </if>
<if test="name != null and name != ''"> or name = #{name} </if>
<if test="pkCountry != null and pkCountry != ''"> or pk_country = #{pkCountry} </if>
<if test="pkCustclass != null and pkCustclass != ''"> or pk_custclass = #{pkCustclass} </if>
<if test="pkGroup != null and pkGroup != ''"> or pk_group = #{pkGroup} </if>
<if test="pkOrg != null and pkOrg != ''"> or pk_org = #{pkOrg} </if>
<if test="taxpayerid != null and taxpayerid != ''"> or taxpayerid = #{taxpayerid} </if>
and sts='Y'
</trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity" keyProperty="id" useGeneratedKeys="true">
insert into mdm_customer(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> id , </if>
<if test="documentRule != null and documentRule != ''"> document_rule , </if>
<if test="documentRuleNum != null"> document_rule_num , </if>
<if test="dataStatus != null and dataStatus != ''"> data_status , </if>
<if test="addStatus != null and addStatus != ''"> add_status , </if>
<if test="updateStatus != null and updateStatus != ''"> update_status , </if>
<if test="deleteStatus != null and deleteStatus != ''"> delete_status , </if>
<if test="sorts != null"> sorts , </if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
<if test="create_time != null"> create_time , </if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
<if test="modify_time != null"> modify_time , </if>
<if test="sts != null and sts != ''"> sts , </if>
<if test="org_id != null and org_id != ''"> org_id , </if>
<if test="companyId != null and companyId != ''"> company_id , </if>
<if test="code != null and code != ''"> code , </if>
<if test="custprop != null and custprop != ''"> custprop , </if>
<if test="custstate != null and custstate != ''"> custstate , </if>
<if test="enablestate != null and enablestate != ''"> enablestate , </if>
<if test="name != null and name != ''"> name , </if>
<if test="pkCountry != null and pkCountry != ''"> pk_country , </if>
<if test="pkCustclass != null and pkCustclass != ''"> pk_custclass , </if>
<if test="pkGroup != null and pkGroup != ''"> pk_group , </if>
<if test="pkOrg != null and pkOrg != ''"> pk_org , </if>
<if test="taxpayerid != null and taxpayerid != ''"> taxpayerid , </if>
<if test="sts == null ">sts,</if>
</trim>
)values(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if>
<if test="documentRule != null and documentRule != ''"> #{documentRule} ,</if>
<if test="documentRuleNum != null"> #{documentRuleNum} ,</if>
<if test="dataStatus != null and dataStatus != ''"> #{dataStatus} ,</if>
<if test="addStatus != null and addStatus != ''"> #{addStatus} ,</if>
<if test="updateStatus != null and updateStatus != ''"> #{updateStatus} ,</if>
<if test="deleteStatus != null and deleteStatus != ''"> #{deleteStatus} ,</if>
<if test="sorts != null"> #{sorts} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if>
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
<if test="code != null and code != ''"> #{code} ,</if>
<if test="custprop != null and custprop != ''"> #{custprop} ,</if>
<if test="custstate != null and custstate != ''"> #{custstate} ,</if>
<if test="enablestate != null and enablestate != ''"> #{enablestate} ,</if>
<if test="name != null and name != ''"> #{name} ,</if>
<if test="pkCountry != null and pkCountry != ''"> #{pkCountry} ,</if>
<if test="pkCustclass != null and pkCustclass != ''"> #{pkCustclass} ,</if>
<if test="pkGroup != null and pkGroup != ''"> #{pkGroup} ,</if>
<if test="pkOrg != null and pkOrg != ''"> #{pkOrg} ,</if>
<if test="taxpayerid != null and taxpayerid != ''"> #{taxpayerid} ,</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_customer(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, code, custprop, custstate, enablestate, name, pk_country, pk_custclass, pk_group, pk_org, taxpayerid, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.code},#{entity.custprop},#{entity.custstate},#{entity.enablestate},#{entity.name},#{entity.pkCountry},#{entity.pkCustclass},#{entity.pkGroup},#{entity.pkOrg},#{entity.taxpayerid}, 'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into mdm_customer(document_rule, document_rule_num, data_status, add_status, update_status, delete_status, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, code, custprop, custstate, enablestate, name, pk_country, pk_custclass, pk_group, pk_org, taxpayerid)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.documentRule},#{entity.documentRuleNum},#{entity.dataStatus},#{entity.addStatus},#{entity.updateStatus},#{entity.deleteStatus},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.code},#{entity.custprop},#{entity.custstate},#{entity.enablestate},#{entity.name},#{entity.pkCountry},#{entity.pkCustclass},#{entity.pkGroup},#{entity.pkOrg},#{entity.taxpayerid})
</foreach>
on duplicate key update
document_rule = values(document_rule),
document_rule_num = values(document_rule_num),
data_status = values(data_status),
add_status = values(add_status),
update_status = values(update_status),
delete_status = values(delete_status),
create_user_id = values(create_user_id),
create_time = values(create_time),
modify_user_id = values(modify_user_id),
modify_time = values(modify_time),
sts = values(sts),
org_id = values(org_id),
company_id = values(company_id),
code = values(code),
custprop = values(custprop),
custstate = values(custstate),
enablestate = values(enablestate),
name = values(name),
pk_country = values(pk_country),
pk_custclass = values(pk_custclass),
pk_group = values(pk_group),
pk_org = values(pk_org),
taxpayerid = values(taxpayerid)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity" >
update mdm_customer set
<trim suffix="" suffixOverrides=",">
<if test="documentRule != null and documentRule != ''"> document_rule = #{documentRule},</if>
<if test="documentRuleNum != null"> document_rule_num = #{documentRuleNum},</if>
<if test="dataStatus != null and dataStatus != ''"> data_status = #{dataStatus},</if>
<if test="addStatus != null and addStatus != ''"> add_status = #{addStatus},</if>
<if test="updateStatus != null and updateStatus != ''"> update_status = #{updateStatus},</if>
<if test="deleteStatus != null and deleteStatus != ''"> delete_status = #{deleteStatus},</if>
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
<if test="create_time != null"> create_time = #{create_time},</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
<if test="modify_time != null"> modify_time = #{modify_time},</if>
<if test="sts != null and sts != ''"> sts = #{sts},</if>
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
<if test="code != null and code != ''"> code = #{code},</if>
<if test="custprop != null and custprop != ''"> custprop = #{custprop},</if>
<if test="custstate != null and custstate != ''"> custstate = #{custstate},</if>
<if test="enablestate != null and enablestate != ''"> enablestate = #{enablestate},</if>
<if test="name != null and name != ''"> name = #{name},</if>
<if test="pkCountry != null and pkCountry != ''"> pk_country = #{pkCountry},</if>
<if test="pkCustclass != null and pkCustclass != ''"> pk_custclass = #{pkCustclass},</if>
<if test="pkGroup != null and pkGroup != ''"> pk_group = #{pkGroup},</if>
<if test="pkOrg != null and pkOrg != ''"> pk_org = #{pkOrg},</if>
<if test="taxpayerid != null and taxpayerid != ''"> taxpayerid = #{taxpayerid},</if>
</trim>
where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity" >
update mdm_customer set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.masterData.entity.MdmEntity" >
update mdm_customer set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="documentRule != null and documentRule != ''"> and document_rule = #{documentRule} </if>
<if test="documentRuleNum != null"> and document_rule_num = #{documentRuleNum} </if>
<if test="dataStatus != null and dataStatus != ''"> and data_status = #{dataStatus} </if>
<if test="addStatus != null and addStatus != ''"> and add_status = #{addStatus} </if>
<if test="updateStatus != null and updateStatus != ''"> and update_status = #{updateStatus} </if>
<if test="deleteStatus != null and deleteStatus != ''"> and delete_status = #{deleteStatus} </if>
<if test="sorts != null"> and sorts = #{sorts} </if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
<if test="code != null and code != ''"> and code = #{code} </if>
<if test="custprop != null and custprop != ''"> and custprop = #{custprop} </if>
<if test="custstate != null and custstate != ''"> and custstate = #{custstate} </if>
<if test="enablestate != null and enablestate != ''"> and enablestate = #{enablestate} </if>
<if test="name != null and name != ''"> and name = #{name} </if>
<if test="pkCountry != null and pkCountry != ''"> and pk_country = #{pkCountry} </if>
<if test="pkCustclass != null and pkCustclass != ''"> and pk_custclass = #{pkCustclass} </if>
<if test="pkGroup != null and pkGroup != ''"> and pk_group = #{pkGroup} </if>
<if test="pkOrg != null and pkOrg != ''"> and pk_org = #{pkOrg} </if>
<if test="taxpayerid != null and taxpayerid != ''"> and taxpayerid = #{taxpayerid} </if>
and sts='Y'
</trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from mdm_customer where id = #{id}
</delete>
</mapper>

View File

@ -1,61 +0,0 @@
package com.hzya.frame.plugin.masterData.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.sysnew.comparison.masterData.service.IMasterDataService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* 主数据同步
*
* @author makejava
* @since 2024-06-21 13:52:35
*/
public class MdmPluginInitializer extends PluginBaseEntity{
Logger logger = LoggerFactory.getLogger(MdmPluginInitializer.class);
@Autowired
private IMasterDataService masterDataService;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
@Override
public String getPluginId() {
return "MdmCustomerPlugin";
}
@Override
public String getPluginName() {
return "MdmCustomerPlugin插件";
}
@Override
public String getPluginLabel() {
return "MdmCustomerPlugin";
}
@Override
public String getPluginType() {
return "1";
}
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) {
try {
logger.info("======开始执行主数据信息同步========");
return masterDataService.queryArchives(requestJson);
}catch (Exception e){
logger.info("======执行主数据同步失败:{}========",e.getMessage());
e.printStackTrace();
}
return null;
}
}

View File

@ -1,12 +0,0 @@
package com.hzya.frame.plugin.masterData.service;
import com.hzya.frame.plugin.masterData.entity.MdmEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
* 客户档案(MdmCustomer)表服务接口
*
* @author makejava
* @since 2024-06-21 13:52:35
*/
public interface IMdmService extends IBaseService<MdmEntity, String>{
}

View File

@ -1,24 +0,0 @@
package com.hzya.frame.plugin.masterData.service.impl;
import com.hzya.frame.plugin.masterData.entity.MdmEntity;
import com.hzya.frame.plugin.masterData.dao.IMdmDao;
import com.hzya.frame.plugin.masterData.service.IMdmService;
import com.hzya.frame.plugin.masterData.service.IMdmService;
import org.springframework.beans.factory.annotation.Autowired;
import com.hzya.frame.basedao.service.impl.BaseService;
/**
* 客户档案(MdmCustomer)表服务实现类
*
* @author makejava
* @since 2024-06-21 13:52:35
*/
public class MdmServiceImpl extends BaseService<MdmEntity, String> implements IMdmService {
private IMdmDao mdmCustomerDao;
@Autowired
public void setMdmCustomerDao(IMdmDao dao) {
this.mdmCustomerDao = dao;
this.dao = dao;
}
}

View File

@ -1,138 +0,0 @@
package com.hzya.frame.plugin.seeyonExt.plugin;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.seeyon.service.ISeeYonInterFace;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
import java.util.Map;
/**
* @Description
* @Author xiangerlin
* @Date 2024/5/15 08:34
**/
public class SeeyonExtPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(SeeyonExtPluginInitializer.class);
@Autowired
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
@Autowired
private ISeeYonInterFace seeyInterFace;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "SeeyonExtPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "seeyonExt插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "seeyonExt插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* seeyonExt 重试专用插件
* @Since 3.0
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
try {
//重试方法
if (null != requestJson){
//JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
//如果这个id不为空说明是重试的
String id = requestJson.getString("integration_task_living_details_id");
if (StrUtil.isNotEmpty(id)){
//查询日志表
IntegrationTaskLivingDetailsEntity taskDetailEntity = taskLivingDetailsService.get(id);
if (null != taskDetailEntity && JSONUtil.isTypeJSON(taskDetailEntity.getRootAppPk())){
//拿到这张表的源系统ID
JSONObject jsonObject = JSONObject.parseObject(taskDetailEntity.getRootAppPk());
Map<String,String>extData = new HashMap<>();
extData.put("integration_task_living_details_id",id);//把日志id放到hzyaExtData中下游方法从这个对象里取
jsonObject.put("hzyaExtData",extData);
JSONObject param = new JSONObject();
param.put("jsonStr", JSON.toJSONString(jsonObject));
//调用seeyon标准重试方法
seeyInterFace.thirdInterfaceSeeYonDefinitionRePush(param);
}
}
}
logger.info("执行成功");
return BaseResult.getSuccessMessageEntity("执行成功");
}catch (Exception e){
e.printStackTrace();
}
return BaseResult.getSuccessMessageEntity("执行成功");
}
}

View File

@ -1,12 +0,0 @@
package com.hzya.frame.plugin.sysMessageManageLogBack.entity;
import com.hzya.frame.web.entity.BaseEntity;
public class SysESBMessageManageLogEntity extends BaseEntity {
private String name;
}

View File

@ -1,59 +0,0 @@
package com.hzya.frame.plugin.sysMessageManageLogBack.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 消息管理日志(SysMessageManageLog)表服务接口
*
* @author makejava
* @since 2024-03-08 10:22:00
*/
public class SysMessageManageLogPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(SysMessageManageLogPluginInitializer.class);
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
@Override
public String getPluginId() {
return "SysMessageManageLogPlugin";
}
@Override
public String getPluginName() {
return "ESB消息日志备份";
}
@Override
public String getPluginLabel() {
return "ESB消息日志备份";
}
@Override
public String getPluginType() {
return "1";
}
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
try {
logger.info("执行成功");
return BaseResult.getSuccessMessageEntity("执行成功");
}catch (Exception e){
e.printStackTrace();
}
return BaseResult.getSuccessMessageEntity("执行成功");
}
}

View File

@ -1,13 +0,0 @@
package com.hzya.frame.plugin.sysMessageManageLogBack.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.plugin.sysMessageManageLogBack.entity.SysESBMessageManageLogEntity;
/**
* 消息管理日志(SysMessageManageLog)表服务接口
*
* @author makejava
* @since 2024-03-08 10:22:00
*/
public interface ISysESBMessageManageLogService extends IBaseService<SysESBMessageManageLogEntity, String> {
}

View File

@ -1,15 +0,0 @@
package com.hzya.frame.plugin.sysMessageManageLogBack.service.impl;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.plugin.sysMessageManageLogBack.entity.SysESBMessageManageLogEntity;
import com.hzya.frame.plugin.sysMessageManageLogBack.service.ISysESBMessageManageLogService;
/**
* 消息管理日志(SysMessageManageLog)表服务实现类
*
* @author makejava
* @since 2024-03-08 10:22:00
*/
public class SysESBMessageManageLogServiceImpl extends BaseService<SysESBMessageManageLogEntity, String> implements ISysESBMessageManageLogService {
}

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>CBS8PayApplyPlugin</id>
<name>cbs8插件</name>
<category>202406070001</category>
</plugin>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="payApplyPluginInitializer" class="com.hzya.frame.plugin.cbs8.plugin.PayApplyPluginInitializer" />
<bean name="payResultPluginInitializer" class="com.hzya.frame.plugin.cbs8.plugin.PayResultPluginInitializer" />
<bean name="elecBillPluginInitializer" class="com.hzya.frame.plugin.cbs8.plugin.ElecBillPluginInitializer" />
<bean name="transactionDetailPluginInitializer" class="com.hzya.frame.plugin.cbs8.plugin.TransactionDetailPluginInitializer" />
<bean name="payApplyAgentPluginInitializer" class="com.hzya.frame.plugin.cbs8.plugin.PayApplyAgentPluginInitializer" />
<bean name="agentPayResultPluginInitializer" class="com.hzya.frame.plugin.cbs8.plugin.AgentPayResultPluginInitializer" />
</beans>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="cbsPluginService" class="com.hzya.frame.plugin.cbs8.service.impl.CbsPluginServiceImpl" />
</beans>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>MdmPlugin</id>
<name>MdmPlugin插件</name>
<category>90000001</category>
</plugin>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="mdmCustomerDao" class="com.hzya.frame.plugin.masterData.dao.impl.MdmDaoImpl" />
</beans>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="mdmCustomerInitializer" class="com.hzya.frame.plugin.masterData.plugin.MdmPluginInitializer" />
</beans>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="mdmCustomerService" class="com.hzya.frame.plugin.masterData.service.impl.MdmServiceImpl" />
</beans>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>MdmModulePlugin</id>
<name>MdmModulePlugin插件</name>
<category>90000001</category>
</plugin>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="mdmModuleInitializer" class="com.hzya.frame.plugin.mdmDistribute.plugin.MdmModulePluginInitializer" />
</beans>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>PayBillPlugin</id>
<name>OA付款单插件</name>
<category>202406210001</category>
</plugin>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="PayBillPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.PayBillPluginInitializer" />
<bean name="RecBillPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.RecBillPluginInitializer" />
</beans>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="PayBillPluginService" class="com.hzya.frame.plugin.a8bill.service.impl.PayBillServiceImpl" />
</beans>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>SeeyonExtPlugin</id>
<name>seeyonExt插件</name>
<category>202405150001</category>
</plugin>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="seeyonExtPluginInitializer" class="com.hzya.frame.plugin.seeyonExt.plugin.SeeyonExtPluginInitializer" />
</beans>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>SysMessageManageLogPlugin</id>
<name>SysMessageManageLogPlugin插件</name>
<category>202403080010</category>
</plugin>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
</beans>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="sysMessageManageLogInitializer" class="com.hzya.frame.plugin.sysMessageManageLogBack.plugin.SysMessageManageLogPluginInitializer" />
</beans>

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="sysESBMessageManageLogService" class="com.hzya.frame.plugin.sysMessageManageLogBack.service.impl.SysESBMessageManageLogServiceImpl" />
</beans>

View File

@ -0,0 +1,39 @@
package com.hzya.frame.plugin.lets.plugin.outsourc;
import com.hzya.frame.WebappApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.Assert.*;
/**
* @Authorliuyang
* @Packagecom.hzya.frame.plugin.lets.plugin.outsourc
* @ProjectkangarooDataCenterV3
* @nameConsignmachiningInReturnTest
* @Date2024/8/27 11:23
* @FilenameConsignmachiningInReturnTest
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = WebappApplication.class)
public class ConsignmachiningInReturnTest {
@Autowired
private ConsignmachiningInReturn consignmachiningInReturn;
@Test
public void startImplement() {
try {
consignmachiningInReturn.startImplement("LETS-SH2024082700000006");
} catch (Exception e) {
e.printStackTrace();
}
}
// @Test
// public void testStartImplement() {
// }
}

View File

@ -25,10 +25,10 @@ public class ProxyPurchaseReturnTest {
@Test
public void startImplement() {
try {
// proxyPurchaseReturn.startImplement("LETS-SH2024082200000006");
proxyPurchaseReturn.startImplement("LETS-SH2024082700000005");
proxyPurchaseReturn.startImplement("2024-01-01 00:00:00", "2024-08-07 23:59:59");
// proxyPurchaseReturn.startImplement("2024-01-01 00:00:00", "2024-08-07 23:59:59");
} catch (Exception e) {
e.printStackTrace();
}

View File

@ -27,7 +27,7 @@ public class ProxyPurchaseWarehousTest {
@Test
public void startImplement() {
try {
proxyPurchaseWarehous.startImplement("LETS-SH2024082200000006");
proxyPurchaseWarehous.startImplement("LETS-RE2024082100000013");
} catch (Exception e) {
e.printStackTrace();
}

View File

@ -1,179 +1,179 @@
package com.hzya.frame;
import cn.hutool.core.convert.Convert;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.cbs8.dto.req.PayRequestDTO;
import com.hzya.frame.cbs8.dto.req.PayResultRequestDTO;
import com.hzya.frame.cbs8.dto.res.PayResultResDTO;
import com.hzya.frame.cbs8.service.ICbs8ExtService;
import com.hzya.frame.cbs8.service.ICbs8Service;
import com.hzya.frame.cbs8.util.CBSUtil;
import com.hzya.frame.cbs8.util.CbsAccessToken;
import com.hzya.frame.plugin.cbs8.plugin.PayApplyPluginInitializer;
import com.hzya.frame.plugin.cbs8.plugin.PayResultPluginInitializer;
import com.hzya.frame.plugin.cbs8.plugin.TransactionDetailPluginInitializer;
import com.hzya.frame.plugin.seeyonExt.plugin.SeeyonExtPluginInitializer;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import com.hzya.frame.seeyon.cbs8.service.IPaymentService;
import com.hzya.frame.stringutil.StringUtil;
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
import com.hzya.frame.util.AESUtil;
import org.apache.http.protocol.HTTP;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
import java.util.*;
/**
* @ClassName dsasas
* @Description
* @Author llg
* Date 2023/7/16 8:18 上午
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {WebappApplication.class})
public class temButtom {
@Resource
SeeyonExtPluginInitializer seeyonExtPluginInitializer;
@Resource
ICbs8Service cs8Service;
@Resource
ICbs8ExtService cbs8ExtService;
@Autowired
private IPaymentService paymentService;
@Autowired
private PayApplyPluginInitializer payApplyPluginInitializer;
@Autowired
private TransactionDetailPluginInitializer transactionDetailPluginInitializer;
@Autowired
private PayResultPluginInitializer payResultPluginInitializer;
@Test
public void cbs8PluginTest(){
try {
//支付申请 测试通过
//payApplyPluginInitializer.executeBusiness(new JSONObject());
//查询交易明细 测试通过
//transactionDetailPluginInitializer.executeBusiness(new JSONObject());
//交易结果查询 未测试 OA没有日志底表无法测试
payResultPluginInitializer.executeBusiness(new JSONObject());
//电子回单测试 通过apipost测试过了可以取到cbs电子回单只是没法上传到OA
//
}catch (Exception e){
e.printStackTrace();
}
}
@Test
public void queryUnpaid(){
//查询待支付的列表
PaymentEntity paymentEntity = new PaymentEntity();
paymentEntity.setDataSourceCode("yc-test");
try {
List<PaymentEntity> paymentList = paymentService.queryUnpaid(paymentEntity);
System.out.println(paymentList);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
System.out.println("1111");
}
@Test
public void queryResultTest(){
// SysExtensionApiEntity sysExt = new SysExtensionApiEntity();
// sysExt.setBodys("{\"referenceNum\":\"CL202406140002\"}");
// cbs8ExtService.payResult(sysExt);
// System.out.println("11111");
List<PayResultResDTO> cl202406140002 = cs8Service.queryPayResult(new PayResultRequestDTO("CL202406140002"));
System.out.println("111");
}
@Test
public void cbs8ExtTest(){
PaymentEntity paymentEntity = new PaymentEntity();
paymentEntity.setReferenceNum("CL202406140003");
paymentEntity.setPayAccount("655905707410000");
paymentEntity.setPayBankName("");
paymentEntity.setAmount("99.02");
paymentEntity.setRevAccount("123456778");
paymentEntity.setRevBankName("中国工商银行总行清算中心");
paymentEntity.setRevBankType("ICB");
paymentEntity.setRevAccountName("测试账户");
paymentEntity.setCnapsCode("102100099996");
paymentEntity.setPurpose("测试用途");
paymentEntity.setBusType("202");
paymentEntity.setCurrency("10");
if (null != paymentEntity){
PayRequestDTO payRequestDTO = new PayRequestDTO();
String ferenceNum = Convert.toStr(paymentEntity.getReferenceNumNew(),paymentEntity.getReferenceNum());
payRequestDTO.setReferenceNum(ferenceNum);
payRequestDTO.setBusType(paymentEntity.getBusType());
payRequestDTO.setAmount(paymentEntity.getAmount());
payRequestDTO.setCurrency(paymentEntity.getCurrency());
payRequestDTO.setPayAccount(StringUtil.replaceBlank(paymentEntity.getPayAccount()));
payRequestDTO.setRevAccount(StringUtil.replaceBlank(paymentEntity.getRevAccount()));
payRequestDTO.setRevAccountName(StringUtil.replaceBlank(paymentEntity.getRevAccountName()));
payRequestDTO.setRevBankType(StringUtil.replaceBlank((paymentEntity.getRevBankType())));
payRequestDTO.setRevBankName(StringUtil.replaceBlank(paymentEntity.getRevBankName()));
payRequestDTO.setCnapsCode(StringUtil.replaceBlank((paymentEntity.getCnapsCode())));
payRequestDTO.setPurpose(paymentEntity.getPurpose());
payRequestDTO.setErpExtend1(paymentEntity.getPayType());
//集中支付模式
if (CBSUtil.CENTRALIZED_PAYMENT_TYPE.equals(payRequestDTO.getBusType())){
payRequestDTO.setBusiStep("1");
payRequestDTO.setApplyUnitCode(paymentEntity.getPayCompanyCode());
payRequestDTO.setPayAccount(null);
}
List<PayRequestDTO> list = new ArrayList<>();
list.add(payRequestDTO);
String requestData = JSONObject.toJSONString(list);
System.out.println("明文参数:"+requestData);
//签名
long timestamp = System.currentTimeMillis();
String sign = CBSUtil.sign(requestData,timestamp);
//加密
byte[] encryptedData = CBSUtil.encrypt(requestData);
Map<String,String> header = new HashMap();
header.put(CBSUtil.SIGN_HEADER_NAME,sign);
header.put(CBSUtil.TIMESTAMP_HEADER,Long.toString(timestamp));
header.put(HTTP.CONTENT_TYPE,CBSUtil.TARGET_CONTENT_TYPE);
header.put(CBSUtil.AUTHORIZATION,CBSUtil.BEARER+CbsAccessToken.getToken());
byte[] bodyByte = HttpRequest.post("https://cbs8-openapi-reprd.csuat.cmburl.cn/openapi/payment/openapi/v1/payment-apply-common").addHeaders(header).body(encryptedData).execute().bodyBytes();
String decrypt = CBSUtil.decrypt(bodyByte);
System.out.println(decrypt);
}
}
@Test
public void seeyonExtTest(){
JSONObject jsonStr = new JSONObject();
jsonStr.put("integration_task_living_details_id","4276973516873482804");
JSONObject requestJson = new JSONObject();
requestJson.put("jsonStr", JSON.toJSONString(jsonStr));
try {
seeyonExtPluginInitializer.executeBusiness(requestJson);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Test
public void test01() {
String a = AESUtil.encrypt("hzya@1314");
System.out.println(a);
String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
System.out.println(b);
}
}
//package com.hzya.frame;
//
//import cn.hutool.core.convert.Convert;
//import cn.hutool.http.HttpRequest;
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import com.baomidou.dynamic.datasource.annotation.DS;
//import com.hzya.frame.cbs8.dto.req.PayRequestDTO;
//import com.hzya.frame.cbs8.dto.req.PayResultRequestDTO;
//import com.hzya.frame.cbs8.dto.res.PayResultResDTO;
//import com.hzya.frame.cbs8.service.ICbs8ExtService;
//import com.hzya.frame.cbs8.service.ICbs8Service;
//import com.hzya.frame.cbs8.util.CBSUtil;
//import com.hzya.frame.cbs8.util.CbsAccessToken;
//import com.hzya.frame.plugin.cbs8.plugin.PayApplyPluginInitializer;
//import com.hzya.frame.plugin.cbs8.plugin.PayResultPluginInitializer;
//import com.hzya.frame.plugin.cbs8.plugin.TransactionDetailPluginInitializer;
//import com.hzya.frame.plugin.seeyonExt.plugin.SeeyonExtPluginInitializer;
//import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
//import com.hzya.frame.seeyon.cbs8.service.IPaymentService;
//import com.hzya.frame.stringutil.StringUtil;
//import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
//import com.hzya.frame.util.AESUtil;
//import org.apache.http.protocol.HTTP;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import javax.annotation.Resource;
//import java.util.*;
//
///**
// * @ClassName dsasas
// * @Description
// * @Author llg
// * Date 2023/7/16 8:18 上午
// */
//@RunWith(SpringRunner.class)
//@SpringBootTest(classes = {WebappApplication.class})
//public class temButtom {
//
// @Resource
// SeeyonExtPluginInitializer seeyonExtPluginInitializer;
// @Resource
// ICbs8Service cs8Service;
// @Resource
// ICbs8ExtService cbs8ExtService;
// @Autowired
// private IPaymentService paymentService;
// @Autowired
// private PayApplyPluginInitializer payApplyPluginInitializer;
//
// @Autowired
// private TransactionDetailPluginInitializer transactionDetailPluginInitializer;
// @Autowired
// private PayResultPluginInitializer payResultPluginInitializer;
//
// @Test
// public void cbs8PluginTest(){
// try {
// //支付申请 测试通过
// //payApplyPluginInitializer.executeBusiness(new JSONObject());
// //查询交易明细 测试通过
// //transactionDetailPluginInitializer.executeBusiness(new JSONObject());
// //交易结果查询 未测试 OA没有日志底表无法测试
// payResultPluginInitializer.executeBusiness(new JSONObject());
// //电子回单测试 通过apipost测试过了可以取到cbs电子回单只是没法上传到OA
// //
//
// }catch (Exception e){
// e.printStackTrace();
// }
// }
// @Test
// public void queryUnpaid(){
// //查询待支付的列表
// PaymentEntity paymentEntity = new PaymentEntity();
// paymentEntity.setDataSourceCode("yc-test");
// try {
// List<PaymentEntity> paymentList = paymentService.queryUnpaid(paymentEntity);
// System.out.println(paymentList);
// } catch (Exception e) {
// e.printStackTrace();
// throw new RuntimeException(e);
// }
// System.out.println("1111");
// }
// @Test
// public void queryResultTest(){
// // SysExtensionApiEntity sysExt = new SysExtensionApiEntity();
// // sysExt.setBodys("{\"referenceNum\":\"CL202406140002\"}");
// // cbs8ExtService.payResult(sysExt);
// // System.out.println("11111");
// List<PayResultResDTO> cl202406140002 = cs8Service.queryPayResult(new PayResultRequestDTO("CL202406140002"));
// System.out.println("111");
// }
//
// @Test
// public void cbs8ExtTest(){
// PaymentEntity paymentEntity = new PaymentEntity();
// paymentEntity.setReferenceNum("CL202406140003");
// paymentEntity.setPayAccount("655905707410000");
// paymentEntity.setPayBankName("");
// paymentEntity.setAmount("99.02");
// paymentEntity.setRevAccount("123456778");
// paymentEntity.setRevBankName("中国工商银行总行清算中心");
// paymentEntity.setRevBankType("ICB");
// paymentEntity.setRevAccountName("测试账户");
// paymentEntity.setCnapsCode("102100099996");
// paymentEntity.setPurpose("测试用途");
// paymentEntity.setBusType("202");
// paymentEntity.setCurrency("10");
// if (null != paymentEntity){
// PayRequestDTO payRequestDTO = new PayRequestDTO();
// String ferenceNum = Convert.toStr(paymentEntity.getReferenceNumNew(),paymentEntity.getReferenceNum());
// payRequestDTO.setReferenceNum(ferenceNum);
// payRequestDTO.setBusType(paymentEntity.getBusType());
// payRequestDTO.setAmount(paymentEntity.getAmount());
// payRequestDTO.setCurrency(paymentEntity.getCurrency());
// payRequestDTO.setPayAccount(StringUtil.replaceBlank(paymentEntity.getPayAccount()));
// payRequestDTO.setRevAccount(StringUtil.replaceBlank(paymentEntity.getRevAccount()));
// payRequestDTO.setRevAccountName(StringUtil.replaceBlank(paymentEntity.getRevAccountName()));
// payRequestDTO.setRevBankType(StringUtil.replaceBlank((paymentEntity.getRevBankType())));
// payRequestDTO.setRevBankName(StringUtil.replaceBlank(paymentEntity.getRevBankName()));
// payRequestDTO.setCnapsCode(StringUtil.replaceBlank((paymentEntity.getCnapsCode())));
// payRequestDTO.setPurpose(paymentEntity.getPurpose());
// payRequestDTO.setErpExtend1(paymentEntity.getPayType());
// //集中支付模式
// if (CBSUtil.CENTRALIZED_PAYMENT_TYPE.equals(payRequestDTO.getBusType())){
// payRequestDTO.setBusiStep("1");
// payRequestDTO.setApplyUnitCode(paymentEntity.getPayCompanyCode());
// payRequestDTO.setPayAccount(null);
// }
// List<PayRequestDTO> list = new ArrayList<>();
// list.add(payRequestDTO);
// String requestData = JSONObject.toJSONString(list);
// System.out.println("明文参数:"+requestData);
// //签名
// long timestamp = System.currentTimeMillis();
// String sign = CBSUtil.sign(requestData,timestamp);
// //加密
// byte[] encryptedData = CBSUtil.encrypt(requestData);
// Map<String,String> header = new HashMap();
// header.put(CBSUtil.SIGN_HEADER_NAME,sign);
// header.put(CBSUtil.TIMESTAMP_HEADER,Long.toString(timestamp));
// header.put(HTTP.CONTENT_TYPE,CBSUtil.TARGET_CONTENT_TYPE);
// header.put(CBSUtil.AUTHORIZATION,CBSUtil.BEARER+CbsAccessToken.getToken());
// byte[] bodyByte = HttpRequest.post("https://cbs8-openapi-reprd.csuat.cmburl.cn/openapi/payment/openapi/v1/payment-apply-common").addHeaders(header).body(encryptedData).execute().bodyBytes();
// String decrypt = CBSUtil.decrypt(bodyByte);
// System.out.println(decrypt);
// }
// }
// @Test
// public void seeyonExtTest(){
// JSONObject jsonStr = new JSONObject();
// jsonStr.put("integration_task_living_details_id","4276973516873482804");
// JSONObject requestJson = new JSONObject();
// requestJson.put("jsonStr", JSON.toJSONString(jsonStr));
// try {
// seeyonExtPluginInitializer.executeBusiness(requestJson);
// } catch (Exception e) {
// throw new RuntimeException(e);
// }
// }
//
// @Test
// public void test01() {
// String a = AESUtil.encrypt("hzya@1314");
// System.out.println(a);
// String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
// System.out.println(b);
// }
//
//
//
//
//}

View File

@ -49,4 +49,5 @@ public class OfsPoOrderHeader {
private String createdBy;
private String lastUpdated;
private String lastUpdatedBy;
private String purchaseOrderType;
}

View File

@ -49,4 +49,5 @@ public class PurchaseReturnOrderHeader {
private String createdBy;
private String lastUpdated;
private String lastUpdatedBy;
private String purchaseOrderType;
}