Merge branch 'zhouju' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into zhouju
This commit is contained in:
commit
dc527fd8db
|
@ -18,6 +18,11 @@
|
|||
<artifactId>base-webapp</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<artifactId>fw-u8</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao;
|
||||
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
|
||||
import com.hzya.frame.u8.base.inventory.entity.InventoryEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/****
|
||||
* 物料档案同步插件
|
||||
* @content:
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2025-03-03 10:57
|
||||
* @param
|
||||
* @return
|
||||
**/
|
||||
public interface IZjMaterielSynchronizationEventDao extends IBaseDao<ZjMaterielSynchronizationEventEntity, String> {
|
||||
|
||||
List<InventoryEntity> queryInventoryEntity(List<ZjMaterielSynchronizationEventEntity> list,String dataSourceCode);
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.IZjMaterielSynchronizationEventDao;
|
||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
|
||||
import com.hzya.frame.seeyon.entity.SeeyonEntity;
|
||||
import com.hzya.frame.u8.base.inventory.entity.InventoryEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/***
|
||||
* 物料档案同步
|
||||
* @content:
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2025-03-03 11:12
|
||||
* @param
|
||||
* @return
|
||||
**/
|
||||
public class ZjMaterielSynchronizationEventDaoImpl extends MybatisGenericDao<ZjMaterielSynchronizationEventEntity, String> implements IZjMaterielSynchronizationEventDao {
|
||||
|
||||
@Override
|
||||
@DS("#dataSourceCode")
|
||||
public List<InventoryEntity> queryInventoryEntity(List<ZjMaterielSynchronizationEventEntity> list,String dataSourceCode) {
|
||||
return (List<InventoryEntity>) super.selectList(getSqlIdPrifx() + "queryInventoryEntity",list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,504 @@
|
|||
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/****
|
||||
* 物料档案实体类
|
||||
* @content:
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2025-03-03 10:53
|
||||
* @param
|
||||
* @return
|
||||
**/
|
||||
public class ZjMaterielSynchronizationEventEntity extends BaseEntity {
|
||||
|
||||
|
||||
private String formmain_id;//主表id
|
||||
private String field0004;//序号1
|
||||
private String field0038;//是否更新
|
||||
private String field0038code;//是否更新
|
||||
private String field0005;//货品编码/存货编码/物料编码
|
||||
private String field0006;//货品名称/物料名称
|
||||
private String field0007;//货品规格型号
|
||||
private String field0008;//品牌
|
||||
private String field0008code;//品牌
|
||||
private String field0009;//规格书
|
||||
private String field0009code;//规格书
|
||||
private String field0010;//环保报告
|
||||
private String field0010code;//环保报告
|
||||
private String field0011;//ERP中相同型号不同品牌的编码
|
||||
private String field0012;//优选等级
|
||||
private String field0012code;//优选等级
|
||||
private String field0013;//适用产品
|
||||
private String field0014;//产品分类
|
||||
private String field0014code;//产品分类
|
||||
private String field0015;//备注
|
||||
private String field0016;//最小包装量
|
||||
private String field0017;//封装分类
|
||||
private String field0017code;//封装分类
|
||||
private String field0018;//申请原因
|
||||
private String field0018code;//申请原因
|
||||
private String field0019;//潮敏等级
|
||||
private String field0019code;//潮敏等级
|
||||
private String field0020;//是否退税软件
|
||||
private String field0020code;//是否退税软件
|
||||
private String field0022;//是否委外
|
||||
private String field0022code;//是否委外
|
||||
private String field0030;//上传附件1
|
||||
private String field0031;//上传附件2
|
||||
private String field0032;//负责人
|
||||
private String field0032code;//负责人
|
||||
private String field0033;//产品阶段
|
||||
private String field0033code;//产品阶段
|
||||
private String field0034;//客户名
|
||||
private String field0034code;//客户名
|
||||
private String field0035;//是否带入档案
|
||||
private String field0035code;//是否带入档案
|
||||
private String field0039;//开发号
|
||||
private String field0040;//仓库名称
|
||||
private String field0040code;//仓库名称
|
||||
private String field0042;//物料属性
|
||||
private String field0042code;//物料属性
|
||||
private String field0043;//物料中类编码/存货分类/物料分类
|
||||
private String field0043code;//物料中类编码/存货分类/物料分类
|
||||
private String field0044;//物料一级分类
|
||||
private String field0045;//货品代码
|
||||
private String field0047;//物料类别
|
||||
private String field0047code;//物料类别
|
||||
private String field0048;//计量单位
|
||||
private String field0048code;//计量单位
|
||||
|
||||
|
||||
public String getFormmain_id() {
|
||||
return formmain_id;
|
||||
}
|
||||
|
||||
public void setFormmain_id(String formmain_id) {
|
||||
this.formmain_id = formmain_id;
|
||||
}
|
||||
|
||||
public String getField0004() {
|
||||
return field0004;
|
||||
}
|
||||
|
||||
public void setField0004(String field0004) {
|
||||
this.field0004 = field0004;
|
||||
}
|
||||
|
||||
public String getField0038() {
|
||||
return field0038;
|
||||
}
|
||||
|
||||
public void setField0038(String field0038) {
|
||||
this.field0038 = field0038;
|
||||
}
|
||||
|
||||
public String getField0038code() {
|
||||
return field0038code;
|
||||
}
|
||||
|
||||
public void setField0038code(String field0038code) {
|
||||
this.field0038code = field0038code;
|
||||
}
|
||||
|
||||
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 getField0007() {
|
||||
return field0007;
|
||||
}
|
||||
|
||||
public void setField0007(String field0007) {
|
||||
this.field0007 = field0007;
|
||||
}
|
||||
|
||||
public String getField0008() {
|
||||
return field0008;
|
||||
}
|
||||
|
||||
public void setField0008(String field0008) {
|
||||
this.field0008 = field0008;
|
||||
}
|
||||
|
||||
public String getField0008code() {
|
||||
return field0008code;
|
||||
}
|
||||
|
||||
public void setField0008code(String field0008code) {
|
||||
this.field0008code = field0008code;
|
||||
}
|
||||
|
||||
public String getField0009() {
|
||||
return field0009;
|
||||
}
|
||||
|
||||
public void setField0009(String field0009) {
|
||||
this.field0009 = field0009;
|
||||
}
|
||||
|
||||
public String getField0009code() {
|
||||
return field0009code;
|
||||
}
|
||||
|
||||
public void setField0009code(String field0009code) {
|
||||
this.field0009code = field0009code;
|
||||
}
|
||||
|
||||
public String getField0010() {
|
||||
return field0010;
|
||||
}
|
||||
|
||||
public void setField0010(String field0010) {
|
||||
this.field0010 = field0010;
|
||||
}
|
||||
|
||||
public String getField0010code() {
|
||||
return field0010code;
|
||||
}
|
||||
|
||||
public void setField0010code(String field0010code) {
|
||||
this.field0010code = field0010code;
|
||||
}
|
||||
|
||||
public String getField0011() {
|
||||
return field0011;
|
||||
}
|
||||
|
||||
public void setField0011(String field0011) {
|
||||
this.field0011 = field0011;
|
||||
}
|
||||
|
||||
public String getField0012() {
|
||||
return field0012;
|
||||
}
|
||||
|
||||
public void setField0012(String field0012) {
|
||||
this.field0012 = field0012;
|
||||
}
|
||||
|
||||
public String getField0012code() {
|
||||
return field0012code;
|
||||
}
|
||||
|
||||
public void setField0012code(String field0012code) {
|
||||
this.field0012code = field0012code;
|
||||
}
|
||||
|
||||
public String getField0013() {
|
||||
return field0013;
|
||||
}
|
||||
|
||||
public void setField0013(String field0013) {
|
||||
this.field0013 = field0013;
|
||||
}
|
||||
|
||||
public String getField0014() {
|
||||
return field0014;
|
||||
}
|
||||
|
||||
public void setField0014(String field0014) {
|
||||
this.field0014 = field0014;
|
||||
}
|
||||
|
||||
public String getField0014code() {
|
||||
return field0014code;
|
||||
}
|
||||
|
||||
public void setField0014code(String field0014code) {
|
||||
this.field0014code = field0014code;
|
||||
}
|
||||
|
||||
public String getField0015() {
|
||||
return field0015;
|
||||
}
|
||||
|
||||
public void setField0015(String field0015) {
|
||||
this.field0015 = field0015;
|
||||
}
|
||||
|
||||
public String getField0016() {
|
||||
return field0016;
|
||||
}
|
||||
|
||||
public void setField0016(String field0016) {
|
||||
this.field0016 = field0016;
|
||||
}
|
||||
|
||||
public String getField0017() {
|
||||
return field0017;
|
||||
}
|
||||
|
||||
public void setField0017(String field0017) {
|
||||
this.field0017 = field0017;
|
||||
}
|
||||
|
||||
public String getField0017code() {
|
||||
return field0017code;
|
||||
}
|
||||
|
||||
public void setField0017code(String field0017code) {
|
||||
this.field0017code = field0017code;
|
||||
}
|
||||
|
||||
public String getField0018() {
|
||||
return field0018;
|
||||
}
|
||||
|
||||
public void setField0018(String field0018) {
|
||||
this.field0018 = field0018;
|
||||
}
|
||||
|
||||
public String getField0018code() {
|
||||
return field0018code;
|
||||
}
|
||||
|
||||
public void setField0018code(String field0018code) {
|
||||
this.field0018code = field0018code;
|
||||
}
|
||||
|
||||
public String getField0019() {
|
||||
return field0019;
|
||||
}
|
||||
|
||||
public void setField0019(String field0019) {
|
||||
this.field0019 = field0019;
|
||||
}
|
||||
|
||||
public String getField0019code() {
|
||||
return field0019code;
|
||||
}
|
||||
|
||||
public void setField0019code(String field0019code) {
|
||||
this.field0019code = field0019code;
|
||||
}
|
||||
|
||||
public String getField0020() {
|
||||
return field0020;
|
||||
}
|
||||
|
||||
public void setField0020(String field0020) {
|
||||
this.field0020 = field0020;
|
||||
}
|
||||
|
||||
public String getField0020code() {
|
||||
return field0020code;
|
||||
}
|
||||
|
||||
public void setField0020code(String field0020code) {
|
||||
this.field0020code = field0020code;
|
||||
}
|
||||
|
||||
public String getField0022() {
|
||||
return field0022;
|
||||
}
|
||||
|
||||
public void setField0022(String field0022) {
|
||||
this.field0022 = field0022;
|
||||
}
|
||||
|
||||
public String getField0022code() {
|
||||
return field0022code;
|
||||
}
|
||||
|
||||
public void setField0022code(String field0022code) {
|
||||
this.field0022code = field0022code;
|
||||
}
|
||||
|
||||
public String getField0030() {
|
||||
return field0030;
|
||||
}
|
||||
|
||||
public void setField0030(String field0030) {
|
||||
this.field0030 = field0030;
|
||||
}
|
||||
|
||||
public String getField0031() {
|
||||
return field0031;
|
||||
}
|
||||
|
||||
public void setField0031(String field0031) {
|
||||
this.field0031 = field0031;
|
||||
}
|
||||
|
||||
public String getField0032() {
|
||||
return field0032;
|
||||
}
|
||||
|
||||
public void setField0032(String field0032) {
|
||||
this.field0032 = field0032;
|
||||
}
|
||||
|
||||
public String getField0032code() {
|
||||
return field0032code;
|
||||
}
|
||||
|
||||
public void setField0032code(String field0032code) {
|
||||
this.field0032code = field0032code;
|
||||
}
|
||||
|
||||
public String getField0033() {
|
||||
return field0033;
|
||||
}
|
||||
|
||||
public void setField0033(String field0033) {
|
||||
this.field0033 = field0033;
|
||||
}
|
||||
|
||||
public String getField0033code() {
|
||||
return field0033code;
|
||||
}
|
||||
|
||||
public void setField0033code(String field0033code) {
|
||||
this.field0033code = field0033code;
|
||||
}
|
||||
|
||||
public String getField0034() {
|
||||
return field0034;
|
||||
}
|
||||
|
||||
public void setField0034(String field0034) {
|
||||
this.field0034 = field0034;
|
||||
}
|
||||
|
||||
public String getField0034code() {
|
||||
return field0034code;
|
||||
}
|
||||
|
||||
public void setField0034code(String field0034code) {
|
||||
this.field0034code = field0034code;
|
||||
}
|
||||
|
||||
public String getField0035() {
|
||||
return field0035;
|
||||
}
|
||||
|
||||
public void setField0035(String field0035) {
|
||||
this.field0035 = field0035;
|
||||
}
|
||||
|
||||
public String getField0035code() {
|
||||
return field0035code;
|
||||
}
|
||||
|
||||
public void setField0035code(String field0035code) {
|
||||
this.field0035code = field0035code;
|
||||
}
|
||||
|
||||
public String getField0039() {
|
||||
return field0039;
|
||||
}
|
||||
|
||||
public void setField0039(String field0039) {
|
||||
this.field0039 = field0039;
|
||||
}
|
||||
|
||||
public String getField0040() {
|
||||
return field0040;
|
||||
}
|
||||
|
||||
public void setField0040(String field0040) {
|
||||
this.field0040 = field0040;
|
||||
}
|
||||
|
||||
public String getField0040code() {
|
||||
return field0040code;
|
||||
}
|
||||
|
||||
public void setField0040code(String field0040code) {
|
||||
this.field0040code = field0040code;
|
||||
}
|
||||
|
||||
public String getField0042() {
|
||||
return field0042;
|
||||
}
|
||||
|
||||
public void setField0042(String field0042) {
|
||||
this.field0042 = field0042;
|
||||
}
|
||||
|
||||
public String getField0042code() {
|
||||
return field0042code;
|
||||
}
|
||||
|
||||
public void setField0042code(String field0042code) {
|
||||
this.field0042code = field0042code;
|
||||
}
|
||||
|
||||
public String getField0043() {
|
||||
return field0043;
|
||||
}
|
||||
|
||||
public void setField0043(String field0043) {
|
||||
this.field0043 = field0043;
|
||||
}
|
||||
|
||||
public String getField0044() {
|
||||
return field0044;
|
||||
}
|
||||
|
||||
public void setField0044(String field0044) {
|
||||
this.field0044 = field0044;
|
||||
}
|
||||
|
||||
public String getField0045() {
|
||||
return field0045;
|
||||
}
|
||||
|
||||
public void setField0045(String field0045) {
|
||||
this.field0045 = field0045;
|
||||
}
|
||||
|
||||
public String getField0047() {
|
||||
return field0047;
|
||||
}
|
||||
|
||||
public void setField0047(String field0047) {
|
||||
this.field0047 = field0047;
|
||||
}
|
||||
|
||||
public String getField0047code() {
|
||||
return field0047code;
|
||||
}
|
||||
|
||||
public void setField0047code(String field0047code) {
|
||||
this.field0047code = field0047code;
|
||||
}
|
||||
|
||||
public String getField0048() {
|
||||
return field0048;
|
||||
}
|
||||
|
||||
public void setField0048(String field0048) {
|
||||
this.field0048 = field0048;
|
||||
}
|
||||
|
||||
public String getField0048code() {
|
||||
return field0048code;
|
||||
}
|
||||
|
||||
public void setField0048code(String field0048code) {
|
||||
this.field0048code = field0048code;
|
||||
}
|
||||
|
||||
public String getField0043code() {
|
||||
return field0043code;
|
||||
}
|
||||
|
||||
public void setField0043code(String field0043code) {
|
||||
this.field0043code = field0043code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?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.zjmaterielsynchronizationevent.dao.impl.ZjMaterielSynchronizationEventDaoImpl">
|
||||
|
||||
<select id="entity_list_base" resultType="com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity"
|
||||
parameterType = "com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity">
|
||||
select
|
||||
*
|
||||
from v_formson_0275
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="formmain_id != null and formmain_id != ''"> and formmain_id = #{formmain_id} </if>
|
||||
</trim>
|
||||
ORDER BY field0018code,field0043,field0007
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="queryInventoryEntity" resultType="com.hzya.frame.u8.base.inventory.entity.InventoryEntity"
|
||||
parameterType = "com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity">
|
||||
select
|
||||
*
|
||||
from Inventory
|
||||
where cInvCode in
|
||||
<foreach item="item" index="index" collection="list"
|
||||
open="(" separator="," close=")">
|
||||
#{item.field0043code}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.IZjMaterielSynchronizationEventService;
|
||||
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 ZjMaterielSynchronizationEventPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(ZjMaterielSynchronizationEventPluginInitializer.class);
|
||||
@Autowired
|
||||
private IZjMaterielSynchronizationEventService zjMaterielSynchronizationEventService;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "执行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "执行销毁方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "ZjMaterielSynchronizationEventPluginInitializer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "同步物料档案数据插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "ZjMaterielSynchronizationEventPluginInitializer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
try {
|
||||
logger.info("======开始执行物料档案同步========");
|
||||
return zjMaterielSynchronizationEventService.materielSynchronization(requestJson);
|
||||
} catch (Exception e) {
|
||||
logger.info("======物料档案同步失败:{}========", e.getMessage());
|
||||
return BaseResult.getFailureMessageEntity("======物料档案同步失败:{}========", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
/***
|
||||
* 物料档案同步插件
|
||||
* @content:
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2025-03-03 10:55
|
||||
* @param
|
||||
* @return
|
||||
**/
|
||||
public interface IZjMaterielSynchronizationEventService extends IBaseService<ZjMaterielSynchronizationEventEntity, String> {
|
||||
|
||||
|
||||
/**
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 物料档案同步
|
||||
* @Date 11:39 上午 2025/3/17
|
||||
**/
|
||||
JsonResultEntity materielSynchronization(JSONObject requestJson);
|
||||
}
|
|
@ -0,0 +1,271 @@
|
|||
package com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.IZjMaterielSynchronizationEventDao;
|
||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.entity.ZjMaterielSynchronizationEventEntity;
|
||||
import com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.IZjMaterielSynchronizationEventService;
|
||||
import com.hzya.frame.u8.base.inventory.entity.InventoryEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
||||
/***
|
||||
* 物料档案同步插件
|
||||
* @content:
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2025-03-03 10:56
|
||||
* @param
|
||||
* @return
|
||||
**/
|
||||
public class ZjMaterielSynchronizationEventServiceImpl extends BaseService<ZjMaterielSynchronizationEventEntity, String> implements IZjMaterielSynchronizationEventService {
|
||||
|
||||
private IZjMaterielSynchronizationEventDao zjMaterielSynchronizationEventDao;
|
||||
|
||||
@Autowired
|
||||
public void setZjMaterielSynchronizationEventDao(IZjMaterielSynchronizationEventDao zjMaterielSynchronizationEventDao) {
|
||||
this.zjMaterielSynchronizationEventDao = zjMaterielSynchronizationEventDao;
|
||||
this.dao = zjMaterielSynchronizationEventDao;
|
||||
}
|
||||
|
||||
private String zjoa = "zjoa";
|
||||
private String zju8 = "zju8";
|
||||
|
||||
/**
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 物料档案同步
|
||||
* @Date 11:39 上午 2025/3/17
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity materielSynchronization(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"://发起前事件,验证物料重复
|
||||
String formmain_id = getFormmain_id(businessDataStr);
|
||||
if(formmain_id == null || "".equals(formmain_id)){
|
||||
return BaseResult.getFailureMessageEntity("onBeforeStart流程监听事件,未获取到主表id");
|
||||
}
|
||||
ZjMaterielSynchronizationEventEntity entity = new ZjMaterielSynchronizationEventEntity();
|
||||
entity.setFormmain_id(formmain_id);
|
||||
entity.setDataSourceCode(zjoa);
|
||||
List<ZjMaterielSynchronizationEventEntity> list = zjMaterielSynchronizationEventDao.query(entity);
|
||||
if(list == null || list.size() == 0){
|
||||
return BaseResult.getFailureMessageEntity("onBeforeStart流程监听事件,未获取到明细数据");
|
||||
}
|
||||
return checkData(list,false);
|
||||
case "onProcessFinished"://流程结束事件,同步物料到U8C
|
||||
String id = getFormmain_id(businessDataStr);
|
||||
if(id == null || "".equals(id)){
|
||||
return BaseResult.getFailureMessageEntity("onProcessFinished流程监听事件,未获取到主表id");
|
||||
}
|
||||
ZjMaterielSynchronizationEventEntity entity1 = new ZjMaterielSynchronizationEventEntity();
|
||||
entity1.setFormmain_id(id);
|
||||
entity1.setDataSourceCode(zjoa);
|
||||
List<ZjMaterielSynchronizationEventEntity> list1 = zjMaterielSynchronizationEventDao.query(entity1);
|
||||
if(list1 == null || list1.size() == 0){
|
||||
return BaseResult.getFailureMessageEntity("onProcessFinished流程监听事件,未获取到明细数据");
|
||||
}
|
||||
JsonResultEntity jsonResultEntity = checkData(list1,true);
|
||||
if(jsonResultEntity == null){
|
||||
return BaseResult.getFailureMessageEntity("onProcessFinished流程监听事件,校验发生系统错误");
|
||||
}
|
||||
if(!jsonResultEntity.isFlag()){
|
||||
return jsonResultEntity;
|
||||
}
|
||||
//组装数据,保存数据
|
||||
saveMaterielToU8(list1);
|
||||
//回写U8生成的编码
|
||||
updateOaCode(list1);
|
||||
return null;
|
||||
case "onStart"://流程发起 oa数据重新排序
|
||||
return BaseResult.getSuccessMessageEntity("排序暂不处理");
|
||||
default:
|
||||
return BaseResult.getFailureMessageEntity("未匹配到流程监听事件!当前传入的eventType:" + eventType);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 回写U8生成的编码
|
||||
* @Date 10:04 上午 2025/3/19
|
||||
* @param list
|
||||
* @return void
|
||||
**/
|
||||
private void updateOaCode(List<ZjMaterielSynchronizationEventEntity> list) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 组装数据,保存数据
|
||||
* @Date 10:03 上午 2025/3/19
|
||||
* @param list
|
||||
* @return void
|
||||
**/
|
||||
private void saveMaterielToU8(List<ZjMaterielSynchronizationEventEntity> list) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 解析参数id
|
||||
* @Date 11:38 上午 2025/3/18
|
||||
* @param businessDataStr
|
||||
* @return java.lang.String
|
||||
**/
|
||||
private String getFormmain_id(JSONObject businessDataStr) {
|
||||
String id = null;
|
||||
if(businessDataStr == null ){
|
||||
return id;
|
||||
}
|
||||
JSONObject formmain_0274 = businessDataStr.getJSONObject("formmain_0274");
|
||||
if(formmain_0274 == null){
|
||||
return id;
|
||||
}
|
||||
id = formmain_0274.getString("id");
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 验证物料重复
|
||||
* @Date 1:58 下午 2025/3/17
|
||||
* @param list 数据
|
||||
* @param flag 该项是否校验
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
private JsonResultEntity checkData(List<ZjMaterielSynchronizationEventEntity> list, boolean flag) {
|
||||
// 定义正则表达式,匹配全角符号
|
||||
String regex = "[\uFF00-\uFFEF]";
|
||||
// 编译正则表达式
|
||||
Pattern pattern = Pattern.compile(regex);
|
||||
Integer num = 0;
|
||||
Integer num1 = 0;
|
||||
/*
|
||||
1、必填校验:发起
|
||||
物料中类、货品编码(修改必填)
|
||||
保存
|
||||
物料中类、货品编码(修改必填)、货品代码、品牌、客户名、优选等级、开发号、物料属性、是否委外
|
||||
2、物料编码和货品代码不为空时,判断两个是否一样
|
||||
3、判断存货分类里面如果有6或7,有一个必须有另一个
|
||||
4、规格型号正则校验(不允许全角符号)
|
||||
5、发起、保存判断物料分类是否在U8中存在
|
||||
*/
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
ZjMaterielSynchronizationEventEntity entity = list.get(i);
|
||||
if(entity.getField0004() == null || "".equals(entity.getField0004())){
|
||||
return BaseResult.getFailureMessageEntity("序号为空");
|
||||
}
|
||||
if(entity.getField0043code() == null || "".equals(entity.getField0043code())){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的物料中类为空");
|
||||
}else {
|
||||
//判断存货分类里面如果有6或7,有一个必须有另一个
|
||||
if(entity.getField0043code().startsWith("6")){
|
||||
num++;
|
||||
}
|
||||
if(entity.getField0043code().startsWith("7")){
|
||||
num1++;
|
||||
}
|
||||
}
|
||||
if(entity.getField0018code() == null || "".equals(entity.getField0018code())){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的申请原因为空");
|
||||
}
|
||||
if("修改".equals(entity.getField0018code())){
|
||||
if(entity.getField0005() == null || "".equals(entity.getField0005())){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的货品编码为空");
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
if(entity.getField0045() == null || "".equals(entity.getField0045())){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的货品代码为空");
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
if(entity.getField0008code() == null || "".equals(entity.getField0008code())){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的品牌为空");
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
if(entity.getField0034code() == null || "".equals(entity.getField0034code())){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的客户名为空");
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
if(entity.getField0012code() == null || "".equals(entity.getField0012code())){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的优选等级为空");
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
if(entity.getField0039() == null || "".equals(entity.getField0039())){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的开发号为空");
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
if(entity.getField0042code() == null || "".equals(entity.getField0042code())){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的物料属性为空");
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
if(entity.getField0022code() == null || "".equals(entity.getField0022code())){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的是否委外为空");
|
||||
}
|
||||
}
|
||||
//物料编码和货品代码不为空时,判断两个是否一样
|
||||
if(entity.getField0005() != null && !"".equals(entity.getField0005())
|
||||
&& entity.getField0045() != null && !"".equals(entity.getField0045())){
|
||||
if(!entity.getField0005().equals(entity.getField0045())){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的物料编码和货品代码不一致");
|
||||
}
|
||||
}
|
||||
//规格型号正则校验(不允许全角符号)
|
||||
if(entity.getField0007() != null && !"".equals(entity.getField0007())){
|
||||
if(pattern.matcher(entity.getField0007()).find()){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的规格型号包含全角符号");
|
||||
}
|
||||
}
|
||||
}
|
||||
//判断存货分类里面如果有6或7,有一个必须有另一个
|
||||
if(num > 0){
|
||||
if(num1 == 0){
|
||||
return BaseResult.getFailureMessageEntity("存货分类存在6,不存在7");
|
||||
}
|
||||
}
|
||||
if(num1 > 0){
|
||||
if(num == 0){
|
||||
return BaseResult.getFailureMessageEntity("存货分类存在7,不存在6");
|
||||
}
|
||||
}
|
||||
//查询u8物料
|
||||
List<InventoryEntity> inventoryEntities = zjMaterielSynchronizationEventDao.queryInventoryEntity(list,zju8);
|
||||
if(inventoryEntities == null || inventoryEntities.size() == 0){
|
||||
return BaseResult.getFailureMessageEntity("物料分类在U8中不存在");
|
||||
}
|
||||
//发起、保存判断物料分类是否在U8中存在
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
ZjMaterielSynchronizationEventEntity entity = list.get(i);
|
||||
boolean flags = false;
|
||||
for (int i1 = 0; i1 < inventoryEntities.size(); i1++) {
|
||||
if(entity.getField0043code().equals(inventoryEntities.get(i1).getcInvCode())){
|
||||
flags = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!flags){
|
||||
return BaseResult.getFailureMessageEntity("序号为"+entity.getField0004()+"明细行的物料分类在U8中不存在");
|
||||
}
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("校验成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>ZjMaterielSynchronizationEventPluginInitializer</id>
|
||||
<name>ZjMaterielSynchronizationEventPluginInitializer插件</name>
|
||||
<category>202503170010</category>
|
||||
</plugin>
|
|
@ -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="zjMaterielSynchronizationEventDao" class="com.hzya.frame.plugin.zjmaterielsynchronizationevent.dao.impl.ZjMaterielSynchronizationEventDaoImpl" />
|
||||
</beans>
|
|
@ -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="zjMaterielSynchronizationEventPluginInitializer" class="com.hzya.frame.plugin.zjmaterielsynchronizationevent.plugin.ZjMaterielSynchronizationEventPluginInitializer" />
|
||||
</beans>
|
|
@ -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="zjMaterielSynchronizationEventService" class="com.hzya.frame.plugin.zjmaterielsynchronizationevent.service.impl.ZjMaterielSynchronizationEventServiceImpl" />
|
||||
</beans>
|
File diff suppressed because one or more lines are too long
|
@ -106,12 +106,12 @@ public class DataSourceConfig {
|
|||
**/
|
||||
private static DruidDataSource createDefaultDataSource(JSONObject defaultDataSourceProperties) throws RuntimeException {
|
||||
//根据datasource_code查询数据源配置信息
|
||||
String datasource_code = String.valueOf(defaultDataSourceProperties.get("datasource_code"));
|
||||
String source_url = String.valueOf(defaultDataSourceProperties.get("source_url"));
|
||||
String login_name = String.valueOf(defaultDataSourceProperties.get("login_name"));
|
||||
String password = String.valueOf(defaultDataSourceProperties.get("password"));
|
||||
String db_name = String.valueOf(defaultDataSourceProperties.get("db_name"));
|
||||
String source_type = String.valueOf(defaultDataSourceProperties.get("source_type"));
|
||||
String datasource_code = defaultDataSourceProperties.getString("datasource_code");
|
||||
String source_url = defaultDataSourceProperties.getString("source_url");
|
||||
String login_name = defaultDataSourceProperties.getString("login_name");
|
||||
String password = defaultDataSourceProperties.getString("password");
|
||||
String db_name = defaultDataSourceProperties.getString("db_name");
|
||||
String source_type = defaultDataSourceProperties.getString("source_type");
|
||||
if (defaultDataSourceProperties != null) {
|
||||
String driveClass = "";
|
||||
if ("mysql".equalsIgnoreCase(source_type)) {
|
||||
|
|
|
@ -65,6 +65,11 @@
|
|||
<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-u8c</artifactId>-->
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
package com.hzya.frame.plugin.ofs.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class OfsGetOrderInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(OfsGetOrderInitializer.class);
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "ofsGetOrderInitializer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "数据库备份下发";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "ofsGetOrderInitializer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 获取ofs订单数据
|
||||
* @Date 3:12 下午 2024/10/24
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
|
||||
//System.out.println("获取ofs订单数据");
|
||||
//System.out.println("获取ofs订单发送数据");
|
||||
//QueryOfsSoSaleOutVo queryOfsSoSaleOutVo = new QueryOfsSoSaleOutVo();
|
||||
//queryOfsSoSaleOutVo.setPageNo(1L);
|
||||
//queryOfsSoSaleOutVo.setPageSize(200L);
|
||||
////queryOfsSoSaleOutVo.setCode("123123123");
|
||||
//queryOfsSoSaleOutVo.setCreated_start("2024-10-24 01:00:00");
|
||||
//queryOfsSoSaleOutVo.setCreated_end("2024-10-24 17:00:00");
|
||||
//queryOfsSoSaleOutVo.setClientCode("LETS");
|
||||
//String data = JSON.toJSONString(queryOfsSoSaleOutVo);
|
||||
////2024年7月30日 12:16:38生成签名
|
||||
//OfsHexUtil ofsHexUtil = new OfsHexUtil();
|
||||
//String timestamp = String.valueOf(System.currentTimeMillis());
|
||||
//Map<String, String> params = new HashMap<>();
|
||||
//params.put("data", data);
|
||||
//String sign = ofsHexUtil.sign("ofs.salesOrder.search", data,"json", "1023142858", "1.0", "382e4a2584027a36ac9431103", timestamp);
|
||||
//String url = "http://39.98.58.229/api/edi/u8c/ofs/in?api=ofs.salesOrder.search&format=json&appKey=1023142858&v=1.0&sign="+sign+"×tamp="+timestamp;
|
||||
//
|
||||
//String returnData = postParams(url,params);
|
||||
|
||||
|
||||
return BaseResult.getSuccessMessageEntity("获取成功");
|
||||
|
||||
}
|
||||
//适用于post请求并传送form-data数据(同样适用于post的Raw类型的application-json格式)
|
||||
public String postParams(String url, Map<String, String> params) {
|
||||
//创建自定义的httpclient对象
|
||||
CloseableHttpClient client = HttpClients.custom().build();
|
||||
HttpPost post = new HttpPost(url);
|
||||
CloseableHttpResponse res = null;
|
||||
try {
|
||||
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
|
||||
Set<String> keySet = params.keySet();
|
||||
for (String key : keySet) {
|
||||
nvps.add(new BasicNameValuePair(key, params.get(key)));
|
||||
}
|
||||
post.setEntity(new UrlEncodedFormEntity(nvps, "utf-8"));
|
||||
res = client.execute(post);
|
||||
HttpEntity entity = res.getEntity();
|
||||
return EntityUtils.toString(entity, "utf-8");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
res.close();
|
||||
client.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.hzya.frame.plugin.ofs.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class OfsRepushDataInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(OfsRepushDataInitializer.class);
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "ofsRepushDataInitializer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "数据库备份下发";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "ofsRepushDataInitializer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 获取ofs订单重新推送数据
|
||||
* @Date 3:12 下午 2024/10/24
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
|
||||
|
||||
System.out.println("获取ofs订单重新推送数据");
|
||||
|
||||
|
||||
return BaseResult.getSuccessMessageEntity("获取成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package com.hzya.frame.plugin.ofs.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class OfsSendDataInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(OfsSendDataInitializer.class);
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "ofsSendDataInitializer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "数据库备份下发";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "ofsSendDataInitializer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 获取ofs订单发送数据
|
||||
* @Date 3:12 下午 2024/10/24
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
|
||||
return BaseResult.getSuccessMessageEntity("订单发送");
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>ofsPlugin</id>
|
||||
<name>ofsPlugin插件</name>
|
||||
<category>20241024</category>
|
||||
</plugin>
|
|
@ -0,0 +1,7 @@
|
|||
<?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="ofsGetOrderInitializer" class="com.hzya.frame.plugin.ofs.plugin.OfsGetOrderInitializer" />
|
||||
<bean name="ofsRepushDataInitializer" class="com.hzya.frame.plugin.ofs.plugin.OfsRepushDataInitializer" />
|
||||
<bean name="ofsSendDataInitializer" class="com.hzya.frame.plugin.ofs.plugin.OfsSendDataInitializer" />
|
||||
</beans>
|
|
@ -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>
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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 masterTable—record—fields的结构
|
||||
* @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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.hzya.frame.seeyon.cap4.form.dto;
|
||||
|
||||
/**
|
||||
* @Description 子表数据
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/1/8 11:29
|
||||
**/
|
||||
public class SubTableDTO {
|
||||
}
|
|
@ -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> {
|
||||
}
|
|
@ -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> {
|
||||
}
|
|
@ -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> {
|
||||
}
|
|
@ -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> {
|
||||
}
|
|
@ -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> {
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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>";
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>";
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.seeyon.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
||||
|
||||
/**
|
||||
* @Description seeyon 附件对象
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/17 15:21
|
||||
**/
|
||||
public interface ICtpFileDao extends IBaseDao<CtpFileEntity,String> {
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
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.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);
|
||||
|
||||
}
|
|
@ -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);
|
||||
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.seeyon.dao.impl;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/17 15:22
|
||||
**/
|
||||
@Repository()
|
||||
public class CtpFileDaoImpl extends MybatisGenericDao<CtpFileEntity,String> implements ICtpFileDao {
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
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.ISeeYonDao;
|
||||
import com.hzya.frame.seeyon.entity.SeeyonEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
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 {
|
||||
@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);
|
||||
}
|
||||
|
||||
}
|
|
@ -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 ;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;//附件id,ctp_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);
|
||||
}
|
||||
}
|
|
@ -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;//流程表的ID(col_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;
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -0,0 +1,684 @@
|
|||
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
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,250 @@
|
|||
<?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>
|
||||
</mapper>
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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>
|
||||
|
|
@ -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);
|
||||
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
package com.hzya.frame.seeyon.recbill.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 付款結算單
|
||||
* @author laborer
|
||||
* @date 2024/6/20 0020 11:07
|
||||
*
|
||||
*/
|
||||
|
||||
public class RecBillEntity 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 pkCustomer;//客户
|
||||
private String pkAccount;//收款账户
|
||||
private String pkOrg;//组织
|
||||
|
||||
public String getPkCustomer() {
|
||||
return pkCustomer;
|
||||
}
|
||||
|
||||
public void setPkCustomer(String pkCustomer) {
|
||||
this.pkCustomer = pkCustomer;
|
||||
}
|
||||
|
||||
public String getPkAccount() {
|
||||
return pkAccount;
|
||||
}
|
||||
|
||||
public void setPkAccount(String pkAccount) {
|
||||
this.pkAccount = pkAccount;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
<?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.recbill.dao.impl.RecBillDaoImpl">
|
||||
<resultMap id="get-RecBillEntity-result" type="com.hzya.frame.seeyon.recbill.entity.RecBillEntity" >
|
||||
<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="pkAccount" column="pk_account" jdbcType="VARCHAR"/>
|
||||
<result property="pkCustomer" column="pk_customer" 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="RecBillEntity_list_base" resultMap="get-RecBillEntity-result" parameterType="com.hzya.frame.seeyon.recbill.entity.RecBillEntity">
|
||||
SELECT
|
||||
field0002 AS pk_org,
|
||||
field0006 AS bill_date,
|
||||
field0009 AS primal_money,
|
||||
field0001 AS pk_account,
|
||||
field0013 AS pk_customer,
|
||||
field0012 AS pk_oppaccount,
|
||||
'formmain_0233' as table_name,
|
||||
'field0016' as field_name
|
||||
FROM formmain_0233
|
||||
WHERE field0016 IS null
|
||||
</select>
|
||||
|
||||
<!--通过主键修改方法-->
|
||||
<update id="RecBillEntity_update" parameterType = "java.util.Map" >
|
||||
update ${tableName} set ${fieldName} = #{state} where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.hzya.frame.seeyon.recbill.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.web.entity.JsonResultEntity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @content huoqu
|
||||
* @author laborer获取OA付款单数据并推送BIP生成付款结算单
|
||||
* @date 2024/6/20 0020 11:19
|
||||
*
|
||||
*/
|
||||
|
||||
public interface IRecBillService extends IBaseService<PaymentEntity,String> {
|
||||
/**
|
||||
*
|
||||
* @content 工程付款单数据同步BIP
|
||||
* @author laborer
|
||||
* @date 2024/6/20 0020 11:24
|
||||
*
|
||||
*/
|
||||
JsonResultEntity sendRecBillToBip(JSONObject requestJson);
|
||||
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
package com.hzya.frame.seeyon.recbill.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.recbill.dao.IRecBillDao;
|
||||
import com.hzya.frame.seeyon.recbill.entity.RecBillEntity;
|
||||
import com.hzya.frame.seeyon.recbill.service.IRecBillService;
|
||||
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("RecBillServiceImpl")
|
||||
public class RecBillServiceImpl extends BaseService<PaymentEntity,String> implements IRecBillService {
|
||||
private static final Logger logger = LoggerFactory.getLogger(RecBillServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private IRecBillDao payBillDao;
|
||||
/**
|
||||
*
|
||||
* @content 工程付款单数据同步BIP
|
||||
* @author laborer
|
||||
* @date 2024/6/20 0020 11:24
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public JsonResultEntity sendRecBillToBip(JSONObject requestJson) {
|
||||
RecBillEntity entity = new RecBillEntity();
|
||||
requestJson.put("db_code","OA");
|
||||
entity.setDataSourceCode(requestJson.getString("db_code"));
|
||||
List<RecBillEntity>payBillEntityList = payBillDao.getOaRecBill(entity);
|
||||
if(CollectionUtils.isNotEmpty(payBillEntityList)){
|
||||
for(RecBillEntity pay : payBillEntityList){
|
||||
String token = OABipUtil.getBipToken("yonyou","8000230000");
|
||||
JSONObject main = bindingAdd(pay);
|
||||
logger.info("银行流水收款信息数据{}",main.toString());
|
||||
String result = OABipUtil.sendU9cTOBipEsb(main.toString(),"8000230016",token);
|
||||
logger.info("银行流水收款信息数据{}",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(RecBillEntity pay) {
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("pk_org","");//所属组织
|
||||
head.put("pk_group","");//集团
|
||||
head.put("bill_type","F4");//单据类型 默认F5
|
||||
head.put("trade_type","D4");//付款结算类型 默认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","F4");//单据类型 默认F5
|
||||
body.put("trade_type","D4");//付款结算类型 默认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.getPkAccount());//收款银行账号
|
||||
detailsArr.add(body);
|
||||
JSONObject main = new JSONObject();
|
||||
main.put("head",head);//表头
|
||||
main.put("body",detailsArr);//明细数据
|
||||
return main;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.hzya.frame.seeyon.service;
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
|
||||
|
||||
/**
|
||||
* @Description seeyon 附件关系
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/17 15:30
|
||||
**/
|
||||
public interface ICtpAttachmentService extends IBaseService<CtpAttachmentEntity, String> {
|
||||
/**
|
||||
* 保存附件关系表
|
||||
* @param fileUrl ctp_file id
|
||||
* @param col_summary_id col_summary id
|
||||
* @param sub_reference 随机uuid
|
||||
* @return
|
||||
*/
|
||||
CtpAttachmentEntity saveAttachment(String fileUrl, String col_summary_id, String sub_reference)throws Exception;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.seeyon.service;
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
||||
|
||||
/**
|
||||
* @Description seeyon 附件
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/17 15:23
|
||||
**/
|
||||
public interface ICtpFileService extends IBaseService<CtpFileEntity, String> {
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hzya.frame.seeyon.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 无流程表单公用service
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 14:53
|
||||
*
|
||||
*/
|
||||
public interface INoProcessService {
|
||||
/**
|
||||
*
|
||||
* @content 无流程删除通用接口
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 15:08
|
||||
*
|
||||
*/
|
||||
|
||||
JsonResultEntity DeleteProcessField(JSONObject requestData);
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
package com.hzya.frame.seeyon.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
/**
|
||||
* 致远OA接口类
|
||||
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
|
||||
* @version 1.0
|
||||
* @content
|
||||
* @date 2023-08-22 9:29
|
||||
*/
|
||||
public interface ISeeYonInterFace {
|
||||
|
||||
/***
|
||||
* 发起OA表单方法
|
||||
* @content:
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-22 9:31
|
||||
* @param requestData 请求json
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity thirdInterfaceSend(JSONObject requestData);
|
||||
|
||||
|
||||
|
||||
/***
|
||||
* @Content: 提供给OA的标准接口方法,包含参数 entity 为OA 的data信息, , eventType 为事件类型
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2020-12-24 10:36
|
||||
* @Param [entity, eventType]
|
||||
* eventType:
|
||||
* 发起前事件 onBeforeStart ,
|
||||
* 发起事件 onStart ,
|
||||
* 终止前事件 onBeforeStop ,
|
||||
* 终止事件 onStop,
|
||||
* 撤销前事件 onBeforeCancel,
|
||||
* 撤销事件 onCancel,
|
||||
* 结束事件 onProcessFinished,
|
||||
* 处理前事件 onBeforeFinishWorkitem,
|
||||
* 处理事件 onFinishWorkitem,
|
||||
* 回退前事件 onBeforeStepBack,
|
||||
* 回退事件 onStepBack,
|
||||
* 取回前事件 onBeforeTakeBack,
|
||||
* 取回事件 onTakeBack,
|
||||
* @return string
|
||||
**/
|
||||
JsonResultEntity thirdInterfaceSeeYonPlugInInterfaceEntrance(JSONObject requestData);
|
||||
|
||||
|
||||
/***
|
||||
* 致远OA业务流程集成补推方法,需要传递参数
|
||||
* @param jsonObject formAppId 表单模版ID CAP_FORM_DEFINITION, formMainIds 集合 dataSourceCode 数据源编码
|
||||
* @return ht_oa_sqlserver
|
||||
* @throws Exception
|
||||
*/
|
||||
JsonResultEntity thirdInterfaceSeeYonDefinitionRePush(JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* seeyon流程事件监听前置方法,绑定数据源
|
||||
* @param sysExtensionApi
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
SysExtensionApiEntity colEventPre(SysExtensionApiEntity sysExtensionApi)throws Exception;
|
||||
/**
|
||||
* seeyon流程事件监听
|
||||
* @param jsonObject
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
JsonResultEntity colEventListener(JSONObject jsonObject)throws Exception;
|
||||
|
||||
/**
|
||||
* seeyon流程事件监听后置方法,调用三方接口
|
||||
* @param jsonStr
|
||||
* @param formAppId
|
||||
* @param eventType
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
String colEventPost(String jsonStr,String formAppId,String eventType)throws Exception;
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.seeyon.service;
|
||||
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
/**
|
||||
* @Description seeyon扩展类
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/5/14 14:04
|
||||
**/
|
||||
public interface ISeeyonExtService {
|
||||
|
||||
/**
|
||||
* @Since 3.0
|
||||
* 英德赛 OA档案传U8
|
||||
* 根据不同formApp来调U8不同接口
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
SysExtensionApiEntity ydcSeeyon2u8(SysExtensionApiEntity entity);
|
||||
|
||||
/**
|
||||
* @Since 3.0
|
||||
* 回调方法
|
||||
* @param logEntity
|
||||
*/
|
||||
void ydcSeeyon2u8CallBack(SysMessageManageLogEntity logEntity);
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.hzya.frame.seeyon.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.seeyon.dao.ICtpAttachmentDao;
|
||||
import com.hzya.frame.seeyon.entity.CtpAttachmentEntity;
|
||||
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
||||
import com.hzya.frame.seeyon.service.ICtpAttachmentService;
|
||||
import com.hzya.frame.seeyon.service.ICtpFileService;
|
||||
import com.hzya.frame.uuid.UUIDLong;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/17 15:31
|
||||
**/
|
||||
@Service(value = "ctpAttachmentService")
|
||||
public class CtpAttachmentServiceImpl extends BaseService<CtpAttachmentEntity, String> implements ICtpAttachmentService {
|
||||
|
||||
private ICtpAttachmentDao ctpAttachmentDao;
|
||||
@Autowired
|
||||
private ICtpFileService ctpFileService;
|
||||
@Autowired
|
||||
public void setCtpAttachmentDao(ICtpAttachmentDao dao) {
|
||||
this.ctpAttachmentDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存附件关系表
|
||||
*
|
||||
* @param fileUrl ctp_file id
|
||||
* @param col_summary_id col_summary id
|
||||
* @param sub_reference 随机uuid
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public CtpAttachmentEntity saveAttachment(String fileUrl, String col_summary_id, String sub_reference)throws Exception {
|
||||
//查一下附件
|
||||
CtpFileEntity ctpFileEntity = new CtpFileEntity();
|
||||
ctpFileEntity.setId(fileUrl);
|
||||
ctpFileEntity.setDataSourceCode("");
|
||||
List<CtpFileEntity> ctpFileList = ctpFileService.query(ctpFileEntity);
|
||||
if (CollectionUtils.isNotEmpty(ctpFileList)){
|
||||
CtpFileEntity ctpFile = ctpFileList.get(0);
|
||||
if (null != ctpFile){
|
||||
CtpAttachmentEntity ctpAttachmentEntity = new CtpAttachmentEntity();
|
||||
ctpAttachmentEntity.setId(String.valueOf(UUIDLong.longUUID()));
|
||||
ctpAttachmentEntity.setFile_url(ctpFile.getId());//ctp_file表的id
|
||||
ctpAttachmentEntity.setAtt_reference(col_summary_id);//业务表单的id
|
||||
ctpAttachmentEntity.setSub_reference(sub_reference);//这个字段要保存到业务表附件到字段上
|
||||
ctpAttachmentEntity.setCategory("66");//这里写66 才可以显示图片
|
||||
ctpAttachmentEntity.setFilename(ctpFile.getFilename());
|
||||
ctpAttachmentEntity.setType(ctpFile.getType());
|
||||
ctpAttachmentEntity.setMime_type(ctpFile.getMime_type());
|
||||
ctpAttachmentEntity.setAttachment_size(ctpFile.getFile_size());
|
||||
ctpAttachmentEntity.setCreatedate(new Date());
|
||||
this.save(ctpAttachmentEntity);
|
||||
return ctpAttachmentEntity;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue