Merge branch 'fw-oa' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into 237master
This commit is contained in:
commit
96d1531b9a
|
@ -54,11 +54,11 @@
|
|||
<!-- <artifactId>fw-ningbobank</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
||||
<!-- <artifactId>fw-oa</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<artifactId>fw-oa</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
||||
<!-- <artifactId>fw-u8</artifactId>-->
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.seeyon.service.impl;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
||||
import com.hzya.frame.seeyon.service.ICtpFileService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/17 15:24
|
||||
**/
|
||||
@Service()
|
||||
public class CtpFileServiceImpl extends BaseService<CtpFileEntity, String> implements ICtpFileService {
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package com.hzya.frame.seeyon.service.impl;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.seeyon.dao.ICapFormDefinitionDao;
|
||||
import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity;
|
||||
import com.hzya.frame.seeyon.service.INoProcessService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 无流程表单公用service
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 14:53
|
||||
*
|
||||
*/
|
||||
|
||||
@Service(value = "NoProcessServiceImpl")
|
||||
public class NoProcessServiceImpl implements INoProcessService {
|
||||
private static final Logger logger = LoggerFactory.getLogger(NoProcessServiceImpl.class);
|
||||
@Autowired
|
||||
private ICapFormDefinitionDao capFormDefinitionDao;
|
||||
@Override
|
||||
public JsonResultEntity DeleteProcessField(JSONObject requestData) {
|
||||
List<String>count =new ArrayList<>();
|
||||
JSONObject jsonStrObj = requestData.getJSONObject("jsonStr");
|
||||
String formCode = jsonStrObj.getString("formCode");
|
||||
String fieldName = jsonStrObj.getString("fieldName");
|
||||
String fieldValue = jsonStrObj.getString("fieldValue");
|
||||
if(StrUtil.isEmpty(formCode)){
|
||||
return new JsonResultEntity("表单编码不能为空:formCode",false);
|
||||
}
|
||||
if(StrUtil.isEmpty(fieldName)){
|
||||
return new JsonResultEntity("字段名称不能为空:fieldName",false);
|
||||
}
|
||||
if(StrUtil.isEmpty(fieldValue)){
|
||||
return new JsonResultEntity("字段值不能为空:fieldValue",false);
|
||||
}
|
||||
|
||||
//通过表单编号获取表单字段信息
|
||||
CapFormDefinitionEntity fieldInfo = new CapFormDefinitionEntity();
|
||||
fieldInfo.setAppbindInfo(formCode);
|
||||
fieldInfo.setDataSourceCode("djoatest");
|
||||
List<CapFormDefinitionEntity>capFormDefinitionEntityList = capFormDefinitionDao.getFormFiled(fieldInfo);
|
||||
if(CollectionUtils.isEmpty(capFormDefinitionEntityList)){
|
||||
return new JsonResultEntity("通过表单编号查询表单有误,请检查表单编号:"+formCode,false);
|
||||
}
|
||||
|
||||
try {
|
||||
capFormDefinitionEntityList.forEach(item->{
|
||||
String appbindInfo = item.getAppbindInfo();
|
||||
//格式化字段信息
|
||||
JSONObject jsonObject = JSONObject.parseObject(appbindInfo);
|
||||
boolean queryFlag = false;
|
||||
//如果模版编号相同则继续删除,反正跳过
|
||||
if(formCode.equals(jsonObject.getString("formCode"))){
|
||||
JSONObject field = JSONObject.parseObject(item.getFieldInfo());
|
||||
JSONObject frontFormmain = field.getJSONObject("front_formmain");
|
||||
JSONArray formsons = field.getJSONArray("formsons");
|
||||
JSONArray fieldInfoTable = frontFormmain.getJSONArray("fieldInfo");
|
||||
//验证需要删除的条件字段在表单属性中是否存在
|
||||
for (int i = 0; i < fieldInfoTable.size(); i++) {
|
||||
JSONObject fieldInfoTableObj = fieldInfoTable.getJSONObject(i);
|
||||
String name = fieldInfoTableObj.getString("name");
|
||||
//如果表单属性中存在该字段则验证通过,如果不存在直接返回错误
|
||||
if(name.equals(fieldName)){
|
||||
queryFlag = true;
|
||||
|
||||
}
|
||||
}
|
||||
//验证通过获取数据库表名称进行数据删除
|
||||
if(queryFlag){
|
||||
String tableName = frontFormmain.getString("tableName");
|
||||
//如果主表名称获取主表的主键进行数据删除
|
||||
fieldInfo.setTableName(tableName);
|
||||
fieldInfo.setFieldName(fieldName);
|
||||
fieldInfo.setFieldValue(fieldValue);
|
||||
List<CapFormDefinitionEntity>dataFormList = capFormDefinitionDao.getFormFiledByFileValue(fieldInfo);
|
||||
if(CollectionUtils.isNotEmpty(dataFormList)){
|
||||
dataFormList.forEach(item1->{
|
||||
String id = item1.getId();
|
||||
count.add(id);
|
||||
fieldInfo.setFieldName("id");
|
||||
fieldInfo.setId(id);
|
||||
capFormDefinitionDao.deleteByKey(fieldInfo);
|
||||
//循环该表单下面的所有子表信息进行子表删除
|
||||
if(CollectionUtils.isNotEmpty(formsons)){
|
||||
formsons.forEach(formsonsItem->{
|
||||
JSONObject jsonObjectBoddy = JSONObject.parseObject(formsonsItem.toString());
|
||||
String bodyTableName = jsonObjectBoddy.getString("tableName");
|
||||
fieldInfo.setTableName(bodyTableName);
|
||||
fieldInfo.setFieldName("formmain_id");
|
||||
fieldInfo.setId(id);
|
||||
capFormDefinitionDao.deleteByKey(fieldInfo);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return new JsonResultEntity("删除成功,删除的数据ID"+ JSON.toJSONString(count),true);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,507 @@
|
|||
package com.hzya.frame.seeyon.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.map.MapBuilder;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.seeyon.dao.ISeeYonInterFaceDao;
|
||||
import com.hzya.frame.seeyon.entity.OAWorkflowEventDataEntity;
|
||||
import com.hzya.frame.seeyon.entity.SeeYonInterFaceEntity;
|
||||
import com.hzya.frame.seeyon.service.ISeeYonInterFace;
|
||||
import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity;
|
||||
import com.hzya.frame.sysnew.application.api.service.ISysApplicationApiService;
|
||||
import com.hzya.frame.sysnew.application.database.dao.ISysApplicationDatabaseDao;
|
||||
import com.hzya.frame.sysnew.application.database.entity.SysApplicationDatabaseEntity;
|
||||
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import com.hzya.frame.web.exception.BaseSystemException;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author 👻👻👻👻👻👻👻👻👻👻 gjh
|
||||
* @version 1.0
|
||||
* @content
|
||||
* @date 2023-08-22 9:30
|
||||
*/
|
||||
@Service(value = "seeYonInterFace")
|
||||
public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
||||
private static final Logger logger = LoggerFactory.getLogger(SeeYonInterFaceImpl.class);
|
||||
/*** rest 用户名*/
|
||||
private static final String RESTUSERNAME = "hzyaRest";
|
||||
/*** rest 密码*/
|
||||
private static final String RESTPASSWORD = "a5ce21b8-91db-4cec-b3e3-3e44719655fd";
|
||||
// TODO 此处URL暂时写死,后续根据传递的应用ID获取
|
||||
private static final String sendUrl = "http://60.204.152.210/seeyon/";
|
||||
//速网esb地址
|
||||
private static final String baseUrl = "http://hzya.ufyct.com:9067/kangarooDataCenter/entranceController/externalCallInterface";
|
||||
@Resource
|
||||
private ISysApplicationDatabaseDao sysApplicationDatabaseDao;
|
||||
@Autowired
|
||||
private ISysApplicationApiService sysApplicationApiService;
|
||||
/**
|
||||
* 定义所支持的事件静态代码块
|
||||
*/
|
||||
private static final StringBuffer eventTypeBuffer = new StringBuffer();
|
||||
|
||||
{
|
||||
eventTypeBuffer.append("发起前事件 onBeforeStart ,");
|
||||
eventTypeBuffer.append("发起事件 onStart ,");
|
||||
eventTypeBuffer.append("终止前事件 onBeforeStop ,");
|
||||
eventTypeBuffer.append("终止事件 onStop,");
|
||||
eventTypeBuffer.append("撤销前事件 onBeforeCancel,");
|
||||
eventTypeBuffer.append("撤销事件 onCancel,");
|
||||
eventTypeBuffer.append("结束事件 onProcessFinished,");
|
||||
eventTypeBuffer.append("处理前事件 onBeforeFinishWorkitem,");
|
||||
eventTypeBuffer.append("处理事件 onFinishWorkitem,");
|
||||
eventTypeBuffer.append("回退前事件 onBeforeStepBack,");
|
||||
eventTypeBuffer.append("回退事件 onStepBack,");
|
||||
eventTypeBuffer.append("取回前事件 onBeforeTakeBack,");
|
||||
eventTypeBuffer.append("取回事件 onTakeBack,");
|
||||
}
|
||||
|
||||
//基础档案类型
|
||||
private final String ARCHIVESTYPE = "archives";
|
||||
//流程表单类型
|
||||
private final String FLOWTYPE = "flow";
|
||||
//创建基础档案
|
||||
private final String CREATEARCHIVES = "create";
|
||||
//更新基础档案
|
||||
private final String UPDATEARCHIVES = "update";
|
||||
//创建基础档案
|
||||
private final String CREATEARCHIVESURL = "rest/form/import/";
|
||||
//创建基础档案
|
||||
private final String UPDATEARCHIVESURL = "rest/form/update";
|
||||
@Resource
|
||||
private ISeeYonInterFaceDao seeYonInterFaceDao;
|
||||
|
||||
|
||||
//上一次同步时间
|
||||
private String LAST_SYNCHRONISED_TIME = "";
|
||||
/****
|
||||
* @Content:发起无流程表单接口实现
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2019/12/23 17:03
|
||||
* @Param [templateCode 模版编码, sendLoginName 发送人登录帐号 ,xmlData ]
|
||||
* @return java.lang.Integer
|
||||
**/
|
||||
public static JsonResultEntity saveNoProcess(String templateCode , String interfaceUrl,String sendLoginName, String xmlData) {
|
||||
String token = getToken(RESTUSERNAME, RESTPASSWORD, sendLoginName);
|
||||
Map res = new HashMap();
|
||||
res.put("loginName", sendLoginName);
|
||||
res.put("dataXml", xmlData);
|
||||
res.put("token", token);
|
||||
String result = HttpRequest.post(sendUrl + interfaceUrl + templateCode).header("token", token).body(JSON.toJSONString(res)).execute().body();
|
||||
logger.info("无流程表单执行结果:" + result);
|
||||
return BaseResult.getFailureMessageEntity("执行成功", result);
|
||||
}
|
||||
|
||||
public static JsonResultEntity upDateNoProcess(String interfaceUrl, String templateCode, String sendLoginName, String moduleId, String xmlData) {
|
||||
String token = getToken(RESTUSERNAME, RESTPASSWORD, sendLoginName);
|
||||
Map res = new HashMap();
|
||||
res.put("loginName", sendLoginName);
|
||||
res.put("dataXml", xmlData);
|
||||
res.put("token", token);
|
||||
res.put("moduleId", moduleId);
|
||||
res.put("templateCode", templateCode);
|
||||
logger.info("更新无流程表单参数:{}",JSON.toJSONString(res));
|
||||
String result = HttpRequest.put(sendUrl + interfaceUrl).header("token", token).body(JSON.toJSONString(res)).execute().body();
|
||||
logger.info("更新无流程表单执行结果:" + result);
|
||||
return BaseResult.getFailureMessageEntity("执行成功", result);
|
||||
}
|
||||
|
||||
// {
|
||||
// "moduleId":"5701605966502512923",
|
||||
// "templateCode":"formmain_0360",
|
||||
// "loginName":"seeyon",
|
||||
// "dataXml":"<forms version=\"2.1\"><formExport><summary id=\"7382733425750590212\" name=\"formmain_0360\"/><definitions><column id=\"field0001\" type=\"0\" name=\"供应商编码\" isNullable=\"false\" length=\"100\"/><column id=\"field0002\" type=\"0\" name=\"供应商名称\" isNullable=\"false\" length=\"100\"/><column id=\"field0007\" type=\"0\" name=\"税号\" isNullable=\"false\" length=\"100\"/><column id=\"field0008\" type=\"0\" name=\"地址\" isNullable=\"false\" length=\"100\"/><column id=\"field0009\" type=\"0\" name=\"电话\" isNullable=\"false\" length=\"100\"/><column id=\"field0011\" type=\"0\" name=\"联系人\" isNullable=\"false\" length=\"100\"/></definitions><values><column name=\"供应商编码\"><value><![CDATA[ 12345 ]]></value></column><column name=\"供应商名称\"><value><![CDATA[ 测试客户银行1111 ]]></value></column><column name=\"税号\"><value><![CDATA[ 982698741E96 ]]></value></column><column name=\"地址\"><value><![CDATA[ 杭州 ]]></value></column><column name=\"电话\"><value><![CDATA[ null ]]></value></column><column name=\"联系人\"><value><![CDATA[ null ]]></value></column></values><subForms><subForm><definitions><column id=\"field0003\" type=\"4\" name=\"序号\" isNullable=\"false\" length=\"20\"/><column id=\"field0005\" type=\"0\" name=\"开户行名称\" isNullable=\"false\" length=\"100\"/><column id=\"field0006\" type=\"0\" name=\"银行账号\" isNullable=\"false\" length=\"100\"/><column id=\"field0004\" type=\"0\" name=\"是否默认\" isNullable=\"false\" length=\"100\"/></definitions><values><row><column name=\"序号\"><value><![CDATA[1]]></value><title><![CDATA[1438373948291346275]]></title></column><column name=\"开户行名称\"><value><![CDATA[1234]]></value><title><![CDATA[9218745623489128746]]></title></column><column name=\"银行账号\"><value><![CDATA[111111111]]></value><title><![CDATA[6897123456789123456]]></title></column><column name=\"是否默认\"><value><![CDATA[是]]></value><title><![CDATA[5729461284567891234]]></title></column></row></values></subForm></subForms></formExport></forms>"
|
||||
// }
|
||||
private static String getToken(String userName, String password, String loginName) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
/** 获取token*/
|
||||
|
||||
jsonObject.put("userName", userName);
|
||||
jsonObject.put("password", password);
|
||||
jsonObject.put("loginName", loginName);
|
||||
logger.info("请求获取token开始---------------------------------------------");
|
||||
logger.info("请求参数" + jsonObject.toJSONString());
|
||||
String result = HttpUtil.post(sendUrl + "rest/token", jsonObject.toJSONString());
|
||||
logger.info("获取token结果---------------------------------------------" + result);
|
||||
logger.info("获取token结果---------------------------------------------" + result);
|
||||
jsonObject = JSONObject.parseObject(result);
|
||||
if ("".equals(result) || result == null) {
|
||||
logger.info("获取token失败!");
|
||||
throw new RuntimeException("获取token失败!");
|
||||
} else {
|
||||
String token = jsonObject.get("id").toString();
|
||||
return token;
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* 发起OA表单方法
|
||||
* @content:
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-22 9:32
|
||||
* @param
|
||||
* @return com.hzya.frame.web.entity.BaseResult
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceSend(JSONObject requestData) {
|
||||
JSONObject jsonStr = requestData.getJSONObject("jsonStr");
|
||||
if (ObjectUtils.isEmpty(jsonStr)) {
|
||||
throw new BaseSystemException("jsonStr为空!请传递参数");
|
||||
}
|
||||
//类型 flow archives
|
||||
String type = jsonStr.getString("type");
|
||||
if (StringUtils.isEmpty(type)) {
|
||||
throw new BaseSystemException("请传递类型!type 流程表单:flow 基础档案:archives");
|
||||
}
|
||||
//模版编号
|
||||
String templateCode = jsonStr.getString("templateCode");
|
||||
if (StringUtils.isEmpty(templateCode)) {
|
||||
throw new BaseSystemException("请传入模版编号!templateCode不允许为空");
|
||||
}
|
||||
JSONObject data = jsonStr.getJSONObject("data");
|
||||
String attributeArrayStr = jsonStr.getString("attribute");
|
||||
if (StringUtils.isEmpty(attributeArrayStr)) {
|
||||
throw new BaseSystemException("attribute不允许为空");
|
||||
}
|
||||
List<JSONObject> attributeArray = JSON.parseArray(attributeArrayStr, JSONObject.class);
|
||||
JsonResultEntity result = null;
|
||||
if (ARCHIVESTYPE.equalsIgnoreCase(type)) {
|
||||
switch (templateCode){
|
||||
//预留的
|
||||
case "abc123":
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (FLOWTYPE.equalsIgnoreCase(type)) {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceSeeYonPlugInInterfaceEntrance(JSONObject requestData){
|
||||
String jsonStr = requestData.getString("jsonStr");
|
||||
JSONObject jsonObject = requestData.getJSONObject("jsonStr");
|
||||
OAWorkflowEventDataEntity entity = JSON.parseObject(jsonStr,OAWorkflowEventDataEntity.class);
|
||||
logger.info("监听OA事件入参:"+jsonObject.toJSONString());
|
||||
JSONObject formBeanData = jsonObject.getJSONObject("businessDataStr");
|
||||
String eventType = jsonObject.getString("eventType") ;
|
||||
/** 流程ID*/
|
||||
String summaryId = entity.getSummaryId();
|
||||
/** 节点ID*/
|
||||
String affairId = entity.getAffairId();
|
||||
String currentActivityId = entity.getCurrentActivityId();
|
||||
/****/
|
||||
String formViewOperation = entity.getFormViewOperation();
|
||||
Object summaryObj = entity.getSummaryObj();
|
||||
String deeCfgId = entity.getDeeCfgId();
|
||||
String currentNodeLast = entity.getCurrentNodeLast();
|
||||
Map<String, Object> businessData = JSON.parseObject(entity.getBusinessDataStr(), Map.class);
|
||||
Map<String, Object> extData = entity.getExtData();
|
||||
/** 表单表的FORM ID,用此字段标记是哪个流程*/
|
||||
String formApp = entity.getFormApp();
|
||||
|
||||
//formApp 最好过滤一下
|
||||
|
||||
|
||||
String result = null;
|
||||
try {
|
||||
//流程事件处理
|
||||
result = colEventPost(jsonStr, formApp, eventType);
|
||||
}catch (Exception e){
|
||||
return BaseResult.getFailureMessageEntity("传递失败",e.getMessage());
|
||||
}
|
||||
try {
|
||||
/** 根据事件类型处理相关事件*/
|
||||
switch (eventType) {
|
||||
/** 发起前事件*/
|
||||
case "onBeforeStart":
|
||||
break;
|
||||
/** 发起事件*/
|
||||
case "onStart":
|
||||
//流程发起 新增grpu8单据
|
||||
break;
|
||||
/** 终止前事件*/
|
||||
case "onBeforeStop":
|
||||
break;
|
||||
/** 终止事件*/
|
||||
case "onStop":
|
||||
//流程终止,更新grpu8单据
|
||||
break;
|
||||
/** 撤销前事件*/
|
||||
case "onBeforeCancel":
|
||||
break;
|
||||
/** 撤销事件*/
|
||||
case "onCancel":
|
||||
//流程撤销,更新grpu8单据
|
||||
break;
|
||||
/** 结束事件*/
|
||||
case "onProcessFinished":
|
||||
break;
|
||||
/** 处理前事件*/
|
||||
case "onBeforeFinishWorkitem":
|
||||
/** 根据form处理相关业务表单的数据*/
|
||||
switch (formApp) {
|
||||
case "abc123":
|
||||
break;
|
||||
default:
|
||||
return BaseResult.getFailureMessageEntity("未匹配到表单!当前formID:" + formApp, "");
|
||||
}
|
||||
break;
|
||||
/** 处理事件*/
|
||||
case "onFinishWorkitem":
|
||||
break;
|
||||
/** 回退前事件*/
|
||||
case "onBeforeStepBack":
|
||||
break;
|
||||
/** 回退事件*/
|
||||
case "onStepBack":
|
||||
break;
|
||||
/** 取回前事件*/
|
||||
case "onBeforeTakeBack":
|
||||
break;
|
||||
/** 取回事件*/
|
||||
case "onTakeBack":
|
||||
break;
|
||||
default:
|
||||
// throw new RuntimeException("传入了非法事件类型!请参照:" + eventTypeBuffer.toString());
|
||||
return BaseResult.getFailureMessageEntity("传入了非法事件类型!请参照:" + eventTypeBuffer.toString(), "", "");
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("传递成功", result);
|
||||
}catch (Exception e){
|
||||
return BaseResult.getFailureMessageEntity("传递失败",e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceSeeYonDefinitionRePush(JSONObject jsonObject) throws Exception {
|
||||
JSONObject requestData = jsonObject.getJSONObject("jsonStr");
|
||||
JSONArray resultEntityArray = new JSONArray();
|
||||
if(null == requestData){
|
||||
throw new BaseSystemException("参数传递错误需要jsonStr!");
|
||||
}
|
||||
//表单模版ID
|
||||
String formAppId = requestData.getString("formAppId");
|
||||
//事件事件类型
|
||||
String eventType = requestData.getString("eventType");
|
||||
//数据源编码
|
||||
String dataSourceCode = requestData.getString("dataSourceCode");
|
||||
//主表ID集合 formMainIds
|
||||
JSONArray formMainIds = requestData.getJSONArray("formMainIds");
|
||||
if(StrUtil.isEmpty(eventType)){
|
||||
throw new BaseSystemException("需要传递eventType 参照致远OA事件!");
|
||||
}
|
||||
if(StrUtil.isEmpty(formAppId)){
|
||||
throw new BaseSystemException("需要传递formAppId 参照致远OA 表 CAP_FORM_DEFINITION!");
|
||||
}
|
||||
if(StrUtil.isEmpty(dataSourceCode)){
|
||||
throw new BaseSystemException("需要传递dataSourceCode 参照中台表 sys_data_source!");
|
||||
}
|
||||
if(null == formMainIds || formMainIds.size() == 0){
|
||||
throw new BaseSystemException("需要传递业务主表数据id集合,不允许全量推送!");
|
||||
}
|
||||
|
||||
SeeYonInterFaceEntity seeYonInterFaceEntity = new SeeYonInterFaceEntity();
|
||||
BeanUtil.copyProperties(requestData,seeYonInterFaceEntity);
|
||||
List<SeeYonInterFaceEntity> seeYonInterFaceEntityList = seeYonInterFaceDao.queryDefinitionInfo(seeYonInterFaceEntity);
|
||||
if(null != seeYonInterFaceEntityList && seeYonInterFaceEntityList.size() >0){
|
||||
for(SeeYonInterFaceEntity interFaceEntity : seeYonInterFaceEntityList){
|
||||
String field_info = interFaceEntity.getField_info();
|
||||
JSONObject infoJson = JSON.parseObject(field_info);
|
||||
//获取主表信息
|
||||
JSONObject formMain = infoJson.getJSONObject("front_formmain");
|
||||
//获取明细表信息
|
||||
JSONArray formSons = infoJson.getJSONArray("formsons");
|
||||
//主表tableName
|
||||
String formMainTableName = formMain.getString("tableName");
|
||||
|
||||
/** 设置主表查询条件*/
|
||||
interFaceEntity.setTabName(formMainTableName);
|
||||
interFaceEntity.setDataSourceCode(dataSourceCode);
|
||||
interFaceEntity.setFormMainIds( formMainIds.toJavaList(String.class) );
|
||||
|
||||
List<Map<String, Object>> forMainList = seeYonInterFaceDao.queryDefinitionData(interFaceEntity);
|
||||
for (Map<String, Object> forMainRow : forMainList) {
|
||||
//定义致远OA事件对象
|
||||
JSONObject seeYonBean = new JSONObject();
|
||||
//定义主表对象
|
||||
JSONObject formMainObj = new JSONObject();
|
||||
//获取主表ID
|
||||
String forMainId = String.valueOf(forMainRow.get("ID"));
|
||||
//组装主表数据
|
||||
for (Map.Entry<String, Object> entry : forMainRow.entrySet()) {
|
||||
formMainObj.put(entry.getKey().toLowerCase(),entry.getValue());
|
||||
}
|
||||
//组装明细表数据
|
||||
if(null != formSons && formSons.size() > 0){
|
||||
for(Object formSon : formSons){
|
||||
JSONObject son = JSON.parseObject(JSON.toJSONString(formSon));
|
||||
//明细数据
|
||||
String sonTableName = son.getString("tableName");
|
||||
SeeYonInterFaceEntity details = new SeeYonInterFaceEntity();
|
||||
details.setFormMainId(forMainId);
|
||||
details.setTabName(sonTableName);
|
||||
details.setDataSourceCode(dataSourceCode);
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
List<Map<String, Object>> forSonList = seeYonInterFaceDao.queryDefinitionData(details);
|
||||
for (Map<String, Object> forSons : forSonList) {
|
||||
//组装明细数据
|
||||
JSONObject forSonJson = new JSONObject();
|
||||
for (Map.Entry<String, Object> entry : forSons.entrySet()) {
|
||||
forSonJson.put(entry.getKey().toLowerCase(),entry.getValue());
|
||||
}
|
||||
jsonArray.add(forSonJson);
|
||||
}
|
||||
//设置明细表数据
|
||||
seeYonBean.put(sonTableName,jsonArray);
|
||||
}
|
||||
}
|
||||
|
||||
seeYonBean.put(formMainTableName,formMainObj);
|
||||
JSONObject rePushRequestData = new JSONObject();
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("formApp",formAppId);
|
||||
object.put("eventType",eventType);
|
||||
object.put("businessDataStr",seeYonBean.toJSONString());
|
||||
object.put("affairId","");
|
||||
object.put("summaryId",requestData.getString("summaryId"));
|
||||
object.put("currentActivityId","");
|
||||
object.put("id",forMainId);
|
||||
object.put("hzyaExtData",requestData.getJSONObject("hzyaExtData"));
|
||||
logger.info("Method:thirdInterfaceSeeYonDefinitionRePush 组装seeYonBean DATA: {}",seeYonBean.toJSONString());
|
||||
|
||||
rePushRequestData.put("jsonStr",object);
|
||||
|
||||
|
||||
JsonResultEntity resultEntity = thirdInterfaceSeeYonPlugInInterfaceEntrance(rePushRequestData);
|
||||
if(null != resultEntity){
|
||||
resultEntityArray.add(resultEntity.getAttribute());
|
||||
}else{
|
||||
JSONObject jsonResultEntity = new JSONObject();
|
||||
jsonResultEntity.put("msg","从新推送失败");
|
||||
jsonResultEntity.put("id",forMainId);
|
||||
resultEntityArray.add(jsonResultEntity);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("从新推送执行结束",resultEntityArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* seeyon流程事件监听前置方法,绑定数据源
|
||||
* @param entity
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public SysExtensionApiEntity colEventPre(SysExtensionApiEntity entity) throws Exception {
|
||||
try {
|
||||
SysApplicationEntity applicationEntity = entity.getSendApp();
|
||||
SysApplicationDatabaseEntity sysApplicationDatabaseEntity = new SysApplicationDatabaseEntity();
|
||||
sysApplicationDatabaseEntity.setSts("Y");
|
||||
sysApplicationDatabaseEntity.setDbStatus("1");
|
||||
sysApplicationDatabaseEntity.setAppId(applicationEntity.getId());
|
||||
sysApplicationDatabaseEntity.setDataSourceCode("master");
|
||||
List<SysApplicationDatabaseEntity> sysDataSourceEntities = sysApplicationDatabaseDao.queryDSBase(sysApplicationDatabaseEntity);
|
||||
if(sysDataSourceEntities != null && sysDataSourceEntities.size() > 0){
|
||||
String parm = entity.getBodys();
|
||||
JSONObject jsonObject = JSONObject.parseObject(parm);
|
||||
jsonObject.put("dataSourceCode",sysDataSourceEntities.get(0).getSourceCode());
|
||||
entity.setBodys(jsonObject.toJSONString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* seeyon流程事件监听
|
||||
*
|
||||
* @param jsonObject
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public JsonResultEntity colEventListener(JSONObject jsonObject) throws Exception {
|
||||
try {
|
||||
if (null != jsonObject && StrUtil.isNotEmpty(jsonObject.getString("jsonStr"))){
|
||||
SeeYonInterFaceEntity entity = jsonObject.getJSONObject("jsonStr").toJavaObject(SeeYonInterFaceEntity.class);
|
||||
JSONObject requestData = new JSONObject();
|
||||
//表单模版ID
|
||||
requestData.put("formAppId", entity.getFormAppId());
|
||||
//事件事件类型
|
||||
requestData.put("eventType",entity.getEventType());
|
||||
//数据源编码
|
||||
requestData.put("dataSourceCode",entity.getDataSourceCode());
|
||||
requestData.put("formMainIds",entity.getFormMainIds());
|
||||
requestData.put("summaryId",entity.getSummaryId());
|
||||
JSONObject jsonStr = new JSONObject();
|
||||
jsonStr.put("jsonStr",requestData);
|
||||
thirdInterfaceSeeYonDefinitionRePush(jsonStr);
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.error("流程事件通知接口出错:{}",e);
|
||||
return BaseResult.getSuccessMessageEntity("失败",e.getMessage());
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* seeyon流程事件监听后置方法,调用三方接口
|
||||
*
|
||||
* @param jsonStr
|
||||
* @param formAppId
|
||||
* @param eventType
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public String colEventPost(String jsonStr, String formAppId, String eventType) throws Exception {
|
||||
if (StrUtil.isNotEmpty(jsonStr) && StrUtil.isNotEmpty(formAppId) && StrUtil.isNotEmpty(eventType)){
|
||||
SysApplicationApiEntity sysApplicationApiEntity = new SysApplicationApiEntity();
|
||||
sysApplicationApiEntity.setHeaderIn(formAppId+"_"+eventType);
|
||||
List<SysApplicationApiEntity> applist = sysApplicationApiService.queryLike(sysApplicationApiEntity);
|
||||
if (CollectionUtil.isNotEmpty(applist)){
|
||||
if (applist.size() > 1){
|
||||
throw new BaseSystemException("根据formID:" + formAppId+"查询出多条数据");
|
||||
}
|
||||
SysApplicationApiEntity sysApp = applist.get(0);
|
||||
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", String.valueOf(sysApp.getApiCode()))
|
||||
//这里用中台做为发送方
|
||||
.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
|
||||
.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||
.put("appId",String.valueOf(sysApp.getAppCode()))
|
||||
.build();
|
||||
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(jsonStr).timeout(60000).execute().body();
|
||||
logger.info("调用中台返回的参数:{}",body);
|
||||
return body;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,241 @@
|
|||
package com.hzya.frame.seeyon.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.seeyon.entity.OAWorkflowEventDataEntity;
|
||||
import com.hzya.frame.seeyon.service.ISeeyonExtService;
|
||||
import com.hzya.frame.seeyon.util.OAU8Util;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity;
|
||||
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogStatusEnum;
|
||||
import com.hzya.frame.uuid.UUIDLong;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description seeyon扩展类
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/5/14 14:04
|
||||
**/
|
||||
@Service(value = "seeyonExt")
|
||||
public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||
|
||||
|
||||
Logger logger = LogManager.getLogger(getClass());
|
||||
|
||||
@Autowired
|
||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||
|
||||
/**
|
||||
* 英德赛 OA档案传U8
|
||||
* 根据不同formApp来调U8不同接口
|
||||
* @Since 3.0
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SysExtensionApiEntity ydcSeeyon2u8(SysExtensionApiEntity entity) {
|
||||
String bodys = entity.getBodys();
|
||||
if (StrUtil.isNotEmpty(bodys)){
|
||||
try {
|
||||
OAWorkflowEventDataEntity dataEntity = JSON.parseObject(bodys,OAWorkflowEventDataEntity.class);
|
||||
String businessDataStr = dataEntity.getBusinessDataStr();//oa表单参数
|
||||
JSONObject businessData = JSON.parseObject(businessDataStr);
|
||||
String formApp = dataEntity.getFormApp();
|
||||
SysExtensionApiEntity param = new SysExtensionApiEntity();
|
||||
Map<String, String> headerMap = entity.getHeaders();
|
||||
JSONObject hzyaExtData = dataEntity.getHzyaExtData();//扩展参数
|
||||
if (null == hzyaExtData){
|
||||
hzyaExtData = new JSONObject();
|
||||
}
|
||||
//根据forApp组装不同参数
|
||||
switch (formApp){
|
||||
case "-8691606453890363968"://
|
||||
hzyaExtData.put("billCode", "cunhuoabc123456");
|
||||
getInventory(businessData,param);
|
||||
break;
|
||||
case "6223456019738676230":
|
||||
getSupplier(businessData,param,hzyaExtData);
|
||||
break;
|
||||
case "-9122508232154527168":
|
||||
getCustomer(businessData,param,hzyaExtData);
|
||||
break;
|
||||
default:
|
||||
param.setBodys("未匹配到表单!当前formID:"+ formApp);
|
||||
logger.error("未匹配到表单!当前formID:"+formApp);
|
||||
}
|
||||
headerMap.put("hzyaExtData", JSON.toJSONString(hzyaExtData));
|
||||
return param;
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
logger.error("执行英德赛OA存货同步U8接口报错:{}", e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 回调方法
|
||||
* @Since 3.0
|
||||
* @param logEntity
|
||||
*/
|
||||
@Override
|
||||
public void ydcSeeyon2u8CallBack(SysMessageManageLogEntity logEntity) {
|
||||
|
||||
|
||||
//在这里记录日志
|
||||
JSONObject targetData = JSON.parseObject(logEntity.getTargetData());//这个对象里的body是 发送到u8的请求报文
|
||||
JSONObject sourceData = JSON.parseObject(logEntity.getSourceData());
|
||||
JSONObject sourceHeaders = sourceData.getJSONObject("header");//源数据header
|
||||
JSONObject sourceBody = sourceData.getJSONObject("body");//源数据body
|
||||
JSONObject hzyaExtData = sourceHeaders.getJSONObject("hzyaExtData");
|
||||
JSONArray formMainIds = new JSONArray();
|
||||
formMainIds.add(sourceBody.getString("id"));
|
||||
JSONObject param = new JSONObject();
|
||||
String formApp = sourceBody.getString("formApp");
|
||||
param.put("formAppId",formApp);
|
||||
param.put("formMainIds",formMainIds);
|
||||
param.put("dataSourceCode","ht_oa_sqlserver");
|
||||
param.put("eventType",sourceBody.getString("eventType"));
|
||||
|
||||
//把返回的单号更新到oa档案表
|
||||
String sql = "";
|
||||
switch (formApp){
|
||||
case "-8691606453890363968"://存货
|
||||
sql = "";
|
||||
break;
|
||||
case "6223456019738676230"://供应商
|
||||
sql = "update formmain_0229 set field0002 = '' where field0001 = "+hzyaExtData.getString("billCode");
|
||||
break;
|
||||
case "-9122508232154527168"://客户
|
||||
sql = "update formmain_0230 set field0002 = '' where field0001 = "+hzyaExtData.getString("billCode");
|
||||
break;
|
||||
}
|
||||
IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity();
|
||||
logDetails.setRootAppPk(JSON.toJSONString(param));
|
||||
logDetails.setRootAppBill(hzyaExtData.getString("billCode"));
|
||||
logDetails.setNewTransmitInfo(logEntity.getReturnData());
|
||||
logDetails.setNewPushDate(new Date());
|
||||
logDetails.setRootAppNewData(targetData.getString("body"));
|
||||
//logDetails.setNewState(SysMessageManageLogStatusEnum.statusGetValue(logEntity.getStatus()));
|
||||
logDetails.setPluginId("SeeyonExtPlugin");
|
||||
try {
|
||||
if (StrUtil.isEmpty(hzyaExtData.getString("integration_task_living_details_id"))){
|
||||
if (SysMessageManageLogStatusEnum.SUCCESS.getType().equals(logEntity.getStatus())) {//成功
|
||||
taskLivingDetailsService.saveLogToSuccess(logDetails);
|
||||
}else {
|
||||
taskLivingDetailsService.saveLogToFail(logDetails);//失败
|
||||
}
|
||||
}else {
|
||||
logDetails.setId(hzyaExtData.getString("integration_task_living_details_id"));
|
||||
if (SysMessageManageLogStatusEnum.SUCCESS.getType().equals(logEntity.getStatus())) {//成功
|
||||
taskLivingDetailsService.saveLogFailToSuccess(logDetails);
|
||||
}else {
|
||||
taskLivingDetailsService.updateLogFailToSuccess(logDetails);//失败
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.error("保存日志出错:{}",e);
|
||||
}
|
||||
}
|
||||
|
||||
//存货参数组装
|
||||
private SysExtensionApiEntity getInventory(JSONObject businessData,SysExtensionApiEntity param){
|
||||
if (null != businessData){
|
||||
JSONObject formmain0227 = businessData.getJSONObject("formmain_0227");
|
||||
JSONArray formson0228Arr = businessData.getJSONArray("formson_0228");
|
||||
for (int i=0; i< formson0228Arr.size(); i++){
|
||||
JSONObject formson0228 = formson0228Arr.getJSONObject(i);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("Token", "Hzya1314_CheckSkip");
|
||||
jsonObject.put("billid", formson0228.getString("id"));
|
||||
jsonObject.put("AccId", formmain0227.getString("field0015"));
|
||||
|
||||
JSONObject oArchives = new JSONObject();
|
||||
oArchives.put("cInvCode", formson0228.getString("field0002"));
|
||||
oArchives.put("cInvCCode", formson0228.getString("field0005"));
|
||||
oArchives.put("cInvName", formson0228.getString("field0003"));
|
||||
//todo 这个没值
|
||||
oArchives.put("cGroupCode", "01");
|
||||
oArchives.put("cComUnitCode", formson0228.getString("field0006"));
|
||||
|
||||
jsonObject.put("oArchives", oArchives);
|
||||
param.setBodys(JSON.toJSONString(jsonObject));
|
||||
}
|
||||
}
|
||||
return param;
|
||||
}
|
||||
//供应商参数组装
|
||||
private SysExtensionApiEntity getSupplier(JSONObject businessData,SysExtensionApiEntity param,JSONObject hzyaExtData){
|
||||
if (null != businessData){
|
||||
JSONObject formmain0225 = businessData.getJSONObject("formmain_0225");
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("billid", formmain0225.getString("id"));
|
||||
jsonObject.put("AccId", formmain0225.getString("field0020"));
|
||||
jsonObject.put("Token", OAU8Util.getToken());
|
||||
JSONObject oArchives = new JSONObject();
|
||||
oArchives.put("cVenCode", formmain0225.getString("field0002"));
|
||||
oArchives.put("cVenName ", formmain0225.getString("field0003"));
|
||||
oArchives.put("cVenAbbName", formmain0225.getString("field0004"));
|
||||
oArchives.put("cVCCode", formmain0225.getString("field0006"));
|
||||
oArchives.put("cVenExch_name", formmain0225.getString("field0010"));
|
||||
//oArchives.put("bVenTax", "false");
|
||||
//oArchives.put("bLicenceDate", "false");
|
||||
//oArchives.put("bBusinessDate", "false");
|
||||
//oArchives.put("bProxyDate", "false");
|
||||
//oArchives.put("bPassGMP", "false");
|
||||
//oArchives.put("bVenCargo", "false");
|
||||
//oArchives.put("bProxyForeign", "true");
|
||||
//oArchives.put("bVenService", "true");
|
||||
//oArchives.put("iVenGSPType", "0");
|
||||
//oArchives.put("bVenOverseas", "false");
|
||||
//oArchives.put("bVenAccPeriodMng", "false");
|
||||
//oArchives.put("bVenHomeBranch", "false");
|
||||
oArchives.put("dVenCreateDatetime", DateUtil.now());
|
||||
oArchives.put("cVenRegCode", formmain0225.getString("field0009"));
|
||||
oArchives.put("cVenBank", formmain0225.getString("field0011"));
|
||||
oArchives.put("cVenAccount", formmain0225.getString("field0012"));
|
||||
jsonObject.put("oArchives", oArchives);
|
||||
param.setBodys(JSON.toJSONString(jsonObject));
|
||||
hzyaExtData.put("billCode", formmain0225.getString("field0001"));
|
||||
hzyaExtData.put("formmainId", formmain0225.getString("id"));
|
||||
}
|
||||
return param;
|
||||
}
|
||||
//客户参数组装
|
||||
private SysExtensionApiEntity getCustomer(JSONObject businessData,SysExtensionApiEntity param,JSONObject hzyaExtData){
|
||||
if (null != businessData){
|
||||
JSONObject formmain0226 = businessData.getJSONObject("formmain_0226");
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("billid", formmain0226.getString("id"));
|
||||
jsonObject.put("AccId", formmain0226.getString("field0025"));
|
||||
jsonObject.put("Token", "Hzya1314_CheckSkip");
|
||||
|
||||
JSONObject oArchives = new JSONObject();
|
||||
oArchives.put("cCusCode", formmain0226.getString("field0002"));
|
||||
oArchives.put("cCusName", formmain0226.getString("field0007"));
|
||||
oArchives.put("cCusAbbName", formmain0226.getString("field0008"));
|
||||
oArchives.put("cCCCode", formmain0226.getString("field0012"));
|
||||
oArchives.put("cCusExch_name", formmain0226.getString("field0013"));
|
||||
// todo 这个字段没值
|
||||
oArchives.put("cCusMngTypeCode", "999");
|
||||
|
||||
jsonObject.put("oArchives", oArchives);
|
||||
param.setBodys(JSON.toJSONString(jsonObject));
|
||||
hzyaExtData.put("billCode",formmain0226.getString("field0001"));
|
||||
hzyaExtData.put("formmainId",formmain0226.getString("id"));
|
||||
}
|
||||
return param;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
package com.hzya.frame.seeyon.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* com.hzya.frame.bip.v3.v2207.util
|
||||
*
|
||||
* @author makejava
|
||||
* @date 2024-05 -30 14:20
|
||||
*/
|
||||
|
||||
public class OABipUtil {
|
||||
/**
|
||||
*
|
||||
* @content 发送单据到BIP系统
|
||||
* @author laborer
|
||||
* @date 2024/6/21 0021 10:51
|
||||
*
|
||||
*/
|
||||
|
||||
public static String sendU9cTOBipEsb(String parm, String apiCode,String token){
|
||||
String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
System.out.println("推送参数"+parm);
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800023")//头信息,多个头信息多次调用此方法即可
|
||||
.header("access_token", token)//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body(parm)//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
System.out.println("返回参数"+result);
|
||||
if(StrUtil.isNotEmpty(result)){
|
||||
return analytic(result);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String getBipToken(String userCode, String apiCode){
|
||||
String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800023")//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("usercode", userCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body("")//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
System.out.println("返回参数"+result);
|
||||
if(StrUtil.isNotEmpty(result)){
|
||||
JSONObject obj = JSON.parseObject( analytic(result));
|
||||
JSONObject data = obj.getJSONObject("data");
|
||||
return data.getString("access_token");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String analytic(String parm){
|
||||
JSONObject main = JSON.parseObject(parm);
|
||||
return main.getString("attribute");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package com.hzya.frame.seeyon.util;
|
||||
|
||||
/**
|
||||
* @Author:hecan
|
||||
* @Description:支付类型(支付状态)
|
||||
* @params:
|
||||
* @return:
|
||||
* @Date: 2023/3/14 15:05
|
||||
*/
|
||||
public enum OAPayState {
|
||||
a("a","待提交直联"),
|
||||
b("b","已提交直联"),
|
||||
c("c","银行已受理"),
|
||||
d("d","银行未受理"),
|
||||
e("e","可疑"),
|
||||
f("f","待人工确认"),
|
||||
g("g","支付成功"),
|
||||
h("h","支付失败"),
|
||||
i("i","部分成功"),
|
||||
j("j","退票"),
|
||||
k("k","取消支付"),
|
||||
n("n","其他"),
|
||||
p("p","支付中"),
|
||||
q("q","待支付"),
|
||||
one("1","待处理"),
|
||||
two("2","审批中"),
|
||||
three("3","处理失败"),
|
||||
four("4","审批完成"),
|
||||
five("5","审批撤销"),
|
||||
six("6","审批拒绝"),
|
||||
seven("7","待发送审批"),
|
||||
eight("8","集中受理中"),
|
||||
nine("9","审批退回"),
|
||||
ten("10","预处理中"),
|
||||
eleven("11","预处理拒绝"),
|
||||
twelve("12","资金监控审批中");
|
||||
|
||||
|
||||
//类型
|
||||
private String type;
|
||||
//值
|
||||
private String value;
|
||||
|
||||
OAPayState(String type, String value){
|
||||
this.type=type;
|
||||
this.value=value;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String payStateGetValue(String type){
|
||||
for (OAPayState payState : OAPayState.values()){
|
||||
if(payState.getType()==type||payState.getType().equals(type)){
|
||||
return payState.getValue().toString();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,209 @@
|
|||
package com.hzya.frame.seeyon.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.seeyon.entity.CollAttachmentResDTO;
|
||||
import com.hzya.frame.sysnew.application.api.entity.SysApplicationApiEntity;
|
||||
import com.hzya.frame.sysnew.application.api.service.ISysApplicationApiService;
|
||||
import com.hzya.frame.web.exception.BaseSystemException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 致远rest接口工具类
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/17 15:49
|
||||
**/
|
||||
@Component
|
||||
public class OARestUtil {
|
||||
@Autowired
|
||||
private ISysApplicationApiService sysApplicationApiService;
|
||||
static Logger logger = LoggerFactory.getLogger(OARestUtil.class);
|
||||
|
||||
private OARestUtil() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 附件上传
|
||||
* @param file 附件对象
|
||||
* @param api_code 接口编码
|
||||
* @return
|
||||
*/
|
||||
public JSONObject fileUpload(File file,String api_code) {
|
||||
if (StrUtil.isNotEmpty(api_code)){
|
||||
//1、查询附件上传api接口信息
|
||||
SysApplicationApiEntity sysApp = getByCode(api_code);
|
||||
if (null != sysApp){
|
||||
String app_url = sysApp.getAppUrl();
|
||||
String url = app_url+"/seeyon/rest/attachment?token=@token@";
|
||||
String token = getToken(null,"8000240000");
|
||||
url = url.replaceAll("@token@",token);
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("file", file);
|
||||
String result = HttpUtil.post(url, paramMap);
|
||||
if (StrUtil.isNotBlank(result)) {
|
||||
logger.info("附件上传结果"+result);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String atts = jsonObject.get("atts").toString();
|
||||
if (StrUtil.isNotEmpty(atts)) {
|
||||
JSONArray jsonArray = JSONArray.parseArray(atts);
|
||||
JSONObject res = (JSONObject) jsonArray.get(0);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
throw new BaseSystemException("api_code不能为空");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/***
|
||||
* 查询协同附件列表
|
||||
* @param summaryId col_summary表id
|
||||
* @param attType 0代表附件,2代表关联文档,“0,2”代表附件和关联文档
|
||||
* @param apiCode 接口编码
|
||||
* @return
|
||||
*/
|
||||
public List<CollAttachmentResDTO> getColAttachments(String summaryId,String attType,String apiCode,String loginName){
|
||||
if (StrUtil.isNotEmpty(summaryId) && StrUtil.isNotEmpty(apiCode)){
|
||||
SysApplicationApiEntity sysApp = getByCode(apiCode);
|
||||
String token = getToken(loginName,sysApp);
|
||||
String appUrl = StrUtil.removeSuffix(sysApp.getAppUrl(),"/");
|
||||
if (StrUtil.isEmpty(attType)){
|
||||
attType = "0";
|
||||
}
|
||||
String url = "/seeyon/rest/coll/attachments/@SummaryID@/@attType@";
|
||||
url = url.replaceAll("@SummaryID@",summaryId).replaceAll("@attType@",attType);
|
||||
String body = HttpRequest.get(appUrl + url).header("token", token).execute().body();
|
||||
if (StrUtil.isNotEmpty(body) && JSONUtil.isTypeJSON(body)){
|
||||
List<CollAttachmentResDTO> list = JSON.parseArray(body,CollAttachmentResDTO.class);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 附件下载
|
||||
* @param loginName oa登录名
|
||||
* @param apiCode 接口编码
|
||||
* @param fileId 附件id
|
||||
* @param fileName 附件名
|
||||
* @return 附件字节数组
|
||||
*/
|
||||
public byte[] downloadFileBytes(String loginName,String apiCode,String fileId,String fileName){
|
||||
if (StrUtil.isNotEmpty(apiCode)){
|
||||
SysApplicationApiEntity sysApp = getByCode(apiCode);
|
||||
String token = getToken(loginName,sysApp);
|
||||
String appUrl = StrUtil.removeSuffix(sysApp.getAppUrl(),"/");
|
||||
String url = "/seeyon/rest/attachment/file/@ctp_file_ID@?fileName=@文件名@&token=@token@";
|
||||
url = url.replaceAll("@ctp_file_ID@",fileId).replaceAll("@文件名@",fileName).replaceAll("@token@",token);
|
||||
byte[] bytes = HttpUtil.downloadBytes(appUrl + url);
|
||||
return bytes;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 附件下载
|
||||
* @param loginName oa登录名
|
||||
* @param apiCode 接口编码
|
||||
* @param fileId 附件id
|
||||
* @param fileName 附件名
|
||||
* @param token
|
||||
* @return 附件字节数组
|
||||
*/
|
||||
public byte[] downloadFileBytes(String loginName,String apiCode,String fileId,String fileName,String token){
|
||||
if (StrUtil.isNotEmpty(apiCode)){
|
||||
SysApplicationApiEntity sysApp = getByCode(apiCode);
|
||||
if (StrUtil.isEmpty(token)){
|
||||
token = getToken(loginName,sysApp);
|
||||
}
|
||||
String appUrl = StrUtil.removeSuffix(sysApp.getAppUrl(),"/");
|
||||
String url = "/seeyon/rest/attachment/file/@ctp_file_ID@?fileName=@文件名@&token=@token@";
|
||||
url = url.replaceAll("@ctp_file_ID@",fileId).replaceAll("@文件名@",fileName).replaceAll("@token@",token);
|
||||
byte[] bytes = HttpUtil.downloadBytes(appUrl + url);
|
||||
return bytes;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* 获取token
|
||||
* @param login_name
|
||||
* @param api_code
|
||||
* @return
|
||||
*/
|
||||
public String getToken(String login_name,String api_code){
|
||||
if (StrUtil.isNotEmpty(api_code)){
|
||||
SysApplicationApiEntity sysApp = getByCode(api_code);
|
||||
return getToken(login_name,sysApp);
|
||||
}else {
|
||||
throw new BaseSystemException("api_code不能为空");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取token
|
||||
* @param login_name oa登录名
|
||||
* @param sysApp 应用信息
|
||||
* @return
|
||||
*/
|
||||
public String getToken(String login_name,SysApplicationApiEntity sysApp){
|
||||
if (null != sysApp){
|
||||
HashMap<String, String> hashMap = new HashMap<>();
|
||||
String app_url = StrUtil.removeSuffix(sysApp.getAppUrl(), "/");
|
||||
String url = app_url+"/seeyon/rest/token";
|
||||
String headerIn = sysApp.getHeaderIn();
|
||||
JSONArray headers = JSON.parseArray(headerIn);
|
||||
for (int i = 0; i < headers.size(); i++) {
|
||||
JSONObject object1 = headers.getJSONObject(i);
|
||||
String parameterName = object1.getString("parameterName");
|
||||
if ("userName".equals(parameterName) || "password".equals(parameterName) || "loginName".equals(parameterName)){
|
||||
String example = object1.getString("example");
|
||||
hashMap.put(parameterName,example);
|
||||
}
|
||||
}
|
||||
login_name = hashMap.get("loginName");
|
||||
if (StrUtil.isEmpty(login_name)){
|
||||
hashMap.put("loginName","hzya");
|
||||
}
|
||||
String result = HttpRequest.post(url).body(JSON.toJSONString(hashMap)).execute().body();
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if (null != jsonObject) {
|
||||
logger.info("======token:{}======" ,jsonObject.getString("id"));
|
||||
return jsonObject.getString("id");
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private SysApplicationApiEntity getByCode(String api_code){
|
||||
if (StrUtil.isNotEmpty(api_code)){
|
||||
SysApplicationApiEntity sysApp = new SysApplicationApiEntity();
|
||||
sysApp.setApiCode(Long.valueOf(api_code));
|
||||
sysApp = sysApplicationApiService.queryOne(sysApp);
|
||||
if (null != sysApp && StrUtil.isNotEmpty(sysApp.getId())){
|
||||
sysApp = sysApplicationApiService.get(sysApp.getId());
|
||||
if (null != sysApp){
|
||||
return sysApp;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
throw new BaseSystemException("api_code不能为空");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.hzya.frame.seeyon.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.seeyon.entity.OAU8ResponseDTO;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/5/14 15:30
|
||||
**/
|
||||
public class OAU8Util {
|
||||
|
||||
static Logger logger = LogManager.getLogger(OAU8Util.class);
|
||||
|
||||
//获取token
|
||||
public static String getToken() {
|
||||
String url = "http://127.0.0.1:51910/Api/Base/GetToken";
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("secretkey", "L1NhkDrQhtBDzTxFxPI0jxWcBzTBSPvaI5xZusRRi9ofS9d6ngxrj1erwbdjxtUT");
|
||||
logger.info("获取U8token参数:{}", jsonObject.toJSONString());
|
||||
String token = HttpRequest.post( url).body(jsonObject.toJSONString()).timeout(60000).execute().body();
|
||||
logger.info("token返回参数:{}", jsonObject.toJSONString());
|
||||
if (StrUtil.isNotEmpty(token)) {
|
||||
OAU8ResponseDTO u8ResponseDTO = JSONObject.parseObject(token, OAU8ResponseDTO.class);
|
||||
return u8ResponseDTO.getMessage();
|
||||
}
|
||||
return token;
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
</web-app>
|
Loading…
Reference in New Issue