Compare commits
132 Commits
Author | SHA1 | Date |
---|---|---|
|
798919af27 | |
|
512e45477d | |
|
3e79fb0d3b | |
|
7f1902fc33 | |
|
f894e0c754 | |
|
b447546951 | |
|
476bde0f64 | |
|
0890064d6e | |
|
84d849f64f | |
|
1879c10240 | |
|
1933f96229 | |
|
ff079eef87 | |
|
49a157ea28 | |
|
7fab26854a | |
|
b04d7f0709 | |
|
15c692f414 | |
|
4a3b47d6d5 | |
|
038f3deda8 | |
|
17d3a7c337 | |
|
92e447c5e4 | |
|
9406537b66 | |
|
2b12c94791 | |
|
36a05fefba | |
|
6af49289e5 | |
|
e08274a00b | |
|
00fec98bed | |
|
fa3202304b | |
|
2400d08a93 | |
|
4d73583183 | |
|
365b53a728 | |
|
f845f4ed26 | |
|
2c6d81919b | |
|
87d554ba64 | |
|
dccbb4cebf | |
|
7570880778 | |
|
9d94eb0f23 | |
|
0fc94df996 | |
|
1733ec7c54 | |
|
c596b42646 | |
|
f17ade4145 | |
|
d1687abd91 | |
|
ef957a0055 | |
|
a20359be42 | |
|
7066e2bec6 | |
|
f15c2f1d9b | |
|
11431c76b7 | |
|
bb5aa51255 | |
|
937395744e | |
|
f11dba5d41 | |
|
c8d95fe335 | |
|
b0f95f3478 | |
|
473435ab21 | |
|
7069df374e | |
|
697a898844 | |
|
e9bdcfe9bd | |
|
9f748783bc | |
|
f893941710 | |
|
b4021a91e2 | |
|
2cfeec1f99 | |
|
59ce4792f9 | |
|
3ab107390c | |
|
c814e0c475 | |
|
917ea1fa5d | |
|
86aac2c3f5 | |
|
8a3dcc44ab | |
|
4ede4a65ef | |
|
97f57a493f | |
|
f1604d68eb | |
|
00eebd3fb5 | |
|
6055a0954c | |
|
553ea0376c | |
|
d7d1ef5078 | |
|
f68aaa9298 | |
|
3cbaa782d6 | |
|
6a45c88a18 | |
|
c5eaaf9207 | |
|
72f98441a1 | |
|
ed40e4f4c8 | |
|
0d7be1c3ac | |
|
1a99b6b4f4 | |
|
1b300d0bfa | |
|
ea44b43c0e | |
|
eb74a51dbe | |
|
902d6933c3 | |
|
eeeae913da | |
|
f238847fc4 | |
|
59840afc97 | |
|
45576106c7 | |
|
0cf730bb43 | |
|
9f6009bd96 | |
|
cc4db3ae5c | |
|
8ece0ab087 | |
|
5ce5818c94 | |
|
42b10acc82 | |
|
37815377e7 | |
|
c5664ad86b | |
|
99ad32eb0a | |
|
ae561ea8b8 | |
|
e200fd768d | |
|
6d3ce7042f | |
|
e6f9c5824e | |
|
7c3b189530 | |
|
57ad64fb6d | |
|
ca14226903 | |
|
a555abda9c | |
|
331b0f03e0 | |
|
110d08f7f7 | |
|
08567f88f7 | |
|
33d5f8f320 | |
|
a0ed5ea73a | |
|
9b23c66998 | |
|
3fa71d45f6 | |
|
0495fda264 | |
|
2f32b3c0d8 | |
|
cf0f756f2f | |
|
f8fb7c91c3 | |
|
2301365d08 | |
|
1eac206f28 | |
|
29a0b03f14 | |
|
9090ca3dfa | |
|
7f9a513305 | |
|
e6239e89bc | |
|
1221059d06 | |
|
765f35b3e6 | |
|
3a768e1dcc | |
|
4f798570f0 | |
|
11d418a5b3 | |
|
d07b4eea66 | |
|
e5c27bd860 | |
|
2b544b4e32 | |
|
93d9fc2224 | |
|
af5a85b748 |
|
@ -19,7 +19,7 @@ Icon
|
|||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
*.iml
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
|
@ -60,3 +60,8 @@ $RECYCLE.BIN/
|
|||
/common/target/
|
||||
/buildpackage/target/
|
||||
/webapp/target/
|
||||
/E:/yongansystem/log/2024-10-15/
|
||||
/base-buildpackage/target/
|
||||
/base-common/target/
|
||||
/base-core/target/
|
||||
/fw-weixin/target/
|
||||
|
|
|
@ -36,69 +36,87 @@
|
|||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<!-- <profile>-->
|
||||
<!-- <id>local</id> <!–本地环境–>-->
|
||||
<!-- <properties>-->
|
||||
<!-- <profile.active>local</profile.active>-->
|
||||
<!-- </properties>-->
|
||||
<!-- <activation>-->
|
||||
<!-- <activeByDefault>true</activeByDefault>-->
|
||||
<!-- </activation>-->
|
||||
<!-- </profile>-->
|
||||
<!-- <profile>-->
|
||||
<!-- <id>dev</id> <!–开发环境–>-->
|
||||
<!-- <properties>-->
|
||||
<!-- <profile.active>dev</profile.active>-->
|
||||
<!-- </properties>-->
|
||||
<!-- </profile>-->
|
||||
<!-- <profile>-->
|
||||
<!-- <id>ax</id> <!–澳星–>-->
|
||||
<!-- <properties>-->
|
||||
<!-- <profile.active>ax</profile.active>-->
|
||||
<!-- </properties>-->
|
||||
<!-- </profile>-->
|
||||
<!-- <profile>-->
|
||||
<!-- <id>hclocal</id> <!–何灿–>-->
|
||||
<!-- <properties>-->
|
||||
<!-- <profile.active>hclocal</profile.active>-->
|
||||
<!-- </properties>-->
|
||||
<!-- </profile>-->
|
||||
<!-- <profile>-->
|
||||
<!-- <id>llg</id> <!–吕磊钢–>-->
|
||||
<!-- <properties>-->
|
||||
<!-- <profile.active>llg</profile.active>-->
|
||||
<!-- </properties>-->
|
||||
<!-- </profile>-->
|
||||
<!-- <profile>-->
|
||||
<!-- <id>zqtlocal</id> <!–曾庆拓–>-->
|
||||
<!-- <properties>-->
|
||||
<!-- <profile.active>zqtlocal</profile.active>-->
|
||||
<!-- </properties>-->
|
||||
<!-- </profile>-->
|
||||
<!-- <profile>-->
|
||||
<!-- <id>yuqh</id> <!–于群辉–>-->
|
||||
<!-- <properties>-->
|
||||
<!-- <profile.active>yuqh</profile.active>-->
|
||||
<!-- </properties>-->
|
||||
<!-- </profile>-->
|
||||
<!-- <profile>-->
|
||||
<!-- <id>xel</id> <!–相二林–>-->
|
||||
<!-- <properties>-->
|
||||
<!-- <profile.active>xel</profile.active>-->
|
||||
<!-- </properties>-->
|
||||
<!-- </profile>-->
|
||||
<!-- <profile>-->
|
||||
<!-- <id>ydc</id> <!–英德赛–>-->
|
||||
<!-- <properties>-->
|
||||
<!-- <profile.active>ydc</profile.active>-->
|
||||
<!-- </properties>-->
|
||||
<!-- </profile>-->
|
||||
<!-- <profile>-->
|
||||
<!-- <id>yc</id> <!–越城区–>-->
|
||||
<!-- <properties>-->
|
||||
<!-- <profile.active>yc</profile.active>-->
|
||||
<!-- </properties>-->
|
||||
<!-- </profile>-->
|
||||
<!-- <profile>-->
|
||||
<!-- <id>zqt</id> <!–越城区–>-->
|
||||
<!-- <properties>-->
|
||||
<!-- <profile.active>zqt</profile.active>-->
|
||||
<!-- </properties>-->
|
||||
<!-- </profile>-->
|
||||
<profile>
|
||||
<id>local</id> <!--本地环境-->
|
||||
<id>dongj</id> <!--越城区-->
|
||||
<properties>
|
||||
<profile.active>local</profile.active>
|
||||
</properties>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>dev</id> <!--开发环境-->
|
||||
<properties>
|
||||
<profile.active>dev</profile.active>
|
||||
<profile.active>dongj</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>ax</id> <!--澳星-->
|
||||
<properties>
|
||||
<profile.active>ax</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>hclocal</id> <!--何灿-->
|
||||
<properties>
|
||||
<profile.active>hclocal</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>llg</id> <!--吕磊钢-->
|
||||
<id>llg</id> <!--越城区-->
|
||||
<properties>
|
||||
<profile.active>llg</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>zqtlocal</id> <!--曾庆拓-->
|
||||
<properties>
|
||||
<profile.active>zqtlocal</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>yuqh</id> <!--于群辉-->
|
||||
<properties>
|
||||
<profile.active>yuqh</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>xel</id> <!--相二林-->
|
||||
<properties>
|
||||
<profile.active>xel</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>ydc</id> <!--英德赛-->
|
||||
<properties>
|
||||
<profile.active>ydc</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>yc</id> <!--越城区-->
|
||||
<properties>
|
||||
<profile.active>yc</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
<build>
|
||||
<finalName>kangarooDataCenterV3</finalName>
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package com.hzya.frame.plugin.a8bill.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
|
||||
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组织档案(mdm_org: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:30:04
|
||||
*/
|
||||
public interface IPayBillPluginInitializerDao extends IBaseDao<PayBillEntity, String> {
|
||||
/**
|
||||
*
|
||||
* @content 通用获取OA数据接口
|
||||
* @author laborer
|
||||
* @date 2024/7/10 0010 16:06
|
||||
*
|
||||
*/
|
||||
|
||||
List<HashMap<String, Object>> getOaBillData(String str , PayBillEntity entity)throws Exception;
|
||||
/**
|
||||
*
|
||||
* @content 通过ID修改单据状态
|
||||
* @author laborer
|
||||
* @date 2024/7/10 0010 17:32
|
||||
*
|
||||
*/
|
||||
|
||||
int updateStateForId(String str , PayBillEntity entity)throws Exception;
|
||||
|
||||
List<PayBillEntity> queryyhzh(PayBillEntity yhzhid) throws Exception;
|
||||
|
||||
int updateYhzh(PayBillEntity updateyhzh);
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.hzya.frame.plugin.a8bill.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.execsql.service.IExecSqlService;
|
||||
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
|
||||
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组织档案(MdmOrg)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-07 18:30:04
|
||||
*/
|
||||
public class PayBillPluginInitializerDaoImpl extends MybatisGenericDao<PayBillEntity, String> implements IPayBillPluginInitializerDao {
|
||||
@Autowired
|
||||
private IExecSqlService execSqlService;
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<HashMap<String, Object>> getOaBillData(String str, PayBillEntity entity)throws Exception {
|
||||
return execSqlService.execSelectSql(str, "");
|
||||
}
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public int updateStateForId(String str , PayBillEntity entity)throws Exception {
|
||||
return super.update("com.hzya.frame.plugin.a8bill.dao.impl.PayBillPluginInitializerDaoImpl.PayBillEntity_update",entity);
|
||||
}
|
||||
|
||||
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<PayBillEntity> queryyhzh(PayBillEntity entity)throws Exception {
|
||||
return super.query(getSqlIdPrifx() + "queryyhzh",entity);
|
||||
}
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public int updateYhzh(PayBillEntity entity) {
|
||||
return super.update(getSqlIdPrifx() + "updateYhzh",entity);
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,50 @@ import com.hzya.frame.web.entity.BaseEntity;
|
|||
* @since 2024-06-07 18:30:04
|
||||
*/
|
||||
public class PayBillEntity extends BaseEntity {
|
||||
private String sql;
|
||||
private String yhzh;//银行账号
|
||||
private String bankaccbas;//账号id
|
||||
private String accountname;//账号名称
|
||||
private String billCode;//单据号
|
||||
|
||||
public String getSql() {
|
||||
return sql;
|
||||
}
|
||||
|
||||
public void setSql(String sql) {
|
||||
this.sql = sql;
|
||||
}
|
||||
|
||||
public String getYhzh() {
|
||||
return yhzh;
|
||||
}
|
||||
|
||||
public void setYhzh(String yhzh) {
|
||||
this.yhzh = yhzh;
|
||||
}
|
||||
|
||||
public String getBankaccbas() {
|
||||
return bankaccbas;
|
||||
}
|
||||
|
||||
public void setBankaccbas(String bankaccbas) {
|
||||
this.bankaccbas = bankaccbas;
|
||||
}
|
||||
|
||||
public String getAccountname() {
|
||||
return accountname;
|
||||
}
|
||||
|
||||
public void setAccountname(String accountname) {
|
||||
this.accountname = accountname;
|
||||
}
|
||||
|
||||
public String getBillCode() {
|
||||
return billCode;
|
||||
}
|
||||
|
||||
public void setBillCode(String billCode) {
|
||||
this.billCode = billCode;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.plugin.a8bill.dao.impl.PayBillDaoImpl">
|
||||
<mapper namespace="com.hzya.frame.plugin.a8bill.dao.impl.PayBillPluginInitializerDaoImpl">
|
||||
|
||||
<resultMap id="get-PayBillEntity-result" type="com.hzya.frame.plugin.a8bill.entity.PayBillEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
|
||||
</resultMap>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "PayBillEntity_Base_Column_List">
|
||||
id
|
||||
|
||||
</sql>
|
||||
</sql>
|
||||
<!--执行update语句-->
|
||||
<update id="PayBillEntity_update" parameterType="com.hzya.frame.plugin.a8bill.entity.PayBillEntity">
|
||||
<if test="null != sql and sql != ''">
|
||||
${sql}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<select id="queryyhzh" parameterType="com.hzya.frame.plugin.a8bill.entity.PayBillEntity"
|
||||
resultType="com.hzya.frame.plugin.a8bill.entity.PayBillEntity" >
|
||||
select pk_bankaccbas as bankaccbas,accountname from bd_bankaccbas where account = #{yhzh}
|
||||
</select>
|
||||
<update id="updateYhzh" parameterType="com.hzya.frame.plugin.a8bill.entity.PayBillEntity">
|
||||
update ARAP_DJFB set bfyhzh = #{bankaccbas},skyhmc = #{accountname}
|
||||
where djbh = #{billCode}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -0,0 +1,161 @@
|
|||
package com.hzya.frame.plugin.a8bill.plugin;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapBuilder;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.req.AccTransactionReq;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.res.AccTransactionRes;
|
||||
import com.hzya.frame.ningboBankTreasury.util.NingboBankUtil;
|
||||
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
|
||||
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description 查询宁波银行账户交易明细 保存到OA
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/25 16:24
|
||||
**/
|
||||
public class AccLogPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(getClass());
|
||||
@Autowired
|
||||
private INingboBankPluginService ningboBankPluginService;
|
||||
@Value("${OA.data_source_code}")
|
||||
private String oa_data_source_code;
|
||||
@Autowired
|
||||
private IPayBillPluginInitializerDao payBillDao;
|
||||
/***
|
||||
* 插件初始化方法
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 10:48
|
||||
* @Param []
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件销毁方法
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的ID
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "AccLogPlugin";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的名称
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "查询交易明细插件";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的显示值
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "AccLogPlugin";
|
||||
}
|
||||
|
||||
/***
|
||||
* 插件类型 1、场景插件
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 14:01
|
||||
* @Param []
|
||||
* @return java.lang.String
|
||||
**/
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
/***
|
||||
* 执行业务代码
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-07 11:20
|
||||
* @param requestJson 执行业务代码的参数
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
//查询银行账户列表
|
||||
PayBillEntity oaBillEntity = new PayBillEntity();
|
||||
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
||||
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData("SELECT field0002 from formmain_0053",oaBillEntity);
|
||||
List<String> accList = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(hashMaps)){
|
||||
for (HashMap<String, Object> hashMap : hashMaps) {
|
||||
String field0002 = String.valueOf(hashMap.get("field0002"));
|
||||
accList.add(field0002);
|
||||
}
|
||||
}
|
||||
//测试银行卡号
|
||||
// accList = Convert.toList(String.class,"86041110000110293,86041110000109337,6223160030547665,6214180002001411023,6214180000002609736");
|
||||
//正式银行卡号
|
||||
accList = Convert.toList(String.class,"80010122000156204,80010122000263453,80012025000028568,80012029000027878,80015025000004736,359000100100541514,359001400100031916,359001100100008396,80010122000508721,80010122000170773,359060100100185025,80010122000927103,80010122000950933,80012025000144507,80015025000020731");
|
||||
//1、查询宁波银行的交易记录
|
||||
AccTransactionReq accTransactionReq = new AccTransactionReq();
|
||||
accTransactionReq.setCdSign(NingboBankUtil.SHOURU);
|
||||
accTransactionReq.setBeginDate(DateUtil.format(DateUtil.yesterday(),"yyyy-MM-dd"));
|
||||
accTransactionReq.setEndDate(DateUtil.today());
|
||||
accTransactionReq.setBankAccList(accList);
|
||||
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", "8000360002")
|
||||
.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
|
||||
.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||
.put("appId","800036")
|
||||
.build();
|
||||
String body = HttpRequest.post("http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(JSONObject.toJSONString(accTransactionReq)).timeout(60000).execute().body();
|
||||
System.out.println(body);
|
||||
if (StrUtil.isNotEmpty(body)){
|
||||
JSONObject response = JSONObject.parseObject(body);
|
||||
if (response.getBoolean("flag")){
|
||||
List<AccTransactionRes> accTransactionResList = JSONObject.parseArray(response.getJSONObject("attribute").getString("attribute"), AccTransactionRes.class);
|
||||
//2、保存到OA底表
|
||||
if (CollectionUtils.isNotEmpty(accTransactionResList)){
|
||||
ningboBankPluginService.saveAccLog(accTransactionResList);
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity(getPluginName()+"执行成功:{}",accTransactionResList);
|
||||
}
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity(getPluginName()+"执行成功");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
package com.hzya.frame.plugin.a8bill.plugin;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
|
||||
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/29 11:08
|
||||
**/
|
||||
public class NingboBankPayPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(getClass());
|
||||
@Autowired
|
||||
private INingboBankPluginService ningboBankPluginService;
|
||||
@Resource
|
||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||
@Autowired
|
||||
private IPayBillPluginInitializerDao payBillDao;
|
||||
|
||||
@Value("${OA.data_source_code:}")
|
||||
private String oa_data_source_code;
|
||||
/***
|
||||
* 插件初始化方法
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 10:48
|
||||
* @Param []
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件销毁方法
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的ID
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "NingboBankPayPlugin";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的名称
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "宁波银行转账插件";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的显示值
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "宁波银行转账插件";
|
||||
}
|
||||
|
||||
/***
|
||||
* 插件类型 1、场景插件
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 14:01
|
||||
* @Param []
|
||||
* @return java.lang.String
|
||||
**/
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
/***
|
||||
* 执行业务代码
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-07 11:20
|
||||
* @param requestJson 执行业务代码的参数
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(),JSONObject.class);
|
||||
String interId = requestJsonObj.getString("integration_task_living_details_id");
|
||||
IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity();
|
||||
if(StrUtil.isNotEmpty(interId)){
|
||||
oldMsg = taskLivingDetailsService.get(interId);
|
||||
}
|
||||
String rootAppPk = oldMsg.getRootAppPk();
|
||||
|
||||
try {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
if(StrUtil.isNotEmpty(rootAppPk)){
|
||||
String code = requestJson.getString("code");
|
||||
sb.append(" and id = '"+rootAppPk+"'");
|
||||
}else{
|
||||
sb.append(" and payState is null");
|
||||
}
|
||||
PayBillEntity oaBillEntity = new PayBillEntity();
|
||||
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
//付款单
|
||||
stringBuffer.append("select * from v_hzya_pay where 1=1 " );
|
||||
stringBuffer.append(sb.toString());
|
||||
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData(stringBuffer.toString(),oaBillEntity);
|
||||
ningboBankPluginService.payRequest(hashMaps,getPluginId(),"8000360000",interId);
|
||||
} catch (Exception e) {
|
||||
logger.info("获取OA数据失败"+e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new JsonResultEntity("成功",true,new JsonResultEntity());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
package com.hzya.frame.plugin.a8bill.plugin;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.ningboBankTreasury.enums.PayStatusEnum;
|
||||
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
|
||||
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description 宁波银行 单笔付款交易结果查询
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/29 16:59
|
||||
**/
|
||||
public class NingboBankPayResultPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(getClass());
|
||||
@Value("${OA.data_source_code}")
|
||||
private String oa_data_source_code;
|
||||
@Autowired
|
||||
private IPayBillPluginInitializerDao payBillDao;
|
||||
@Autowired
|
||||
private INingboBankPluginService ningboBankPluginService;
|
||||
/***
|
||||
* 插件初始化方法
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 10:48
|
||||
* @Param []
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void initialize() {
|
||||
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件销毁方法
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的ID
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "NingboBankPayResultPlugin";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的名称
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "宁波银行转账结果查询插件";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的显示值
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "宁波银行转账结果查询插件";
|
||||
}
|
||||
|
||||
/***
|
||||
* 插件类型 1、场景插件
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 14:01
|
||||
* @Param []
|
||||
* @return java.lang.String
|
||||
**/
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
/***
|
||||
* 执行业务代码
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-07 11:20
|
||||
* @param requestJson 执行业务代码的参数
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
PayBillEntity oaBillEntity = new PayBillEntity();
|
||||
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select * from v_hzya_pay where payState ='1'");
|
||||
try {
|
||||
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData(stringBuffer.toString(),oaBillEntity);
|
||||
if(CollectionUtils.isNotEmpty(hashMaps)){
|
||||
//查询交易结果
|
||||
ningboBankPluginService.queryResult(hashMaps,"8000360001");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new JsonResultEntity("成功",true,new JsonResultEntity());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,147 @@
|
|||
package com.hzya.frame.plugin.a8bill.plugin;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
|
||||
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 外汇 TT 汇款
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/8/1 14:33
|
||||
**/
|
||||
public class NingboBankTTPayPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(getClass());
|
||||
@Autowired
|
||||
private INingboBankPluginService ningboBankPluginService;
|
||||
@Resource
|
||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||
@Autowired
|
||||
private IPayBillPluginInitializerDao payBillDao;
|
||||
@Value("${OA.data_source_code}")
|
||||
private String oa_data_source_code;
|
||||
|
||||
|
||||
/***
|
||||
* 插件初始化方法
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 10:48
|
||||
* @Param []
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件销毁方法
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的ID
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "NingboBankTTPayPlugin";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的名称
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "宁波银行T/T汇款插件";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的显示值
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "宁波银行T/T汇款插件";
|
||||
}
|
||||
|
||||
/***
|
||||
* 插件类型 1、场景插件
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 14:01
|
||||
* @Param []
|
||||
* @return java.lang.String
|
||||
**/
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
/***
|
||||
* 执行业务代码
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-07 11:20
|
||||
* @param requestJson 执行业务代码的参数
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(),JSONObject.class);
|
||||
String interId = requestJsonObj.getString("integration_task_living_details_id");
|
||||
IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity();
|
||||
if(StrUtil.isNotEmpty(interId)){
|
||||
oldMsg = taskLivingDetailsService.get(interId);
|
||||
}
|
||||
String rootAppPk = oldMsg.getRootAppPk();
|
||||
try {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
if(StrUtil.isNotEmpty(rootAppPk)){
|
||||
String code = requestJson.getString("code");
|
||||
sb.append(" and id = '"+rootAppPk+"'");
|
||||
}else{
|
||||
sb.append(" and payState is null");
|
||||
}
|
||||
PayBillEntity oaBillEntity = new PayBillEntity();
|
||||
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
//付款单
|
||||
stringBuffer.append("select * from v_hzya_pay_tt where 1=1 " );
|
||||
stringBuffer.append(sb.toString());
|
||||
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData(stringBuffer.toString(),oaBillEntity);
|
||||
ningboBankPluginService.payRequest(hashMaps,getPluginId(),"8000360003",interId);
|
||||
} catch (Exception e) {
|
||||
logger.info("获取OA数据失败"+e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new JsonResultEntity("成功",true,new JsonResultEntity());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
package com.hzya.frame.plugin.a8bill.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
|
||||
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TT汇款汇出交易结果查询
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/8/2 10:47
|
||||
**/
|
||||
public class NingboBankTTPayResultPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(getClass());
|
||||
@Autowired
|
||||
private INingboBankPluginService ningboBankPluginService;
|
||||
@Resource
|
||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||
@Autowired
|
||||
private IPayBillPluginInitializerDao payBillDao;
|
||||
@Value("${OA.data_source_code}")
|
||||
private String oa_data_source_code;
|
||||
|
||||
|
||||
/***
|
||||
* 插件初始化方法
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 10:48
|
||||
* @Param []
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件销毁方法
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的ID
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "NingboBankTTPayResultPlugin";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的名称
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "宁波银行T/T汇款交易状态查询插件";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的显示值
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "宁波银行T/T汇款交易状态查询插件";
|
||||
}
|
||||
|
||||
/***
|
||||
* 插件类型 1、场景插件
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 14:01
|
||||
* @Param []
|
||||
* @return java.lang.String
|
||||
**/
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
/***
|
||||
* 执行业务代码
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-07 11:20
|
||||
* @param requestJson 执行业务代码的参数
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
PayBillEntity oaBillEntity = new PayBillEntity();
|
||||
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append("select * from v_hzya_pay_tt where payState ='1'");
|
||||
try {
|
||||
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData(stringBuffer.toString(),oaBillEntity);
|
||||
if(CollectionUtils.isNotEmpty(hashMaps)){
|
||||
//查询交易结果
|
||||
ningboBankPluginService.queryResult(hashMaps,"8000360007");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new JsonResultEntity("成功",true,new JsonResultEntity());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
package com.hzya.frame.plugin.a8bill.plugin;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
|
||||
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description OA付款申请审批完成后传u8c
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/10/9 14:19
|
||||
**/
|
||||
public class PayReqSyncU8CPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Autowired
|
||||
private INingboBankPluginService ningboBankPluginService;
|
||||
@Resource
|
||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||
@Autowired
|
||||
private IPayBillPluginInitializerDao payBillDao;
|
||||
@Value("${OA.data_source_code}")
|
||||
private String oa_data_source_code;
|
||||
|
||||
/***
|
||||
* 插件初始化方法
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 10:48
|
||||
* @Param []
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件销毁方法
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的ID
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "PayReqSyncU8CPlugin";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的名称
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "付款申请审批结果传U8C";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的显示值
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "付款申请审批结果传U8C";
|
||||
}
|
||||
|
||||
/***
|
||||
* 插件类型 1、场景插件
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 14:01
|
||||
* @Param []
|
||||
* @return java.lang.String
|
||||
**/
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
/***
|
||||
* 执行业务代码
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-07 11:20
|
||||
* @param requestJson 执行业务代码的参数
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
logger.info("======开始执行付款申请审批结果传U8C========");
|
||||
JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(), JSONObject.class);
|
||||
String integration_task_living_details_id = requestJsonObj.getString("integration_task_living_details_id");
|
||||
IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity();
|
||||
if (StrUtil.isNotEmpty(integration_task_living_details_id)) {
|
||||
oldMsg = taskLivingDetailsService.get(integration_task_living_details_id);
|
||||
}
|
||||
String rootAppPk = oldMsg.getRootAppPk();
|
||||
try {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
if (StrUtil.isNotEmpty(rootAppPk)) {
|
||||
sb.append(" and id = '" + rootAppPk + "'");
|
||||
}else {
|
||||
sb.append("and finishedflag = '1' and pushState is null");
|
||||
}
|
||||
PayBillEntity oaBillEntity = new PayBillEntity();
|
||||
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
//付款单
|
||||
stringBuffer.append("SELECT * from v_hzya_payres_u8c WHERE 1= 1 ");
|
||||
stringBuffer.append(sb.toString());
|
||||
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData(stringBuffer.toString(), oaBillEntity);
|
||||
for (HashMap<String, Object> hashMap : hashMaps) {
|
||||
JSONObject main = new JSONObject();
|
||||
for (String key : hashMap.keySet()) {
|
||||
main.put(key, hashMap.get(key));
|
||||
}
|
||||
logger.info("组装数据前"+JSON.toJSONString(hashMaps));
|
||||
logger.info("组装数据前1"+main.toString());
|
||||
ningboBankPluginService.updateU8CStatus(main,integration_task_living_details_id);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("获取OA数据失败" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity(getPluginName()+"执行成功");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package com.hzya.frame.plugin.a8bill.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.res.AccTransactionRes;
|
||||
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 宁波银行插件用
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/25 16:33
|
||||
**/
|
||||
public interface INingboBankPluginService {
|
||||
|
||||
/**
|
||||
* 支付申请
|
||||
* @param hashMaps oa 查到的数据
|
||||
* @param pluginId 插件 id
|
||||
* @param apiCode api 编码
|
||||
* @param interId 重试 id
|
||||
*/
|
||||
void payRequest(List<HashMap<String, Object>> hashMaps,String pluginId,String apiCode,String interId);
|
||||
/**
|
||||
* 调用宁波银行esb接口
|
||||
* @param params 参数
|
||||
* @param apiCode 接口编码
|
||||
* @param appId 应用id
|
||||
* @return
|
||||
*/
|
||||
String executeEsb(String params,String apiCode,String appId);
|
||||
|
||||
|
||||
/**
|
||||
* 保存收款日志到oa底表
|
||||
* @param accTransactionResList
|
||||
*/
|
||||
void saveAccLog(List<AccTransactionRes> accTransactionResList);
|
||||
|
||||
/**
|
||||
* 查询交易结果
|
||||
* @param hashMaps
|
||||
* @param apiCode
|
||||
*/
|
||||
void queryResult(List<HashMap<String, Object>> hashMaps,String apiCode);
|
||||
|
||||
void updateyhzhdataTransactional(PayBillEntity updateyhzh);
|
||||
/**
|
||||
* 查询OA附件,并上传到宁波银行
|
||||
* @param oaId oa主键id
|
||||
* @return 宁波银行附件上传编码
|
||||
*/
|
||||
String fileUpload(String oaId);
|
||||
|
||||
/**
|
||||
* 更新u8c单据状态
|
||||
* @param jsonObject
|
||||
* @param integration_task_living_details_id 重试id
|
||||
*/
|
||||
void updateU8CStatus(JSONObject jsonObject,String integration_task_living_details_id);
|
||||
}
|
|
@ -0,0 +1,510 @@
|
|||
package com.hzya.frame.plugin.a8bill.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
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.hzya.frame.ningboBankTreasury.dto.req.SingleTransferReq;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.req.TTRemitReq;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.res.AccTransactionRes;
|
||||
import com.hzya.frame.ningboBankTreasury.enums.CurrencyEnum;
|
||||
import com.hzya.frame.ningboBankTreasury.enums.PayStatusEnum;
|
||||
import com.hzya.frame.ningboBankTreasury.enums.TTPayStatusEnum;
|
||||
import com.hzya.frame.ningboBankTreasury.service.INingboBankTreasuryService;
|
||||
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
|
||||
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
|
||||
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
|
||||
import com.hzya.frame.seeyon.dongj.entity.Formmain0044Entity;
|
||||
import com.hzya.frame.seeyon.dongj.service.IFormmain0044Service;
|
||||
import com.hzya.frame.seeyon.util.RestUtil;
|
||||
import com.hzya.frame.stringutil.StringUtil;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description 宁波银行插件用
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/25 16:34
|
||||
**/
|
||||
public class NingboBankPluginServiceImpl implements INingboBankPluginService {
|
||||
Logger logger = LoggerFactory.getLogger(getClass());
|
||||
@Autowired
|
||||
private IFormmain0044Service formmain0044Service;
|
||||
@Resource
|
||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||
@Autowired
|
||||
private IPayBillPluginInitializerDao payBillDao;
|
||||
@Autowired
|
||||
private RestUtil restUtil;
|
||||
@Autowired
|
||||
private INingboBankTreasuryService ningboBankTreasuryService;
|
||||
@Value("${OA.data_source_code}")
|
||||
private String oa_data_source_code;
|
||||
|
||||
|
||||
/**
|
||||
* 支付申请
|
||||
* @param hashMaps oa 查到的数据
|
||||
* @param pluginId 插件 id
|
||||
* @param apiCode api 编码
|
||||
* @param interId 重试 id
|
||||
*/
|
||||
@Override
|
||||
public void payRequest(List<HashMap<String, Object>> hashMaps, String pluginId, String apiCode,String interId) {
|
||||
if(CollectionUtils.isNotEmpty(hashMaps)){
|
||||
PayBillEntity oaBillEntity = new PayBillEntity();
|
||||
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
||||
|
||||
for (HashMap<String, Object> hashMap : hashMaps) {
|
||||
try {
|
||||
JSONObject main = new JSONObject();
|
||||
for(String key:hashMap.keySet()) {
|
||||
main.put(key, hashMap.get(key));
|
||||
}
|
||||
String param = "";
|
||||
//单笔转账
|
||||
if ("8000360000".equals(apiCode)){
|
||||
SingleTransferReq singleTransferReq = JSONObject.parseObject(main.toString(), SingleTransferReq.class);
|
||||
param = JSONObject.toJSONString(singleTransferReq);
|
||||
}else if("8000360003".equals(apiCode)){
|
||||
//TT汇款
|
||||
TTRemitReq ttRemitReq = JSONObject.parseObject(main.toString(), TTRemitReq.class);
|
||||
//货到付款时,要上传附件
|
||||
if ("01".equals(ttRemitReq.getPayMode())){
|
||||
String fileCode = fileUpload(main.getString("id"));
|
||||
ttRemitReq.setFileUploadCodes(Convert.toList(String.class,fileCode));
|
||||
}
|
||||
param = JSONObject.toJSONString(ttRemitReq);
|
||||
}
|
||||
if (StrUtil.isEmpty(param)){
|
||||
param = main.toString();
|
||||
}
|
||||
logger.info("获取到付款单的数据:{}",main.toString());
|
||||
String result = this.executeEsb(param,apiCode,"800036");
|
||||
logger.info("推送宁波银行的返回结果:{}",result);
|
||||
IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity();
|
||||
logDetails.setRootAppPk(main.getString("id"));
|
||||
logDetails.setRootAppBill(main.getString("serialNo"));
|
||||
logDetails.setNewTransmitInfo(result);
|
||||
logDetails.setNewPushDate(new Date());
|
||||
logDetails.setRootAppNewData(JSON.toJSONString(main));
|
||||
logDetails.setPluginId(pluginId);
|
||||
JSONObject resultObj = JSON.parseObject(result);
|
||||
String attribute = resultObj.getString("attribute");
|
||||
boolean flag = resultObj.getBoolean("flag");
|
||||
String subState = "";
|
||||
String fieldName = main.getString("fieldName");
|
||||
String tableName = main.getString("tableName");
|
||||
String payMsg = main.getString("payMsg");
|
||||
// String subMsg = main.getString("subMsg");
|
||||
String str = "";
|
||||
String sync_flag = "";
|
||||
try {
|
||||
if(StrUtil.isEmpty(interId)){// 银行状态 1支付中 2 支付失败 null 未提交支付 0支付成功
|
||||
logDetails.setCreate_time(new Date());
|
||||
logDetails.setModify_time(new Date());
|
||||
if(flag){
|
||||
subState = "1";
|
||||
sync_flag = " ,"+payMsg+" = '支付中'";
|
||||
taskLivingDetailsService.saveLogToSuccess(logDetails);
|
||||
}else{
|
||||
subState = "2";
|
||||
String resMsg = JSONObject.parseObject(attribute).getString("retMsg");
|
||||
sync_flag = " ,"+payMsg+" = '"+resMsg+"'";
|
||||
taskLivingDetailsService.saveLogToFail(logDetails);
|
||||
}
|
||||
}else{
|
||||
logDetails.setId(interId);
|
||||
logDetails.setModify_time(new Date());
|
||||
if(flag){
|
||||
subState = "1";
|
||||
sync_flag = " ,"+payMsg+" = '支付中'";
|
||||
taskLivingDetailsService.saveLogFailToSuccess(logDetails);
|
||||
}else{
|
||||
subState = "2";
|
||||
String resMsg = JSONObject.parseObject(attribute).getString("retMsg");
|
||||
sync_flag = " ,"+payMsg+" = '"+resMsg+"'";
|
||||
taskLivingDetailsService.updateLogFailToSuccess(logDetails);
|
||||
}
|
||||
}
|
||||
|
||||
str = "update "+tableName+" set " + fieldName + "= '" +subState+"'" +sync_flag+"where id = '"+main.getString("id")+"'";
|
||||
} catch (Exception e) {
|
||||
subState = "N";
|
||||
str = "update "+tableName+" set " + fieldName + "= '" +subState+"'," +payMsg+" = '"+attribute+"' "+"where id = '"+main.getString("id")+"'";
|
||||
logger.info("保存日志失败"+e.getMessage());
|
||||
oaBillEntity.setSql(str);
|
||||
payBillDao.updateStateForId(str,oaBillEntity);
|
||||
e.printStackTrace();
|
||||
}
|
||||
//修改推送状态,防止重复推送
|
||||
oaBillEntity.setSql(str);
|
||||
payBillDao.updateStateForId(str,oaBillEntity);
|
||||
}catch (Exception e){
|
||||
logger.info("宁波银行付款接口调用出错:{}",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询交易结果
|
||||
*
|
||||
* @param hashMaps
|
||||
* @param apiCode
|
||||
*/
|
||||
@Override
|
||||
public void queryResult(List<HashMap<String, Object>> hashMaps, String apiCode) {
|
||||
if(CollectionUtils.isNotEmpty(hashMaps)){
|
||||
PayBillEntity oaBillEntity = new PayBillEntity();
|
||||
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
||||
for (HashMap<String, Object> hashMap : hashMaps) {
|
||||
JSONObject main = new JSONObject();
|
||||
for(String key:hashMap.keySet()) {
|
||||
main.put(key, hashMap.get(key));
|
||||
}
|
||||
String tableName = main.getString("tableName");
|
||||
String fieldName = main.getString("fieldName");
|
||||
String payDate = main.getString("payDate");
|
||||
String payMsg = main.getString("payMsg");
|
||||
try {
|
||||
|
||||
logger.info("获取到付款单状态的数据"+main.toString());
|
||||
JSONObject reMain = new JSONObject();
|
||||
reMain.put("serialNo",main.getString("serialNo"));
|
||||
String result = this.executeEsb(reMain.toString(),apiCode,"800036");
|
||||
logger.info("获取付款状态结果"+result);
|
||||
|
||||
JSONObject resultObj = JSON.parseObject(result);
|
||||
JSONObject attribute = resultObj.getJSONObject("attribute");
|
||||
boolean flag = resultObj.getBoolean("flag");
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("update "+tableName);
|
||||
if(flag){
|
||||
JSONObject data = attribute.getJSONObject("Data");
|
||||
JSONObject transferDtl = new JSONObject();
|
||||
String status = "";
|
||||
String msg = "";
|
||||
boolean isFinally = true;
|
||||
if ("8000360001".equals(apiCode)){
|
||||
transferDtl = data.getJSONObject("transferDtl");
|
||||
status = transferDtl.getString("status");
|
||||
msg = PayStatusEnum.getByCode(status);
|
||||
isFinally = PayStatusEnum.isFinally(status);
|
||||
}else if ("8000360007".equals(apiCode)){
|
||||
status = data.getString("transState");
|
||||
msg = TTPayStatusEnum.getByCode(status);
|
||||
isFinally = TTPayStatusEnum.isFinally(status);
|
||||
}
|
||||
if(StrUtil.isEmpty(msg)){
|
||||
msg ="未知交易状态,请联系管理员查证";
|
||||
sb.append(" set "+payMsg+" = '"+msg+"'");
|
||||
sb.append(" , "+fieldName+" = '2'");
|
||||
}
|
||||
sb.append(" set "+payMsg+" = '"+msg+"'");
|
||||
//是否最终态
|
||||
if(isFinally){
|
||||
sb.append(" , "+fieldName+" = '0'");
|
||||
String payDateStr = DateUtil.now();
|
||||
sb.append(" , "+payDate+" = '"+payDateStr+"'");
|
||||
}
|
||||
}else {
|
||||
sb.append(" set "+payMsg+" = '"+attribute.getString("retMsg")+"'");
|
||||
sb.append(" ,"+fieldName+" = '2'");
|
||||
|
||||
}
|
||||
sb.append(" where id = '"+main.getString("id")+"'");
|
||||
//修改推送状态,防止重复推送
|
||||
oaBillEntity.setSql(sb.toString());
|
||||
payBillDao.updateStateForId(sb.toString(),oaBillEntity);
|
||||
} catch (Exception e) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("update "+tableName );
|
||||
sb.append(" set "+payMsg+" = '获取交易状态失败'");
|
||||
sb.append(" , "+fieldName+" = '2'");
|
||||
sb.append(" where id = '"+main.getString("id")+"'");
|
||||
logger.info("获取交易状态失败,更新交易信息为失败状态,后续不在查询");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用宁波银行esb接口
|
||||
*
|
||||
* @param params
|
||||
* @param apiCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String executeEsb(String params, String apiCode,String appId) {
|
||||
logger.info("请求apiCode:{},参数:{}",apiCode,params);
|
||||
Map<String, String> header = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", apiCode)
|
||||
.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
|
||||
.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||
//.put("appId","800036")
|
||||
.put("appId",appId)
|
||||
.build();
|
||||
String res = HttpRequest.post("http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(header).body(params).timeout(50000).execute().body();
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存收款日志到oa底表
|
||||
* @param accTransactionResList
|
||||
*/
|
||||
@Override
|
||||
public void saveAccLog(List<AccTransactionRes> accTransactionResList) {
|
||||
if (CollectionUtils.isNotEmpty(accTransactionResList)){
|
||||
//查询已经存在的数据
|
||||
Formmain0044Entity formmain0044 = new Formmain0044Entity();
|
||||
formmain0044.setStart_date(DateUtil.lastWeek().toDateStr());
|
||||
formmain0044.setDataSourceCode(oa_data_source_code);
|
||||
List<Formmain0044Entity> formmain0044List = formmain0044Service.querySeridId(formmain0044);
|
||||
//过滤已保存的数据
|
||||
if (CollectionUtils.isNotEmpty(formmain0044List) && CollectionUtils.isNotEmpty(accTransactionResList)){
|
||||
accTransactionResList = accTransactionResList.stream()
|
||||
.filter(acc -> formmain0044List.stream()
|
||||
.noneMatch(f -> acc.getSerialId().equals(f.getField0019())))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(accTransactionResList)){
|
||||
for (AccTransactionRes accTransactionRes : accTransactionResList) {
|
||||
String bankAcc = StringUtil.nullConvert(accTransactionRes.getBankAcc());
|
||||
String bankName = StringUtil.nullConvert(accTransactionRes.getBankName());
|
||||
String accName = StringUtil.nullConvert(accTransactionRes.getAccName());
|
||||
String oppAccNo = StringUtil.nullConvert(accTransactionRes.getOppAccNo());
|
||||
String oppAccName = StringUtil.nullConvert(accTransactionRes.getOppAccName());
|
||||
String oppAccBank = StringUtil.nullConvert(accTransactionRes.getOppAccBank());
|
||||
String transTime = StringUtil.nullConvert(accTransactionRes.getTransTime());
|
||||
//这个是唯一的
|
||||
String serialId = StringUtil.nullConvert(StringUtil.replaceBlank(accTransactionRes.getSerialId()));
|
||||
String amt = StringUtil.nullConvert(accTransactionRes.getAmt());
|
||||
String abs = StringUtil.nullConvert(accTransactionRes.getAbs());
|
||||
String bankType = StringUtil.nullConvert(accTransactionRes.getBankType());
|
||||
String serialNo = StringUtil.nullConvert(accTransactionRes.getSerialNo());
|
||||
String currency = StringUtil.nullConvert(CurrencyEnum.getNameByCode(accTransactionRes.getCurCode()));
|
||||
String uses = StringUtil.nullConvert(accTransactionRes.getUses());
|
||||
//String curCode = StringUtil.nullConvert(accTransactionRes.getCurCode());
|
||||
//这里转换成货币符号
|
||||
String curCode = StringUtil.nullConvert(CurrencyEnum.getSymbolByCode(accTransactionRes.getCurCode()));
|
||||
String postScript = StringUtil.nullConvert(accTransactionRes.getPostScript());
|
||||
String data = StrUtil.format(getAccLogXmlTemplate(),bankAcc,bankName,accName,oppAccNo,oppAccName,oppAccBank,transTime,serialId,amt,abs,bankType,serialNo,currency,uses,postScript,curCode);
|
||||
JSONObject paramsTemplate = new JSONObject();
|
||||
paramsTemplate.put("loginName", "oa1");
|
||||
paramsTemplate.put("dataXml", data);
|
||||
Map<String, String> header = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", "8000340006")
|
||||
.put("publicKey","ZJYAA9Z/jWMe1rC+Sjh8NVMRtwVMb5Bn0DbmIEsgpVlR3C9Ce7eDIk+3zDUT+v578prj")
|
||||
.put("secretKey","B8sgQwEaskwM7BQj1XLvu3kdKD3xm7Lyd4FWsPaFQk5v+UtQLCkzVzLlCZ9Bdyv2j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||
.put("appId","800034")
|
||||
.build();
|
||||
String res = HttpRequest.post("http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(header).body(paramsTemplate.toString()).timeout(60000).execute().body();
|
||||
System.out.println("保存oa底表结果:"+res);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询OA附件,并上传到宁波银行
|
||||
*
|
||||
* @param oaId oa主键id
|
||||
* @return 宁波银行附件上传编码
|
||||
*/
|
||||
@Override
|
||||
public String fileUpload(String oaId) {
|
||||
if (StrUtil.isNotEmpty(oaId)){
|
||||
try {
|
||||
//查询oa单据关联附件
|
||||
PayBillEntity oaBillEntity = new PayBillEntity();
|
||||
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
||||
String sql = " SELECT\n" +
|
||||
" formmain_0058.id,\n" +
|
||||
" formmain_0058.field0024 ,\n" +
|
||||
" CTP_ATTACHMENT.FILE_URL,\n" +
|
||||
" CTP_ATTACHMENT.FILENAME\n" +
|
||||
"FROM\n" +
|
||||
" formmain_0058 \n" +
|
||||
" LEFT JOIN CTP_ATTACHMENT ON CTP_ATTACHMENT.SUB_REFERENCE = formmain_0058.field0024 \n" +
|
||||
"WHERE\n" +
|
||||
" formmain_0058.field0061 = '境外'\n" +
|
||||
" and formmain_0058.id = '" + oaId+"'";
|
||||
oaBillEntity.setSql(sql);
|
||||
List<HashMap<String, Object>> dataList = payBillDao.getOaBillData(sql, oaBillEntity);
|
||||
if (CollectionUtils.isNotEmpty(dataList)){
|
||||
HashMap<String, Object> oaDataMap = dataList.get(0);
|
||||
String fileUrl = String.valueOf(oaDataMap.get("FILE_URL"));
|
||||
String fileName = String.valueOf(oaDataMap.get("FILENAME"));
|
||||
if (StrUtil.isNotEmpty(fileUrl)){
|
||||
//下载OA附件
|
||||
byte[] bytes = restUtil.downloadFileBytes("oa1", "8000340000", fileUrl, fileName);
|
||||
//上传到宁波银行
|
||||
logger.info("上传附件到宁波银行:{},{}",fileUrl,fileName);
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("fileName",fileName);
|
||||
param.put("bytes",bytes);
|
||||
param.put("channelNo","open-filegateway");
|
||||
String res = executeEsb(param.toString(), "8000360008","800036");
|
||||
JsonResultEntity jsonResultEntity = JSONObject.parseObject(res, JsonResultEntity.class);
|
||||
if (null != jsonResultEntity && jsonResultEntity.isFlag()){
|
||||
JSONObject attribute = JSONObject.parseObject(String.valueOf(jsonResultEntity.getAttribute()));
|
||||
JSONObject data = attribute.getJSONObject("Data");
|
||||
String fileCode = data.getString("data");
|
||||
return fileCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch(Exception e){
|
||||
logger.error("上传附件到宁波银行出错:{}",e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新u8c单据状态
|
||||
* @param main
|
||||
*/
|
||||
@Override
|
||||
public void updateU8CStatus(JSONObject main,String integration_task_living_details_id) {
|
||||
String billCode = main.getString("serialNo");
|
||||
String dwbm = main.getString("dwbm");
|
||||
String state = main.getString("state");
|
||||
String userCode = main.getString("userCode");
|
||||
|
||||
|
||||
String yhzh = main.getString("yhzh");//银行账号
|
||||
String u8cCode = main.getString("u8cCode");//数据源编码
|
||||
|
||||
String id = main.getString("id");
|
||||
if (StrUtil.isNotEmpty(billCode)){
|
||||
PayBillEntity oaBillEntity = new PayBillEntity();
|
||||
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
||||
String str = "update formmain_0058 set field0072 = 'N' where id = "+id;
|
||||
try {
|
||||
//刷新数据
|
||||
//查询银行账号表的ID
|
||||
if(u8cCode != null && !"".equals(u8cCode) && yhzh != null && !"".equals(yhzh)){
|
||||
logger.info("执行U8C付款单审批接口修改账号,u8c数据源编码:"+u8cCode+",银行账号:"+yhzh);
|
||||
PayBillEntity yhzhid = new PayBillEntity();
|
||||
yhzhid.setDataSourceCode(u8cCode);
|
||||
yhzhid.setYhzh(yhzh);
|
||||
List<PayBillEntity> yhzhList = payBillDao.queryyhzh(yhzhid);
|
||||
//修改数据
|
||||
if(yhzhList != null && yhzhList.size() == 1){
|
||||
PayBillEntity updateyhzh = yhzhList.get(0);
|
||||
logger.info("执行U8C付款单审批接口修改账号,查询到账号,修改数据。银行账号:"+yhzh+"。账号id:"+updateyhzh.getBankaccbas()+",账号名称:"+updateyhzh.getAccountname()+",单据号:"+billCode);
|
||||
updateyhzh.setDataSourceCode(u8cCode);
|
||||
updateyhzh.setBillCode(billCode);
|
||||
updateyhzhdataTransactional(updateyhzh);
|
||||
//Thread.sleep(10000);
|
||||
}else {
|
||||
logger.info("执行U8C付款单审批接口修改账号,未查询到账号");
|
||||
}
|
||||
}
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("billno",billCode);
|
||||
param.put("corpcode",dwbm);
|
||||
param.put("billType","paybill");
|
||||
param.put("userCode",userCode);
|
||||
param.put("ckeckResult","3".equals(state) ? "Y" :"N");
|
||||
param.put("ckeckNote",getStateName(state));
|
||||
String result = executeEsb(param.toString(), "8000350060","800035");
|
||||
logger.info("调用U8C付款单审批返回参数:{}",result);
|
||||
//保存日志
|
||||
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
|
||||
taskLivingDetail.setCreate_time(new Date());
|
||||
taskLivingDetail.setModify_time(new Date());
|
||||
taskLivingDetail.setRootAppPk(id);
|
||||
taskLivingDetail.setRootAppBill(main.getString("serialNo"));
|
||||
taskLivingDetail.setPluginId("PayReqSyncU8CPlugin");
|
||||
taskLivingDetail.setRootAppNewData(param.toString());
|
||||
taskLivingDetail.setNewTransmitInfo(result);
|
||||
taskLivingDetail.setNewPushDate(new Date());
|
||||
JSONObject resultObj = JSON.parseObject(result);
|
||||
boolean flag = resultObj.getBoolean("flag");
|
||||
//保存日志
|
||||
saveLog(integration_task_living_details_id,flag,taskLivingDetail);
|
||||
//更新oa表单推送状态
|
||||
if (flag){
|
||||
str = "update formmain_0058 set field0072 = 'Y' where id = "+id;
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.error("执行U8C付款单审批接口出错:{}",e);
|
||||
}
|
||||
//修改推送状态,防止重复推送
|
||||
oaBillEntity.setSql(str);
|
||||
try {
|
||||
payBillDao.updateStateForId(str,oaBillEntity);
|
||||
} catch (Exception e) {
|
||||
logger.error("执行U8C付款单审批接口后更新OA单据状态出错:{}",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||
public void updateyhzhdataTransactional(PayBillEntity updateyhzh) {
|
||||
payBillDao.updateYhzh(updateyhzh);
|
||||
}
|
||||
|
||||
//审批状态对应的中文
|
||||
private String getStateName(String state){
|
||||
if ("3".equals(state)){
|
||||
return "审批通过";
|
||||
}else if ("1".equals(state)){
|
||||
return "流程终止";
|
||||
}else if ("2".equals(state)){
|
||||
return "流程撤销";
|
||||
}
|
||||
return "审批通过";
|
||||
}
|
||||
public void saveLog(String integration_task_living_details_id, Boolean flag, IntegrationTaskLivingDetailsEntity taskLivingDetail){
|
||||
try {
|
||||
//判断,成功调用这个方法
|
||||
if (StrUtil.isEmpty(integration_task_living_details_id)){
|
||||
if (flag){
|
||||
taskLivingDetailsService.saveLogToSuccess(taskLivingDetail);
|
||||
}else {
|
||||
//失败 调用这个方法
|
||||
taskLivingDetailsService.saveLogToFail(taskLivingDetail);
|
||||
}
|
||||
}else {
|
||||
taskLivingDetail.setId(integration_task_living_details_id);
|
||||
if (flag){
|
||||
//如果是重试 成功调这个方法
|
||||
taskLivingDetailsService.saveLogFailToSuccess(taskLivingDetail);
|
||||
}else {
|
||||
//如果是重试 失败调这个方法
|
||||
taskLivingDetailsService.updateLogFailToSuccess(taskLivingDetail);
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.error("保存日志出错:{}",e);
|
||||
}
|
||||
}
|
||||
private static String getAccLogXmlTemplate(){
|
||||
// return "<forms version=\"2.1\"><formExport><summary id=\"1828182906863371818\" name=\"formmain_0044\"/><definitions><column id=\"field0001\" type=\"0\" name=\"我方账号\" isNullable=\"false\" length=\"200\"/><column id=\"field0017\" type=\"0\" name=\"我方开户行\" isNullable=\"false\" length=\"200\"/><column id=\"field0024\" type=\"0\" name=\"我方户名\" isNullable=\"false\" length=\"200\"/><column id=\"field0029\" type=\"0\" name=\"客户方账号\" isNullable=\"false\" length=\"200\"/><column id=\"field0022\" type=\"0\" name=\"客户方户名\" isNullable=\"false\" length=\"2000\"/><column id=\"field0030\" type=\"0\" name=\"客户方开户行\" isNullable=\"false\" length=\"500\"/><column id=\"field0018\" type=\"2\" name=\"交易日期\" isNullable=\"false\" length=\"255\"/><column id=\"field0019\" type=\"0\" name=\"交易流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0020\" type=\"4\" name=\"收款金额\" isNullable=\"false\" length=\"20\"/><column id=\"field0021\" type=\"0\" name=\"摘要\" isNullable=\"false\" length=\"500\"/><column id=\"field0025\" type=\"0\" name=\"银行类型\" isNullable=\"false\" length=\"100\"/><column id=\"field0026\" type=\"0\" name=\"银行流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0027\" type=\"0\" name=\"币种\" isNullable=\"false\" length=\"100\"/><column id=\"field0028\" type=\"0\" name=\"用途\" isNullable=\"false\" length=\"800\"/><column id=\"field0031\" type=\"0\" name=\"关联客户号\" isNullable=\"false\" length=\"100\"/><column id=\"field0032\" type=\"0\" name=\"客商编号\" isNullable=\"false\" length=\"100\"/><column id=\"field0033\" type=\"0\" name=\"交易代码\" isNullable=\"false\" length=\"100\"/><column id=\"field0034\" type=\"0\" name=\"客商名称\" isNullable=\"false\" length=\"100\"/><column id=\"field0035\" type=\"0\" name=\"对账码\" isNullable=\"false\" length=\"100\"/><column id=\"field0036\" type=\"0\" name=\"备注\" isNullable=\"false\" length=\"800\"/><column id=\"field0037\" type=\"0\" name=\"ERP业务参考号\" isNullable=\"false\" length=\"100\"/><column id=\"field0038\" type=\"0\" name=\"币种ID\" isNullable=\"false\" length=\"100\"/><column id=\"field0039\" type=\"0\" name=\"币种编码\" isNullable=\"false\" length=\"100\"/><column id=\"field0040\" type=\"0\" name=\"控制只关联1次\" isNullable=\"false\" length=\"100\"/><column id=\"field0044\" type=\"4\" name=\"收款剩余金额\" isNullable=\"false\" length=\"20\"/><column id=\"field0045\" type=\"0\" name=\"收款完成情况\" isNullable=\"false\" length=\"100\"/><column id=\"field0046\" type=\"4\" name=\"是否收款完成\" isNullable=\"false\" length=\"20\"/></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><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=\"ERP业务参考号\"><value><![CDATA[{}]]></value></column><column name=\"币种ID\"><value><![CDATA[{}]]></value></column><column name=\"币种编码\"><value><![CDATA[{}]]></value></column><column name=\"控制只关联1次\"><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>";
|
||||
return "<forms version=\"2.1\"><formExport><summary id=\"1828182906863371818\" name=\"formmain_0044\"/><definitions><column id=\"field0001\" type=\"0\" name=\"我方账号\" isNullable=\"false\" length=\"200\"/><column id=\"field0017\" type=\"0\" name=\"我方开户行\" isNullable=\"false\" length=\"200\"/><column id=\"field0024\" type=\"0\" name=\"我方户名\" isNullable=\"false\" length=\"200\"/><column id=\"field0029\" type=\"0\" name=\"客户方账号\" isNullable=\"false\" length=\"200\"/><column id=\"field0022\" type=\"0\" name=\"客户方户名\" isNullable=\"false\" length=\"2000\"/><column id=\"field0030\" type=\"0\" name=\"客户方开户行\" isNullable=\"false\" length=\"500\"/><column id=\"field0018\" type=\"2\" name=\"交易日期\" isNullable=\"false\" length=\"255\"/><column id=\"field0019\" type=\"0\" name=\"交易流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0020\" type=\"4\" name=\"收款金额\" isNullable=\"false\" length=\"20\"/><column id=\"field0021\" type=\"0\" name=\"摘要\" isNullable=\"false\" length=\"500\"/><column id=\"field0025\" type=\"0\" name=\"银行类型\" isNullable=\"false\" length=\"100\"/><column id=\"field0026\" type=\"0\" name=\"银行流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0027\" type=\"0\" name=\"币种\" isNullable=\"false\" length=\"100\"/><column id=\"field0028\" type=\"0\" name=\"用途\" isNullable=\"false\" length=\"800\"/><column id=\"field0036\" type=\"0\" name=\"备注\" isNullable=\"false\" length=\"800\"/><column id=\"field0039\" 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=\"客户方户名\"><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>";
|
||||
}
|
||||
}
|
|
@ -452,6 +452,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("执行异常错误原因:"+e);
|
||||
logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
||||
taskDetailEntity.setResult("新增返回脚本解析保存三方id错误");
|
||||
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
|
||||
|
@ -926,7 +927,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
map1.put("tableName",mainDb);
|
||||
//map1.put("dataStatus", "Y");
|
||||
map1.put("addStatus", "0");
|
||||
map1.put("size", 100);
|
||||
map1.put("size", 10);
|
||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||
objects = toLowerCaseKeys(objects);
|
||||
|
||||
|
@ -964,14 +965,14 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","新增接口未查找到",mainDb,objects.get(i).getString("id"),null,null,null,null,doObjects.get(i).toJSONString(),"1");
|
||||
}
|
||||
return ;
|
||||
continue ;
|
||||
}
|
||||
SysApplicationEntity sysApplicationEntity = sysApplicationDao.get(apiEntity.getAppId());
|
||||
if(sysApplicationEntity == null || sysApplicationEntity.getId() == null ){
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","应用未查找到",mainDb,objects.get(i).getString("id"),null,null,apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
}
|
||||
return ;
|
||||
continue ;
|
||||
}
|
||||
|
||||
SysApplicationScriptEntity scriptEntity = null;
|
||||
|
@ -981,7 +982,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","脚本未查找到",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
}
|
||||
return ;
|
||||
continue ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -991,13 +992,14 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
mdmModuleSendLogEntity.setTableName(mainDb+"_send_log");
|
||||
mdmModuleSendLogEntity.setFormmainId(doObjects.get(i).getString("id"));
|
||||
mdmModuleSendLogEntity.setSts("Y");
|
||||
mdmModuleSendLogEntity.setDataType("1");
|
||||
mdmModuleSendLogEntity.setAppId(sysApplicationEntity.getId());
|
||||
mdmModuleSendLogEntity.setApiId(apiEntity.getId());
|
||||
//mdmModuleSendLogEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
|
||||
mdmModuleSendLogEntity.setOptionType("1");
|
||||
Integer num = mdmModuleSendLogDao.getCount(mdmModuleSendLogEntity);
|
||||
if(num > 0){//已经新增过不发送
|
||||
continue;
|
||||
//continue;
|
||||
}
|
||||
getDetailData(mdmModuleDbEntities,doObjects.get(i),mdmModuleDbFiledsRuleEntities,mdmModuleDbFiledsEntities);
|
||||
|
||||
|
@ -1121,10 +1123,12 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
objects.get(i).put("sendsanfzt123",true);
|
||||
continue;
|
||||
}else {
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
objects.get(i).put("sendsanfzt123",false);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -1132,12 +1136,14 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
|
||||
//所有下发发送完成,修改数据状态
|
||||
for (int i = 0; i < objects.size(); i++) {
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "Y");
|
||||
updateMap.put("addStatus", "1");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
//if(objects.get(i).getBoolean("sendsanfzt123")){
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "Y");
|
||||
updateMap.put("addStatus", "1");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
package com.hzya.frame.plugin.oaReceipt.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.plugin.oaReceipt.entity.OaReceiptEntity;
|
||||
|
||||
public interface IOaReceiptDao extends IBaseDao<OaReceiptEntity, String> {
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.hzya.frame.plugin.oaReceipt.dao.impl;
|
||||
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.plugin.oaReceipt.dao.IOaReceiptDao;
|
||||
import com.hzya.frame.plugin.oaReceipt.entity.OaReceiptEntity;
|
||||
|
||||
public class OaReceiptDaoImpl extends MybatisGenericDao<OaReceiptEntity, String> implements IOaReceiptDao {
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
package com.hzya.frame.plugin.oaReceipt.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
public class OaReceiptEntity extends BaseEntity {
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.plugin.oaReceipt.dao.impl.OaReceiptDaoImpl">
|
||||
|
||||
<resultMap id="get-OaReceiptEntity-result" type="com.hzya.frame.plugin.oaReceipt.entity.OaReceiptEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "PayBillEntity_Base_Column_List">
|
||||
id
|
||||
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.hzya.frame.plugin.oaReceipt.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.a8bill.plugin.PayBillPluginInitializer;
|
||||
import com.hzya.frame.seeyon.receiptFor.service.IReceiptForService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
public class OaReceiptPluginInitializer extends PluginBaseEntity {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(PayBillPluginInitializer.class);
|
||||
@Autowired
|
||||
private IReceiptForService receiptForService;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "OaReceiptPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "OaReceiptPlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "OaReceiptPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
try {
|
||||
logger.info("======开始执行付款单据信息同步========");
|
||||
return receiptForService.sendReceiptFor(requestJson);
|
||||
}catch (Exception e){
|
||||
logger.info("======执行付款单据同步失败:{}========",e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.hzya.frame.plugin.oaReceipt.service;
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.plugin.oaReceipt.entity.OaReceiptEntity;
|
||||
|
||||
public interface IOaReceiptService extends IBaseService<OaReceiptEntity, String> {
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.hzya.frame.plugin.oaReceipt.service.impl;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.plugin.oaReceipt.entity.OaReceiptEntity;
|
||||
import com.hzya.frame.plugin.oaReceipt.service.IOaReceiptService;
|
||||
|
||||
public class OaReceiptServiceImpl extends BaseService<OaReceiptEntity, String> implements IOaReceiptService {
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package com.hzya.frame.plugin.u8c.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.u8c.service.ISalesBillingService;
|
||||
import com.hzya.frame.u8c.sosale.service.ISoSaleService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
|
||||
public class SaleConPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(SaleConPluginInitializer.class);
|
||||
|
||||
@Autowired
|
||||
private ISoSaleService soSaleService;
|
||||
|
||||
/***
|
||||
* 插件初始化方法
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 10:48
|
||||
* @Param []
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void initialize() {
|
||||
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件销毁方法
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的ID
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "SaleConPlugin";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的名称
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "U8C销售合同同步OA销售合同";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的显示值
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "U8C销售合同同步OA销售合同插件";
|
||||
}
|
||||
|
||||
/***
|
||||
* 插件类型 1、场景插件
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 14:01
|
||||
* @Param []
|
||||
* @return java.lang.String
|
||||
**/
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
/***
|
||||
* 执行业务代码
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-07 11:20
|
||||
* @param requestJson 执行业务代码的参数
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
soSaleService.getU8cSaleToOa(requestJson);
|
||||
return BaseResult.getSuccessMessageEntity("销售订单同步OA成功");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.hzya.frame.plugin.u8c.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.u8c.service.ISalesBillingService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
|
||||
public class SalesBillingPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(SalesBillingPluginInitializer.class);
|
||||
|
||||
@Autowired
|
||||
private ISalesBillingService salesBillingService;
|
||||
|
||||
/***
|
||||
* 插件初始化方法
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 10:48
|
||||
* @Param []
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void initialize() {
|
||||
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件销毁方法
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的ID
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "SalesBillingPlugin";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的名称
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "u8c销售开票审核状态同步插件";
|
||||
}
|
||||
|
||||
/****
|
||||
* 插件的显示值
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-08-02 10:48
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "u8c销售开票审核状态同步插件";
|
||||
}
|
||||
|
||||
/***
|
||||
* 插件类型 1、场景插件
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-02 14:01
|
||||
* @Param []
|
||||
* @return java.lang.String
|
||||
**/
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
|
||||
/***
|
||||
* 执行业务代码
|
||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @Date 2023-08-07 11:20
|
||||
* @param requestJson 执行业务代码的参数
|
||||
* @return void
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
JsonResultEntity jsonResultEntity = salesBillingService.doSalesBilling(requestJson);
|
||||
return jsonResultEntity;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.plugin.u8c.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface ISalesBillingService {
|
||||
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description OA同步销售开票审核状态到U8C
|
||||
* @Date 10:21 上午 2024/8/2
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity doSalesBilling(JSONObject requestJson);
|
||||
}
|
|
@ -0,0 +1,164 @@
|
|||
package com.hzya.frame.plugin.u8c.service.impl;
|
||||
|
||||
import cn.hutool.core.map.MapBuilder;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.plugin.u8c.service.ISalesBillingService;
|
||||
import com.hzya.frame.u8c.salesBilling.entity.U8cSalesBillingEntity;
|
||||
import com.hzya.frame.u8c.salesBilling.service.IU8cSalesBillingService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public class SalesBillingServiceImpl implements ISalesBillingService {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(SalesBillingServiceImpl.class);
|
||||
|
||||
@Value("${OA.data_source_code}")
|
||||
private String oa_data_source_code;
|
||||
@Autowired
|
||||
private IU8cSalesBillingService iu8cSalesBillingService;
|
||||
|
||||
private final String appId = "800035";
|
||||
|
||||
private final String apiCode = "8000350047";
|
||||
//这个接口调错了。要用开发的那个审批接口
|
||||
// private final String apiCode = "8000350060";
|
||||
private final String publicKey = "ZJYATW/MfYZX7zF0eAh4DJXbyTLwUtwSoSz5Y/o1ksAaN/dCe7eDIk+3zDUT+v578prj";
|
||||
private final String secretKey = "+5BUkLQh3iX3VHgEt5bE2IPh+ZeebGvDaEspsvVu739Ar6sFnwg+fpPod4t6XhoTj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=";
|
||||
|
||||
/**
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 同步销售开票审核状态
|
||||
* @Date 10:21 上午 2024/8/2
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity doSalesBilling(JSONObject requestJson) {
|
||||
//查询需要同步的数据
|
||||
|
||||
try {
|
||||
U8cSalesBillingEntity u8cSalesBillingEntity = new U8cSalesBillingEntity();
|
||||
u8cSalesBillingEntity.setDataSourceCode(oa_data_source_code);
|
||||
List<U8cSalesBillingEntity> u8cSalesBillingEntities = iu8cSalesBillingService.queryDoSalesBilling(u8cSalesBillingEntity);
|
||||
|
||||
if (u8cSalesBillingEntities != null && u8cSalesBillingEntities.size() > 0) {
|
||||
for (int i = 0; i < u8cSalesBillingEntities.size(); i++) {
|
||||
U8cSalesBillingEntity entity = u8cSalesBillingEntities.get(i);
|
||||
String params = getSendData(entity);
|
||||
//发送数据
|
||||
String returnData = executeEsb(params,appId,apiCode,publicKey,secretKey);
|
||||
//解析结果
|
||||
boolean flag = analyzeReturnData(returnData);
|
||||
if(flag){
|
||||
entity.setPushStatus("Y");
|
||||
}else {
|
||||
entity.setPushStatus("N");
|
||||
}
|
||||
entity.setDataSourceCode(oa_data_source_code);
|
||||
iu8cSalesBillingService.updateDoSalesBilling(entity);
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("同步销售开票审核状态成功");
|
||||
} else {
|
||||
return BaseResult.getSuccessMessageEntity("同步销售开票审核状态成功");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return BaseResult.getFailureMessageEntity("同步销售开票审核状态失败" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 解析返回状态
|
||||
* @Date 2:50 下午 2024/8/2
|
||||
* @param returnData
|
||||
* @return boolean
|
||||
**/
|
||||
private boolean analyzeReturnData(String returnData) {
|
||||
boolean falg = false ;
|
||||
if (JSONUtil.isTypeJSON(returnData)) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(returnData);
|
||||
if(jsonObject != null && jsonObject.get("flag") != null && jsonObject.getBoolean("flag")) {
|
||||
JSONObject attribute = jsonObject.getJSONObject("attribute");
|
||||
if(attribute != null && attribute.get("status") != null && "success".equals(attribute.getString("status"))) {
|
||||
falg = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return falg;
|
||||
}
|
||||
|
||||
private String getSendData(U8cSalesBillingEntity entity) {
|
||||
String params = "";
|
||||
//{
|
||||
// "queryinfo": {
|
||||
// "code": [
|
||||
// "SITH1904180026",
|
||||
// "SOTH1805240023"
|
||||
// ],
|
||||
// "corp": "1000",
|
||||
// "date_begin": "2019-03-24",
|
||||
// "date_end": "2019-05-24"
|
||||
// },
|
||||
// "approveinfo": {
|
||||
// "approvid": "18612329914",
|
||||
// "approveDate": "2018-04-19",
|
||||
// "status": "Y",
|
||||
// "note": "哈哈"
|
||||
// }
|
||||
//}
|
||||
JSONObject data = new JSONObject();
|
||||
JSONObject queryinfo = new JSONObject();
|
||||
JSONObject approveinfo = new JSONObject();
|
||||
JSONArray code = new JSONArray();
|
||||
code.add(entity.getCode());//单据号
|
||||
queryinfo.put("code", code);
|
||||
queryinfo.put("corp", entity.getCorp());//公司编码
|
||||
queryinfo.put("date_begin", entity.getDateBegin());//单据开始日期
|
||||
// queryinfo.put("date_end", entity.getDateEnd());//单据结束日期
|
||||
queryinfo.put("date_end", "2099-05-24");//单据结束日期
|
||||
// approveinfo.put("approvid", entity.getApprovid());//审批人
|
||||
approveinfo.put("approvid", "15715849962");//审批人
|
||||
approveinfo.put("approveDate", entity.getApprovedate());//审核时间
|
||||
approveinfo.put("status", entity.getStatus());//审批状态(Y:通过,N:不通过,R:驳回)
|
||||
approveinfo.put("note", entity.getNote());//批语
|
||||
|
||||
data.put("queryinfo", queryinfo);
|
||||
data.put("approveinfo", approveinfo);
|
||||
params = data.toJSONString();
|
||||
|
||||
//用新的审批接口
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// jsonObject.put("billno",entity.getCode());
|
||||
// jsonObject.put("corpcode",entity.getCorp());
|
||||
// jsonObject.put("billType","saleinvoice");
|
||||
// jsonObject.put("userCode","15715849962");
|
||||
// jsonObject.put("ckeckResult","Y");
|
||||
// jsonObject.put("ckeckNote","审批通过");
|
||||
// params = jsonObject.toString();
|
||||
return params;
|
||||
}
|
||||
|
||||
|
||||
public String executeEsb(String params, String appId, String apiCode, String publicKey, String secretKey) {
|
||||
logger.info("请求apiCode:{},参数:{}", apiCode, params);
|
||||
Map<String, String> header = MapBuilder.<String, String>create(true)
|
||||
.put("apiCode", apiCode)
|
||||
.put("publicKey", publicKey)
|
||||
.put("secretKey", secretKey)
|
||||
.put("appId", appId)
|
||||
.build();
|
||||
String res = HttpRequest.post("http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(header).body(params).timeout(60000).execute().body();
|
||||
return res;
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
#######################澳星环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: GBK
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: E:\yongansystem\log
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: E:\yongansystem\file
|
||||
zt:
|
||||
url: http://127.0.0.1:9081/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -1,42 +0,0 @@
|
|||
#######################dev环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: warn
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /home/webservice/zt/log
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /home/webservice/zt/file
|
||||
# path: D:\webservice\file
|
||||
# pluginpath: D:\webservice\plugin
|
||||
pluginpath: /home/webservice/zt/plugin
|
||||
# tomcatpath: D:\apache-tomcat-9.0.69\webapps\kangarooDataCenter\WEB-INF\classes\
|
||||
tomcatpath: /home/webservice/zt/tomcatV3/webapps/kangarooDataCenterV3/WEB-INF/classes/
|
||||
cbs8:
|
||||
appId: 1P4AGrpz
|
||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||
cbs_public_key: 0469146F06BF3B01236E84632441E826
|
||||
#电子回单下载临时存放位置
|
||||
elec_path: /Users/xiangerlin/Downloads/
|
||||
OA:
|
||||
data_source_code: yc_oa
|
||||
zt:
|
||||
url: http://127.0.0.1:9082/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -1,4 +1,4 @@
|
|||
#######################zqtlocal环境#######################
|
||||
#######################dev环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
|
@ -6,21 +6,19 @@ logging:
|
|||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: D:/local/logs/
|
||||
path: /home/webservice/zt/log
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
url: jdbc:mysql://115.239.174.22:3306/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: D:/local/upload/
|
||||
pluginpath : D:/local/plugin/
|
||||
tomcatpath: E:\apache-tomcat-9.0.27\webapps\kangarooDataCenterV3\WEB-INF\classes\
|
||||
path: /home/webservice/zt/file
|
||||
cbs8:
|
||||
appId: 1P4AGrpz
|
||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||
|
@ -34,6 +32,4 @@ cbs8:
|
|||
#电子回单下载临时存放位置
|
||||
elec_path: /Users/xiangerlin/Downloads/
|
||||
OA:
|
||||
data_source_code: yc_oa
|
||||
zt:
|
||||
url: http://127.0.0.1:9082/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
data_source_code: djoatest
|
|
@ -1,27 +0,0 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: D:\yongansystem\kangarooDataCenter\v3\logs
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
# url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
# username: root
|
||||
# password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: D:\yongansystem\kangarooDataCenter\v3\logs
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -1,62 +0,0 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/apple/Desktop/log/local
|
||||
spring:
|
||||
data:
|
||||
mongodb:
|
||||
# host: 192.168.2.237
|
||||
# port: 27017
|
||||
# database: businesscenter
|
||||
# auto-index-creation: true
|
||||
# password: hzya1314
|
||||
# username: hzya
|
||||
flyway:
|
||||
# 启动flyway migration, 默认为true
|
||||
enabled: false
|
||||
datasource:
|
||||
dynamic:
|
||||
druid:
|
||||
filters: stat,log4j2
|
||||
datasource:
|
||||
master:
|
||||
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
||||
# username: hzyazt
|
||||
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||
# type: com.alibaba.druid.pool.DruidDataSource
|
||||
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
# url: jdbc:dm://hzya.ufyct.com:9040/businesscenter?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
|
||||
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
||||
# username: hzyazt
|
||||
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/apple/Desktop/log/local
|
||||
tomcatpath: /Users/apple/Desktop/log/local
|
||||
pluginpath: /Users/apple/Desktop/log/local
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
cbs8:
|
||||
appId: 1P4AGrpz
|
||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||
cbs_public_key: 0469146F06BF3B01236E84632441E826
|
||||
#电子回单下载临时存放位置
|
||||
elec_path: /Users/xiangerlin/Downloads/
|
||||
OA:
|
||||
data_source_code: yc_oa
|
|
@ -1,23 +0,0 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/apple/Desktop/log/local
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/apple/Desktop/log/local
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -1,35 +0,0 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/dev
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/xiangerlin/work/app/file/dev
|
||||
cbs8:
|
||||
appId: 1P4AGrpz
|
||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||
cbs_public_key: 0469146F06BF3B01236E84632441E826F3067A6B93BC3839C836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185
|
||||
#电子回单下载临时存放位置
|
||||
elec_path: /Users/xiangerlin/Downloads/
|
||||
OA:
|
||||
data_source_code: yc-test
|
|
@ -1,90 +0,0 @@
|
|||
#logging:
|
||||
# #日志级别 指定目录级别
|
||||
# level:
|
||||
# root: info
|
||||
# encodings: UTF-8
|
||||
# file:
|
||||
# # 日志保存路径
|
||||
# path: /zt/log
|
||||
#spring:
|
||||
# flyway:
|
||||
# # 启动flyway migration, 默认为true
|
||||
# enabled: false
|
||||
# datasource:
|
||||
# dynamic:
|
||||
# druid:
|
||||
# filters: stat,log4j2
|
||||
# datasource:
|
||||
# master:
|
||||
# url: jdbc:dm://10.75.51.82:5238?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
||||
# username: businesscenter
|
||||
# password: 6842568689469adad597d144ee104063
|
||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||
#savefile:
|
||||
# # 文件保存路径
|
||||
# path: /zt/file
|
||||
#公司mysql
|
||||
#ax:
|
||||
# url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
#logging:
|
||||
# #日志级别 指定目录级别warn
|
||||
# level:
|
||||
# root: info
|
||||
# encodings: UTF-8
|
||||
# file:
|
||||
# # 日志保存路径
|
||||
# path: /home/webservice/zt/log
|
||||
#spring:
|
||||
# datasource:
|
||||
# dynamic:
|
||||
# datasource:
|
||||
# master:
|
||||
# url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
# username: root
|
||||
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
#savefile:
|
||||
# # 文件保存路径
|
||||
# path: /home/webservice/zt/file
|
||||
|
||||
|
||||
#公司服务器达梦
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /zt/log
|
||||
spring:
|
||||
flyway:
|
||||
# 启动flyway migration, 默认为true
|
||||
enabled: false
|
||||
datasource:
|
||||
dynamic:
|
||||
druid:
|
||||
filters: stat,log4j2
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:dm://ufidahz.com.cn:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
||||
username: hzyazt
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: dm.jdbc.driver.DmDriver
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /zt/file
|
||||
cbs8:
|
||||
appId: 1P4AGrpz
|
||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||
cbs_public_key: 0469146F06BF3B01236E84632441E826
|
||||
#电子回单下载临时存放位置
|
||||
elec_path: /zt/elecfile
|
||||
OA:
|
||||
data_source_code: yc_oa
|
|
@ -1,21 +0,0 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/ydc
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/ydc
|
|
@ -1,31 +0,0 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/yuecheng
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/xiangerlin/work/app/logs/yuecheng
|
||||
cbs8:
|
||||
appId: 1P4AGrpz
|
||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||
cbs_public_key: 0469146F06BF3B01236E84632441E826F3067A6B93BC3839C836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185
|
|
@ -1,23 +0,0 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: info
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: E:\yongansystem\log
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: E:\yongansystem\log
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -1,5 +1,5 @@
|
|||
server:
|
||||
port: 9999
|
||||
port: 8901
|
||||
servlet:
|
||||
context-path: /kangarooDataCenterV3
|
||||
localIP: 127.0.0.1
|
||||
|
@ -93,7 +93,7 @@ mybatis-plus:
|
|||
db-config:
|
||||
id-type: auto # 主键策略
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
url: http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
#JimuReport[minidao配置]
|
||||
minidao :
|
||||
base-package: org.jeecg.modules.jmreport.desreport.dao*
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>NingboBankPlugin</id>
|
||||
<name>宁波银行财资大管家插件</name>
|
||||
<category>202407250001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="payBillPluginInitializerDaoImpl" class="com.hzya.frame.plugin.a8bill.dao.impl.PayBillPluginInitializerDaoImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="accLogPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.AccLogPluginInitializer" />
|
||||
<bean name="ningboBankPayPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.NingboBankPayPluginInitializer" />
|
||||
<bean name="ningboBankPayResultPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.NingboBankPayResultPluginInitializer" />
|
||||
<bean name="ningboBankTTPayPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.NingboBankTTPayPluginInitializer" />
|
||||
<bean name="ningboBankTTPayResultPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.NingboBankTTPayResultPluginInitializer" />
|
||||
<bean name="payReqSyncU8CPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.PayReqSyncU8CPluginInitializer" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="ningboBankPluginServiceImpl" class="com.hzya.frame.plugin.a8bill.service.impl.NingboBankPluginServiceImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>OaReceiptPlugin</id>
|
||||
<name>OaReceiptPlugin插件</name>
|
||||
<category>90000026</category>
|
||||
</plugin>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="oaReceiptCustomerDao" class="com.hzya.frame.plugin.oaReceipt.dao.impl.OaReceiptDaoImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="oaReceiptCustomerInitializer" class="com.hzya.frame.plugin.oaReceipt.plugin.OaReceiptPluginInitializer" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="oaReceiptCustomerService" class="com.hzya.frame.plugin.oaReceipt.service.impl.OaReceiptServiceImpl" />
|
||||
</beans>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>SalesBillingPlugin</id>
|
||||
<name>u8c插件</name>
|
||||
<category>202408020001</category>
|
||||
</plugin>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="SalesBillingPluginInitializer" class="com.hzya.frame.plugin.u8c.plugin.SalesBillingPluginInitializer" />
|
||||
<bean name="SaleConPluginInitializer1" class="com.hzya.frame.plugin.u8c.plugin.SaleConPluginInitializer" />
|
||||
</beans>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="salesBillingServiceImpl" class="com.hzya.frame.plugin.u8c.service.impl.SalesBillingServiceImpl" />
|
||||
</beans>
|
|
@ -1,6 +1,8 @@
|
|||
package com.hzya.frame;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
@ -12,6 +14,11 @@ import com.hzya.frame.cbs8.service.ICbs8ExtService;
|
|||
import com.hzya.frame.cbs8.service.ICbs8Service;
|
||||
import com.hzya.frame.cbs8.util.CBSUtil;
|
||||
import com.hzya.frame.cbs8.util.CbsAccessToken;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.req.AccTransactionReq;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.res.AccTransactionRes;
|
||||
import com.hzya.frame.ningboBankTreasury.service.INingboBankTreasuryService;
|
||||
import com.hzya.frame.ningboBankTreasury.util.NingboBankUtil;
|
||||
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
|
||||
import com.hzya.frame.plugin.cbs8.plugin.PayApplyPluginInitializer;
|
||||
import com.hzya.frame.plugin.cbs8.plugin.PayResultPluginInitializer;
|
||||
import com.hzya.frame.plugin.cbs8.plugin.TransactionDetailPluginInitializer;
|
||||
|
@ -21,23 +28,17 @@ import com.hzya.frame.seeyon.cbs8.service.IPaymentService;
|
|||
import com.hzya.frame.stringutil.StringUtil;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.util.AESUtil;
|
||||
import com.mongodb.client.result.UpdateResult;
|
||||
import com.nbcb.sdk.OpenSDK;
|
||||
import com.nbcb.sdk.aes.param.ConfigParam;
|
||||
import org.apache.http.protocol.HTTP;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.data.mongodb.core.query.Update;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
@ -65,8 +66,59 @@ public class temButtom {
|
|||
private TransactionDetailPluginInitializer transactionDetailPluginInitializer;
|
||||
@Autowired
|
||||
private PayResultPluginInitializer payResultPluginInitializer;
|
||||
@Resource
|
||||
private INingboBankTreasuryService ningboxService;
|
||||
|
||||
@Autowired
|
||||
private INingboBankPluginService ningboBankPluginService;
|
||||
|
||||
@Test
|
||||
public void updateU8CTest(){
|
||||
try {
|
||||
//ningboBankPluginService.updateU8CStatus("FK2409190002","001","3");
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
System.out.println("执行完成");
|
||||
}
|
||||
@Test
|
||||
public void fileUploadTest(){
|
||||
ningboBankPluginService.fileUpload("-3984312850527925899");
|
||||
}
|
||||
@Test
|
||||
public void fileUpload() {
|
||||
try {
|
||||
JSONObject data = new JSONObject();
|
||||
String filePath = "/Users/xiangerlin/Downloads/测试附件.xlsx";
|
||||
File file = new File(filePath);
|
||||
byte[] bytes = IoUtil.readBytes(FileUtil.getInputStream(file));
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("channelNo","open-filegateway");
|
||||
params.put("fileName","测试附件.xlsx");
|
||||
params.put("bytes",bytes);
|
||||
ConfigParam configParam = new ConfigParam("MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgTt6OadouxxxSDg/0SZdOIBqtnFGKrpwmL+quEUf+hfSgCgYIKoEcz1UBgi2hRANCAAQGHNN2NO7btp+w1248yk98E0asGC8sG0bmIzdom4M0xp3vc4IfXjmZ8omUz4oVcjzAuyMSSpJM6uPLcU1SH4HZ","http://cz-test.nbcb.com.cn:7070/nbcb/api","54b3e05c-7983-4e6c-8920-f9ab8a0004a6","MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEXAt6fxeKlpREIyXoT3jDwGU7L6JkKrzdOKP1cMB14rtNwwlyaUGLrtuHVoArAHP3x7XN2rUw0GxSngYQwOAsjQ==",10000,20000);
|
||||
OpenSDK.dynamicInit(configParam,true);
|
||||
data.put("Data",JSONObject.toJSONString(params));
|
||||
System.out.println("附件上传请求参数:"+data.toString());
|
||||
String returnData = OpenSDK.send("tms", "fileUpload",data.toString());
|
||||
System.out.println(returnData);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
@Test
|
||||
public void accDetailTest(){
|
||||
AccTransactionReq accTransactionReq = new AccTransactionReq();
|
||||
accTransactionReq.setBeginDate("2024-07-01");
|
||||
accTransactionReq.setEndDate("2024-07-30");
|
||||
accTransactionReq.setPageSize("10");
|
||||
accTransactionReq.setCustId("0000112058");
|
||||
//accTransactionReq.setBankAccList(Convert.toList(String.class,"86041110000110293,86041110000109337,6223160030547665,6214180002001411023,6214180000002609736"));
|
||||
accTransactionReq.setBankAccList(Convert.toList(String.class,"86041110000110293,86041110000109337,6223160030547665,6214180002001411023,6214180000002609736"));
|
||||
List<AccTransactionRes> list = ningboxService.queryAccDetails(accTransactionReq);
|
||||
System.out.println("查询到的条数"+list.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cbs8PluginTest(){
|
||||
|
@ -184,109 +236,7 @@ public class temButtom {
|
|||
System.out.println(b);
|
||||
}
|
||||
|
||||
@Resource
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
@Test
|
||||
public void mongodbTest() {
|
||||
boolean flag = true;
|
||||
TestUser testUser = new TestUser("1","张三","U001");
|
||||
for (int i = 0; i < 20; i++) {
|
||||
int a = i+4;
|
||||
TestUser user = new TestUser(String.valueOf(a),"张三"+a,"U00"+a);
|
||||
//mongoTemplate.insert(user,"user");
|
||||
}
|
||||
//新增数据
|
||||
//mongoTemplate.insert(testUser,"user");
|
||||
System.out.println(testUser.toString());
|
||||
|
||||
|
||||
//新增或修改数据
|
||||
testUser.setName("李四");
|
||||
//mongoTemplate.save(testUser,"user");
|
||||
System.out.println(testUser.toString());
|
||||
|
||||
//批量新增
|
||||
TestUser testUser1 = new TestUser("2","王武","U002");
|
||||
TestUser testUser2 = new TestUser("3","赵六","U003");
|
||||
List<TestUser> testUsers = new ArrayList<>();
|
||||
testUsers.add(testUser1);
|
||||
testUsers.add(testUser2);
|
||||
//mongoTemplate.insert(testUsers,"user");
|
||||
|
||||
//修改数据
|
||||
Query query= new Query(Criteria.where("id").is(testUser1.getId()));
|
||||
//更新值
|
||||
Update update= new Update().set("name", testUser1.getName()+"up").set("code", testUser1.getCode());
|
||||
//更新查询满足条件的文档数据(全部)
|
||||
//UpdateResult result = mongoTemplate.updateMulti(query, update, TestUser.class,"user");
|
||||
//if(result!=null){
|
||||
// System.out.println("更新条数:" + result.getMatchedCount());
|
||||
//}
|
||||
|
||||
//删除数据
|
||||
Query query1 = new Query(Criteria.where("_id").is(testUser1.getId()));
|
||||
//List<TestUser> result1= mongoTemplate.findAllAndRemove(query1, TestUser.class,"user");
|
||||
//System.out.println("删除的文档数据:" + result1.toString());
|
||||
|
||||
//查询所有
|
||||
//List<TestUser> list = mongoTemplate.findAll(TestUser.class, "user");
|
||||
//System.out.println(list.toString());
|
||||
|
||||
|
||||
//根据id查询,注意是文档的id,不是数据行的id
|
||||
//TestUser result2 = mongoTemplate.findById("1", TestUser.class,"user");
|
||||
//System.out.println("查询结果:" + result2.toString());
|
||||
|
||||
//查询一条数据
|
||||
Query query2 = new Query(Criteria.where("name").is("赵六"));
|
||||
TestUser result3 = mongoTemplate.findOne(query2, TestUser.class,"user");
|
||||
System.out.println("查询结果:" + result3.toString());
|
||||
|
||||
//模糊查询
|
||||
Query query9 = new Query(Criteria.where("name").regex("张三"));
|
||||
List<TestUser> result9 = mongoTemplate.find(query9, TestUser.class,"user");
|
||||
System.out.println("查询结果:" + result9.toString());
|
||||
//查询列表单个查询条件
|
||||
Query query4 = new Query(Criteria.where("name").is(testUser.getName()));
|
||||
List<TestUser> result4 = mongoTemplate.find(query4, TestUser.class,"user");
|
||||
System.out.println("查询结果:" + result4.toString());
|
||||
|
||||
// 查询列表多个查询条件
|
||||
Criteria criteriaUserName = Criteria.where("name").is(testUser.getName());
|
||||
Criteria criteriaPassWord = Criteria.where("code").is(testUser.getCode());
|
||||
// 创建条件对象,将上面条件进行 AND 关联
|
||||
Criteria criteria = new Criteria().andOperator(criteriaUserName, criteriaPassWord);
|
||||
// 创建查询对象,然后将条件对象添加到其中
|
||||
Query query5 = new Query(criteria);
|
||||
List<TestUser> result5 = mongoTemplate.find(query5, TestUser.class,"user");
|
||||
System.out.println("查询结果:" + result5.toString());
|
||||
|
||||
// 创建条件对象,将上面条件进行 OR 关联
|
||||
Criteria criteria1 = new Criteria().orOperator(criteriaUserName, criteriaPassWord);
|
||||
// 创建查询对象,然后将条件对象添加到其中
|
||||
Query query6 = new Query(criteria1);
|
||||
List<TestUser> result6 = mongoTemplate.find(query6, TestUser.class,"user");
|
||||
System.out.println("查询结果:" + result6.toString());
|
||||
|
||||
// 创建条件对象条件进行 in 关联
|
||||
List<String> ids = Arrays.asList("1", "2");
|
||||
// 创建条件
|
||||
Criteria criteria7 = Criteria.where("id").in(ids);
|
||||
// 创建查询对象,然后将条件对象添加到其中
|
||||
Query query7 = new Query(criteria7);
|
||||
List<TestUser> result7 = mongoTemplate.find(query7, TestUser.class,"user");
|
||||
System.out.println("查询结果:" + result7.toString());
|
||||
|
||||
//从第一行开始,查询2条数据返回
|
||||
Query query8 = new Query(Criteria.where("name").is(testUser.getName())).with(Sort.by("code")).limit(2).skip(0);
|
||||
List<TestUser> result8 = mongoTemplate.find(query8, TestUser.class,"user");
|
||||
System.out.println("查询结果:" + result8.toString());
|
||||
|
||||
Query query10 = new Query(Criteria.where("name").is(testUser.getName()));
|
||||
long count = mongoTemplate.count(query10,"user");
|
||||
System.out.println("统计结果:" + count);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ public class GroovyUtil {
|
|||
logger.info("创建newInstance失败:"+ e);
|
||||
throw new BaseSystemException(e);
|
||||
}
|
||||
logger.info("开始执行脚本:"+parameterJson);
|
||||
Object returnObj = groovyObject.invokeMethod("execute",parameterJson);
|
||||
logger.info("执行脚本结束:"+returnObj);
|
||||
return returnObj;
|
||||
|
|
|
@ -22,7 +22,7 @@ public class BipUtil {
|
|||
*/
|
||||
|
||||
public static String sendU9cTOBipEsb(String parm, String apiCode,String token){
|
||||
String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
String baseUrl = "http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
System.out.println("推送参数"+parm);
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800023")//头信息,多个头信息多次调用此方法即可
|
||||
|
@ -40,7 +40,7 @@ public class BipUtil {
|
|||
return null;
|
||||
}
|
||||
public static String getBipToken(String userCode, String apiCode){
|
||||
String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
String baseUrl = "http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800023")//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
|
@ -58,6 +58,24 @@ public class BipUtil {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
public static String sendOaToU8c(String parm, String apiCode){
|
||||
String baseUrl = "http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
System.out.println("推送参数"+parm);
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800035")//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYATW/MfYZX7zF0eAh4DJXbyTLwUtwSoSz5Y/o1ksAaN/dCe7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "+5BUkLQh3iX3VHgEt5bE2IPh+ZeebGvDaEspsvVu739Ar6sFnwg+fpPod4t6XhoTj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body(parm)//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
System.out.println("返回参数"+result);
|
||||
if(StrUtil.isNotEmpty(result)){
|
||||
return analytic(result);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String analytic(String parm){
|
||||
JSONObject main = JSON.parseObject(parm);
|
||||
return main.getString("attribute");
|
||||
|
|
|
@ -985,20 +985,20 @@ where id = #{id}
|
|||
<when test="item.connectionSymbol == '1'.toString() ">
|
||||
<choose>
|
||||
<when test="item.rightParenthesis == ')'.toString() ">
|
||||
${item.rightParenthesis} and
|
||||
${item.rightParenthesis}
|
||||
</when>
|
||||
<otherwise>
|
||||
${item.rightParenthesis}
|
||||
${item.rightParenthesis} and
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
<when test="item.connectionSymbol == '2'.toString() ">
|
||||
<choose>
|
||||
<when test="item.rightParenthesis == ')'.toString() ">
|
||||
${item.rightParenthesis} or
|
||||
${item.rightParenthesis}
|
||||
</when>
|
||||
<otherwise>
|
||||
${item.rightParenthesis}
|
||||
${item.rightParenthesis} or
|
||||
</otherwise>
|
||||
</choose>
|
||||
</when>
|
||||
|
|
|
@ -0,0 +1,190 @@
|
|||
package com.hzya.frame.ningboBankTreasury.dto.req;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 交易明细查询请求参数
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/24 17:52
|
||||
**/
|
||||
public class AccTransactionReq {
|
||||
|
||||
//客户号 必填
|
||||
private String custId;
|
||||
//账号列表 每次对多1000个账号 必填
|
||||
private List<String> bankAccList;
|
||||
//增量查询标识,0增量查询 1全量查询
|
||||
private String queryFlag;
|
||||
//增量查询起始时间 yyyy-MM-dd HH:mm:ss
|
||||
private String recTime;
|
||||
//开始日期 yyyy-MM-dd
|
||||
private String beginDate;
|
||||
//结束日期 yyyy-MM-dd
|
||||
private String endDate;
|
||||
//起始金额
|
||||
private String beginAmt;
|
||||
//终止金额
|
||||
private String endAmt;
|
||||
//收支方向 0收入 1支出
|
||||
private String cdSign;
|
||||
//每页条数
|
||||
private String pageSize;
|
||||
//当前页数
|
||||
private String currentPage;
|
||||
//查询方式 0分页查询 1下载文件查询
|
||||
private String queryType;
|
||||
//账户标识 0统计助手 1实体账户
|
||||
private String bankAccSign;//
|
||||
//排序方式,asc正序 desc倒序
|
||||
private String sortType;
|
||||
//单账号当日明细最大序号
|
||||
private String singleAccTodayMaxOrderNo;
|
||||
//币种编码
|
||||
private String curCode;
|
||||
//统计编号
|
||||
private List<String> subBankAccList;
|
||||
|
||||
public String getCustId() {
|
||||
return custId;
|
||||
}
|
||||
|
||||
public void setCustId(String custId) {
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
public List<String> getBankAccList() {
|
||||
return bankAccList;
|
||||
}
|
||||
|
||||
public void setBankAccList(List<String> bankAccList) {
|
||||
this.bankAccList = bankAccList;
|
||||
}
|
||||
|
||||
public String getQueryFlag() {
|
||||
return queryFlag;
|
||||
}
|
||||
|
||||
public void setQueryFlag(String queryFlag) {
|
||||
this.queryFlag = queryFlag;
|
||||
}
|
||||
|
||||
public String getRecTime() {
|
||||
return recTime;
|
||||
}
|
||||
|
||||
public void setRecTime(String recTime) {
|
||||
this.recTime = recTime;
|
||||
}
|
||||
|
||||
public String getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(String beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getBeginAmt() {
|
||||
return beginAmt;
|
||||
}
|
||||
|
||||
public void setBeginAmt(String beginAmt) {
|
||||
this.beginAmt = beginAmt;
|
||||
}
|
||||
|
||||
public String getEndAmt() {
|
||||
return endAmt;
|
||||
}
|
||||
|
||||
public void setEndAmt(String endAmt) {
|
||||
this.endAmt = endAmt;
|
||||
}
|
||||
|
||||
public String getCdSign() {
|
||||
return cdSign;
|
||||
}
|
||||
|
||||
public void setCdSign(String cdSign) {
|
||||
this.cdSign = cdSign;
|
||||
}
|
||||
|
||||
public String getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(String pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public String getCurrentPage() {
|
||||
return currentPage;
|
||||
}
|
||||
|
||||
public void setCurrentPage(String currentPage) {
|
||||
this.currentPage = currentPage;
|
||||
}
|
||||
|
||||
public String getQueryType() {
|
||||
return queryType;
|
||||
}
|
||||
|
||||
public void setQueryType(String queryType) {
|
||||
this.queryType = queryType;
|
||||
}
|
||||
|
||||
public String getBankAccSign() {
|
||||
return bankAccSign;
|
||||
}
|
||||
|
||||
public void setBankAccSign(String bankAccSign) {
|
||||
this.bankAccSign = bankAccSign;
|
||||
}
|
||||
|
||||
public String getSortType() {
|
||||
return sortType;
|
||||
}
|
||||
|
||||
public void setSortType(String sortType) {
|
||||
this.sortType = sortType;
|
||||
}
|
||||
|
||||
public String getSingleAccTodayMaxOrderNo() {
|
||||
return singleAccTodayMaxOrderNo;
|
||||
}
|
||||
|
||||
public void setSingleAccTodayMaxOrderNo(String singleAccTodayMaxOrderNo) {
|
||||
this.singleAccTodayMaxOrderNo = singleAccTodayMaxOrderNo;
|
||||
}
|
||||
|
||||
public String getCurCode() {
|
||||
return curCode;
|
||||
}
|
||||
|
||||
public void setCurCode(String curCode) {
|
||||
this.curCode = curCode;
|
||||
}
|
||||
|
||||
public List<String> getSubBankAccList() {
|
||||
return subBankAccList;
|
||||
}
|
||||
|
||||
public void setSubBankAccList(List<String> subBankAccList) {
|
||||
this.subBankAccList = subBankAccList;
|
||||
}
|
||||
public AccTransactionReq() {
|
||||
|
||||
}
|
||||
|
||||
public AccTransactionReq(String custId, List<String> bankAccList) {
|
||||
this.custId = custId;
|
||||
this.bankAccList = bankAccList;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,209 @@
|
|||
package com.hzya.frame.ningboBankTreasury.dto.req;
|
||||
|
||||
/**
|
||||
* @Description 单笔转账请求参数
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/26 16:27
|
||||
**/
|
||||
public class SingleTransferReq {
|
||||
//客户号 必填
|
||||
private String custId;
|
||||
//付款账号 必填
|
||||
private String payAcc;
|
||||
//用途 必填,长度不能超过70
|
||||
private String purpose;
|
||||
//收款账号 必填
|
||||
private String rcvAcc;
|
||||
//收款方行名 和联行号二者必须填一个
|
||||
private String rcvBankName;
|
||||
//收款方联行号 对公支付必填
|
||||
private String rcvBankNo;
|
||||
//金额 必填
|
||||
private String amt;
|
||||
//同城异地标识 0同城 1异地
|
||||
private String areaSign;
|
||||
//单位代码 必填
|
||||
private String corpCode;
|
||||
//是否同行转账 0他行 1同行
|
||||
private String difBank;
|
||||
//交易流水号
|
||||
private String serialNo;
|
||||
//对公对私标识 0对公 1对丝
|
||||
private String isForIndividual;
|
||||
//是否预约支付 0非预约 1预约
|
||||
private String isSubscribe;
|
||||
//是否短信通知收款人 0不通知 1通知,只支持宁波银行付款的情况
|
||||
private String isTellRcv;
|
||||
//收款方手机号
|
||||
private String rcvMobile;
|
||||
//收款户名
|
||||
private String rcvName;
|
||||
//备注
|
||||
private String remark;
|
||||
//预约转账时间
|
||||
private String wishPayTime;
|
||||
//支付方式 0直接付款 1代理支付 2联动支付 3自动请款 ,为空时默认直接付款
|
||||
private String payType;
|
||||
//代理/联动账号/拨款账号
|
||||
private String remarkAcc;
|
||||
|
||||
public String getCustId() {
|
||||
return custId;
|
||||
}
|
||||
|
||||
public void setCustId(String custId) {
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
public String getPayAcc() {
|
||||
return payAcc;
|
||||
}
|
||||
|
||||
public void setPayAcc(String payAcc) {
|
||||
this.payAcc = payAcc;
|
||||
}
|
||||
|
||||
public String getPurpose() {
|
||||
return purpose;
|
||||
}
|
||||
|
||||
public void setPurpose(String purpose) {
|
||||
this.purpose = purpose;
|
||||
}
|
||||
|
||||
public String getRcvAcc() {
|
||||
return rcvAcc;
|
||||
}
|
||||
|
||||
public void setRcvAcc(String rcvAcc) {
|
||||
this.rcvAcc = rcvAcc;
|
||||
}
|
||||
|
||||
public String getRcvBankName() {
|
||||
return rcvBankName;
|
||||
}
|
||||
|
||||
public void setRcvBankName(String rcvBankName) {
|
||||
this.rcvBankName = rcvBankName;
|
||||
}
|
||||
|
||||
public String getRcvBankNo() {
|
||||
return rcvBankNo;
|
||||
}
|
||||
|
||||
public void setRcvBankNo(String rcvBankNo) {
|
||||
this.rcvBankNo = rcvBankNo;
|
||||
}
|
||||
|
||||
public String getAmt() {
|
||||
return amt;
|
||||
}
|
||||
|
||||
public void setAmt(String amt) {
|
||||
this.amt = amt;
|
||||
}
|
||||
|
||||
public String getAreaSign() {
|
||||
return areaSign;
|
||||
}
|
||||
|
||||
public void setAreaSign(String areaSign) {
|
||||
this.areaSign = areaSign;
|
||||
}
|
||||
|
||||
public String getCorpCode() {
|
||||
return corpCode;
|
||||
}
|
||||
|
||||
public void setCorpCode(String corpCode) {
|
||||
this.corpCode = corpCode;
|
||||
}
|
||||
|
||||
public String getDifBank() {
|
||||
return difBank;
|
||||
}
|
||||
|
||||
public void setDifBank(String difBank) {
|
||||
this.difBank = difBank;
|
||||
}
|
||||
|
||||
public String getSerialNo() {
|
||||
return serialNo;
|
||||
}
|
||||
|
||||
public void setSerialNo(String serialNo) {
|
||||
this.serialNo = serialNo;
|
||||
}
|
||||
|
||||
public String getIsForIndividual() {
|
||||
return isForIndividual;
|
||||
}
|
||||
|
||||
public void setIsForIndividual(String isForIndividual) {
|
||||
this.isForIndividual = isForIndividual;
|
||||
}
|
||||
|
||||
public String getIsSubscribe() {
|
||||
return isSubscribe;
|
||||
}
|
||||
|
||||
public void setIsSubscribe(String isSubscribe) {
|
||||
this.isSubscribe = isSubscribe;
|
||||
}
|
||||
|
||||
public String getIsTellRcv() {
|
||||
return isTellRcv;
|
||||
}
|
||||
|
||||
public void setIsTellRcv(String isTellRcv) {
|
||||
this.isTellRcv = isTellRcv;
|
||||
}
|
||||
|
||||
public String getRcvMobile() {
|
||||
return rcvMobile;
|
||||
}
|
||||
|
||||
public void setRcvMobile(String rcvMobile) {
|
||||
this.rcvMobile = rcvMobile;
|
||||
}
|
||||
|
||||
public String getRcvName() {
|
||||
return rcvName;
|
||||
}
|
||||
|
||||
public void setRcvName(String rcvName) {
|
||||
this.rcvName = rcvName;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getWishPayTime() {
|
||||
return wishPayTime;
|
||||
}
|
||||
|
||||
public void setWishPayTime(String wishPayTime) {
|
||||
this.wishPayTime = wishPayTime;
|
||||
}
|
||||
|
||||
public String getPayType() {
|
||||
return payType;
|
||||
}
|
||||
|
||||
public void setPayType(String payType) {
|
||||
this.payType = payType;
|
||||
}
|
||||
|
||||
public String getRemarkAcc() {
|
||||
return remarkAcc;
|
||||
}
|
||||
|
||||
public void setRemarkAcc(String remarkAcc) {
|
||||
this.remarkAcc = remarkAcc;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,390 @@
|
|||
package com.hzya.frame.ningboBankTreasury.dto.req;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description T/T汇款提交
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/8/1 17:14
|
||||
**/
|
||||
public class TTRemitReq {
|
||||
private String custId;
|
||||
private String serialNo;
|
||||
private String remitType;
|
||||
private String transferType;
|
||||
private String corpCode;
|
||||
private String remitAddress;
|
||||
private String bankType;
|
||||
private String payMode;
|
||||
private String estimateDate;
|
||||
private String remitCurCode;
|
||||
private String smallCurCode;
|
||||
private String totalAmt;
|
||||
private String transAmt;
|
||||
private String subTransCode;
|
||||
private String goods;
|
||||
private String transAmt2;
|
||||
private String subTransCode2;
|
||||
private String goods2;
|
||||
private String remitAcc;
|
||||
private String curRemitAmt;
|
||||
private String remitAcc2;
|
||||
private String curRemitAmt2;
|
||||
private String curRemitAmt3;
|
||||
private String remitAcc3;
|
||||
private String isAgent;
|
||||
private String agentAcc;
|
||||
private String agentBankSwiftCode;
|
||||
private String rcvSettleType;
|
||||
private String rcvBankCode;
|
||||
private String rcvCountryCode;
|
||||
private String rcvName;
|
||||
private String rcvAddress;
|
||||
private String rcvAcc;
|
||||
private String costPayer;
|
||||
private String costAcc;
|
||||
private String isFullPay;
|
||||
private String paymentProp;
|
||||
private String contacts;
|
||||
private String contactPhone;
|
||||
private String payUnderFreeTax;
|
||||
//private List<ContractDetail> contractDtlList;
|
||||
private String postscript;
|
||||
private List<String> fileUploadCodes;
|
||||
|
||||
public String getCustId() {
|
||||
return custId;
|
||||
}
|
||||
|
||||
public void setCustId(String custId) {
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
public String getSerialNo() {
|
||||
return serialNo;
|
||||
}
|
||||
|
||||
public void setSerialNo(String serialNo) {
|
||||
this.serialNo = serialNo;
|
||||
}
|
||||
|
||||
public String getRemitType() {
|
||||
return remitType;
|
||||
}
|
||||
|
||||
public void setRemitType(String remitType) {
|
||||
this.remitType = remitType;
|
||||
}
|
||||
|
||||
public String getTransferType() {
|
||||
return transferType;
|
||||
}
|
||||
|
||||
public void setTransferType(String transferType) {
|
||||
this.transferType = transferType;
|
||||
}
|
||||
|
||||
public String getCorpCode() {
|
||||
return corpCode;
|
||||
}
|
||||
|
||||
public void setCorpCode(String corpCode) {
|
||||
this.corpCode = corpCode;
|
||||
}
|
||||
|
||||
public String getRemitAddress() {
|
||||
return remitAddress;
|
||||
}
|
||||
|
||||
public void setRemitAddress(String remitAddress) {
|
||||
this.remitAddress = remitAddress;
|
||||
}
|
||||
|
||||
public String getBankType() {
|
||||
return bankType;
|
||||
}
|
||||
|
||||
public void setBankType(String bankType) {
|
||||
this.bankType = bankType;
|
||||
}
|
||||
|
||||
public String getPayMode() {
|
||||
return payMode;
|
||||
}
|
||||
|
||||
public void setPayMode(String payMode) {
|
||||
this.payMode = payMode;
|
||||
}
|
||||
|
||||
public String getEstimateDate() {
|
||||
return estimateDate;
|
||||
}
|
||||
|
||||
public void setEstimateDate(String estimateDate) {
|
||||
this.estimateDate = estimateDate;
|
||||
}
|
||||
|
||||
public String getRemitCurCode() {
|
||||
return remitCurCode;
|
||||
}
|
||||
|
||||
public void setRemitCurCode(String remitCurCode) {
|
||||
this.remitCurCode = remitCurCode;
|
||||
}
|
||||
|
||||
public String getSmallCurCode() {
|
||||
return smallCurCode;
|
||||
}
|
||||
|
||||
public void setSmallCurCode(String smallCurCode) {
|
||||
this.smallCurCode = smallCurCode;
|
||||
}
|
||||
|
||||
public String getTotalAmt() {
|
||||
return totalAmt;
|
||||
}
|
||||
|
||||
public void setTotalAmt(String totalAmt) {
|
||||
this.totalAmt = totalAmt;
|
||||
}
|
||||
|
||||
public String getTransAmt() {
|
||||
return transAmt;
|
||||
}
|
||||
|
||||
public void setTransAmt(String transAmt) {
|
||||
this.transAmt = transAmt;
|
||||
}
|
||||
|
||||
public String getSubTransCode() {
|
||||
return subTransCode;
|
||||
}
|
||||
|
||||
public void setSubTransCode(String subTransCode) {
|
||||
this.subTransCode = subTransCode;
|
||||
}
|
||||
|
||||
public String getGoods() {
|
||||
return goods;
|
||||
}
|
||||
|
||||
public void setGoods(String goods) {
|
||||
this.goods = goods;
|
||||
}
|
||||
|
||||
public String getTransAmt2() {
|
||||
return transAmt2;
|
||||
}
|
||||
|
||||
public void setTransAmt2(String transAmt2) {
|
||||
this.transAmt2 = transAmt2;
|
||||
}
|
||||
|
||||
public String getSubTransCode2() {
|
||||
return subTransCode2;
|
||||
}
|
||||
|
||||
public void setSubTransCode2(String subTransCode2) {
|
||||
this.subTransCode2 = subTransCode2;
|
||||
}
|
||||
|
||||
public String getGoods2() {
|
||||
return goods2;
|
||||
}
|
||||
|
||||
public void setGoods2(String goods2) {
|
||||
this.goods2 = goods2;
|
||||
}
|
||||
|
||||
public String getRemitAcc() {
|
||||
return remitAcc;
|
||||
}
|
||||
|
||||
public void setRemitAcc(String remitAcc) {
|
||||
this.remitAcc = remitAcc;
|
||||
}
|
||||
|
||||
public String getCurRemitAmt() {
|
||||
return curRemitAmt;
|
||||
}
|
||||
|
||||
public void setCurRemitAmt(String curRemitAmt) {
|
||||
this.curRemitAmt = curRemitAmt;
|
||||
}
|
||||
|
||||
public String getRemitAcc2() {
|
||||
return remitAcc2;
|
||||
}
|
||||
|
||||
public void setRemitAcc2(String remitAcc2) {
|
||||
this.remitAcc2 = remitAcc2;
|
||||
}
|
||||
|
||||
public String getCurRemitAmt2() {
|
||||
return curRemitAmt2;
|
||||
}
|
||||
|
||||
public void setCurRemitAmt2(String curRemitAmt2) {
|
||||
this.curRemitAmt2 = curRemitAmt2;
|
||||
}
|
||||
|
||||
public String getCurRemitAmt3() {
|
||||
return curRemitAmt3;
|
||||
}
|
||||
|
||||
public void setCurRemitAmt3(String curRemitAmt3) {
|
||||
this.curRemitAmt3 = curRemitAmt3;
|
||||
}
|
||||
|
||||
public String getRemitAcc3() {
|
||||
return remitAcc3;
|
||||
}
|
||||
|
||||
public void setRemitAcc3(String remitAcc3) {
|
||||
this.remitAcc3 = remitAcc3;
|
||||
}
|
||||
|
||||
public String getIsAgent() {
|
||||
return isAgent;
|
||||
}
|
||||
|
||||
public void setIsAgent(String isAgent) {
|
||||
this.isAgent = isAgent;
|
||||
}
|
||||
|
||||
public String getAgentAcc() {
|
||||
return agentAcc;
|
||||
}
|
||||
|
||||
public void setAgentAcc(String agentAcc) {
|
||||
this.agentAcc = agentAcc;
|
||||
}
|
||||
|
||||
public String getAgentBankSwiftCode() {
|
||||
return agentBankSwiftCode;
|
||||
}
|
||||
|
||||
public void setAgentBankSwiftCode(String agentBankSwiftCode) {
|
||||
this.agentBankSwiftCode = agentBankSwiftCode;
|
||||
}
|
||||
|
||||
public String getRcvSettleType() {
|
||||
return rcvSettleType;
|
||||
}
|
||||
|
||||
public void setRcvSettleType(String rcvSettleType) {
|
||||
this.rcvSettleType = rcvSettleType;
|
||||
}
|
||||
|
||||
public String getRcvBankCode() {
|
||||
return rcvBankCode;
|
||||
}
|
||||
|
||||
public void setRcvBankCode(String rcvBankCode) {
|
||||
this.rcvBankCode = rcvBankCode;
|
||||
}
|
||||
|
||||
public String getRcvCountryCode() {
|
||||
return rcvCountryCode;
|
||||
}
|
||||
|
||||
public void setRcvCountryCode(String rcvCountryCode) {
|
||||
this.rcvCountryCode = rcvCountryCode;
|
||||
}
|
||||
|
||||
public String getRcvName() {
|
||||
return rcvName;
|
||||
}
|
||||
|
||||
public void setRcvName(String rcvName) {
|
||||
this.rcvName = rcvName;
|
||||
}
|
||||
|
||||
public String getRcvAddress() {
|
||||
return rcvAddress;
|
||||
}
|
||||
|
||||
public void setRcvAddress(String rcvAddress) {
|
||||
this.rcvAddress = rcvAddress;
|
||||
}
|
||||
|
||||
public String getRcvAcc() {
|
||||
return rcvAcc;
|
||||
}
|
||||
|
||||
public void setRcvAcc(String rcvAcc) {
|
||||
this.rcvAcc = rcvAcc;
|
||||
}
|
||||
|
||||
public String getCostPayer() {
|
||||
return costPayer;
|
||||
}
|
||||
|
||||
public void setCostPayer(String costPayer) {
|
||||
this.costPayer = costPayer;
|
||||
}
|
||||
|
||||
public String getCostAcc() {
|
||||
return costAcc;
|
||||
}
|
||||
|
||||
public void setCostAcc(String costAcc) {
|
||||
this.costAcc = costAcc;
|
||||
}
|
||||
|
||||
public String getIsFullPay() {
|
||||
return isFullPay;
|
||||
}
|
||||
|
||||
public void setIsFullPay(String isFullPay) {
|
||||
this.isFullPay = isFullPay;
|
||||
}
|
||||
|
||||
public String getPaymentProp() {
|
||||
return paymentProp;
|
||||
}
|
||||
|
||||
public void setPaymentProp(String paymentProp) {
|
||||
this.paymentProp = paymentProp;
|
||||
}
|
||||
|
||||
public String getContacts() {
|
||||
return contacts;
|
||||
}
|
||||
|
||||
public void setContacts(String contacts) {
|
||||
this.contacts = contacts;
|
||||
}
|
||||
|
||||
public String getContactPhone() {
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getPayUnderFreeTax() {
|
||||
return payUnderFreeTax;
|
||||
}
|
||||
|
||||
public void setPayUnderFreeTax(String payUnderFreeTax) {
|
||||
this.payUnderFreeTax = payUnderFreeTax;
|
||||
}
|
||||
|
||||
public String getPostscript() {
|
||||
return postscript;
|
||||
}
|
||||
|
||||
public void setPostscript(String postscript) {
|
||||
this.postscript = postscript;
|
||||
}
|
||||
|
||||
public List<String> getFileUploadCodes() {
|
||||
return fileUploadCodes;
|
||||
}
|
||||
|
||||
public void setFileUploadCodes(List<String> fileUploadCodes) {
|
||||
this.fileUploadCodes = fileUploadCodes;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,472 @@
|
|||
package com.hzya.frame.ningboBankTreasury.dto.res;
|
||||
|
||||
/**
|
||||
* @Description 宁波银行 境内交易明细返回参数
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/24 16:53
|
||||
**/
|
||||
public class AccTransactionRes {
|
||||
//账号
|
||||
private String bankAcc;
|
||||
private String bankSubAcc;
|
||||
//户名
|
||||
private String accName;
|
||||
//开户行名
|
||||
private String bankName;
|
||||
//对方户名
|
||||
private String oppAccName;
|
||||
//对方账号
|
||||
private String oppAccNo;
|
||||
//对方开户行名
|
||||
private String oppAccBank;
|
||||
//收支方向 0支出 1支出
|
||||
private String cdSign;
|
||||
//业务类型 收、支、其他
|
||||
private String cdSignName;
|
||||
//交易金额
|
||||
private String amt;
|
||||
//明细余额
|
||||
private String bal;
|
||||
//时间
|
||||
private String transTime;
|
||||
//子流水号
|
||||
private String subSerialNo;
|
||||
//交易流水号
|
||||
private String serialNo;
|
||||
//币种编号
|
||||
private String curCode;
|
||||
//用途
|
||||
private String uses;
|
||||
//摘要
|
||||
private String abs;
|
||||
//回单匹配号
|
||||
private String voucherNo;
|
||||
//银行类别代码
|
||||
private String bifCode;
|
||||
//银行类别
|
||||
private String bankType;
|
||||
//对方银行类别
|
||||
private String oppBankType;
|
||||
//对公、对私标志 0对公 1对私
|
||||
private String isForIndividual;
|
||||
//流水号 这个字段是唯一的
|
||||
private String serialId;
|
||||
//银行交易流水号
|
||||
private String bankSerialId;
|
||||
//集团内交易
|
||||
private String groupTrans;
|
||||
//资金划拨
|
||||
private String capitalTrans;
|
||||
//交易备注
|
||||
private String postScript;
|
||||
private String accType;
|
||||
private String accTypeName;
|
||||
//现转标识
|
||||
private String cashTfrFlg;
|
||||
//国 开 行 所属 分 行号
|
||||
private String chinaDevelopBankNo;
|
||||
//国 开 行 所属 账号类型
|
||||
private String chinaDevelopAccType;
|
||||
//支付匹配号
|
||||
private String payBillCode;
|
||||
//业务基础订单号
|
||||
private String alipayBaseOrderNumber;
|
||||
//业务描述
|
||||
private String alipayBusinessDescription;
|
||||
//备注1
|
||||
private String labelValue1;
|
||||
private String labelValue2;
|
||||
private String labelValue3;
|
||||
private String labelValue4;
|
||||
private String downloadNo;
|
||||
//排序规则
|
||||
private String sortRule;
|
||||
//明细编码
|
||||
private String orderNo;
|
||||
//商品名称
|
||||
private String alipayTradeName;
|
||||
//回单匹配号
|
||||
private String matchCode;
|
||||
//回单个性化描述
|
||||
private String receiptInfo;
|
||||
//凭证号
|
||||
private String billNum;
|
||||
//明细更新时间
|
||||
private String recTime;
|
||||
|
||||
public String getBankAcc() {
|
||||
return bankAcc;
|
||||
}
|
||||
|
||||
public void setBankAcc(String bankAcc) {
|
||||
this.bankAcc = bankAcc;
|
||||
}
|
||||
|
||||
public String getBankSubAcc() {
|
||||
return bankSubAcc;
|
||||
}
|
||||
|
||||
public void setBankSubAcc(String bankSubAcc) {
|
||||
this.bankSubAcc = bankSubAcc;
|
||||
}
|
||||
|
||||
public String getAccName() {
|
||||
return accName;
|
||||
}
|
||||
|
||||
public void setAccName(String accName) {
|
||||
this.accName = accName;
|
||||
}
|
||||
|
||||
public String getBankName() {
|
||||
return bankName;
|
||||
}
|
||||
|
||||
public void setBankName(String bankName) {
|
||||
this.bankName = bankName;
|
||||
}
|
||||
|
||||
public String getOppAccNo() {
|
||||
return oppAccNo;
|
||||
}
|
||||
|
||||
public void setOppAccNo(String oppAccNo) {
|
||||
this.oppAccNo = oppAccNo;
|
||||
}
|
||||
|
||||
public String getOppAccBank() {
|
||||
return oppAccBank;
|
||||
}
|
||||
|
||||
public void setOppAccBank(String oppAccBank) {
|
||||
this.oppAccBank = oppAccBank;
|
||||
}
|
||||
|
||||
public String getCdSign() {
|
||||
return cdSign;
|
||||
}
|
||||
|
||||
public void setCdSign(String cdSign) {
|
||||
this.cdSign = cdSign;
|
||||
}
|
||||
|
||||
public String getCdSignName() {
|
||||
return cdSignName;
|
||||
}
|
||||
|
||||
public void setCdSignName(String cdSignName) {
|
||||
this.cdSignName = cdSignName;
|
||||
}
|
||||
|
||||
public String getAmt() {
|
||||
return amt;
|
||||
}
|
||||
|
||||
public void setAmt(String amt) {
|
||||
this.amt = amt;
|
||||
}
|
||||
|
||||
public String getBal() {
|
||||
return bal;
|
||||
}
|
||||
|
||||
public void setBal(String bal) {
|
||||
this.bal = bal;
|
||||
}
|
||||
|
||||
public String getTransTime() {
|
||||
return transTime;
|
||||
}
|
||||
|
||||
public void setTransTime(String transTime) {
|
||||
this.transTime = transTime;
|
||||
}
|
||||
|
||||
public String getSubSerialNo() {
|
||||
return subSerialNo;
|
||||
}
|
||||
|
||||
public void setSubSerialNo(String subSerialNo) {
|
||||
this.subSerialNo = subSerialNo;
|
||||
}
|
||||
|
||||
public String getSerialNo() {
|
||||
return serialNo;
|
||||
}
|
||||
|
||||
public void setSerialNo(String serialNo) {
|
||||
this.serialNo = serialNo;
|
||||
}
|
||||
|
||||
public String getCurCode() {
|
||||
return curCode;
|
||||
}
|
||||
|
||||
public void setCurCode(String curCode) {
|
||||
this.curCode = curCode;
|
||||
}
|
||||
|
||||
public String getUses() {
|
||||
return uses;
|
||||
}
|
||||
|
||||
public void setUses(String uses) {
|
||||
this.uses = uses;
|
||||
}
|
||||
|
||||
public String getAbs() {
|
||||
return abs;
|
||||
}
|
||||
|
||||
public void setAbs(String abs) {
|
||||
this.abs = abs;
|
||||
}
|
||||
|
||||
public String getVoucherNo() {
|
||||
return voucherNo;
|
||||
}
|
||||
|
||||
public void setVoucherNo(String voucherNo) {
|
||||
this.voucherNo = voucherNo;
|
||||
}
|
||||
|
||||
public String getBifCode() {
|
||||
return bifCode;
|
||||
}
|
||||
|
||||
public void setBifCode(String bifCode) {
|
||||
this.bifCode = bifCode;
|
||||
}
|
||||
|
||||
public String getBankType() {
|
||||
return bankType;
|
||||
}
|
||||
|
||||
public void setBankType(String bankType) {
|
||||
this.bankType = bankType;
|
||||
}
|
||||
|
||||
public String getOppBankType() {
|
||||
return oppBankType;
|
||||
}
|
||||
|
||||
public void setOppBankType(String oppBankType) {
|
||||
this.oppBankType = oppBankType;
|
||||
}
|
||||
|
||||
public String getIsForIndividual() {
|
||||
return isForIndividual;
|
||||
}
|
||||
|
||||
public void setIsForIndividual(String isForIndividual) {
|
||||
this.isForIndividual = isForIndividual;
|
||||
}
|
||||
|
||||
public String getSerialId() {
|
||||
return serialId;
|
||||
}
|
||||
|
||||
public void setSerialId(String serialId) {
|
||||
this.serialId = serialId;
|
||||
}
|
||||
|
||||
public String getBankSerialId() {
|
||||
return bankSerialId;
|
||||
}
|
||||
|
||||
public void setBankSerialId(String bankSerialId) {
|
||||
this.bankSerialId = bankSerialId;
|
||||
}
|
||||
|
||||
public String getGroupTrans() {
|
||||
return groupTrans;
|
||||
}
|
||||
|
||||
public void setGroupTrans(String groupTrans) {
|
||||
this.groupTrans = groupTrans;
|
||||
}
|
||||
|
||||
public String getCapitalTrans() {
|
||||
return capitalTrans;
|
||||
}
|
||||
|
||||
public void setCapitalTrans(String capitalTrans) {
|
||||
this.capitalTrans = capitalTrans;
|
||||
}
|
||||
|
||||
public String getPostScript() {
|
||||
return postScript;
|
||||
}
|
||||
|
||||
public void setPostScript(String postScript) {
|
||||
this.postScript = postScript;
|
||||
}
|
||||
|
||||
public String getAccType() {
|
||||
return accType;
|
||||
}
|
||||
|
||||
public void setAccType(String accType) {
|
||||
this.accType = accType;
|
||||
}
|
||||
|
||||
public String getAccTypeName() {
|
||||
return accTypeName;
|
||||
}
|
||||
|
||||
public void setAccTypeName(String accTypeName) {
|
||||
this.accTypeName = accTypeName;
|
||||
}
|
||||
|
||||
public String getCashTfrFlg() {
|
||||
return cashTfrFlg;
|
||||
}
|
||||
|
||||
public void setCashTfrFlg(String cashTfrFlg) {
|
||||
this.cashTfrFlg = cashTfrFlg;
|
||||
}
|
||||
|
||||
public String getChinaDevelopBankNo() {
|
||||
return chinaDevelopBankNo;
|
||||
}
|
||||
|
||||
public void setChinaDevelopBankNo(String chinaDevelopBankNo) {
|
||||
this.chinaDevelopBankNo = chinaDevelopBankNo;
|
||||
}
|
||||
|
||||
public String getChinaDevelopAccType() {
|
||||
return chinaDevelopAccType;
|
||||
}
|
||||
|
||||
public void setChinaDevelopAccType(String chinaDevelopAccType) {
|
||||
this.chinaDevelopAccType = chinaDevelopAccType;
|
||||
}
|
||||
|
||||
public String getPayBillCode() {
|
||||
return payBillCode;
|
||||
}
|
||||
|
||||
public void setPayBillCode(String payBillCode) {
|
||||
this.payBillCode = payBillCode;
|
||||
}
|
||||
|
||||
public String getAlipayBaseOrderNumber() {
|
||||
return alipayBaseOrderNumber;
|
||||
}
|
||||
|
||||
public void setAlipayBaseOrderNumber(String alipayBaseOrderNumber) {
|
||||
this.alipayBaseOrderNumber = alipayBaseOrderNumber;
|
||||
}
|
||||
|
||||
public String getAlipayBusinessDescription() {
|
||||
return alipayBusinessDescription;
|
||||
}
|
||||
|
||||
public void setAlipayBusinessDescription(String alipayBusinessDescription) {
|
||||
this.alipayBusinessDescription = alipayBusinessDescription;
|
||||
}
|
||||
|
||||
public String getLabelValue1() {
|
||||
return labelValue1;
|
||||
}
|
||||
|
||||
public void setLabelValue1(String labelValue1) {
|
||||
this.labelValue1 = labelValue1;
|
||||
}
|
||||
|
||||
public String getLabelValue2() {
|
||||
return labelValue2;
|
||||
}
|
||||
|
||||
public void setLabelValue2(String labelValue2) {
|
||||
this.labelValue2 = labelValue2;
|
||||
}
|
||||
|
||||
public String getLabelValue3() {
|
||||
return labelValue3;
|
||||
}
|
||||
|
||||
public void setLabelValue3(String labelValue3) {
|
||||
this.labelValue3 = labelValue3;
|
||||
}
|
||||
|
||||
public String getLabelValue4() {
|
||||
return labelValue4;
|
||||
}
|
||||
|
||||
public void setLabelValue4(String labelValue4) {
|
||||
this.labelValue4 = labelValue4;
|
||||
}
|
||||
|
||||
public String getDownloadNo() {
|
||||
return downloadNo;
|
||||
}
|
||||
|
||||
public void setDownloadNo(String downloadNo) {
|
||||
this.downloadNo = downloadNo;
|
||||
}
|
||||
|
||||
public String getSortRule() {
|
||||
return sortRule;
|
||||
}
|
||||
|
||||
public void setSortRule(String sortRule) {
|
||||
this.sortRule = sortRule;
|
||||
}
|
||||
|
||||
public String getOrderNo() {
|
||||
return orderNo;
|
||||
}
|
||||
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getAlipayTradeName() {
|
||||
return alipayTradeName;
|
||||
}
|
||||
|
||||
public void setAlipayTradeName(String alipayTradeName) {
|
||||
this.alipayTradeName = alipayTradeName;
|
||||
}
|
||||
|
||||
public String getMatchCode() {
|
||||
return matchCode;
|
||||
}
|
||||
|
||||
public void setMatchCode(String matchCode) {
|
||||
this.matchCode = matchCode;
|
||||
}
|
||||
|
||||
public String getReceiptInfo() {
|
||||
return receiptInfo;
|
||||
}
|
||||
|
||||
public void setReceiptInfo(String receiptInfo) {
|
||||
this.receiptInfo = receiptInfo;
|
||||
}
|
||||
|
||||
public String getBillNum() {
|
||||
return billNum;
|
||||
}
|
||||
|
||||
public void setBillNum(String billNum) {
|
||||
this.billNum = billNum;
|
||||
}
|
||||
|
||||
public String getRecTime() {
|
||||
return recTime;
|
||||
}
|
||||
|
||||
public void setRecTime(String recTime) {
|
||||
this.recTime = recTime;
|
||||
}
|
||||
|
||||
public String getOppAccName() {
|
||||
return oppAccName;
|
||||
}
|
||||
|
||||
public void setOppAccName(String oppAccName) {
|
||||
this.oppAccName = oppAccName;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package com.hzya.frame.ningboBankTreasury.dto.res;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 宁波银行查询交易明细
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/24 16:45
|
||||
**/
|
||||
public class AccTrxResponse {
|
||||
//返回交易码 0000成功,0001失败
|
||||
private String retCode;
|
||||
//返回信息
|
||||
private String retMsg;
|
||||
//每条页数
|
||||
private String pageSize;
|
||||
//当前页数
|
||||
private String currentPage;
|
||||
//总页数
|
||||
private String totalPage;
|
||||
//总条数
|
||||
private String totalSize;
|
||||
//收款明细列表
|
||||
private List<AccTransactionRes> list;
|
||||
|
||||
public String getRetCode() {
|
||||
return retCode;
|
||||
}
|
||||
|
||||
public void setRetCode(String retCode) {
|
||||
this.retCode = retCode;
|
||||
}
|
||||
|
||||
public String getRetMsg() {
|
||||
return retMsg;
|
||||
}
|
||||
|
||||
public void setRetMsg(String retMsg) {
|
||||
this.retMsg = retMsg;
|
||||
}
|
||||
|
||||
public String getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(String pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public String getCurrentPage() {
|
||||
return currentPage;
|
||||
}
|
||||
|
||||
public void setCurrentPage(String currentPage) {
|
||||
this.currentPage = currentPage;
|
||||
}
|
||||
|
||||
public String getTotalPage() {
|
||||
return totalPage;
|
||||
}
|
||||
|
||||
public void setTotalPage(String totalPage) {
|
||||
this.totalPage = totalPage;
|
||||
}
|
||||
|
||||
public String getTotalSize() {
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
public void setTotalSize(String totalSize) {
|
||||
this.totalSize = totalSize;
|
||||
}
|
||||
|
||||
public List<AccTransactionRes> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(List<AccTransactionRes> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
public static AccTrxResponse valueOf(String str){
|
||||
if (StrUtil.isNotEmpty(str) && JSONUtil.isTypeJSON(str)){
|
||||
NingBoResponse ningBoResponse = JSONObject.parseObject(str,NingBoResponse.class);
|
||||
AccTrxResponse accTrxResponse = ningBoResponse.getData().toJavaObject(AccTrxResponse.class);
|
||||
return accTrxResponse;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.hzya.frame.ningboBankTreasury.dto.res;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
/**
|
||||
* @Description 宁波银行返回对象
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/24 17:46
|
||||
**/
|
||||
public class NingBoResponse {
|
||||
|
||||
@JSONField(name ="Data")
|
||||
private JSONObject data;
|
||||
|
||||
public JSONObject getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(JSONObject data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.hzya.frame.ningboBankTreasury.enums;
|
||||
|
||||
/**
|
||||
* @Description 币种枚举
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/24 17:07
|
||||
**/
|
||||
public enum CurrencyEnum {
|
||||
|
||||
人民币("01","人民币","CNY"),
|
||||
美元("02","美元","USD"),
|
||||
澳元("03","澳元","AUD"),
|
||||
欧元("04","欧元","EUR"),
|
||||
日元("05","日元","JPY"),
|
||||
英镑("06","英镑","GBP"),
|
||||
港币("07","港币","HKD"),
|
||||
新加坡元("08","新加坡元","SGD"),
|
||||
加拿大元("09","加拿大元","CAD"),
|
||||
瑞士("10","瑞士","CHF"),
|
||||
泰铢("23","泰铢","THB"),
|
||||
新台币("92","新台币","TWD"),
|
||||
ALL("ALL","多币","ALL");
|
||||
|
||||
private final String code;
|
||||
private final String name;
|
||||
//英文代码 CNY USD之类的
|
||||
private final String symbol;
|
||||
CurrencyEnum(String code,String name,String symbol) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.symbol = symbol;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getSymbol() {
|
||||
return symbol;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取币种名字
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public static String getNameByCode(String code){
|
||||
for (CurrencyEnum currency : values()) {
|
||||
if (currency.code.equals(code)) {
|
||||
return currency.name;
|
||||
}
|
||||
}
|
||||
return null; // 或者抛出异常,表示找不到对应的币种
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取币种符号
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public static String getSymbolByCode(String code){
|
||||
for (CurrencyEnum currency : values()) {
|
||||
if (currency.code.equals(code)) {
|
||||
return currency.symbol;
|
||||
}
|
||||
}
|
||||
return null; // 或者抛出异常,表示找不到对应的币种
|
||||
}
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
package com.hzya.frame.ningboBankTreasury.enums;
|
||||
|
||||
/**
|
||||
* @Description 转账状态
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/29 17:11
|
||||
**/
|
||||
public enum PayStatusEnum {
|
||||
SUCCESS("0","交易成功"),
|
||||
// 失败状态
|
||||
FAILED_DELETED("-2", "已删除"),
|
||||
APPROVAL_REJECTED_CLOSED("-3", "审批打回交易关闭"),
|
||||
TRANSACTION_FAILED("2", "交易失败"),
|
||||
FUND_ALLOCATION_FAILED("4", "交易失败,资金下拨失败"),
|
||||
LINKAGE_PAYMENT_FAILED_REFUNDED("5", "联动支付失败,资金退回成功"),
|
||||
LINKAGE_PAYMENT_FAILED_REFUND_PENDING("6", "联动支付失败,资金退回查证中"),
|
||||
LINKAGE_PAYMENT_FAILED_REFUND_FAILED("96", "联动支付失败,资金退回失败"),
|
||||
PAYMENT_REQUEST_FAILED("112", "请款失败"),
|
||||
|
||||
// 其他状态
|
||||
REJECTED("-1", "驳回"),
|
||||
PENDING_VERIFICATION("1", "交易待查证"),
|
||||
PENDING_SEND("3", "待发送"),
|
||||
PENDING_APPROVAL("11", "待审批"),
|
||||
APPROVAL_THROUGH("95", "审批通过"),
|
||||
TEMPORARY_STORAGE("7", "暂存"),
|
||||
WITHDRAWN_BY_OPERATOR("-4", "经办撤回"),
|
||||
PAYMENT_REQUEST_PENDING("111", "请款查证中"),
|
||||
PAYMENT_REQUEST_SUCCEEDED_PENDING_SEND("113", "请款成功,交易待发送"),
|
||||
LINKAGE_PAYMENT_SUCCEEDED_PENDING_SEND("114", "联动支付成功,智能支付交易待发送");
|
||||
|
||||
// 枚举属性
|
||||
private final String code;
|
||||
private final String description;
|
||||
// 枚举构造函数
|
||||
PayStatusEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
// 获取状态码
|
||||
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
// 获取状态描述
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
// 根据状态码查找枚举
|
||||
public static PayStatusEnum fromCode(String code) {
|
||||
for (PayStatusEnum status : PayStatusEnum.values()) {
|
||||
if (status.getCode().equals(code)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unknown code: " + code);
|
||||
}
|
||||
|
||||
public static String getByCode(String code){
|
||||
for (PayStatusEnum status : PayStatusEnum.values()) {
|
||||
if (status.getCode().equals(code)) {
|
||||
return status.getDescription();
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unknown code: " + code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为最终态
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public static boolean isFinally(String code){
|
||||
return SUCCESS.code.equals(code)
|
||||
|| FAILED_DELETED.code.equals(code)
|
||||
|| APPROVAL_REJECTED_CLOSED.code.equals(code)
|
||||
|| TRANSACTION_FAILED.code.equals(code)
|
||||
|| FUND_ALLOCATION_FAILED.code.equals(code)
|
||||
|| LINKAGE_PAYMENT_FAILED_REFUNDED.code.equals(code)
|
||||
|| LINKAGE_PAYMENT_FAILED_REFUND_PENDING.code.equals(code)
|
||||
|| LINKAGE_PAYMENT_FAILED_REFUND_FAILED.code.equals(code)
|
||||
|| PAYMENT_REQUEST_FAILED.code.equals(code);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
package com.hzya.frame.ningboBankTreasury.enums;
|
||||
|
||||
/**
|
||||
* @Description T/T汇款 支付状态枚举
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/8/2 15:42
|
||||
**/
|
||||
public enum TTPayStatusEnum{
|
||||
|
||||
// 成功和失败状态
|
||||
SUCCESS("0", "交易成功"),
|
||||
TRANSACTION_FAILED("2", "交易失败"),
|
||||
TRANSACTION_SENDING("8", "交易发送中"),
|
||||
|
||||
// 审批状态
|
||||
|
||||
APPROVAL_IN_PROGRESS("11-94", "审批中"),
|
||||
APPROVAL_PASSED("95", "审批通过"),
|
||||
APPROVAL_REJECTED_CLOSED("-3", "审批打回,交易关闭"),
|
||||
|
||||
// 其他状态
|
||||
TEMPORARY_STORAGE("7", "暂存"),
|
||||
DELETED("-2", "删除"),
|
||||
BANK_PROCESSING("1", "银行处理中"),
|
||||
APPROVAL_REJECTED("-1", "审批打回");
|
||||
|
||||
// 枚举属性
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
// 枚举构造函数
|
||||
TTPayStatusEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
// 获取状态码
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
// 获取状态描述
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
|
||||
// 根据状态码查找枚举
|
||||
public static TTPayStatusEnum fromCode(String code) {
|
||||
for (TTPayStatusEnum status : TTPayStatusEnum.values()) {
|
||||
if (status.getCode().equals(code)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unknown code: " + code);
|
||||
}
|
||||
|
||||
public static String getByCode(String code){
|
||||
for (TTPayStatusEnum status : TTPayStatusEnum.values()) {
|
||||
if (status.getCode().equals(code)) {
|
||||
return status.getDescription();
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Unknown code: " + code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为最终态
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public static boolean isFinally(String code){
|
||||
return SUCCESS.code.equals(code)
|
||||
|| APPROVAL_REJECTED_CLOSED.code.equals(code)
|
||||
|| DELETED.code.equals(code)
|
||||
|| TRANSACTION_FAILED.code.equals(code);
|
||||
}
|
||||
}
|
|
@ -1,9 +1,14 @@
|
|||
package com.hzya.frame.ningboBankTreasury.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.req.AccTransactionReq;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.res.AccTransactionRes;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.res.AccTrxResponse;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface INingboBankTreasuryService {
|
||||
|
||||
|
||||
|
@ -33,4 +38,22 @@ public interface INingboBankTreasuryService {
|
|||
*
|
||||
*/
|
||||
SysExtensionApiEntity doChangeData(SysExtensionApiEntity entity);
|
||||
|
||||
/**
|
||||
* 银行原生方法
|
||||
* 分页方式 全量查询境内账户交易明细
|
||||
* accTransactionReq.custId 客户号 必填
|
||||
* accTransactionReq.bankAccList 账号列表 必填
|
||||
* @param accTransactionReq
|
||||
* @return
|
||||
*/
|
||||
List<AccTransactionRes> queryAccDetails(AccTransactionReq accTransactionReq);
|
||||
|
||||
/**
|
||||
* esb方法
|
||||
* 分页方式 全量查询境内账户交易明细
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
JsonResultEntity queryAccountDetailsEsb(JSONObject jsonObject);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package com.hzya.frame.ningboBankTreasury.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.bip.v3.v2207.dps.service.impl.PayMentServiceImpl;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.req.AccTransactionReq;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.res.AccTransactionRes;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.res.AccTrxResponse;
|
||||
import com.hzya.frame.ningboBankTreasury.service.INingboBankTreasuryService;
|
||||
import com.hzya.frame.ningboBankTreasury.util.NingboBankUtil;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.sysnew.application.plugin.entity.SysApplicationPluginEntity;
|
||||
import com.hzya.frame.util.bipV3.SHA256Util;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import com.nbcb.sdk.OpenSDK;
|
||||
|
@ -17,7 +19,9 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
|
@ -30,7 +34,7 @@ public class NingboBankTreasuryServiceImpl implements INingboBankTreasuryService
|
|||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 单笔查证接口
|
||||
* @Description 单笔转账查证接口
|
||||
* @Date 4:45 下午 2024/7/9
|
||||
**/
|
||||
@Override
|
||||
|
@ -56,6 +60,7 @@ public class NingboBankTreasuryServiceImpl implements INingboBankTreasuryService
|
|||
}
|
||||
//发送数据
|
||||
try {
|
||||
logger.info("调用宁波银行接口最终参数:{}",dataJson);
|
||||
String returnData = OpenSDK.send(productID,serviceID,dataJson.replace(" ",""));
|
||||
if(returnData == null || "".equals(returnData)){
|
||||
returnJson.put("retCode","9999");
|
||||
|
@ -145,6 +150,105 @@ public class NingboBankTreasuryServiceImpl implements INingboBankTreasuryService
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页方式 全量查询境内账户交易明细
|
||||
* accTransactionReq.custId 客户号 必填
|
||||
* accTransactionReq.bankAccList 账号列表 必填
|
||||
*
|
||||
* @param accTransactionReq
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<AccTransactionRes> queryAccDetails(AccTransactionReq accTransactionReq) {
|
||||
accTransactionReq = defValue(accTransactionReq);
|
||||
//当前页数
|
||||
int currentPage = Integer.valueOf(accTransactionReq.getCurrentPage());
|
||||
//总页数
|
||||
int totalPage = 0;
|
||||
JSONObject data = new JSONObject();
|
||||
List<AccTransactionRes> resList = new ArrayList<>();
|
||||
try {
|
||||
do {
|
||||
ConfigParam configParam = new ConfigParam("MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgTt6OadouxxxSDg/0SZdOIBqtnFGKrpwmL+quEUf+hfSgCgYIKoEcz1UBgi2hRANCAAQGHNN2NO7btp+w1248yk98E0asGC8sG0bmIzdom4M0xp3vc4IfXjmZ8omUz4oVcjzAuyMSSpJM6uPLcU1SH4HZ","http://cz-test.nbcb.com.cn:7070/nbcb/api","54b3e05c-7983-4e6c-8920-f9ab8a0004a6","MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEXAt6fxeKlpREIyXoT3jDwGU7L6JkKrzdOKP1cMB14rtNwwlyaUGLrtuHVoArAHP3x7XN2rUw0GxSngYQwOAsjQ==",10000,20000);
|
||||
OpenSDK.dynamicInit(configParam,true);
|
||||
data.put("Data",JSONObject.toJSONString(accTransactionReq));
|
||||
logger.info("查询交易明细请求参数:{}",data.toString());
|
||||
String returnData = OpenSDK.send(NingboBankUtil.TMSREPORT, NingboBankUtil.QUERYACCDETAIL,data.toString());
|
||||
System.out.println(returnData);
|
||||
logger.info("查询交易明细返回数据:{}",returnData);
|
||||
AccTrxResponse accTrxResponse = AccTrxResponse.valueOf(returnData);
|
||||
if (null != accTrxResponse && NingboBankUtil.isSuccess(accTrxResponse.getRetCode())){
|
||||
totalPage = Integer.valueOf(accTrxResponse.getTotalPage());
|
||||
resList.addAll(accTrxResponse.getList());
|
||||
}
|
||||
currentPage++;//页码自增
|
||||
accTransactionReq.setCurrentPage(String.valueOf(currentPage));//页码
|
||||
}while (currentPage <= totalPage);//当前页 <= 总页数 继续循环
|
||||
} catch (Exception e) {
|
||||
logger.error("查询账户交易明细出错:{}",e);
|
||||
}
|
||||
return resList;
|
||||
}
|
||||
|
||||
/**
|
||||
* esb方法
|
||||
* 分页方式 全量查询境内账户交易明细
|
||||
*
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JsonResultEntity queryAccountDetailsEsb(JSONObject jsonObject) {
|
||||
JSONObject entity = getstrObj("jsonStr", jsonObject);
|
||||
String dataJson = entity.getJSONObject("Data").getString("Data");
|
||||
AccTransactionReq accTransactionReq = JSONObject.parseObject(dataJson,AccTransactionReq.class );
|
||||
accTransactionReq = defValue(accTransactionReq);
|
||||
//当前页数
|
||||
int currentPage = Integer.valueOf(accTransactionReq.getCurrentPage());
|
||||
//总页数
|
||||
int totalPage = 0;
|
||||
JSONObject data = new JSONObject();
|
||||
List<AccTransactionRes> resList = new ArrayList<>();
|
||||
try {
|
||||
do {
|
||||
data.put("Data",JSONObject.toJSONString(accTransactionReq));
|
||||
entity.put("Data",data);
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("jsonStr",entity);
|
||||
logger.info("查询交易明细请求参数:{}",JSONObject.toJSONString(param));
|
||||
JSONObject returnObj = (JSONObject) sendNbBank(param);
|
||||
logger.info("查询交易明细返回数据:{}",returnObj.toString());
|
||||
AccTrxResponse accTrxResponse = AccTrxResponse.valueOf(returnObj.toString());
|
||||
if (null != accTrxResponse && NingboBankUtil.isSuccess(accTrxResponse.getRetCode())){
|
||||
totalPage = Integer.valueOf(accTrxResponse.getTotalPage());
|
||||
resList.addAll(accTrxResponse.getList());
|
||||
}
|
||||
currentPage++;//页码自增
|
||||
accTransactionReq.setCurrentPage(String.valueOf(currentPage));//页码
|
||||
}while (currentPage <= totalPage);//当前页 <= 总页数 继续循环
|
||||
} catch (Exception e) {
|
||||
logger.error("查询账户交易明细出错:{}",e);
|
||||
return BaseResult.getFailureMessageEntity("查询账户交易明细出错"+e.getMessage());
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询账户交易明细成功",resList);
|
||||
}
|
||||
|
||||
//默认值检查
|
||||
private AccTransactionReq defValue(AccTransactionReq accTransactionReq){
|
||||
if (StrUtil.isEmpty(accTransactionReq.getPageSize())){
|
||||
accTransactionReq.setPageSize("1000");
|
||||
}
|
||||
if (StrUtil.isEmpty(accTransactionReq.getCurrentPage())){
|
||||
accTransactionReq.setCurrentPage("1");
|
||||
}
|
||||
if (StrUtil.isEmpty(accTransactionReq.getQueryType())){
|
||||
accTransactionReq.setQueryType("0");
|
||||
}
|
||||
if (StrUtil.isEmpty(accTransactionReq.getCdSign())){
|
||||
accTransactionReq.setCdSign(NingboBankUtil.SHOURU);
|
||||
}
|
||||
return accTransactionReq;
|
||||
}
|
||||
/**
|
||||
* @param entity
|
||||
* @content 此方法获取初始化参数,拼接请求参数
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
package com.hzya.frame.ningboBankTreasury.util;
|
||||
|
||||
/**
|
||||
* @Description 宁波银行
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/24 18:15
|
||||
**/
|
||||
public class NingboBankUtil {
|
||||
|
||||
//产品id
|
||||
public static final String TMSREPORT = "tmsReport";
|
||||
//交易明细查询服务id
|
||||
public static final String QUERYACCDETAIL = "queryAccDetail";
|
||||
public static final String QUERYACCOUNT = "queryAccount";
|
||||
//成功编码
|
||||
public static final String SUCCESSCODE = "0000";
|
||||
|
||||
//收入
|
||||
public static final String SHOURU = "0";
|
||||
//支出
|
||||
public static final String ZHICHU = "1";
|
||||
|
||||
//是否成功
|
||||
public static boolean isSuccess(String retCode){
|
||||
return SUCCESSCODE.equals(retCode) ? true : false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.hzya.frame.seeyon.dongj.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.seeyon.dongj.entity.Formmain0044Entity;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/26 11:01
|
||||
**/
|
||||
public interface IFormmain0044Dao extends IBaseDao<Formmain0044Entity,String> {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.seeyon.dongj.dao.impl;
|
||||
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.seeyon.dongj.dao.IFormmain0044Dao;
|
||||
import com.hzya.frame.seeyon.dongj.entity.Formmain0044Entity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/26 11:02
|
||||
**/
|
||||
@Repository()
|
||||
public class Formmain0044DaoImpl extends MybatisGenericDao<Formmain0044Entity,String> implements IFormmain0044Dao {
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
package com.hzya.frame.seeyon.dongj.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* @Description oa收款明细底表
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/26 10:56
|
||||
**/
|
||||
public class Formmain0044Entity extends BaseEntity {
|
||||
private String field0001; // 我方账号
|
||||
private String field0017; // 我方开户行
|
||||
private String field0024; // 我方户名
|
||||
private String field0029; // 客户方账号
|
||||
private String field0022; // 客户方户名
|
||||
private String field0030; // 客户方开户行
|
||||
private String field0018; // 交易日期
|
||||
private String field0019; // 交易流水号 唯一值
|
||||
private String field0020; // 收款金额
|
||||
private String field0021; // 摘要
|
||||
private String field0025; // 银行类型
|
||||
private String field0026; // 银行流水号
|
||||
private String field0027; // 币种
|
||||
private String field0028; // 用途
|
||||
private String start_date;
|
||||
|
||||
public String getField0001() {
|
||||
return field0001;
|
||||
}
|
||||
|
||||
public void setField0001(String field0001) {
|
||||
this.field0001 = field0001;
|
||||
}
|
||||
|
||||
public String getField0017() {
|
||||
return field0017;
|
||||
}
|
||||
|
||||
public void setField0017(String field0017) {
|
||||
this.field0017 = field0017;
|
||||
}
|
||||
|
||||
public String getField0024() {
|
||||
return field0024;
|
||||
}
|
||||
|
||||
public void setField0024(String field0024) {
|
||||
this.field0024 = field0024;
|
||||
}
|
||||
|
||||
public String getField0029() {
|
||||
return field0029;
|
||||
}
|
||||
|
||||
public void setField0029(String field0029) {
|
||||
this.field0029 = field0029;
|
||||
}
|
||||
|
||||
public String getField0022() {
|
||||
return field0022;
|
||||
}
|
||||
|
||||
public void setField0022(String field0022) {
|
||||
this.field0022 = field0022;
|
||||
}
|
||||
|
||||
public String getField0030() {
|
||||
return field0030;
|
||||
}
|
||||
|
||||
public void setField0030(String field0030) {
|
||||
this.field0030 = field0030;
|
||||
}
|
||||
|
||||
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 getField0020() {
|
||||
return field0020;
|
||||
}
|
||||
|
||||
public void setField0020(String field0020) {
|
||||
this.field0020 = field0020;
|
||||
}
|
||||
|
||||
public String getField0021() {
|
||||
return field0021;
|
||||
}
|
||||
|
||||
public void setField0021(String field0021) {
|
||||
this.field0021 = field0021;
|
||||
}
|
||||
|
||||
public String getField0025() {
|
||||
return field0025;
|
||||
}
|
||||
|
||||
public void setField0025(String field0025) {
|
||||
this.field0025 = field0025;
|
||||
}
|
||||
|
||||
public String getField0026() {
|
||||
return field0026;
|
||||
}
|
||||
|
||||
public void setField0026(String field0026) {
|
||||
this.field0026 = field0026;
|
||||
}
|
||||
|
||||
public String getField0027() {
|
||||
return field0027;
|
||||
}
|
||||
|
||||
public void setField0027(String field0027) {
|
||||
this.field0027 = field0027;
|
||||
}
|
||||
|
||||
public String getField0028() {
|
||||
return field0028;
|
||||
}
|
||||
|
||||
public void setField0028(String field0028) {
|
||||
this.field0028 = field0028;
|
||||
}
|
||||
|
||||
public String getStart_date() {
|
||||
return start_date;
|
||||
}
|
||||
|
||||
public void setStart_date(String start_date) {
|
||||
this.start_date = start_date;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<?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.dongj.dao.impl.Formmain0044DaoImpl">
|
||||
<resultMap id="get-Formmain0044Entity-result" type="com.hzya.frame.seeyon.dongj.entity.Formmain0044Entity">
|
||||
<result property="id" column="id" />
|
||||
<result property="field0001" column="field0001" />
|
||||
<result property="field0017" column="field0017" />
|
||||
<result property="field0024" column="field0024" />
|
||||
<result property="field0029" column="field0029" />
|
||||
<result property="field0022" column="field0022" />
|
||||
<result property="field0030" column="field0030" />
|
||||
<result property="field0018" column="field0018" />
|
||||
<result property="field0019" column="field0019" />
|
||||
<result property="field0020" column="field0020" />
|
||||
<result property="field0021" column="field0021" />
|
||||
<result property="field0025" column="field0025" />
|
||||
<result property="field0026" column="field0026" />
|
||||
<result property="field0027" column="field0027" />
|
||||
<result property="field0028" column="field0028" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Formmain0044Entity_Base_Column_List">
|
||||
id,
|
||||
field0001,
|
||||
field0017,
|
||||
field0024,
|
||||
field0029,
|
||||
field0022,
|
||||
field0030,
|
||||
field0018,
|
||||
field0019,
|
||||
field0020,
|
||||
field0021,
|
||||
field0025,
|
||||
field0026,
|
||||
field0027,
|
||||
field0028
|
||||
</sql>
|
||||
|
||||
<!-- 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-Formmain0044Entity-result" parameterType="com.hzya.frame.seeyon.dongj.entity.Formmain0044Entity">
|
||||
select
|
||||
<include refid="Formmain0044Entity_Base_Column_List"/>
|
||||
from
|
||||
formmain_0044
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="field0001 != null and field0001 !='' "> field0001 = #{field0001} </if>
|
||||
<if test="field0019 != null and field0019 !='' "> and field0019 = #{field0019} </if>
|
||||
<if test="field0018 != null and field0018 !='' "> and field0018 = #{field0018} </if>
|
||||
<if test="start_date != null and start_date !='' "> and start_date >= #{start_date} </if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,16 @@
|
|||
package com.hzya.frame.seeyon.dongj.service;
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.seeyon.dongj.entity.Formmain0044Entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/26 11:03
|
||||
**/
|
||||
public interface IFormmain0044Service extends IBaseService<Formmain0044Entity,String> {
|
||||
|
||||
List<Formmain0044Entity> querySeridId(Formmain0044Entity entity);
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.hzya.frame.seeyon.dongj.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
|
||||
import com.hzya.frame.seeyon.cbs8.service.ICbsLogService;
|
||||
import com.hzya.frame.seeyon.dongj.dao.IFormmain0044Dao;
|
||||
import com.hzya.frame.seeyon.dongj.entity.Formmain0044Entity;
|
||||
import com.hzya.frame.seeyon.dongj.service.IFormmain0044Service;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/7/26 11:05
|
||||
**/
|
||||
@Service
|
||||
public class Formmain0044ServiceImpl extends BaseService<Formmain0044Entity,String> implements IFormmain0044Service {
|
||||
Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
private IFormmain0044Dao formmain0044Dao;
|
||||
|
||||
@Autowired
|
||||
public void setFormmain0044Dao(IFormmain0044Dao dao) {
|
||||
this.formmain0044Dao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
@DS(value = "#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<Formmain0044Entity> querySeridId(Formmain0044Entity entity) {
|
||||
List<Formmain0044Entity> list = formmain0044Dao.query(entity);
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.hzya.frame.seeyon.receiptFor.dao;
|
||||
|
||||
import com.hzya.frame.seeyon.receiptFor.entity.ReceiptForEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IReceiptForDao{
|
||||
public List<ReceiptForEntity> getOaReceipt(ReceiptForEntity recEntity);
|
||||
|
||||
public int updateState(ReceiptForEntity recEntity);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.hzya.frame.seeyon.receiptFor.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.seeyon.receiptFor.dao.IReceiptForDao;
|
||||
import com.hzya.frame.seeyon.receiptFor.entity.ReceiptForEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository("receiptForDao")
|
||||
public class ReceiptForDaoImpl extends MybatisGenericDao implements IReceiptForDao {
|
||||
|
||||
@DS("#recEntity.dataSourceCode")
|
||||
@Override
|
||||
public List<ReceiptForEntity> getOaReceipt(ReceiptForEntity recEntity){
|
||||
return super.selectList(getSqlIdPrifx()+"ReceiptForEntity_list_base",recEntity);
|
||||
}
|
||||
|
||||
@DS("#recEntity.dataSourceCode")
|
||||
@Override
|
||||
public int updateState(ReceiptForEntity recEntity){
|
||||
return super.update(getSqlIdPrifx()+"ReceiptForEntity_update_state",recEntity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,293 @@
|
|||
package com.hzya.frame.seeyon.receiptFor.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
public class ReceiptForEntity extends BaseEntity {
|
||||
|
||||
private String djrq;//field0003、单据日期、合同申请日期
|
||||
private String dwbm;
|
||||
private String hbbm;//field0090客商、客商编码、客商档案
|
||||
private String lrr;
|
||||
private String shr;
|
||||
private String shrq;
|
||||
private String state;
|
||||
private String djbh;//field0001、单据号
|
||||
|
||||
private Long wldx;//field0004、往来对象
|
||||
private String deptid;//field0091部门、部门档案、部门编码
|
||||
private String ywybm;//field0092业务员、人员档案、业务员编码
|
||||
private String bfyhzh;//field0060收款银行账号、客户方账号
|
||||
private String skyhmc;//field0062收款银行名称、客户方开户行
|
||||
private String dfyhzh;//field0014付款银行账号,我方账号
|
||||
private String fkyhmc;//field0051付款银行名称,我方开户行
|
||||
|
||||
private String bzbm;//field0072币种、默认“CNY”,币种编码
|
||||
|
||||
private String dfbbje;
|
||||
private String dfybje;
|
||||
|
||||
private String ddh;
|
||||
private String bbhl;
|
||||
private String contractno;
|
||||
private String djlxbm;//交易类型编码
|
||||
private String pj_jsfs;//结算方式编码
|
||||
private String scomment;//备注
|
||||
private String zyx22;//合同号
|
||||
private String zyx24;//合同名称
|
||||
private String zyx28;//用途
|
||||
private String szxmid;//收支项目
|
||||
|
||||
public String getSzxmid() {
|
||||
return szxmid;
|
||||
}
|
||||
|
||||
public void setSzxmid(String szxmid) {
|
||||
this.szxmid = szxmid;
|
||||
}
|
||||
|
||||
public String getZyx28() {
|
||||
return zyx28;
|
||||
}
|
||||
|
||||
public void setZyx28(String zyx28) {
|
||||
this.zyx28 = zyx28;
|
||||
}
|
||||
|
||||
public String getZyx22() {
|
||||
return zyx22;
|
||||
}
|
||||
|
||||
public void setZyx22(String zyx22) {
|
||||
this.zyx22 = zyx22;
|
||||
}
|
||||
|
||||
public String getZyx24() {
|
||||
return zyx24;
|
||||
}
|
||||
|
||||
public void setZyx24(String zyx24) {
|
||||
this.zyx24 = zyx24;
|
||||
}
|
||||
|
||||
public String getScomment() {
|
||||
return scomment;
|
||||
}
|
||||
|
||||
public void setScomment(String scomment) {
|
||||
this.scomment = scomment;
|
||||
}
|
||||
|
||||
public String getPj_jsfs() {
|
||||
return pj_jsfs;
|
||||
}
|
||||
|
||||
public void setPj_jsfs(String pj_jsfs) {
|
||||
this.pj_jsfs = pj_jsfs;
|
||||
}
|
||||
|
||||
public String getDjlxbm() {
|
||||
return djlxbm;
|
||||
}
|
||||
|
||||
public void setDjlxbm(String djlxbm) {
|
||||
this.djlxbm = djlxbm;
|
||||
}
|
||||
|
||||
public String getDfbbje() {
|
||||
return dfbbje;
|
||||
}
|
||||
|
||||
public void setDfbbje(String dfbbje) {
|
||||
this.dfbbje = dfbbje;
|
||||
}
|
||||
|
||||
public String getDdh() {
|
||||
return ddh;
|
||||
}
|
||||
|
||||
public void setDdh(String ddh) {
|
||||
this.ddh = ddh;
|
||||
}
|
||||
|
||||
public String getBbhl() {
|
||||
return bbhl;
|
||||
}
|
||||
|
||||
public void setBbhl(String bbhl) {
|
||||
this.bbhl = bbhl;
|
||||
}
|
||||
|
||||
public String getContractno() {
|
||||
return contractno;
|
||||
}
|
||||
|
||||
public void setContractno(String contractno) {
|
||||
this.contractno = contractno;
|
||||
}
|
||||
|
||||
private String fph;//field0019发票号
|
||||
|
||||
private String zy;//field0059摘要
|
||||
|
||||
private String bzbm_code;//field0073币种编码
|
||||
|
||||
public String getFph() {
|
||||
return fph;
|
||||
}
|
||||
|
||||
public void setFph(String fph) {
|
||||
this.fph = fph;
|
||||
}
|
||||
|
||||
public String getZy() {
|
||||
return zy;
|
||||
}
|
||||
|
||||
public void setZy(String zy) {
|
||||
this.zy = zy;
|
||||
}
|
||||
|
||||
public String getBzbm_code() {
|
||||
return bzbm_code;
|
||||
}
|
||||
|
||||
public void setBzbm_code(String bzbm_code) {
|
||||
this.bzbm_code = bzbm_code;
|
||||
}
|
||||
|
||||
public String getDjbh() {
|
||||
return djbh;
|
||||
}
|
||||
|
||||
public void setDjbh(String djbh) {
|
||||
this.djbh = djbh;
|
||||
}
|
||||
|
||||
public Long getWldx() {
|
||||
return wldx;
|
||||
}
|
||||
|
||||
public void setWldx(Long wldx) {
|
||||
this.wldx = wldx;
|
||||
}
|
||||
|
||||
public String getDeptid() {
|
||||
return deptid;
|
||||
}
|
||||
|
||||
public void setDeptid(String deptid) {
|
||||
this.deptid = deptid;
|
||||
}
|
||||
|
||||
public String getYwybm() {
|
||||
return ywybm;
|
||||
}
|
||||
|
||||
public void setYwybm(String ywybm) {
|
||||
this.ywybm = ywybm;
|
||||
}
|
||||
|
||||
public String getBfyhzh() {
|
||||
return bfyhzh;
|
||||
}
|
||||
|
||||
public void setBfyhzh(String bfyhzh) {
|
||||
this.bfyhzh = bfyhzh;
|
||||
}
|
||||
|
||||
public String getSkyhmc() {
|
||||
return skyhmc;
|
||||
}
|
||||
|
||||
public void setSkyhmc(String skyhmc) {
|
||||
this.skyhmc = skyhmc;
|
||||
}
|
||||
|
||||
public String getDfyhzh() {
|
||||
return dfyhzh;
|
||||
}
|
||||
|
||||
public void setDfyhzh(String dfyhzh) {
|
||||
this.dfyhzh = dfyhzh;
|
||||
}
|
||||
|
||||
public String getFkyhmc() {
|
||||
return fkyhmc;
|
||||
}
|
||||
|
||||
public void setFkyhmc(String fkyhmc) {
|
||||
this.fkyhmc = fkyhmc;
|
||||
}
|
||||
|
||||
public String getBzbm() {
|
||||
return bzbm;
|
||||
}
|
||||
|
||||
public void setBzbm(String bzbm) {
|
||||
this.bzbm = bzbm;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getDfybje() {
|
||||
return dfybje;
|
||||
}
|
||||
|
||||
public void setDfybje(String dfybje) {
|
||||
this.dfybje = dfybje;
|
||||
}
|
||||
|
||||
public String getDjrq() {
|
||||
return djrq;
|
||||
}
|
||||
|
||||
public void setDjrq(String djrq) {
|
||||
this.djrq = djrq;
|
||||
}
|
||||
|
||||
public String getDwbm() {
|
||||
return dwbm;
|
||||
}
|
||||
|
||||
public void setDwbm(String dwbm) {
|
||||
this.dwbm = dwbm;
|
||||
}
|
||||
|
||||
public String getHbbm() {
|
||||
return hbbm;
|
||||
}
|
||||
|
||||
public void setHbbm(String hbbm) {
|
||||
this.hbbm = hbbm;
|
||||
}
|
||||
|
||||
public String getLrr() {
|
||||
return lrr;
|
||||
}
|
||||
|
||||
public void setLrr(String lrr) {
|
||||
this.lrr = lrr;
|
||||
}
|
||||
|
||||
public String getShr() {
|
||||
return shr;
|
||||
}
|
||||
|
||||
public void setShr(String shr) {
|
||||
this.shr = shr;
|
||||
}
|
||||
|
||||
public String getShrq() {
|
||||
return shrq;
|
||||
}
|
||||
|
||||
public void setShrq(String shrq) {
|
||||
this.shrq = shrq;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
<?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.receiptFor.dao.impl.ReceiptForDaoImpl">
|
||||
|
||||
|
||||
<resultMap id="get-ReceiptForEntity-result" type="com.hzya.frame.seeyon.receiptFor.entity.ReceiptForEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="dfybje" column="r_dfybje" jdbcType="VARCHAR"/>
|
||||
<result property="djrq" column="r_djrq" jdbcType="VARCHAR"/>
|
||||
<result property="dwbm" column="r_dwbm" jdbcType="VARCHAR"/>
|
||||
<result property="hbbm" column="r_hbbm" jdbcType="VARCHAR"/>
|
||||
<result property="lrr" column="r_lrr" jdbcType="VARCHAR"/>
|
||||
<result property="shr" column="r_shr" jdbcType="VARCHAR"/>
|
||||
<result property="shrq" column="r_shrq" jdbcType="VARCHAR"/>
|
||||
<result property="djlxbm" column="djlxbm" jdbcType="VARCHAR"/>
|
||||
<result property="pj_jsfs" column="pj_jsfs" jdbcType="VARCHAR"/>
|
||||
|
||||
<result property="djbh" column="r_djbh" jdbcType="VARCHAR"/>
|
||||
<result property="wldx" column="r_wldx" jdbcType="INTEGER"/>
|
||||
<result property="deptid" column="r_deptid" jdbcType="VARCHAR"/>
|
||||
<result property="ywybm" column="r_ywybm" jdbcType="VARCHAR"/>
|
||||
<result property="bfyhzh" column="bfyhzh" jdbcType="VARCHAR"/>
|
||||
<result property="skyhmc" column="r_skyhmc" jdbcType="VARCHAR"/>
|
||||
<result property="fkyhmc" column="r_fkyhmc" jdbcType="VARCHAR"/>
|
||||
<result property="bzbm" column="r_bzbm" jdbcType="VARCHAR"/>
|
||||
<result property="scomment" column="scomment" jdbcType="VARCHAR"/>
|
||||
|
||||
<result property="fph" column="r_fph" jdbcType="VARCHAR"/>
|
||||
<result property="zy" column="r_zy" jdbcType="VARCHAR"/>
|
||||
<result property="bzbm_code" column="r_bzbm_code" jdbcType="VARCHAR"/>
|
||||
<result property="dfbbje" column="r_dfbbje" jdbcType="VARCHAR"/>
|
||||
<result property="dfyhzh" column="dfyhzh" jdbcType="VARCHAR"/>
|
||||
<result property="zyx22" column="zyx22" jdbcType="VARCHAR"/>
|
||||
<result property="zyx24" column="zyx24" jdbcType="VARCHAR"/>
|
||||
<result property="zyx28" column="zyx28" jdbcType="VARCHAR"/>
|
||||
<result property="szxmid" column="szxmid" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- <select id="ReceiptForEntity_list_base" resultMap="get-ReceiptForEntity-result" parameterType="com.hzya.frame.seeyon.receiptFor.entity.ReceiptForEntity">-->
|
||||
<!-- select-->
|
||||
<!-- state as r_dfybje,-->
|
||||
<!-- '2024-07-23' as r_djrq,-->
|
||||
<!-- '001' as r_dwbm,-->
|
||||
<!-- 'C000001' as r_hbbm,-->
|
||||
<!-- '17633965916' as r_lrr,-->
|
||||
<!-- '17633965916' as r_shr,-->
|
||||
<!-- '2024-07-23' as r_shrq-->
|
||||
<!-- from formmain_0045-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- <select id="ReceiptForEntity_list_base" resultMap="get-ReceiptForEntity-result" parameterType="com.hzya.frame.seeyon.receiptFor.entity.ReceiptForEntity">-->
|
||||
<!-- select-->
|
||||
<!-- id,-->
|
||||
<!-- '1' as r_dfybje,-->
|
||||
<!-- '2024-07-23' as r_djrq,-->
|
||||
<!-- '001' as r_dwbm,-->
|
||||
<!-- field0090 as r_hbbm,-->
|
||||
<!-- field0092 as r_lrr,-->
|
||||
<!-- field0094 as r_shr,-->
|
||||
<!-- '2024-07-23' as r_shrq-->
|
||||
<!-- from formmain_0045-->
|
||||
<!-- where field0089 = 'N'-->
|
||||
<!-- <trim>-->
|
||||
<!-- <if test="id !=null and id!=''">and id like concat('%',#{id},'%')</if>-->
|
||||
<!-- </trim>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="ReceiptForEntity_list_base" resultMap="get-ReceiptForEntity-result" parameterType="com.hzya.frame.seeyon.receiptFor.entity.ReceiptForEntity">
|
||||
select
|
||||
id,
|
||||
field0003 as r_djrq,
|
||||
field0003 as r_shrq,
|
||||
field0047 as r_dwbm,
|
||||
field0090 as r_hbbm,
|
||||
field0092 as r_lrr,
|
||||
field0092 as r_shr,
|
||||
field0013 as r_dfbbje,
|
||||
field0011 as r_dfybje,
|
||||
field0019 as r_fph,
|
||||
'D2' as djlxbm,
|
||||
field0095 as pj_jsfs,
|
||||
field0014 as bfyhzh,
|
||||
field0059 as r_zy,
|
||||
field0073 as r_bzbm_code,
|
||||
field0001 as r_djbh,
|
||||
field0004 as r_wldx,
|
||||
field0091 as r_deptid,
|
||||
field0060 as dfyhzh,
|
||||
field0062 as r_skyhmc,
|
||||
field0014 as r_dfyhzh,
|
||||
field0051 as r_fkyhmc,
|
||||
field0073 as r_bzbm,
|
||||
field0068 as scomment,
|
||||
field0042 as zyx22,
|
||||
field0009 as zyx24,
|
||||
field0092 as r_ywybm,
|
||||
field0096 as szxmid,
|
||||
field0058 as zyx28
|
||||
from formmain_0045
|
||||
where field0089 is null
|
||||
and finishedflag = '1'
|
||||
<trim>
|
||||
<if test="id !=null and id!=''">and id like concat('%',#{id},'%')</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- ReceiptForEntity_update_state-->
|
||||
|
||||
<!--通过主键修改方法-->
|
||||
<update id="ReceiptForEntity_update_state" parameterType = "com.hzya.frame.seeyon.receiptFor.entity.ReceiptForEntity" >
|
||||
update formmain_0045 set field0089 = #{state} where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.hzya.frame.seeyon.receiptFor.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.seeyon.receiptFor.entity.ReceiptForEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface IReceiptForService extends IBaseService<ReceiptForEntity,String> {
|
||||
|
||||
public JsonResultEntity sendReceiptFor(JSONObject requestJson);
|
||||
}
|
|
@ -0,0 +1,238 @@
|
|||
package com.hzya.frame.seeyon.receiptFor.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.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.util.BipUtil;
|
||||
import com.hzya.frame.seeyon.receiptFor.dao.IReceiptForDao;
|
||||
import com.hzya.frame.seeyon.receiptFor.entity.ReceiptForEntity;
|
||||
import com.hzya.frame.seeyon.receiptFor.service.IReceiptForService;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||
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.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service("ReceiptForServiceImpl")
|
||||
public class ReceiptForServiceImpl extends BaseService<ReceiptForEntity,String> implements IReceiptForService {
|
||||
Logger logger = LoggerFactory.getLogger(ReceiptForServiceImpl.class);
|
||||
@Autowired
|
||||
private IReceiptForDao receiptForDao;
|
||||
|
||||
@Autowired
|
||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||
|
||||
@Override
|
||||
public JsonResultEntity sendReceiptFor(JSONObject requestJson){
|
||||
|
||||
//获取重推信息id,并记录日志
|
||||
JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(),JSONObject.class);
|
||||
String interId = requestJsonObj.getString("integration_task_living_details_id");
|
||||
logger.info("收款单重推解析后:"+requestJsonObj.toString());
|
||||
logger.info("收款单重新执行的任务主键:"+interId);
|
||||
|
||||
//更换数据源
|
||||
JsonResultEntity resultEntity = new JsonResultEntity();
|
||||
ReceiptForEntity entity = new ReceiptForEntity();
|
||||
requestJson.put("db_code","djoatest");
|
||||
entity.setDataSourceCode(requestJson.getString("db_code"));
|
||||
|
||||
//根据重推信息id,查询该条重推记录信息
|
||||
IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity();
|
||||
if(StrUtil.isNotEmpty(interId)){
|
||||
oldMsg = taskLivingDetailsService.get(interId);
|
||||
}
|
||||
String rootAppPk = oldMsg.getRootAppPk();
|
||||
entity.setId(rootAppPk);
|
||||
if(StrUtil.isEmpty(rootAppPk)){
|
||||
//entity.setQueryState("查询");
|
||||
}
|
||||
//如果是重推,是否通过entity传入的id,只能查到一条数据。
|
||||
//entity.setId("-8845102890648320822");
|
||||
List<ReceiptForEntity> receiptList = receiptForDao.getOaReceipt(entity);
|
||||
logger.info("收款单查询数据{}",JSONObject.toJSONString(receiptList));
|
||||
if(CollectionUtils.isNotEmpty(receiptList)){
|
||||
for(ReceiptForEntity rec : receiptList){
|
||||
try{
|
||||
logger.info("组装数据");
|
||||
JSONObject main = bindingAdd(rec);
|
||||
logger.info("收款认领单推送数据:"+main.toString());
|
||||
String result = BipUtil.sendOaToU8c(main.toString(),"8000350034");
|
||||
logger.info("收款认领单推送结果:"+result);
|
||||
IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity();
|
||||
logDetails.setRootAppPk(rec.getId());
|
||||
logDetails.setRootAppBill(rec.getDjbh());
|
||||
logDetails.setNewTransmitInfo(result);
|
||||
logDetails.setNewPushDate(new Date());
|
||||
logDetails.setRootAppNewData(JSON.toJSONString(rec));
|
||||
logDetails.setPluginId("OaReceiptPlugin");
|
||||
|
||||
JSONObject resultObj = JSON.parseObject(result);
|
||||
boolean flag = resultObj.get("status").equals("success");
|
||||
if(flag){
|
||||
// 推送成功,更新状态
|
||||
rec.setState("Y");
|
||||
}else{
|
||||
// 推送失败
|
||||
rec.setState("N");
|
||||
}
|
||||
rec.setDataSourceCode(requestJson.getString("db_code"));
|
||||
try{
|
||||
if(StrUtil.isEmpty(interId)){
|
||||
if(flag){
|
||||
//首推成功
|
||||
taskLivingDetailsService.saveLogToSuccess(logDetails);
|
||||
}else{
|
||||
//首推失败
|
||||
taskLivingDetailsService.saveLogToFail(logDetails);
|
||||
}
|
||||
}else{
|
||||
logDetails.setId(interId);
|
||||
if(flag){
|
||||
//重推成功
|
||||
taskLivingDetailsService.saveLogFailToSuccess(logDetails);
|
||||
}else{
|
||||
//重推失败,把失败信息,更新到重推表中
|
||||
taskLivingDetailsService.updateLogFailToSuccess(logDetails);
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.info("保存日志失败"+e.getMessage());
|
||||
receiptForDao.updateState(rec);
|
||||
e.printStackTrace();
|
||||
}
|
||||
receiptForDao.updateState(rec);
|
||||
//
|
||||
} catch (Exception e) {
|
||||
logger.info("收款单执行失败1"+e);
|
||||
logger.info("收款单执行失败"+e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return new JsonResultEntity("成功",true,resultEntity);
|
||||
}
|
||||
|
||||
// @NotNull
|
||||
// private JSONObject bindingAdd(ReceiptForEntity rec) {
|
||||
// String djrq = rec.getDjrq().substring(0,10);
|
||||
// if(djrq.length()>10){
|
||||
// djrq = rec.getDjrq().substring(0,10);
|
||||
// }
|
||||
// String shrq = rec.getShrq().substring(0,10);
|
||||
// if(shrq.length()>10){
|
||||
// shrq = rec.getShrq().substring(0,10);
|
||||
// }
|
||||
//
|
||||
// JSONObject childrenJson = new JSONObject();
|
||||
// childrenJson.put("dfybje",rec.getDfybje());
|
||||
//
|
||||
// childrenJson.put("dfbbje","24");
|
||||
// childrenJson.put("dfybje","12");
|
||||
// childrenJson.put("ddh","1231231");
|
||||
// childrenJson.put("fph","fph12312");
|
||||
// childrenJson.put("zy","zy");
|
||||
// childrenJson.put("bzbm_code","CNY");
|
||||
// childrenJson.put("bbhl","2");
|
||||
// childrenJson.put("contractno","hth123123");
|
||||
//
|
||||
//
|
||||
// JSONArray childrenArray = new JSONArray();
|
||||
// childrenArray.add(childrenJson);
|
||||
//
|
||||
// JSONObject parentvo = new JSONObject();
|
||||
// parentvo.put("djrq",djrq);
|
||||
// parentvo.put("dwbm",rec.getDwbm());
|
||||
// parentvo.put("hbbm",rec.getHbbm());
|
||||
// parentvo.put("lrr",rec.getLrr());
|
||||
// parentvo.put("shr",rec.getShr());
|
||||
// parentvo.put("shrq",shrq);
|
||||
//
|
||||
// JSONObject billvoJson = new JSONObject();
|
||||
// billvoJson.put("children",childrenArray);
|
||||
// billvoJson.put("parentvo",parentvo);
|
||||
//
|
||||
// JSONArray billvoArray = new JSONArray();
|
||||
// billvoArray.add(billvoJson);
|
||||
// JSONObject main = new JSONObject();
|
||||
// main.put("billvo",billvoArray);
|
||||
// return main;
|
||||
// }
|
||||
|
||||
@NotNull
|
||||
private JSONObject bindingAdd(ReceiptForEntity rec) {
|
||||
// if(rec.getDjrq()!=null){
|
||||
// String djrq = rec.getDjrq().substring(0,10);
|
||||
// if(djrq.length()>10){
|
||||
// djrq = rec.getDjrq().substring(0,10);
|
||||
// }
|
||||
// }
|
||||
// if(rec.getShrq()!=null){
|
||||
// String shrq = rec.getShrq().substring(0,10);
|
||||
// if(shrq.length()>10){
|
||||
// shrq = rec.getShrq().substring(0,10);
|
||||
// }
|
||||
// }
|
||||
|
||||
JSONObject childrenJson = new JSONObject();
|
||||
childrenJson.put("dfybje",rec.getDfybje());
|
||||
|
||||
//childrenJson.put("dfbbje",rec.getDfbbje());
|
||||
childrenJson.put("ddh",rec.getDdh());
|
||||
childrenJson.put("fph",rec.getFph());
|
||||
childrenJson.put("zy",rec.getZy());
|
||||
childrenJson.put("bzbm_code",rec.getBzbm_code());
|
||||
childrenJson.put("bbhl",rec.getBbhl());
|
||||
childrenJson.put("contractno",rec.getContractno());
|
||||
|
||||
|
||||
JSONArray childrenArray = new JSONArray();
|
||||
childrenArray.add(childrenJson);
|
||||
|
||||
JSONObject parentvo = new JSONObject();
|
||||
parentvo.put("djrq",rec.getDjrq().substring(0,10));
|
||||
parentvo.put("dwbm",rec.getDwbm());
|
||||
parentvo.put("hbbm",rec.getHbbm());
|
||||
parentvo.put("lrr",rec.getLrr());
|
||||
parentvo.put("djlxbm",rec.getDjlxbm());//交易类型编码
|
||||
parentvo.put("shr",rec.getShr());
|
||||
parentvo.put("shrq",rec.getShrq().substring(0,10));
|
||||
|
||||
parentvo.put("djbh",rec.getDjbh());
|
||||
//parentvo.put("wldx",rec.getWldx());
|
||||
parentvo.put("deptid",rec.getDeptid());
|
||||
//parentvo.put("ywybm",rec.getYwybm());
|
||||
parentvo.put("bfyhzh",rec.getBfyhzh());//本方银行账号
|
||||
parentvo.put("skyhmc",rec.getSkyhmc());//收款银行账号
|
||||
parentvo.put("pj_jsfs",rec.getPj_jsfs());//结算方式
|
||||
parentvo.put("dfyhzh",rec.getDfyhzh());//对方银行账号
|
||||
parentvo.put("scomment",rec.getScomment());//备注
|
||||
parentvo.put("zyx22",rec.getZyx22());//合同号
|
||||
parentvo.put("zyx24",rec.getZyx24());//合同名称
|
||||
parentvo.put("zyx28",rec.getZyx28());//用途
|
||||
parentvo.put("szxmid",rec.getSzxmid());//收支项目
|
||||
parentvo.put("fkyhmc",rec.getFkyhmc());
|
||||
parentvo.put("bzbm",rec.getBzbm());
|
||||
|
||||
JSONObject billvoJson = new JSONObject();
|
||||
billvoJson.put("children",childrenArray);
|
||||
billvoJson.put("parentvo",parentvo);
|
||||
|
||||
JSONArray billvoArray = new JSONArray();
|
||||
billvoArray.add(billvoJson);
|
||||
JSONObject main = new JSONObject();
|
||||
main.put("billvo",billvoArray);
|
||||
return main;
|
||||
}
|
||||
|
||||
}
|
|
@ -26,4 +26,11 @@ public interface ISeeyonExtService {
|
|||
* @param logEntity
|
||||
*/
|
||||
void ydcSeeyon2u8CallBack(SysMessageManageLogEntity logEntity);
|
||||
|
||||
/**
|
||||
* 东进 宁波银行交易明细保存到OA底表参数组装
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
SysExtensionApiEntity dongjAccLog(SysExtensionApiEntity entity);
|
||||
}
|
||||
|
|
|
@ -5,15 +5,17 @@ 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.ningboBankTreasury.dto.res.AccTransactionRes;
|
||||
import com.hzya.frame.seeyon.entity.OAWorkflowEventDataEntity;
|
||||
import com.hzya.frame.seeyon.service.ISeeyonExtService;
|
||||
import com.hzya.frame.seeyon.util.RestUtil;
|
||||
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.u8.util.U8Util;
|
||||
import com.hzya.frame.uuid.UUIDLong;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -21,6 +23,7 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
@ -36,6 +39,8 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
|||
|
||||
@Autowired
|
||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||
@Autowired
|
||||
private RestUtil restUtil;
|
||||
|
||||
/**
|
||||
* 英德赛 OA档案传U8
|
||||
|
@ -150,6 +155,20 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 东进 宁波银行交易明细保存到OA底表参数组装
|
||||
*
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SysExtensionApiEntity dongjAccLog(SysExtensionApiEntity entity) {
|
||||
String token = restUtil.getToken("", "8000340000");
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
headers.put("token",token);
|
||||
return entity;
|
||||
}
|
||||
|
||||
//存货参数组装
|
||||
private SysExtensionApiEntity getInventory(JSONObject businessData,SysExtensionApiEntity param){
|
||||
if (null != businessData){
|
||||
|
@ -183,7 +202,7 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
|||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("billid", formmain0225.getString("id"));
|
||||
jsonObject.put("AccId", formmain0225.getString("field0020"));
|
||||
jsonObject.put("Token", U8Util.getToken());
|
||||
//jsonObject.put("Token", U8Util.getToken());
|
||||
JSONObject oArchives = new JSONObject();
|
||||
oArchives.put("cVenCode", formmain0225.getString("field0002"));
|
||||
oArchives.put("cVenName ", formmain0225.getString("field0003"));
|
||||
|
|
|
@ -206,4 +206,57 @@ public class RestUtil {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
public static String sendU8CToOA(String parm, String apiCode,String userCode){
|
||||
String baseUrl = "http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
//获取OAtoken
|
||||
logger.info("推送参数"+parm);
|
||||
JSONObject tokenObj = new JSONObject();
|
||||
tokenObj.put("password","2cdd6cfc-5b87-47d1-aaea-756a55f6b5a6");
|
||||
tokenObj.put("userName","restUser");
|
||||
tokenObj.put("loginName",userCode);
|
||||
tokenObj.put("loginName","yuqh");
|
||||
String token = getOaTokenForEsb(tokenObj.toString(),"");
|
||||
if(StrUtil.isNotEmpty(token)){
|
||||
tokenObj = JSON.parseObject(token);
|
||||
token = tokenObj.getString("id");
|
||||
}
|
||||
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800034")//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("token", token)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYA0iD/DtdYCBYE1AqHlz4All0gLb96p8G1xNjdGz4tDZlCe7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "nL860JIPqIuB0jUsJE5RZLcyZfi8ArRSz6rk0h69TDbkf3Qq0Jstwk9FIgbGa6ejj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body(parm)//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
logger.info("返回参数"+parm);
|
||||
if(StrUtil.isNotEmpty(result)){
|
||||
return analytic(result);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getOaTokenForEsb(String parm, String apiCode){
|
||||
String baseUrl = "http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
System.out.println("推送参数"+parm);
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800034")//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", "8000340000")//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYA0iD/DtdYCBYE1AqHlz4All0gLb96p8G1xNjdGz4tDZlCe7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "nL860JIPqIuB0jUsJE5RZLcyZfi8ArRSz6rk0h69TDbkf3Qq0Jstwk9FIgbGa6ejj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body(parm)//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
System.out.println("返回参数"+result);
|
||||
if(StrUtil.isNotEmpty(result)){
|
||||
return analytic(result);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String analytic(String parm){
|
||||
JSONObject main = JSON.parseObject(parm);
|
||||
return main.getString("attribute");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,13 +30,13 @@ import java.util.zip.ZipInputStream;
|
|||
public class FileDownloadServiceImpl extends BaseService< FileDownloadEntity,Long> implements IFileDownloadService{
|
||||
|
||||
protected IFileDownloadDao filedownloadDao;
|
||||
@Value("${savefile.path}")
|
||||
@Value("${savefile.path:}")
|
||||
public String DSK;
|
||||
|
||||
@Value("${savefile.pluginpath}")
|
||||
@Value("${savefile.pluginpath:}")
|
||||
public String PLUGINPATH;
|
||||
|
||||
@Value("${savefile.tomcatpath}")
|
||||
@Value("${savefile.tomcatpath:}")
|
||||
public String TOMCATPATH;
|
||||
@Autowired
|
||||
public void setFileDownloadDao(IFileDownloadDao dao) {
|
||||
|
|
|
@ -40,10 +40,10 @@ import java.util.zip.ZipFile;
|
|||
*/
|
||||
@Service(value = "sys_fileUploadService")
|
||||
public class FileUploadServiceImpl extends BaseService<FileUploadEntity, Long> implements IFileUploadService {
|
||||
@Value("${savefile.path}")
|
||||
@Value("${savefile.path:}")
|
||||
public String DSK;
|
||||
|
||||
@Value("${savefile.pluginpath}")
|
||||
@Value("${savefile.pluginpath:}")
|
||||
public String PLUGINPATH;
|
||||
|
||||
protected IFileUploadDao fileUploadDao;
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
FROM
|
||||
information_schema.TABLES
|
||||
WHERE
|
||||
TABLE_SCHEMA = 'businesscenter'
|
||||
TABLE_SCHEMA = 'businesscenter_kjs'
|
||||
and TABLE_NAME = #{tableName}
|
||||
</select>
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ import javax.servlet.ServletRequest;
|
|||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
@ -125,7 +126,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
@Resource
|
||||
private ApplicationCache applicationCache;
|
||||
|
||||
@Value("${savefile.tomcatpath}")
|
||||
@Value("${savefile.tomcatpath:}")
|
||||
public String TOMCATPATH;
|
||||
//多线程请求加锁 HttpRequest 构造方法是静态的
|
||||
private final Object lock = new Object();
|
||||
|
@ -2050,6 +2051,26 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
}
|
||||
}
|
||||
|
||||
/*****
|
||||
* 请求结果转换str
|
||||
* @content:
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2024-10-16 16:42
|
||||
* @param
|
||||
* @return String
|
||||
**/
|
||||
private String resultToStr(HttpEntity entity) throws IOException {
|
||||
InputStream inputStream = entity.getContent();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
byte[] buffer = new byte[4096];
|
||||
int bytesRead;
|
||||
while ((bytesRead = inputStream.read(buffer))!= -1) {
|
||||
sb.append(new String(buffer, 0, bytesRead, "utf-8"));
|
||||
}
|
||||
String result = sb.toString();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@DSTransactional()
|
||||
public JsonResultEntity externalCallInterfaceResend(SysMessageManageLogEntity resendLogEntity) {
|
||||
|
@ -2270,7 +2291,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
|
||||
HttpEntity entity = response.getEntity();
|
||||
synchronized (lock) {
|
||||
body.append(EntityUtils.toString(entity,"UTF-8"));
|
||||
body.append(resultToStr(entity));
|
||||
}
|
||||
flag = true;
|
||||
logger.info("返回结果:" + body);
|
||||
|
@ -2520,7 +2541,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
JSONObject jsonObject1 = JSONObject.parseObject(body);
|
||||
String retCode = jsonObject1.getString("retCode");
|
||||
if(retCode != null && "0000".equals(retCode)){
|
||||
JSONObject jsonObject2 = JSONObject.parseObject(jsonObject1.getString("data"));
|
||||
JSONObject jsonObject2 = JSONObject.parseObject(jsonObject1.getString("Data"));
|
||||
String fileBytes = jsonObject2.getString("fileBytes");
|
||||
if(fileBytes != null && !"".equals(fileBytes)){
|
||||
jsonObject2.put("fileBytes","");
|
||||
|
|
|
@ -105,10 +105,10 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
|
|||
//查询主表数据
|
||||
List<Map<String,Object>> comparisonEntitiePages = comparisonDao.queryComparisonPage(comparisonEntity);
|
||||
|
||||
//递归查询组织树
|
||||
if(comparisonEntities.get(0).getViewName().equals("1")){
|
||||
return recursiveQueryComparison(comparisonEntitiePages,comparisonEntity);
|
||||
}
|
||||
// //递归查询组织树
|
||||
// if(comparisonEntities.get(0).getViewName().equals("1")){
|
||||
// return recursiveQueryComparison(comparisonEntitiePages,comparisonEntity);
|
||||
// }
|
||||
|
||||
if(CollectionUtils.isNotEmpty(comparisonEntitiePages)){
|
||||
for (Map<String, Object> comparisonEntitiePage : comparisonEntitiePages) {
|
||||
|
@ -485,6 +485,7 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
|
|||
map.put("modify_time", new Date());
|
||||
map.put("sts", "Y");
|
||||
map.put("data_status","F");//数据状态
|
||||
map.put("add_status", "0");//新增状态
|
||||
map.put("update_status","0");//修改状态
|
||||
map.remove("id");
|
||||
comparisonEntity.setMap(map);
|
||||
|
@ -622,10 +623,10 @@ public class ComparisonServiceImpl extends BaseService<ComparisonEntity, String>
|
|||
return BaseResult.getFailureMessageEntity("根据data_id查询id数据为空,请检查data_id");
|
||||
}
|
||||
|
||||
//递归删除树结构 1.树 2.列表
|
||||
/*//递归删除树结构 1.树 2.列表
|
||||
if(comparisonEntities.get(0).getViewName().equals("1")){
|
||||
return recursiveDeleteComparison(comparisonEntitiePages,comparisonEntity);
|
||||
}
|
||||
}*/
|
||||
|
||||
String id = String.valueOf(comparisonEntitiePages.get(0).get("id"));
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -19,24 +19,24 @@
|
|||
<!-- 查询的字段-->
|
||||
<sql id = "SysIntegratedForegroundTaskEntity_Base_Column_List">
|
||||
id
|
||||
,workshop_name
|
||||
,plug_id
|
||||
,plug_name
|
||||
,remark
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,workshop_name
|
||||
,plug_id
|
||||
,plug_name
|
||||
,remark
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysIntegratedForegroundTaskEntity-result" parameterType = "com.hzya.frame.sysnew.integratedForegroundTask.entity.SysIntegratedForegroundTaskEntity">
|
||||
select
|
||||
<include refid="SysIntegratedForegroundTaskEntity_Base_Column_List" />
|
||||
from sys_integrated_foreground_task
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="workshopName != null and workshopName != ''"> and workshop_name = #{workshopName} </if>
|
||||
<if test="plugId != null and plugId != ''"> and plug_id = #{plugId} </if>
|
||||
|
@ -54,11 +54,11 @@
|
|||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sysnew.integratedForegroundTask.entity.SysIntegratedForegroundTaskEntity">
|
||||
select count(1) from sys_integrated_foreground_task
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="workshopName != null and workshopName != ''"> and workshop_name = #{workshopName} </if>
|
||||
<if test="plugId != null and plugId != ''"> and plug_id = #{plugId} </if>
|
||||
|
@ -82,10 +82,10 @@
|
|||
select
|
||||
<include refid="SysIntegratedForegroundTaskEntity_Base_Column_List" />
|
||||
from sys_integrated_foreground_task
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="workshopName != null and workshopName != ''"> and workshop_name like concat('%',#{workshopName},'%') </if>
|
||||
<if test="plugId != null and plugId != ''"> and plug_id like concat('%',#{plugId},'%') </if>
|
||||
<if test="plugId != null and plugId != ''"> and plug_id = #{plugId}, </if>
|
||||
<if test="plugName != null and plugName != ''"> and plug_name like concat('%',#{plugName},'%') </if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%',#{remark},'%') </if>
|
||||
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
||||
|
@ -106,7 +106,7 @@
|
|||
select
|
||||
<include refid="SysIntegratedForegroundTaskEntity_Base_Column_List" />
|
||||
from sys_integrated_foreground_task
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="workshopName != null and workshopName != ''"> or workshop_name = #{workshopName} </if>
|
||||
<if test="plugId != null and plugId != ''"> or plug_id = #{plugId} </if>
|
||||
|
@ -164,11 +164,11 @@
|
|||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into sys_integrated_foreground_task(workshop_name, plug_id, plug_name, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
|
||||
insert into sys_integrated_foreground_task(workshop_name, plug_id, plug_name, remark, sorts, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.workshopName},#{entity.plugId},#{entity.plugName},#{entity.remark},#{entity.sorts},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id}, 'Y')
|
||||
|
@ -219,7 +219,7 @@ where id = #{id}
|
|||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sysnew.integratedForegroundTask.entity.SysIntegratedForegroundTaskEntity" >
|
||||
update sys_integrated_foreground_task set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="workshopName != null and workshopName != ''"> and workshop_name = #{workshopName} </if>
|
||||
<if test="plugId != null and plugId != ''"> and plug_id = #{plugId} </if>
|
||||
|
|
|
@ -122,7 +122,7 @@ public class LoginServiceImpl implements ILoginService {
|
|||
List<SysOrganEntity> sysOrganEntities = sysOrganDao.queryUserCompany(sysOrganEntity);
|
||||
//返回值
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("token", token);
|
||||
res.put("zt-token", token);
|
||||
res.put("userInfo", sysUserEntity);
|
||||
res.put("company", sysOrganEntities);
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.hzya.frame.sysnew.messageManageLog.entity;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
@ -46,6 +47,7 @@ public class SysMessageManageLogEntity extends BaseEntity {
|
|||
private Date createTimeStart;
|
||||
private Date createTimeEnd;
|
||||
private List<String> ids;
|
||||
|
||||
public String getReturnType() {
|
||||
return returnType;
|
||||
}
|
||||
|
@ -196,5 +198,6 @@ public class SysMessageManageLogEntity extends BaseEntity {
|
|||
public void setCreateTimeEnd(Date createTimeEnd) {
|
||||
this.createTimeEnd = createTimeEnd;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
package com.hzya.frame.u8.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
/**
|
||||
* @Description u8返回对象
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/5/14 15:40
|
||||
**/
|
||||
public class U8ResponseDTO {
|
||||
@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;
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package com.hzya.frame.u8.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.u8.dto.U8ResponseDTO;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/5/14 15:30
|
||||
**/
|
||||
public class U8Util {
|
||||
|
||||
static Logger logger = LogManager.getLogger(U8Util.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)) {
|
||||
U8ResponseDTO u8ResponseDTO = JSONObject.parseObject(token, U8ResponseDTO.class);
|
||||
return u8ResponseDTO.getMessage();
|
||||
}
|
||||
return token;
|
||||
|
||||
}
|
||||
}
|
|
@ -12,12 +12,11 @@
|
|||
WHERE
|
||||
h.cgeneralhid in (
|
||||
SELECT cgeneralhid FROM ic_general_b WHERE vfirstbillcode = #{code}
|
||||
<if test="type != null and type != ''"> and csourcetype = #{type} </if>
|
||||
<if test="type != null and type != ''"> and csourcetype = #{type} </if> and dr = '0'
|
||||
)
|
||||
<if test="cbilltypecode != null and cbilltypecode != ''"> and h.cbilltypecode = #{cbilltypecode} </if>
|
||||
|
||||
group by h.vbillcode,a.unitcode
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -101,4 +101,26 @@ public interface IEncapsulationService extends IBaseService<EncapsulationEntity,
|
|||
SysExtensionApiEntity addOtherWarehouseReceiptDelete(SysExtensionApiEntity jsonObject);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return java.lang.Object
|
||||
* @Author lvleigang
|
||||
* @Description 加工订单删除接口
|
||||
* 0、根据加工订单号查询加工入库单号,1、加工入库单取消签字 ,2、加工入库删除 ,3、加工订单弃审 ,4、加工订单删除
|
||||
* @Date 9:44 上午 2024/9/4
|
||||
**/
|
||||
Object processingOrderDelete(JSONObject jsonObject);
|
||||
SysExtensionApiEntity addProcessingOrderDelete(SysExtensionApiEntity jsonObject);
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return java.lang.Object
|
||||
* @Author lvleigang
|
||||
* @Description 销售订单删除接口
|
||||
* 1、销售订单取消审批 8000350064 ,2、销售订单删除 8000350065
|
||||
* @Date 9:44 上午 2024/9/4
|
||||
**/
|
||||
Object xsddDelete(JSONObject jsonObject);
|
||||
SysExtensionApiEntity addxsddDelete(SysExtensionApiEntity jsonObject);
|
||||
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -132,45 +133,47 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
encapsulationEntity.setDataSourceCode(jsonObject.getString("dataSourceCode"));
|
||||
encapsulationEntity.setType("21");
|
||||
List<EncapsulationEntity> encapsulationEntities = encapsulationDao.queryCgrkddh(encapsulationEntity);
|
||||
if(encapsulationEntities == null || encapsulationEntities.size() != 1){
|
||||
if(encapsulationEntities != null && encapsulationEntities.size() > 1){
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "查到多条采购入库单");
|
||||
returnObject.put("errormsg", "查到采购入库单错误");
|
||||
return returnObject;
|
||||
}
|
||||
//执行库存采购入库单取消签字接口
|
||||
String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode(),encapsulationEntities.get(0).getUnitcode());
|
||||
boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(0,6), cgrkdqxqz);
|
||||
if (!cgrkdqxqzflag) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "采购入库单取消签字失败");
|
||||
return returnObject;
|
||||
}
|
||||
//执行库存采购入库单删除
|
||||
String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode(),encapsulationEntities.get(0).getUnitcode());
|
||||
boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(0,6), cgrkdsc);
|
||||
if (!cgrkdscfiag) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "采购入库单删除失败");
|
||||
return returnObject;
|
||||
if(encapsulationEntities != null && encapsulationEntities.size() == 1){
|
||||
//执行库存采购入库单取消签字接口
|
||||
String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode(),encapsulationEntities.get(0).getUnitcode());
|
||||
JSONObject cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(0,6), cgrkdqxqz);
|
||||
if (!cgrkdqxqzflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "采购入库单取消签字失败:"+cgrkdqxqzflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//执行库存采购入库单删除
|
||||
String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode(),encapsulationEntities.get(0).getUnitcode());
|
||||
JSONObject cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(0,6), cgrkdsc);
|
||||
if (!cgrkdscfiag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "采购入库单删除失败:"+cgrkdscfiag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
}
|
||||
//执行采购订单弃审
|
||||
String cgddqs = getsendBody("3", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddqs"), jsonObject.getString("cgddqs").substring(0,6), cgddqs);
|
||||
if (!cgddqsflag) {
|
||||
JSONObject cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddqs"), jsonObject.getString("cgddqs").substring(0,6), cgddqs);
|
||||
if (!cgddqsflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "采购订单弃审失败");
|
||||
returnObject.put("errormsg", "采购订单弃审失败:"+cgddqsflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//执行采购订单删除
|
||||
String cgddsc = getsendBody("4", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddsc"), jsonObject.getString("cgddsc").substring(0,6), cgddsc);
|
||||
if (cgddscflag) {
|
||||
JSONObject cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgddsc"), jsonObject.getString("cgddsc").substring(0,6), cgddsc);
|
||||
if (cgddscflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "success");
|
||||
returnObject.put("errormsg", "采购订单删除成功");
|
||||
return returnObject;
|
||||
} else {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "采购订单删除失败");
|
||||
returnObject.put("errormsg", "采购订单删除失败:"+cgddscflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
}
|
||||
|
@ -276,23 +279,23 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
}
|
||||
//执行库存采购入库单取消签字接口
|
||||
String cgrkdqxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(0,6), cgrkdqxqz);
|
||||
if (!cgrkdqxqzflag) {
|
||||
JSONObject cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrkqxqz"), jsonObject.getString("cgrkqxqz").substring(0,6), cgrkdqxqz);
|
||||
if (!cgrkdqxqzflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "采购入库单取消签字失败");
|
||||
returnObject.put("errormsg", "采购入库单取消签字失败:"+cgrkdqxqzflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
|
||||
//执行库存采购入库单删除接口
|
||||
String cgrkdsc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(0,6), cgrkdsc);
|
||||
if (cgrkdscfiag) {
|
||||
JSONObject cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("cgrksc"), jsonObject.getString("cgrksc").substring(0,6), cgrkdsc);
|
||||
if (cgrkdscfiag.getBoolean("flag")) {
|
||||
returnObject.put("status", "success");
|
||||
returnObject.put("errormsg", "采购入库单删除成功");
|
||||
return returnObject;
|
||||
} else {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "采购入库单删除失败");
|
||||
returnObject.put("errormsg", "采购入库单删除失败:"+cgrkdscfiag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
}
|
||||
|
@ -335,7 +338,7 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
* @return java.lang.Object
|
||||
* @Author lvleigang
|
||||
* @Description 销售订单删除接口 8000350082
|
||||
* 0、根据销售钉订单号查询出销售出库单号,1、库存销售出库单取消签字 8000350062 ,2、库存销售出库单删除 8000350063 ,3、销售订单取消审批 8000350064 ,4、销售订单删除 8000350065
|
||||
* 0、根据销售钉订单号查询出销售出库单号,1、库存销售出库单取消签字 8000350062 ,2、库存销售出库单删除 8000350063 ,3、销售订单取消审批 8000350064 ,4、销售订单删除 8000350065,4、oa删除合同 8000340012
|
||||
* @Date 9:44 上午 2024/9/4
|
||||
**/
|
||||
@Override
|
||||
|
@ -390,6 +393,11 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
returnObject.put("errormsg", "销售订单删除接口编号为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("xsht"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "oa合同删除接口编号为空");
|
||||
return returnObject;
|
||||
}
|
||||
|
||||
if (!checkStr(jsonObject.getString("dataSourceCode"))) {
|
||||
returnObject.put("status", "falied");
|
||||
|
@ -414,43 +422,52 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
List<EncapsulationEntity> encapsulationEntities = encapsulationDao.queryCgrkddh(encapsulationEntity);
|
||||
if(encapsulationEntities == null || encapsulationEntities.size() != 1){
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "查到多条销售出库单");
|
||||
returnObject.put("errormsg", "查到销售出库单错误");
|
||||
return returnObject;
|
||||
}
|
||||
//库存销售出库单取消签字,
|
||||
String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode(), encapsulationEntities.get(0).getUnitcode());
|
||||
boolean cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxsckqxqz"), jsonObject.getString("kcxsckqxqz").substring(0,6), cgrkdqxqz);
|
||||
if (!cgrkdqxqzflag) {
|
||||
JSONObject cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxsckqxqz"), jsonObject.getString("kcxsckqxqz").substring(0,6), cgrkdqxqz);
|
||||
if (!cgrkdqxqzflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存销售出库单取消签字失败");
|
||||
returnObject.put("errormsg", "库存销售出库单取消签字失败:"+cgrkdqxqzflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//库存销售出库单删除
|
||||
String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode(), encapsulationEntities.get(0).getUnitcode());
|
||||
boolean cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxscksc"), jsonObject.getString("kcxscksc").substring(0,6), cgrkdsc);
|
||||
if (!cgrkdscfiag) {
|
||||
JSONObject cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcxscksc"), jsonObject.getString("kcxscksc").substring(0,6), cgrkdsc);
|
||||
if (!cgrkdscfiag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存销售出库单删除失败");
|
||||
returnObject.put("errormsg", "库存销售出库单删除失败:"+cgrkdscfiag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//销售订单取消审批,,
|
||||
String cgddqs = getsendBody("3", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddqxsp"), jsonObject.getString("xsddqxsp").substring(0,6), cgddqs);
|
||||
if (!cgddqsflag) {
|
||||
JSONObject cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddqxsp"), jsonObject.getString("xsddqxsp").substring(0,6), cgddqs);
|
||||
if (!cgddqsflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "销售订单取消审批失败");
|
||||
returnObject.put("errormsg", "销售订单取消审批失败:"+cgddqsflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//销售订单删除
|
||||
String cgddsc = getsendBody("4", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddsc"), jsonObject.getString("xsddsc").substring(0,6), cgddsc);
|
||||
if (cgddscflag) {
|
||||
returnObject.put("status", "success");
|
||||
returnObject.put("errormsg", "销售订单删除成功");
|
||||
return returnObject;
|
||||
JSONObject cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddsc"), jsonObject.getString("xsddsc").substring(0,6), cgddsc);
|
||||
if (cgddscflag.getBoolean("flag")) {
|
||||
//oa删除合同
|
||||
String scht = getsendBody("5", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
JSONObject schtflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsht"), jsonObject.getString("xsht").substring(0,6), scht);
|
||||
if (schtflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "success");
|
||||
returnObject.put("errormsg", "销售订单删除成功");
|
||||
return returnObject;
|
||||
} else {
|
||||
returnObject.put("status", "success");
|
||||
returnObject.put("errormsg", "销售订单删除成功,oa合同删除失败:"+schtflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
} else {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "销售订单删除失败");
|
||||
returnObject.put("errormsg", "销售订单删除失败:"+cgddscflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
}
|
||||
|
@ -483,6 +500,7 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
jsonObject.put("kcxscksc",headers.get("kcxscksc"));
|
||||
jsonObject.put("xsddqxsp",headers.get("xsddqxsp"));
|
||||
jsonObject.put("xsddsc",headers.get("xsddsc"));
|
||||
jsonObject.put("xsht",headers.get("xsht"));
|
||||
entity.setBodys(jsonObject.toJSONString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -587,7 +605,7 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
List<EncapsulationEntity> rklist = encapsulationDao.queryCgrkddh(rk);
|
||||
if(rklist == null || rklist.size() != 1){
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "查到多条调拨入库单");
|
||||
returnObject.put("errormsg", "查到调拨入库单错误");
|
||||
return returnObject;
|
||||
}
|
||||
//根据调拨订单号查询调拨出库
|
||||
|
@ -598,55 +616,55 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
List<EncapsulationEntity> cklist = encapsulationDao.queryCgrkddh(ck);
|
||||
if(cklist == null || cklist.size() != 1){
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "查到多条调拨出库单");
|
||||
returnObject.put("errormsg", "查到调拨出库单错误");
|
||||
return returnObject;
|
||||
}
|
||||
//调拨入库取消签字
|
||||
String dbrk = getsendBody("1", jsonObject, rklist.get(0).getCode(),rklist.get(0).getUnitcode());
|
||||
boolean dbrkflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrkqxqz"), jsonObject.getString("dbrkqxqz").substring(0,6), dbrk);
|
||||
if (!dbrkflag) {
|
||||
JSONObject dbrkflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrkqxqz"), jsonObject.getString("dbrkqxqz").substring(0,6), dbrk);
|
||||
if (!dbrkflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "调拨入库取消签字失败");
|
||||
returnObject.put("errormsg", "调拨入库取消签字失败:"+dbrkflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//调拨入库删除
|
||||
String dbrksc = getsendBody("2", jsonObject, rklist.get(0).getCode(), rklist.get(0).getUnitcode());
|
||||
boolean dbrkscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrksc"), jsonObject.getString("dbrksc").substring(0,6), dbrksc);
|
||||
if (!dbrkscflag) {
|
||||
JSONObject dbrkscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbrksc"), jsonObject.getString("dbrksc").substring(0,6), dbrksc);
|
||||
if (!dbrkscflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "调拨入库删除失败");
|
||||
returnObject.put("errormsg", "调拨入库删除失败:"+dbrkscflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//库存调拨出库取消签字
|
||||
String dbck = getsendBody("1", jsonObject, cklist.get(0).getCode(), cklist.get(0).getUnitcode());
|
||||
boolean dbckflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbckqxqz"), jsonObject.getString("kcdbckqxqz").substring(0,6), dbck);
|
||||
if (!dbckflag) {
|
||||
JSONObject dbckflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbckqxqz"), jsonObject.getString("kcdbckqxqz").substring(0,6), dbck);
|
||||
if (!dbckflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存调拨出库取消签字失败");
|
||||
returnObject.put("errormsg", "库存调拨出库取消签字失败:"+dbckflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//库存调拨出库删除
|
||||
String dbcksc = getsendBody("2", jsonObject, cklist.get(0).getCode(), cklist.get(0).getUnitcode());
|
||||
boolean dbckscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbcksc"), jsonObject.getString("kcdbcksc").substring(0,6), dbcksc);
|
||||
if (!dbckscflag) {
|
||||
JSONObject dbckscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcdbcksc"), jsonObject.getString("kcdbcksc").substring(0,6), dbcksc);
|
||||
if (!dbckscflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存调拨出库删除失败");
|
||||
returnObject.put("errormsg", "库存调拨出库删除失败:"+dbckscflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//调拨订单弃审
|
||||
String dbdd = getsendBody("3", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean dbddflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddqs"), jsonObject.getString("dbddqs").substring(0,6), dbdd);
|
||||
if (!dbddflag) {
|
||||
JSONObject dbddflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddqs"), jsonObject.getString("dbddqs").substring(0,6), dbdd);
|
||||
if (!dbddflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "调拨订单弃审失败");
|
||||
returnObject.put("errormsg", "调拨订单弃审失败:"+dbddflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//调拨订单删除
|
||||
String dbddsc = getsendBody("4", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean dbddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddsc"), jsonObject.getString("dbddsc").substring(0,6), dbddsc);
|
||||
if (!dbddscflag) {
|
||||
JSONObject dbddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("dbddsc"), jsonObject.getString("dbddsc").substring(0,6), dbddsc);
|
||||
if (!dbddscflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "调拨订单删除失败");
|
||||
returnObject.put("errormsg", "调拨订单删除失败:"+dbddscflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
|
||||
|
@ -762,18 +780,18 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
|
||||
//库存产成品入库单取消签字
|
||||
String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprkqxqz"), jsonObject.getString("kcccprkqxqz").substring(0,6), qxqz);
|
||||
if (!qxqzflag) {
|
||||
JSONObject qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprkqxqz"), jsonObject.getString("kcccprkqxqz").substring(0,6), qxqz);
|
||||
if (!qxqzflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存产成品入库单取消签字失败");
|
||||
returnObject.put("errormsg", "库存产成品入库单取消签字失败:"+qxqzflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//库存产成品入库单删除
|
||||
String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprksc"), jsonObject.getString("kcccprksc").substring(0,6), sc);
|
||||
if (!scflag) {
|
||||
JSONObject scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("kcccprksc"), jsonObject.getString("kcccprksc").substring(0,6), sc);
|
||||
if (!scflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存产成品入库单删除失败");
|
||||
returnObject.put("errormsg", "库存产成品入库单删除失败:"+scflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
|
||||
|
@ -884,18 +902,18 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
|
||||
//库存材料出库取消签字
|
||||
String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz);
|
||||
if (!qxqzflag) {
|
||||
JSONObject qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz);
|
||||
if (!qxqzflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存材料出库取消签字失败");
|
||||
returnObject.put("errormsg", "库存材料出库取消签字失败:"+qxqzflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//库存材料出库单删除
|
||||
String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc);
|
||||
if (!scflag) {
|
||||
JSONObject scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc);
|
||||
if (!scflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存材料出库单删除失败");
|
||||
returnObject.put("errormsg", "库存材料出库单删除失败:"+scflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
|
||||
|
@ -1004,18 +1022,18 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
|
||||
//库存其他出库取消签字
|
||||
String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz);
|
||||
if (!qxqzflag) {
|
||||
JSONObject qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz);
|
||||
if (!qxqzflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存其他出库取消签字失败");
|
||||
returnObject.put("errormsg", "库存其他出库取消签字失败:"+qxqzflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//库存其他出库删除
|
||||
String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc);
|
||||
if (!scflag) {
|
||||
JSONObject scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc);
|
||||
if (!scflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存其他出库删除失败");
|
||||
returnObject.put("errormsg", "库存其他出库删除失败:"+scflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
|
||||
|
@ -1124,18 +1142,18 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
|
||||
//库存其他入库单取消签字
|
||||
String qxqz = getsendBody("1", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz);
|
||||
if (!qxqzflag) {
|
||||
JSONObject qxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("qxqzApi"), jsonObject.getString("qxqzApi").substring(0,6), qxqz);
|
||||
if (!qxqzflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存其他入库单取消签字失败");
|
||||
returnObject.put("errormsg", "库存其他入库单取消签字失败:"+qxqzflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//库存其他入库删除
|
||||
String sc = getsendBody("2", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
boolean scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc);
|
||||
if (!scflag) {
|
||||
JSONObject scflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("scApi"), jsonObject.getString("scApi").substring(0,6), sc);
|
||||
if (!scflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "库存其他入库删除失败");
|
||||
returnObject.put("errormsg", "库存其他入库删除失败:"+scflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
returnObject.put("status", "success");
|
||||
|
@ -1236,6 +1254,11 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
jsonObject1.put("deleteinfo", unsignInfo4);
|
||||
jsonObject1.put("queryinfo", queryInfo4);
|
||||
break;
|
||||
case "5": //删除 oa销售合同
|
||||
jsonObject1.put("formCode", "formmain_0047");
|
||||
jsonObject1.put("fieldName", "field0001");
|
||||
jsonObject1.put("fieldValue", code);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
return jsonObject1.toJSONString();
|
||||
|
@ -1252,7 +1275,9 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
* @Description 发送接口
|
||||
* @Date 3:05 下午 2024/9/4
|
||||
**/
|
||||
private boolean sendPost(String publicKey, String secretKey, String apiCode, String appId, String bodys) {
|
||||
private JSONObject sendPost(String publicKey, String secretKey, String apiCode, String appId, String bodys) {
|
||||
|
||||
JSONObject reeturnObject = new JSONObject();
|
||||
|
||||
StringBuilder returnBody = new StringBuilder();
|
||||
Integer outTime = 6000;
|
||||
|
@ -1304,17 +1329,316 @@ public class EncapsulationImpl extends BaseService<EncapsulationEntity, String>
|
|||
if (JSONUtil.isTypeJSON(returnBody.toString())) {
|
||||
JSONObject jsonObject1 = JSONObject.parseObject(returnBody.toString());
|
||||
if (jsonObject1.getString("status") != null && "200".equals(jsonObject1.getString("status"))) {
|
||||
return true;
|
||||
reeturnObject.put("flag",true);
|
||||
return reeturnObject;
|
||||
} else {
|
||||
return false;
|
||||
reeturnObject.put("flag",false);
|
||||
reeturnObject.put("msg",jsonObject1.getJSONObject("attribute").getString("errormsg"));
|
||||
return reeturnObject;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
reeturnObject.put("flag",false);
|
||||
reeturnObject.put("msg",returnBody);
|
||||
return reeturnObject;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
reeturnObject.put("flag",false);
|
||||
reeturnObject.put("msg","返回数据为空");
|
||||
return reeturnObject;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return java.lang.Object
|
||||
* @Author lvleigang
|
||||
* @Description 委外订单删除接口 8000350092
|
||||
* 0、根据委外订单号查询加工入库单号,1、委外加工入库单取消签字 8000350088 ,2、委外加工入库删除 8000350089,3、委外订单弃审 8000350090,4、委外订单删除 8000350091
|
||||
* @Date 9:44 上午 2024/9/4
|
||||
**/
|
||||
@Override
|
||||
public Object processingOrderDelete(JSONObject object) {
|
||||
JSONObject returnObject = new JSONObject();
|
||||
|
||||
JSONObject jsonObject = getData("jsonStr", object, JSONObject.class);
|
||||
//判断是否存在参数
|
||||
if (!checkStr(jsonObject.getString("code"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "单据号为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("corp"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "公司为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("date_begin"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "单据开始日期为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("date_end"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "单据结束日期为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("coperator"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "操作员为空");
|
||||
return returnObject;
|
||||
}
|
||||
|
||||
if (!checkStr(jsonObject.getString("wwjgrkqxqz"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "委外加工入库单取消签字接口编号为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("wwjgrksc"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "委外加工入库删除接口编号为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("wwddqs"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "委外订单弃审接口编号为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("wwddsc"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "委外订单删除接口编号为空");
|
||||
return returnObject;
|
||||
}
|
||||
|
||||
if (!checkStr(jsonObject.getString("dataSourceCode"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "数据源编码为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("publicKey"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "publicKey为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("secretKey"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "secretKey为空");
|
||||
return returnObject;
|
||||
}
|
||||
//根据委外订单号查询委外加工入库单号
|
||||
EncapsulationEntity encapsulationEntity = new EncapsulationEntity();
|
||||
encapsulationEntity.setCode(jsonObject.getString("code"));
|
||||
encapsulationEntity.setDataSourceCode(jsonObject.getString("dataSourceCode"));
|
||||
encapsulationEntity.setCbilltypecode("47");
|
||||
List<EncapsulationEntity> encapsulationEntities = encapsulationDao.queryCgrkddh(encapsulationEntity);
|
||||
//List<EncapsulationEntity> encapsulationEntities = new ArrayList<>();
|
||||
//EncapsulationEntity encapsulationEntity1 = new EncapsulationEntity();
|
||||
//encapsulationEntity1.setCode("WW2411110007");
|
||||
//encapsulationEntity1.setUnitcode("001");
|
||||
//encapsulationEntities.add(encapsulationEntity1);
|
||||
if(encapsulationEntities == null || encapsulationEntities.size() != 1){
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "查到委外加工入库错误");
|
||||
return returnObject;
|
||||
}
|
||||
//执行委外加工入库单取消签字接口
|
||||
String cgrkdqxqz = getsendBody("1", jsonObject, encapsulationEntities.get(0).getCode(),encapsulationEntities.get(0).getUnitcode());
|
||||
JSONObject cgrkdqxqzflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("wwjgrkqxqz"), jsonObject.getString("wwjgrkqxqz").substring(0,6), cgrkdqxqz);
|
||||
if (!cgrkdqxqzflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "委外加工入库单取消签字失败:"+cgrkdqxqzflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//执行委外加工入库单删除
|
||||
String cgrkdsc = getsendBody("2", jsonObject, encapsulationEntities.get(0).getCode(),encapsulationEntities.get(0).getUnitcode());
|
||||
JSONObject cgrkdscfiag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("wwjgrksc"), jsonObject.getString("wwjgrksc").substring(0,6), cgrkdsc);
|
||||
if (!cgrkdscfiag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "委外加工入库单删除失败:"+cgrkdscfiag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//执行委外订单弃审
|
||||
String cgddqs = getsendBody("3", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
JSONObject cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("wwddqs"), jsonObject.getString("wwddqs").substring(0,6), cgddqs);
|
||||
if (!cgddqsflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "委外订单弃审失败:"+cgddqsflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//执行委外订单删除
|
||||
String cgddsc = getsendBody("4", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
JSONObject cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("wwddsc"), jsonObject.getString("wwddsc").substring(0,6), cgddsc);
|
||||
if (cgddscflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "success");
|
||||
returnObject.put("errormsg", "委外订单删除成功");
|
||||
return returnObject;
|
||||
} else {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "委外订单删除失败:"+cgddscflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param entity
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 数据表
|
||||
* @Date 11:52 上午 2024/3/27
|
||||
**/
|
||||
@Override
|
||||
public SysExtensionApiEntity addProcessingOrderDelete(SysExtensionApiEntity entity) {
|
||||
try {
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
SysApplicationEntity applicationEntity = entity.getReceiveApp();
|
||||
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());
|
||||
jsonObject.put("publicKey",entity.getSendApp().getPublicKey());
|
||||
jsonObject.put("secretKey",entity.getSendApp().getSecretKey());
|
||||
|
||||
jsonObject.put("wwjgrkqxqz",headers.get("wwjgrkqxqz"));
|
||||
jsonObject.put("wwjgrksc",headers.get("wwjgrksc"));
|
||||
jsonObject.put("wwddqs",headers.get("wwddqs"));
|
||||
jsonObject.put("wwddsc",headers.get("wwddsc"));
|
||||
entity.setBodys(jsonObject.toJSONString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
/**
|
||||
* @param object
|
||||
* @return java.lang.Object
|
||||
* @Author lvleigang
|
||||
* @Description 销售订单删除接口 8000350082
|
||||
* 1、销售订单取消审批 8000350064 ,2、销售订单删除 8000350065
|
||||
* @Date 9:44 上午 2024/9/4
|
||||
**/
|
||||
@Override
|
||||
public Object xsddDelete(JSONObject object) {
|
||||
JSONObject returnObject = new JSONObject();
|
||||
|
||||
JSONObject jsonObject = getData("jsonStr", object, JSONObject.class);
|
||||
//判断是否存在参数
|
||||
if (!checkStr(jsonObject.getString("code"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "单据号为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("corp"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "公司为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("date_begin"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "单据开始日期为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("date_end"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "单据结束日期为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("coperator"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "操作员为空");
|
||||
return returnObject;
|
||||
}
|
||||
|
||||
if (!checkStr(jsonObject.getString("xsddqxsp"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "销售订单取消审批接口编号为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("xsddsc"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "销售订单删除接口编号为空");
|
||||
return returnObject;
|
||||
}
|
||||
|
||||
if (!checkStr(jsonObject.getString("dataSourceCode"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "数据源编码为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("publicKey"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "publicKey为空");
|
||||
return returnObject;
|
||||
}
|
||||
if (!checkStr(jsonObject.getString("secretKey"))) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "secretKey为空");
|
||||
return returnObject;
|
||||
}
|
||||
//销售订单取消审批,,
|
||||
String cgddqs = getsendBody("3", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
JSONObject cgddqsflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddqxsp"), jsonObject.getString("xsddqxsp").substring(0,6), cgddqs);
|
||||
if (!cgddqsflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "销售订单取消审批失败:"+cgddqsflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
//销售订单删除
|
||||
String cgddsc = getsendBody("4", jsonObject, jsonObject.getString("code"), jsonObject.getString("corp"));
|
||||
JSONObject cgddscflag = sendPost(jsonObject.getString("publicKey"), jsonObject.getString("secretKey"), jsonObject.getString("xsddsc"), jsonObject.getString("xsddsc").substring(0,6), cgddsc);
|
||||
if (cgddscflag.getBoolean("flag")) {
|
||||
returnObject.put("status", "success");
|
||||
returnObject.put("errormsg", "销售订单删除成功");
|
||||
return returnObject;
|
||||
} else {
|
||||
returnObject.put("status", "falied");
|
||||
returnObject.put("errormsg", "销售订单删除失败:"+cgddscflag.getString("msg"));
|
||||
return returnObject;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param entity
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 数据表
|
||||
* @Date 11:52 上午 2024/3/27
|
||||
**/
|
||||
@Override
|
||||
public SysExtensionApiEntity addxsddDelete(SysExtensionApiEntity entity) {
|
||||
try {
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
SysApplicationEntity applicationEntity = entity.getReceiveApp();
|
||||
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());
|
||||
jsonObject.put("publicKey",entity.getSendApp().getPublicKey());
|
||||
jsonObject.put("secretKey",entity.getSendApp().getSecretKey());
|
||||
|
||||
jsonObject.put("xsddqxsp",headers.get("xsddqxsp"));
|
||||
jsonObject.put("xsddsc",headers.get("xsddsc"));
|
||||
entity.setBodys(jsonObject.toJSONString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.hzya.frame.u8c.salesBilling.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.u8c.salesBilling.entity.U8cSalesBillingEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 脚本表(u8c_sales_billing: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-02 11:07:43
|
||||
*/
|
||||
public interface IU8cSalesBillingDao extends IBaseDao<U8cSalesBillingEntity, String> {
|
||||
List<U8cSalesBillingEntity> queryDoSalesBilling(U8cSalesBillingEntity entity);
|
||||
|
||||
int updateDoSalesBilling(U8cSalesBillingEntity entity);
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.hzya.frame.u8c.salesBilling.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.u8c.salesBilling.dao.IU8cSalesBillingDao;
|
||||
import com.hzya.frame.u8c.salesBilling.entity.U8cSalesBillingEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository(value = "U8cSalesBillingDaoImpl")
|
||||
public class U8cSalesBillingDaoImpl extends MybatisGenericDao<U8cSalesBillingEntity, String> implements IU8cSalesBillingDao{
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public List<U8cSalesBillingEntity> queryDoSalesBilling(U8cSalesBillingEntity entity) {
|
||||
List<U8cSalesBillingEntity> o = (List<U8cSalesBillingEntity>) super.selectList(getSqlIdPrifx() + "queryDoSalesBilling", entity);
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public int updateDoSalesBilling(U8cSalesBillingEntity entity) {
|
||||
Integer o = super.update(getSqlIdPrifx() + "updateDoSalesBilling", entity);
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
package com.hzya.frame.u8c.salesBilling.entity;
|
||||
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
public class U8cSalesBillingEntity extends BaseEntity {
|
||||
|
||||
/** 单据号 */
|
||||
private String code;
|
||||
/** 公司编码 */
|
||||
private String corp;
|
||||
/** 单据开始日期 */
|
||||
private String dateBegin;
|
||||
/** 单据结束日期 */
|
||||
private String dateEnd;
|
||||
/** 审批人 */
|
||||
private String approvid;
|
||||
/** 审核时间 */
|
||||
private String approvedate;
|
||||
/** 审批状态(Y:通过,N:不通过,R:驳回) */
|
||||
private String status;
|
||||
/** 批语 */
|
||||
private String note;
|
||||
//数据源
|
||||
private String dataSourceCode;
|
||||
//推送状态 Y成功N失败
|
||||
private String pushStatus;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCorp() {
|
||||
return corp;
|
||||
}
|
||||
|
||||
public void setCorp(String corp) {
|
||||
this.corp = corp;
|
||||
}
|
||||
|
||||
public String getDateBegin() {
|
||||
return dateBegin;
|
||||
}
|
||||
|
||||
public void setDateBegin(String dateBegin) {
|
||||
this.dateBegin = dateBegin;
|
||||
}
|
||||
|
||||
public String getDateEnd() {
|
||||
return dateEnd;
|
||||
}
|
||||
|
||||
public void setDateEnd(String dateEnd) {
|
||||
this.dateEnd = dateEnd;
|
||||
}
|
||||
|
||||
public String getApprovid() {
|
||||
return approvid;
|
||||
}
|
||||
|
||||
public void setApprovid(String approvid) {
|
||||
this.approvid = approvid;
|
||||
}
|
||||
|
||||
public String getApprovedate() {
|
||||
return approvedate;
|
||||
}
|
||||
|
||||
public void setApprovedate(String approvedate) {
|
||||
this.approvedate = approvedate;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDataSourceCode() {
|
||||
return dataSourceCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDataSourceCode(String dataSourceCode) {
|
||||
this.dataSourceCode = dataSourceCode;
|
||||
}
|
||||
|
||||
public String getPushStatus() {
|
||||
return pushStatus;
|
||||
}
|
||||
|
||||
public void setPushStatus(String pushStatus) {
|
||||
this.pushStatus = pushStatus;
|
||||
}
|
||||
}
|
||||
|
|
@ -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.u8c.salesBilling.dao.impl.U8cSalesBillingDaoImpl">
|
||||
|
||||
<resultMap id="get-U8cSalesBillingEntity-result" type="com.hzya.frame.u8c.salesBilling.entity.U8cSalesBillingEntity" >
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
<result property="corp" column="corp" jdbcType="VARCHAR"/>
|
||||
<result property="dateBegin" column="date_begin" jdbcType="VARCHAR"/>
|
||||
<result property="dateEnd" column="date_end" jdbcType="VARCHAR"/>
|
||||
<result property="approvid" column="approvid" jdbcType="VARCHAR"/>
|
||||
<result property="approvedate" column="approveDate" jdbcType="VARCHAR"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
<result property="note" column="note" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="queryDoSalesBilling" resultType="com.hzya.frame.u8c.salesBilling.entity.U8cSalesBillingEntity" parameterType = "com.hzya.frame.u8c.salesBilling.entity.U8cSalesBillingEntity">
|
||||
SELECT
|
||||
formmain_0049.id as id,
|
||||
formmain_0049.field0001 as code, -- 单据号
|
||||
formmain_0049.field0045 as corp, -- 公司编码
|
||||
CONVERT(varchar,formmain_0049.start_date, 23) as dateBegin,-- 单据开始日期
|
||||
CONVERT(varchar,formmain_0049.modify_date, 23) as dateEnd, -- 单据结束日期
|
||||
'15715849962' as approvid, -- 审批人
|
||||
CONVERT(varchar,formmain_0049.modify_date, 23) as approvedate, -- 审核时间
|
||||
case when COL_SUMMARY.STATE = '1' then 'R' when COL_SUMMARY.STATE = '3' then 'Y' ELSE 'Y' END as status, -- 审批状态(Y:通过,N:不通过,R:驳回)
|
||||
'已阅' as note -- 批语
|
||||
FROM
|
||||
formmain_0049
|
||||
LEFT JOIN COL_SUMMARY ON COL_SUMMARY.FORM_RECORDID = formmain_0049.id
|
||||
WHERE formmain_0049.field0044 is NULL and COL_SUMMARY.STATE in ( '1','3','0')
|
||||
and formmain_0049.finishedflag = 1
|
||||
</select>
|
||||
<update id="updateDoSalesBilling" parameterType="com.hzya.frame.u8c.salesBilling.entity.U8cSalesBillingEntity">
|
||||
update formmain_0049 set
|
||||
field0044 = #{pushStatus}
|
||||
where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hzya.frame.u8c.salesBilling.service;
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.u8c.salesBilling.entity.U8cSalesBillingEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IU8cSalesBillingService extends IBaseService<U8cSalesBillingEntity, String> {
|
||||
List<U8cSalesBillingEntity> queryDoSalesBilling(U8cSalesBillingEntity u8cSalesBillingEntity);
|
||||
|
||||
int updateDoSalesBilling(U8cSalesBillingEntity entity);
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.hzya.frame.u8c.salesBilling.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.mdm.mdmModule.dao.IMdmModuleDao;
|
||||
import com.hzya.frame.u8c.salesBilling.dao.IU8cSalesBillingDao;
|
||||
import com.hzya.frame.u8c.salesBilling.entity.U8cSalesBillingEntity;
|
||||
import com.hzya.frame.u8c.salesBilling.service.IU8cSalesBillingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service(value = "u8cSalesBillingService")
|
||||
public class U8cSalesBillingServiceImpl extends BaseService<U8cSalesBillingEntity, String> implements IU8cSalesBillingService {
|
||||
|
||||
private IU8cSalesBillingDao u8cSalesBillingDao;
|
||||
|
||||
@Autowired
|
||||
public void setU8cSalesBillingDao(IU8cSalesBillingDao dao) {
|
||||
this.u8cSalesBillingDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
@Override
|
||||
public List<U8cSalesBillingEntity> queryDoSalesBilling(U8cSalesBillingEntity entity) {
|
||||
List<U8cSalesBillingEntity> u8cSalesBillingEntityList = u8cSalesBillingDao.queryDoSalesBilling(entity);
|
||||
return u8cSalesBillingEntityList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateDoSalesBilling(U8cSalesBillingEntity entity) {
|
||||
return u8cSalesBillingDao.updateDoSalesBilling(entity);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue