Merge branch 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into kjs
# Conflicts: # buildpackage/pom.xml # buildpackage/src/main/resources/application-dongj.yml # buildpackage/src/main/resources/application-kjs.yml # buildpackage/src/test/java/com/hzya/frame/temButtom.java # pom.xml # service/src/main/java/com/hzya/frame/dingtalk/service/IDingTalkService.java # service/src/main/java/com/hzya/frame/dingtalk/service/impl/DingTalkServiceImpl.java # service/src/main/java/com/hzya/frame/sysnew/comparison/service/impl/ComparisonServiceImpl.java # service/src/main/java/com/hzya/frame/sysnew/grovy/service/impl/GroovyIntegrationServiceImpl.java # webapp/src/main/java/com/hzya/frame/webapp/entrance/controler/EntranceController.java
This commit is contained in:
commit
740c31fe5c
|
@ -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/
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
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;
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,14 @@ import com.hzya.frame.web.entity.BaseEntity;
|
|||
* @since 2024-06-07 18:30:04
|
||||
*/
|
||||
public class PayBillEntity extends BaseEntity {
|
||||
private String sql;
|
||||
|
||||
public String getSql() {
|
||||
return sql;
|
||||
}
|
||||
|
||||
public void setSql(String sql) {
|
||||
this.sql = sql;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
<?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>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
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");
|
||||
//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,60 @@
|
|||
package com.hzya.frame.plugin.a8bill.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.ningboBankTreasury.dto.res.AccTransactionRes;
|
||||
|
||||
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);
|
||||
|
||||
/**
|
||||
* 查询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,479 @@
|
|||
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.JSONArray;
|
||||
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 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.getField0018())))
|
||||
.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 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 {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
//审批状态对应的中文
|
||||
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);
|
||||
|
@ -543,7 +544,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
map1.put("tableName",mainDb);
|
||||
map1.put("dataStatus", "N");
|
||||
map1.put("deleteStatus", "0");
|
||||
map1.put("size", 10);
|
||||
map1.put("size", 50);
|
||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||
objects = toLowerCaseKeys(objects);
|
||||
|
||||
|
@ -738,7 +739,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
map1.put("tableName",mainDb);
|
||||
//map1.put("dataStatus", "F");
|
||||
map1.put("updateStatus", "0");
|
||||
map1.put("size", 10);
|
||||
map1.put("size", 50);
|
||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||
objects = toLowerCaseKeys(objects);
|
||||
|
||||
|
@ -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", 50);
|
||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||
objects = toLowerCaseKeys(objects);
|
||||
|
||||
|
|
|
@ -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,7 @@
|
|||
package com.hzya.frame.plugin.pushMessage.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.plugin.pushMessage.entity.PushMessageEntity;
|
||||
|
||||
public interface IPushMessageDao extends IBaseDao<PushMessageEntity, String> {
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.hzya.frame.plugin.pushMessage.dao.impl;
|
||||
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.plugin.pushMessage.dao.IPushMessageDao;
|
||||
import com.hzya.frame.plugin.pushMessage.entity.PushMessageEntity;
|
||||
|
||||
public class PushMessageDaoImpl extends MybatisGenericDao<PushMessageEntity, String> implements IPushMessageDao {
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
package com.hzya.frame.plugin.pushMessage.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
public class PushMessageEntity extends BaseEntity {
|
||||
|
||||
private String pushMethod;
|
||||
private String warningAppCode;
|
||||
private String warningApiCode;
|
||||
private String recipientIdList;
|
||||
private String warningAppType;
|
||||
private String sendAppName;
|
||||
private String receiveAppName;
|
||||
private String receiveApiName;
|
||||
private String returnData;
|
||||
private String receiveApiCode;
|
||||
private String status;
|
||||
|
||||
public String getPushMethod() {
|
||||
return pushMethod;
|
||||
}
|
||||
|
||||
public void setPushMethod(String pushMethod) {
|
||||
this.pushMethod = pushMethod;
|
||||
}
|
||||
|
||||
public String getWarningAppCode() {
|
||||
return warningAppCode;
|
||||
}
|
||||
|
||||
public void setWarningAppCode(String warningAppCode) {
|
||||
this.warningAppCode = warningAppCode;
|
||||
}
|
||||
|
||||
public String getWarningApiCode() {
|
||||
return warningApiCode;
|
||||
}
|
||||
|
||||
public void setWarningApiCode(String warningApiCode) {
|
||||
this.warningApiCode = warningApiCode;
|
||||
}
|
||||
|
||||
public String getRecipientIdList() {
|
||||
return recipientIdList;
|
||||
}
|
||||
|
||||
public void setRecipientIdList(String recipientIdList) {
|
||||
this.recipientIdList = recipientIdList;
|
||||
}
|
||||
|
||||
public String getWarningAppType() {
|
||||
return warningAppType;
|
||||
}
|
||||
|
||||
public void setWarningAppType(String warningAppType) {
|
||||
this.warningAppType = warningAppType;
|
||||
}
|
||||
|
||||
public String getSendAppName() {
|
||||
return sendAppName;
|
||||
}
|
||||
|
||||
public void setSendAppName(String sendAppName) {
|
||||
this.sendAppName = sendAppName;
|
||||
}
|
||||
|
||||
public String getReceiveAppName() {
|
||||
return receiveAppName;
|
||||
}
|
||||
|
||||
public void setReceiveAppName(String receiveAppName) {
|
||||
this.receiveAppName = receiveAppName;
|
||||
}
|
||||
|
||||
public String getReceiveApiName() {
|
||||
return receiveApiName;
|
||||
}
|
||||
|
||||
public void setReceiveApiName(String receiveApiName) {
|
||||
this.receiveApiName = receiveApiName;
|
||||
}
|
||||
|
||||
public String getReturnData() {
|
||||
return returnData;
|
||||
}
|
||||
|
||||
public void setReturnData(String returnData) {
|
||||
this.returnData = returnData;
|
||||
}
|
||||
|
||||
public String getReceiveApiCode() {
|
||||
return receiveApiCode;
|
||||
}
|
||||
|
||||
public void setReceiveApiCode(String receiveApiCode) {
|
||||
this.receiveApiCode = receiveApiCode;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?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.pushMessage.dao.impl.PushMessageDaoImpl">
|
||||
|
||||
<resultMap id="get-PushMessageEntity-result" type="com.hzya.frame.plugin.pushMessage.entity.PushMessageEntity" >
|
||||
<result property="pushMessage" column="push_message" jdbcType="VARCHAR"/>
|
||||
<result property="warningAppCode" column="warning_app_code" jdbcType="VARCHAR"/>
|
||||
<result property="warningApiCode" column="warning_api_code" jdbcType="VARCHAR"/>
|
||||
<result property="appType" column="app_type" jdbcType="VARCHAR"/>
|
||||
<result property="recipientIdList" column="recipient_id_list" jdbcType="VARCHAR"/>
|
||||
<result property="sendAppName" column="send_app_name" jdbcType="VARCHAR"/>
|
||||
<result property="receiveAppName" column="receive_app_name" jdbcType="VARCHAR"/>
|
||||
<result property="receiveApiName" column="receive_api_name" jdbcType="VARCHAR"/>
|
||||
<result property="receiveApiCode" column="receive_api_code" jdbcType="VARCHAR"/>
|
||||
<result property="returnData" column="return_data" jdbcType="VARCHAR"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-PushMessageEntity-result" parameterType = "com.hzya.frame.plugin.pushMessage.entity.PushMessageEntity">
|
||||
SELECT
|
||||
warning_config.push_method,
|
||||
warning_config.sendAppid AS warning_app_code,
|
||||
warning_config.endApiCode AS warning_api_code,
|
||||
warning_config.app_type,
|
||||
warning_config.recipient_id AS recipient_id_list,
|
||||
log.send_app_name,
|
||||
log.receive_app_name,
|
||||
receive_api_name,
|
||||
log.receive_api_code,
|
||||
log.return_data,
|
||||
log.STATUS
|
||||
FROM
|
||||
v_hzya_sys_warning warning_config
|
||||
LEFT JOIN v_hzya_sys_send_message_log log ON warning_config.api_code = log.receive_api_code
|
||||
WHERE
|
||||
log.STATUS = '4'
|
||||
AND warning_config.push_method = '定时'
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.hzya.frame.plugin.pushMessage.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.pushMessage.dao.IPushMessageDao;
|
||||
import com.hzya.frame.plugin.pushMessage.entity.PushMessageEntity;
|
||||
import com.hzya.frame.sysnew.comparison.masterData.service.IMasterDataService;
|
||||
import com.hzya.frame.sysnew.pushMessage.dao.ISysPushMessageDao;
|
||||
import com.hzya.frame.sysnew.pushMessage.entity.SysPushMessageEntity;
|
||||
import com.hzya.frame.sysnew.pushMessage.service.ISysPushMessageService;
|
||||
import com.hzya.frame.sysnew.sendMessageLog.service.ISysSendMessageLogService;
|
||||
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.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service("PushMessagePluginInitializer")
|
||||
public class PushMessagePluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(PushMessagePluginInitializer.class);
|
||||
|
||||
@Autowired
|
||||
private ISysPushMessageDao sysPushMessageDao;
|
||||
|
||||
@Resource
|
||||
public ISysSendMessageLogService sysSendMessageLogService;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "PushMessagePlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "PushMessagePlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "PushMessagePlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
try {
|
||||
logger.info("======开始执行定时消息推送========");
|
||||
List<SysPushMessageEntity> list = sysPushMessageDao.getAll();
|
||||
|
||||
for(SysPushMessageEntity entity : list){
|
||||
sysSendMessageLogService.sendMessage(entity);
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("定时推送消息成功");
|
||||
}catch (Exception e){
|
||||
logger.info("======执行定时消息推送失败:{}========",e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.hzya.frame.plugin.pushMessage.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.plugin.pushMessage.entity.PushMessageEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface IPushMessageService extends IBaseService<PushMessageEntity, String> {
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.hzya.frame.plugin.pushMessage.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.plugin.pushMessage.dao.IPushMessageDao;
|
||||
import com.hzya.frame.plugin.pushMessage.entity.PushMessageEntity;
|
||||
import com.hzya.frame.plugin.pushMessage.service.IPushMessageService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PushMessageServiceImpl extends BaseService<PushMessageEntity, String> implements IPushMessageService {
|
||||
|
||||
private IPushMessageDao pushMessageDao;
|
||||
|
||||
@Autowired
|
||||
public void setPushMessageDao(IPushMessageDao dao) {
|
||||
this.pushMessageDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
}
|
|
@ -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,161 @@
|
|||
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());//单据结束日期
|
||||
approveinfo.put("approvid", entity.getApprovid());//审批人
|
||||
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,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,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>
|
|
@ -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("脚本参数:{}",parameterJson);
|
||||
logger.info("执行脚本结束:"+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");
|
||||
|
|
|
@ -49,7 +49,7 @@ public class OerDjmlExtServiceImpl implements IOerDjmlExtService {
|
|||
Logger logger = LoggerFactory.getLogger(getClass());
|
||||
@Autowired
|
||||
private RestUtil restUtil;
|
||||
@Value("${savefile.path}")
|
||||
@Value("${savefile.path:}")
|
||||
public String DSK;
|
||||
@Autowired
|
||||
private ISysApplicationDatabaseService sysApplicationDatabaseService;
|
||||
|
|
|
@ -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,51 @@
|
|||
package com.hzya.frame.seeyon.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity;
|
||||
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
||||
import com.hzya.frame.seeyon.paybill.entity.PayBillEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @content OA字段配置表DAO
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 16:00
|
||||
*
|
||||
*/
|
||||
|
||||
public interface ICapFormDefinitionDao extends IBaseDao<CapFormDefinitionEntity,String> {
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 通过模版编号获取无流程表单配置信息
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 16:02
|
||||
*
|
||||
*/
|
||||
List<CapFormDefinitionEntity> getFormFiled(CapFormDefinitionEntity fieldInfo);
|
||||
/**
|
||||
*
|
||||
* @content 通过主键删除单据数据
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 17:04
|
||||
*
|
||||
*/
|
||||
|
||||
int deleteByKey(CapFormDefinitionEntity fieldInfo);
|
||||
/**
|
||||
*
|
||||
* @content 通过客户传递的数据值查询古河条件的数据
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 17:05
|
||||
*
|
||||
*/
|
||||
|
||||
List<CapFormDefinitionEntity> getFormFiledByFileValue(CapFormDefinitionEntity fieldInfo);
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.hzya.frame.seeyon.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.seeyon.dao.ICapFormDefinitionDao;
|
||||
import com.hzya.frame.seeyon.dao.ICtpFileDao;
|
||||
import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity;
|
||||
import com.hzya.frame.seeyon.entity.CtpFileEntity;
|
||||
import com.hzya.frame.seeyon.paybill.entity.PayBillEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @content OA字段配置表DAO
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 16:00
|
||||
*
|
||||
*/
|
||||
@Repository(value = "CapFormDefinitionDaoImpl")
|
||||
public class CapFormDefinitionDaoImpl extends MybatisGenericDao<CapFormDefinitionEntity,String> implements ICapFormDefinitionDao {
|
||||
@DS("#fieldInfo.dataSourceCode")
|
||||
@Override
|
||||
public List<CapFormDefinitionEntity> getFormFiled(CapFormDefinitionEntity fieldInfo) {
|
||||
return (List<CapFormDefinitionEntity>) selectList("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_list_base",fieldInfo);
|
||||
}
|
||||
@DS("#fieldInfo.dataSourceCode")
|
||||
@Override
|
||||
public int deleteByKey(CapFormDefinitionEntity fieldInfo) {
|
||||
return super.delete("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_delete",fieldInfo);
|
||||
}
|
||||
@DS("#fieldInfo.dataSourceCode")
|
||||
@Override
|
||||
public List<CapFormDefinitionEntity> getFormFiledByFileValue(CapFormDefinitionEntity fieldInfo) {
|
||||
return (List<CapFormDefinitionEntity>) selectList("com.hzya.frame.seeyon.entity.CapFormDefinitionEntity.CapFormDefinitionEntity_list_table_info",fieldInfo);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,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,71 @@
|
|||
package com.hzya.frame.seeyon.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
*
|
||||
* @content OA字段配置表
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 15:48
|
||||
*
|
||||
*/
|
||||
|
||||
public class CapFormDefinitionEntity extends BaseEntity {
|
||||
private String fieldInfo;//字段属性定义
|
||||
private String viewInfo;//视图权限定义
|
||||
private String appbindInfo;//应用绑定定义
|
||||
private String tableName;//表名
|
||||
private String fieldName;//字段名称
|
||||
private String fieldValue;//字段值
|
||||
|
||||
public String getFieldValue() {
|
||||
return fieldValue;
|
||||
}
|
||||
|
||||
public void setFieldValue(String fieldValue) {
|
||||
this.fieldValue = fieldValue;
|
||||
}
|
||||
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
public String getFieldName() {
|
||||
return fieldName;
|
||||
}
|
||||
|
||||
public void setFieldName(String fieldName) {
|
||||
this.fieldName = fieldName;
|
||||
}
|
||||
|
||||
public String getFieldInfo() {
|
||||
return fieldInfo;
|
||||
}
|
||||
|
||||
public void setFieldInfo(String fieldInfo) {
|
||||
this.fieldInfo = fieldInfo;
|
||||
}
|
||||
|
||||
public String getViewInfo() {
|
||||
return viewInfo;
|
||||
}
|
||||
|
||||
public void setViewInfo(String viewInfo) {
|
||||
this.viewInfo = viewInfo;
|
||||
}
|
||||
|
||||
public String getAppbindInfo() {
|
||||
return appbindInfo;
|
||||
}
|
||||
|
||||
public void setAppbindInfo(String appbindInfo) {
|
||||
this.appbindInfo = appbindInfo;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.seeyon.entity.CapFormDefinitionEntity">
|
||||
<resultMap id="get-CapFormDefinitionEntity-result" type="com.hzya.frame.seeyon.entity.CapFormDefinitionEntity">
|
||||
<!--主键 -->
|
||||
<result property="id" column="id" />
|
||||
<result property="fieldInfo" column="field_info" />
|
||||
<result property="viewInfo" column="view_info" />
|
||||
<result property="appbindInfo" column="appbind_info" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<sql id="CapFormDefinitionEntity_sql">
|
||||
id,
|
||||
field_info,
|
||||
view_info,
|
||||
appbind_info
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="CapFormDefinitionEntity_list_base" resultMap="get-CapFormDefinitionEntity-result" parameterType="com.hzya.frame.seeyon.entity.CapFormDefinitionEntity">
|
||||
select
|
||||
<include refid="CapFormDefinitionEntity_sql"/>
|
||||
from
|
||||
cap_form_definition
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="appbindInfo != null and appbindInfo != ''">and APPBIND_INFO like '%${appbindInfo}%'</if>
|
||||
</trim>
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="CapFormDefinitionEntity_list_table_info" resultMap="get-CapFormDefinitionEntity-result" parameterType="com.hzya.frame.seeyon.entity.CapFormDefinitionEntity">
|
||||
select id from ${tableName} where ${fieldName} = #{fieldValue}
|
||||
</select>
|
||||
|
||||
<delete id="CapFormDefinitionEntity_delete" parameterType="com.hzya.frame.basedao.entity.RequestDisposeEntity">
|
||||
delete from ${tableName} where ${fieldName} = #{id}
|
||||
</delete>
|
||||
</mapper>
|
|
@ -0,0 +1,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;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.hzya.frame.seeyon.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 无流程表单公用service
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 14:53
|
||||
*
|
||||
*/
|
||||
public interface INoProcessService {
|
||||
/**
|
||||
*
|
||||
* @content 无流程删除通用接口
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 15:08
|
||||
*
|
||||
*/
|
||||
|
||||
JsonResultEntity DeleteProcessField(JSONObject requestData);
|
||||
}
|
|
@ -26,4 +26,11 @@ public interface ISeeyonExtService {
|
|||
* @param logEntity
|
||||
*/
|
||||
void ydcSeeyon2u8CallBack(SysMessageManageLogEntity logEntity);
|
||||
|
||||
/**
|
||||
* 东进 宁波银行交易明细保存到OA底表参数组装
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
SysExtensionApiEntity dongjAccLog(SysExtensionApiEntity entity);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
package com.hzya.frame.seeyon.service.impl;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.seeyon.dao.ICapFormDefinitionDao;
|
||||
import com.hzya.frame.seeyon.entity.CapFormDefinitionEntity;
|
||||
import com.hzya.frame.seeyon.service.INoProcessService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 无流程表单公用service
|
||||
* @className: Administrator
|
||||
* @author laborer
|
||||
* @date 2024-09-09 14:53
|
||||
*
|
||||
*/
|
||||
|
||||
@Service(value = "NoProcessServiceImpl")
|
||||
public class NoProcessServiceImpl implements INoProcessService {
|
||||
private static final Logger logger = LoggerFactory.getLogger(NoProcessServiceImpl.class);
|
||||
@Autowired
|
||||
private ICapFormDefinitionDao capFormDefinitionDao;
|
||||
@Override
|
||||
public JsonResultEntity DeleteProcessField(JSONObject requestData) {
|
||||
List<String>count =new ArrayList<>();
|
||||
JSONObject jsonStrObj = requestData.getJSONObject("jsonStr");
|
||||
String formCode = jsonStrObj.getString("formCode");
|
||||
String fieldName = jsonStrObj.getString("fieldName");
|
||||
String fieldValue = jsonStrObj.getString("fieldValue");
|
||||
if(StrUtil.isEmpty(formCode)){
|
||||
return new JsonResultEntity("表单编码不能为空:formCode",false);
|
||||
}
|
||||
if(StrUtil.isEmpty(fieldName)){
|
||||
return new JsonResultEntity("字段名称不能为空:fieldName",false);
|
||||
}
|
||||
if(StrUtil.isEmpty(fieldValue)){
|
||||
return new JsonResultEntity("字段值不能为空:fieldValue",false);
|
||||
}
|
||||
|
||||
//通过表单编号获取表单字段信息
|
||||
CapFormDefinitionEntity fieldInfo = new CapFormDefinitionEntity();
|
||||
fieldInfo.setAppbindInfo(formCode);
|
||||
fieldInfo.setDataSourceCode("djoatest");
|
||||
List<CapFormDefinitionEntity>capFormDefinitionEntityList = capFormDefinitionDao.getFormFiled(fieldInfo);
|
||||
if(CollectionUtils.isEmpty(capFormDefinitionEntityList)){
|
||||
return new JsonResultEntity("通过表单编号查询表单有误,请检查表单编号:"+formCode,false);
|
||||
}
|
||||
|
||||
try {
|
||||
capFormDefinitionEntityList.forEach(item->{
|
||||
String appbindInfo = item.getAppbindInfo();
|
||||
//格式化字段信息
|
||||
JSONObject jsonObject = JSONObject.parseObject(appbindInfo);
|
||||
boolean queryFlag = false;
|
||||
//如果模版编号相同则继续删除,反正跳过
|
||||
if(formCode.equals(jsonObject.getString("formCode"))){
|
||||
JSONObject field = JSONObject.parseObject(item.getFieldInfo());
|
||||
JSONObject frontFormmain = field.getJSONObject("front_formmain");
|
||||
JSONArray formsons = field.getJSONArray("formsons");
|
||||
JSONArray fieldInfoTable = frontFormmain.getJSONArray("fieldInfo");
|
||||
//验证需要删除的条件字段在表单属性中是否存在
|
||||
for (int i = 0; i < fieldInfoTable.size(); i++) {
|
||||
JSONObject fieldInfoTableObj = fieldInfoTable.getJSONObject(i);
|
||||
String name = fieldInfoTableObj.getString("name");
|
||||
//如果表单属性中存在该字段则验证通过,如果不存在直接返回错误
|
||||
if(name.equals(fieldName)){
|
||||
queryFlag = true;
|
||||
|
||||
}
|
||||
}
|
||||
//验证通过获取数据库表名称进行数据删除
|
||||
if(queryFlag){
|
||||
String tableName = frontFormmain.getString("tableName");
|
||||
//如果主表名称获取主表的主键进行数据删除
|
||||
fieldInfo.setTableName(tableName);
|
||||
fieldInfo.setFieldName(fieldName);
|
||||
fieldInfo.setFieldValue(fieldValue);
|
||||
List<CapFormDefinitionEntity>dataFormList = capFormDefinitionDao.getFormFiledByFileValue(fieldInfo);
|
||||
if(CollectionUtils.isNotEmpty(dataFormList)){
|
||||
dataFormList.forEach(item1->{
|
||||
String id = item1.getId();
|
||||
count.add(id);
|
||||
fieldInfo.setFieldName("id");
|
||||
fieldInfo.setId(id);
|
||||
capFormDefinitionDao.deleteByKey(fieldInfo);
|
||||
//循环该表单下面的所有子表信息进行子表删除
|
||||
if(CollectionUtils.isNotEmpty(formsons)){
|
||||
formsons.forEach(formsonsItem->{
|
||||
JSONObject jsonObjectBoddy = JSONObject.parseObject(formsonsItem.toString());
|
||||
String bodyTableName = jsonObjectBoddy.getString("tableName");
|
||||
fieldInfo.setTableName(bodyTableName);
|
||||
fieldInfo.setFieldName("formmain_id");
|
||||
fieldInfo.setId(id);
|
||||
capFormDefinitionDao.deleteByKey(fieldInfo);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return new JsonResultEntity("删除成功,删除的数据ID"+ JSON.toJSONString(count),true);
|
||||
}
|
||||
}
|
|
@ -5,8 +5,10 @@ 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;
|
||||
|
@ -14,6 +16,7 @@ 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 +24,7 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
@ -36,6 +40,8 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
|||
|
||||
@Autowired
|
||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||
@Autowired
|
||||
private RestUtil restUtil;
|
||||
|
||||
/**
|
||||
* 英德赛 OA档案传U8
|
||||
|
@ -150,6 +156,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){
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ 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:}")
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
FROM
|
||||
information_schema.TABLES
|
||||
WHERE
|
||||
TABLE_SCHEMA = 'businesscenter'
|
||||
TABLE_SCHEMA = 'businesscenter_kjs'
|
||||
and TABLE_NAME = #{tableName}
|
||||
</select>
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.hzya.frame.sysnew.application.service;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
|
@ -308,6 +309,8 @@ public interface ISysApplicationService extends IBaseService<SysApplicationEntit
|
|||
|
||||
JsonResultEntity externalCallInterface(ServletRequest servletRequest, ServletResponse servletResponse);
|
||||
|
||||
JsonResultEntity externalCallInterfaceResend(SysMessageManageLogEntity resendLogEntity);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 应用列表查询接口 多字段模糊查询,枚举类型字段转换
|
||||
|
|
|
@ -5,6 +5,7 @@ import cn.hutool.core.date.DateTime;
|
|||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.extra.servlet.ServletUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
|
@ -45,6 +46,8 @@ import com.hzya.frame.sysnew.messageManageDetail.entity.SysMessageManageDetailEn
|
|||
import com.hzya.frame.sysnew.messageManageLog.dao.ISysMessageManageLogDao;
|
||||
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity;
|
||||
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogPageVo;
|
||||
import com.hzya.frame.sysnew.pushMessage.entity.SysPushMessageEntity;
|
||||
import com.hzya.frame.sysnew.sendMessageLog.service.ISysSendMessageLogService;
|
||||
import com.hzya.frame.util.AESUtil;
|
||||
import com.hzya.frame.util.IPHelper;
|
||||
import com.hzya.frame.uuid.UUIDUtils;
|
||||
|
@ -70,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;
|
||||
|
@ -89,6 +93,8 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
@Resource
|
||||
private ISysApplicationApiDao sysApplicationApiDao;
|
||||
@Resource
|
||||
private ISysSendMessageLogService sysSendMessageLogService;
|
||||
@Resource
|
||||
private ISysMessageManageLogDao sysMessageManageLogDao;
|
||||
@Resource
|
||||
private DsDataSourceUtil dsDataSourceUtil;
|
||||
|
@ -118,7 +124,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
private TaskExecutor taskExecutor;
|
||||
//
|
||||
@Resource
|
||||
private com.hzya.frame.sysnew.application.service.impl.ApplicationCache applicationCache;
|
||||
private ApplicationCache applicationCache;
|
||||
|
||||
@Value("${savefile.tomcatpath:}")
|
||||
public String TOMCATPATH;
|
||||
|
@ -2045,6 +2051,390 @@ 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) {
|
||||
|
||||
JSONObject objectSourceData = JSON.parseObject(resendLogEntity.getSourceData());
|
||||
JSONObject headerObject = objectSourceData.getJSONObject("header");
|
||||
if (headerObject == null || headerObject.equals("")) {
|
||||
return BaseResult.getFailureMessageEntity("传入源数据为空");
|
||||
}
|
||||
JSONObject bodyObject = objectSourceData.getJSONObject("body");
|
||||
//将请求头转换为map
|
||||
Map<String, String> oldheaderMap = new HashMap<>();
|
||||
Iterator it = headerObject.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry<String, String> entry = (Map.Entry<String, String>) it.next();
|
||||
oldheaderMap.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
|
||||
String oldId = resendLogEntity.getId();
|
||||
String oldbodys = bodyObject.toString();
|
||||
String oldquerys = "";
|
||||
//应用key
|
||||
String publicKey = headerObject.getString("publickey");
|
||||
//应用密钥
|
||||
String secretKey = headerObject.getString("secretkey");
|
||||
//appId
|
||||
String appId = headerObject.getString("appid");
|
||||
//apiCode
|
||||
String apiCode = headerObject.getString("apicode");
|
||||
String ip = headerObject.getString("x-real-ip");
|
||||
if (publicKey == null || "".equals(publicKey)) {
|
||||
return BaseResult.getFailureMessageEntity("请先传递公钥");
|
||||
}
|
||||
if (secretKey == null || "".equals(secretKey)) {
|
||||
return BaseResult.getFailureMessageEntity("请先传递密钥");
|
||||
}
|
||||
if (appId == null || "".equals(appId)) {
|
||||
return BaseResult.getFailureMessageEntity("请先传递接收方应用");
|
||||
}
|
||||
if (apiCode == null || "".equals(apiCode)) {
|
||||
return BaseResult.getFailureMessageEntity("请先传递发送接口");
|
||||
}
|
||||
|
||||
logger.info("请求参数:publicKey:【" + publicKey + "】secretKey:【" + secretKey + "】appId:【" + appId + "】apiCode:【" + apiCode);
|
||||
//根据请求a应用的公钥、密钥是否能查找到一条数据
|
||||
|
||||
SysApplicationEntity sendApp = getAppByPublicKeySecretKey(publicKey, secretKey);
|
||||
if (sendApp == null) {
|
||||
//saveLog(new SysApplicationEntity(), new SysApplicationEntity(), new SysApplicationApiEntity(), oldbodys, null, oldheaderMap, null, null, oldquerys, null, null, false,"公钥、密钥错误");
|
||||
return BaseResult.getFailureMessageEntity("公钥、密钥错误,请联系管理员");
|
||||
}
|
||||
//判断应用是否启用
|
||||
if (sendApp.getAppStatus() == null || !"1".equals(sendApp.getAppStatus())) {
|
||||
return BaseResult.getFailureMessageEntity(sendApp.getName() + "应用未启用,请联系管理员");
|
||||
}
|
||||
|
||||
SysApplicationEntity receiveApp = getAppByAppId(appId);
|
||||
if (receiveApp == null) {
|
||||
return BaseResult.getFailureMessageEntity("根据appId:" + appId + "未匹配到应用,请联系管理员");
|
||||
}
|
||||
//判断应用是否启用
|
||||
if (receiveApp.getAppStatus() == null || !"1".equals(receiveApp.getAppStatus())) {
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName() + "应用未启用,请联系管理员");
|
||||
}
|
||||
//判断应用接口是否启用
|
||||
if (receiveApp.getInterfaceStatus() == null || !"1".equals(receiveApp.getInterfaceStatus())) {
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName() + "应用接口环境未启用,请联系管理员");
|
||||
}
|
||||
|
||||
SysApplicationApiEntity receiveApi = getApiByAppIdApiCode(receiveApp.getId(), apiCode);
|
||||
if (receiveApi == null) {
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName() + ":" + apiCode + "未启用或者未创建");
|
||||
}
|
||||
|
||||
SysApplicationApiAuthEntity sysApplicationApiAuthEntity = getApiAuthByNameAppId(sendApp.getId(), receiveApp.getId());
|
||||
if (sysApplicationApiAuthEntity == null) {
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName() + "应用权限配置错误");
|
||||
}
|
||||
if (sysApplicationApiAuthEntity.getSystemAddress() != null && !"".equals(sysApplicationApiAuthEntity.getSystemAddress())
|
||||
&& !sysApplicationApiAuthEntity.getSystemAddress().contains(ip)) {
|
||||
return BaseResult.getFailureMessageEntity(receiveApp.getName() + "发送应用" + receiveApp.getName() + "的ip白名单配置错误");
|
||||
}
|
||||
|
||||
SysApplicationApiAuthDetailEntity sysApplicationApiAuthDetailEntity = getApiAuthDetailByAppIdApiIdTripartiteSystemId(receiveApp.getId(), receiveApi.getId(), sysApplicationApiAuthEntity.getId());
|
||||
if (sysApplicationApiAuthDetailEntity == null) {
|
||||
return BaseResult.getFailureMessageEntity(receiveApi.getApiName() + "未授权给" + sendApp.getName() + ",请联系管理员");
|
||||
}
|
||||
SysExtensionApiEntity sysExtensionApiEntity = new SysExtensionApiEntity();
|
||||
|
||||
|
||||
List<String> a = Arrays.asList(new String[]{"apicode", "appid", "secretkey", "publickey", "x-forwarded-for", "cookie", "x-forwarded-proto", "x-real-ip", "content-length", "accept-language", "host", "content-type", "connection", "cache-control", "accept-encoding", "pragma", "accept", "user-agent"});
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
if (receiveApi.getHeaderIn() != null && !"".equals(receiveApi.getHeaderIn())) {
|
||||
JSONArray jsonArray = JSONArray.parseArray(receiveApi.getHeaderIn());
|
||||
if (jsonArray != null && jsonArray.size() > 0) {
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject object1 = jsonArray.getJSONObject(i);
|
||||
headers.put(object1.getString("parameterName"), object1.getString("example"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (oldheaderMap != null && oldheaderMap.size() > 0) {
|
||||
for (Map.Entry<String, String> entry : oldheaderMap.entrySet()) {
|
||||
if (!a.contains(entry.getKey())) {
|
||||
headers.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sysExtensionApiEntity.setSendApp(sendApp);
|
||||
sysExtensionApiEntity.setReceiveApp(receiveApp);
|
||||
sysExtensionApiEntity.setReceiveApi(receiveApi);
|
||||
sysExtensionApiEntity.setHeaders(headers);
|
||||
sysExtensionApiEntity.setQuerys(oldquerys);
|
||||
sysExtensionApiEntity.setBodys(oldbodys);
|
||||
Method[] methods = null;
|
||||
Object object = null;
|
||||
|
||||
// 判断是否有内部api 是否扩展api 1、启用 2、停用
|
||||
if (receiveApi.getExtensionApi() != null && "1".equals(receiveApi.getExtensionApi())
|
||||
&& receiveApi.getBeanName() != null && !"".equals(receiveApi.getBeanName())
|
||||
&& receiveApi.getFunName() != null && !"".equals(receiveApi.getFunName())
|
||||
) {
|
||||
//获取类
|
||||
try {
|
||||
object = ApplicationContextUtil.getBeanByName(receiveApi.getBeanName());
|
||||
} catch (SecurityException e) {
|
||||
|
||||
}
|
||||
//获取类下面的方法
|
||||
methods = object.getClass().getMethods();
|
||||
if (methods == null || methods.length == 0) {
|
||||
return BaseResult.getFailureMessageEntity("未找到内部方法,请联系管理员");
|
||||
}
|
||||
for (Method m : methods) {
|
||||
if (null != m) {
|
||||
if (m.getName().equals(receiveApi.getFunName().trim())) {
|
||||
try {
|
||||
logger.info("invoke开始>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
sysExtensionApiEntity = (SysExtensionApiEntity) m.invoke(object, sysExtensionApiEntity);
|
||||
logger.info("invoke结束>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
logger.error("invokeException{}", e.getMessage());
|
||||
return BaseResult.getFailureMessageEntity("内部方法执行错误,请联系管理员");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
headers = sysExtensionApiEntity.getHeaders();
|
||||
String querys = sysExtensionApiEntity.getQuerys();
|
||||
String bodys = sysExtensionApiEntity.getBodys();
|
||||
//设置参数获取参数
|
||||
StringBuffer url = new StringBuffer();
|
||||
if(!receiveApi.getDestinationAddress().toLowerCase().startsWith("http")){
|
||||
url.append(receiveApp.getInterfaceAddress());
|
||||
}
|
||||
url.append(receiveApi.getDestinationAddress());
|
||||
if (querys != null) {
|
||||
url.append("?");
|
||||
url.append(querys);
|
||||
}
|
||||
Integer outTime = 6000;
|
||||
if (receiveApi.getTimeoutPeriod() != null && !"".equals(receiveApi.getTimeoutPeriod())) {
|
||||
outTime = Integer.valueOf(receiveApi.getTimeoutPeriod());
|
||||
}
|
||||
//1、POST 2、GET
|
||||
String method = "POST";
|
||||
if ("2".equals(receiveApi.getRequestMethod())) {
|
||||
method = "GET";
|
||||
}
|
||||
//List<String> a = Arrays.asList(new String[]{"apicode", "appid", "secretkey", "publickey", "x-forwarded-for", "cookie", "x-forwarded-proto", "x-real-ip", "content-length", "accept-language", "host", "content-type", "connection", "cache-control", "accept-encoding", "pragma", "accept", "user-agent"});
|
||||
//Map<String, String> headers = new HashMap<>();
|
||||
//if (receiveApi.getHeaderIn() != null && !"".equals(receiveApi.getHeaderIn())) {
|
||||
// JSONArray jsonArray = JSONArray.parseArray(receiveApi.getHeaderIn());
|
||||
// if (jsonArray != null && jsonArray.size() > 0) {
|
||||
// for (int i = 0; i < jsonArray.size(); i++) {
|
||||
// JSONObject object1 = jsonArray.getJSONObject(i);
|
||||
// headers.put(object1.getString("parameterName"), object1.getString("example"));
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//if (headerMap != null && headerMap.size() > 0) {
|
||||
// for (Map.Entry<String, String> entry : headerMap.entrySet()) {
|
||||
// if (!a.contains(entry.getKey())) {
|
||||
// headers.put(entry.getKey(), entry.getValue());
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
if ("POST".equals(method)) {
|
||||
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
|
||||
// HttpClient
|
||||
CloseableHttpClient closeableHttpClient = httpClientBuilder.disableCookieManagement().build();
|
||||
HttpPost post = new HttpPost(url.toString());
|
||||
CloseableHttpResponse response = null;
|
||||
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(outTime).build();
|
||||
post.setConfig(requestConfig);//设置请求参数【超时时间】
|
||||
|
||||
if (headers != null && headers.size() > 0) {
|
||||
for (String key : headers.keySet()) {
|
||||
post.setHeader(key, headers.get(key));
|
||||
}
|
||||
}
|
||||
StringBuilder body = new StringBuilder();
|
||||
boolean flag = true;
|
||||
try {
|
||||
if (bodys != null && !"".equals(bodys)) {
|
||||
ByteArrayEntity entity = new ByteArrayEntity(bodys.getBytes("UTF-8"));
|
||||
entity.setContentType("application/json");
|
||||
post.setEntity(entity);
|
||||
}
|
||||
response = closeableHttpClient.execute(post);
|
||||
|
||||
HttpEntity entity = response.getEntity();
|
||||
synchronized (lock) {
|
||||
body.append(resultToStr(entity));
|
||||
}
|
||||
flag = true;
|
||||
logger.info("返回结果:" + body);
|
||||
} catch (Exception e) {
|
||||
logger.error("请求错误:" + e.getMessage());
|
||||
body.append(e.getMessage());
|
||||
flag = false;
|
||||
} finally {
|
||||
try {
|
||||
// 关闭响应对象
|
||||
if (response != null) {
|
||||
response.close();
|
||||
}
|
||||
// 关闭响应对象
|
||||
if (closeableHttpClient != null) {
|
||||
closeableHttpClient.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
logger.info("保存日志开始");
|
||||
//重写saveLog方法,利用他原有逻辑判断重推结果,根据重推结果,设置该条日志的状态
|
||||
SysMessageManageLogEntity sysMessageManageLogEntity = updateLog(sendApp, receiveApp, receiveApi, oldbodys,bodys, oldheaderMap,headers, headers, oldquerys,querys, body.toString(),true,null,oldId);
|
||||
if (methods != null && methods.length > 0) {
|
||||
for (Method m : methods) {
|
||||
if (null != m) {
|
||||
if (m.getName().equals(receiveApi.getFunName().trim()+"CallBack")) {
|
||||
try {
|
||||
logger.info("invoke开始>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
m.invoke(object, sysMessageManageLogEntity);
|
||||
logger.info("invoke结束>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
} catch (Exception e) {
|
||||
logger.error("invokeException{}", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.info("保存日志结束");
|
||||
if (flag) {
|
||||
if (JSONUtil.isTypeJSON(body.toString())) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(body.toString());
|
||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||
return BaseResult.getSuccessMessageEntity("重推成功", jsonObject);
|
||||
}else {
|
||||
return BaseResult.getSuccessMessageEntity("重推失败", jsonObject);
|
||||
}
|
||||
} else {
|
||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||
return BaseResult.getSuccessMessageEntity("重推成功", body);
|
||||
}else {
|
||||
return BaseResult.getSuccessMessageEntity("重推失败", body);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return BaseResult.getSuccessMessageEntity("重推失败", body);
|
||||
}
|
||||
|
||||
} else {//GET
|
||||
|
||||
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
|
||||
// HttpClient
|
||||
CloseableHttpClient closeableHttpClient = httpClientBuilder.disableCookieManagement().build();
|
||||
HttpGet get = new HttpGet(url.toString());
|
||||
CloseableHttpResponse response = null;
|
||||
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(outTime).build();
|
||||
get.setConfig(requestConfig);//设置请求参数【超时时间】
|
||||
if (headers != null && headers.size() > 0) {
|
||||
for (String key : headers.keySet()) {
|
||||
get.setHeader(key, headers.get(key));
|
||||
}
|
||||
}
|
||||
StringBuilder body = new StringBuilder();
|
||||
|
||||
boolean flag = true;
|
||||
try {
|
||||
response = closeableHttpClient.execute(get);
|
||||
HttpEntity entity = response.getEntity();
|
||||
synchronized (lock) {
|
||||
body.append(EntityUtils.toString(entity,"UTF-8"));
|
||||
}
|
||||
flag = true;
|
||||
logger.info("返回结果:" + body);
|
||||
} catch (Exception e) {
|
||||
logger.error("请求错误:" + e.getMessage());
|
||||
body.append(e.getMessage());
|
||||
flag = false;
|
||||
} finally {
|
||||
try {
|
||||
// 关闭响应对象
|
||||
if (response != null) {
|
||||
response.close();
|
||||
}
|
||||
// 关闭响应对象
|
||||
if (closeableHttpClient != null) {
|
||||
closeableHttpClient.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
logger.info("保存日志开始");
|
||||
SysMessageManageLogEntity sysMessageManageLogEntity = updateLog(sendApp, receiveApp, receiveApi, oldbodys,bodys, oldheaderMap,headers, headers, oldquerys,querys, body.toString(), true,null,oldId);
|
||||
if (methods != null && methods.length > 0) {
|
||||
for (Method m : methods) {
|
||||
if (null != m) {
|
||||
if (m.getName().equals(receiveApi.getFunName().trim()+"CallBack")) {
|
||||
try {
|
||||
logger.info("invoke开始>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
m.invoke(object, sysMessageManageLogEntity);
|
||||
logger.info("invoke结束>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
} catch (Exception e) {
|
||||
logger.error("invokeException{}", e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.info("保存日志结束");
|
||||
if (flag) {
|
||||
if (JSONUtil.isTypeJSON(body.toString())) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(body.toString());
|
||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||
return BaseResult.getSuccessMessageEntity("重推成功", jsonObject);
|
||||
}else {
|
||||
return BaseResult.getSuccessMessageEntity("重推失败", jsonObject);
|
||||
}
|
||||
} else {
|
||||
if(sysMessageManageLogEntity.getStatus() != null && "3".equals(sysMessageManageLogEntity.getStatus())){
|
||||
return BaseResult.getSuccessMessageEntity("重推成功", body);
|
||||
}else {
|
||||
return BaseResult.getSuccessMessageEntity("重推失败", body);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return BaseResult.getSuccessMessageEntity("重推失败", body);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private SysApplicationApiAuthDetailEntity getApiAuthDetailByAppIdApiIdTripartiteSystemId(String appId, String apiId, String tripartiteSystemId) {
|
||||
String str = "appId" + appId + "apiId" + apiId + "tripartiteSystemId" + tripartiteSystemId;
|
||||
Object o = applicationCache.get("4", str);
|
||||
|
@ -2273,6 +2663,176 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
sysMessageManageLogEntity.setModify_time(new Date());
|
||||
sysMessageManageLogEntity.setSts("Y");
|
||||
taskExecutor.execute(() -> doEsbTask(sysMessageManageLogEntity));
|
||||
SysPushMessageEntity sysPushMessageEntity = new SysPushMessageEntity();
|
||||
sysPushMessageEntity.setSendAppName(sendApp.getName());
|
||||
sysPushMessageEntity.setReceiveAppName(receiveApp.getName());
|
||||
sysPushMessageEntity.setReceiveApiName(receiveApi.getApiName());
|
||||
sysPushMessageEntity.setReceiveApiCode(receiveApi.getApiCode());
|
||||
sysPushMessageEntity.setReturnData(sysMessageManageLogEntity.getReturnData());
|
||||
sysPushMessageEntity.setStatus(sysMessageManageLogEntity.getStatus());
|
||||
//taskExecutor.execute(() -> sendMssage(sysPushMessageEntity));
|
||||
return sysMessageManageLogEntity;
|
||||
}
|
||||
|
||||
private void sendMssage(SysPushMessageEntity sysPushMessageEntity) {
|
||||
sysSendMessageLogService.sendMessage(sysPushMessageEntity);
|
||||
}
|
||||
|
||||
private SysMessageManageLogEntity updateLog(SysApplicationEntity sendApp, SysApplicationEntity receiveApp, SysApplicationApiEntity receiveApi,
|
||||
String oldbodys,String bodys,
|
||||
Map<String, String> oldheaderMap,Map<String, String> headerMap,
|
||||
Map<String, String> headers,
|
||||
String oldquerys, String querys,
|
||||
String body, boolean flag,String msg,String oldId) {
|
||||
SysMessageManageLogEntity sysMessageManageLogEntity = new SysMessageManageLogEntity();
|
||||
//messageManageId 消息主表主键
|
||||
//theme 消息主题
|
||||
//messageCode 消息编码
|
||||
//sendApp
|
||||
sysMessageManageLogEntity.setSendApp(sendApp.getId());//发送者应用
|
||||
//sendApi 发送者
|
||||
sysMessageManageLogEntity.setReceiveCode(receiveApi.getApiCode() != null ? receiveApi.getApiCode().toString() : null);//接收者编码
|
||||
sysMessageManageLogEntity.setReceiveApp(receiveApp.getId());//接收者应用
|
||||
sysMessageManageLogEntity.setReceiveApi(receiveApi.getId());//接收者
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("body", oldbodys);
|
||||
jsonObject.put("header", oldheaderMap);
|
||||
jsonObject.put("querys", oldquerys);
|
||||
sysMessageManageLogEntity.setSourceData(jsonObject.toString());//源数据
|
||||
JSONObject send = new JSONObject();
|
||||
send.put("body", bodys);
|
||||
send.put("header", headers);
|
||||
send.put("querys", querys);
|
||||
sysMessageManageLogEntity.setTargetData(send.toString());//目标data
|
||||
if(receiveApp.getAppType() != null && "4".equals(receiveApp.getAppType())){//宁波银行
|
||||
JSONObject jsonObject1 = JSONObject.parseObject(body);
|
||||
String retCode = jsonObject1.getString("retCode");
|
||||
if(retCode != null && "0000".equals(retCode)){
|
||||
JSONObject jsonObject2 = JSONObject.parseObject(jsonObject1.getString("data"));
|
||||
String fileBytes = jsonObject2.getString("fileBytes");
|
||||
if(fileBytes != null && !"".equals(fileBytes)){
|
||||
jsonObject2.put("fileBytes","");
|
||||
jsonObject1.put("data",jsonObject2);
|
||||
sysMessageManageLogEntity.setReturnData(jsonObject1.toJSONString());//返回信息
|
||||
}else {
|
||||
sysMessageManageLogEntity.setReturnData(body);//返回信息
|
||||
}
|
||||
}else {
|
||||
sysMessageManageLogEntity.setReturnData(body);//返回信息
|
||||
}
|
||||
}else {
|
||||
sysMessageManageLogEntity.setReturnData(body);//返回信息
|
||||
}
|
||||
|
||||
|
||||
//校验返回
|
||||
if (!flag) {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
sysMessageManageLogEntity.setRemark(msg);//返回信息
|
||||
} else {
|
||||
if (receiveApi.getReturnSuccessField() != null && !"".equals(receiveApi.getReturnSuccessField())
|
||||
&& receiveApi.getReturnSuccessValue() != null && !"".equals(receiveApi.getReturnSuccessValue())) {
|
||||
if (JSONUtil.isTypeJSON(body)) {
|
||||
JSONObject cheackdatas = JSONObject.parseObject(body);
|
||||
JSONObject datas = JSONObject.parseObject(body);
|
||||
String checkdata = cheackdatas.getString(receiveApi.getReturnSuccessField());
|
||||
if (checkdata != null && receiveApi.getReturnSuccessValue().equals(checkdata)) {
|
||||
sysMessageManageLogEntity.setStatus("3");//返回信息
|
||||
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
||||
String returnMsg = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||
sysMessageManageLogEntity.setRemark("接口调用成功,返回信息如下:" + returnMsg);//返回信息
|
||||
} else {
|
||||
sysMessageManageLogEntity.setRemark("接口调用成功");//返回信息
|
||||
}
|
||||
}else if(receiveApi.getReturnSuccessValue().equals("not null") && checkdata != null){
|
||||
sysMessageManageLogEntity.setStatus("3");//返回信息
|
||||
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
||||
String returnMsg = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||
sysMessageManageLogEntity.setRemark("接口调用成功,返回信息如下:" + returnMsg);//返回信息
|
||||
} else {
|
||||
sysMessageManageLogEntity.setRemark("接口调用成功");//返回信息
|
||||
}
|
||||
}else {
|
||||
String fieldname = receiveApi.getReturnSuccessField();
|
||||
if(fieldname.contains(".")){
|
||||
String[] fileds = fieldname.split("\\.");
|
||||
boolean flags = false;
|
||||
for (int i = 0; i < fileds.length; i++) {
|
||||
if (JSONUtil.isTypeJSON(datas.getString(fileds[i]))) {
|
||||
datas = datas.getJSONObject(fileds[i]);
|
||||
if(fileds.length-2 == i ){
|
||||
String a = datas.getString(fileds[i+1]);
|
||||
if (a != null && receiveApi.getReturnSuccessValue().equals(a)) {
|
||||
flags = true;
|
||||
break;
|
||||
}else if(receiveApi.getReturnSuccessValue().equals("not null") && a != null){
|
||||
flags = true;
|
||||
break;
|
||||
}else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(flags){
|
||||
sysMessageManageLogEntity.setStatus("3");//返回信息
|
||||
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
||||
String returnMsg = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||
sysMessageManageLogEntity.setRemark("接口调用成功,返回信息如下:" + returnMsg);//返回信息
|
||||
} else {
|
||||
sysMessageManageLogEntity.setRemark("接口调用成功");//返回信息
|
||||
}
|
||||
}else {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
||||
String returnMsg = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误,返回信息如下:" + returnMsg);//返回信息
|
||||
} else {
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误");//返回信息
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
||||
String returnMsg = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误,返回信息如下:" + returnMsg);//返回信息
|
||||
} else {
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回值错误");//返回信息
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回格式错误,不是JSON");//返回信息
|
||||
}
|
||||
} else {
|
||||
sysMessageManageLogEntity.setStatus("4");//返回信息
|
||||
if (receiveApi.getReturnMsg() != null && !"".equals(receiveApi.getReturnMsg())) {
|
||||
if (JSONUtil.isTypeJSON(body)) {
|
||||
JSONObject cheackdatas = JSONObject.parseObject(body);
|
||||
String checkdata = cheackdatas.getString(receiveApi.getReturnMsg());
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,api返回信息字段未配置,返回信息如下:" + checkdata);//返回信息
|
||||
} else {
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败,返回格式错误,不是JSON");//返回信息
|
||||
}
|
||||
} else {
|
||||
sysMessageManageLogEntity.setRemark("接口调用失败");//返回信息
|
||||
}
|
||||
}
|
||||
}
|
||||
//remark 备注
|
||||
sysMessageManageLogEntity.setErrorStatus("2");//返回信息
|
||||
sysMessageManageLogEntity.setId(oldId);
|
||||
sysMessageManageLogEntity.setCreate_user_id("c796fd9ba4c9f5ff3cc2fa41a040e443");
|
||||
sysMessageManageLogEntity.setModify_user_id("c796fd9ba4c9f5ff3cc2fa41a040e443");
|
||||
//sysMessageManageLogEntity.setCreate_time(new Date());
|
||||
sysMessageManageLogEntity.setModify_time(new Date());
|
||||
sysMessageManageLogEntity.setSts("Y");
|
||||
taskExecutor.execute(() -> doEsbTaskNew(sysMessageManageLogEntity));
|
||||
|
||||
|
||||
|
||||
return sysMessageManageLogEntity;
|
||||
}
|
||||
|
||||
|
@ -2285,6 +2845,10 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
**/
|
||||
private void doEsbTask(SysMessageManageLogEntity manageLogEntities) {
|
||||
sysMessageManageLogDao.save(manageLogEntities);
|
||||
|
||||
}
|
||||
private void doEsbTaskNew(SysMessageManageLogEntity manageLogEntities) {
|
||||
sysMessageManageLogDao.update(manageLogEntities);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sysnew.message.dao;
|
||||
|
||||
import com.hzya.frame.sysnew.message.entity.SysMessageEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* (sys_message: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-30 14:17:11
|
||||
*/
|
||||
public interface ISysMessageDao extends IBaseDao<SysMessageEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.sysnew.message.dao.impl;
|
||||
|
||||
import com.hzya.frame.sysnew.message.entity.SysMessageEntity;
|
||||
import com.hzya.frame.sysnew.message.dao.ISysMessageDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* (SysMessage)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-30 14:17:11
|
||||
*/
|
||||
@Repository(value = "SysMessageDaoImpl")
|
||||
public class SysMessageDaoImpl extends MybatisGenericDao<SysMessageEntity, String> implements ISysMessageDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
package com.hzya.frame.sysnew.message.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* (SysMessage)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-30 14:17:11
|
||||
*/
|
||||
public class SysMessageEntity extends BaseEntity {
|
||||
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 调用单据类型 */
|
||||
private Integer billKindId;
|
||||
/** 来源业务单据id */
|
||||
private String billId;
|
||||
/** 模版id */
|
||||
private String templateId;
|
||||
/** 1文本消息 2 卡片消息 */
|
||||
private String messageType;
|
||||
/** 消息标题 */
|
||||
private String title;
|
||||
/** 消息内容 */
|
||||
private String content;
|
||||
/** 消息操作区域 */
|
||||
private String btns;
|
||||
/** 发送时间 */
|
||||
private Date pushTime;
|
||||
/** 发送者 */
|
||||
private String sendPersonId;
|
||||
/** 接受者 */
|
||||
private String sendToPersonId;
|
||||
/** 状态 */
|
||||
private Integer state;
|
||||
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public Integer getBillKindId() {
|
||||
return billKindId;
|
||||
}
|
||||
|
||||
public void setBillKindId(Integer billKindId) {
|
||||
this.billKindId = billKindId;
|
||||
}
|
||||
|
||||
public String getBillId() {
|
||||
return billId;
|
||||
}
|
||||
|
||||
public void setBillId(String billId) {
|
||||
this.billId = billId;
|
||||
}
|
||||
|
||||
public String getTemplateId() {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
public void setTemplateId(String templateId) {
|
||||
this.templateId = templateId;
|
||||
}
|
||||
|
||||
public String getMessageType() {
|
||||
return messageType;
|
||||
}
|
||||
|
||||
public void setMessageType(String messageType) {
|
||||
this.messageType = messageType;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getBtns() {
|
||||
return btns;
|
||||
}
|
||||
|
||||
public void setBtns(String btns) {
|
||||
this.btns = btns;
|
||||
}
|
||||
|
||||
public Date getPushTime() {
|
||||
return pushTime;
|
||||
}
|
||||
|
||||
public void setPushTime(Date pushTime) {
|
||||
this.pushTime = pushTime;
|
||||
}
|
||||
|
||||
public String getSendPersonId() {
|
||||
return sendPersonId;
|
||||
}
|
||||
|
||||
public void setSendPersonId(String sendPersonId) {
|
||||
this.sendPersonId = sendPersonId;
|
||||
}
|
||||
|
||||
public String getSendToPersonId() {
|
||||
return sendToPersonId;
|
||||
}
|
||||
|
||||
public void setSendToPersonId(String sendToPersonId) {
|
||||
this.sendToPersonId = sendToPersonId;
|
||||
}
|
||||
|
||||
public Integer getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(Integer state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,327 @@
|
|||
<?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.sysnew.message.dao.impl.SysMessageDaoImpl">
|
||||
|
||||
<resultMap id="get-SysMessageEntity-result" type="com.hzya.frame.sysnew.message.entity.SysMessageEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
<result property="billKindId" column="bill_kind_id" jdbcType="INTEGER"/>
|
||||
<result property="billId" column="bill_id" jdbcType="VARCHAR"/>
|
||||
<result property="templateId" column="template_id" jdbcType="VARCHAR"/>
|
||||
<result property="messageType" column="message_type" jdbcType="VARCHAR"/>
|
||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||
<result property="content" column="content" jdbcType="VARCHAR"/>
|
||||
<result property="btns" column="btns" jdbcType="VARCHAR"/>
|
||||
<result property="pushTime" column="push_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sendPersonId" column="send_person_id" jdbcType="VARCHAR"/>
|
||||
<result property="sendToPersonId" column="send_to_person_id" jdbcType="VARCHAR"/>
|
||||
<result property="state" column="state" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "SysMessageEntity_Base_Column_List">
|
||||
id
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,bill_kind_id
|
||||
,bill_id
|
||||
,template_id
|
||||
,message_type
|
||||
,title
|
||||
,content
|
||||
,btns
|
||||
,push_time
|
||||
,send_person_id
|
||||
,send_to_person_id
|
||||
,state
|
||||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-SysMessageEntity-result">
|
||||
select
|
||||
<include refid="SysMessageEntity_Base_Column_List" />
|
||||
from sys_message where id = #{ id } and sts='Y'
|
||||
</select>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysMessageEntity-result" parameterType = "com.hzya.frame.sysnew.message.entity.SysMessageEntity">
|
||||
select
|
||||
<include refid="SysMessageEntity_Base_Column_List" />
|
||||
from sys_message
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="billKindId != null"> and bill_kind_id = #{billKindId} </if>
|
||||
<if test="billId != null and billId != ''"> and bill_id = #{billId} </if>
|
||||
<if test="templateId != null and templateId != ''"> and template_id = #{templateId} </if>
|
||||
<if test="messageType != null and messageType != ''"> and message_type = #{messageType} </if>
|
||||
<if test="title != null and title != ''"> and title = #{title} </if>
|
||||
<if test="content != null and content != ''"> and content = #{content} </if>
|
||||
<if test="btns != null and btns != ''"> and btns = #{btns} </if>
|
||||
<if test="pushTime != null"> and push_time = #{pushTime} </if>
|
||||
<if test="sendPersonId != null and sendPersonId != ''"> and send_person_id = #{sendPersonId} </if>
|
||||
<if test="sendToPersonId != null and sendToPersonId != ''"> and send_to_person_id = #{sendToPersonId} </if>
|
||||
<if test="state != null"> and state = #{state} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sysnew.message.entity.SysMessageEntity">
|
||||
select count(1) from sys_message
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="billKindId != null"> and bill_kind_id = #{billKindId} </if>
|
||||
<if test="billId != null and billId != ''"> and bill_id = #{billId} </if>
|
||||
<if test="templateId != null and templateId != ''"> and template_id = #{templateId} </if>
|
||||
<if test="messageType != null and messageType != ''"> and message_type = #{messageType} </if>
|
||||
<if test="title != null and title != ''"> and title = #{title} </if>
|
||||
<if test="content != null and content != ''"> and content = #{content} </if>
|
||||
<if test="btns != null and btns != ''"> and btns = #{btns} </if>
|
||||
<if test="pushTime != null"> and push_time = #{pushTime} </if>
|
||||
<if test="sendPersonId != null and sendPersonId != ''"> and send_person_id = #{sendPersonId} </if>
|
||||
<if test="sendToPersonId != null and sendToPersonId != ''"> and send_to_person_id = #{sendToPersonId} </if>
|
||||
<if test="state != null"> and state = #{state} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysMessageEntity-result" parameterType = "com.hzya.frame.sysnew.message.entity.SysMessageEntity">
|
||||
select
|
||||
<include refid="SysMessageEntity_Base_Column_List" />
|
||||
from sys_message
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
||||
<if test="billKindId != null"> and bill_kind_id like concat('%',#{billKindId},'%') </if>
|
||||
<if test="billId != null and billId != ''"> and bill_id like concat('%',#{billId},'%') </if>
|
||||
<if test="templateId != null and templateId != ''"> and template_id like concat('%',#{templateId},'%') </if>
|
||||
<if test="messageType != null and messageType != ''"> and message_type like concat('%',#{messageType},'%') </if>
|
||||
<if test="title != null and title != ''"> and title like concat('%',#{title},'%') </if>
|
||||
<if test="content != null and content != ''"> and content like concat('%',#{content},'%') </if>
|
||||
<if test="btns != null and btns != ''"> and btns like concat('%',#{btns},'%') </if>
|
||||
<if test="pushTime != null"> and push_time like concat('%',#{pushTime},'%') </if>
|
||||
<if test="sendPersonId != null and sendPersonId != ''"> and send_person_id like concat('%',#{sendPersonId},'%') </if>
|
||||
<if test="sendToPersonId != null and sendToPersonId != ''"> and send_to_person_id like concat('%',#{sendToPersonId},'%') </if>
|
||||
<if test="state != null"> and state like concat('%',#{state},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysMessageentity_list_or" resultMap="get-SysMessageEntity-result" parameterType = "com.hzya.frame.sysnew.message.entity.SysMessageEntity">
|
||||
select
|
||||
<include refid="SysMessageEntity_Base_Column_List" />
|
||||
from sys_message
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="sorts != null"> or sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
|
||||
<if test="billKindId != null"> or bill_kind_id = #{billKindId} </if>
|
||||
<if test="billId != null and billId != ''"> or bill_id = #{billId} </if>
|
||||
<if test="templateId != null and templateId != ''"> or template_id = #{templateId} </if>
|
||||
<if test="messageType != null and messageType != ''"> or message_type = #{messageType} </if>
|
||||
<if test="title != null and title != ''"> or title = #{title} </if>
|
||||
<if test="content != null and content != ''"> or content = #{content} </if>
|
||||
<if test="btns != null and btns != ''"> or btns = #{btns} </if>
|
||||
<if test="pushTime != null"> or push_time = #{pushTime} </if>
|
||||
<if test="sendPersonId != null and sendPersonId != ''"> or send_person_id = #{sendPersonId} </if>
|
||||
<if test="sendToPersonId != null and sendToPersonId != ''"> or send_to_person_id = #{sendToPersonId} </if>
|
||||
<if test="state != null"> or state = #{state} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.message.entity.SysMessageEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_message(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="sorts != null"> sorts , </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
||||
<if test="create_time != null"> create_time , </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
||||
<if test="modify_time != null"> modify_time , </if>
|
||||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="billKindId != null"> bill_kind_id , </if>
|
||||
<if test="billId != null and billId != ''"> bill_id , </if>
|
||||
<if test="templateId != null and templateId != ''"> template_id , </if>
|
||||
<if test="messageType != null and messageType != ''"> message_type , </if>
|
||||
<if test="title != null and title != ''"> title , </if>
|
||||
<if test="content != null and content != ''"> content , </if>
|
||||
<if test="btns != null and btns != ''"> btns , </if>
|
||||
<if test="pushTime != null"> push_time , </if>
|
||||
<if test="sendPersonId != null and sendPersonId != ''"> send_person_id , </if>
|
||||
<if test="sendToPersonId != null and sendToPersonId != ''"> send_to_person_id , </if>
|
||||
<if test="state != null"> state , </if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> #{id} ,</if>
|
||||
<if test="sorts != null"> #{sorts} ,</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
||||
<if test="create_time != null"> #{create_time} ,</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="billKindId != null"> #{billKindId} ,</if>
|
||||
<if test="billId != null and billId != ''"> #{billId} ,</if>
|
||||
<if test="templateId != null and templateId != ''"> #{templateId} ,</if>
|
||||
<if test="messageType != null and messageType != ''"> #{messageType} ,</if>
|
||||
<if test="title != null and title != ''"> #{title} ,</if>
|
||||
<if test="content != null and content != ''"> #{content} ,</if>
|
||||
<if test="btns != null and btns != ''"> #{btns} ,</if>
|
||||
<if test="pushTime != null"> #{pushTime} ,</if>
|
||||
<if test="sendPersonId != null and sendPersonId != ''"> #{sendPersonId} ,</if>
|
||||
<if test="sendToPersonId != null and sendToPersonId != ''"> #{sendToPersonId} ,</if>
|
||||
<if test="state != null"> #{state} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_message(create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, bill_kind_id, bill_id, template_id, message_type, title, content, btns, push_time, send_person_id, send_to_person_id, state, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.billKindId},#{entity.billId},#{entity.templateId},#{entity.messageType},#{entity.title},#{entity.content},#{entity.btns},#{entity.pushTime},#{entity.sendPersonId},#{entity.sendToPersonId},#{entity.state}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_message(create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, bill_kind_id, bill_id, template_id, message_type, title, content, btns, push_time, send_person_id, send_to_person_id, state)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.billKindId},#{entity.billId},#{entity.templateId},#{entity.messageType},#{entity.title},#{entity.content},#{entity.btns},#{entity.pushTime},#{entity.sendPersonId},#{entity.sendToPersonId},#{entity.state})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
create_user_id = values(create_user_id),
|
||||
create_time = values(create_time),
|
||||
modify_user_id = values(modify_user_id),
|
||||
modify_time = values(modify_time),
|
||||
sts = values(sts),
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id),
|
||||
bill_kind_id = values(bill_kind_id),
|
||||
bill_id = values(bill_id),
|
||||
template_id = values(template_id),
|
||||
message_type = values(message_type),
|
||||
title = values(title),
|
||||
content = values(content),
|
||||
btns = values(btns),
|
||||
push_time = values(push_time),
|
||||
send_person_id = values(send_person_id),
|
||||
send_to_person_id = values(send_to_person_id),
|
||||
state = values(state)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.sysnew.message.entity.SysMessageEntity" >
|
||||
update sys_message set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
<if test="billKindId != null"> bill_kind_id = #{billKindId},</if>
|
||||
<if test="billId != null and billId != ''"> bill_id = #{billId},</if>
|
||||
<if test="templateId != null and templateId != ''"> template_id = #{templateId},</if>
|
||||
<if test="messageType != null and messageType != ''"> message_type = #{messageType},</if>
|
||||
<if test="title != null and title != ''"> title = #{title},</if>
|
||||
<if test="content != null and content != ''"> content = #{content},</if>
|
||||
<if test="btns != null and btns != ''"> btns = #{btns},</if>
|
||||
<if test="pushTime != null"> push_time = #{pushTime},</if>
|
||||
<if test="sendPersonId != null and sendPersonId != ''"> send_person_id = #{sendPersonId},</if>
|
||||
<if test="sendToPersonId != null and sendToPersonId != ''"> send_to_person_id = #{sendToPersonId},</if>
|
||||
<if test="state != null"> state = #{state},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sysnew.message.entity.SysMessageEntity" >
|
||||
update sys_message set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sysnew.message.entity.SysMessageEntity" >
|
||||
update sys_message set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="billKindId != null"> and bill_kind_id = #{billKindId} </if>
|
||||
<if test="billId != null and billId != ''"> and bill_id = #{billId} </if>
|
||||
<if test="templateId != null and templateId != ''"> and template_id = #{templateId} </if>
|
||||
<if test="messageType != null and messageType != ''"> and message_type = #{messageType} </if>
|
||||
<if test="title != null and title != ''"> and title = #{title} </if>
|
||||
<if test="content != null and content != ''"> and content = #{content} </if>
|
||||
<if test="btns != null and btns != ''"> and btns = #{btns} </if>
|
||||
<if test="pushTime != null"> and push_time = #{pushTime} </if>
|
||||
<if test="sendPersonId != null and sendPersonId != ''"> and send_person_id = #{sendPersonId} </if>
|
||||
<if test="sendToPersonId != null and sendToPersonId != ''"> and send_to_person_id = #{sendToPersonId} </if>
|
||||
<if test="state != null"> and state = #{state} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from sys_message where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.hzya.frame.sysnew.message.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.sysnew.message.entity.SysMessageEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
/**
|
||||
* (SysMessage)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-30 14:17:11
|
||||
*/
|
||||
public interface ISysMessageService extends IBaseService<SysMessageEntity, String>{
|
||||
JsonResultEntity queryEntityPage(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity queryEntity(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity saveEntity(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity getEntity(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity updateEntity(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity deleteEntity(JSONObject jsonObject);
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package com.hzya.frame.sysnew.message.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.sysnew.message.entity.SysMessageEntity;
|
||||
import com.hzya.frame.sysnew.message.dao.ISysMessageDao;
|
||||
import com.hzya.frame.sysnew.message.service.ISysMessageService;
|
||||
import com.hzya.frame.sysnew.organ.entity.SysOrganEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (SysMessage)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-30 14:17:11
|
||||
*/
|
||||
@Service(value = "sysMessageService")
|
||||
public class SysMessageServiceImpl extends BaseService<SysMessageEntity, String> implements ISysMessageService {
|
||||
|
||||
private ISysMessageDao sysMessageDao;
|
||||
|
||||
@Autowired
|
||||
public void setSysMessageDao(ISysMessageDao dao) {
|
||||
this.sysMessageDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity queryEntityPage(JSONObject jsonObject){
|
||||
SysMessageEntity entity = getData("jsonStr", jsonObject, SysMessageEntity.class);
|
||||
if(entity == null || entity.getPageNum() == null || entity.getPageSize() == null){
|
||||
return BaseResult.getFailureMessageEntity("分页查询参数不存在");
|
||||
}
|
||||
PageHelper.startPage(entity.getPageNum(), entity.getPageSize());
|
||||
List<SysMessageEntity> list = sysMessageDao.queryByLike(entity);
|
||||
PageInfo<SysMessageEntity> pageInfo = new PageInfo<>(list);
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", pageInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity queryEntity(JSONObject jsonObject){
|
||||
SysMessageEntity entity = getData("jsonStr", jsonObject, SysMessageEntity.class);
|
||||
if(entity == null){
|
||||
entity = new SysMessageEntity();
|
||||
}
|
||||
List<SysMessageEntity> list = sysMessageDao.queryByLike(entity);
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity getEntity(JSONObject jsonObject){
|
||||
SysMessageEntity entity = getData("jsonStr", jsonObject, SysMessageEntity.class);
|
||||
if(entity == null){
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if(entity.getId() == null || "".equals(entity.getId())){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
entity = sysMessageDao.get(entity.getId());
|
||||
if(entity == null){
|
||||
return BaseResult.getFailureMessageEntity("获取站内消息失败");
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("获取站内消息成功", entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity saveEntity(JSONObject jsonObject) {
|
||||
SysMessageEntity entity = getData("jsonStr", jsonObject, SysMessageEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
entity.setCreate();
|
||||
//保存
|
||||
sysMessageDao.save(entity);
|
||||
return BaseResult.getSuccessMessageEntity("保存消息成功", entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity updateEntity(JSONObject jsonObject) {
|
||||
SysMessageEntity entity = getData("jsonStr", jsonObject, SysMessageEntity.class);
|
||||
if(entity == null){
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if(entity.getId() == null || "".equals(entity.getId())){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
entity.setUpdate();
|
||||
sysMessageDao.update(entity);
|
||||
return BaseResult.getSuccessMessageEntity("修改站内消息成功", entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity deleteEntity(JSONObject jsonObject) {
|
||||
SysMessageEntity entity = getData("jsonStr", jsonObject, SysMessageEntity.class);
|
||||
if(entity == null){
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if(entity.getId() == null || "".equals(entity.getId())){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
sysMessageDao.logicRemove(entity);
|
||||
return BaseResult.getSuccessMessageEntity("删除站内消息成功");
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.hzya.frame.sysnew.messageTemplate.dao;
|
||||
|
||||
import com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
|
||||
/**
|
||||
* (sys_message_template: table)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-30 14:21:15
|
||||
*/
|
||||
public interface ISysMessageTemplateDao extends IBaseDao<SysMessageTemplateEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hzya.frame.sysnew.messageTemplate.dao.impl;
|
||||
|
||||
import com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity;
|
||||
import com.hzya.frame.sysnew.messageTemplate.dao.ISysMessageTemplateDao;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
/**
|
||||
* (SysMessageTemplate)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-30 14:21:15
|
||||
*/
|
||||
@Repository(value = "SysMessageTemplateDaoImpl")
|
||||
public class SysMessageTemplateDaoImpl extends MybatisGenericDao<SysMessageTemplateEntity, String> implements ISysMessageTemplateDao{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
package com.hzya.frame.sysnew.messageTemplate.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
/**
|
||||
* (SysMessageTemplate)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-30 14:21:15
|
||||
*/
|
||||
public class SysMessageTemplateEntity extends BaseEntity {
|
||||
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
/** 调用单据类型 */
|
||||
private String billKindId;
|
||||
/** 模版类型 */
|
||||
private String templateType;
|
||||
/** 模版名称 */
|
||||
private String templateName;
|
||||
/** 消息标题 */
|
||||
private String messageTitle;
|
||||
/** 消息内容 */
|
||||
private String messageContents;
|
||||
/** 消息操作区域 */
|
||||
private String btns;
|
||||
/** 数据源 */
|
||||
private String dataSource;
|
||||
/** 创建时间 */
|
||||
private Date createDate;
|
||||
/** 创建人 */
|
||||
private String createPersonId;
|
||||
/** 状态 */
|
||||
private String state;
|
||||
/** 删除标志 */
|
||||
private Integer isdelete;
|
||||
|
||||
|
||||
public String getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(String companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getBillKindId() {
|
||||
return billKindId;
|
||||
}
|
||||
|
||||
public void setBillKindId(String billKindId) {
|
||||
this.billKindId = billKindId;
|
||||
}
|
||||
|
||||
public String getTemplateType() {
|
||||
return templateType;
|
||||
}
|
||||
|
||||
public void setTemplateType(String templateType) {
|
||||
this.templateType = templateType;
|
||||
}
|
||||
|
||||
public String getTemplateName() {
|
||||
return templateName;
|
||||
}
|
||||
|
||||
public void setTemplateName(String templateName) {
|
||||
this.templateName = templateName;
|
||||
}
|
||||
|
||||
public String getMessageTitle() {
|
||||
return messageTitle;
|
||||
}
|
||||
|
||||
public void setMessageTitle(String messageTitle) {
|
||||
this.messageTitle = messageTitle;
|
||||
}
|
||||
|
||||
public String getMessageContents() {
|
||||
return messageContents;
|
||||
}
|
||||
|
||||
public void setMessageContents(String messageContents) {
|
||||
this.messageContents = messageContents;
|
||||
}
|
||||
|
||||
public String getBtns() {
|
||||
return btns;
|
||||
}
|
||||
|
||||
public void setBtns(String btns) {
|
||||
this.btns = btns;
|
||||
}
|
||||
|
||||
public String getDataSource() {
|
||||
return dataSource;
|
||||
}
|
||||
|
||||
public void setDataSource(String dataSource) {
|
||||
this.dataSource = dataSource;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreatePersonId() {
|
||||
return createPersonId;
|
||||
}
|
||||
|
||||
public void setCreatePersonId(String createPersonId) {
|
||||
this.createPersonId = createPersonId;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Integer getIsdelete() {
|
||||
return isdelete;
|
||||
}
|
||||
|
||||
public void setIsdelete(Integer isdelete) {
|
||||
this.isdelete = isdelete;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,328 @@
|
|||
<?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.sysnew.messageTemplate.dao.impl.SysMessageTemplateDaoImpl">
|
||||
|
||||
<resultMap id="get-SysMessageTemplateEntity-result" type="com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="sorts" column="sorts" jdbcType="INTEGER"/>
|
||||
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
|
||||
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sts" column="sts" jdbcType="VARCHAR"/>
|
||||
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||
<result property="billKindId" column="bill_kind_id" jdbcType="VARCHAR"/>
|
||||
<result property="templateType" column="template_type" jdbcType="VARCHAR"/>
|
||||
<result property="templateName" column="template_name" jdbcType="VARCHAR"/>
|
||||
<result property="messageTitle" column="message_title" jdbcType="VARCHAR"/>
|
||||
<result property="messageContents" column="message_contents" jdbcType="VARCHAR"/>
|
||||
<result property="btns" column="btns" jdbcType="VARCHAR"/>
|
||||
<result property="dataSource" column="data_source" jdbcType="VARCHAR"/>
|
||||
<result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="createPersonId" column="create_person_id" jdbcType="VARCHAR"/>
|
||||
<result property="state" column="state" jdbcType="VARCHAR"/>
|
||||
<result property="isdelete" column="isdelete" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "SysMessageTemplateEntity_Base_Column_List">
|
||||
id
|
||||
,sorts
|
||||
,create_user_id
|
||||
,create_time
|
||||
,modify_user_id
|
||||
,modify_time
|
||||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,bill_kind_id
|
||||
,template_type
|
||||
,template_name
|
||||
,message_title
|
||||
,message_contents
|
||||
,btns
|
||||
,data_source
|
||||
,create_date
|
||||
,create_person_id
|
||||
,state
|
||||
,isdelete
|
||||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-SysMessageTemplateEntity-result">
|
||||
select
|
||||
<include refid="SysMessageTemplateEntity_Base_Column_List" />
|
||||
from sys_message_template where id = #{ id } and sts='Y'
|
||||
</select>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-SysMessageTemplateEntity-result" parameterType = "com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity">
|
||||
select
|
||||
<include refid="SysMessageTemplateEntity_Base_Column_List" />
|
||||
from sys_message_template
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="billKindId != null and billKindId != ''"> and bill_kind_id = #{billKindId} </if>
|
||||
<if test="templateType != null and templateType != ''"> and template_type = #{templateType} </if>
|
||||
<if test="templateName != null and templateName != ''"> and template_name = #{templateName} </if>
|
||||
<if test="messageTitle != null and messageTitle != ''"> and message_title = #{messageTitle} </if>
|
||||
<if test="messageContents != null and messageContents != ''"> and message_contents = #{messageContents} </if>
|
||||
<if test="btns != null and btns != ''"> and btns = #{btns} </if>
|
||||
<if test="dataSource != null and dataSource != ''"> and data_source = #{dataSource} </if>
|
||||
<if test="createDate != null"> and create_date = #{createDate} </if>
|
||||
<if test="createPersonId != null and createPersonId != ''"> and create_person_id = #{createPersonId} </if>
|
||||
<if test="state != null and state != ''"> and state = #{state} </if>
|
||||
<if test="isdelete != null"> and isdelete = #{isdelete} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity">
|
||||
select count(1) from sys_message_template
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> and create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> and modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="billKindId != null and billKindId != ''"> and bill_kind_id = #{billKindId} </if>
|
||||
<if test="templateType != null and templateType != ''"> and template_type = #{templateType} </if>
|
||||
<if test="templateName != null and templateName != ''"> and template_name = #{templateName} </if>
|
||||
<if test="messageTitle != null and messageTitle != ''"> and message_title = #{messageTitle} </if>
|
||||
<if test="messageContents != null and messageContents != ''"> and message_contents = #{messageContents} </if>
|
||||
<if test="btns != null and btns != ''"> and btns = #{btns} </if>
|
||||
<if test="dataSource != null and dataSource != ''"> and data_source = #{dataSource} </if>
|
||||
<if test="createDate != null"> and create_date = #{createDate} </if>
|
||||
<if test="createPersonId != null and createPersonId != ''"> and create_person_id = #{createPersonId} </if>
|
||||
<if test="state != null and state != ''"> and state = #{state} </if>
|
||||
<if test="isdelete != null"> and isdelete = #{isdelete} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-SysMessageTemplateEntity-result" parameterType = "com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity">
|
||||
select
|
||||
<include refid="SysMessageTemplateEntity_Base_Column_List" />
|
||||
from sys_message_template
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="sorts != null"> and sorts like concat('%',#{sorts},'%') </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
|
||||
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
|
||||
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if>
|
||||
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if>
|
||||
<if test="org_id != null and org_id != ''"> and org_id like concat('%',#{org_id},'%') </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id like concat('%',#{companyId},'%') </if>
|
||||
<if test="billKindId != null and billKindId != ''"> and bill_kind_id like concat('%',#{billKindId},'%') </if>
|
||||
<if test="templateType != null and templateType != ''"> and template_type like concat('%',#{templateType},'%') </if>
|
||||
<if test="templateName != null and templateName != ''"> and template_name like concat('%',#{templateName},'%') </if>
|
||||
<if test="messageTitle != null and messageTitle != ''"> and message_title like concat('%',#{messageTitle},'%') </if>
|
||||
<if test="messageContents != null and messageContents != ''"> and message_contents like concat('%',#{messageContents},'%') </if>
|
||||
<if test="btns != null and btns != ''"> and btns like concat('%',#{btns},'%') </if>
|
||||
<if test="dataSource != null and dataSource != ''"> and data_source like concat('%',#{dataSource},'%') </if>
|
||||
<if test="createDate != null"> and create_date like concat('%',#{createDate},'%') </if>
|
||||
<if test="createPersonId != null and createPersonId != ''"> and create_person_id like concat('%',#{createPersonId},'%') </if>
|
||||
<if test="state != null and state != ''"> and state like concat('%',#{state},'%') </if>
|
||||
<if test="isdelete != null"> and isdelete like concat('%',#{isdelete},'%') </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="SysMessageTemplateentity_list_or" resultMap="get-SysMessageTemplateEntity-result" parameterType = "com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity">
|
||||
select
|
||||
<include refid="SysMessageTemplateEntity_Base_Column_List" />
|
||||
from sys_message_template
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="sorts != null"> or sorts = #{sorts} </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if>
|
||||
<if test="create_time != null"> or create_time = #{create_time} </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if>
|
||||
<if test="modify_time != null"> or modify_time = #{modify_time} </if>
|
||||
<if test="sts != null and sts != ''"> or sts = #{sts} </if>
|
||||
<if test="org_id != null and org_id != ''"> or org_id = #{org_id} </if>
|
||||
<if test="companyId != null and companyId != ''"> or company_id = #{companyId} </if>
|
||||
<if test="billKindId != null and billKindId != ''"> or bill_kind_id = #{billKindId} </if>
|
||||
<if test="templateType != null and templateType != ''"> or template_type = #{templateType} </if>
|
||||
<if test="templateName != null and templateName != ''"> or template_name = #{templateName} </if>
|
||||
<if test="messageTitle != null and messageTitle != ''"> or message_title = #{messageTitle} </if>
|
||||
<if test="messageContents != null and messageContents != ''"> or message_contents = #{messageContents} </if>
|
||||
<if test="btns != null and btns != ''"> or btns = #{btns} </if>
|
||||
<if test="dataSource != null and dataSource != ''"> or data_source = #{dataSource} </if>
|
||||
<if test="createDate != null"> or create_date = #{createDate} </if>
|
||||
<if test="createPersonId != null and createPersonId != ''"> or create_person_id = #{createPersonId} </if>
|
||||
<if test="state != null and state != ''"> or state = #{state} </if>
|
||||
<if test="isdelete != null"> or isdelete = #{isdelete} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_message_template(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="sorts != null"> sorts , </if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if>
|
||||
<if test="create_time != null"> create_time , </if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if>
|
||||
<if test="modify_time != null"> modify_time , </if>
|
||||
<if test="sts != null and sts != ''"> sts , </if>
|
||||
<if test="org_id != null and org_id != ''"> org_id , </if>
|
||||
<if test="companyId != null and companyId != ''"> company_id , </if>
|
||||
<if test="billKindId != null and billKindId != ''"> bill_kind_id , </if>
|
||||
<if test="templateType != null and templateType != ''"> template_type , </if>
|
||||
<if test="templateName != null and templateName != ''"> template_name , </if>
|
||||
<if test="messageTitle != null and messageTitle != ''"> message_title , </if>
|
||||
<if test="messageContents != null and messageContents != ''"> message_contents , </if>
|
||||
<if test="btns != null and btns != ''"> btns , </if>
|
||||
<if test="dataSource != null and dataSource != ''"> data_source , </if>
|
||||
<if test="createDate != null"> create_date , </if>
|
||||
<if test="createPersonId != null and createPersonId != ''"> create_person_id , </if>
|
||||
<if test="state != null and state != ''"> state , </if>
|
||||
<if test="isdelete != null"> isdelete , </if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> #{id} ,</if>
|
||||
<if test="sorts != null"> #{sorts} ,</if>
|
||||
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if>
|
||||
<if test="create_time != null"> #{create_time} ,</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if>
|
||||
<if test="modify_time != null"> #{modify_time} ,</if>
|
||||
<if test="sts != null and sts != ''"> #{sts} ,</if>
|
||||
<if test="org_id != null and org_id != ''"> #{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''"> #{companyId} ,</if>
|
||||
<if test="billKindId != null and billKindId != ''"> #{billKindId} ,</if>
|
||||
<if test="templateType != null and templateType != ''"> #{templateType} ,</if>
|
||||
<if test="templateName != null and templateName != ''"> #{templateName} ,</if>
|
||||
<if test="messageTitle != null and messageTitle != ''"> #{messageTitle} ,</if>
|
||||
<if test="messageContents != null and messageContents != ''"> #{messageContents} ,</if>
|
||||
<if test="btns != null and btns != ''"> #{btns} ,</if>
|
||||
<if test="dataSource != null and dataSource != ''"> #{dataSource} ,</if>
|
||||
<if test="createDate != null"> #{createDate} ,</if>
|
||||
<if test="createPersonId != null and createPersonId != ''"> #{createPersonId} ,</if>
|
||||
<if test="state != null and state !=''"> #{state} ,</if>
|
||||
<if test="isdelete != null"> #{isdelete} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_message_template(create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, bill_kind_id, template_type, template_name, message_title, message_contents, btns, data_source, create_date, create_person_id, state, isdelete, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.billKindId},#{entity.templateType},#{entity.templateName},#{entity.messageTitle},#{entity.messageContents},#{entity.btns},#{entity.dataSource},#{entity.createDate},#{entity.createPersonId},#{entity.state},#{entity.isdelete}, 'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into sys_message_template(create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, bill_kind_id, template_type, template_name, message_title, message_contents, btns, data_source, create_date, create_person_id, state, isdelete)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.billKindId},#{entity.templateType},#{entity.templateName},#{entity.messageTitle},#{entity.messageContents},#{entity.btns},#{entity.dataSource},#{entity.createDate},#{entity.createPersonId},#{entity.state},#{entity.isdelete})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
create_user_id = values(create_user_id),
|
||||
create_time = values(create_time),
|
||||
modify_user_id = values(modify_user_id),
|
||||
modify_time = values(modify_time),
|
||||
sts = values(sts),
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id),
|
||||
bill_kind_id = values(bill_kind_id),
|
||||
template_type = values(template_type),
|
||||
template_name = values(template_name),
|
||||
message_title = values(message_title),
|
||||
message_contents = values(message_contents),
|
||||
btns = values(btns),
|
||||
data_source = values(data_source),
|
||||
create_date = values(create_date),
|
||||
create_person_id = values(create_person_id),
|
||||
state = values(state),
|
||||
isdelete = values(isdelete)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity" >
|
||||
update sys_message_template set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if>
|
||||
<if test="create_time != null"> create_time = #{create_time},</if>
|
||||
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if>
|
||||
<if test="modify_time != null"> modify_time = #{modify_time},</if>
|
||||
<if test="sts != null and sts != ''"> sts = #{sts},</if>
|
||||
<if test="org_id != null and org_id != ''"> org_id = #{org_id},</if>
|
||||
<if test="companyId != null and companyId != ''"> company_id = #{companyId},</if>
|
||||
<if test="billKindId != null and billKindId != ''"> bill_kind_id = #{billKindId},</if>
|
||||
<if test="templateType != null and templateType != ''"> template_type = #{templateType},</if>
|
||||
<if test="templateName != null and templateName != ''"> template_name = #{templateName},</if>
|
||||
<if test="messageTitle != null and messageTitle != ''"> message_title = #{messageTitle},</if>
|
||||
<if test="messageContents != null and messageContents != ''"> message_contents = #{messageContents},</if>
|
||||
<if test="btns != null and btns != ''"> btns = #{btns},</if>
|
||||
<if test="dataSource != null and dataSource != ''"> data_source = #{dataSource},</if>
|
||||
<if test="createDate != null"> create_date = #{createDate},</if>
|
||||
<if test="createPersonId != null and createPersonId != ''"> create_person_id = #{createPersonId},</if>
|
||||
<if test="state != null and state !=''"> state = #{state},</if>
|
||||
<if test="isdelete != null"> isdelete = #{isdelete},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity" >
|
||||
update sys_message_template set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 多条件逻辑删除 -->
|
||||
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity" >
|
||||
update sys_message_template set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="sorts != null"> and sorts = #{sorts} </if>
|
||||
<if test="sts != null and sts != ''"> and sts = #{sts} </if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId} </if>
|
||||
<if test="billKindId != null and billKindId != ''"> and bill_kind_id = #{billKindId} </if>
|
||||
<if test="templateType != null and templateType != ''"> and template_type = #{templateType} </if>
|
||||
<if test="templateName != null and templateName != ''"> and template_name = #{templateName} </if>
|
||||
<if test="messageTitle != null and messageTitle != ''"> and message_title = #{messageTitle} </if>
|
||||
<if test="messageContents != null and messageContents != ''"> and message_contents = #{messageContents} </if>
|
||||
<if test="btns != null and btns != ''"> and btns = #{btns} </if>
|
||||
<if test="dataSource != null and dataSource != ''"> and data_source = #{dataSource} </if>
|
||||
<if test="createDate != null"> and create_date = #{createDate} </if>
|
||||
<if test="createPersonId != null and createPersonId != ''"> and create_person_id = #{createPersonId} </if>
|
||||
<if test="state != null"> and state = #{state} </if>
|
||||
<if test="isdelete != null"> and isdelete = #{isdelete} </if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from sys_message_template where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.hzya.frame.sysnew.messageTemplate.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* (SysMessageTemplate)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-30 14:21:15
|
||||
*/
|
||||
public interface ISysMessageTemplateService extends IBaseService<SysMessageTemplateEntity, String>{
|
||||
JsonResultEntity queryEntityPage(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity queryEntity(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity saveEntity(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity getEntity(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity updateEntity(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity deleteEntity(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity enableDisableEntity(JSONObject jsonObject);
|
||||
|
||||
JsonResultEntity checkSql(JSONObject jsonObject)throws Exception;
|
||||
|
||||
JsonResultEntity spliceMessage(JSONObject jsonObject);
|
||||
|
||||
}
|
|
@ -0,0 +1,205 @@
|
|||
package com.hzya.frame.sysnew.messageTemplate.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.execsql.service.IExecSqlService;
|
||||
import com.hzya.frame.sysnew.messageTemplate.entity.SysMessageTemplateEntity;
|
||||
import com.hzya.frame.sysnew.messageTemplate.dao.ISysMessageTemplateDao;
|
||||
import com.hzya.frame.sysnew.messageTemplate.service.ISysMessageTemplateService;
|
||||
import com.hzya.frame.sysnew.person.dao.ISysPersonDao;
|
||||
import com.hzya.frame.sysnew.user.entity.SysUserEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* (SysMessageTemplate)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-30 14:21:15
|
||||
*/
|
||||
@Service(value = "sysMessageTemplateService")
|
||||
public class SysMessageTemplateServiceImpl extends BaseService<SysMessageTemplateEntity, String> implements ISysMessageTemplateService {
|
||||
|
||||
private ISysMessageTemplateDao sysMessageTemplateDao;
|
||||
|
||||
@Resource
|
||||
public IExecSqlService execSqlService;
|
||||
|
||||
@Autowired
|
||||
public void setSysMessageTemplateDao(ISysMessageTemplateDao dao) {
|
||||
this.sysMessageTemplateDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity queryEntityPage(JSONObject jsonObject) {
|
||||
SysMessageTemplateEntity entity = getData("jsonStr", jsonObject, SysMessageTemplateEntity.class);
|
||||
//判断分页
|
||||
if (entity == null || entity.getPageNum() == null || entity.getPageSize() == null) {
|
||||
return BaseResult.getFailureMessageEntity("分页查询参数不存在");
|
||||
}
|
||||
PageHelper.startPage(entity.getPageNum(), entity.getPageSize());
|
||||
List<SysMessageTemplateEntity> list = sysMessageTemplateDao.queryByLike(entity);
|
||||
PageInfo<SysMessageTemplateEntity> pageInfo = new PageInfo(list);
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", pageInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity queryEntity(JSONObject jsonObject){
|
||||
SysMessageTemplateEntity entity = getData("jsonStr", jsonObject, SysMessageTemplateEntity.class);
|
||||
if(entity == null){
|
||||
entity = new SysMessageTemplateEntity();
|
||||
}
|
||||
List<SysMessageTemplateEntity> list = sysMessageTemplateDao.queryByLike(entity);
|
||||
return BaseResult.getSuccessMessageEntity("查询数据成功", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity getEntity(JSONObject jsonObject){
|
||||
SysMessageTemplateEntity entity = getData("jsonStr", jsonObject, SysMessageTemplateEntity.class);
|
||||
if(entity == null){
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if(entity.getId() == null || "".equals(entity.getId())){
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
entity = sysMessageTemplateDao.get(entity.getId());
|
||||
if(entity == null){
|
||||
return BaseResult.getFailureMessageEntity("获取消息模版失败");
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("获取消息模版成功", entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity saveEntity(JSONObject jsonObject){
|
||||
SysMessageTemplateEntity entity = getData("jsonStr", jsonObject, SysMessageTemplateEntity.class);
|
||||
if (entity == null) {
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if(entity.getBillKindId() == null || "".equals(entity.getBillKindId())){
|
||||
return BaseResult.getFailureMessageEntity("调用单据类型不允许为空");
|
||||
}
|
||||
if(entity.getTemplateType() == null || "".equals(entity.getTemplateType())){
|
||||
return BaseResult.getFailureMessageEntity("模版类型不允许为空");
|
||||
}
|
||||
if(entity.getTemplateName() == null || "".equals(entity.getTemplateName())){
|
||||
return BaseResult.getFailureMessageEntity("模版名称不允许为空");
|
||||
}
|
||||
if(entity.getMessageContents() == null || "".equals(entity.getMessageContents())){
|
||||
return BaseResult.getFailureMessageEntity("消息内容不允许为空");
|
||||
}
|
||||
if(entity.getDataSource() == null || "".equals(entity.getDataSource())){
|
||||
return BaseResult.getFailureMessageEntity("数据源不允许为空");
|
||||
}
|
||||
if(entity.getCreateDate() == null){
|
||||
return BaseResult.getFailureMessageEntity("创建时间不允许为空");
|
||||
}
|
||||
if(entity.getCreatePersonId() == null || "".equals(entity.getCreatePersonId())){
|
||||
return BaseResult.getFailureMessageEntity("创建人不允许为空");
|
||||
}
|
||||
entity.setCreate();
|
||||
sysMessageTemplateDao.save(entity);
|
||||
return BaseResult.getSuccessMessageEntity("保存消息模版成功",entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity updateEntity(JSONObject jsonObject){
|
||||
SysMessageTemplateEntity entity = getData("jsonStr", jsonObject, SysMessageTemplateEntity.class);
|
||||
if(entity == null){
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
if(entity.getBillKindId() == null || "".equals(entity.getBillKindId())){
|
||||
return BaseResult.getFailureMessageEntity("调用单据类型不允许为空");
|
||||
}
|
||||
if(entity.getTemplateType() == null || "".equals(entity.getTemplateType())){
|
||||
return BaseResult.getFailureMessageEntity("模版类型不允许为空");
|
||||
}
|
||||
if(entity.getTemplateName() == null || "".equals(entity.getTemplateName())){
|
||||
return BaseResult.getFailureMessageEntity("模版名称不允许为空");
|
||||
}
|
||||
if(entity.getMessageContents() == null || "".equals(entity.getMessageContents())){
|
||||
return BaseResult.getFailureMessageEntity("消息内容不允许为空");
|
||||
}
|
||||
if(entity.getDataSource() == null || "".equals(entity.getDataSource())){
|
||||
return BaseResult.getFailureMessageEntity("数据源不允许为空");
|
||||
}
|
||||
if(entity.getCreateDate() == null){
|
||||
return BaseResult.getFailureMessageEntity("创建时间不允许为空");
|
||||
}
|
||||
if(entity.getCreatePersonId() == null || "".equals(entity.getCreatePersonId())){
|
||||
return BaseResult.getFailureMessageEntity("创建人不允许为空");
|
||||
}
|
||||
entity.setUpdate();
|
||||
sysMessageTemplateDao.update(entity);
|
||||
return BaseResult.getSuccessMessageEntity("修改消息模版成功",entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity deleteEntity(JSONObject jsonObject){
|
||||
SysMessageTemplateEntity entity = getData("jsonStr", jsonObject, SysMessageTemplateEntity.class);
|
||||
if(entity == null){
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
entity.setUpdate();
|
||||
//1、判断这个模版有没有被使用过,使用过就不能删除(待完成)
|
||||
//将模版id去,预警配置表里查一下,如果有匹配的数据,代表有人正在使用,不能删除
|
||||
sysMessageTemplateDao.logicRemove(entity);
|
||||
return BaseResult.getSuccessMessageEntity("删除消息模版成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity enableDisableEntity(JSONObject jsonObject){
|
||||
SysMessageTemplateEntity entity = getData("jsonStr", jsonObject, SysMessageTemplateEntity.class);
|
||||
if(entity == null){
|
||||
return BaseResult.getFailureMessageEntity("参数不允许为空");
|
||||
}
|
||||
if (entity.getId() == null || "".equals(entity.getId())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
if (entity.getState() == null || "".equals(entity.getState())) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
//0启用,1禁用
|
||||
if("0".equals(entity.getState())){
|
||||
entity.setUpdate();
|
||||
sysMessageTemplateDao.update(entity);
|
||||
return BaseResult.getSuccessMessageEntity("启用模版成功");
|
||||
}else{
|
||||
//停用消息模版
|
||||
entity.setUpdate();
|
||||
sysMessageTemplateDao.update(entity);
|
||||
return BaseResult.getSuccessMessageEntity("停用模版成功");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity checkSql(JSONObject jsonObject) throws Exception {
|
||||
try {
|
||||
String sql = JSONObject.parseObject(jsonObject.getString("jsonStr")).getString("sql");
|
||||
List<HashMap<String, Object>> result = execSqlService.execSelectSql(sql, "master");
|
||||
return BaseResult.getSuccessMessageEntity("SQL检查成功", result);
|
||||
} catch (Exception e) {
|
||||
return BaseResult.getFailureMessageEntity("SQL检查失败,原因:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonResultEntity spliceMessage(JSONObject jsonObject){
|
||||
return BaseResult.getSuccessMessageEntity("消息拼接成功");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.hzya.frame.sysnew.pushMessage.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.sysnew.pushMessage.entity.SysPushMessageEntity;
|
||||
|
||||
public interface ISysPushMessageDao extends IBaseDao<SysPushMessageEntity,String>{
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue