Compare commits

..

27 Commits

Author SHA1 Message Date
476474485@qq.com 208a7d842a 增加纳税人识别号验证规则 2025-04-23 17:33:58 +08:00
yuqh 71e82ff166 Merge remote-tracking branch 'origin/wansheng' into wansheng 2025-04-17 08:42:35 +08:00
yuqh fd9dfb426a 获取客户档案 2025-04-17 08:41:52 +08:00
476474485@qq.com bef193903b 调整OA插件调用方式 2025-04-07 16:35:14 +08:00
476474485@qq.com 5811f56a9d 修改供应商纳税人识别号验证规则,不允许超过18位 2025-03-25 17:30:38 +08:00
476474485@qq.com 4c808ccb40 修改供应商纳税人识别号验证规则,不允许超过18位 2025-03-25 10:12:35 +08:00
476474485@qq.com f51235e6ed 修改供应商开户行不能传递错误 2025-03-24 17:09:01 +08:00
476474485@qq.com de8d9c7e1a 修复供应商类型默认值为null 2025-03-24 12:45:45 +08:00
476474485@qq.com 77e2db8dd7 修复供应商类型默认值为null 2025-03-24 11:05:53 +08:00
476474485@qq.com 43711374d6 调整客商档案传递开户行名称 2025-03-21 22:31:30 +08:00
476474485@qq.com 916a9b9e25 调整客商档案传递开户行名称 2025-03-21 09:51:33 +08:00
476474485@qq.com 72ca4731ea Merge remote-tracking branch 'origin/wansheng' into wansheng 2025-03-20 16:30:39 +08:00
476474485@qq.com d0ba89c04c 调整客商档案传递开户行名称 2025-03-20 16:30:17 +08:00
yuqh 7dbcd66011 文件配置 2025-03-20 10:15:39 +08:00
yuqh 097cfa82e6 无流程表单附件更新代码 2025-03-20 10:11:53 +08:00
476474485@qq.com 6617e503c2 U8C 制单人 admin 2025-03-19 15:40:37 +08:00
476474485@qq.com 154949a1ec 增加供应商同步更新插件 2025-03-17 10:31:56 +08:00
476474485@qq.com 0a25d34363 增加供应商同步更新插件 2025-03-17 10:30:58 +08:00
476474485@qq.com 543abfd826 增加供应商同步更新插件 2025-03-12 09:09:49 +08:00
476474485@qq.com e43c8d6ac5 增加供应商同步更新插件 2025-03-07 18:16:59 +08:00
476474485@qq.com a6933e5a1d Merge branch 'wansheng' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into wansheng 2025-03-04 14:38:15 +08:00
lvleigang 0e5db6d0b4 万盛配置文件 2025-03-04 14:31:04 +08:00
476474485@qq.com 012d7adbc6 调整致远插件调用方式,以后致远流程事件统一通过插件处理 2025-02-28 16:12:45 +08:00
lvleigang 5d45dd740e 万盛修改接口方法 2025-02-28 13:43:12 +08:00
lvleigang 5d21e1e201 Merge branches 'fw-oa', 'fw-u8c' and 'wansheng' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into wansheng 2025-02-28 10:12:55 +08:00
lvleigang 2537ece2b1 fw-u8c分支结构上传 2024-09-14 10:17:59 +08:00
lvleigang 8b00953f47 fw-oa分支结构上传 2024-09-14 10:08:39 +08:00
157 changed files with 14443 additions and 388 deletions

View File

@ -44,7 +44,12 @@
<profile.active>zqtlocal</profile.active>
</properties>
</profile>
<profile>
<id>wansheng</id> <!--万向-->
<properties>
<profile.active>wansheng</profile.active>
</properties>
</profile>
</profiles>
<build>
<finalName>kangarooDataCenterV3</finalName>

View File

@ -2,6 +2,7 @@ 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.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -51,6 +52,7 @@ public class MdmPluginInitializer extends PluginBaseEntity{
public JsonResultEntity executeBusiness(JSONObject requestJson) {
try {
logger.info("======开始执行主数据信息同步========");
//return BaseResult.getSuccessMessageEntity("成功123");
return masterDataService.queryArchives(requestJson);
}catch (Exception e){
logger.info("======执行主数据同步失败:{}========",e.getMessage());

View File

@ -0,0 +1,18 @@
package com.hzya.frame.plugin.wscustomersynchronizationevent.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.plugin.wscustomersynchronizationevent.entity.WsCustomerSynchronizationEventEntity;
/****
* 万盛客商档案同步插件
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 10:57
* @param
* @return
**/
public interface IWsCustomerSynchronizationEventDao extends IBaseDao<WsCustomerSynchronizationEventEntity, String> {
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.plugin.wscustomersynchronizationevent.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.plugin.wscustomersynchronizationevent.dao.IWsCustomerSynchronizationEventDao;
import com.hzya.frame.plugin.wscustomersynchronizationevent.entity.WsCustomerSynchronizationEventEntity;
/***
* 万盛客商
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 11:12
* @param
* @return
**/
public class WsCustomerSynchronizationEventDaoImpl extends MybatisGenericDao<WsCustomerSynchronizationEventEntity, String> implements IWsCustomerSynchronizationEventDao {
}

View File

@ -0,0 +1,16 @@
package com.hzya.frame.plugin.wscustomersynchronizationevent.entity;
import com.hzya.frame.web.entity.BaseEntity;
/****
* 万盛客商档案实体类
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 10:53
* @param
* @return
**/
public class WsCustomerSynchronizationEventEntity extends BaseEntity {
}

View File

@ -0,0 +1,31 @@
<?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-WsCustomerSynchronizationEventEntity-result" type="com.hzya.frame.plugin.wscustomersynchronizationevent.entity.WsCustomerSynchronizationEventEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "WsCustomerSynchronizationEventEntity_Base_Column_List">
id
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-WsCustomerSynchronizationEventEntity-result" parameterType = "com.hzya.frame.plugin.wscustomersynchronizationevent.entity.WsCustomerSynchronizationEventEntity">
select
<include refid="WsCustomerSynchronizationEventEntity_Base_Column_List" />
from mdm_customer
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if>
</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>
</mapper>

View File

@ -0,0 +1,64 @@
package com.hzya.frame.plugin.wscustomersynchronizationevent.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.wscustomersynchronizationevent.service.IWsCustomerSynchronizationEventService;
import com.hzya.frame.sysnew.comparison.masterData.service.IMasterDataService;
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;
/**
* 主数据同步
*
* @author makejava
* @since 2024-06-21 13:52:35
*/
public class WsCustomerSynchronizationEventPluginInitializer extends PluginBaseEntity{
Logger logger = LoggerFactory.getLogger(WsCustomerSynchronizationEventPluginInitializer.class);
@Autowired
private IWsCustomerSynchronizationEventService customerSynchronizationEventService;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
@Override
public String getPluginId() {
return "WsCustomerSynchronizationEventPluginInitializer";
}
@Override
public String getPluginName() {
return "万盛A8客商接收数据插件";
}
@Override
public String getPluginLabel() {
return "WsCustomerSynchronizationEventPluginInitializer";
}
@Override
public String getPluginType() {
return "1";
}
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) {
try {
logger.info("======开始执行客商档案同步========");
return customerSynchronizationEventService.customerSynchronization(requestJson);
// return masterDataService.queryArchives(requestJson);
}catch (Exception e){
logger.info("======客商档案同步失败:{}========",e.getMessage());
e.printStackTrace();
return BaseResult.getFailureMessageEntity("======客商档案同步失败:{}========",e.getMessage());
}
}
}

View File

@ -0,0 +1,28 @@
package com.hzya.frame.plugin.wscustomersynchronizationevent.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.plugin.wscustomersynchronizationevent.entity.WsCustomerSynchronizationEventEntity;
import com.hzya.frame.web.entity.JsonResultEntity;
/***
* 万盛客商档案同步插件
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 10:55
* @param
* @return
**/
public interface IWsCustomerSynchronizationEventService extends IBaseService<WsCustomerSynchronizationEventEntity, String> {
/****
* 万盛客商档案同步插件根据不同类型事件处理客商信息
* @content: onBeforeStart 发起前验证供应商重复 onProcessFinished 结束后同步数据到U8C
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 14:11
* @param
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
JsonResultEntity customerSynchronization(JSONObject requestJson);
}

View File

@ -0,0 +1,515 @@
package com.hzya.frame.plugin.wscustomersynchronizationevent.service.impl;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.crypto.SecureUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.plugin.wscustomersynchronizationevent.dao.IWsCustomerSynchronizationEventDao;
import com.hzya.frame.plugin.wscustomersynchronizationevent.entity.WsCustomerSynchronizationEventEntity;
import com.hzya.frame.plugin.wscustomersynchronizationevent.service.IWsCustomerSynchronizationEventService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import com.sun.org.apache.xerces.internal.dom.DeferredEntityReferenceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Map;
/***
* 万盛客商档案同步插件
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 10:56
* @param
* @return
**/
public class WsCustomerSynchronizationEventServiceImpl extends BaseService<WsCustomerSynchronizationEventEntity, String> implements IWsCustomerSynchronizationEventService {
//定义两个环境属性根据环境绑定OA参数
private final String TEST = "TEST";
private final String DEV = "DEV";
private IWsCustomerSynchronizationEventDao wsCustomerSynchronizationEventDao;
@Autowired
public void setWsCustomerSynchronizationEventDao(IWsCustomerSynchronizationEventDao wsCustomerSynchronizationEventDao) {
this.wsCustomerSynchronizationEventDao = wsCustomerSynchronizationEventDao;
this.dao = wsCustomerSynchronizationEventDao;
}
@Override
public JsonResultEntity customerSynchronization(JSONObject requestJson) {
JSONObject reqJson = new JSONObject();
JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
JSONObject businessDataStr = jsonStr.getJSONObject("businessDataStr");
String formAppId = requestJson.getString("formAppId");
String eventType = requestJson.getString("eventType");
switch (eventType) {
case "onBeforeStart":
//发起前事件验证供应商重复
return validateCustomerName(businessDataStr);
case "onBeforeFinishWorkitem":
//发起前事件OA插件错误,临时配置事件
return validateCustomerName(businessDataStr);
case "onProcessFinished":
//流程结束事件同步客商到U8C
return optionCustomerSynchronization(businessDataStr);
default:
return BaseResult.getFailureMessageEntity("未匹配到流程监听事件当前传入的eventType" + eventType);
}
}
/****
* 验证客商档案重复
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-03 15:22
* @param
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
private JsonResultEntity validateCustomerName(JSONObject data) {
JSONObject formBean = data.getJSONObject("formmain_4389");
//客商名称
String field0006 = formBean.getString("field0006").trim();
//纳税人登记号
String field0007 = formBean.getString("field0007");
JSONObject requestJson = new JSONObject();
requestJson.put("custname", field0006);
String body = requestApi("validateCustomerName", requestJson, "800054", "8000540095", null);
JSONObject req = JSON.parseObject(body);
boolean flag = req.getBoolean("flag");
if (flag) {
JSONObject attribute = req.getJSONObject("attribute");
String status = attribute.getString("status");
if ("success".equals(status)) {
JSONObject detailsData = attribute.getJSONObject("data");
Integer allcount = detailsData.getInteger("allcount");
if (allcount > 0) {
return BaseResult.getFailureMessageEntity("客商名称重复!");
} else {
requestJson = new JSONObject();
if(null != field0007 && !"".equals(field0007)){
if(field0007.trim().length()>18){
logger.info("当前纳税人识别号接收数据field0007.trim():"+field0007.trim());
return BaseResult.getFailureMessageEntity("纳税人识别号不允许超过18位");
}
requestJson.put("taxpayer", field0007.trim());
body = requestApi("validateCustomerName", requestJson, "800054", "8000540095", null);
req = JSON.parseObject(body);
flag = req.getBoolean("flag");
if (flag) {
attribute = req.getJSONObject("attribute");
status = attribute.getString("status");
if ("success".equals(status)) {
detailsData = attribute.getJSONObject("data");
allcount = detailsData.getInteger("allcount");
if (allcount > 0) {
return BaseResult.getFailureMessageEntity("纳税人识别号重复!");
} else {
return BaseResult.getSuccessMessageEntity("客商未重复!");
}
} else {
return BaseResult.getFailureMessageEntity("转发失败!");
}
} else {
return BaseResult.getFailureMessageEntity("转发失败!" + req.getString("msg"));
}
}else{
return BaseResult.getSuccessMessageEntity("纳税人识别号为空,不校验!");
}
}
} else {
return BaseResult.getFailureMessageEntity("转发失败!");
}
} else {
return BaseResult.getFailureMessageEntity("转发失败!" + req.getString("msg"));
}
}
/****
* 执行客商同步新增和分配
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-04 10:45
* @param
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
private JsonResultEntity optionCustomerSynchronization(JSONObject data) {
JSONObject formBean = data.getJSONObject("formmain_4389");
//客商名称
String field0006 = formBean.getString("field0006");
//纳税人登记号
String field0007 = formBean.getString("field0007");
//绑定客商参数
JSONObject requestJson = bindMerchantParameters(data, DEV);
String apiCode = "8000540093";
String body = requestApi("optionCustomerSynchronization客商新增", requestJson, "800054", apiCode, null);
JSONObject req = JSON.parseObject(body);
boolean flag = req.getBoolean("flag");
String pk_cubasdoc = null;
if (flag) {
JSONObject attribute = req.getJSONObject("attribute");
String status = attribute.getString("status");
if ("success".equals(status)) {
JSONArray returnData = attribute.getJSONArray("data");
if (null != returnData && returnData.size() > 0) {
pk_cubasdoc = returnData.getJSONObject(0).getJSONObject("parentvo").getString("pk_cubasdoc");
String custcode = returnData.getJSONObject(0).getJSONObject("parentvo").getString("custcode");
//执行客商档案编码回传OA
updateCustomerCode(formBean.getString("id"), custcode,DEV);
}
logger.info("客商新增成功!返回数据", body);
} else {
logger.info("客商新增失败!返回数据", body);
}
} else {
return BaseResult.getFailureMessageEntity("转发失败!" + req.getJSONObject("attribute").getString("errormsg"));
}
//绑定客商分配参数
requestJson = bindMerchantDefineParameters(data, pk_cubasdoc,DEV);
try {
logger.info("新增客商后客商分配参数休眠10秒后触发");
// 休眠 10 1000 毫秒为 1 10 秒则是 10 * 1000
Thread.sleep(10 * 1000);
} catch (InterruptedException e) {
// 处理中断异常这里简单打印异常信息
logger.info("新增客商后客商分配参数休眠10秒失败"+e.getMessage());
e.printStackTrace();
}
body = requestApi("optionCustomerSynchronization客商分配", requestJson, "800054", "8000540094", null);
req = JSON.parseObject(body);
flag = req.getBoolean("flag");
if (flag) {
JSONObject attribute = req.getJSONObject("attribute");
String status = attribute.getString("status");
if ("success".equals(status)) {
logger.info("客商分配成功!返回数据", body);
} else {
logger.info("客商分配失败!返回数据", body);
}
} else {
return BaseResult.getFailureMessageEntity("转发失败!" + req.getJSONObject("attribute").getString("errormsg"));
}
return BaseResult.getSuccessMessageEntity("执行客商同步方法成功");
}
/***
* 更新OA客商编码
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-07 16:43
* @param
* @return com.alibaba.fastjson.JSONObject
**/
private JSONObject updateCustomerCode(String id, String custcode,String environment ) {
String sql = "update formmain_4389 set field0005 = '" + custcode + "' where id = " + id;
String md5 = SecureUtil.md5(sql);
System.out.println("明文摘要" + md5);
String key = "`o7eotan9ws8c:aj";
String encrypt = SecureUtil.aes(key.getBytes()).encryptHex(sql);
JSONObject requestJson = new JSONObject();
requestJson.put("userName", "hzya_rest");
/** 生产环境和测试环境字段不一致,根据环境切换绑定*/
String pk_currtype = null;
if(DEV.equals(environment)){
//所属地区编码
requestJson.put("password", "1742a2f4-6cc2-44cd-af75-d67c885b4dc1");
// requestJson.put("password", "2d6dd7fb-239a-4a0b-8c0a-5003647e9238");
}else{
requestJson.put("password", "45562434-8459-47b4-8df0-78fad8405bc4");
}
requestJson.put("data", encrypt);
requestJson.put("sign", md5);
String tokenRest = requestApi("获取token", requestJson, "800055", "8000550010", null);
String token = JSON.parseObject(tokenRest).getJSONObject("attribute").getString("id");
String result = requestApi("更新A8客商档案", requestJson, "800055", "8000550000", token);
//调用OArest接口
logger.info("更新A8客商档案结果:" + result);
return null;
}
/***
* 绑定客商分配参数
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-05 15:02
* @param
* @param pk_cubasdoc
* @return com.alibaba.fastjson.JSONObject
**/
private JSONObject bindMerchantDefineParameters(JSONObject data, String pk_cubasdoc,String environment) {
JSONObject formBean = data.getJSONObject("formmain_4389");
JSONObject returnData = new JSONObject();
JSONArray custbasvo = new JSONArray();
//客商档案
JSONObject customer = new JSONObject();
if(DEV.equals(environment)){
//分配公司
customer.put("pk_corp", formBean.getString("field0058"));
//币种类别
customer.put("pk_currtype1", formBean.getString("field0062"));
}else{
//分配公司
customer.put("pk_corp", formBean.getString("field0064"));
//币种类别
customer.put("pk_currtype1", formBean.getString("field0057"));
}
String custprop = formBean.getString("field0027");
//客商属性 0客户1供应商2 客商
switch (custprop) {
case "4109154014131407336":
//客户
custprop = "0";
break;
case "-6536959240623403744":
//供应商
custprop = "1";
break;
case "5695613751532077780":
//客商
custprop = "2";
break;
default:
custprop = null;
break;
}
customer.put("custprop", custprop);
//客商ID
customer.put("pk_cubasdoc", pk_cubasdoc);
customer.put("creator", "admin");
custbasvo.add(customer);
returnData.put("custbasvo", custbasvo);
return returnData;
}
/****
* 请求API
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-04 16:52
* @param
* @return java.lang.String
**/
private String requestApi(String method, JSONObject requestJson, String appId, String apiCode, String token) {
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
.put("apiCode", String.valueOf(apiCode))
//这里用中台做为发送方
.put("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
.put("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
.put("appId", appId)
.build();
if (null != token) {
headerMap.put("token", token);
}
String body = HttpRequest.post("http://127.0.0.1:10085/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(requestJson.toJSONString()).timeout(60000).execute().body();
logger.info("中台转发到ESB" + method + ":{}", body);
return body;
}
/****
* 绑定客商新增OA和U8C客商参数
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2025-03-04 10:53
* @param
* @return com.alibaba.fastjson.JSONObject
**/
private JSONObject bindMerchantParameters(JSONObject data,String environment) {
JSONObject formBean = data.getJSONObject("formmain_4389");
JSONObject returnData = new JSONObject();
JSONArray cbdocvo = new JSONArray();
//客商档案
JSONObject customer = new JSONObject();
JSONArray banks = new JSONArray();
JSONObject bank = new JSONObject();
JSONObject parentvo = new JSONObject();
bank.put("accaddr", "银行地址");
/** 生产环境和测试环境字段不一致,根据环境切换绑定*/
String pk_currtype = null;
if(DEV.equals(environment)){
//所属地区编码
parentvo.put("pk_areacl", formBean.getString("field0060"));
//币种类别
pk_currtype = formBean.getString("field0062");
//银行类别
bank.put("banktypename", formBean.getString("field0064"));
}else{
//所属地区编码
parentvo.put("pk_areacl", formBean.getString("field0062"));
//币种类别
pk_currtype = formBean.getString("field0057");
//银行类别 TODO 修改为取编码
bank.put("banktypename", formBean.getString("field0036"));
}
//账户属性
String accountproperty = formBean.getString("field0042")== null?"":formBean.getString("field0042");
switch (accountproperty) {
case "-3164025096780690930":
accountproperty = "电汇账户";
break;
case "7943667274710336919":
accountproperty = "电汇和承兑账户";
break;
case "2952563644985590023":
accountproperty = "承兑账户";
break;
default:
accountproperty = null;
break;
}
//账户性质 field0042
bank.put("remcode", accountproperty);
//银行账号
bank.put("account", formBean.getString("field0011"));
//账户名称
bank.put("accountname", formBean.getString("field0012"));
bank.put("defflag", "Y");
bank.put("memo", formBean.getString("field0054"));
//开户银行 传递以后名称
bank.put("accname", formBean.getString("field0013"));
// bank.put("pk_bankdoc", formBean.getString("field0013"));
//新增固定传递集团
bank.put("pk_corp", formBean.getString("0001"));
bank.put("pk_currtype", pk_currtype);
banks.add(bank);
//创建人 U8C 制单人 admin
// parentvo.put("creator",formBean.getString("field0019"));
parentvo.put("creator", "admin");
//客商名称
parentvo.put("custname", formBean.getString("field0006").trim());
//客商类型0 - 外部单位1 - 内部核算单位2 - 内部法人单位3 - 内部渠道成员
String custprop = formBean.getString("field0026")== null?"":formBean.getString("field0026");
switch (custprop) {
case "-5116388890160378443":
custprop = "0";
break;
case "8996290534573949076":
custprop = "1";
break;
case "-2495523144656008721":
custprop = "2";
break;
case "7042886455598794854":
custprop = "3";
break;
default:
custprop = null;
break;
}
parentvo.put("custprop", custprop);
//客商简称
parentvo.put("custshortname", formBean.getString("field0001"));
//销售方式
String def1 = formBean.getString("field0024")== null?"":formBean.getString("field0024");
switch (def1) {
case "-285414580163689148":
def1 = "经销";
break;
case "-3463202988521339445":
def1 = "直销";
break;
default:
def1 = null;
break;
}
//销售方式
parentvo.put("def1", def1);
// 运输 自定义项8 001 002
String def8 = formBean.getString("field0048")== null?"":formBean.getString("field0048");
switch (def8) {
case "-8661769604040273924":
def8 = "001";
break;
case "-5350125814390239390":
def8 = "002";
break;
default:
def8 = null;
break;
}
parentvo.put("def8", def8);
//货代 自定义项7 001 002
String def7 = formBean.getString("field0050") == null?"":formBean.getString("field0050");
switch (def7) {
case "-8661769604040273924":
def7 = "001";
break;
case "-5350125814390239390":
def7 = "002";
break;
default:
def7 = null;
break;
}
parentvo.put("def7", def7);
//供应商类型 自定义项9 01 生产商 02 贸易商 03 服务商
String def9 = formBean.getString("field0065") == null?"":formBean.getString("field0065");
switch (def9) {
case "4599320723300108944":
def9 = "01";
break;
case "-2027733563790049244":
def9 = "02";
break;
case "-2468198780444524154":
def9 = "03";
break;
default:
def9 = null;
break;
}
parentvo.put("def9", def9 );
//邮箱
parentvo.put("email", formBean.getString("field0052"));
//联系人1
parentvo.put("linkman1", formBean.getString("field0010"));
parentvo.put("memo", formBean.getString("field0054"));
//通信地址
parentvo.put("conaddr", formBean.getString("field0038"));
//电话1 电话手机
parentvo.put("phone1", formBean.getString("field0008"));
//总公司名称 TODO 修改为取编码
parentvo.put("pk_cubasdoc1", formBean.getString("field0034"));
//纳税人识别号
parentvo.put("taxpayerid", formBean.getString("field0007"));
customer.put("parentvo", parentvo);
customer.put("banks", banks);
cbdocvo.add(customer);
returnData.put("cbdocvo", cbdocvo);
return returnData;
}
}

View File

@ -0,0 +1,85 @@
package com.hzya.frame.plugin.wsdata.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.seeyon.customer.service.ICustomerService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import com.jcraft.jsch.Channel;
import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.Session;
import com.jcraft.jsch.SftpATTRS;
import com.jcraft.jsch.SftpException;
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.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;
/**
* 主数据模版(MdmModule)表服务接口
*
* @author makejava
* @since 2024-06-18 10:33:32
*/
public class WsDataInitializer extends PluginBaseEntity {
@Autowired
private ICustomerService customerService;
Logger logger = LoggerFactory.getLogger(WsDataInitializer.class);
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
@Override
public String getPluginId() {
return "WsDataInitializer";
}
@Override
public String getPluginName() {
return "获取CRM客户档案";
}
@Override
public String getPluginLabel() {
return "WsDataInitializer";
}
@Override
public String getPluginType() {
return "1";
}
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) {
JsonResultEntity result = new JsonResultEntity();
try {
result =customerService.getCrmCustomer(requestJson);
} catch (Exception e) {
throw new RuntimeException(e);
}
return result;
}
}

View File

@ -1,23 +0,0 @@
#######################澳星环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: GBK
file:
# 日志保存路径
path: E:\yongansystem\log
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: E:\yongansystem\file
zt:
url: http://127.0.0.1:9081/kangarooDataCenterV3/entranceController/externalCallInterface

View File

@ -1,27 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: D:\yongansystem\kangarooDataCenter\v3\logs
spring:
datasource:
dynamic:
datasource:
master:
# url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
# username: root
# password: bd993088e8a7c3dc5f44441617f9b4bf
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: D:\yongansystem\kangarooDataCenter\v3\logs
zt:
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface

View File

@ -1,82 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /Users/apple/Desktop/log/local
spring:
data:
mongodb:
# host: 192.168.2.237
# port: 27017
# database: businesscenter
# auto-index-creation: true
# password: hzya1314
# username: hzya
flyway:
# 启动flyway migration, 默认为true
enabled: false
datasource:
dynamic:
druid:
filters: stat,log4j2
datasource:
master:
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
# username: hzyazt
# password: 62e4295b615a30dbf3b8ee96f41c820b
# driver-class-name: dm.jdbc.driver.DmDriver
# type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
# url: jdbc:dm://hzya.ufyct.com:9040/businesscenter?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
# username: hzyazt
# password: 62e4295b615a30dbf3b8ee96f41c820b
# driver-class-name: dm.jdbc.driver.DmDriver
savefile:
# 文件保存路径
path: /Users/apple/Desktop/log/local
tomcatpath: /Users/apple/Desktop/log/local
pluginpath: /Users/apple/Desktop/log/local
zt:
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
# 这个私钥到时候上传到cbs和下面到是同一对
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826
#电子回单下载临时存放位置
elec_path: /Users/xiangerlin/Downloads/
OA:
data_source_code: yc_oa
server:
port: 10086
# mysqldump -d mylm -hhzya.ufyct.com -p9096 -uroot -phzya1314 >%dirName%\table_view.sql
database:
databaseName: businesscenter
host: 192.168.2.237
port: 3306
username: root
password: hzya@1314
filePase: /Users/apple/Desktop/log
fileName: data.sql
#sftp:
# host: 192.168.2.237
# port: 9091
# username: cs237
# password: hzya@1314
# filePase: /databaseBack

View File

@ -1,23 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /Users/apple/Desktop/log/local
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: /Users/apple/Desktop/log/local
zt:
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface

View File

@ -0,0 +1,53 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: D:\yongansystem\log
spring:
data:
mongodb:
# host: 192.168.2.237
# port: 27017
# database: businesscenter
# auto-index-creation: true
# password: hzya1314
# username: hzya
flyway:
# 启动flyway migration, 默认为true
enabled: false
datasource:
dynamic:
druid:
filters: stat,log4j2
datasource:
master:
url: jdbc:mysql://192.168.3.42:3306/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: D:\yongansystem\file
tomcatpath: D:\yongansystem\apache-tomcat-9.0.97
pluginpath: D:\yongansystem\apache-tomcat-9.0.97\webapps\kangarooDataCenterV3\WEB-INF\classes
zt:
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
database:
# databaseName: businesscenter
# host: 192.168.2.237
# port: 3306
# username: root
# password: hzya@1314
# filePase: /Users/apple/Desktop/log
# fileName: data.sql
#sftp:
# host: 192.168.2.237
# port: 9091
# username: cs237
# password: hzya@1314
# filePase: /databaseBack

View File

@ -1,35 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /Users/xiangerlin/work/app/logs/dev
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: /Users/xiangerlin/work/app/file/dev
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
# 这个私钥到时候上传到cbs和下面到是同一对
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826F3067A6B93BC3839C836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185
#电子回单下载临时存放位置
elec_path: /Users/xiangerlin/Downloads/
OA:
data_source_code: yc-test

View File

@ -1,90 +0,0 @@
#logging:
# #日志级别 指定目录级别
# level:
# root: info
# encodings: UTF-8
# file:
# # 日志保存路径
# path: /zt/log
#spring:
# flyway:
# # 启动flyway migration, 默认为true
# enabled: false
# datasource:
# dynamic:
# druid:
# filters: stat,log4j2
# datasource:
# master:
# url: jdbc:dm://10.75.51.82:5238?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
# username: businesscenter
# password: 6842568689469adad597d144ee104063
# driver-class-name: dm.jdbc.driver.DmDriver
#savefile:
# # 文件保存路径
# path: /zt/file
#公司mysql
#ax:
# url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
#logging:
# #日志级别 指定目录级别warn
# level:
# root: info
# encodings: UTF-8
# file:
# # 日志保存路径
# path: /home/webservice/zt/log
#spring:
# datasource:
# dynamic:
# datasource:
# master:
# url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
# username: root
# password: 62e4295b615a30dbf3b8ee96f41c820b
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
#savefile:
# # 文件保存路径
# path: /home/webservice/zt/file
#公司服务器达梦
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /zt/log
spring:
flyway:
# 启动flyway migration, 默认为true
enabled: false
datasource:
dynamic:
druid:
filters: stat,log4j2
datasource:
master:
url: jdbc:dm://ufidahz.com.cn:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
username: hzyazt
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: dm.jdbc.driver.DmDriver
savefile:
# 文件保存路径
path: /zt/file
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
# 这个私钥到时候上传到cbs和下面到是同一对
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826
#电子回单下载临时存放位置
elec_path: /zt/elecfile
OA:
data_source_code: yc_oa

View File

@ -1,21 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /Users/xiangerlin/work/app/logs/ydc
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: bd993088e8a7c3dc5f44441617f9b4bf
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: /Users/xiangerlin/work/app/logs/ydc

View File

@ -1,31 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /Users/xiangerlin/work/app/logs/yuecheng
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: /Users/xiangerlin/work/app/logs/yuecheng
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
# 这个私钥到时候上传到cbs和下面到是同一对
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826F3067A6B93BC3839C836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185

View File

@ -1,23 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: E:\yongansystem\log
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: bd993088e8a7c3dc5f44441617f9b4bf
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: E:\yongansystem\log
zt:
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface

View File

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

View File

@ -0,0 +1,5 @@
<?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="WsDataInitializer" class="com.hzya.frame.plugin.wsdata.plugin.WsDataInitializer" />
</beans>

View File

@ -31,14 +31,14 @@ import java.util.Map;
* Date 2023/7/16 8:18 上午
*/
//@RunWith(SpringRunner.class)
//@SpringBootTest(classes = {WebappApplication.class})
//@SpringBootTest(classes = a{WebappApplication.class})
public class temButtom {
@Test
public void test01() {
String a = AESUtil.encrypt("hzya@1314");
System.out.println(a);
String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
String b = AESUtil.decrypt("617e55dada79e04983a2dfcb3c63ad10");
System.out.println(b);
}

View File

@ -54,22 +54,22 @@
<!-- <artifactId>fw-ningbobank</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.hzya.frame</groupId>-->
<!-- <artifactId>fw-oa</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.hzya.frame</groupId>
<artifactId>fw-oa</artifactId>
<version>${revision}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.hzya.frame</groupId>-->
<!-- <artifactId>fw-u8</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.hzya.frame</groupId>-->
<!-- <artifactId>fw-u8c</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.hzya.frame</groupId>
<artifactId>fw-u8c</artifactId>
<version>${revision}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.hzya.frame</groupId>-->

48
fw-oa/pom.xml Normal file
View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>kangarooDataCenterV3</artifactId>
<groupId>com.hzya.frame</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fw-oa</artifactId>
<packaging>jar</packaging>
<version>${revision}</version>
<dependencies>
<dependency>
<groupId>com.hzya.frame</groupId>
<artifactId>base-service</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector-java}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法为了解决Unable to find main class的问题 -->
<classifier>execute</classifier> <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
<skip>true</skip>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,74 @@
package com.hzya.frame.seeyon.cap4.form.dto;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.List;
/**
* @Description 无流程表单批量保存请求参数
* @Author xiangerlin
* @Date 2024/1/8 11:18
**/
public class FormDTO {
@JSONField(ordinal = 4)
private String formCode;//模版编号
@JSONField(ordinal = 5)
private String loginName;//模版编号
@JSONField(ordinal = 2)
private String rightId;//权限id找到无流程表单点新增弹出的窗口上会有这个参数
@JSONField(ordinal = 3)
private List<FormDataDTO> dataList;//导入的数据
@JSONField(ordinal = 1)
private String[] uniqueFiled;//更新用的唯一标识
@JSONField(ordinal = 6)
private Boolean doTrigger;//是否执行触发(Since V8.0sp2),测试中发现传了这个参数会报错
public String getFormCode() {
return formCode;
}
public void setFormCode(String formCode) {
this.formCode = formCode;
}
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getRightId() {
return rightId;
}
public void setRightId(String rightId) {
this.rightId = rightId;
}
public List<FormDataDTO> getDataList() {
return dataList;
}
public void setDataList(List<FormDataDTO> dataList) {
this.dataList = dataList;
}
public String[] getUniqueFiled() {
return uniqueFiled;
}
public void setUniqueFiled(String[] uniqueFiled) {
this.uniqueFiled = uniqueFiled;
}
public Boolean getDoTrigger() {
return doTrigger;
}
public void setDoTrigger(Boolean doTrigger) {
this.doTrigger = doTrigger;
}
}

View File

@ -0,0 +1,36 @@
package com.hzya.frame.seeyon.cap4.form.dto;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.List;
/**
* @Description dataList节点
* @Author xiangerlin
* @Date 2024/1/8 11:26
**/
public class FormDataDTO {
@JSONField(ordinal = 1)
private MasterTableDTO masterTable;//主表数据
@JSONField(ordinal = 2)
private List<SubTableDTO> subTables;//子表数据
//private List<> attachmentInfos;//附件列表
public MasterTableDTO getMasterTable() {
return masterTable;
}
public void setMasterTable(MasterTableDTO masterTable) {
this.masterTable = masterTable;
}
public List<SubTableDTO> getSubTables() {
return subTables;
}
public void setSubTables(List<SubTableDTO> subTables) {
this.subTables = subTables;
}
}

View File

@ -0,0 +1,45 @@
package com.hzya.frame.seeyon.cap4.form.dto;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.List;
/**
* @Description 主表数据
* @Author xiangerlin
* @Date 2024/1/8 11:29
**/
public class MasterTableDTO {
@JSONField(ordinal = 1)
private String name;//表名
@JSONField(ordinal = 2)
private RecordDTO record;//数据
@JSONField(ordinal = 3)
private List<String> changedFields;//需要计算的字段
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public RecordDTO getRecord() {
return record;
}
public void setRecord(RecordDTO record) {
this.record = record;
}
public List<String> getChangedFields() {
return changedFields;
}
public void setChangedFields(List<String> changedFields) {
this.changedFields = changedFields;
}
}

View File

@ -0,0 +1,34 @@
package com.hzya.frame.seeyon.cap4.form.dto;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.List;
/**
* @Description record节点
* @Author xiangerlin
* @Date 2024/1/8 11:31
**/
public class RecordDTO {
@JSONField(ordinal = 1)
private long id;//数据id测试中发现新增时这个参数随便填写 不影响导入
@JSONField(ordinal = 2)
private List<RecordFieldDTO> fields;//字段列表
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public List<RecordFieldDTO> getFields() {
return fields;
}
public void setFields(List<RecordFieldDTO> fields) {
this.fields = fields;
}
}

View File

@ -0,0 +1,52 @@
package com.hzya.frame.seeyon.cap4.form.dto;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* @Description masterTablerecordfields的结构
* @Author xiangerlin
* @Date 2024/1/8 11:32
**/
public class RecordFieldDTO {
@JSONField(ordinal = 1)
private String name;//数据域名称 ,fieldxxxx
@JSONField(ordinal = 2)
private String value;//数据值优先
@JSONField(ordinal = 3)
private String showValue;//显示值
public RecordFieldDTO() {
}
public RecordFieldDTO(String name, String value, String showValue) {
this.name = name;
this.value = value;
this.showValue = showValue;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getShowValue() {
return showValue;
}
public void setShowValue(String showValue) {
this.showValue = showValue;
}
}

View File

@ -0,0 +1,9 @@
package com.hzya.frame.seeyon.cap4.form.dto;
/**
* @Description 子表数据
* @Author xiangerlin
* @Date 2024/1/8 11:29
**/
public class SubTableDTO {
}

View File

@ -0,0 +1,12 @@
package com.hzya.frame.seeyon.cbs8.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
/**
* @Description 代发代扣
* @Author xiangerlin
* @Date 2024/6/26 10:50
**/
public interface IAgentPaymentDao extends IBaseDao<AgentPaymentEntity,String> {
}

View File

@ -0,0 +1,12 @@
package com.hzya.frame.seeyon.cbs8.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
/**
* @Description 代发代扣明细
* @Author xiangerlin
* @Date 2024/6/26 10:54
**/
public interface IAgentPaymentDetailDao extends IBaseDao<AgentPaymentDetailEntity,String> {
}

View File

@ -0,0 +1,12 @@
package com.hzya.frame.seeyon.cbs8.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
/**
* @Description cbs8支付日志
* @Author xiangerlin
* @Date 2024/6/14 17:30
**/
public interface ICbsLogDao extends IBaseDao<CbsLogEntity,String> {
}

View File

@ -0,0 +1,10 @@
package com.hzya.frame.seeyon.cbs8.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
/**
* oa集成cbs
*/
public interface IPaymentDao extends IBaseDao<PaymentEntity,String> {
}

View File

@ -0,0 +1,12 @@
package com.hzya.frame.seeyon.cbs8.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity;
/**
* @Description cbs交易明细 oa底表
* @Author xiangerlin
* @Date 2024/6/24 11:10
**/
public interface ITransactionDetailDao extends IBaseDao<TransactionDetailEntity,String> {
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.seeyon.cbs8.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDao;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
import org.springframework.stereotype.Repository;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/26 10:51
**/
@Repository("OAAgentPaymentDaoImpl")
public class AgentPaymentDaoImpl extends MybatisGenericDao<AgentPaymentEntity,String> implements IAgentPaymentDao {
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.seeyon.cbs8.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDetailDao;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
import org.springframework.stereotype.Repository;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/26 10:55
**/
@Repository("OAAgentPaymentDetailDaoImpl")
public class AgentPaymentDetailDaoImpl extends MybatisGenericDao<AgentPaymentDetailEntity,String> implements IAgentPaymentDetailDao {
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.seeyon.cbs8.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.cbs8.dao.ICbsLogDao;
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
import org.springframework.stereotype.Repository;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/14 17:31
**/
@Repository()
public class CbsLogDaoImpl extends MybatisGenericDao<CbsLogEntity,String> implements ICbsLogDao {
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.seeyon.cbs8.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.cbs8.dao.IPaymentDao;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import org.springframework.stereotype.Repository;
/**
* @Description oa集成cbs
* @Author xiangerlin
* @Date 2024/6/6 16:28
**/
@Repository("OAPaymentDaoImpl")
public class PaymentDaoImpl extends MybatisGenericDao<PaymentEntity,String> implements IPaymentDao {
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.seeyon.cbs8.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.cbs8.dao.IPaymentDao;
import com.hzya.frame.seeyon.cbs8.dao.ITransactionDetailDao;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity;
import org.springframework.stereotype.Repository;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/24 11:10
**/
@Repository("OATransactionDetailDaoImpl")
public class TransactionDetailDaoImpl extends MybatisGenericDao<TransactionDetailEntity,String> implements ITransactionDetailDao {
}

View File

@ -0,0 +1,113 @@
package com.hzya.frame.seeyon.cbs8.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* @Description 代发代扣明细表
* @Author xiangerlin
* @Date 2024/6/18 14:58
**/
public class AgentPaymentDetailEntity extends BaseEntity {
//每笔明细金额
private String dtlAmount;
//收款账号
private String dtlRevAccount;
//联行号 同行可不传跨行必传
private String dtlCnapsCode;
//收款账户名称
private String dtlRevName;
//收款开户行 ,如果传的联行号能匹配到对应到开户行cbs8会自动带出
private String dtlRevBankName;
//主表id
private String formmainId;
//表名
private String tabName;
//明细序号从1开始递增
private int dtlSeqNum;
//支付结果
private String payResult;
//支付日期
private String payDate;
public String getDtlAmount() {
return dtlAmount;
}
public void setDtlAmount(String dtlAmount) {
this.dtlAmount = dtlAmount;
}
public String getDtlRevAccount() {
return dtlRevAccount;
}
public void setDtlRevAccount(String dtlRevAccount) {
this.dtlRevAccount = dtlRevAccount;
}
public String getDtlCnapsCode() {
return dtlCnapsCode;
}
public void setDtlCnapsCode(String dtlCnapsCode) {
this.dtlCnapsCode = dtlCnapsCode;
}
public String getDtlRevName() {
return dtlRevName;
}
public void setDtlRevName(String dtlRevName) {
this.dtlRevName = dtlRevName;
}
public String getDtlRevBankName() {
return dtlRevBankName;
}
public void setDtlRevBankName(String dtlRevBankName) {
this.dtlRevBankName = dtlRevBankName;
}
public String getFormmainId() {
return formmainId;
}
public void setFormmainId(String formmainId) {
this.formmainId = formmainId;
}
public String getTabName() {
return tabName;
}
public void setTabName(String tabName) {
this.tabName = tabName;
}
public int getDtlSeqNum() {
return dtlSeqNum;
}
public void setDtlSeqNum(int dtlSeqNum) {
this.dtlSeqNum = dtlSeqNum;
}
public String getPayResult() {
return payResult;
}
public void setPayResult(String payResult) {
this.payResult = payResult;
}
public String getPayDate() {
return payDate;
}
public void setPayDate(String payDate) {
this.payDate = payDate;
}
}

View File

@ -0,0 +1,84 @@
<?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.seeyon.cbs8.dao.impl.AgentPaymentDetailDaoImpl">
<resultMap id="get-AgentPaymentDetailEntity-result" type="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity">
<result property="id" column="id" />
<result property="formmainId" column="formmainId" />
<result property="tabName" column="tabName" />
<result property="dtlSeqNum" column="dtlSeqNum" />
<result property="dtlAmount" column="dtlAmount" />
<result property="dtlRevAccount" column="dtlRevAccount" />
<result property="dtlCnapsCode" column="dtlCnapsCode" />
<result property="dtlRevName" column="dtlRevName" />
<result property="dtlRevBankName" column="dtlRevBankName" />
<result property="payResult" column="payResult" />
<result property="payDate" column="payDate" />
</resultMap>
<sql id="AgentPaymentDetailEntity_Base_Column_List">
id,
formmainId,
tabName,
dtlSeqNum,
dtlAmount,
dtlRevAccount,
dtlCnapsCode,
dtlRevName,
dtlRevBankName,
payResult,
payDate
</sql>
<!-- 采用==查询 -->
<select id="entity_list_base" resultMap="get-AgentPaymentDetailEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity">
select
<include refid="AgentPaymentDetailEntity_Base_Column_List"/>
from (
SELECT
formson_0225.id,
formson_0225.formmain_id AS formmainId,
'formson_0225' AS tabName,
formson_0225.field0001 AS dtlSeqNum,
formson_0225.field0019 AS dtlAmount,
formson_0225.field0036 AS dtlRevAccount,
formson_0225.field0035 AS dtlCnapsCode,
formson_0225.field0037 AS dtlRevName,
formson_0225.field0034 AS dtlRevBankName,
formson_0225.field0044 AS payResult,
formson_0225.field0045 AS payDate
FROM
formson_0225
)formson_0225
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' "> formson_0225.id = #{id} </if>
<if test="formmainId != null and formmainId !='' "> and formson_0225.formmainId = #{formmainId} </if>
<if test="tabName != null and tabName !='' "> and formson_0225.tabName = #{tabName} </if>
<if test="dtlSeqNum != null and dtlSeqNum !='' "> and formson_0225.dtlSeqNum = #{dtlSeqNum} </if>
<if test="dtlAmount != null and dtlAmount !='' "> and formson_0225.dtlAmount = #{dtlAmount} </if>
<if test="dtlRevAccount != null and dtlRevAccount !='' "> and formson_0225.dtlRevAccount = #{dtlRevAccount} </if>
<if test="dtlCnapsCode != null and dtlCnapsCode !='' "> and formson_0225.dtlCnapsCode = #{dtlCnapsCode} </if>
<if test="dtlRevName != null and dtlRevName !='' "> and formson_0225.dtlRevName = #{dtlRevName} </if>
<if test="dtlRevBankName != null and dtlRevBankName !='' "> and formson_0225.dtlRevBankName = #{dtlRevBankName} </if>
</trim>
</select>
<update id="entity_update" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity">
update formson_0225 set
<trim suffix="" suffixOverrides=",">
<if test="payDate != null and payDate !='' ">field0045 =#{payDate},</if>
<if test="payResult != null and payResult !='' ">field0044 =#{payResult}</if>
</trim>
where id = #{id}
</update>
<!-- 更新支付结果 -->
<update id="entity_update_result" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity">
update formson_0225 set
<trim suffix="" suffixOverrides=",">
<if test="payDate != null and payDate !='' ">field0045 =#{payDate},</if>
<if test="payResult != null and payResult !='' ">field0044 =#{payResult}</if>
</trim>
where field0001=#{dtlSeqNum} and field0019=#{dtlAmount} and field0035=#{dtlCnapsCode} and field0037=#{dtlRevName}
</update>
</mapper>

View File

@ -0,0 +1,145 @@
package com.hzya.frame.seeyon.cbs8.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* @Description 代发代扣 主表
* @Author xiangerlin
* @Date 2024/6/18 14:44
**/
public class AgentPaymentEntity extends BaseEntity {
//oa id
private String oaId;
private String finishedflag;
//流程标题
private String title;
//业务参考号
private String referenceNum;
/**
* 业务类型
* 201-代扣
* 203-代发
* 代发工资传203
*/
private String busType;
//总金额 小数位2位
private String amount;
//币种
private String currency;
//付款账号
private String payAccount;
//用途
private String purpose;
//申请单号
private String applyCode;
//支付结果
private String payResult;
private String tableName;//表名称
private String billName;//单据名称
public String getReferenceNum() {
return referenceNum;
}
public void setReferenceNum(String referenceNum) {
this.referenceNum = referenceNum;
}
public String getBusType() {
return busType;
}
public void setBusType(String busType) {
this.busType = busType;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public String getPayAccount() {
return payAccount;
}
public void setPayAccount(String payAccount) {
this.payAccount = payAccount;
}
public String getPurpose() {
return purpose;
}
public void setPurpose(String purpose) {
this.purpose = purpose;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getBillName() {
return billName;
}
public void setBillName(String billName) {
this.billName = billName;
}
public String getOaId() {
return oaId;
}
public void setOaId(String oaId) {
this.oaId = oaId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getFinishedflag() {
return finishedflag;
}
public void setFinishedflag(String finishedflag) {
this.finishedflag = finishedflag;
}
public String getApplyCode() {
return applyCode;
}
public void setApplyCode(String applyCode) {
this.applyCode = applyCode;
}
public String getPayResult() {
return payResult;
}
public void setPayResult(String payResult) {
this.payResult = payResult;
}
}

View File

@ -0,0 +1,126 @@
<?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.seeyon.cbs8.dao.impl.AgentPaymentDaoImpl">
<resultMap id="get-AgentPaymentEntity-result" type="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity">
<result property="oaId" column="oaId" />
<result property="title" column="title" />
<result property="finishedflag" column="finishedflag" />
<result property="referenceNum" column="referenceNum" />
<result property="busType" column="busType" />
<result property="amount" column="amount" />
<result property="currency" column="currency" />
<result property="payAccount" column="payAccount" />
<result property="purpose" column="purpose" />
<result property="tableName" column="tableName" />
<result property="billName" column="billName" />
<result property="applyCode" column="applyCode" />
<result property="payResult" column="payResult" />
</resultMap>
<sql id="AgentPaymentEntity_Base_Column_List">
oaId,
tableName,
finishedflag,
title,
billName,
referenceNum,
busType,
amount,
currency,
payAccount,
applyCode,
payResult,
purpose
</sql>
<!-- 采用==查询 -->
<select id="entity_list_base" resultMap="get-AgentPaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity">
select
<include refid="AgentPaymentEntity_Base_Column_List"/>
from (
SELECT
formmain_0224.id AS oaId,
'formmain_0224' as tableName,
formmain_0224.finishedflag,
COL_SUMMARY.SUBJECT AS title,
'工资表' AS billName,
formmain_0224.field0002 AS referenceNum,
'203' AS busType,
formmain_0224.field0020 AS amount,
'10' AS currency,
'755915707610112' AS payAccount,
formmain_0224.field0043 AS applyCode,
formmain_0224.field0046 AS payResult,
'工资' AS purpose
FROM
formmain_0224
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0224.id
)formmain_0224
<trim prefix="where" prefixOverrides="and">
<if test="referenceNum != null and referenceNum !='' "> formmain_0224.referenceNum = #{referenceNum} </if>
<if test="busType != null and busType !='' "> and formmain_0224.busType = #{busType} </if>
<if test="amount != null and amount !='' ">and formmain_0224.amount = #{amount} </if>
<if test="currency != null and currency !='' "> and formmain_0224.currency = #{currency} </if>
<if test="payAccount != null and payAccount !='' ">and formmain_0224.payAccount = #{payAccount} </if>
<if test="applyCode != null and applyCode !='' ">and formmain_0224.applyCode = #{applyCode} </if>
<if test="payResult != null and payResult !='' ">and formmain_0224.payResult = #{payResult} </if>
<if test="purpose != null and purpose !='' "> and formmain_0224.purpose = #{purpose} </if>
<if test="tableName != null and tableName !='' "> and formmain_0224.tableName = #{tableName} </if>
<if test="oaId != null and oaId !='' ">and formmain_0224.oaId = #{oaId} </if>
<if test="title != null and title !='' "> and formmain_0224.title = #{title} </if>
<if test="billName != null and billName !='' "> and formmain_0224.billName = #{billName} </if>
<if test="finishedflag != null and finishedflag !='' "> and formmain_0224.finishedflag = #{finishedflag} </if>
</trim>
</select>
<select id="entity_list_base_unpaid" resultMap="get-AgentPaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity">
select
<include refid="AgentPaymentEntity_Base_Column_List"/>
from (
SELECT
formmain_0224.id AS oaId,
'formmain_0224' as tableName,
formmain_0224.finishedflag,
COL_SUMMARY.SUBJECT AS title,
'工资表' AS billName,
formmain_0224.field0002 AS referenceNum,
'203' AS busType,
formmain_0224.field0020 AS amount,
'10' AS currency,
'755915707610112' AS payAccount,
formmain_0224.field0043 AS applyCode,
formmain_0224.field0046 AS payResult,
'工资' AS purpose
FROM
formmain_0224
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0224.id
)formmain_0224
<trim prefix="where" prefixOverrides="and">
<if test="referenceNum != null and referenceNum !='' "> formmain_0224.referenceNum = #{referenceNum} </if>
<if test="busType != null and busType !='' "> and formmain_0224.busType = #{busType} </if>
<if test="amount != null and amount !='' ">and formmain_0224.amount = #{amount} </if>
<if test="currency != null and currency !='' "> and formmain_0224.currency = #{currency} </if>
<if test="payAccount != null and payAccount !='' ">and formmain_0224.payAccount = #{payAccount} </if>
<if test="applyCode != null and applyCode !='' ">and formmain_0224.applyCode = #{applyCode} </if>
<if test="purpose != null and purpose !='' "> and formmain_0224.purpose = #{purpose} </if>
<if test="tableName != null and tableName !='' "> and formmain_0224.tableName = #{tableName} </if>
<if test="oaId != null and oaId !='' ">and formmain_0224.oaId = #{oaId} </if>
<if test="title != null and title !='' "> and formmain_0224.title = #{title} </if>
<if test="billName != null and billName !='' "> and formmain_0224.billName = #{billName} </if>
<if test="finishedflag != null and finishedflag !='' "> and formmain_0224.finishedflag = #{finishedflag} </if>
</trim>
and formmain_0224.applyCode is null
and formmain_0224.payResult is null
</select>
<update id="entity_update" parameterType="com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity">
update formmain_0224 set
<trim suffix="" suffixOverrides=",">
<if test="applyCode != null and applyCode !='' ">field0043 =#{applyCode},</if>
<if test="payResult != null and payResult !='' ">field0046 =#{payResult}</if>
</trim>
where id = #{oaId}
</update>
</mapper>

View File

@ -0,0 +1,151 @@
package com.hzya.frame.seeyon.cbs8.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* @Description cbs支付日志
* @Author xiangerlin
* @Date 2024/6/14 17:16
**/
public class CbsLogEntity extends BaseEntity {
//流程标题
private String title;
//请款主体
private String pay_company;
//收款人
private String payee;
//金额
private String amount;
//cbs申请单号
private String cbs_apply_code;
//日志表id
private String id;
//oa单据id
private String oa_id;
//oa单据号
private String bill_code;
//英文表名
private String tab_name_en;
//中文表名
private String tab_name_ch;
//支付状态
private String pay_state;
//支付信息
private String message;
//支付申请状态
private String apply_state;
//成功标记
private String successed;
public String getOa_id() {
return oa_id;
}
public void setOa_id(String oa_id) {
this.oa_id = oa_id;
}
public String getBill_code() {
return bill_code;
}
public void setBill_code(String bill_code) {
this.bill_code = bill_code;
}
public String getTab_name_en() {
return tab_name_en;
}
public void setTab_name_en(String tab_name_en) {
this.tab_name_en = tab_name_en;
}
public String getTab_name_ch() {
return tab_name_ch;
}
public void setTab_name_ch(String tab_name_ch) {
this.tab_name_ch = tab_name_ch;
}
public String getPay_state() {
return pay_state;
}
public void setPay_state(String pay_state) {
this.pay_state = pay_state;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getApply_state() {
return apply_state;
}
public void setApply_state(String apply_state) {
this.apply_state = apply_state;
}
public String getSuccessed() {
return successed;
}
public void setSuccessed(String successed) {
this.successed = successed;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getPay_company() {
return pay_company;
}
public void setPay_company(String pay_company) {
this.pay_company = pay_company;
}
public String getPayee() {
return payee;
}
public void setPayee(String payee) {
this.payee = payee;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getCbs_apply_code() {
return cbs_apply_code;
}
public void setCbs_apply_code(String cbs_apply_code) {
this.cbs_apply_code = cbs_apply_code;
}
}

View File

@ -0,0 +1,116 @@
<?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.seeyon.cbs8.dao.impl.CbsLogDaoImpl">
<resultMap id="get-CbsLogEntity-result" type="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
<result property="id" column="id" />
<result property="oa_id" column="oa_id" />
<result property="bill_code" column="bill_code" />
<result property="tab_name_en" column="tab_name_en" />
<result property="tab_name_ch" column="tab_name_ch" />
<result property="pay_state" column="pay_state" />
<result property="message" column="message" />
<result property="apply_state" column="apply_state" />
<result property="successed" column="successed" />
<result property="title" column="title" />
<result property="pay_company" column="pay_company" />
<result property="payee" column="payee" />
<result property="amount" column="amount" />
<result property="cbs_apply_code" column="cbs_apply_code" />
</resultMap>
<sql id="CbsLogEntity_Base_Column_List">
id,
field0002 as title,
field0003 as pay_company,
field0004 as payee,
field0005 as cbs_apply_code,
field0006 as bill_code,
field0007 as oa_id,
field0008 as tab_name_ch,
field0009 as tab_name_en,
field0010 as pay_state,
field0011 as message,
field0012 as apply_state,
field0014 as successed
</sql>
<!-- 查询推送失败,用户手动发起请求 采用==查询 -->
<select id="entity_list_base" resultMap="get-CbsLogEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
select
<include refid="CbsLogEntity_Base_Column_List"/>
from
formmain_0232
<trim prefix="where" prefixOverrides="and">
<if test="title != null and title !='' "> field0002 = #{title} </if>
<if test="pay_company != null and pay_company !='' "> and field0003 = #{pay_company} </if>
<if test="payee != null and payee !='' "> and field0004 = #{payee} </if>
<if test="cbs_apply_code != null and cbs_apply_code !='' "> and field0005 = #{cbs_apply_code} </if>
<if test="bill_code != null and bill_code !='' "> and field0006 = #{bill_code} </if>
<if test="oa_id != null and oa_id !='' "> and field0007 = #{oa_id} </if>
<if test="tab_name_ch != null and tab_name_ch !='' "> and field0008 = #{tab_name_ch} </if>
<if test="tab_name_en != null and tab_name_en !='' "> and field0009 = #{tab_name_en} </if>
<if test="pay_state != null and pay_state !='' "> and field0010 = #{pay_state} </if>
<if test="message != null and message !='' "> and field0011 = #{message} </if>
<if test="apply_state != null and apply_state !='' "> and field0012 = #{apply_state} </if>
<if test="successed != null and successed !='' "> and field0014 = #{successed} </if>
</trim>
</select>
<select id="entity_list_like" resultMap="get-CbsLogEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
select
<include refid="CbsLogEntity_Base_Column_List"/>
from
formmain_0232
<trim prefix="where" prefixOverrides="and">
<if test="title != null and title !='' "> field0002 = #{title} </if>
<if test="id != null and id !='' "> and id = #{id} </if>
<if test="pay_company != null and pay_company !='' "> and field0003 like '${pay_company}%' </if>
<if test="payee != null and payee !='' "> and field0004 like '${payee}%' </if>
<if test="cbs_apply_code != null and cbs_apply_code !='' "> and field0005 like '${cbs_apply_code}%' </if>
<if test="bill_code != null and bill_code !='' "> and field0006 like '${bill_code}%' </if>
<if test="oa_id != null and oa_id !='' "> and field0007 = #{oa_id} </if>
<if test="tab_name_ch != null and tab_name_ch !='' "> and field0008 like '${tab_name_ch}%' </if>
<if test="tab_name_en != null and tab_name_en !='' "> and field0009 like '${tab_name_en}%' </if>
<if test="pay_state != null and pay_state !='' "> and field0010 like '${pay_state}%' </if>
<if test="message != null and message !='' "> and field0011 like '${message}%' </if>
<if test="apply_state != null and apply_state !='' "> and field0012 like '${apply_state}%' </if>
<if test="successed != null and successed !='' "> and field0014 like '${successed}%' </if>
</trim>
</select>
<select id="CbsLogEntity_list_base_in_payment" resultMap="get-CbsLogEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
select
<include refid="CbsLogEntity_Base_Column_List"/>
from
formmain_0232
<trim prefix="where" prefixOverrides="and">
<if test="oa_id != null and oa_id !='' "> field0007 = #{oa_id} </if>
<if test="id != null and id !='' "> and id = #{id} </if>
<if test="bill_code != null and bill_code !='' "> and field0006 = #{bill_code} </if>
<if test="tab_name_en != null and tab_name_en !='' "> and field0008 = #{tab_name_en} </if>
<if test="tab_name_ch != null and tab_name_ch !='' "> and field0009 = #{tab_name_ch} </if>
<if test="pay_state != null and pay_state !='' "> and field0010 = #{pay_state} </if>
<if test="message != null and message !='' "> and field0011 = #{message} </if>
<if test="apply_state != null and apply_state !='' "> and field0012 = #{apply_state} </if>
<if test="successed != null and successed !='' "> and field0014 = #{successed} </if>
and (field0010='支付中'
or field0010 not in ('审批撤销','审批拒绝','处理失败','退票','支付成功','取消支付','修改支付','支付失败','推送失败'))
</trim>
</select>
<!--修改视图支付状态-->
<update id="entity_update" parameterType="com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity">
update formmain_0232 set
<trim suffix="" suffixOverrides=",">
<if test="pay_state != null and pay_state !='' ">field0010 =#{pay_state},</if>
field0011 =#{message},
<if test="apply_state != null and apply_state !='' ">field0012 =#{apply_state},</if>
<if test="successed != null and successed !='' ">field0014 =#{successed}</if>
</trim>
where id = #{id}
</update>
</mapper>

View File

@ -0,0 +1,327 @@
package com.hzya.frame.seeyon.cbs8.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/6 16:17
**/
public class PaymentEntity extends BaseEntity {
private String oaId;//主表id
private String formsonId;//明细表id
private String payCompany;//付款公司
private String title;//流程标题
private String tableName;//表名称
private String billName;//单据名称
private String referenceNum;//业务参考号 唯一id
private String referenceNumNew;//重试的时候生成新的业务参考号
private String busType;//业务类型
private String payResultField;//支付结果字段
private String payDateField;//打款日期字段
private String applyCodeField;//支付申请单号字段
private String receiptFiled;//电子回单字段
private String summaryId;//summaryid
private String startDate;//单据日期
private String finishedflag;//流程状态
private String payDate;//打款日期
private String payResult;//支付结果
private String applyCode;//支付申请单号
private String payAccount;//付款账号
private String payBankName;//付款开户银行
private String amount;//金额
private String purpose;//支付用途
private String revAccount;//收款账号
private String revBankName;//收款开户行名称
private String revBankType;//收款银行类型
private String revAccountName;//收款账户名称
private String cnapsCode;//联行号
private String receipt;//电子回单
private String currency;//币种 数字
private String currencyName;//币种 中文
private String currencyCode;//币种编码
private String personalFlag;//公私标记
private String payType;//付款类别
private String payCompanyCode;//付款公司编码
public String getOaId() {
return oaId;
}
public void setOaId(String oaId) {
this.oaId = oaId;
}
public String getPayCompany() {
return payCompany;
}
public void setPayCompany(String payCompany) {
this.payCompany = payCompany;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getBillName() {
return billName;
}
public void setBillName(String billName) {
this.billName = billName;
}
public String getReferenceNum() {
return referenceNum;
}
public void setReferenceNum(String referenceNum) {
this.referenceNum = referenceNum;
}
public String getReferenceNumNew() {
return referenceNumNew;
}
public void setReferenceNumNew(String referenceNumNew) {
this.referenceNumNew = referenceNumNew;
}
public String getBusType() {
return busType;
}
public void setBusType(String busType) {
this.busType = busType;
}
public String getPayResultField() {
return payResultField;
}
public void setPayResultField(String payResultField) {
this.payResultField = payResultField;
}
public String getPayDateField() {
return payDateField;
}
public void setPayDateField(String payDateField) {
this.payDateField = payDateField;
}
public String getReceiptFiled() {
return receiptFiled;
}
public void setReceiptFiled(String receiptFiled) {
this.receiptFiled = receiptFiled;
}
public String getSummaryId() {
return summaryId;
}
public void setSummaryId(String summaryId) {
this.summaryId = summaryId;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getFinishedflag() {
return finishedflag;
}
public void setFinishedflag(String finishedflag) {
this.finishedflag = finishedflag;
}
public String getPayDate() {
return payDate;
}
public void setPayDate(String payDate) {
this.payDate = payDate;
}
public String getPayResult() {
return payResult;
}
public void setPayResult(String payResult) {
this.payResult = payResult;
}
public String getPayAccount() {
return payAccount;
}
public void setPayAccount(String payAccount) {
this.payAccount = payAccount;
}
public String getPayBankName() {
return payBankName;
}
public void setPayBankName(String payBankName) {
this.payBankName = payBankName;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getPurpose() {
return purpose;
}
public void setPurpose(String purpose) {
this.purpose = purpose;
}
public String getRevAccount() {
return revAccount;
}
public void setRevAccount(String revAccount) {
this.revAccount = revAccount;
}
public String getRevBankName() {
return revBankName;
}
public void setRevBankName(String revBankName) {
this.revBankName = revBankName;
}
public String getRevBankType() {
return revBankType;
}
public void setRevBankType(String revBankType) {
this.revBankType = revBankType;
}
public String getRevAccountName() {
return revAccountName;
}
public void setRevAccountName(String revAccountName) {
this.revAccountName = revAccountName;
}
public String getCnapsCode() {
return cnapsCode;
}
public void setCnapsCode(String cnapsCode) {
this.cnapsCode = cnapsCode;
}
public String getReceipt() {
return receipt;
}
public void setReceipt(String receipt) {
this.receipt = receipt;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public String getCurrencyName() {
return currencyName;
}
public void setCurrencyName(String currencyName) {
this.currencyName = currencyName;
}
public String getCurrencyCode() {
return currencyCode;
}
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
public String getPersonalFlag() {
return personalFlag;
}
public void setPersonalFlag(String personalFlag) {
this.personalFlag = personalFlag;
}
public String getPayType() {
return payType;
}
public void setPayType(String payType) {
this.payType = payType;
}
public String getPayCompanyCode() {
return payCompanyCode;
}
public void setPayCompanyCode(String payCompanyCode) {
this.payCompanyCode = payCompanyCode;
}
public String getFormsonId() {
return formsonId;
}
public void setFormsonId(String formsonId) {
this.formsonId = formsonId;
}
public String getApplyCodeField() {
return applyCodeField;
}
public void setApplyCodeField(String applyCodeField) {
this.applyCodeField = applyCodeField;
}
public String getApplyCode() {
return applyCode;
}
public void setApplyCode(String applyCode) {
this.applyCode = applyCode;
}
}

View File

@ -0,0 +1,339 @@
<?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.seeyon.cbs8.entity.PaymentEntity">
<resultMap id="get-PaymentEntity-result" type="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
<result property="referenceNum" column="referenceNum" />
<result property="busType" column="busType" />
<result property="title" column="title" />
<result property="amount" column="amount" />
<result property="currency" column="currency" />
<result property="payAccount" column="payAccount" jdbcType="VARCHAR" />
<result property="revAccount" column="revAccount" />
<result property="revAccountName" column="revAccountName" />
<result property="revBankType" column="revBankType" />
<result property="revBankName" column="revBankName" />
<result property="cnapsCode" column="cnapsCode" />
<result property="purpose" column="purpose" />
<result property="personalFlag" column="personalFlag" />
<result property="tableName" column="tableName" />
<result property="oaId" column="oaId" />
<result property="formsonId" column="formsonId" />
<result property="payCompany" column="payCompany" />
<result property="billName" column="billName" />
<result property="payResultField" column="payResultField" />
<result property="payDateField" column="payDateField" />
<result property="applyCodeField" column="applyCodeField" />
<result property="applyCode" column="applyCode" />
<result property="receiptFiled" column="receiptFiled" />
<result property="summaryId" column="summaryId" />
<result property="startDate" column="startDate" />
<result property="finishedflag" column="finishedflag" />
<result property="payDate" column="payDate" />
<result property="payResult" column="payResult" />
<result property="payBankName" column="payBankName" />
<result property="receipt" column="receipt" />
<result property="payType" column="payType" />
<result property="payCompanyCode" column="payCompanyCode" />
</resultMap>
<sql id="PaymentEntity_Base_Column_List">
oaId,
formsonId,
payCompany,
payCompanyCode,
title,
tableName,
billName,
referenceNum,
busType,
payResultField,
payDateField,
applyCodeField,
receiptFiled,
summaryId,
startDate,
finishedflag,
payDate,
payResult,
applyCode,
payAccount,
payBankName,
amount,
purpose,
revAccount,
revBankName,
revBankType,
revAccountName,
cnapsCode,
receipt,
currency,
personalFlag,
payType
</sql>
<!-- 基础查询语句 -->
<sql id="base_sql">
SELECT
formmain_0209.id as oaId, -- 主表id
formson_0210.formsonId,
'formson_0210' as tableName, -- 表名
COL_SUMMARY.SUBJECT as title, -- 单据标题
unit.name as payCompany, -- 付款公司
'差旅费报销单' as billName,
'field0072' as payResultField, -- 支付结果字段
'field0073' as payDateField, -- 打款日期字段
'field0080' AS applyCodeField,-- CBS支付申请单号
'' as receiptFiled,-- 电子回单字段
COL_SUMMARY.id as summaryId,
formmain_0209.field0017||'-'||formson_0210.sort as referenceNum, -- 单据编号
formmain_0209.START_DATE as startDate, -- 单据日期
formmain_0209.FINISHEDFLAG as finishedflag, -- 流程状态
formson_0210.field0073 as payDate, -- 打款日期
formson_0210.field0072 as payResult, -- 支付结果
formson_0210.field0080 AS applyCode,-- 支付申请单号
REGEXP_REPLACE(formmain_0209.field0042, '[[:space:]]', '') as payAccount, -- 付款账户
REGEXP_REPLACE(formmain_0209.field0041, '[[:space:]]', '') as payBankName, -- 付款开户行
formson_0210.field0031 as amount, -- 金额
formmain_0209.field0038 as purpose, -- 用途
formmain_0209.field0038 as cbsAbstract, -- 摘要
REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount, -- 收款账户
formson_0210.field0068 as revBankName, -- 收款开户行
formson_0210.field0075 as revAccountName, -- 收款人
REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode, -- 收款联行号
item.ENUMVALUE as personalFlag,-- 公私标记
formson_0210.field0079 as revBankType,
'10' as currency,
'202' as busType,
'' as receipt -- 电子回单
FROM
(
SELECT
WM_CONCAT(id) AS formsonId,
formmain_id,
SUM(field0031) AS field0031,
MIN(sort) AS sort,
field0068,
field0069,
field0071,
field0079,
field0075,
field0070,
field0072,
field0073,
field0080
FROM
formson_0210
WHERE
field0067 = '-5486592002512828355'
GROUP BY
formmain_id,
field0068,
field0069,
field0071,
field0079,
field0075,
field0070,
field0072,
field0073,
field0080
)formson_0210
LEFT JOIN formmain_0209 ON formson_0210.FORMMAIN_ID = formmain_0209.id
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0209.id
left join CTP_ENUM_ITEM item on item.id =formson_0210.field0070
left join ORG_UNIT unit on unit.id =formmain_0209.field0002
</sql>
<!-- 采用==查询 -->
<select id="entity_list_base" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
select v.* from (
<include refid="base_sql"/>
) v
<trim prefix="where" prefixOverrides="and">
<if test="referenceNum != null and referenceNum !='' "> v.referenceNum = #{referenceNum} </if>
<if test="busType != null and busType !='' "> and v.busType = #{busType} </if>
<if test="amount != null and amount !='' ">and v.amount = #{amount} </if>
<if test="currency != null and currency !='' "> and v.currency = #{currency} </if>
<if test="payAccount != null and payAccount !='' ">and v.payAccount = #{payAccount} </if>
<if test="revAccount != null and revAccount !='' "> and v.revAccount = #{revAccount} </if>
<if test="revAccountName != null and revAccountName !='' "> and v.revAccountName = #{revAccountName} </if>
<if test="revBankType != null and revBankType !='' "> and v.revBankType = #{revBankType} </if>
<if test="revBankName != null and revBankName !='' ">and v.revBankName = #{revBankName} </if>
<if test="cnapsCode != null and cnapsCode !='' ">and v.cnapsCode = #{cnapsCode} </if>
<if test="purpose != null and purpose !='' "> and v.purpose = #{purpose} </if>
<if test="personalFlag != null and personalFlag !='' ">and v.personalFlag = #{personalFlag} </if>
<if test="tableName != null and tableName !='' "> and v.tableName = #{tableName} </if>
<if test="oaId != null and oaId !='' ">and v.oaId = #{oaId} </if>
<if test="payCompany != null and payCompany !='' "> and v.payCompany = #{payCompany} </if>
<if test="payCompanyCode != null and payCompanyCode !='' "> and v.payCompanyCode = #{payCompanyCode} </if>
<if test="title != null and title !='' "> and v.title = #{title} </if>
<if test="billName != null and billName !='' "> and v.billName = #{billName} </if>
<if test="payResult != null and payResult !='' ">and v.payResult = #{payResult} </if>
<if test="applyCode != null and applyCode !='' ">and v.applyCode = #{applyCode} </if>
<if test="payBankName != null and payBankName !='' ">and v.payBankName = #{payBankName} </if>
<if test="payType != null and payType !='' "> and v.payType = #{payType} </if>
<if test="finishedflag != null and finishedflag !='' "> and v.finishedflag = #{finishedflag} </if>
</trim>
</select>
<!-- 查询交易成功,且电子回单为空的,上传电子回单用 -->
<select id="PaymentEntity_list_base_elec_isnull" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
<!-- select
<include refid="PaymentEntity_Base_Column_List"/>
from
v_hzya_oa_cbs_all-->
-- 差旅费报销单
SELECT
formson_0210.id as oaId, -- 主表id
'formson_0210' as tableName, -- 表名
COL_SUMMARY.SUBJECT as title, -- 单据标题
unit.name as payCompany, -- 付款公司
'差旅费报销单' as billName,
'field0072' as payResultField, -- 支付结果字段
'field0073' as payDateField, -- 打款日期字段
'' as receiptFiled,-- 电子回单字段
COL_SUMMARY.id as summaryId,
formmain_0209.field0017||'-'||formson_0210.sort as referenceNum, -- 单据编号
formmain_0209.START_DATE as startDate, -- 单据日期
formmain_0209.FINISHEDFLAG as finishedflag, -- 流程状态
formson_0210.field0073 as payDate, -- 打款日期
formson_0210.field0072 as payResult, -- 支付结果
REGEXP_REPLACE(formmain_0209.field0042, '[[:space:]]', '') as payAccount, -- 付款账户
REGEXP_REPLACE(formmain_0209.field0041, '[[:space:]]', '') as payBankName, -- 付款开户行
formson_0210.field0031 as amount, -- 金额
formmain_0209.field0038 as purpose, -- 用途
formmain_0209.field0038 as cbsAbstract, -- 摘要
REGEXP_REPLACE(formson_0210.field0069, '[[:space:]]', '') as revAccount, -- 收款账户
formson_0210.field0068 as revBankName, -- 收款开户行
'' as revAccountName, -- 收款人
REGEXP_REPLACE(formson_0210.field0071, '[[:space:]]', '') as cnapsCode, -- 收款联行号
item.showvalue as personalFlag,-- 公私标记
'' as revBankType,-- 收款银行类型
'10' as currency,-- 币种
'' as busType,-- 业务类型
'' as receipt -- 电子回单
from
formson_0210
LEFT JOIN formmain_0209 ON formson_0210.FORMMAIN_ID = formmain_0209.id
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0209.id
LEFT JOIN CTP_AFFAIR ON CTP_AFFAIR.object_id = COL_SUMMARY.id
left join CTP_ENUM_ITEM item on item.id =formson_0210.field0070
left join ORG_UNIT unit on unit.id =formmain_0209.field0002
-- left join V_USER_VIEW_ALL us on us.staffid=formmain_0209.field0024
WHERE 1=1
-- and formson_0210.field0031>0
and CTP_AFFAIR.node_name = '发起者' and CTP_AFFAIR.COMPLETE_TIME is null and CTP_AFFAIR.STATE = 3
<trim prefix="where" prefixOverrides="and">
<if test="referenceNum != null and referenceNum !='' "> referenceNum = #{referenceNum} </if>
<if test="busType != null and busType !='' "> and busType = #{busType} </if>
<if test="amount != null and amount !='' ">and amount = #{amount} </if>
<if test="currency != null and currency !='' "> and currency = #{currency} </if>
<if test="payAccount != null and payAccount !='' ">and payAccount = #{payAccount} </if>
<if test="revAccount != null and revAccount !='' "> and revAccount = #{revAccount} </if>
<if test="revAccountName != null and revAccountName !='' "> and revAccountName = #{revAccountName} </if>
<if test="revBankType != null and revBankType !='' "> and revBankType = #{revBankType} </if>
<if test="revBankName != null and revBankName !='' ">and revBankName = #{revBankName} </if>
<if test="cnapsCode != null and cnapsCode !='' ">and cnapsCode = #{cnapsCode} </if>
<if test="purpose != null and purpose !='' "> and purpose = #{purpose} </if>
<if test="personalFlag != null and personalFlag !='' ">and personalFlag = #{personalFlag} </if>
<if test="tableName != null and tableName !='' "> and tableName = #{tableName} </if>
<if test="oaId != null and oaId !='' ">and oaId = #{oaId} </if>
<if test="payCompany != null and payCompany !='' "> and payCompany = #{payCompany} </if>
<if test="payCompanyCode != null and payCompanyCode !='' "> and payCompanyCode = #{payCompanyCode} </if>
<if test="title != null and title !='' "> and title = #{title} </if>
<if test="billName != null and billName !='' "> and billName = #{billName} </if>
<if test="payBankName != null and payBankName !='' ">and payBankName = #{payBankName} </if>
<if test="payType != null and payType !='' "> and payType = #{payType} </if>
and receipt is null and personalFlag='0' and payResult = '支付成功'
</trim>
</select>
<!-- 查询待支付的 -->
<select id="PaymentEntity_list_base_unpaid" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
select v.* from (
<include refid="base_sql"/>
) v
<trim prefix="where" prefixOverrides="and">
<if test="referenceNum != null and referenceNum !='' "> v.referenceNum = #{referenceNum} </if>
<if test="busType != null and busType !='' "> and v.busType = #{busType} </if>
<if test="amount != null and amount !='' ">and v.amount = #{amount} </if>
<if test="currency != null and currency !='' "> and v.currency = #{currency} </if>
<if test="payAccount != null and payAccount !='' ">and v.payAccount = #{payAccount} </if>
<if test="revAccount != null and revAccount !='' "> and v.revAccount = #{revAccount} </if>
<if test="revAccountName != null and revAccountName !='' "> and v.revAccountName = #{revAccountName} </if>
<if test="revBankType != null and revBankType !='' "> and v.revBankType = #{revBankType} </if>
<if test="revBankName != null and revBankName !='' ">and v.revBankName = #{revBankName} </if>
<if test="cnapsCode != null and cnapsCode !='' ">and v.cnapsCode = #{cnapsCode} </if>
<if test="purpose != null and purpose !='' "> and v.purpose = #{purpose} </if>
<if test="personalFlag != null and personalFlag !='' ">and v.personalFlag = #{personalFlag} </if>
<if test="tableName != null and tableName !='' "> and v.tableName = #{tableName} </if>
<if test="oaId != null and oaId !='' ">and v.oaId = #{oaId} </if>
<if test="payCompany != null and payCompany !='' "> and v.payCompany = #{payCompany} </if>
<if test="payCompanyCode != null and payCompanyCode !='' "> and v.payCompanyCode = #{payCompanyCode} </if>
<if test="title != null and title !='' "> and v.title = #{title} </if>
<if test="billName != null and billName !='' "> and v.billName = #{billName} </if>
<if test="payResult != null and payResult !='' ">and v.payResult = #{payResult} </if>
<if test="payBankName != null and payBankName !='' ">and v.payBankName = #{payBankName} </if>
<if test="payType != null and payType !='' "> and v.payType = #{payType} </if>
<if test="finishedflag != null and finishedflag !='' "> and v.finishedflag = #{finishedflag} </if>
and v.amount > 0
and v.payResult is null
</trim>
</select>
<!-- 查询未完成的 采用==查询 -->
<select id="PaymentEntity_list_base_in_payment" resultMap="get-PaymentEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
select
<include refid="PaymentEntity_Base_Column_List"/>
from
v_hzya_oa_cbs
<trim prefix="where" prefixOverrides="and">
<if test="referenceNum != null and referenceNum !='' "> referenceNum = #{referenceNum} </if>
<if test="busType != null and busType !='' "> and busType = #{busType} </if>
<if test="amount != null and amount !='' ">and amount = #{amount} </if>
<if test="currency != null and currency !='' "> and currency = #{currency} </if>
<if test="payAccount != null and payAccount !='' ">and payAccount = #{payAccount} </if>
<if test="revAccount != null and revAccount !='' "> and revAccount = #{revAccount} </if>
<if test="revAccountName != null and revAccountName !='' "> and revAccountName = #{revAccountName} </if>
<if test="revBankType != null and revBankType !='' "> and revBankType = #{revBankType} </if>
<if test="revBankName != null and revBankName !='' ">and revBankName = #{revBankName} </if>
<if test="cnapsCode != null and cnapsCode !='' ">and cnapsCode = #{cnapsCode} </if>
<if test="purpose != null and purpose !='' "> and purpose = #{purpose} </if>
<if test="personalFlag != null and personalFlag !='' ">and personalFlag = #{personalFlag} </if>
<if test="tableName != null and tableName !='' "> and tableName = #{tableName} </if>
<if test="oaId != null and oaId !='' ">and oaId = #{oaId} </if>
<if test="payCompany != null and payCompany !='' "> and payCompany = #{payCompany} </if>
<if test="payCompanyCode != null and payCompanyCode !='' "> and payCompanyCode = #{payCompanyCode} </if>
<if test="title != null and title !='' "> and title = #{title} </if>
<if test="billName != null and billName !='' "> and billName = #{billName} </if>
<if test="payResult != null and payResult !='' ">and payResult = #{payResult} </if>
<if test="payBankName != null and payBankName !='' ">and payBankName = #{payBankName} </if>
<if test="payType != null and payType !='' "> and payType = #{payType} </if>
and (payResult='支付中'
or payResult not in ('审批撤销','审批拒绝','处理失败','退票','支付成功','取消支付','修改支付','支付失败'))
and personalFlag='0'
</trim>
</select>
<!--修改视图支付状态-->
<update id="PaymentEntity_update_payState" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
update ${tableName} set
<trim suffix="" suffixOverrides=",">
<if test="payDate != null and payDate !='' ">${payDateField} =#{payDate},</if>
<if test="payResult != null and payResult !='' ">${payResultField} =#{payResult},</if>
<if test="applyCodeField != null and applyCodeField !='' ">${applyCodeField} =#{applyCode}</if>
</trim>
where id = #{formsonId}
</update>
<!--修改电子回单-->
<update id="PaymentEntity_update_electronic" parameterType="com.hzya.frame.seeyon.cbs8.entity.PaymentEntity">
update ${tableName} set ${receiptFiled}=#{receipt} where id = #{oaId} and ${receiptFiled} is null
</update>
</mapper>

View File

@ -0,0 +1,155 @@
package com.hzya.frame.seeyon.cbs8.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
* @Description cbs交易明细日志OA底表
* @Author xiangerlin
* @Date 2024/6/24 10:49
**/
public class TransactionDetailEntity extends BaseEntity {
private String id;//id
private String accountNo;//银行账号
private String accountName;//户名
private String openBank;//开户行名称
private String bankType;//我方银行类型
private String bankTransactionDate;//交易日期
private String transactionSerialNumber;//交易流水号
private String bankSerialNumber;//银行流水号
private String currency;//币种
private String incurredAmount;//发生额
private String purpose;//用途
private String digest;//摘要
private String oppositeAccount;//对方账号
private String oppositeName;//对方户名
private String oppositeOpeningBank;//对方开户行
private String remark;//备注
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAccountNo() {
return accountNo;
}
public void setAccountNo(String accountNo) {
this.accountNo = accountNo;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getOpenBank() {
return openBank;
}
public void setOpenBank(String openBank) {
this.openBank = openBank;
}
public String getBankTransactionDate() {
return bankTransactionDate;
}
public void setBankTransactionDate(String bankTransactionDate) {
this.bankTransactionDate = bankTransactionDate;
}
public String getTransactionSerialNumber() {
return transactionSerialNumber;
}
public void setTransactionSerialNumber(String transactionSerialNumber) {
this.transactionSerialNumber = transactionSerialNumber;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public String getIncurredAmount() {
return incurredAmount;
}
public void setIncurredAmount(String incurredAmount) {
this.incurredAmount = incurredAmount;
}
public String getPurpose() {
return purpose;
}
public void setPurpose(String purpose) {
this.purpose = purpose;
}
public String getDigest() {
return digest;
}
public void setDigest(String digest) {
this.digest = digest;
}
public String getOppositeAccount() {
return oppositeAccount;
}
public void setOppositeAccount(String oppositeAccount) {
this.oppositeAccount = oppositeAccount;
}
public String getOppositeName() {
return oppositeName;
}
public void setOppositeName(String oppositeName) {
this.oppositeName = oppositeName;
}
public String getOppositeOpeningBank() {
return oppositeOpeningBank;
}
public void setOppositeOpeningBank(String oppositeOpeningBank) {
this.oppositeOpeningBank = oppositeOpeningBank;
}
public String getBankType() {
return bankType;
}
public void setBankType(String bankType) {
this.bankType = bankType;
}
public String getBankSerialNumber() {
return bankSerialNumber;
}
public void setBankSerialNumber(String bankSerialNumber) {
this.bankSerialNumber = bankSerialNumber;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity">
<resultMap id="get-TransactionDetailEntity-result" type="com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity">
<result property="id" column="id" />
<result property="accountNo" column="accountNo" />
<result property="accountName" column="accountName" />
<result property="openBank" column="openBank" />
<result property="bankType" column="bankType" />
<result property="bankTransactionDate" column="bankTransactionDate" />
<result property="transactionSerialNumber" column="transactionSerialNumber" />
<result property="currency" column="currency" />
<result property="incurredAmount" column="incurredAmount" />
<result property="purpose" column="purpose" />
<result property="digest" column="digest" />
<result property="oppositeAccount" column="oppositeAccount" />
<result property="oppositeName" column="oppositeName" />
<result property="oppositeOpeningBank" column="oppositeOpeningBank" />
<result property="remark" column="remark" />
</resultMap>
<sql id="TransactionDetailEntity_Base_Column_List">
id,
field0001 as accountNo,
field0002 as accountName,
field0003 as openBank,
field0004 as bankType,
field0005 as transactionSerialNumber,
field0006 as bankTransactionDate,
field0007 as bankSerialNumber,
field0008 as currency,
field0009 as incurredAmount,
field0010 as purpose,
field0011 as digest,
field0012 as oppositeAccount,
field0013 as oppositeName,
field0014 as oppositeOpeningBank,
field0015 as remark
</sql>
<!-- 采用==查询 -->
<select id="TransactionDetailEntity_list_base" resultMap="get-TransactionDetailEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity">
select
<include refid="TransactionDetailEntity_Base_Column_List"/>
from
formmain_0233
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">id = #{id} </if>
<if test="accountNo != null and accountNo !='' "> and field0001 = #{accountNo} </if>
<if test="accountName != null and accountName !='' "> and field0002 = #{accountName} </if>
<if test="openBank != null and openBank !='' "> and field0003 = #{openBank} </if>
<if test="bankType != null and bankType !='' "> and field0004 = #{bankType} </if>
<if test="transactionSerialNumber != null and transactionSerialNumber !='' "> and field0005 = #{transactionSerialNumber} </if>
<if test="bankTransactionDate != null and bankTransactionDate !='' "> and field0006 = #{bankTransactionDate} </if>
<if test="bankSerialNumber != null and bankSerialNumber !='' "> and field0007 = #{bankSerialNumber} </if>
<if test="currency != null and currency !='' "> and field0008 = #{currency} </if>
<if test="incurredAmount != null and incurredAmount !='' "> and field0009 = #{incurredAmount} </if>
<if test="purpose != null and purpose !='' "> and field0010 = #{purpose} </if>
<if test="digest != null and digest !='' "> and field0011 = #{digest} </if>
<if test="oppositeAccount != null and oppositeAccount !='' "> and field0012 = #{oppositeAccount} </if>
<if test="oppositeName != null and oppositeName !='' "> and field0013 = #{oppositeName} </if>
<if test="oppositeOpeningBank != null and oppositeOpeningBank !='' "> and field0014 = #{oppositeOpeningBank} </if>
<if test="remark != null and remark !='' "> and field0015 = #{remark} </if>
</trim>
</select>
<!-- 只查询交易流水号-->
<select id="TransactionDetailEntity_list_serialNumber" resultMap="get-TransactionDetailEntity-result" parameterType="com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity">
select
field0005 as transactionSerialNumber
from
formmain_0233
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">id = #{id} </if>
<if test="accountNo != null and accountNo !='' "> and field0001 = #{accountNo} </if>
<if test="accountName != null and accountName !='' "> and field0002 = #{accountName} </if>
<if test="openBank != null and openBank !='' "> and field0003 = #{openBank} </if>
<if test="bankType != null and bankType !='' "> and field0004 = #{bankType} </if>
<if test="transactionSerialNumber != null and transactionSerialNumber !='' "> and field0005 = #{transactionSerialNumber} </if>
<if test="bankTransactionDate != null and bankTransactionDate !='' "> and field0006 >= #{bankTransactionDate} </if>
<if test="bankSerialNumber != null and bankSerialNumber !='' "> and field0007 = #{bankSerialNumber} </if>
<if test="currency != null and currency !='' "> and field0008 = #{currency} </if>
<if test="incurredAmount != null and incurredAmount !='' "> and field0009 = #{incurredAmount} </if>
<if test="purpose != null and purpose !='' "> and field0010 = #{purpose} </if>
<if test="digest != null and digest !='' "> and field0011 = #{digest} </if>
<if test="oppositeAccount != null and oppositeAccount !='' "> and field0012 = #{oppositeAccount} </if>
<if test="oppositeName != null and oppositeName !='' "> and field0013 = #{oppositeName} </if>
<if test="oppositeOpeningBank != null and oppositeOpeningBank !='' "> and field0014 = #{oppositeOpeningBank} </if>
<if test="remark != null and remark !='' "> and field0015 = #{remark} </if>
</trim>
</select>
</mapper>

View File

@ -0,0 +1,18 @@
package com.hzya.frame.seeyon.cbs8.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
/**
* @Description 代发代扣明细
* @Author xiangerlin
* @Date 2024/6/26 11:00
**/
public interface IAgentPaymentDetailService extends IBaseService<AgentPaymentDetailEntity,String> {
/**
* 更新明细表支付状态
* @param detail
*/
void updatePayResult(AgentPaymentDetailEntity detail);
}

View File

@ -0,0 +1,45 @@
package com.hzya.frame.seeyon.cbs8.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
import java.util.List;
/**
* @Description OA代发代扣
* @Author xiangerlin
* @Date 2024/6/18 15:04
**/
public interface IAgentPaymentService extends IBaseService<AgentPaymentEntity,String> {
/**
* 查询待支付待代发代扣 主表
* @param entity
* @return
* @throws Exception
*/
List<AgentPaymentEntity> queryUnpaid(AgentPaymentEntity entity) throws Exception;
/**
* 根据支付申请单号查询
* @param agentPayment
* @return
* @throws Exception
*/
AgentPaymentEntity queryByApplyCode(AgentPaymentEntity agentPayment)throws Exception;
/**
* 查询明细表
* @param entity
* @return
* @throws Exception
*/
List<AgentPaymentDetailEntity> queryDetails(AgentPaymentDetailEntity entity)throws Exception;
/**
* 更新支付状态
* @param entity
*/
void updateResult(AgentPaymentEntity entity);
}

View File

@ -0,0 +1,53 @@
package com.hzya.frame.seeyon.cbs8.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
import java.util.List;
/**
* @Description cbs8支付日志
* @Author xiangerlin
* @Date 2024/6/14 17:22
**/
public interface ICbsLogService extends IBaseService<CbsLogEntity,String> {
/**
* 查询支付中的数据
* @param logEntity
* @return
*/
List<CbsLogEntity> queryInPayment(CbsLogEntity logEntity);
/**
* 保存日志通过rest接口的形式
* @param logEntity
*/
void saveLog(CbsLogEntity logEntity);
/**
* 补推从自己开发的页面或者APIpost
* 需要传oa表单id和表单编号
* @param entity
*/
void retry(CbsLogEntity entity);
/**
* 补推从OA页面
* 只需要传日志表id就行
* @param jsonObject
*/
void resend(JSONObject jsonObject);
/**
* 获取token
* @param entity
* @return
*/
SysExtensionApiEntity getTokenExt(SysExtensionApiEntity entity);
/**
* 更新日志
* @param logEntity
*/
void updateLog(CbsLogEntity logEntity);
}

View File

@ -0,0 +1,63 @@
package com.hzya.frame.seeyon.cbs8.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import java.util.List;
/**
* @Description oa对接cbs
* @Author xiangerlin
* @Date 2024/6/6 16:31
**/
public interface IPaymentService extends IBaseService<PaymentEntity,String> {
/**
* 查询待支付的数据 需要推送到CBS的
* 如果需要查询流程状态已结束的 需要调用方设置finishedflag=1
* @param entity
* @return
* @throws Exception
*/
List<PaymentEntity> queryUnpaid(PaymentEntity entity)throws Exception;
/**
* 查询交易成功的数据
* 内置了查询条件payResult = PayState.payStateGetValue("g"); 支付成功
* @param entity
* @return
* @throws Exception
*/
List<PaymentEntity> querySuccess(PaymentEntity entity)throws Exception;
/**
* 查询交易成功且电子回单为空的
* @param entity
* @return
* @throws Exception
*/
List<PaymentEntity> queryElecIsNull(PaymentEntity entity)throws Exception;
/**
* 查询支付中的数据
* 内置了查询条件 payResult = '支付中' or payResult not in ('审批撤销','审批拒绝','处理失败','退票','支付成功','取消支付','修改支付','支付失败')
* @param entity
* @return
* @throws Exception
*/
List<PaymentEntity> queryInPayment(PaymentEntity entity)throws Exception;
/**
* 更新支付状态
* @param entity
* @throws Exception
*/
void updatePayState(PaymentEntity entity)throws Exception;
/**
* 更新电子回单字段
* @param entity
* @throws Exception
*/
void updateElec(PaymentEntity entity)throws Exception;
}

View File

@ -0,0 +1,29 @@
package com.hzya.frame.seeyon.cbs8.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity;
import java.util.List;
/**
* @Description cbs交易明细 OA底表
* @Author xiangerlin
* @Date 2024/6/24 11:07
**/
public interface ITransactionDetailService extends IBaseService<TransactionDetailEntity,String> {
/**
* 只返回交易流水号
* @param entity
* @return
*/
List<TransactionDetailEntity> querySerialNumber(TransactionDetailEntity entity);
/**
* 保存交易明细通过rest接口的方式
* @param entity
* @throws Exception
*/
void restSave(TransactionDetailEntity entity);
}

View File

@ -0,0 +1,39 @@
package com.hzya.frame.seeyon.cbs8.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDetailDao;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentDetailService;
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/26 11:01
**/
@Service("OAAgentPaymentDetailServiceImpl")
public class AgentPaymentDetailServiceImpl extends BaseService<AgentPaymentDetailEntity,String> implements IAgentPaymentDetailService {
private IAgentPaymentDetailDao agentPaymentDetailDao;
@Autowired
public void setAgentPaymentDetailDao(IAgentPaymentDetailDao agentPaymentDetailDao) {
this.agentPaymentDetailDao = agentPaymentDetailDao;
this.dao = agentPaymentDetailDao;
}
/**
* 更新明细表支付状态
*
* @param detail
*/
@DS("#detail.dataSourceCode")
@Override
public void updatePayResult(AgentPaymentDetailEntity detail) {
agentPaymentDetailDao.update("com.hzya.frame.seeyon.cbs8.dao.impl.AgentPaymentDetailDaoImpl.entity_update_result",detail);
}
}

View File

@ -0,0 +1,93 @@
package com.hzya.frame.seeyon.cbs8.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDao;
import com.hzya.frame.seeyon.cbs8.dao.IAgentPaymentDetailDao;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentDetailService;
import com.hzya.frame.seeyon.cbs8.service.IAgentPaymentService;
import com.hzya.frame.web.exception.BaseSystemException;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/18 15:06
**/
@Service(value = "cbs8AgentPaymentServiceImpl")
public class AgentPaymentServiceImpl extends BaseService<AgentPaymentEntity,String> implements IAgentPaymentService {
private IAgentPaymentDao agentPaymentDao;
@Autowired
private IAgentPaymentDetailService agentPaymentDetailService;
@Autowired
public void setAgentPaymentDao(IAgentPaymentDao agentPaymentDao) {
this.agentPaymentDao = agentPaymentDao;
this.dao = agentPaymentDao;
}
/**
* 查询待支付待代发代扣 主表
*
* @param entity
* @return
* @throws Exception
*/
@DS("#entity.dataSourceCode")
@Override
public List<AgentPaymentEntity> queryUnpaid(AgentPaymentEntity entity) throws Exception {
List<AgentPaymentEntity> list = agentPaymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.dao.impl.AgentPaymentDaoImpl.entity_list_base_unpaid");
return list;
}
/**
* 根据支付申请单号查询
*
* @param entity
* @return
* @throws Exception
*/
@Override
public AgentPaymentEntity queryByApplyCode(AgentPaymentEntity entity) throws Exception {
if (null != entity && StrUtil.isNotEmpty(entity.getApplyCode())){
List<AgentPaymentEntity> list = agentPaymentDao.query(entity);
if (CollectionUtils.isNotEmpty(list)){
if (list.size() > 1){
throw new BaseSystemException("根据"+entity.getApplyCode()+"查询到多条记录");
}
return list.get(0);
}
}
return null;
}
/**
* 查询明细表
*
* @param entity
* @return
* @throws Exception
*/
@DS("#entity.dataSourceCode")
@Override
public List<AgentPaymentDetailEntity> queryDetails(AgentPaymentDetailEntity entity) throws Exception {
List<AgentPaymentDetailEntity> list = agentPaymentDetailService.query(entity);
return list;
}
/**
* @param entity
*/
@DS("#entity.dataSourceCode")
@Override
public void updateResult(AgentPaymentEntity entity) {
agentPaymentDao.update("com.hzya.frame.seeyon.cbs8.dao.impl.AgentPaymentDaoImpl.entity_update",entity);
}
}

View File

@ -0,0 +1,198 @@
package com.hzya.frame.seeyon.cbs8.service.impl;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.seeyon.cbs8.dao.ICbsLogDao;
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import com.hzya.frame.seeyon.cbs8.service.ICbsLogService;
import com.hzya.frame.seeyon.util.OAPayState;
import com.hzya.frame.seeyon.util.OARestUtil;
import com.hzya.frame.stringutil.StringUtil;
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
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 org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description cbs8支付日志
* @Author xiangerlin
* @Date 2024/6/14 17:22
**/
@Service(value = "CbsLogServiceImpl")
public class CbsLogServiceImpl extends BaseService<CbsLogEntity,String> implements ICbsLogService {
Logger log = LoggerFactory.getLogger(getClass());
private ICbsLogDao cbsLogDao;
@Value("${OA.data_source_code:}")
private String oa_data_source_code;
@Autowired
public void setCbsLogDao(ICbsLogDao cbsLogDao) {
this.cbsLogDao = cbsLogDao;
this.dao = cbsLogDao;
}
@Autowired
private OARestUtil restUtil;
/**
* 查询支付中的数据
*
* @param logEntity
* @return
*/
@DS("#logEntity.dataSourceCode")
@Override
public List<CbsLogEntity> queryInPayment(CbsLogEntity logEntity) {
List<CbsLogEntity> logList = cbsLogDao.queryList(logEntity, "CbsLogEntity_list_base_in_payment");
return logList;
}
/**
* 保存日志通过rest接口的形式
*
* @param cbsLogEntity
*/
@Override
public void saveLog(CbsLogEntity cbsLogEntity) {
String oa_id = StringUtil.nullConvert(cbsLogEntity.getOa_id());
String bill_code = StringUtil.nullConvert(cbsLogEntity.getBill_code());
String tab_name_en = StringUtil.nullConvert(cbsLogEntity.getTab_name_en());
String tab_name_ch = StringUtil.nullConvert(cbsLogEntity.getTab_name_ch());
String pay_state = StringUtil.nullConvert(cbsLogEntity.getPay_state());
String message = StringUtil.nullConvert(cbsLogEntity.getMessage());
String apply_state = StringUtil.nullConvert(cbsLogEntity.getApply_state());
String successed = StringUtil.nullConvert(cbsLogEntity.getSuccessed());
String title = StringUtil.nullConvert(cbsLogEntity.getTitle());
String pay_company = StringUtil.nullConvert(cbsLogEntity.getPay_company());
String payee = StringUtil.nullConvert(cbsLogEntity.getPayee());
String amount = StringUtil.nullConvert(cbsLogEntity.getAmount());
String cbs_apply_code = StringUtil.nullConvert(cbsLogEntity.getCbs_apply_code());
//根据oaid判断是否在日志表中存在如果存在则更新如果不存在则新增
CbsLogEntity cbsLogEntityResend=new CbsLogEntity();
cbsLogEntityResend.setOa_id(cbsLogEntity.getOa_id());
cbsLogEntityResend.setDataSourceCode(oa_data_source_code);
List<CbsLogEntity> queryList = query(cbsLogEntityResend);
if(CollectionUtils.isEmpty(queryList)){
String data = StrUtil.format(getXmlTemplate(),title,pay_company,payee,amount,cbs_apply_code,bill_code,oa_id,tab_name_ch,tab_name_en,pay_state,message,apply_state,successed);
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
.put("apiCode", "8000240007")
.put("publicKey","ZJYAorA7JuRDfrVjywcx78BFcqlLwthgXNC65TXxxQMUHuxCe7eDIk+3zDUT+v578prj")//发送者
.put("secretKey","a54vt9Wx7gdBig+4JCkZ/lISIIL2m4ZEyZkXtW0uQVBDHS+V4SVgT6xhNblacri/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//发送者
.put("appId","800024")
.build();
JSONObject paramsTemplate = new JSONObject();
paramsTemplate.put("loginName", "hzya_rest");
paramsTemplate.put("dataXml", data);
String params = JSONObject.toJSONString(paramsTemplate);
logger.info("保存支付申请日志到OA底表请求参数:{}",params);
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(params).timeout(60000).execute().body();
logger.info("保存支付申请日志到OA底表响应参数:{}",body);
}else{
for (CbsLogEntity logEntity : queryList) {
logEntity.setPay_state(pay_state);
logEntity.setMessage(message);
logEntity.setApply_state(apply_state);
logEntity.setSuccessed(successed);
logEntity.setBill_code(cbsLogEntity.getBill_code());
logEntity.setDataSourceCode(oa_data_source_code);
try {
update(logEntity);
}catch (Exception e){
e.printStackTrace();
logger.error("更新");
}
}
}
}
/**
* 补推从自己开发的页面或者APIpost
* 需要传oa表单id和表单编号
*
* @param entity
*/
@Override
public void retry(CbsLogEntity entity) {
PaymentEntity paymentEntity = new PaymentEntity();
paymentEntity.setOaId(entity.getOa_id());
paymentEntity.setReferenceNum(entity.getBill_code());
CbsLogEntity logEntity = new CbsLogEntity();
logEntity.setId(entity.getId());
logEntity = cbsLogDao.queryOne(logEntity);
String pay_state = logEntity.getPay_state();
if (OAPayState.h.getValue().equals(pay_state)
|| OAPayState.three.getValue().equals(pay_state)
|| OAPayState.k.getValue().equals(pay_state)
|| "推送失败".equals(pay_state)){
//todo 调用重试方法
}else {
throw new BaseSystemException("只允许补推支付失败的记录");
}
}
/**
* 补推从OA页面
* 只需要传日志表id就行
*
* @param jsonObject
*/
@Override
public void resend(JSONObject jsonObject) {
if (null != jsonObject && StrUtil.isNotEmpty(jsonObject.getString("id"))){
String id = jsonObject.getString("id");
CbsLogEntity cbsLogEntity = new CbsLogEntity();
cbsLogEntity.setId(id);
cbsLogEntity =cbsLogDao.queryOne(cbsLogEntity);
if (null != cbsLogEntity && StrUtil.isNotEmpty(cbsLogEntity.getOa_id()) && StrUtil.isNotEmpty(cbsLogEntity.getBill_code())){
retry(cbsLogEntity);
}
}
}
/**
* 获取token
*
* @param entity
* @return
*/
@Override
public SysExtensionApiEntity getTokenExt(SysExtensionApiEntity entity) {
String token = restUtil.getToken("hzya_rest", "8000240000");
Map<String, String> headers = entity.getHeaders();
if (null == headers){
headers = new HashMap<>();
}
headers.put("token",token);
return entity;
}
/**
* 更新日志
*
* @param logEntity
*/
@DS("#logEntity.dataSourceCode")
@Override
public void updateLog(CbsLogEntity logEntity) {
cbsLogDao.update(logEntity);
}
//获取xml模板
private String getXmlTemplate(){
return "<forms version=\"2.1\"><formExport><summary id=\"9195604394844442459\" name=\"formmain_0232\"/><definitions><column id=\"field0002\" type=\"0\" name=\"流程标题\" isNullable=\"false\" length=\"100\"/><column id=\"field0003\" type=\"0\" name=\"付款主体公司\" isNullable=\"false\" length=\"100\"/><column id=\"field0004\" type=\"0\" name=\"收款人\" isNullable=\"false\" length=\"100\"/><column id=\"field0019\" type=\"4\" name=\"金额\" isNullable=\"false\" length=\"20\"/><column id=\"field0005\" type=\"0\" name=\"CBS支付申请单号\" isNullable=\"false\" length=\"100\"/><column id=\"field0006\" type=\"0\" name=\"OA单据编号\" isNullable=\"false\" length=\"100\"/><column id=\"field0007\" type=\"0\" name=\"OA单据ID\" isNullable=\"false\" length=\"100\"/><column id=\"field0008\" type=\"0\" name=\"OA中文表名\" isNullable=\"false\" length=\"100\"/><column id=\"field0009\" type=\"0\" name=\"OA数据库表名\" isNullable=\"false\" length=\"100\"/><column id=\"field0010\" type=\"0\" name=\"支付状态\" isNullable=\"false\" length=\"100\"/><column id=\"field0011\" type=\"0\" name=\"支付信息\" isNullable=\"false\" length=\"100\"/><column id=\"field0012\" type=\"0\" name=\"支付申请状态\" isNullable=\"false\" length=\"100\"/><column id=\"field0014\" type=\"0\" name=\"成功标记\" isNullable=\"false\" length=\"100\"/></definitions><values><column name=\"流程标题\"><value><![CDATA[{}]]></value></column><column name=\"付款主体公司\"><value><![CDATA[{}]]></value></column><column name=\"收款人\"><value><![CDATA[{}]]></value></column><column name=\"金额\"><value><![CDATA[{}]]></value></column><column name=\"CBS支付申请单号\"><value><![CDATA[{}]]></value></column><column name=\"OA单据编号\"><value><![CDATA[{}]]></value></column><column name=\"OA单据ID\"><value><![CDATA[{}]]></value></column><column name=\"OA中文表名\"><value><![CDATA[{}]]></value></column><column name=\"OA数据库表名\"><value><![CDATA[{}]]></value></column><column name=\"支付状态\"><value><![CDATA[{}]]></value></column><column name=\"支付信息\"><value><![CDATA[{}]]></value></column><column name=\"支付申请状态\"><value><![CDATA[{}]]></value></column><column name=\"成功标记\"><value><![CDATA[{}]]></value></column></values><subForms/></formExport></forms>";
}
}

View File

@ -0,0 +1,150 @@
package com.hzya.frame.seeyon.cbs8.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.seeyon.cbs8.dao.IPaymentDao;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import com.hzya.frame.seeyon.cbs8.service.IPaymentService;
import com.hzya.frame.seeyon.util.OAPayState;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/6 16:34
**/
@Service("OAPaymentServiceImpl")
public class PaymentServiceImpl extends BaseService<PaymentEntity,String> implements IPaymentService {
private IPaymentDao paymentDao;
@Autowired
public void setPaymentDao(IPaymentDao paymentDao) {
this.paymentDao = paymentDao;
this.dao = paymentDao;
}
/**
* 查询列表
* @param entity
* @return
*/
@DS("#entity.dataSourceCode")
@Override
public List<PaymentEntity> query(PaymentEntity entity) {
List<PaymentEntity> list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.entity_list_base");
return list;
}
/**
* 查询待支付的数据 需要推送到CBS的
* 如果需要查询流程状态已结束的 需要调用方设置finishedflag=1
*
* @param entity
* @return
* @throws Exception
*/
@DS("#entity.dataSourceCode")
@Override
public List<PaymentEntity> queryUnpaid(PaymentEntity entity) throws Exception {
List<PaymentEntity> list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_list_base_unpaid");
return list;
}
/**
* 查询交易成功的数据
* 内置了查询条件payResult = PayState.payStateGetValue("g"); 支付成功
*
* @param entity
* @return
* @throws Exception
*/
@DS("#entity.dataSourceCode")
@Override
public List<PaymentEntity> querySuccess(PaymentEntity entity) throws Exception {
if (null == entity){
entity = new PaymentEntity();
}
entity.setPayResult(OAPayState.payStateGetValue("g"));
List<PaymentEntity> list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_list_base");
return list;
}
/**
* 查询交易成功且电子回单为空的
*
* @param entity
* @return
* @throws Exception
*/
@DS("#entity.dataSourceCode")
@Override
public List<PaymentEntity> queryElecIsNull(PaymentEntity entity) throws Exception {
List<PaymentEntity> list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_list_base_elec_isnull");
return list;
}
/**
* 查询支付中的数据
* 内置了查询条件 payResult = '支付中' or payResult not in ('审批撤销','审批拒绝','处理失败','退票','支付成功','取消支付','修改支付','支付失败')
*
* @param entity
* @return
* @throws Exception
*/
@DS("#entity.dataSourceCode")
@Override
public List<PaymentEntity> queryInPayment(PaymentEntity entity) throws Exception {
List<PaymentEntity> list = paymentDao.queryList(entity, "com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_list_base_in_payment");
return list;
}
/**
* 更新支付状态
*
* @param entity
* @throws Exception
*/
@DS("#entity.dataSourceCode")
@Override
public void updatePayState(PaymentEntity entity) throws Exception {
if (null != entity
&& StrUtil.isNotEmpty(entity.getTableName())
&& StrUtil.isNotEmpty(entity.getOaId())
&& StrUtil.isNotEmpty(entity.getFormsonId())
&& StrUtil.isNotEmpty(entity.getPayDateField())
&& StrUtil.isNotEmpty(entity.getPayResultField())){
String formsonId = entity.getFormsonId();
String[] formsonIdArray = formsonId.split(",");
for (String s : formsonIdArray) {
entity.setFormsonId(s);
paymentDao.update("com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_update_payState",entity);
}
}
}
/**
* 更新电子回单字段
*
* @param entity
* @throws Exception
*/
@DS("#entity.dataSourceCode")
@Override
public void updateElec(PaymentEntity entity) throws Exception {
if (null != entity
&& StrUtil.isNotEmpty(entity.getTableName())
&& StrUtil.isNotEmpty(entity.getOaId())
&& StrUtil.isNotEmpty(entity.getReceiptFiled())){
paymentDao.update("com.hzya.frame.seeyon.cbs8.entity.PaymentEntity.PaymentEntity_update_electronic",entity);
}
}
}

View File

@ -0,0 +1,98 @@
package com.hzya.frame.seeyon.cbs8.service.impl;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.core.util.StrUtil;
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.basedao.service.impl.BaseService;
import com.hzya.frame.seeyon.cbs8.dao.ITransactionDetailDao;
import com.hzya.frame.seeyon.cbs8.entity.TransactionDetailEntity;
import com.hzya.frame.seeyon.cbs8.service.IPaymentService;
import com.hzya.frame.seeyon.cbs8.service.ITransactionDetailService;
import com.hzya.frame.stringutil.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/24 11:08
**/
@Service(value = "OATransactionDetailServiceImpl")
public class TransactionDetailServiceImpl extends BaseService<TransactionDetailEntity,String> implements ITransactionDetailService {
private ITransactionDetailDao transactionDetailDao;
@Autowired
public void setTransactionDetailDao(ITransactionDetailDao dao) {
this.transactionDetailDao = dao;
this.dao=dao;
}
/**
* 只返回交易流水号
*
* @param entity
* @return
*/
@DS("#entity.dataSourceCode")
@Override
public List<TransactionDetailEntity> querySerialNumber(TransactionDetailEntity entity) {
List<TransactionDetailEntity> list = transactionDetailDao.queryList(entity, "TransactionDetailEntity_list_serialNumber");;
return list;
}
/**
* 保存交易明细通过rest接口的方式
*
* @param entity
* @throws Exception
*/
@Override
public void restSave(TransactionDetailEntity entity) {
String field0001= StringUtil.nullConvert(entity.getAccountNo());//我方银行账号
String field0002=StringUtil.nullConvert(entity.getAccountName());//我方户名
String field0003=StringUtil.nullConvert(entity.getOpenBank());//我方开户行
String field0004=StringUtil.nullConvert(entity.getBankType());//我方银行类型
String field0005=StringUtil.nullConvert(entity.getTransactionSerialNumber());//交易流水号
String field0006=StringUtil.nullConvert(entity.getBankTransactionDate());//交易日期
String field0007=StringUtil.nullConvert(entity.getBankSerialNumber());//银行流水号
String field0008=StringUtil.nullConvert(entity.getCurrency());//币种
String field0009=StringUtil.nullConvert(entity.getIncurredAmount());//收款金额
String field0010=StringUtil.nullConvert(entity.getPurpose());//用途
String field0011=StringUtil.nullConvert(entity.getDigest());//摘要
String field0012=StringUtil.nullConvert(entity.getOppositeAccount());//对方账号
String field0013=StringUtil.nullConvert(entity.getOppositeName());//对方户名
String field0014=StringUtil.nullConvert(entity.getOppositeOpeningBank());//对方开户行
String field0015=StringUtil.nullConvert(entity.getRemark());//备注
String data = StrUtil.format(getXmlTemplate(),field0001,field0002,field0003,field0004,field0005,field0006,field0007,field0008,field0009,field0010,field0011,field0012,field0013,field0014,field0015);
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
.put("apiCode", "8000240006")
.put("publicKey","ZJYAorA7JuRDfrVjywcx78BFcqlLwthgXNC65TXxxQMUHuxCe7eDIk+3zDUT+v578prj")
.put("secretKey","a54vt9Wx7gdBig+4JCkZ/lISIIL2m4ZEyZkXtW0uQVBDHS+V4SVgT6xhNblacri/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
.put("appId","800024")
.build();
JSONObject paramsTemplate = new JSONObject();
paramsTemplate.put("loginName", "hzya_rest");
paramsTemplate.put("dataXml", data);
String params = JSONObject.toJSONString(paramsTemplate);
logger.info("保存交易明细到OA底表请求参数:{}",params);
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(params).timeout(60000).execute().body();
logger.info("保存交易明细到OA底表响应参数:{}",body);
}
/**
* 无流程表单模版
* transaction 交易明细
* payApply 支付申请日志
* @return
*/
private String getXmlTemplate(){
return "<forms version=\"2.1\"><formExport><summary id=\"-6287716442449165745\" name=\"formmain_0233\"/><definitions><column id=\"field0001\" type=\"0\" name=\"我方银行账户\" isNullable=\"false\" length=\"100\"/><column id=\"field0002\" type=\"0\" name=\"我方户名\" isNullable=\"false\" length=\"100\"/><column id=\"field0003\" type=\"0\" name=\"我方开户行\" isNullable=\"false\" length=\"100\"/><column id=\"field0004\" type=\"0\" name=\"我方银行类型\" isNullable=\"false\" length=\"100\"/><column id=\"field0005\" type=\"0\" name=\"交易流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0006\" type=\"3\" name=\"交易日期\" isNullable=\"false\" length=\"255\"/><column id=\"field0007\" type=\"0\" name=\"银行流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0008\" type=\"0\" name=\"币种\" isNullable=\"false\" length=\"100\"/><column id=\"field0009\" type=\"4\" name=\"收款金额\" isNullable=\"false\" length=\"20\"/><column id=\"field0010\" type=\"0\" name=\"用途\" isNullable=\"false\" length=\"800\"/><column id=\"field0011\" type=\"0\" name=\"摘要\" isNullable=\"false\" length=\"256\"/><column id=\"field0012\" type=\"0\" name=\"对方账号\" isNullable=\"false\" length=\"100\"/><column id=\"field0013\" type=\"0\" name=\"对方户名\" isNullable=\"false\" length=\"100\"/><column id=\"field0014\" type=\"0\" name=\"对方开户行\" isNullable=\"false\" length=\"100\"/><column id=\"field0015\" type=\"0\" name=\"备注\" isNullable=\"false\" length=\"800\"/></definitions><values><column name=\"我方银行账户\"><value><![CDATA[{}]]></value></column><column name=\"我方户名\"><value><![CDATA[{}]]></value></column><column name=\"我方开户行\"><value><![CDATA[{}]]></value></column><column name=\"我方银行类型\"><value><![CDATA[{}]]></value></column><column name=\"交易流水号\"><value><![CDATA[{}]]></value></column><column name=\"交易日期\"><value><![CDATA[{}]]></value></column><column name=\"银行流水号\"><value><![CDATA[{}]]></value></column><column name=\"币种\"><value><![CDATA[{}]]></value></column><column name=\"收款金额\"><value><![CDATA[{}]]></value></column><column name=\"用途\"><value><![CDATA[{}]]></value></column><column name=\"摘要\"><value><![CDATA[{}]]></value></column><column name=\"对方账号\"><value><![CDATA[{}]]></value></column><column name=\"对方户名\"><value><![CDATA[{}]]></value></column><column name=\"对方开户行\"><value><![CDATA[{}]]></value></column><column name=\"备注\"><value><![CDATA[{}]]></value></column></values><subForms/></formExport></forms>";
}
}

View File

@ -0,0 +1,24 @@
package com.hzya.frame.seeyon.customer.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
import com.hzya.frame.seeyon.customer.entity.CustomerEntity;
import java.util.HashMap;
import java.util.List;
/***
* @Content:客户供应商
* @Author 👻👻👻👻yqh👻👻👻👻
* @Date 2020/12/29 14:00
* @Param
* @return
**/
public interface ICustomerDao extends IBaseDao<CustomerEntity,Long> {
@DS("WS_OA")
List<CustomerEntity> selectCustomers( CustomerEntity entity);
int updaterCustomers(CustomerEntity entity);
}

View File

@ -0,0 +1,43 @@
package com.hzya.frame.seeyon.customer.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.execsql.service.IExecSqlService;
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
import com.hzya.frame.seeyon.customer.dao.ICustomerDao;
import com.hzya.frame.seeyon.customer.entity.CustomerEntity;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List;
/**
*
* @content 客户
* @className: Administrator
* @author laborer
* @date 2025-04-03 9:58
*
*/
@Repository(value = "CustomerDaoImpl")
public class CustomerDaoImpl extends MybatisGenericDao<CustomerEntity,Long> implements ICustomerDao {
protected Logger logger = LogManager.getLogger(super.getClass());
@DS("#entity.dataSourceCode")
@Override
public List<CustomerEntity> selectCustomers(CustomerEntity entity) {
return (List<CustomerEntity>) super.selectList("com.hzya.frame.seeyon.customer.entity.CustomerEntity.CustomerEntity_list_base",entity);
}
@DS("#entity.dataSourceCode")
@Override
public int updaterCustomers(CustomerEntity entity) {
return super.update("com.hzya.frame.seeyon.customer.entity.CustomerEntity.CustomerEntity_update",entity);
}
}

View File

@ -0,0 +1,27 @@
package com.hzya.frame.seeyon.customer.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.util.List;
/**
*
* @content 客户档案
* @className: Administrator
* @author laborer
* @date 2025-04-03 9:54
*
*/
public class CustomerEntity extends BaseEntity {
private String sqlStr;
public String getSqlStr() {
return sqlStr;
}
public void setSqlStr(String sqlStr) {
this.sqlStr = sqlStr;
}
}

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.seeyon.customer.entity.CustomerEntity">
<resultMap id="get-CustomerEntity-result" type="com.hzya.frame.seeyon.customer.entity.CustomerEntity">
<!--主键 -->
<result property="id" column="id" />
</resultMap>
<sql id="CustomerEntity_Base_Column_List">
id
</sql>
<select id="CustomerEntity_list_base" resultMap="get-CustomerEntity-result" parameterType="com.hzya.frame.seeyon.customer.entity.CustomerEntity">
${sqlStr}
</select>
<!--通过主键修改方法-->
<update id="CustomerEntity_update" parameterType = "java.util.Map" >
${sqlStr}
</update>
</mapper>

View File

@ -0,0 +1,30 @@
package com.hzya.frame.seeyon.customer.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.seeyon.customer.entity.CustomerEntity;
import com.hzya.frame.web.entity.JsonResultEntity;
import java.util.List;
/**
*
* @content 客户
* @className: Administrator
* @author laborer
* @date 2025-04-03 9:55
*
*/
public interface ICustomerService extends IBaseService<CustomerEntity, Long> {
/**
*
* @content 获取CRM客户信息
* @className: Administrator
* @author laborer
* @date 2025-04-03 10:06
*
*/
JsonResultEntity getCrmCustomer(JSONObject requestJson)throws Exception;
}

View File

@ -0,0 +1,441 @@
package com.hzya.frame.seeyon.customer.service.impl;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.execsql.service.IExecSqlService;
import com.hzya.frame.seeyon.customer.dao.ICustomerDao;
import com.hzya.frame.seeyon.customer.entity.CustomerEntity;
import com.hzya.frame.seeyon.customer.service.ICustomerService;
import com.hzya.frame.seeyon.util.OACrmUtil;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.print.DocFlavor;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
*
* @content 客户档案
* @className: Administrator
* @author laborer
* @date 2025-04-03 9:56
*
*/
@Service(value = "CustomerImpl")
public class CustomerImpl extends BaseService<CustomerEntity, Long> implements ICustomerService {
@Autowired
private ICustomerDao cstomerDao;
/**
*
* @content 获取CRM客户档案信息
* @className: Administrator
* @author laborer
* @date 2025-04-03 10:07
*
*/
@Override
public JsonResultEntity getCrmCustomer(JSONObject requestJson)throws Exception {
JsonResultEntity resultJson = new JsonResultEntity();
JSONArray datas = new JSONArray();
JSONArray result = new JSONArray();
//获取CRM可回档案数据
int i = 0;
while (true){
result = getCrmCustomers(i++);
if(result.size()>0){
datas.addAll(result);
}else{
break;
}
}
if(datas.size()>0){
//处理客户数据推送OA
for(int j=0;j<datas.size();j++){
System.out.println(j);
//将CRM的数据进行转换
JSONObject data = bdCrmData(datas.getJSONObject(j));
JSONObject tokenParm = new JSONObject();
tokenParm.put("password","45562434-8459-47b4-8df0-78fad8405bc4");
tokenParm.put("userName","hzya_rest");
tokenParm.put("loginName","YongAn");
//通过客户编码以及公司名称判断是否走新增还是更新
String gs = data.getString("gs");
String u8ckhbh = data.getString("u8ckhbh");
if(StrUtil.isEmpty(gs)|| StrUtil.isEmpty(u8ckhbh)){
logger.info("公司名称或者客户编码为空,数据不处理");
continue;
}
String sqlStr = "select \n" +
"main.id,\n" +
"item.showvalue as gs\n" +
"from formmain_5753 main \n" +
"left join ctp_enum_item item on main.field0032 = item.id\n" +
"where item.showvalue is not null\n" +
"and field0005 = '"+u8ckhbh+"' " +
"and item.showvalue = '"+gs+"'";
CustomerEntity entity = new CustomerEntity();
entity.setDataSourceCode("WS_OA");
entity.setSqlStr(sqlStr);
List<CustomerEntity>customerEntityList = cstomerDao.selectCustomers(entity);
String id = "";
if(CollectionUtils.isNotEmpty(customerEntityList)){
id = customerEntityList.get(0).getId();
}
if(StrUtil.isEmpty(id)){
//获取token
String oaToken = OACrmUtil.getOaToken(tokenParm.toJSONString(),"8000550010");
//将转换的数据进行OA数据组装
JSONObject oaData = getOACrmData(data,oaToken);
logger.info("OA请求前参数"+oaData.toString());
//调用
OACrmUtil.getOaData(oaData.toString(),"8000550012",oaToken);
}else{
String zq = StrUtil.isEmpty(data.getString("xyqxt")) ? null :data.getString("xyqxt");
String zxedwy = StrUtil.isEmpty(data.getString("zxedwy")) ? null :data.getString("zxedwy");
String ywy = StrUtil.isEmpty(data.getString("ywy")) ? "" :data.getString("ywy");
String updateSql = "update formmain_5753 " +
"set field0002 = "+zq+", " +
"field0003="+zxedwy+", " +
"field0034='"+ywy+"' " +
"where id = '"+id+"' ";
// System.out.println("");
entity.setSqlStr(updateSql);
cstomerDao.updaterCustomers(entity);
}
}
}
return resultJson;
}
private JSONObject getOACrmData(JSONObject data,String token) {
JSONObject resultJson = new JSONObject();
resultJson.put("formCode","formmain_5753");
resultJson.put("loginName","YongAn");
resultJson.put("rightId","8225261366084062087.8502143236212605767");
JSONArray dataList = new JSONArray();
JSONObject dataObj = new JSONObject();
JSONObject masterTable = new JSONObject();
masterTable.put("name","formmain_5753");
JSONObject record = new JSONObject();
record.put("id",data.getString("id"));
JSONArray fields = new JSONArray();
//添加主表数据
//通过公司名称获取公司主键
String gs = data.getString("gs");
JSONObject gsObj = new JSONObject();
Long ref_enum_id = 4404497076308233424L;
gsObj.put("show_value",gs);
gsObj.put("ref_enum_id", ref_enum_id);
String resultGs = OACrmUtil.getOaData(gsObj.toString(),"8000550011",token);
if(StrUtil.isNotEmpty(resultGs)){
JSONObject gsObj1 = JSONObject.parseObject(resultGs);
JSONArray gsData = gsObj1.getJSONArray("data");
if(gsData.size()>0){
JSONObject gsData1 = gsData.getJSONObject(0);
JSONObject field0032 = new JSONObject();
field0032.put("showValue","公司");
field0032.put("name","field0032");
field0032.put("value",gsData1.getString("item_id"));
fields.add(field0032);
}
}
//客户编码
JSONObject u8ckhbh = new JSONObject();
u8ckhbh.put("showValue","客户编码");
u8ckhbh.put("name","field0005");
u8ckhbh.put("value",data.getString("u8ckhbh"));
fields.add(u8ckhbh);
//客户名称
JSONObject khmc = new JSONObject();
khmc.put("showValue","客户名称");
khmc.put("name","field0001");
khmc.put("value",data.getString("khmc"));
fields.add(khmc);
//最早出库日期
JSONObject zzckrq = new JSONObject();
zzckrq.put("showValue","最早出库日期");
zzckrq.put("name","field0007");
zzckrq.put("value",data.getString("zzckrq"));
fields.add(zzckrq);
//账期
JSONObject zq = new JSONObject();
zq.put("showValue","账期");
zq.put("name","field0002");
zq.put("value",data.getInteger("xyqxt"));
fields.add(zq);
//信用额度
JSONObject zxedwy = new JSONObject();
zxedwy.put("showValue","信用额度");
zxedwy.put("name","field0003");
zxedwy.put("value",data.getString("zxedwy"));
fields.add(zxedwy);
//是否超账期需要格式化枚举
String sfczqStr = data.getString("sfczq");
if(StrUtil.isNotEmpty(sfczqStr)){
if("".equals(sfczqStr)){
sfczqStr = "2243692026822872135";
}
if("".equals(sfczqStr)){
sfczqStr = "7200503983140586429";
}
//是否超账期
JSONObject sfczq = new JSONObject();
sfczq.put("showValue","是否超账期");
sfczq.put("name","field0012");
sfczq.put("value",sfczqStr);
fields.add(sfczq);
}
//超账期天数
JSONObject czqts = new JSONObject();
czqts.put("showValue","超账期天数");
czqts.put("name","field0016");
czqts.put("value",data.getString("czqts"));
fields.add(czqts);
//客户所属区域
JSONObject khssqy = new JSONObject();
khssqy.put("showValue","客户所属区域");
khssqy.put("name","field0022");
khssqy.put("value",data.getString("khssqy"));
fields.add(khssqy);
//是否超信用额度
String sfcxyedStr = data.getString("sfcxyed");
if(StrUtil.isNotEmpty(sfcxyedStr)){
if("".equals(sfcxyedStr)){
sfcxyedStr = "2243692026822872135";
}
if("".equals(sfcxyedStr)){
sfcxyedStr = "7200503983140586429";
}
//是否超账期
JSONObject sfcxyed = new JSONObject();
sfcxyed.put("showValue","是否超信用额度");
sfcxyed.put("name","field0018");
sfcxyed.put("value",sfcxyedStr);
fields.add(sfcxyed);
}
//超额度金额
JSONObject cedjew = new JSONObject();
cedjew.put("showValue","超额度金额");
cedjew.put("name","field0020");
cedjew.put("value",data.getString("cedjew"));
fields.add(cedjew);
//国内外
String gnwStr = data.getString("gnw");
if(StrUtil.isNotEmpty(gnwStr)){
if("国内".equals(gnwStr)){
gnwStr = "579326676033489409";
}
if("国外".equals(gnwStr)){
gnwStr = "-8968140678130349914";
}
//是否超账期
JSONObject gnw = new JSONObject();
gnw.put("showValue","国内外");
gnw.put("name","field0010");
gnw.put("value",gnwStr);
fields.add(gnw);
}
//逾期未收款
JSONObject yqwsk = new JSONObject();
yqwsk.put("showValue","逾期未收款");
yqwsk.put("name","field0024");
yqwsk.put("value",data.getString("yqwsk"));
fields.add(yqwsk);
//业务员
JSONObject ywy = new JSONObject();
ywy.put("showValue","业务员");
ywy.put("name","field0020");
ywy.put("value",data.getString("ywy"));
fields.add(ywy);
record.put("fields",fields);
masterTable.put("record",record);
dataObj.put("masterTable",masterTable);
dataList.add(dataObj);
resultJson.put("dataList",dataList);
return resultJson;
}
private JSONObject bdCrmData(JSONObject jsonObject) {
JSONObject main = new JSONObject();
JSONObject mainTable = jsonObject.getJSONObject("mainTable");
//主键
JSONObject mainid = mainTable.getJSONObject("id");
if(null != mainid){
main.put("id",mainid.getString("fieldValue"));
}
//客户名称
JSONArray khmc = mainTable.getJSONArray("khmc");
if(null != khmc && khmc.size()>0){
main.put("khmc",khmc.getJSONObject(0).getString("fieldOptionName"));
}
//客户编号
JSONObject u8ckhbh = mainTable.getJSONObject("u8ckhbh");
if(null != u8ckhbh){
main.put("u8ckhbh",u8ckhbh.getString("fieldValue"));
}
//公司
JSONArray gs = mainTable.getJSONArray("gs");
if(null != gs && gs.size()>0){
main.put("gs",gs.getJSONObject(0).getString("fieldOptionName"));
}
//信用额度万元
JSONObject zxedwy = mainTable.getJSONObject("zxedwy");
if(null != zxedwy){
main.put("zxedwy",zxedwy.getString("fieldValue"));
}
//信用期限
JSONObject xyqxt = mainTable.getJSONObject("xyqxt");
if(null != xyqxt){
main.put("xyqxt",xyqxt.getString("fieldValue"));
}
//是否超账期
JSONArray sfczq = mainTable.getJSONArray("sfczq");
if(null != sfczq && sfczq.size()>0){
main.put("sfczq",sfczq.getJSONObject(0).getString("fieldOptionName"));
}
//客户所属区域
JSONArray khssqy = mainTable.getJSONArray("khssqy");
if(null != khssqy && khssqy.size()>0){
main.put("khssqy",khssqy.getJSONObject(0).getString("fieldOptionName"));
}
//是否超信用额度
JSONArray sfcxyed = mainTable.getJSONArray("sfcxyed");
if(null != sfcxyed && sfcxyed.size()>0){
main.put("sfcxyed",sfcxyed.getJSONObject(0).getString("fieldOptionName"));
}
//超账期天数
JSONObject czqts = mainTable.getJSONObject("czqts");
if(null != czqts){
main.put("czqts",czqts.getString("fieldValue"));
}
//超额度金额
JSONObject cedjew = mainTable.getJSONObject("cedjew");
if(null != cedjew){
main.put("cedjew",cedjew.getString("fieldValue"));
}
//国内国外
JSONArray gnw = mainTable.getJSONArray("gnw");
if(null != gnw && gnw.size()>0){
main.put("gnw",gnw.getJSONObject(0).getString("fieldOptionName"));
}
//逾期未收款
JSONObject yqwsk = mainTable.getJSONObject("yqwsk");
if(null != yqwsk){
main.put("yqwsk",yqwsk.getString("fieldValue"));
}
//逾期未收款
JSONObject zzckrq = mainTable.getJSONObject("zzckrq");
if(null != zzckrq){
main.put("zzckrq",zzckrq.getString("fieldValue"));
}
//业务员
JSONArray ywy = mainTable.getJSONArray("ywy");
if(null != ywy && ywy.size()>0){
main.put("ywy",ywy.getJSONObject(0).getString("fieldOptionName"));
}
//
// JSONArray detail1 = jsonObject.getJSONArray("detail1");
// JSONArray detailsAdd = new JSONArray();
// if(null != detail1 && detail1.size()>0){
// detail1.forEach(item->{
// JSONObject detail = new JSONObject();
// JSONObject itemObj = (JSONObject) item;
// //调整日期
// JSONObject dzrq = itemObj.getJSONObject("dzrq");
// detail.put("dzrq",dzrq.getString("fieldValue"));
//
// //账期
// JSONObject zq = itemObj.getJSONObject("zq");
// detail.put("zq",zq.getString("fieldValue"));
// //额度
// JSONObject ed = itemObj.getJSONObject("ed");
// detail.put("ed",ed.getString("fieldValue"));
// //调整人
// JSONArray dzr = itemObj.getJSONArray("dzr");
// if(dzr.size()>0){
// detail.put("dzr",dzr.getJSONObject(0).getString("fieldOptionName"));
// }
// //id
// JSONObject id = itemObj.getJSONObject("id");
// detail.put("id",id.getString("fieldValue"));
// detailsAdd.add(detail);
//
// });
// }
return main;
}
public JSONArray getCrmCustomers(int num)throws Exception {
String method = "CRM_CustomerCreditFile_P002";
JSONObject main = new JSONObject();
main.put("access_name","oatocrm");
main.put("access_pwd","oatocrm");
main.put("corpid","bb1c9f7dddb8b44f23610c43da60403");
main.put("userid","1089749390615511042");
JSONObject datajson = new JSONObject();
JSONObject header = new JSONObject();
header.put("objId","1112666919331422216");
datajson.put("header",header);
JSONObject mainTable = new JSONObject();
mainTable.put("zt","0");
datajson.put("mainTable",mainTable);
JSONObject pageInfo = new JSONObject();
pageInfo.put("pageNo",num);
pageInfo.put("pageSize",1000);
datajson.put("pageInfo",pageInfo);
JSONObject operationinfo = new JSONObject();
operationinfo.put("isReturnDetail","y");
operationinfo.put("fieldNoFindIgnore","false");
datajson.put("operationinfo",operationinfo);
main.put("datajson",datajson);
String result = OACrmUtil.getCrmCustomer(method,main.toJSONString());
if(StrUtil.isEmpty(result)){
throw new RuntimeException("获取客户档案失败");
}
JSONObject resObj = JSONObject.parseObject(result);
JSONObject message = resObj.getJSONObject("message");
if(!"success".equals(message.getString("msg"))){
throw new RuntimeException("获取客户档案失败"+message.getString("msg"));
}
JSONObject data = resObj.getJSONObject("data");
JSONObject datajsons = data.getJSONObject("datajson");
JSONArray datas = datajsons.getJSONArray("datas");
return datas;
}
}

View File

@ -0,0 +1,51 @@
package com.hzya.frame.seeyon.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity;
import com.hzya.frame.seeyon.entity.CtpFileEntity;
import com.hzya.frame.seeyon.paybill.entity.PayBillEntity;
import java.util.List;
/**
*
* @content OA字段配置表DAO
* @className: Administrator
* @author laborer
* @date 2024-09-09 16:00
*
*/
public interface ICapFormDefinitionDao extends IBaseDao<CapFormDefinitionEntity,String> {
/**
*
* @content 通过模版编号获取无流程表单配置信息
* @className: Administrator
* @author laborer
* @date 2024-09-09 16:02
*
*/
List<CapFormDefinitionEntity> getFormFiled(CapFormDefinitionEntity fieldInfo);
/**
*
* @content 通过主键删除单据数据
* @className: Administrator
* @author laborer
* @date 2024-09-09 17:04
*
*/
int deleteByKey(CapFormDefinitionEntity fieldInfo);
/**
*
* @content 通过客户传递的数据值查询古河条件的数据
* @className: Administrator
* @author laborer
* @date 2024-09-09 17:05
*
*/
List<CapFormDefinitionEntity> getFormFiledByFileValue(CapFormDefinitionEntity fieldInfo);
}

View File

@ -0,0 +1,21 @@
package com.hzya.frame.seeyon.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
import java.util.List;
public interface ICtpAttachmentDao extends IBaseDao<CtpAttachmentEntity,String> {
//更新数据
@DS("#ctpAttachmentEntity.dataSourceCode")
int updateCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity);
//根据fiel_url查询附件业务记录如果存在则更新如果不存在则新增
@DS("#ctpAttachmentEntity.dataSourceCode")
List<CtpAttachmentEntity> queryCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity);
//新增
@DS("#ctpAttachmentEntity.dataSourceCode")
CtpAttachmentEntity saveCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity);
}

View File

@ -0,0 +1,15 @@
package com.hzya.frame.seeyon.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.seeyon.entity.CtpFileEntity;
import java.util.List;
/**
* @Description seeyon 附件对象
* @Author xiangerlin
* @Date 2024/6/17 15:21
**/
public interface ICtpFileDao extends IBaseDao<CtpFileEntity,String> {
List<CtpFileEntity> queryFileById(CtpFileEntity ctpFileEntity);
}

View File

@ -0,0 +1,111 @@
package com.hzya.frame.seeyon.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.seeyon.entity.SeeyonEntity;
import java.util.HashMap;
import java.util.List;
/**
* com.hzya.frame.seeyon.dao
*
* @author yqh
* @date 2023-08 -30 10:43
*/
public interface ISeeYonDao extends IBaseDao<SeeyonEntity,String> {
/***
* @Content:通过类型获取OA基本档案数据
* @Author 👻👻👻👻yqh👻👻👻👻
* @Date 2023年8月30日11:33:17
* @Param seeyon
* @return
**/
@DS("ht_oa_sqlserver")
List<SeeyonEntity> selectOAListByTypeformson_0324(SeeyonEntity seeyon);
@DS("ht_oa_sqlserver")
List<SeeyonEntity> selectOAListByTypeformson_0352(SeeyonEntity seeyon);
@DS("ht_oa_sqlserver")
List<SeeyonEntity> selectOAListByTypeMain(SeeyonEntity seeyon);
/**
* 通过关联关系获取附件主键
* @param seeyonEntity
* @return
*/
@DS("ht_oa_sqlserver")
List<SeeyonEntity> selectFileUrl(SeeyonEntity seeyonEntity);
/***
* @Content:修改数据状态避免重复抓取
* @Author 👻👻👻👻yqh👻👻👻👻
* @Date
* @Param
* @return
**/
int updateFormStete(SeeyonEntity s);
/**
*
* @content 查询付款单中得电子回单
* @Param
* @Return
* @Author hecan
* @Date 2023/11/9 14:23
* **/
@DS("ht_oa_sqlserver")
List<SeeyonEntity> selectOAListByTypeformmain_0327(SeeyonEntity seeyon);
@DS("ht_oa_sqlserver")
int updateFormformmain_0327(SeeyonEntity seeyon);
/**
*
* @content 根据付款方id查询付款名
* @Param
* @Return
* @Author hecan
* @Date 2023/11/9 14:23
* **/
@DS("ht_oa_sqlserver")
List<SeeyonEntity> selectOAListByField0258(SeeyonEntity seeyon);
/**
*
* @content 查询速网U8C中的所有组织
* @Param
* @Return
* @Author hecan
* @Date 2023/11/13 11:56
* **/
@DS("sowow_sqlserver_test")
List<SeeyonEntity> selectOAListByCorp(SeeyonEntity seeyon);
/**
*
* @content 修改OA中的字段为速网U8C销售订单主键
* @Param
* @Return
* @Author hecan
* @Date 2023/11/15 11:28
* **/
@DS("swoa_mysql")
int updateFormformmain_0237(SeeyonEntity seeyonEntity);
@DS("swoa_mysql")
int updateFormformson_0238(SeeyonEntity seeyonEntity);
//根据销售订单编码查询档案主键
@DS("swoa_mysql")
SeeyonEntity selectOAListByformmain_0237(SeeyonEntity seeyonEntity);
/**
*
* @content 修改付款单报销单等单据的推送状态
* @Param
* @Return
* @Author hecan
* @Date 2023/12/20 8:59
* **/
@DS("ht_oa_sqlserver")
int updatepush(SeeyonEntity seeyon);
List<HashMap<String, Object>> execSelectSql(String str , SeeyonEntity entity)throws Exception;
Integer updateFileBySqlSre(SeeyonEntity entity);
}

View File

@ -0,0 +1,37 @@
package com.hzya.frame.seeyon.dao;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity;
import java.util.List;
import java.util.Map;
/**
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
* @version 1.0
* @content
* @date 2023-08-30 10:27
*/
public interface ISeeYonInterFaceDao {
/***
* 查询OA档案数据暂时只根据ID查询只返回ID集合此方法暂时用于更新无流程表单判断
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-30 10:54
* @param
* @return java.util.List<com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity>
**/
List<SeeYonInterFaceEntity> queryArchives(SeeYonInterFaceEntity seeYonInterFaceEntity);
/***
* 答应我写注释好吗
* @content:
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2024-01-18 16:01
* @param jsonObject 根据模版ID获取数据
* @return java.util.List<com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity>
**/
List<SeeYonInterFaceEntity> queryDefinitionInfo(SeeYonInterFaceEntity jsonObject);
List<Map<String, Object>> queryDefinitionData(SeeYonInterFaceEntity jsonObject);
}

View File

@ -0,0 +1,39 @@
package com.hzya.frame.seeyon.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.dao.ICapFormDefinitionDao;
import com.hzya.frame.seeyon.dao.ICtpFileDao;
import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity;
import com.hzya.frame.seeyon.entity.CtpFileEntity;
import com.hzya.frame.seeyon.paybill.entity.PayBillEntity;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
*
* @content OA字段配置表DAO
* @className: Administrator
* @author laborer
* @date 2024-09-09 16:00
*
*/
@Repository(value = "CapFormDefinitionDaoImpl")
public class CapFormDefinitionDaoImpl extends MybatisGenericDao<CapFormDefinitionEntity,String> implements ICapFormDefinitionDao {
@DS("#fieldInfo.dataSourceCode")
@Override
public List<CapFormDefinitionEntity> getFormFiled(CapFormDefinitionEntity fieldInfo) {
return (List<CapFormDefinitionEntity>) selectList("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_list_base",fieldInfo);
}
@DS("#fieldInfo.dataSourceCode")
@Override
public int deleteByKey(CapFormDefinitionEntity fieldInfo) {
return super.delete("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_delete",fieldInfo);
}
@DS("#fieldInfo.dataSourceCode")
@Override
public List<CapFormDefinitionEntity> getFormFiledByFileValue(CapFormDefinitionEntity fieldInfo) {
return (List<CapFormDefinitionEntity>) selectList("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_list_table_info",fieldInfo);
}
}

View File

@ -0,0 +1,31 @@
package com.hzya.frame.seeyon.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.dao.ICtpAttachmentDao;
import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository(value = "ctpAttachmentDaoImpl")
public class
CtpAttachmentDaoImpl extends MybatisGenericDao<CtpAttachmentEntity,String> implements ICtpAttachmentDao {
@DS("#ctpAttachmentEntity.dataSourceCode")
@Override
public int updateCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity) {
return super.update("com.hzya.frame.seeyon.dao.impl.CtpAttachmentDaoImpl.entity_update",ctpAttachmentEntity);
}
@DS("#ctpAttachmentEntity.dataSourceCode")
@Override
public List<CtpAttachmentEntity> queryCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity) {
return (List<CtpAttachmentEntity>) super.selectList("com.hzya.frame.seeyon.dao.impl.CtpAttachmentDaoImpl.entity_list_base",ctpAttachmentEntity);
}
@DS("#ctpAttachmentEntity.dataSourceCode")
@Override
public CtpAttachmentEntity saveCtpAttachment(CtpAttachmentEntity ctpAttachmentEntity) {
return super.save("com.hzya.frame.seeyon.dao.impl.CtpAttachmentDaoImpl.entity_insert",ctpAttachmentEntity);
}
}

View File

@ -0,0 +1,26 @@
package com.hzya.frame.seeyon.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.dao.ICtpAttachmentDao;
import com.hzya.frame.seeyon.dao.ICtpFileDao;
import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
import com.hzya.frame.seeyon.entity.CtpFileEntity;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @Description
* @Author xiangerlin
* @Date 2024/6/17 15:22
**/
@Repository()
public class CtpFileDaoImpl extends MybatisGenericDao<CtpFileEntity,String> implements ICtpFileDao {
@DS("WS_OA")
@Override
public List<CtpFileEntity> queryFileById(CtpFileEntity ctpFileEntity) {
return (List<CtpFileEntity>) super.selectList("com.hzya.frame.seeyon.entity.CtpFileEntity.CtpFileEntity_list_base",ctpFileEntity);
}
}

View File

@ -0,0 +1,108 @@
package com.hzya.frame.seeyon.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.execsql.service.IExecSqlService;
import com.hzya.frame.seeyon.dao.ISeeYonDao;
import com.hzya.frame.seeyon.entity.SeeyonEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List;
/**
* com.hzya.frame.seeyon.dao.impl
*
* @author yqh
* @date 2023-08 -30 10:44
*/
@DS("htsqlserver")
@Repository(value = "seeYonDaoImpl")
public class SeeYonDaoImpl extends MybatisGenericDao<SeeyonEntity,String> implements ISeeYonDao {
@Autowired
private IExecSqlService execSqlService;
@DS("ht_oa_sqlserver")
@Override
public List<SeeyonEntity> selectOAListByTypeformson_0352(SeeyonEntity seeyon) {
return (List<SeeyonEntity>) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_formson_0352",seeyon);
}
@DS("ht_oa_sqlserver")
@Override
public List<SeeyonEntity> selectOAListByTypeformson_0324(SeeyonEntity seeyon) {
return (List<SeeyonEntity>) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_formson_0324",seeyon);
}
@DS("ht_oa_sqlserver")
@Override
public List<SeeyonEntity> selectOAListByTypeMain(SeeyonEntity seeyon) {
return (List<SeeyonEntity>) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_main",seeyon);
}
@DS("ht_oa_sqlserver")
@Override
public List<SeeyonEntity> selectFileUrl(SeeyonEntity seeyon) {
return (List<SeeyonEntity>) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_ctp_attachment",seeyon);
}
@DS("ht_oa_sqlserver")
@Override
public int updateFormStete(SeeyonEntity s) {
return super.update("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_update",s);
}
@DS("ht_oa_sqlserver")
@Override
public List<SeeyonEntity> selectOAListByTypeformmain_0327(SeeyonEntity seeyon) {
return (List<SeeyonEntity>) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_formmain_0327",seeyon);
}
@DS("ht_oa_sqlserver")
@Override
public int updateFormformmain_0327(SeeyonEntity seeyon) {
return super.update("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_update_formmain_0327",seeyon);
}
@DS("ht_oa_sqlserver")
@Override
public List<SeeyonEntity> selectOAListByField0258(SeeyonEntity seeyon) {
return (List<SeeyonEntity>) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_field0258",seeyon);
}
@DS("sowow_sqlserver_test")
@Override
public List<SeeyonEntity> selectOAListByCorp(SeeyonEntity seeyon) {
return (List<SeeyonEntity>) super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_corp",seeyon);
}
@Override
@DS("swoa_mysql")
public int updateFormformmain_0237(SeeyonEntity seeyonEntity) {
return super.update("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_update_formmain_0237",seeyonEntity);
}
@Override
@DS("swoa_mysql")
public int updateFormformson_0238(SeeyonEntity seeyonEntity) {
return super.update("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_update_formson_0238",seeyonEntity);
}
@Override
@DS("swoa_mysql")
public SeeyonEntity selectOAListByformmain_0237(SeeyonEntity seeyonEntity) {
return (SeeyonEntity) super.selectOne("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_list_base_formmain_0237",seeyonEntity);
}
@DS("ht_oa_sqlserver")
@Override
public int updatepush(SeeyonEntity seeyon) {
return super.update("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_update_push",seeyon);
}
@DS("WS_OA")
@Override
public List<HashMap<String, Object>> execSelectSql(String str, SeeyonEntity entity)throws Exception {
return execSqlService.execSelectSql(str, entity.getDataSourceCode());
}
@DS("WS_OA")
@Override
public Integer updateFileBySqlSre(SeeyonEntity entity) {
return super.update("com.hzya.frame.seeyon.dao.impl.SeeYonDaoImpl.entity_update_file_by_id",entity);
}
}

View File

@ -0,0 +1,43 @@
package com.hzya.frame.seeyon.dao.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.dao.ISeeYonInterFaceDao;
import com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
* @version 1.0
* @content
* @date 2023-08-30 10:27
*/
@Repository(value = "seeYonInterFaceDao")
public class SeeYonInterFaceDaoImpl extends MybatisGenericDao implements ISeeYonInterFaceDao {
@Override
@DS("ht_oa_sqlserver")
public List<SeeYonInterFaceEntity> queryArchives(SeeYonInterFaceEntity seeYonInterFaceEntity) {
List list = super.query("com.hzya.frame.seeyon.dao.impl.SeeYonInterFaceDaoImpl.queryArchives",seeYonInterFaceEntity);
return list;
}
@Override
@DS("#seeYonInterFaceEntity.dataSourceCode")
public List<SeeYonInterFaceEntity> queryDefinitionInfo(SeeYonInterFaceEntity seeYonInterFaceEntity) {
return super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonInterFaceDaoImpl.queryDefinitionInfo",seeYonInterFaceEntity);
}
@Override
@DS("#seeYonInterFaceEntity.dataSourceCode")
public List<Map<String, Object>> queryDefinitionData(SeeYonInterFaceEntity seeYonInterFaceEntity) {
List<Map<String, Object>> list = super.selectList("com.hzya.frame.seeyon.dao.impl.SeeYonInterFaceDaoImpl.queryDefinitionData",seeYonInterFaceEntity);
return list ;
}
}

View File

@ -0,0 +1,71 @@
package com.hzya.frame.seeyon.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.io.File;
/**
*
* @content OA字段配置表
* @className: Administrator
* @author laborer
* @date 2024-09-09 15:48
*
*/
public class CapFormDefinitionEntity extends BaseEntity {
private String fieldInfo;//字段属性定义
private String viewInfo;//视图权限定义
private String appbindInfo;//应用绑定定义
private String tableName;//表名
private String fieldName;//字段名称
private String fieldValue;//字段值
public String getFieldValue() {
return fieldValue;
}
public void setFieldValue(String fieldValue) {
this.fieldValue = fieldValue;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
public String getFieldInfo() {
return fieldInfo;
}
public void setFieldInfo(String fieldInfo) {
this.fieldInfo = fieldInfo;
}
public String getViewInfo() {
return viewInfo;
}
public void setViewInfo(String viewInfo) {
this.viewInfo = viewInfo;
}
public String getAppbindInfo() {
return appbindInfo;
}
public void setAppbindInfo(String appbindInfo) {
this.appbindInfo = appbindInfo;
}
}

View File

@ -0,0 +1,41 @@
<?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.seeyon.entity.CapFormDefinitionEntity">
<resultMap id="get-CapFormDefinitionEntity-result" type="com.hzya.frame.seeyon.entity.CapFormDefinitionEntity">
<!--主键 -->
<result property="id" column="id" />
<result property="fieldInfo" column="field_info" />
<result property="viewInfo" column="view_info" />
<result property="appbindInfo" column="appbind_info" />
</resultMap>
<sql id="CapFormDefinitionEntity_sql">
id,
field_info,
view_info,
appbind_info
</sql>
<!-- 查询 采用==查询 -->
<select id="CapFormDefinitionEntity_list_base" resultMap="get-CapFormDefinitionEntity-result" parameterType="com.hzya.frame.seeyon.entity.CapFormDefinitionEntity">
select
<include refid="CapFormDefinitionEntity_sql"/>
from
cap_form_definition
<trim prefix="where" prefixOverrides="and">
<if test="appbindInfo != null and appbindInfo != ''">and APPBIND_INFO like '%${appbindInfo}%'</if>
</trim>
</select>
<!-- 查询 采用==查询 -->
<select id="CapFormDefinitionEntity_list_table_info" resultMap="get-CapFormDefinitionEntity-result" parameterType="com.hzya.frame.seeyon.entity.CapFormDefinitionEntity">
select id from ${tableName} where ${fieldName} = #{fieldValue}
</select>
<delete id="CapFormDefinitionEntity_delete" parameterType="com.hzya.frame.basedao.entity.RequestDisposeEntity">
delete from ${tableName} where ${fieldName} = #{id}
</delete>
</mapper>

View File

@ -0,0 +1,65 @@
package com.hzya.frame.seeyon.entity;
/**
* @Description 保存交行日志用
* @Author xiangerlin
* @Date 2024/3/18 14:07
**/
public class CfsLogEntity {
private String tab_name_ch;//中文表名
private String tab_name_en;//英文表名
private OAWorkflowEventDataEntity oaWorkflowEventDataEntity;//无流程表单数据
private String result;//交通银行返回的参数解析后的
public CfsLogEntity() {
}
/**
*
* @param tab_name_ch 中文表名
* @param tab_name_en 英文表名
* @param oaWorkflowEventDataEntity 无流程表单数据
*/
public CfsLogEntity(String tab_name_ch, String tab_name_en, OAWorkflowEventDataEntity oaWorkflowEventDataEntity,String result) {
this.tab_name_ch = tab_name_ch;
this.tab_name_en = tab_name_en;
this.oaWorkflowEventDataEntity = oaWorkflowEventDataEntity;
this.result=result;
}
public String getTab_name_ch() {
return tab_name_ch;
}
public void setTab_name_ch(String tab_name_ch) {
this.tab_name_ch = tab_name_ch;
}
public String getTab_name_en() {
return tab_name_en;
}
public void setTab_name_en(String tab_name_en) {
this.tab_name_en = tab_name_en;
}
public OAWorkflowEventDataEntity getOaWorkflowEventDataEntity() {
return oaWorkflowEventDataEntity;
}
public void setOaWorkflowEventDataEntity(OAWorkflowEventDataEntity oaWorkflowEventDataEntity) {
this.oaWorkflowEventDataEntity = oaWorkflowEventDataEntity;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
}

View File

@ -0,0 +1,340 @@
package com.hzya.frame.seeyon.entity;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.annotation.JSONField;
import java.util.List;
import java.util.Map;
/**
* @Description 查询协同附件列表返回对象 /rest/coll/attachments/{summaryID}/{attType}
* @Author xiangerlin
* @Date 2024/8/16 09:11
**/
public class CollAttachmentResDTO {
private String id; //ctp_attachment 表的id
private String reference;// 流程表的id col_summary
private String subReference;//流程表单附件字段存的id
private String category;//应用分类
private String type;
private String filename;//附件名称
private String mimeType;//附件类型
private String createdate;
private String size;//附件大小
private String description;
private String fileUrl;//附件idctp_file 表的逐渐
private String extension;
private String icon;
private String iconFont;
private String genesisId;
private String sort;
private String officeTransformEnable;
private String obsObjectKey;
private String secretLevel;
private String secretLevelName;
private String canBrowse;
private String v;
private Boolean wpsOnlineEnable;
private Boolean allowTrans;
private JSONObject transValue;
private String createdateStr;
@JSONField(name = "new")
private Boolean newFile;
private Map<String, String> extraMap; // 使用Map来存储额外的键值对
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getReference() {
return reference;
}
public void setReference(String reference) {
this.reference = reference;
}
public String getSubReference() {
return subReference;
}
public void setSubReference(String subReference) {
this.subReference = subReference;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public String getMimeType() {
return mimeType;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
public String getCreatedate() {
return createdate;
}
public void setCreatedate(String createdate) {
this.createdate = createdate;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
public String getExtension() {
return extension;
}
public void setExtension(String extension) {
this.extension = extension;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getIconFont() {
return iconFont;
}
public void setIconFont(String iconFont) {
this.iconFont = iconFont;
}
public String getGenesisId() {
return genesisId;
}
public void setGenesisId(String genesisId) {
this.genesisId = genesisId;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
public String getOfficeTransformEnable() {
return officeTransformEnable;
}
public void setOfficeTransformEnable(String officeTransformEnable) {
this.officeTransformEnable = officeTransformEnable;
}
public String getObsObjectKey() {
return obsObjectKey;
}
public void setObsObjectKey(String obsObjectKey) {
this.obsObjectKey = obsObjectKey;
}
public String getSecretLevel() {
return secretLevel;
}
public void setSecretLevel(String secretLevel) {
this.secretLevel = secretLevel;
}
public String getSecretLevelName() {
return secretLevelName;
}
public void setSecretLevelName(String secretLevelName) {
this.secretLevelName = secretLevelName;
}
public String getCanBrowse() {
return canBrowse;
}
public void setCanBrowse(String canBrowse) {
this.canBrowse = canBrowse;
}
public String getV() {
return v;
}
public void setV(String v) {
this.v = v;
}
public Boolean getWpsOnlineEnable() {
return wpsOnlineEnable;
}
public void setWpsOnlineEnable(Boolean wpsOnlineEnable) {
this.wpsOnlineEnable = wpsOnlineEnable;
}
public Boolean getAllowTrans() {
return allowTrans;
}
public void setAllowTrans(Boolean allowTrans) {
this.allowTrans = allowTrans;
}
public JSONObject getTransValue() {
return transValue;
}
public void setTransValue(JSONObject transValue) {
this.transValue = transValue;
}
public String getCreatedateStr() {
return createdateStr;
}
public void setCreatedateStr(String createdateStr) {
this.createdateStr = createdateStr;
}
public Boolean getNewFile() {
return newFile;
}
public void setNewFile(Boolean newFile) {
this.newFile = newFile;
}
public Map<String, String> getExtraMap() {
return extraMap;
}
public void setExtraMap(Map<String, String> extraMap) {
this.extraMap = extraMap;
}
public static void main(String[] args) {
String str = "[{\n" +
"\t\"id\": 5180424495316486643,\n" +
"\t\"reference\": -1741558410793893622,\n" +
"\t\"subReference\": 584122959825946183,\n" +
"\t\"category\": 66,\n" +
"\t\"type\": 0,\n" +
"\t\"filename\": \"Order.pdf\",\n" +
"\t\"mimeType\": \"application/pdf\",\n" +
"\t\"createdate\": 1723454209000,\n" +
"\t\"size\": 131234,\n" +
"\t\"description\": null,\n" +
"\t\"fileUrl\": -5577707714790406265,\n" +
"\t\"extension\": \"pdf\",\n" +
"\t\"icon\": \"pdf.gif\",\n" +
"\t\"iconFont\": \"pdf\",\n" +
"\t\"genesisId\": null,\n" +
"\t\"sort\": 0,\n" +
"\t\"officeTransformEnable\": \"disable\",\n" +
"\t\"obsObjectKey\": \"\",\n" +
"\t\"secretLevel\": null,\n" +
"\t\"secretLevelName\": null,\n" +
"\t\"canBrowse\": 1,\n" +
"\t\"v\": \"fcdf8ae9d97bf2969fa6005394442885\",\n" +
"\t\"wpsOnlineEnable\": false,\n" +
"\t\"allowTrans\": false,\n" +
"\t\"transValue\": {\n" +
"\t\t\"isWpsOnlineEnable\": false,\n" +
"\t\t\"isAllowTrans\": false\n" +
"\t},\n" +
"\t\"createdateStr\": \"1723454209000\",\n" +
"\t\"new\": false,\n" +
"\t\"extraMap\": {}\n" +
"}, {\n" +
"\t\"id\": -6639984402087339,\n" +
"\t\"reference\": -1741558410793893622,\n" +
"\t\"subReference\": 649078190027982545,\n" +
"\t\"category\": 66,\n" +
"\t\"type\": 0,\n" +
"\t\"filename\": \"Invoice.pdf\",\n" +
"\t\"mimeType\": \"application/pdf\",\n" +
"\t\"createdate\": 1723454201000,\n" +
"\t\"size\": 158553,\n" +
"\t\"description\": null,\n" +
"\t\"fileUrl\": -4345076582332676605,\n" +
"\t\"extension\": \"pdf\",\n" +
"\t\"icon\": \"pdf.gif\",\n" +
"\t\"iconFont\": \"pdf\",\n" +
"\t\"genesisId\": null,\n" +
"\t\"sort\": 0,\n" +
"\t\"officeTransformEnable\": \"disable\",\n" +
"\t\"obsObjectKey\": \"\",\n" +
"\t\"secretLevel\": null,\n" +
"\t\"secretLevelName\": null,\n" +
"\t\"canBrowse\": 1,\n" +
"\t\"v\": \"85d721af033c7dddf385be2c7ea8d423\",\n" +
"\t\"wpsOnlineEnable\": false,\n" +
"\t\"allowTrans\": false,\n" +
"\t\"transValue\": {\n" +
"\t\t\"isWpsOnlineEnable\": false,\n" +
"\t\t\"isAllowTrans\": false\n" +
"\t},\n" +
"\t\"createdateStr\": \"1723454201000\",\n" +
"\t\"new\": false,\n" +
"\t\"extraMap\": {}\n" +
"}]";
List<CollAttachmentResDTO> list = JSON.parseArray(str,CollAttachmentResDTO.class);
System.out.println(list);
}
}

View File

@ -0,0 +1,124 @@
package com.hzya.frame.seeyon.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.util.Date;
/**
*
* @content OA附件业务表
* @Param
* @Return
* @Author hecan
* @Date 2023/11/1 14:58
* **/
public class CtpAttachmentEntity extends BaseEntity {
private String id;//主键ID
private String sub_reference;//次数据ID此id为真正写在流程表单中的ID
private String category; //应用分类
private String type;//分类
private String filename;//附件名称
private String file_url;//附件链接
private String mime_type;//
private Date createdate;//创建时间
private String attachment_size;//附件大小
private String sort;//序号
private String att_reference;//流程表的IDcol_summary
private String uuid;
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getSub_reference() {
return sub_reference;
}
public void setSub_reference(String sub_reference) {
this.sub_reference = sub_reference;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public String getFile_url() {
return file_url;
}
public void setFile_url(String file_url) {
this.file_url = file_url;
}
public String getMime_type() {
return mime_type;
}
public void setMime_type(String mime_type) {
this.mime_type = mime_type;
}
public Date getCreatedate() {
return createdate;
}
public void setCreatedate(Date createdate) {
this.createdate = createdate;
}
public String getAttachment_size() {
return attachment_size;
}
public void setAttachment_size(String attachment_size) {
this.attachment_size = attachment_size;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
public String getAtt_reference() {
return att_reference;
}
public void setAtt_reference(String att_reference) {
this.att_reference = att_reference;
}
}

View File

@ -0,0 +1,89 @@
<?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.seeyon.dao.impl.CtpAttachmentDaoImpl">
<resultMap id="get-CtpAttachmentEntity-result" type="com.hzya.frame.seeyon.entity.CtpAttachmentEntity">
<result property="id" column="id" />
<result property="sub_reference" column="sub_reference" />
<result property="category" column="category" />
<result property="type" column="type" />
<result property="filename" column="filename" />
<result property="file_url" column="file_url" />
<result property="mime_type" column="mime_type" />
<result property="createdate" column="createdate" />
<result property="attachment_size" column="attachment_size" />
<result property="sort" column="sort" />
<result property="att_reference" column="att_reference" />
</resultMap>
<sql id="CtpAttachmentEntity_Column_List">
id,
sub_reference,
category,
type,
filename,
file_url,
mime_type,
createdate,
attachment_size,
sort,
att_reference
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-CtpAttachmentEntity-result" parameterType="com.hzya.frame.seeyon.entity.CtpAttachmentEntity">
select
<include refid="CtpAttachmentEntity_Column_List" />
from CTP_ATTACHMENT
<trim prefix="where" prefixOverrides="and">
<if test="file_url != null and file_url !='' ">file_url = #{file_url} </if>
</trim>
</select>
<!-- 新增 -->
<insert id="entity_insert" parameterType="com.hzya.frame.seeyon.entity.CtpAttachmentEntity">
insert into CTP_ATTACHMENT(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id !='' "> id, </if>
<if test="sub_reference != null and sub_reference !='' "> sub_reference, </if>
<if test="category != null and category !='' "> category, </if>
<if test="type != null and type !='' "> type, </if>
<if test="filename != null and filename !='' "> filename, </if>
<if test="file_url != null and file_url !='' "> file_url, </if>
<if test="mime_type != null and mime_type !='' "> mime_type, </if>
<if test="attachment_size != null and attachment_size !='' "> attachment_size, </if>
<if test="sort != null and sort !='' "> sort, </if>
<if test="att_reference != null and att_reference !='' "> att_reference, </if>
<if test="createdate != null"> createdate</if>
</trim>
)values
(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id !='' "> #{id}, </if>
<if test="sub_reference != null and sub_reference !='' "> #{sub_reference}, </if>
<if test="category != null and category !='' "> #{category}, </if>
<if test="type != null and type !='' "> #{type}, </if>
<if test="filename != null and filename !='' "> #{filename}, </if>
<if test="file_url != null and file_url !='' "> #{file_url}, </if>
<if test="mime_type != null and mime_type !='' "> #{mime_type}, </if>
<if test="attachment_size != null and attachment_size !='' "> #{attachment_size}, </if>
<if test="sort != null and sort !='' "> #{sort}, </if>
<if test="att_reference != null and att_reference !='' "> #{att_reference}, </if>
<if test="createdate != null "> #{createdate}</if>
</trim>
)
</insert>
<!-- 修改 付款单中的电子回单字段-->
<update id="entity_update" parameterType="com.hzya.frame.seeyon.entity.CtpAttachmentEntity">
update CTP_ATTACHMENT set
<trim suffix="" suffixOverrides=",">
<if test="sub_reference != null and sub_reference !='' "> sub_reference = #{sub_reference},</if>
<if test="att_reference != null and att_reference !='' "> att_reference = #{att_reference}</if>
</trim>
where file_url = #{file_url}
</update>
</mapper>

View File

@ -0,0 +1,113 @@
package com.hzya.frame.seeyon.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.io.File;
/**
* @Description OA附件表
* @Author xiangerlin
* @Date 2021/10/29 08:56
**/
public class CtpFileEntity extends BaseEntity {
private String category;//应用类别
private String type;//类型
private String filename;//文件名
private String mime_type;//文件类型
private String create_date;
private String create_member;
private String file_size;//大小
private String description;//描述
private String update_date;
private String account_id;
private File file;//临时用
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public String getMime_type() {
return mime_type;
}
public void setMime_type(String mime_type) {
this.mime_type = mime_type;
}
public String getCreate_date() {
return create_date;
}
public void setCreate_date(String create_date) {
this.create_date = create_date;
}
public String getCreate_member() {
return create_member;
}
public void setCreate_member(String create_member) {
this.create_member = create_member;
}
public String getFile_size() {
return file_size;
}
public void setFile_size(String file_size) {
this.file_size = file_size;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getUpdate_date() {
return update_date;
}
public void setUpdate_date(String update_date) {
this.update_date = update_date;
}
public String getAccount_id() {
return account_id;
}
public void setAccount_id(String account_id) {
this.account_id = account_id;
}
public File getFile() {
return file;
}
public void setFile(File file) {
this.file = file;
}
}

View File

@ -0,0 +1,49 @@
<?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.seeyon.entity.CtpFileEntity">
<resultMap id="get-CtpFileEntity-result" type="com.hzya.frame.seeyon.entity.CtpFileEntity">
<!--主键 -->
<result property="id" column="id" />
<result property="category" column="category" />
<result property="type" column="type" />
<result property="filename" column="filename" />
<result property="mime_type" column="mime_type" />
<result property="create_date" column="create_date" />
<result property="create_member" column="create_member" />
<result property="file_size" column="file_size" />
<result property="description" column="description" />
<result property="update_date" column="update_date" />
<result property="account_id" column="account_id" />
</resultMap>
<sql id="CtpFileEntity_sql">
id,
category,
type,
filename,
mime_type,
create_date,
create_member,
file_size,
description,
update_date,
account_id
</sql>
<!-- 查询 采用==查询 -->
<select id="CtpFileEntity_list_base" resultMap="get-CtpFileEntity-result" parameterType="com.hzya.frame.seeyon.entity.CtpFileEntity">
select
<include refid="CtpFileEntity_sql"/>
from
ctp_file
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">id = #{id}</if>
<if test="filename != null and filename != ''">and filename = #{filename}</if>
</trim>
</select>
</mapper>

View File

@ -0,0 +1,89 @@
package com.hzya.frame.seeyon.entity;
import com.alibaba.fastjson.annotation.JSONField;
/**
* @Description u8返回对象
* @Author xiangerlin
* @Date 2024/5/14 15:40
**/
public class OAU8ResponseDTO {
@JSONField(name = "Flag")
private String flag;
@JSONField(name = "DataOne")
private String dataOne;
@JSONField(name = "DataTwo")
private String dataTwo;
@JSONField(name = "Msg")
private String msg;
//如果co初始化失败或者token不对的时候会返回这些信息
private String code;
private String success;
private String message;
private String data;
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public String getDataOne() {
return dataOne;
}
public void setDataOne(String dataOne) {
this.dataOne = dataOne;
}
public String getDataTwo() {
return dataTwo;
}
public void setDataTwo(String dataTwo) {
this.dataTwo = dataTwo;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getSuccess() {
return success;
}
public void setSuccess(String success) {
this.success = success;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
}

View File

@ -0,0 +1,153 @@
package com.hzya.frame.seeyon.entity;
import com.alibaba.fastjson.JSONObject;
import java.util.Map;
/**
* @Content OA监听事件提供的表单内容
* @Author 👻👻👻👻👻👻👻👻👻👻 gjh
* @Date 2020-12-24 8:38
* @Version 1.0
*/
public class OAWorkflowEventDataEntity {
private String id;//业务表单id
private String eventType;//流程类型
/** 流程ID*/
private String summaryId;
/** 节点ID*/
private String affairId;
private String currentActivityId;
/** 表单表的FORM ID,用此字段标记是哪个流程*/
private String formApp;
/****/
private String formViewOperation;
private Object summaryObj;
private String deeCfgId;
private String currentNodeLast;
private Map<String, Object> businessData;
private Map<String, Object> extData;
private String businessDataStr;
private JSONObject hzyaExtData;//存放一些扩展数据
private String OnProcessFinished;
public String getSummaryId() {
return summaryId;
}
public void setSummaryId(String summaryId) {
this.summaryId = summaryId;
}
public String getAffairId() {
return affairId;
}
public void setAffairId(String affairId) {
this.affairId = affairId;
}
public String getCurrentActivityId() {
return currentActivityId;
}
public void setCurrentActivityId(String currentActivityId) {
this.currentActivityId = currentActivityId;
}
public String getFormApp() {
return formApp;
}
public void setFormApp(String formApp) {
this.formApp = formApp;
}
public String getFormViewOperation() {
return formViewOperation;
}
public void setFormViewOperation(String formViewOperation) {
this.formViewOperation = formViewOperation;
}
public Object getSummaryObj() {
return summaryObj;
}
public void setSummaryObj(Object summaryObj) {
this.summaryObj = summaryObj;
}
public String getDeeCfgId() {
return deeCfgId;
}
public void setDeeCfgId(String deeCfgId) {
this.deeCfgId = deeCfgId;
}
public String getCurrentNodeLast() {
return currentNodeLast;
}
public void setCurrentNodeLast(String currentNodeLast) {
this.currentNodeLast = currentNodeLast;
}
public Map<String, Object> getBusinessData() {
return businessData;
}
public void setBusinessData(Map<String, Object> businessData) {
this.businessData = businessData;
}
public Map<String, Object> getExtData() {
return extData;
}
public void setExtData(Map<String, Object> extData) {
this.extData = extData;
}
public String getBusinessDataStr() {
return businessDataStr;
}
public void setBusinessDataStr(String businessDataStr) {
this.businessDataStr = businessDataStr;
}
public String getOnProcessFinished() {
return OnProcessFinished;
}
public void setOnProcessFinished(String onProcessFinished) {
OnProcessFinished = onProcessFinished;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getEventType() {
return eventType;
}
public void setEventType(String eventType) {
this.eventType = eventType;
}
public JSONObject getHzyaExtData() {
return hzyaExtData;
}
public void setHzyaExtData(JSONObject hzyaExtData) {
this.hzyaExtData = hzyaExtData;
}
}

View File

@ -0,0 +1,112 @@
package com.hzya.frame.seeyon.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.util.List;
/**
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
* @version 1.0
* @content
* @date 2023-08-30 10:38
*/
public class SeeYonInterFaceEntity extends BaseEntity {
private String tabName;
//三方系统ID
private String tripartiteId;
//OA对应字段
private String oaField;
//模板info
private String field_info;
//模版ID
private String formAppId;
//主表集合
private List<String> formMainIds;
//主表ID用于查询明细数据
private String formMainId;
//事件类型
private String eventType;
//表单名称
private String name;
//流程id
private String summaryId;
public String getTabName() {
return tabName;
}
public void setTabName(String tabName) {
this.tabName = tabName;
}
public String getTripartiteId() {
return tripartiteId;
}
public void setTripartiteId(String tripartiteId) {
this.tripartiteId = tripartiteId;
}
public String getOaField() {
return oaField;
}
public void setOaField(String oaField) {
this.oaField = oaField;
}
public String getField_info() {
return field_info;
}
public void setField_info(String field_info) {
this.field_info = field_info;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getFormAppId() {
return formAppId;
}
public void setFormAppId(String formAppId) {
this.formAppId = formAppId;
}
public List<String> getFormMainIds() {
return formMainIds;
}
public void setFormMainIds(List<String> formMainIds) {
this.formMainIds = formMainIds;
}
public String getFormMainId() {
return formMainId;
}
public void setFormMainId(String formMainId) {
this.formMainId = formMainId;
}
public String getEventType() {
return eventType;
}
public void setEventType(String eventType) {
this.eventType = eventType;
}
public String getSummaryId() {
return summaryId;
}
public void setSummaryId(String summaryId) {
this.summaryId = summaryId;
}
}

View File

@ -0,0 +1,52 @@
<?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.seeyon.dao.impl.SeeYonInterFaceDaoImpl">
<resultMap id="get-entity-result" type="com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity">
<!--主键 -->
<result property="id" column="id" />
</resultMap>
<resultMap id="get-DefinitionEntity-result" type="com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="field_info" column="field_info" />
</resultMap>
<sql id="Sysproduct_Base_Column_List">
id as id
</sql>
<!-- 修改 -->
<select id="queryArchives" parameterType="com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity" resultMap="get-entity-result">
select id from ${tabName}
<trim prefix="where" prefixOverrides="and">
<if test="tripartiteId != null and tripartiteId != '' and oaField != null and oaField != '' ">${oaField} = #{tripartiteId} </if>
</trim>
</select>
<!-- 查询模版数据 -->
<select id="queryDefinitionInfo" parameterType="com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity" resultMap="get-DefinitionEntity-result">
SELECT id,NAME,FIELD_INFO from CAP_FORM_DEFINITION
<trim prefix="where" prefixOverrides="and">
<if test="formAppId != null and formAppId != '' "> id = #{formAppId} </if>
</trim>
</select>
<!-- 查询实体数据 -->
<select id="queryDefinitionData" parameterType="com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity" resultType="java.util.Map">
SELECT * from ${tabName}
<trim prefix="where" prefixOverrides="and">
<if test="formMainId != null and formMainId != '' ">
and formmain_id = #{formMainId}
</if>
<if test="formMainIds != null and formMainIds.size >0 ">
and id in
<foreach item="ids" collection="formMainIds" open="(" separator="," close=")">
#{ids}
</foreach>
</if>
</trim>
</select>
</mapper>

View File

@ -0,0 +1,693 @@
package com.hzya.frame.seeyon.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.util.List;
/**
* com.hzya.frame.seeyon.entity
*
* @author yqh
* @date 2023-08 -30 10:45
*/
public class SeeyonEntity extends BaseEntity {
private String field0026;//合同评审编号
private String field0001;//关联合同
private String field0003;//合同编号
private String field0016;//创建日期
private String field0002;//合同名称
private String field0004;//入账公司
private String field0005;//供应商
private String field0006;//合同类型
private String field0015;//合同签订日期
private String field0009;//合同开始时间
private String field0010;//合同结束时间
private String field0012;//是否固定金额
private String field0013;//合同总金额
private String field0027;//是否重大合同
private String field0008;//项目
private String field0032;//合同附件
private String field0033;//其他附件
private String field0034;//业务板块一级
private String field0035;//合同分类
private String field0038;//开票信息查询
private String field0039;//付款信息查询
private String field0044;//合同数量
private String field0047;//业务板块二级
private String field0048;//内容概要与评审理由
private String field0049;//是否多方
private String field0050;//是否多项目
private String field0054;//合同已付金额
private String field0055;//发票已收金额
private String field0056;//审批中付款金额
private String field0057;//审批中已收发票金额
private String field0017;//行号
private String field0018;//标的物名称
private String field0019;//标的物编码
private String field0021;//规格型号
private String field0022;//总数量
private String field0023;//单价
private String field0024;//不含税金额
private String field0025;//含税金额
private String field0036;//税率
private String field0037;//税务编码
private String field0040;//已开票数量
private String field0041;//剩余数量
private String field0042;//在途数量
private String field0051;//标的物明细表项目
private String field0052;//相对方
private String field0053;//其他相关方名称
private String tableName;//表名称
private List<SeeyonEntity> formson_0324;//合同标的物明细(明细表1)
private List<SeeyonEntity> formson_0352;// 相对方(明细表2)
private String formmain_id;//主表ID
private String file_url;//附件ID
private String sub_reference;//附件管理关系
private String filename;//附件名称
private String attachment_size;//文件大小
private String field0067;//状态
private String field0066;//业务板块三级
private String loginName;//登录名
private String dduid;//钉钉id
private String field0137;//付款账号
private String field0264;//CFS电子回单
private String summary_id;//col_summary表id
private String name;//姓名
private String pk_corp;//公司主键
private String field0120;//OA关联速网U8C主键的字段
private String field0121;//oa对接erp明细主键
private String details_id;//销售订单明细id
private String da_id;//销售订单档案id
private String pushField;//杭泰推送标识字段
private String pushValue;//推送的值
private String updateTime;
private String field0066Id;
private String field0047Id;
private String field0034Id;
private String field0103;//钉钉ID
private String sqlStr;//
public String getSqlStr() {
return sqlStr;
}
public void setSqlStr(String sqlStr) {
this.sqlStr = sqlStr;
}
public String getField0103() {
return field0103;
}
public void setField0103(String field0103) {
this.field0103 = field0103;
}
public String getField0066Id() {
return field0066Id;
}
public void setField0066Id(String field0066Id) {
this.field0066Id = field0066Id;
}
public String getField0047Id() {
return field0047Id;
}
public void setField0047Id(String field0047Id) {
this.field0047Id = field0047Id;
}
public String getField0034Id() {
return field0034Id;
}
public void setField0034Id(String field0034Id) {
this.field0034Id = field0034Id;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
public String getPushField() {
return pushField;
}
public void setPushField(String pushField) {
this.pushField = pushField;
}
public String getPushValue() {
return pushValue;
}
public void setPushValue(String pushValue) {
this.pushValue = pushValue;
}
public String getDa_id() {
return da_id;
}
public void setDa_id(String da_id) {
this.da_id = da_id;
}
public String getDetails_id() {
return details_id;
}
public void setDetails_id(String details_id) {
this.details_id = details_id;
}
public String getField0121() {
return field0121;
}
public void setField0121(String field0121) {
this.field0121 = field0121;
}
public String getField0120() {
return field0120;
}
public void setField0120(String field0120) {
this.field0120 = field0120;
}
public String getPk_corp() {
return pk_corp;
}
public void setPk_corp(String pk_corp) {
this.pk_corp = pk_corp;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getField0264() {
return field0264;
}
public void setField0264(String field0264) {
this.field0264 = field0264;
}
public String getSummary_id() {
return summary_id;
}
public void setSummary_id(String summary_id) {
this.summary_id = summary_id;
}
public String getField0137() {
return field0137;
}
public void setField0137(String field0137) {
this.field0137 = field0137;
}
public String getDduid() {
return dduid;
}
public void setDduid(String dduid) {
this.dduid = dduid;
}
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getField0067() {
return field0067;
}
public void setField0067(String field0067) {
this.field0067 = field0067;
}
public String getAttachment_size() {
return attachment_size;
}
public void setAttachment_size(String attachment_size) {
this.attachment_size = attachment_size;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public String getSub_reference() {
return sub_reference;
}
public void setSub_reference(String sub_reference) {
this.sub_reference = sub_reference;
}
public String getFile_url() {
return file_url;
}
public void setFile_url(String file_url) {
this.file_url = file_url;
}
public String getFormmain_id() {
return formmain_id;
}
public void setFormmain_id(String formmain_id) {
this.formmain_id = formmain_id;
}
public List<SeeyonEntity> getFormson_0324() {
return formson_0324;
}
public void setFormson_0324(List<SeeyonEntity> formson_0324) {
this.formson_0324 = formson_0324;
}
public List<SeeyonEntity> getFormson_0352() {
return formson_0352;
}
public void setFormson_0352(List<SeeyonEntity> formson_0352) {
this.formson_0352 = formson_0352;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getField0026() {
return field0026;
}
public void setField0026(String field0026) {
this.field0026 = field0026;
}
public String getField0001() {
return field0001;
}
public void setField0001(String field0001) {
this.field0001 = field0001;
}
public String getField0003() {
return field0003;
}
public void setField0003(String field0003) {
this.field0003 = field0003;
}
public String getField0016() {
return field0016;
}
public void setField0016(String field0016) {
this.field0016 = field0016;
}
public String getField0002() {
return field0002;
}
public void setField0002(String field0002) {
this.field0002 = field0002;
}
public String getField0004() {
return field0004;
}
public void setField0004(String field0004) {
this.field0004 = field0004;
}
public String getField0005() {
return field0005;
}
public void setField0005(String field0005) {
this.field0005 = field0005;
}
public String getField0006() {
return field0006;
}
public void setField0006(String field0006) {
this.field0006 = field0006;
}
public String getField0015() {
return field0015;
}
public void setField0015(String field0015) {
this.field0015 = field0015;
}
public String getField0009() {
return field0009;
}
public void setField0009(String field0009) {
this.field0009 = field0009;
}
public String getField0010() {
return field0010;
}
public void setField0010(String field0010) {
this.field0010 = field0010;
}
public String getField0012() {
return field0012;
}
public void setField0012(String field0012) {
this.field0012 = field0012;
}
public String getField0013() {
return field0013;
}
public void setField0013(String field0013) {
this.field0013 = field0013;
}
public String getField0027() {
return field0027;
}
public void setField0027(String field0027) {
this.field0027 = field0027;
}
public String getField0008() {
return field0008;
}
public void setField0008(String field0008) {
this.field0008 = field0008;
}
public String getField0032() {
return field0032;
}
public void setField0032(String field0032) {
this.field0032 = field0032;
}
public String getField0033() {
return field0033;
}
public void setField0033(String field0033) {
this.field0033 = field0033;
}
public String getField0034() {
return field0034;
}
public void setField0034(String field0034) {
this.field0034 = field0034;
}
public String getField0035() {
return field0035;
}
public void setField0035(String field0035) {
this.field0035 = field0035;
}
public String getField0038() {
return field0038;
}
public void setField0038(String field0038) {
this.field0038 = field0038;
}
public String getField0039() {
return field0039;
}
public void setField0039(String field0039) {
this.field0039 = field0039;
}
public String getField0044() {
return field0044;
}
public void setField0044(String field0044) {
this.field0044 = field0044;
}
public String getField0047() {
return field0047;
}
public void setField0047(String field0047) {
this.field0047 = field0047;
}
public String getField0048() {
return field0048;
}
public void setField0048(String field0048) {
this.field0048 = field0048;
}
public String getField0049() {
return field0049;
}
public void setField0049(String field0049) {
this.field0049 = field0049;
}
public String getField0050() {
return field0050;
}
public void setField0050(String field0050) {
this.field0050 = field0050;
}
public String getField0054() {
return field0054;
}
public void setField0054(String field0054) {
this.field0054 = field0054;
}
public String getField0055() {
return field0055;
}
public void setField0055(String field0055) {
this.field0055 = field0055;
}
public String getField0056() {
return field0056;
}
public void setField0056(String field0056) {
this.field0056 = field0056;
}
public String getField0057() {
return field0057;
}
public void setField0057(String field0057) {
this.field0057 = field0057;
}
public String getField0017() {
return field0017;
}
public void setField0017(String field0017) {
this.field0017 = field0017;
}
public String getField0018() {
return field0018;
}
public void setField0018(String field0018) {
this.field0018 = field0018;
}
public String getField0019() {
return field0019;
}
public void setField0019(String field0019) {
this.field0019 = field0019;
}
public String getField0021() {
return field0021;
}
public void setField0021(String field0021) {
this.field0021 = field0021;
}
public String getField0022() {
return field0022;
}
public void setField0022(String field0022) {
this.field0022 = field0022;
}
public String getField0023() {
return field0023;
}
public void setField0023(String field0023) {
this.field0023 = field0023;
}
public String getField0024() {
return field0024;
}
public void setField0024(String field0024) {
this.field0024 = field0024;
}
public String getField0025() {
return field0025;
}
public void setField0025(String field0025) {
this.field0025 = field0025;
}
public String getField0036() {
return field0036;
}
public void setField0036(String field0036) {
this.field0036 = field0036;
}
public String getField0037() {
return field0037;
}
public void setField0037(String field0037) {
this.field0037 = field0037;
}
public String getField0040() {
return field0040;
}
public void setField0040(String field0040) {
this.field0040 = field0040;
}
public String getField0041() {
return field0041;
}
public void setField0041(String field0041) {
this.field0041 = field0041;
}
public String getField0042() {
return field0042;
}
public void setField0042(String field0042) {
this.field0042 = field0042;
}
public String getField0051() {
return field0051;
}
public void setField0051(String field0051) {
this.field0051 = field0051;
}
public String getField0052() {
return field0052;
}
public void setField0052(String field0052) {
this.field0052 = field0052;
}
public String getField0053() {
return field0053;
}
public void setField0053(String field0053) {
this.field0053 = field0053;
}
public String getField0066() {
return field0066;
}
public void setField0066(String field0066) {
this.field0066 = field0066;
}
}

View File

@ -0,0 +1,254 @@
<?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.seeyon.dao.impl.SeeYonDaoImpl">
<resultMap id="get-SeeyonEntity-result" type="com.hzya.frame.seeyon.entity.SeeyonEntity">
<result property="id" column="id" />
<result property="field0026" column="field0026" />
<result property="field0001" column="field0001" />
<result property="field0003" column="field0003" />
<result property="field0016" column="field0016" />
<result property="field0002" column="field0002" />
<result property="field0004" column="field0004" />
<result property="field0005" column="field0005" />
<result property="field0006" column="field0006" />
<result property="field0015" column="field0015" />
<result property="field0009" column="field0009" />
<result property="field0010" column="field0010" />
<result property="field0012" column="field0012" />
<result property="field0013" column="field0013" />
<result property="field0027" column="field0027" />
<result property="field0008" column="field0008" />
<result property="field0032" column="field0032" />
<result property="field0033" column="field0033" />
<result property="field0034" column="field0034" />
<result property="field0035" column="field0035" />
<result property="field0038" column="field0038" />
<result property="field0039" column="field0039" />
<result property="field0044" column="field0044" />
<result property="field0047" column="field0047" />
<result property="field0048" column="field0048" />
<result property="field0049" column="field0049" />
<result property="field0050" column="field0050" />
<result property="field0054" column="field0054" />
<result property="field0055" column="field0055" />
<result property="field0056" column="field0056" />
<result property="field0057" column="field0057" />
<result property="field0017" column="field0017" />
<result property="field0018" column="field0018" />
<result property="field0019" column="field0019" />
<result property="field0021" column="field0021" />
<result property="field0022" column="field0022" />
<result property="field0023" column="field0023" />
<result property="field0024" column="field0024" />
<result property="field0025" column="field0025" />
<result property="field0036" column="field0036" />
<result property="field0037" column="field0037" />
<result property="field0040" column="field0040" />
<result property="field0041" column="field0041" />
<result property="field0042" column="field0042" />
<result property="field0051" column="field0051" />
<result property="field0052" column="field0052" />
<result property="field0053" column="field0053" />
<result property="field0067" column="field0067" />
<result property="field0066" column="field0066" />
<result property="formmian_id" column="formmian_id" />
<result property="file_url" column="file_url" />
<result property="filename" column="filename" />
<result property="attachment_size" column="attachment_size" />
<result property="loginName" column="loginName" />
<result property="dduid" column="dduid" />
<result property="field0137" column="field0137" />
<result property="field0264" column="field0264" />
<result property="summary_id" column="summary_id" />
<result property="name" column="name" />
<result property="pk_corp" column="pk_corp" />
<result property="field0120" column="field0120" />
<result property="field0121" column="field0121" />
<result property="details_id" column="details_id" />
<result property="da_id" column="da_id" />
<result property="field0066Id" column="field0066_id" />
<result property="field0047Id" column="field0047_id" />
<result property="field0034Id" column="field0034_id" />
<result property="field0103" column="field0103" />
</resultMap>
<sql id="SeeyonEntity_Base_Column_List">
id
</sql>
<sql id="SeeyonEntity_Base_Column_List_details">
splitbank,bankaccno,name,code
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base_formson_0324" resultMap="get-SeeyonEntity-result" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
select
body.id,
field0017,
field0018,
field0019,
field0021,
field0022,
field0023,
field0024,
field0025,
item.code as field0036,
field0037,
field0040,
field0041,
field0042,
field0051
from formson_0324 body
left join ctp_enum_item item on body.field0036 = item.id
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !=''">formmain_id=#{id}</if>
</trim>
</select>
<!-- 查询 采用==查询 -->
<select id="entity_list_base_formson_0352" resultMap="get-SeeyonEntity-result" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
select
body.id,
item.SHOWVALUE as field0052,
field0053
from formson_0352 body
left join ctp_enum_item item on body.field0052 = item.id
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !=''">formmain_id=#{id}</if>
</trim>
</select>
<!-- 查询 采用==查询 -->
<select id="entity_list_base_main" resultMap="get-SeeyonEntity-result" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
select
main.id,
field0026,
field0001,
field0003,
field0016,
field0002,
field0004,
field0005,
item1.SHOWVALUE as field0006,
field0015,
field0009,
field0010,
item2.SHOWVALUE as field0012,
field0013,
item3.SHOWVALUE as field0027,
field0008,
field0032,
field0033,
item4.SHOWVALUE as field0034,
item5.SHOWVALUE as field0035,
field0038,
field0039,
field0044,
item6.SHOWVALUE as field0047,
field0048,
item7.SHOWVALUE as field0049,
item8.SHOWVALUE as field0050,
field0054,
field0055,
field0056,
field0057,
field0063,
field0064,
field0065,
item9.SHOWVALUE as field0066,
field0067,
sm_user.loginName,
sm_user.dduid,
field0103,
field0034 as field0034_id,
field0047 as field0047_id,
field0066 as field0066_id
from formmain_0323 main
left join ctp_enum_item item1 on main.field0006 = item1.id
left join ctp_enum_item item2 on main.field0012 = item2.id
left join ctp_enum_item item3 on main.field0027 = item3.id
left join ctp_enum_item item4 on main.field0034 = item4.id
left join ctp_enum_item item5 on main.field0035 = item5.id
left join ctp_enum_item item6 on main.field0047 = item6.id
left join ctp_enum_item item7 on main.field0049 = item7.id
left join ctp_enum_item item8 on main.field0050 = item8.id
left join ctp_enum_item item9 on main.field0066 = item9.id
left join v_user_view_all sm_user on sm_user.id = main.start_member_id
where 1=1
AND field0003 = '345678'
and (field0103 is null or main.modify_date >= #{updateTime})
</select>
<!-- 查询 采用==查询 -->
<select id="entity_list_base_ctp_attachment" resultMap="get-SeeyonEntity-result" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
select * FROM ctp_attachment where sub_reference = #{sub_reference}
</select>
<!-- 查询 查询付款单中电子回单为null得 -->
<select id="entity_list_base_formmain_0327" resultMap="get-SeeyonEntity-result" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
select -- top 5.
main.id,
main.field0264,
col.id as summary_id,
formson.field0137 -- 付款账号
from formmain_0327 main
left join formson_0329 formson on formson.formmain_id=main.id
left join col_summary col on col.form_recordid=main.id
where main.field0264 is null
and CONVERT(varchar,main.start_date,120) > '2023-11-02 10:05'
and formmain_id='6385523488104860827'
group by main.id,formson.field0137,main.field0264,col.id
</select>
<!-- 查询 根据付款方id查询v_user_view_all中得名称 -->
<select id="entity_list_base_field0258" resultMap="get-SeeyonEntity-result" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
select name from v_user_view_all where staffID=#{id}
</select>
<!-- 查询 查询速网U8C中所有组织-->
<select id="entity_list_base_corp" resultMap="get-SeeyonEntity-result" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
select pk_corp from bd_corp;
</select>
<!-- 查询 根据销售订单单据编码查询销售档案主键-->
<select id="entity_list_base_formmain_0237" resultMap="get-SeeyonEntity-result" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
select id as da_id from formmain_0237 where field0010=#{field0010}
</select>
<!-- 修改 付款单中的电子回单字段-->
<update id="entity_update_formmain_0327" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
update formmain_0327 set field0264 = #{field0264} where id = #{id}
</update>
<!-- 修改 -->
<update id="entity_update" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
update formmain_0323 set field0067 = 'Y'
where id = #{id}
</update>
<!-- 修改 修改OA字段为速网U8C销售订单主键 -->
<update id="entity_update_formmain_0237" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
update formmain_0237 set field0120 = #{field0120}
where field0010 = #{field0010}
</update>
<!-- 修改 修改OA字段为速网U8C销售订单明细主键 -->
<update id="entity_update_formson_0238" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
update formson_0238 set field0121 = #{field0121}
where field0012 = #{field0012} and formmain_id=#{formmain_id}
</update>
<!-- 修改 修改付款单报销单等单据的推送状态 -->
<update id="entity_update_push" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
update ${tableName} set ${pushField} = #{pushValue}
where id=#{id}
</update>
<!-- 修改 修改付款单报销单等单据的推送状态 -->
<update id="entity_update_file_by_id" parameterType="com.hzya.frame.seeyon.entity.SeeyonEntity">
${sqlStr}
</update>
</mapper>

View File

@ -0,0 +1,45 @@
package com.hzya.frame.seeyon.enums;
/**
* 流程事件类型枚举
*/
public enum ColEventTypeEnum {
ONBEFORESTART("onBeforeStart","流程发起前"),
ONSTART("onStart","流程发起"),
ONBEFORESTOP("onBeforeStop","终止前事件"),
ONSTOP("onStop","终止事件"),
ONBEFORECANCEL("onBeforeCancel","撤销前事件"),
ONCANCEL("onCancel","撤销事件"),
ONPROCESSFINISHED("onProcessFinished","结束事件"),
ONBEFOREFINISHWORKITEM("onBeforeFinishWorkitem","处理前事件"),
ONFINISHWORKITEM("onFinishWorkitem","处理事件"),
ONBEFORESTEPBACK("onBeforeStepBack","回退前事件"),
ONSTEPBACK("onStepBack","回退事件"),
ONBEFORETAKEBACK("onBeforeTakeBack","取回前事件"),
ONTAKEBACK("onTakeBack","取回事件"),
;
private String type;
private String name;
ColEventTypeEnum(String type, String name) {
this.type = type;
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@ -0,0 +1,33 @@
package com.hzya.frame.seeyon.paybill.dao;
import com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity;
import com.hzya.frame.seeyon.paybill.entity.PayBillEntity;
import java.util.List;
import java.util.Map;
/**
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
* @version 1.0
* @content
* @date 2023-08-30 10:27
*/
public interface IPayBillDao {
/**
*
* @content 获取OA工程付款单数据
* @author laborer
* @date 2024/6/20 0020 11:30
*
*/
List<PayBillEntity> getOaEngineerPay(PayBillEntity entity);
/**
*
* @content 修改推送状态
* @author laborer
* @date 2024/6/21 0021 11:15
*
*/
int updateState(PayBillEntity pay);
}

View File

@ -0,0 +1,32 @@
package com.hzya.frame.seeyon.paybill.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity;
import com.hzya.frame.seeyon.paybill.dao.IPayBillDao;
import com.hzya.frame.seeyon.paybill.entity.PayBillEntity;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
* @version 1.0
* @content
* @date 2023-08-30 10:27
*/
@Repository(value = "PayBillDaoImpl")
public class PayBillDaoImpl extends MybatisGenericDao implements IPayBillDao {
@DS("#entity.dataSourceCode")
@Override
public List<PayBillEntity> getOaEngineerPay(PayBillEntity entity) {
return super.selectList("com.hzya.frame.seeyon.paybill.dao.impl.PayBillDaoImpl.PayBillEntity_list_base",entity);
}
@DS("#pay.dataSourceCode")
@Override
public int updateState(PayBillEntity pay) {
return super.update("com.hzya.frame.seeyon.paybill.dao.impl.PayBillDaoImpl.PayBillEntity_update",pay);
}
}

View File

@ -0,0 +1,107 @@
package com.hzya.frame.seeyon.paybill.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.util.List;
import java.util.Map;
/**
*
* @content 付款結算單
* @author laborer
* @date 2024/6/20 0020 11:07
*
*/
public class PayBillEntity extends BaseEntity {
private String billDate;//付款日期
private String primalMoney;//付款金额信息
private String pkOppaccount;//付款银行信息
private String pkSupplier;//供应商信息
private String tableName;//表名称
private String fieldName;//字段名称
private String state;//推送状态
private String pkOrg;//组织
private String pkCustomer;//客户
private String pk_oppaccount;//付款账户
public String getPkCustomer() {
return pkCustomer;
}
public void setPkCustomer(String pkCustomer) {
this.pkCustomer = pkCustomer;
}
public String getPk_oppaccount() {
return pk_oppaccount;
}
public void setPk_oppaccount(String pk_oppaccount) {
this.pk_oppaccount = pk_oppaccount;
}
public String getPkOrg() {
return pkOrg;
}
public void setPkOrg(String pkOrg) {
this.pkOrg = pkOrg;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
public String getBillDate() {
return billDate;
}
public void setBillDate(String billDate) {
this.billDate = billDate;
}
public String getPrimalMoney() {
return primalMoney;
}
public void setPrimalMoney(String primalMoney) {
this.primalMoney = primalMoney;
}
public String getPkOppaccount() {
return pkOppaccount;
}
public void setPkOppaccount(String pkOppaccount) {
this.pkOppaccount = pkOppaccount;
}
public String getPkSupplier() {
return pkSupplier;
}
public void setPkSupplier(String pkSupplier) {
this.pkSupplier = pkSupplier;
}
}

View File

@ -0,0 +1,62 @@
<?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.seeyon.paybill.dao.impl.PayBillDaoImpl">
<resultMap id="get-PayBillEntity-result" type="com.hzya.frame.seeyon.paybill.entity.PayBillEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="pkOrg" column="pk_org" jdbcType="VARCHAR"/>
<result property="billDate" column="bill_date" jdbcType="VARCHAR"/>
<result property="primalMoney" column="primal_money" jdbcType="VARCHAR"/>
<result property="pkOppaccount" column="pk_oppaccount" jdbcType="VARCHAR"/>
<result property="pkSupplier" column="pk_supplier" jdbcType="VARCHAR"/>
<result property="tableName" column="table_name" jdbcType="VARCHAR"/>
<result property="fieldName" column="field_name" jdbcType="VARCHAR"/>
</resultMap>
<!--工程项目查询-->
<select id="PayBillEntity_list_base" resultMap="get-PayBillEntity-result" parameterType="com.hzya.frame.seeyon.paybill.entity.PayBillEntity">
SELECT
body.id as id,
field0070 AS bill_date,
field0057 AS primal_money,
field0019 AS pk_oppaccount,
field0082 AS pk_supplier,
'formson_0222' as table_name,
'field0084' as field_name
FROM formmain_0093 main
LEFT JOIN formson_0222 body ON main.id = body.formmain_id
WHERE field0070 IS NOT null and field0084 is null
union all
SELECT
body.id as id,
field0073 AS bill_date,
field0031 AS primal_money,
field0042 AS pk_oppaccount,
field0077 AS pk_supplier,
'formson_0210' as table_name,
'field0078' as field_name
FROM formmain_0209 main
LEFT JOIN formson_0210 body ON main.id = body.formmain_id
WHERE field0073 IS NOT null and field0078 is null
union all
SELECT
body.id as id,
field0053 AS bill_date,
field0041 AS primal_money,
field0024 AS pk_oppaccount,
field0057 AS pk_supplier,
'formson_0223' as table_name,
'field0058' as field_name
FROM formmain_0094 main
LEFT JOIN formson_0223 body ON main.id = body.formmain_id
WHERE field0053 IS NOT NULL and field0058 is null
</select>
<!--通过主键修改方法-->
<update id="PayBillEntity_update" parameterType = "java.util.Map" >
update ${tableName} set ${fieldName} = #{state} where id = #{id}
</update>
</mapper>

View File

@ -0,0 +1,29 @@
package com.hzya.frame.seeyon.paybill.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import com.hzya.frame.seeyon.paybill.entity.PayBillEntity;
import com.hzya.frame.web.entity.JsonResultEntity;
import java.util.List;
/**
*
* @content huoqu
* @author laborer获取OA付款单数据并推送BIP生成付款结算单
* @date 2024/6/20 0020 11:19
*
*/
public interface IPayBillService extends IBaseService<PaymentEntity,String> {
/**
*
* @content 工程付款单数据同步BIP
* @author laborer
* @date 2024/6/20 0020 11:24
*
*/
JsonResultEntity sendEngineerPayBillToBip(JSONObject requestJson);
}

View File

@ -0,0 +1,105 @@
package com.hzya.frame.seeyon.paybill.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import com.hzya.frame.seeyon.paybill.dao.IPayBillDao;
import com.hzya.frame.seeyon.paybill.entity.PayBillEntity;
import com.hzya.frame.seeyon.paybill.service.IPayBillService;
import com.hzya.frame.seeyon.service.impl.SeeYonInterFaceImpl;
import com.hzya.frame.seeyon.util.OABipUtil;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.commons.collections.CollectionUtils;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
*
* @content 付款单同步BIP
* @author laborer
* @date 2024/6/20 0020 15:20
*
*/
@Service("PayBillServiceImpl")
public class PayBillServiceImpl extends BaseService<PaymentEntity,String> implements IPayBillService {
private static final Logger logger = LoggerFactory.getLogger(PayBillServiceImpl.class);
@Autowired
private IPayBillDao payBillDao;
/**
*
* @content 工程付款单数据同步BIP
* @author laborer
* @date 2024/6/20 0020 11:24
*
*/
@Override
public JsonResultEntity sendEngineerPayBillToBip(JSONObject requestJson) {
PayBillEntity entity = new PayBillEntity();
requestJson.put("db_code","OA");
entity.setDataSourceCode(requestJson.getString("db_code"));
List<PayBillEntity>payBillEntityList = payBillDao.getOaEngineerPay(entity);
if(CollectionUtils.isNotEmpty(payBillEntityList)){
for(PayBillEntity pay : payBillEntityList){
String token = OABipUtil.getBipToken("yonyou","8000230000");
JSONObject main = bindingAdd(pay);
logger.info("工程付款单调用中台生成BIP付款结算单推送报文{}",main.toString());
String result = OABipUtil.sendU9cTOBipEsb(main.toString(),"8000230014",token);
logger.info("工程付款单调用中台生成BIP付款结算单返回结果{}",result);
JSONObject resultObj = JSON.parseObject(result);
boolean flag = resultObj.getBoolean("success");
if(flag){
pay.setState("Y");
}else{
pay.setState("N");
}
pay.setDataSourceCode(requestJson.getString("db_code"));
payBillDao.updateState(pay);
// todo 后续在写吧没字段等OA开了外网在创建修改推送状态避免再次查询
}
}
return null;
}
@NotNull
private JSONObject bindingAdd(PayBillEntity pay) {
JSONObject head = new JSONObject();
head.put("pk_org","");//所属组织
head.put("pk_group","");//集团
head.put("bill_type","F5");//单据类型 默认F5
head.put("trade_type","D5");//付款结算类型 默认D5
head.put("source_flag","2");//付款结算类型 默认2
head.put("bill_date",pay.getBillDate());//单据日期
head.put("primal_money",pay.getPrimalMoney());//付款原币金额
head.put("pk_currtype","CNY");//币种
head.put("billmaker","");//制单人
//处理明细数据按照明细付款 多个明细生成多个付款结算单
JSONArray detailsArr = new JSONArray();
JSONObject body = new JSONObject();
body.put("pk_org","");//所属组织
body.put("pk_group","");//集团
body.put("bill_type","F5");//单据类型 默认F5
body.put("trade_type","D5");//付款结算类型 默认D5
body.put("pk_currtype","CNY");//币种
body.put("bill_date",pay.getBillDate());//单据日期
body.put("pay_primal",pay.getPrimalMoney());//付款原币金额
body.put("creationtime",pay.getBillDate());//创建时间
body.put("direction","-1");//方向 :1=;-1=;
body.put("objecttype","0");//交易对象
body.put("pk_customer",pay.getPkCustomer());//客户
body.put("pk_account",pay.getPkOppaccount());//付款银行账号
detailsArr.add(body);
JSONObject main = new JSONObject();
main.put("head",head);//表头
main.put("body",detailsArr);//明细数据
return main;
}
}

View File

@ -0,0 +1,31 @@
package com.hzya.frame.seeyon.recbill.dao;
import com.hzya.frame.seeyon.recbill.entity.RecBillEntity;
import java.util.List;
/**
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
* @version 1.0
* @content
* @date 2023-08-30 10:27
*/
public interface IRecBillDao {
/**
*
* @content 获取OA工程付款单数据
* @author laborer
* @date 2024/6/20 0020 11:30
*
*/
List<RecBillEntity> getOaRecBill(RecBillEntity rec);
/**
*
* @content 修改推送状态
* @author laborer
* @date 2024/6/21 0021 11:15
*
*/
int updateState(RecBillEntity rec);
}

View File

@ -0,0 +1,30 @@
package com.hzya.frame.seeyon.recbill.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.seeyon.recbill.dao.IRecBillDao;
import com.hzya.frame.seeyon.recbill.entity.RecBillEntity;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
* @version 1.0
* @content
* @date 2023-08-30 10:27
*/
@Repository(value = "RecBillDaoImpl")
public class RecBillDaoImpl extends MybatisGenericDao implements IRecBillDao {
@DS("#rec.dataSourceCode")
@Override
public List<RecBillEntity> getOaRecBill(RecBillEntity rec) {
return super.selectList("com.hzya.frame.seeyon.recbill.dao.impl.RecBillDaoImpl.PayBillEntity_list_base",rec);
}
@DS("#rec.dataSourceCode")
@Override
public int updateState(RecBillEntity rec) {
return super.update("com.hzya.frame.seeyon.recbill.dao.impl.RecBillDaoImpl.PayBillEntity_update",rec);
}
}

Some files were not shown because too many files have changed in this diff Show More