Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
|
8fabbe8539 | |
|
47c91bb061 | |
|
e1743ced68 |
|
@ -50,18 +50,6 @@
|
|||
<profile.active>zqtlocal</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>kekao</id> <!--kekao-->
|
||||
<properties>
|
||||
<profile.active>kekao</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>kekaotest</id> <!--曾庆拓-->
|
||||
<properties>
|
||||
<profile.active>kekaotest</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
<build>
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
package com.hzya.frame.plugin.kekao.dao;
|
||||
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.plugin.kekao.entity.CreditauditEntity;
|
||||
|
||||
public interface ICreditauditDao extends IBaseDao<CreditauditEntity, String> {
|
||||
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
package com.hzya.frame.plugin.kekao.dao.impl;
|
||||
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.plugin.kekao.dao.ICreditauditDao;
|
||||
import com.hzya.frame.plugin.kekao.entity.CreditauditEntity;
|
||||
|
||||
|
||||
public class CreditauditDaoImpl extends MybatisGenericDao<CreditauditEntity, String> implements ICreditauditDao {
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
package com.hzya.frame.plugin.kekao.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
public class CreditauditEntity extends BaseEntity {
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<?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.kekao.dao.impl.CreditauditDaoImpl">
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
package com.hzya.frame.plugin.kekao.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.kekao.service.ICreditauditService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* 信用额度审批单保存提交
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class CreditauditPluginInitializer extends PluginBaseEntity{
|
||||
Logger logger = LoggerFactory.getLogger(CreditauditPluginInitializer.class);
|
||||
@Autowired
|
||||
private ICreditauditService creditauditService;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "执行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "执行销毁方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "CreditauditPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "CreditauditPlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "CreditauditPlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
try {
|
||||
logger.info("======开始执行信用额度审批单保存提交同步========");
|
||||
return creditauditService.sendCreditauditData(requestJson);
|
||||
}catch (Exception e){
|
||||
logger.info("======执行信用额度审批单保存提交同步失败:{}========",e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
package com.hzya.frame.plugin.kekao.plugin;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.plugin.kekao.service.ICreditauditService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* 销售返利
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-06-21 13:52:35
|
||||
*/
|
||||
public class SalesRebatePluginInitializer extends PluginBaseEntity{
|
||||
Logger logger = LoggerFactory.getLogger(SalesRebatePluginInitializer.class);
|
||||
@Autowired
|
||||
private ICreditauditService creditauditService;
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logger.info(getPluginLabel() + "执行初始化方法initialize()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
logger.info(getPluginLabel() + "执行销毁方法destroy()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "SalesRebatePlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "SalesRebatePlugin插件";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginLabel() {
|
||||
return "SalesRebatePlugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginType() {
|
||||
return "1";
|
||||
}
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) {
|
||||
try {
|
||||
logger.info("======开始执行销售返利同步========");
|
||||
return creditauditService.sendSalesRebateData(requestJson);
|
||||
}catch (Exception e){
|
||||
logger.info("======执行销售返利同步失败:{}========",e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
package com.hzya.frame.plugin.kekao.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.plugin.kekao.entity.CreditauditEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface ICreditauditService extends IBaseService<CreditauditEntity, String>{
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 信用额度审批单保存提交同步
|
||||
* @Date 2:32 下午 2025/8/5
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity sendCreditauditData(JSONObject requestJson);
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 销售返利同步
|
||||
* @Date 3:12 下午 2025/8/5
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity sendSalesRebateData(JSONObject requestJson);
|
||||
}
|
|
@ -1,334 +0,0 @@
|
|||
package com.hzya.frame.plugin.kekao.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.plugin.kekao.dao.ICreditauditDao;
|
||||
import com.hzya.frame.plugin.kekao.entity.CreditauditEntity;
|
||||
import com.hzya.frame.plugin.kekao.service.ICreditauditService;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class CreditauditServiceImpl extends BaseService<CreditauditEntity, String> implements ICreditauditService {
|
||||
@Value("${zt.url}")
|
||||
private String url;
|
||||
|
||||
private ICreditauditDao creditauditDao;
|
||||
|
||||
@Autowired
|
||||
public void setCreditauditDao(ICreditauditDao dao) {
|
||||
this.creditauditDao = dao;
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 信用额度审批单保存提交同步
|
||||
* @Date 2:32 下午 2025/8/5
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity sendCreditauditData(JSONObject requestJson) {
|
||||
logger.error("同步信用额度审批单保存提交入参" + requestJson.toJSONString());
|
||||
JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
|
||||
if (jsonStr == null) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
JSONArray businessDataStr = jsonStr.getJSONArray("businessDataStr");
|
||||
if (businessDataStr == null) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
JSONObject mainData = businessDataStr.getJSONObject(0);
|
||||
if (mainData == null) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
//组装数据
|
||||
//获取token
|
||||
String token = null;
|
||||
JSONObject tokenData = new JSONObject();
|
||||
String tokenResult = HttpRequest.post(url).
|
||||
header("appId", "800053").
|
||||
header("apiCode", "8000530000").
|
||||
header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj").
|
||||
header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
|
||||
body(tokenData.toJSONString()).
|
||||
execute().
|
||||
body();
|
||||
logger.error("BIP Token:" + tokenResult);
|
||||
JSONObject resoutJson = JSONObject.parseObject(tokenResult);
|
||||
if (resoutJson.getBoolean("flag")) {
|
||||
token = resoutJson.getJSONObject("attribute").getJSONObject("data").getString("access_token");
|
||||
} else {
|
||||
return BaseResult.getFailureMessageEntity("获取BIP token失败");
|
||||
}
|
||||
JSONObject sendData = setSendCreditauditData(mainData);
|
||||
logger.error("同步信用额度审批单保存提交单据发送参数:" + sendData.toJSONString());
|
||||
String sendResult = HttpRequest.post(url).
|
||||
header("appId", "800053").
|
||||
header("apiCode", "8000530001").
|
||||
header("access_token", token).
|
||||
header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj").
|
||||
header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
|
||||
body(sendData.toJSONString()).
|
||||
execute().
|
||||
body();
|
||||
logger.error("同步信用额度审批单保存提交单据发送返回:" + sendResult);
|
||||
JSONObject sendJson = JSONObject.parseObject(sendResult);
|
||||
if (sendJson.getBoolean("flag")) {
|
||||
return BaseResult.getSuccessMessageEntity("同步信用额度审批单保存提交单据发送成功");
|
||||
} else {
|
||||
return BaseResult.getFailureMessageEntity("同步信用额度审批单保存提交单据发送错误:"+sendJson.getString("msg"));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 组装参数
|
||||
* @Date 2:47 下午 2025/8/5
|
||||
* @param mainData
|
||||
* @return com.alibaba.fastjson.JSONObject
|
||||
**/
|
||||
private JSONObject setSendCreditauditData(JSONObject mainData) {
|
||||
JSONObject sendData = new JSONObject();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
// 构建headVO对象
|
||||
JSONObject headVO = new JSONObject();
|
||||
headVO.put("pk_org", mainData.getString("field0031"));//信用控制域
|
||||
headVO.put("ctrantypeid", mainData.getString("field0026"));//额度审批单类型
|
||||
headVO.put("vtrantypecode", mainData.getString("field0027"));//交易类型编码
|
||||
headVO.put("vbillcode", mainData.getString("field0033"));//单据号
|
||||
headVO.put("dbilldate", mainData.getString("field0003"));//单据日期
|
||||
headVO.put("dmakedate", mainData.getString("field0003"));//制单日期
|
||||
headVO.put("fstatusflag","");//单据状态
|
||||
headVO.put("billmaker", mainData.getString("field0029"));//制单人
|
||||
headVO.put("vnote", mainData.getString("field0011"));//备注
|
||||
if(mainData.getString("field0036") != null && !"".equals(mainData.getString("field0036"))){
|
||||
headVO.put("capplyerid", mainData.getString("field0036"));//申请人
|
||||
}else {
|
||||
headVO.put("capplyerid", "XONE");
|
||||
}
|
||||
if(mainData.getString("field0035") != null && !"".equals(mainData.getString("field0035"))){
|
||||
headVO.put("capplydeptid", mainData.getString("field0035"));//申请部门
|
||||
}else {
|
||||
headVO.put("capplydeptid", "0201");
|
||||
}
|
||||
if(mainData.getString("field0029") != null && !"".equals(mainData.getString("field0029"))){
|
||||
headVO.put("creator", mainData.getString("field0029"));
|
||||
}else {
|
||||
headVO.put("creator", "oagly");
|
||||
}
|
||||
//headVO.put("vdef1", "wxzvdef1");
|
||||
|
||||
// 构建bodyVOList数组中的第一个对象
|
||||
JSONObject bodyVO = new JSONObject();
|
||||
bodyVO.put("climittypeid", mainData.getString("field0030"));//额度类型
|
||||
bodyVO.put("pk_org", mainData.getString("field0031"));//信用控制域
|
||||
//bodyVO.put("csaleorgid", mainData.getString("field0002"));//销售组织
|
||||
bodyVO.put("ccustid", mainData.getString("field0024"));//客户
|
||||
//bodyVO.put("climitlevel", mainData.getString("field0002"));//信用等级
|
||||
bodyVO.put("ccurrencyid", mainData.getString("field0023"));//币种
|
||||
bodyVO.put("nlimitmny", mainData.getString("field0012"));//信用额度
|
||||
bodyVO.put("dfromdate", mainData.getString("field0020"));//有效期从
|
||||
Date dtodate = mainData.getDate("field0014");
|
||||
bodyVO.put("dtodate", sdf.format(dtodate)+" 23:59:59");//有效期至
|
||||
bodyVO.put("pk_income", mainData.getString("field0032"));//收款协议-虚拟字段
|
||||
bodyVO.put("pk_saleorg", mainData.getString("field0031"));//销售组织-虚拟字段
|
||||
|
||||
//bodyVO.put("dbilldate", "2025-08-05 09:36:37");
|
||||
//bodyVO.put("vnote", "wxzB备注");
|
||||
//bodyVO.put("vbdef1", "wxzvbdef1");
|
||||
|
||||
// 创建JSON数组并添加bodyVO对象
|
||||
JSONArray bodyVOList = new JSONArray();
|
||||
bodyVOList.add(bodyVO);
|
||||
|
||||
// 将headVO和bodyVOList添加到外层对象
|
||||
sendData.put("headVO", headVO);
|
||||
sendData.put("bodyVOList", bodyVOList);
|
||||
|
||||
return sendData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param requestJson
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Author lvleigang
|
||||
* @Description 销售返利同步
|
||||
* @Date 2:32 下午 2025/8/5
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity sendSalesRebateData(JSONObject requestJson) {
|
||||
logger.error("同步销售返利入参" + requestJson.toJSONString());
|
||||
JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
|
||||
if (jsonStr == null) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
JSONArray businessDataStr = jsonStr.getJSONArray("businessDataStr");
|
||||
if (businessDataStr == null) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
JSONObject mainData = businessDataStr.getJSONObject(0);
|
||||
JSONObject mxData = businessDataStr.getJSONObject(1);
|
||||
if (mainData == null) {
|
||||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
JSONArray jsonArray = mxData.getJSONArray("formson_1788");
|
||||
//组装数据
|
||||
//获取token
|
||||
String token = null; //todo
|
||||
JSONObject tokenData = new JSONObject();
|
||||
String tokenResult = HttpRequest.post(url).
|
||||
header("appId", "800053").
|
||||
header("apiCode", "8000530000").
|
||||
header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj").
|
||||
header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
|
||||
body(tokenData.toJSONString()).
|
||||
execute().
|
||||
body();
|
||||
logger.error("BIP Token:" + tokenResult);
|
||||
JSONObject resoutJson = JSONObject.parseObject(tokenResult);
|
||||
if (resoutJson.getBoolean("flag")) {
|
||||
token = resoutJson.getJSONObject("attribute").getJSONObject("data").getString("access_token");
|
||||
} else {
|
||||
return BaseResult.getFailureMessageEntity("获取BIP token失败");
|
||||
}
|
||||
|
||||
|
||||
JSONObject sendData = setSalesRebateData(mainData,jsonArray);
|
||||
logger.error("同步销售返利发送参数:" + sendData.toJSONString());
|
||||
String sendResult = HttpRequest.post(url).
|
||||
header("appId", "800053").
|
||||
header("apiCode", "8000530002").
|
||||
header("access_token", token).
|
||||
header("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj").
|
||||
header("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=").
|
||||
body(sendData.toJSONString()).
|
||||
execute().
|
||||
body();
|
||||
logger.error("同步销售返利发送返回:" + sendResult);
|
||||
JSONObject sendJson = JSONObject.parseObject(sendResult);
|
||||
if (sendJson.getBoolean("flag")) {
|
||||
return BaseResult.getSuccessMessageEntity("同步销售返利发送成功");
|
||||
} else {
|
||||
return BaseResult.getFailureMessageEntity("同步销售返利发送错误:"+sendJson.getString("msg"));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author lvleigang
|
||||
* @Description 组装参数
|
||||
* @Date 2:47 下午 2025/8/5
|
||||
* @param mainData
|
||||
* @return com.alibaba.fastjson.JSONObject
|
||||
**/
|
||||
private JSONObject setSalesRebateData(JSONObject mainData,JSONArray jsonArray) {
|
||||
JSONObject sendData = new JSONObject();
|
||||
|
||||
// 构建salerebate对象
|
||||
JSONObject salerebate = new JSONObject();
|
||||
salerebate.put("pk_salerebate", null); // 主键
|
||||
if(mainData.getString("field0021") != null && !"".equals(mainData.getString("field0021"))){
|
||||
salerebate.put("pk_org", mainData.getString("field0021")); // 组织,必填,取Dee组织编码:如001
|
||||
}else {
|
||||
salerebate.put("pk_org", "001"); // 组织,必填,取Dee组织编码:如001
|
||||
}
|
||||
if(mainData.getString("field0021") != null && !"".equals(mainData.getString("field0021"))){
|
||||
salerebate.put("pk_org_v", mainData.getString("field0021")); // 组织,必填,取Dee组织编码:如001
|
||||
}else {
|
||||
salerebate.put("pk_org_v", "001"); // 组织多版本,必填,取Dee组织编码:如001
|
||||
}
|
||||
salerebate.put("pk_group", "COCOS"); // pk_group
|
||||
salerebate.put("vbillcode", mainData.getString("field0001")); // 返利申请单号,OA申请单号
|
||||
salerebate.put("vdef3", mainData.getString("field0034")); // oa申请部门名称
|
||||
salerebate.put("vdef2", mainData.getString("field0033")); // oa申请人名称
|
||||
salerebate.put("maketime", mainData.getString("field0004")); // 制单时间,必填,格式:2025-08-08 00:00:00
|
||||
salerebate.put("lastmaketime", null); // 最后修改时间,格式:2025-08-08 00:00:00
|
||||
if(mainData.getString("field0022") != null && !"".equals(mainData.getString("field0022"))){
|
||||
salerebate.put("creator", mainData.getString("field0022")); // 创建人,必填,用户编码:可默认oagly
|
||||
}else {
|
||||
salerebate.put("creator", "oagly"); // 创建人,必填,用户编码:可默认oagly
|
||||
}
|
||||
salerebate.put("creationtime", mainData.getString("field0004")); // 创建时间,必填,格式:2025-08-08 00:00:00
|
||||
salerebate.put("modifier", null); // 最后修改人
|
||||
if(mainData.getString("field0023") != null && !"".equals(mainData.getString("field0023"))){
|
||||
salerebate.put("billtype", mainData.getString("field0023")); // 单据类型,必填,默认:30FL
|
||||
}else {
|
||||
salerebate.put("billtype", "30FL"); // 单据类型,必填,默认:30FL
|
||||
}
|
||||
salerebate.put("transtype", null); // 交易类型
|
||||
salerebate.put("transtypepk", null); // 交易类型 pk
|
||||
salerebate.put("applydate", mainData.getString("field0004")); // 申请日期,必填,格式:2025-08-08 00:00:00
|
||||
//if(mainData.getString("field0024") != null && !"".equals(mainData.getString("field0024"))){
|
||||
// salerebate.put("pk_psndoc", mainData.getString("field0024"));
|
||||
//}else {
|
||||
// salerebate.put("pk_psndoc", "XONE");
|
||||
//}
|
||||
//if(mainData.getString("field0025") != null && !"".equals(mainData.getString("field0025"))){
|
||||
// salerebate.put("pk_dept", mainData.getString("field0025")); // 部门,部门编码
|
||||
//}else {
|
||||
// salerebate.put("pk_dept", "0201");
|
||||
//}
|
||||
|
||||
salerebate.put("totalaount", mainData.getString("field0026")); // 返利总额,必填,金额总额
|
||||
salerebate.put("memo", mainData.getString("field0016")); // 备注
|
||||
salerebate.put("approvenote", null); // 审批批语
|
||||
salerebate.put("approver", null); // 审批人
|
||||
salerebate.put("approvedate", null); // 审批时间,格式:2025-08-08 00:00:00
|
||||
salerebate.put("approvestatus", null); // 审批状态
|
||||
salerebate.put("emendenum", null); // 修订枚举
|
||||
salerebate.put("billmaker", "oagly"); // 制单人
|
||||
salerebate.put("vdef1", mainData.getString("field0026")); // 返利类型编码,必填,取Dee返利类型自定义档案编码
|
||||
|
||||
String field0009 = null;
|
||||
String field0028 = null;
|
||||
// 构建pk_salerebate_b数组
|
||||
JSONArray salerebateBArray = new JSONArray();
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject salerebateB = new JSONObject();
|
||||
salerebateB.put("pk_salerebate_b", ""); // 主键
|
||||
if(mainData.getString("field0021") != null && !"".equals(mainData.getString("field0021"))){
|
||||
salerebateB.put("pk_org", mainData.getString("field0021")); // 组织,必填,取Dee组织编码:如001
|
||||
}else {
|
||||
salerebateB.put("pk_org", "001"); // 组织,必填,取表头组织编码
|
||||
}
|
||||
if(mainData.getString("field0021") != null && !"".equals(mainData.getString("field0021"))){
|
||||
salerebateB.put("pk_org_v", mainData.getString("field0021")); // 组织,必填,取Dee组织编码:如001
|
||||
}else {
|
||||
salerebateB.put("pk_org_v", "001"); // 组织,必填,取表头组织编码
|
||||
}
|
||||
salerebateB.put("rowno", String.valueOf((i+1)*10)); // 行号,必填,默认第一行:10,多行20、30递增
|
||||
salerebateB.put("cmaterialvid", null); // 物料,取DEE物料编码
|
||||
salerebateB.put("cmaterialid", null); // 物料(版本),取DEE物料编码
|
||||
salerebateB.put("materialspec", null); // 规格,取DEE物料对应的规格
|
||||
salerebateB.put("pk_measdoc", null); // 主计量单位,取DEE计量单位的编码
|
||||
salerebateB.put("money", jsonArray.getJSONObject(i).getString("field0014")); // 返利金额,必填,返利金额
|
||||
field0009 = jsonArray.getJSONObject(i).getString("field0009");
|
||||
field0028 = jsonArray.getJSONObject(i).getString("field0028");
|
||||
salerebateB.put("vmemo", null); // 行备注
|
||||
salerebateB.put("vbdef1", null); // 自定义项 1
|
||||
|
||||
// 将对象添加到数组
|
||||
salerebateBArray.add(salerebateB);
|
||||
}
|
||||
salerebate.put("pk_customer", field0009); // 客户,必填,取DEE客户编码
|
||||
salerebate.put("rebatetype", field0028); // 返利类型,必填,取Dee返利类型自定义档案编码
|
||||
// 将salerebate和pk_salerebate_b添加到外层对象
|
||||
sendData.put("salerebate", salerebate);
|
||||
sendData.put("pk_salerebate_b", salerebateBArray);
|
||||
|
||||
|
||||
return sendData;
|
||||
}
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: error
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: D:\yongansystem\log\zs
|
||||
spring:
|
||||
data:
|
||||
mongodb:
|
||||
flyway:
|
||||
# 启动flyway migration, 默认为true
|
||||
enabled: false
|
||||
datasource:
|
||||
dynamic:
|
||||
druid:
|
||||
filters: stat,log4j2
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: D:\yongansystem\log\zs
|
||||
tomcatpath: D:\yongansystem\log\zs
|
||||
pluginpath: D:\yongansystem\log\zs
|
||||
zt:
|
||||
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
cbs8:
|
||||
appId: 1P4AGrpz
|
||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||
cbs_public_key: 0469146F06BF3B01236E84632441E826
|
||||
#电子回单下载临时存放位置
|
||||
elec_path: /Users/xiangerlin/Downloads/
|
||||
OA:
|
||||
data_source_code: yc_oa
|
||||
server:
|
||||
port: 10086
|
||||
|
||||
database:
|
||||
databaseName: businesscenter
|
||||
host: 192.168.2.237
|
||||
port: 3306
|
||||
username: root
|
||||
password: hzya@1314
|
||||
filePase: /Users/apple/Desktop/log
|
||||
fileName: data.sql
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
#######################本地环境#######################
|
||||
logging:
|
||||
#日志级别 指定目录级别
|
||||
level:
|
||||
root: error
|
||||
encodings: UTF-8
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: D:\yongansystem\log\test
|
||||
spring:
|
||||
data:
|
||||
mongodb:
|
||||
flyway:
|
||||
# 启动flyway migration, 默认为true
|
||||
enabled: false
|
||||
datasource:
|
||||
dynamic:
|
||||
druid:
|
||||
filters: stat,log4j2
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/businesscentertest?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: D:\yongansystem\log\test
|
||||
tomcatpath: D:\yongansystem\log\test
|
||||
pluginpath: D:\yongansystem\log\test
|
||||
zt:
|
||||
url: http://127.0.0.1:10087/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
cbs8:
|
||||
appId: 1P4AGrpz
|
||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||
cbs_public_key: 0469146F06BF3B01236E84632441E826
|
||||
#电子回单下载临时存放位置
|
||||
elec_path: /Users/xiangerlin/Downloads/
|
||||
OA:
|
||||
data_source_code: yc_oa
|
||||
server:
|
||||
port: 10086
|
||||
|
||||
database:
|
||||
databaseName: businesscenter
|
||||
host: 192.168.2.237
|
||||
port: 3306
|
||||
username: root
|
||||
password: hzya@1314
|
||||
filePase: /Users/apple/Desktop/log
|
||||
fileName: data.sql
|
||||
|
|
@ -30,12 +30,9 @@ spring:
|
|||
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
# driver-class-name: dm.jdbc.driver.DmDriver
|
||||
# type: com.alibaba.druid.pool.DruidDataSource
|
||||
# url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
# username: root
|
||||
# password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
url: jdbc:mysql://172.16.10.252:3306/businesscentertest?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
url: jdbc:mysql://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: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
# url: jdbc:dm://hzya.ufyct.com:9040/businesscenter?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
|
||||
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
|
||||
|
@ -47,7 +44,6 @@ savefile:
|
|||
path: /Users/apple/Desktop/log/local
|
||||
tomcatpath: /Users/apple/Desktop/log/local
|
||||
pluginpath: /Users/apple/Desktop/log/local
|
||||
|
||||
zt:
|
||||
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
cbs8:
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plugin>
|
||||
<id>CreditauditPlugin</id>
|
||||
<name>CreditauditPlugin插件</name>
|
||||
<category>20250805001</category>
|
||||
</plugin>
|
|
@ -1,5 +0,0 @@
|
|||
<?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="creditauditDao" class="com.hzya.frame.plugin.kekao.dao.impl.CreditauditDaoImpl" />
|
||||
</beans>
|
|
@ -1,6 +0,0 @@
|
|||
<?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="creditauditPluginInitializer" class="com.hzya.frame.plugin.kekao.plugin.CreditauditPluginInitializer" />
|
||||
<bean name="salesRebatePluginInitializer" class="com.hzya.frame.plugin.kekao.plugin.SalesRebatePluginInitializer" />
|
||||
</beans>
|
|
@ -1,5 +0,0 @@
|
|||
<?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="creditauditService" class="com.hzya.frame.plugin.kekao.service.impl.CreditauditServiceImpl" />
|
||||
</beans>
|
|
@ -5,6 +5,8 @@ import cn.hutool.crypto.SecureUtil;
|
|||
import cn.hutool.crypto.symmetric.SymmetricAlgorithm;
|
||||
import cn.hutool.crypto.symmetric.SymmetricCrypto;
|
||||
|
||||
import static cn.hutool.crypto.CipherMode.encrypt;
|
||||
|
||||
/**
|
||||
* @Description AES加密解密
|
||||
* @Author xiang2lin
|
||||
|
@ -77,4 +79,9 @@ public class AESUtil {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String data = "U8C241231";
|
||||
String encrypt1 = encrypt(data);
|
||||
System.out.println(encrypt1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import org.slf4j.LoggerFactory;
|
|||
import org.springframework.context.support.ApplicationObjectSupport;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author 郭军辉
|
||||
* <p>
|
||||
|
@ -26,7 +25,7 @@ public class DefaultController extends ApplicationObjectSupport {
|
|||
* @return
|
||||
*/
|
||||
public JsonResultEntity getFailureMessageEntity(String message) {
|
||||
return new JsonResultEntity(message, false);
|
||||
return new JsonResultEntity(message, false, "500");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,7 +35,7 @@ public class DefaultController extends ApplicationObjectSupport {
|
|||
* @return
|
||||
*/
|
||||
public JsonResultEntity getFailureMessageEntity(String message, Object mo) {
|
||||
return new JsonResultEntity(message, false, mo);
|
||||
return new JsonResultEntity(message, false, "500", mo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,7 +46,7 @@ public class DefaultController extends ApplicationObjectSupport {
|
|||
* @return
|
||||
*/
|
||||
public JsonResultEntity getSuccessMessageEntity(String message, Object mo) {
|
||||
return new JsonResultEntity(message, true, mo);
|
||||
return new JsonResultEntity(message, true, "200", mo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,18 +55,11 @@ public class DefaultController extends ApplicationObjectSupport {
|
|||
* @param message 提示消息
|
||||
* @return
|
||||
*/
|
||||
public JsonResultEntity getSuccessMessageEntity(String message ) {
|
||||
return new JsonResultEntity(message, true);
|
||||
public JsonResultEntity getSuccessMessageEntity(String message) {
|
||||
return new JsonResultEntity(message, true, "200");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* //绑定org_id
|
||||
*
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
package com.hzya.frame.mdm.mdmModule;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.hzya.frame.mdm.mdmModule.service.IMdmModuleService;
|
||||
import com.hzya.frame.mdm.mdmModule.vo.ExcelTemplateVO;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class WriteTest {
|
||||
|
||||
@Autowired
|
||||
private IMdmModuleService mdmModuleService;
|
||||
|
||||
@Test
|
||||
public void testGenerateExcelTemplate() throws IOException {
|
||||
// 文件夹路径
|
||||
String folderPath = "D:/test/";
|
||||
// 完整文件路径(文件夹 + 文件名)
|
||||
String localFilePath = folderPath + "表字段定义模版.xlsx";
|
||||
File dir = new File(folderPath);
|
||||
if (!dir.exists()) {
|
||||
dir.mkdirs(); // 创建文件夹(如果不存在)
|
||||
}
|
||||
// 准备模板的示例数据
|
||||
List<ExcelTemplateVO> demoData = new ArrayList<>();
|
||||
// 生成Excel并保存到本地文件
|
||||
try (OutputStream outputStream = new FileOutputStream(localFilePath)) {
|
||||
EasyExcel.write(outputStream, ExcelTemplateVO.class)
|
||||
.sheet("表字段定义模版")
|
||||
.doWrite(demoData);
|
||||
}
|
||||
System.out.println("Excel模板已成功生成,保存路径:" + localFilePath);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.hzya.frame.mdm.mdmModule.config;
|
||||
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
public class CacheConfig extends CachingConfigurerSupport {
|
||||
|
||||
@Override
|
||||
@Bean
|
||||
public ConcurrentMapCacheManager cacheManager() {
|
||||
// 整合所有需要的缓存名称:原有的mdm相关缓存 + 新的业务缓存
|
||||
List<String> cacheNames = Arrays.asList(
|
||||
// 原有缓存(来自SimpleCacheManager的配置)
|
||||
"mdmModuleDb",
|
||||
"mdmModuleDbFileds",
|
||||
"mdmModule",
|
||||
// 新添加的业务缓存(来自之前的ConcurrentMapCacheManager配置)
|
||||
"sysApplicationPlugin",
|
||||
"IntegrationTask",
|
||||
"IntegrationTaskLiving"
|
||||
);
|
||||
ConcurrentMapCacheManager cacheManager = new ConcurrentMapCacheManager();
|
||||
cacheManager.setCacheNames(cacheNames); // 注册所有缓存名称
|
||||
return cacheManager;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.hzya.frame.mdm.mdmModule.controller;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.mdm.mdmModule.service.IMdmModuleService;
|
||||
import com.hzya.frame.mdm.mdmModule.vo.ImportExcelVO;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import jline.internal.Log;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "/excel")
|
||||
public class ImportExcelController {
|
||||
@Autowired
|
||||
private IMdmModuleService iMdmModuleService;
|
||||
|
||||
/**
|
||||
* 导入模版
|
||||
*/
|
||||
@RequestMapping(value = "/importTemplateFile" ,method = RequestMethod.POST)
|
||||
public JsonResultEntity importTemplateFile(@RequestParam("file") MultipartFile file,
|
||||
@ModelAttribute ImportExcelVO importExcelVO){
|
||||
|
||||
List<MdmModuleDbFiledsEntity> entities = iMdmModuleService.importTemplateFile(file,importExcelVO);
|
||||
// 新增字段
|
||||
for (MdmModuleDbFiledsEntity entity : entities) {
|
||||
// JSONObject object = (JSONObject) JSONObject.toJSON(entity);
|
||||
|
||||
String str = JSONObject.toJSONString(entity);
|
||||
Map<String,String> jsonStr=new HashMap<>();
|
||||
jsonStr.put("jsonStr",str);
|
||||
String jsonS = JSON.toJSONString(jsonStr);
|
||||
JSONObject jsonObject = JSONObject.parseObject(jsonS);
|
||||
|
||||
iMdmModuleService.saveMdmDbField(jsonObject);
|
||||
}
|
||||
return new JsonResultEntity("导入模版成功",true,200);
|
||||
|
||||
}
|
||||
}
|
|
@ -26,8 +26,45 @@ public class MdmModuleEntity extends BaseEntity {
|
|||
private String createUser;
|
||||
//修改人
|
||||
private String modifyUser;
|
||||
/** 0:预制 1:手工 */
|
||||
private String tag;
|
||||
private String u8cDbPk;
|
||||
private String nccDbPk;
|
||||
private String ysDbPk;
|
||||
|
||||
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public String getU8cDbPk() {
|
||||
return u8cDbPk;
|
||||
}
|
||||
|
||||
public void setU8cDbPk(String u8cDbPk) {
|
||||
this.u8cDbPk = u8cDbPk;
|
||||
}
|
||||
|
||||
public String getNccDbPk() {
|
||||
return nccDbPk;
|
||||
}
|
||||
|
||||
public void setNccDbPk(String nccDbPk) {
|
||||
this.nccDbPk = nccDbPk;
|
||||
}
|
||||
|
||||
public String getYsDbPk() {
|
||||
return ysDbPk;
|
||||
}
|
||||
|
||||
public void setYsDbPk(String ysDbPk) {
|
||||
this.ysDbPk = ysDbPk;
|
||||
}
|
||||
|
||||
public String getMdmName() {
|
||||
return mdmName;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
<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="tag" column="tag" jdbcType="VARCHAR"/>
|
||||
<result property="u8cDbPk" column="u8c_db_pk" jdbcType="VARCHAR"/>
|
||||
<result property="nccDbPk" column="ncc_db_pk" jdbcType="VARCHAR"/>
|
||||
<result property="ysDbPk" column="ys_db_pk" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
@ -39,6 +43,10 @@
|
|||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,tag
|
||||
,u8c_db_pk
|
||||
,ncc_db_pk
|
||||
,ys_db_pk
|
||||
</sql>
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-MdmModuleEntity-result">
|
||||
|
@ -67,6 +75,10 @@
|
|||
<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="tag != null and tag != ''">and tag = #{tag}</if>
|
||||
<if test="u8cDbPk != null and u8cDbPk != ''">and u8c_db_pk = #{u8cDbPk}</if>
|
||||
<if test="nccDbPk != null and nccDbPk != ''">and ncc_db_pk = #{nccDbPk}</if>
|
||||
<if test="ysDbPk != null and ysDbPk != ''">and ys_db_pk = #{ysDbPk}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
||||
|
@ -91,6 +103,10 @@
|
|||
<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="tag != null and tag != ''">and tag = #{tag}</if>
|
||||
<if test="u8cDbPk != null and u8cDbPk != ''">and u8c_db_pk = #{u8cDbPk}</if>
|
||||
<if test="nccDbPk != null and nccDbPk != ''">and ncc_db_pk = #{nccDbPk}</if>
|
||||
<if test="ysDbPk != null and ysDbPk != ''">and ys_db_pk = #{ysDbPk}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
||||
|
@ -122,6 +138,7 @@
|
|||
<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="tag != null and tag != ''">and tag like concat('%',#{tag},'%')</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
||||
|
@ -149,6 +166,7 @@
|
|||
<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="tag != null and tag != ''">or tag = #{tag}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
||||
|
@ -175,6 +193,10 @@
|
|||
<if test="org_id != null and org_id != ''">org_id ,</if>
|
||||
<if test="companyId != null and companyId != ''">company_id ,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
<if test="tag == null ">tag ,</if>
|
||||
<if test="u8cDbPk != null and u8cDbPk != ''">u8c_db_pk,</if>
|
||||
<if test="nccDbPk != null and nccDbPk != ''">ncc_db_pk,</if>
|
||||
<if test="ysDbPk != null and ysDbPk != ''">ys_db_pk,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
|
@ -194,6 +216,10 @@
|
|||
<if test="org_id != null and org_id != ''">#{org_id} ,</if>
|
||||
<if test="companyId != null and companyId != ''">#{companyId} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
<if test="tag == null ">'1',</if>
|
||||
<if test="u8cDbPk != null and u8cDbPk != ''">#{u8cDbPk},</if>
|
||||
<if test="nccDbPk != null and nccDbPk != ''">#{nccDbPk},</if>
|
||||
<if test="ysDbPk != null and ysDbPk != ''">#{ysDbPk},</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
|
@ -281,6 +307,9 @@ where id = #{id}
|
|||
<select id="queryMdm" resultMap="get-MdmModuleEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity">
|
||||
select
|
||||
a.u8c_db_pk as u8c_db_pk,
|
||||
a.ncc_db_pk as ncc_db_pk,
|
||||
a.ys_db_pk as ys_db_pk,
|
||||
a.id as id,
|
||||
a.mdm_name as mdm_name,
|
||||
a.mdm_logo as mdm_logo,
|
||||
|
@ -974,10 +1003,10 @@ where id = #{id}
|
|||
< #{item.filedVaule}
|
||||
</when>
|
||||
<when test="item.compareType == '5'.toString() ">
|
||||
like #{item.filedVaule}
|
||||
like concat('%',#{item.filedVaule},'%')
|
||||
</when>
|
||||
<when test="item.compareType == '6'.toString() ">
|
||||
not like #{item.filedVaule}
|
||||
not like concat('%',#{item.filedVaule},'%')
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
|
|
|
@ -3,7 +3,14 @@ package com.hzya.frame.mdm.mdmModule.service;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.mdm.mdmModule.vo.ImportExcelVO;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 主数据模版(MdmModule)表服务接口
|
||||
|
@ -397,4 +404,16 @@ public interface IMdmModuleService extends IBaseService<MdmModuleEntity, String>
|
|||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
**/
|
||||
JsonResultEntity queryMdmDistributeByMdmCode(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* 下载导入模版
|
||||
* @return
|
||||
*/
|
||||
void generateExcelTemplate(HttpServletResponse response) throws IOException;
|
||||
|
||||
/**
|
||||
* 导入模版
|
||||
* @param file
|
||||
*/
|
||||
List<MdmModuleDbFiledsEntity> importTemplateFile(MultipartFile file, ImportExcelVO importExcelVO);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
package com.hzya.frame.mdm.mdmModule.service.impl;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.ExcelWriter;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.alibaba.excel.util.StringUtils;
|
||||
import com.alibaba.excel.write.metadata.WriteSheet;
|
||||
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.hzya.frame.beanutil.BeanUtil;
|
||||
import com.hzya.frame.mdm.entity.MdmDbFiledVo;
|
||||
import com.hzya.frame.mdm.entity.MdmDto;
|
||||
import com.hzya.frame.mdm.entity.MdmModuleViewVo;
|
||||
|
@ -10,6 +19,8 @@ import com.hzya.frame.mdm.entity.MdmQuery;
|
|||
import com.hzya.frame.mdm.mdmModule.entity.MdmModuleEntity;
|
||||
import com.hzya.frame.mdm.mdmModule.dao.IMdmModuleDao;
|
||||
import com.hzya.frame.mdm.mdmModule.service.IMdmModuleService;
|
||||
import com.hzya.frame.mdm.mdmModule.vo.ExcelTemplateVO;
|
||||
import com.hzya.frame.mdm.mdmModule.vo.ImportExcelVO;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.dao.IMdmModuleDbDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.dao.impl.MdmModuleDbDaoImpl;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
|
@ -50,17 +61,24 @@ import com.hzya.frame.web.entity.BaseResult;
|
|||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import com.hzya.frame.web.exception.BaseSystemException;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 主数据模版(MdmModule)表服务实现类
|
||||
|
@ -443,6 +461,22 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
for (int i = 0; i < mdmModuleDbEntities.size(); i++) {
|
||||
if ("1".equals(mdmModuleDbEntities.get(i).getDbType()) || "2".equals(mdmModuleDbEntities.get(i).getDbType())) {
|
||||
dbEntities.add(mdmModuleDbEntities.get(i));
|
||||
//查询合并规则。add by zyd 20250707
|
||||
List<String> filedNames=new ArrayList<>();
|
||||
if (mdmModuleDbEntities.get(i).getMergeRules() != null && !"".equals(mdmModuleDbEntities.get(i).getMergeRules())) {
|
||||
String mergeRulesIds = mdmModuleDbEntities.get(i).getMergeRules();
|
||||
String[] split = mergeRulesIds.split(",");
|
||||
for (String filedId : split) {
|
||||
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity = new MdmModuleDbFiledsEntity();
|
||||
mdmModuleDbFiledsEntity.setId(filedId);
|
||||
List<MdmModuleDbFiledsEntity> fileds = mdmModuleDbFiledsDao.query(mdmModuleDbFiledsEntity);
|
||||
if(fileds.size()!=0){
|
||||
filedNames.add(fileds.get(0).getChName());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
mdmModuleDbEntities.get(i).setMergeRulesStr(String.join(",",filedNames));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1403,7 +1437,8 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity = new MdmModuleDbFiledsEntity();
|
||||
mdmModuleDbFiledsEntity.setMdmId(entity.getMdmId());
|
||||
mdmModuleDbFiledsEntity.setSts("Y");
|
||||
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList = mdmServiceCache.queryMdmModuleDbFileds(mdmModuleDbFiledsEntity);
|
||||
// List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList = mdmServiceCache.queryMdmModuleDbFileds(mdmModuleDbFiledsEntity);
|
||||
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList = mdmModuleDbFiledsDao.query(mdmModuleDbFiledsEntity);
|
||||
if (mdmModuleDbFiledsEntityList != null && mdmModuleDbFiledsEntityList.size() > 0) {
|
||||
for (int i = 0; i < mdmModuleDbFiledsEntityList.size(); i++) {
|
||||
if (entity.getDbId().equals(mdmModuleDbFiledsEntityList.get(i).getDbId()) && entity.getEnName().equals(mdmModuleDbFiledsEntityList.get(i).getEnName())) {
|
||||
|
@ -1411,6 +1446,42 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
}
|
||||
}
|
||||
}
|
||||
//新增时:查询sysPk,sysCode,sysName段是否存在 add by zyd 2025-06-09
|
||||
boolean isSysPk = false;
|
||||
boolean isSysCode = false;
|
||||
boolean isSysName = false;
|
||||
boolean isSysDate = false;
|
||||
for (MdmModuleDbFiledsEntity dbFiledsEntity : mdmModuleDbFiledsEntityList) {
|
||||
if (entity.getDbId().equals(dbFiledsEntity.getDbId())) {
|
||||
if (entity.getDbId().equals(dbFiledsEntity.getDbId())) {
|
||||
if ("Y".equals(dbFiledsEntity.getIsSysPk())) {
|
||||
isSysPk = true;
|
||||
}
|
||||
if ("Y".equals(dbFiledsEntity.getIsSysCode())) {
|
||||
isSysCode = true;
|
||||
}
|
||||
if ("Y".equals(dbFiledsEntity.getIsSysName())) {
|
||||
isSysName = true;
|
||||
}
|
||||
if ("Y".equals(dbFiledsEntity.getIsSysDate())) {
|
||||
isSysDate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//判端该字段是不是sysPk,sysCode,sysName=true
|
||||
if ("Y".equals(entity.getIsSysPk()) && isSysPk) {
|
||||
return BaseResult.getFailureMessageEntity("系统主键字段已存在,请修改");
|
||||
}
|
||||
if ("Y".equals(entity.getIsSysCode()) && isSysCode) {
|
||||
return BaseResult.getFailureMessageEntity("系统code字段已存在,请修改");
|
||||
}
|
||||
if ("Y".equals(entity.getIsSysName()) && isSysName) {
|
||||
return BaseResult.getFailureMessageEntity("系统name字段已存在,请修改");
|
||||
}
|
||||
if ("Y".equals(entity.getIsSysDate()) && isSysDate) {
|
||||
return BaseResult.getFailureMessageEntity("系统date字段已存在,请修改");
|
||||
}
|
||||
entity.setCreate();
|
||||
if ("1".equals(entity.getDbType())) {
|
||||
entity.setAddType("1");
|
||||
|
@ -1488,6 +1559,49 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
} catch (Exception e) {
|
||||
throw new BaseSystemException("表字段类型,修改失败,请联系管理员");
|
||||
}
|
||||
|
||||
//更新时:查询sysPk,sysCode,sysName段是否存在 add by zyd 2025-06-09
|
||||
MdmModuleDbFiledsEntity mdmModuleDbFiledsEntity = new MdmModuleDbFiledsEntity();
|
||||
mdmModuleDbFiledsEntity.setDbId(entity.getDbId());
|
||||
mdmModuleDbFiledsEntity.setMdmId(entity.getMdmId());
|
||||
mdmModuleDbFiledsEntity.setSts("Y");
|
||||
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntityList = mdmModuleDbFiledsDao.query(mdmModuleDbFiledsEntity);
|
||||
boolean isSysPk = false;
|
||||
boolean isSysCode = false;
|
||||
boolean isSysName = false;
|
||||
boolean isSysDate = false;
|
||||
for (MdmModuleDbFiledsEntity dbFiledsEntity : mdmModuleDbFiledsEntityList) {
|
||||
if (entity.getDbId().equals(dbFiledsEntity.getDbId())) {
|
||||
if (entity.getDbId().equals(dbFiledsEntity.getDbId())) {
|
||||
if ("Y".equals(dbFiledsEntity.getIsSysPk())) {
|
||||
isSysPk = true;
|
||||
}
|
||||
if ("Y".equals(dbFiledsEntity.getIsSysCode())) {
|
||||
isSysCode = true;
|
||||
}
|
||||
if ("Y".equals(dbFiledsEntity.getIsSysName())) {
|
||||
isSysName = true;
|
||||
}
|
||||
if ("Y".equals(dbFiledsEntity.getIsSysDate())) {
|
||||
isSysDate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//判端该字段是不是sysPk,sysCode,sysName=true
|
||||
if ("Y".equals(entity.getIsSysPk()) && isSysPk) {
|
||||
return BaseResult.getFailureMessageEntity("系统主键字段已存在,请修改");
|
||||
}
|
||||
if ("Y".equals(entity.getIsSysCode()) && isSysCode) {
|
||||
return BaseResult.getFailureMessageEntity("系统code字段已存在,请修改");
|
||||
}
|
||||
if ("Y".equals(entity.getIsSysName()) && isSysName) {
|
||||
return BaseResult.getFailureMessageEntity("系统name字段已存在,请修改");
|
||||
}
|
||||
if ("Y".equals(entity.getIsSysDate()) && isSysDate) {
|
||||
return BaseResult.getFailureMessageEntity("系统date字段已存在,请修改");
|
||||
}
|
||||
|
||||
List<MdmModuleDbFiledsEntity> mdmModuleDbFiledsEntities = new ArrayList<>();
|
||||
mdmModuleDbFiledsEntities.add(entity);
|
||||
mdmServiceCache.saveOrUpdateMdmModuleDbFileds(entity.getMdmId(), mdmModuleDbFiledsEntities);
|
||||
|
@ -1551,6 +1665,7 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
return BaseResult.getFailureMessageEntity("系统错误");
|
||||
}
|
||||
MdmModuleDbFiledsRuleEntity queryCount = new MdmModuleDbFiledsRuleEntity();
|
||||
queryCount.setMdmId(entity.getMdmId());
|
||||
queryCount.setDbId(entity.getDbId());
|
||||
queryCount.setRuleCode("label");
|
||||
queryCount.setRuleValue(entity.getEnName());
|
||||
|
@ -2864,4 +2979,290 @@ public class MdmModuleServiceImpl extends BaseService<MdmModuleEntity, String> i
|
|||
List<MdmModuleDistributeEntity> list = mdmModuleDistributeDao.queryBase(entity);
|
||||
return BaseResult.getSuccessMessageEntity("获取分发设置成功", list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成导入模版
|
||||
*/
|
||||
@Override
|
||||
public void generateExcelTemplate(HttpServletResponse response) throws IOException {
|
||||
// 设置响应内容类型
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
// 设置文件名,注意中文需要URLEncoder编码
|
||||
String fileName = URLEncoder.encode("表字段定义模版", "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
// 准备模板的示例数据
|
||||
List<ExcelTemplateVO> demoData = new ArrayList<>(); //createTemplateDemoData()
|
||||
// 使用EasyExcel直接写入响应输出流
|
||||
EasyExcel.write(response.getOutputStream(), ExcelTemplateVO.class)
|
||||
.sheet("表字段定义模版")
|
||||
.doWrite(demoData);
|
||||
}
|
||||
|
||||
/*private List<ExcelTemplateVO> createTemplateDemoData() {
|
||||
List<ExcelTemplateVO> demoData = new ArrayList<>();
|
||||
ExcelTemplateVO demo = new ExcelTemplateVO();
|
||||
demo.setChName("用户ID");
|
||||
demo.setEnName("userId");
|
||||
demo.setFiledType("1"); // 对应BIGINT类型
|
||||
demo.setFiledLength("20");
|
||||
demo.setIsSysPk("Y");
|
||||
demo.setIsSysCode("Y");
|
||||
demo.setIsSysName("N");
|
||||
demo.setIsSysDate("N");
|
||||
demo.setTitle("用户ID");
|
||||
demo.setRow("6");
|
||||
demo.setWidth("100");
|
||||
demo.setType("input");
|
||||
demo.setRequired("true");
|
||||
demo.setDisabled("true");
|
||||
|
||||
demoData.add(demo);
|
||||
return demoData;
|
||||
}
|
||||
*/
|
||||
/**
|
||||
* 导入模版
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public List<MdmModuleDbFiledsEntity> importTemplateFile(MultipartFile file , ImportExcelVO importExcelVO) {
|
||||
// 校验文件合法性
|
||||
if (file == null || file.isEmpty()) {
|
||||
throw new IllegalArgumentException("导入文件不能为空");
|
||||
}
|
||||
// 校验文件格式
|
||||
String fileName = file.getOriginalFilename();
|
||||
if (fileName == null || (!fileName.endsWith(".xlsx") && !fileName.endsWith(".xls"))) {
|
||||
throw new IllegalArgumentException("请上传Excel格式文件");
|
||||
}
|
||||
// 表头数据
|
||||
List<List<String>> headerList = new ArrayList<>();
|
||||
// 用于存储内容数据
|
||||
List<ExcelTemplateVO> dataList = new ArrayList<>();
|
||||
List<MdmModuleDbFiledsEntity> resultEntities = new ArrayList<>();
|
||||
try (InputStream inputStream = file.getInputStream()) {
|
||||
// 使用EasyExcel读取文件
|
||||
EasyExcel.read(inputStream)
|
||||
.head(ExcelTemplateVO.class) // 指定映射的实体类
|
||||
.sheet(0) // 指定第一个sheet页
|
||||
.headRowNumber(1) // 表头行数(从1开始)
|
||||
.autoTrim(true)
|
||||
.registerReadListener(new AnalysisEventListener<ExcelTemplateVO>() {
|
||||
/**
|
||||
* 获取表头行数据
|
||||
*/
|
||||
@Override
|
||||
public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
|
||||
// 1. 转换表头为有序列表
|
||||
List<String> header = new ArrayList<>();
|
||||
// 获取最大列索引,确保顺序正确
|
||||
int maxColIndex = headMap.keySet().stream().mapToInt(Integer::intValue).max().orElse(-1);
|
||||
for (int i = 0; i <= maxColIndex; i++) {
|
||||
header.add(headMap.getOrDefault(i, "")); // 无数据的列填空
|
||||
}
|
||||
headerList.add(header);
|
||||
}
|
||||
/**
|
||||
* 每解析一行数据触发
|
||||
*/
|
||||
@Override
|
||||
public void invoke(ExcelTemplateVO data, AnalysisContext context) {
|
||||
// 空行直接跳过
|
||||
if (isRowEmpty(data)) {
|
||||
return;
|
||||
}
|
||||
// 数据校验
|
||||
validateData(data, context.readRowHolder().getRowIndex() + 1);
|
||||
dataList.add(data);
|
||||
}
|
||||
/**
|
||||
* 所有数据解析完成后触发
|
||||
*/
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext context) {
|
||||
// 解析完成后的数据处理
|
||||
List<MdmModuleDbFiledsEntity> entities = processImportData(headerList, dataList, importExcelVO);
|
||||
if (entities != null) {
|
||||
resultEntities.addAll(entities);
|
||||
}
|
||||
}
|
||||
})
|
||||
.doRead(); // 执行读取操作
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("文件读取失败:" + e.getMessage(), e);
|
||||
}
|
||||
return resultEntities;
|
||||
}
|
||||
|
||||
private boolean isRowEmpty(ExcelTemplateVO data) {
|
||||
if(data == null) {
|
||||
return true;
|
||||
}
|
||||
return StringUtils.isEmpty(data.getChName() ) &&
|
||||
StringUtils.isEmpty(data.getFiledType()) &&
|
||||
StringUtils.isEmpty(data.getEnName()) ;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入数据,新增字段
|
||||
* @param headerList
|
||||
* @param dataList
|
||||
*/
|
||||
private List<MdmModuleDbFiledsEntity> processImportData(List<List<String>> headerList, List<ExcelTemplateVO> dataList,ImportExcelVO importExcelVO) {
|
||||
// 获取表头列名
|
||||
List<String> headers = headerList.get(0);
|
||||
// 数据库字段数据
|
||||
List<MdmModuleDbFiledsEntity> entities = new ArrayList<>();
|
||||
for (ExcelTemplateVO data : dataList) {
|
||||
MdmModuleDbFiledsEntity entity = new MdmModuleDbFiledsEntity();
|
||||
BeanUtils.copyProperties(data, entity);
|
||||
// 字段规则数据集合
|
||||
List<MdmModuleDbFiledsRuleEntity> rules = new ArrayList<>();
|
||||
for (String header : headers) {
|
||||
// 字段规则数据
|
||||
MdmModuleDbFiledsRuleEntity rule = new MdmModuleDbFiledsRuleEntity();
|
||||
rule.setRuleType("2");
|
||||
rule.setFormName("optionRuleForm");
|
||||
switch (header) {
|
||||
case "显示名":
|
||||
rule.setRuleName("显示名");
|
||||
rule.setRuleCode("title");
|
||||
rule.setRuleValue(data.getChName());
|
||||
break;
|
||||
case "宽度":
|
||||
rule.setRuleName("宽度");
|
||||
rule.setRuleCode("row");
|
||||
rule.setRuleValue(data.getRow());
|
||||
break;
|
||||
case "单元格宽度":
|
||||
rule.setRuleName("单元格宽度");
|
||||
rule.setRuleCode("width");
|
||||
rule.setRuleValue(data.getWidth());
|
||||
break;
|
||||
case "数据类型":
|
||||
rule.setRuleName("数据类型");
|
||||
rule.setRuleCode("type");
|
||||
rule.setRuleValue(data.getType());
|
||||
break;
|
||||
case "必填":
|
||||
rule.setRuleName("必填");
|
||||
rule.setRuleCode("required");
|
||||
rule.setRuleValue(data.getRequired() != null ? "true" : "false");
|
||||
break;
|
||||
case "禁止修改":
|
||||
rule.setRuleName("禁止修改");
|
||||
rule.setRuleCode("disabled");
|
||||
rule.setRuleValue(data.getDisabled() != null ? "true" : "false");
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
rules.add(rule);
|
||||
}
|
||||
entity.setMdmModuleDbFiledsRules(rules);
|
||||
entity.setDbName(importExcelVO.getDbName());
|
||||
entity.setDbId(importExcelVO.getDbId());
|
||||
entity.setDbType(importExcelVO.getDbType());
|
||||
entity.setMdmId(importExcelVO.getMdmId());
|
||||
entities.add(entity);
|
||||
}
|
||||
return entities;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据校验方法,验证Excel导入的数据合法性
|
||||
* @param data 导入的Excel数据对象
|
||||
* @param rowNum 行号
|
||||
*/
|
||||
private void validateData(ExcelTemplateVO data, int rowNum) {
|
||||
List<String> errors = new ArrayList<>();
|
||||
|
||||
// 1. 校验中文名称必填
|
||||
if (StringUtils.isBlank(data.getChName())) {
|
||||
errors.add("第" + rowNum + "行:中文名称不能为空");
|
||||
}
|
||||
|
||||
// 2. 校验字段类型合法性
|
||||
if (StringUtils.isBlank(data.getFiledType())) {
|
||||
errors.add("第" + rowNum + "行:字段类型不能为空");
|
||||
} else {
|
||||
Set<String> validTypes = new HashSet<>(Arrays.asList("1", "2", "3", "4"));
|
||||
if (!validTypes.contains(data.getFiledType())) {
|
||||
errors.add("第" + rowNum + "行:字段类型无效,允许值为1(BIGINT)、2(DECIMAL)、3(VARCHAR)、4(DATETIME)");
|
||||
}
|
||||
}
|
||||
|
||||
// 3. 校验长度(数字类型且当字段类型为1、2、3时必填)
|
||||
if (StringUtils.isNotBlank(data.getFiledType()) &&
|
||||
(data.getFiledType().equals("1") || data.getFiledType().equals("2") || data.getFiledType().equals("3"))) {
|
||||
|
||||
if (StringUtils.isBlank(data.getFiledLength())) {
|
||||
errors.add("第" + rowNum + "行:字段长度不能为空");
|
||||
} else if (!StringUtils.isNumeric(data.getFiledLength())) {
|
||||
errors.add("第" + rowNum + "行:字段长度必须为数字");
|
||||
} else {
|
||||
int length = Integer.parseInt(data.getFiledLength());
|
||||
if (length <= 0) {
|
||||
errors.add("第" + rowNum + "行:字段长度必须大于0");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 4. 校验系统主键标识合法性
|
||||
if (StringUtils.isNotBlank(data.getIsSysPk()) &&
|
||||
!"Y".equals(data.getIsSysPk()) && !"N".equals(data.getIsSysPk())) {
|
||||
errors.add("第" + rowNum + "行:是否系统主键只能为Y或N");
|
||||
}
|
||||
|
||||
// 5. 校验系统数据编码标识合法性
|
||||
if (StringUtils.isNotBlank(data.getIsSysCode()) &&
|
||||
!"Y".equals(data.getIsSysCode()) && !"N".equals(data.getIsSysCode())) {
|
||||
errors.add("第" + rowNum + "行:是否系统数据编码只能为Y或N");
|
||||
}
|
||||
|
||||
// 6. 校验系统数据名称标识合法性
|
||||
if (StringUtils.isNotBlank(data.getIsSysName()) &&
|
||||
!"Y".equals(data.getIsSysName()) && !"N".equals(data.getIsSysName())) {
|
||||
errors.add("第" + rowNum + "行:是否系统数据名称只能为Y或N");
|
||||
}
|
||||
|
||||
// 7. 校验系统日期标识合法性
|
||||
if (StringUtils.isNotBlank(data.getIsSysDate()) &&
|
||||
!"Y".equals(data.getIsSysDate()) && !"N".equals(data.getIsSysDate())) {
|
||||
errors.add("第" + rowNum + "行:是否系统日期只能为Y或N");
|
||||
}
|
||||
|
||||
// 8. 校验是否必填标识合法性
|
||||
if (data.getRequired() != null && !data.getRequired().trim().isEmpty()) {
|
||||
String required = data.getRequired().trim();
|
||||
if (!"TRUE".equalsIgnoreCase(required) && !"FALSE".equalsIgnoreCase(required)) {
|
||||
errors.add("第" + rowNum + "行:是否必填只能为true或false");
|
||||
}
|
||||
}
|
||||
|
||||
// 9. 校验禁止修改标识合法性
|
||||
if (data.getDisabled() != null && !data.getDisabled().trim().isEmpty()) {
|
||||
String disabled = data.getDisabled().trim();
|
||||
if (!"TRUE".equalsIgnoreCase(disabled) && !"FALSE".equalsIgnoreCase(disabled)) {
|
||||
errors.add("第" + rowNum + "行:禁止修改只能为true或false");
|
||||
}
|
||||
}
|
||||
|
||||
// 如果有错误,抛出异常中断导入
|
||||
if (!errors.isEmpty()) {
|
||||
throw new ExcelDataValidateException(String.join(";", errors));
|
||||
}
|
||||
}
|
||||
|
||||
// 自定义异常类
|
||||
public class ExcelDataValidateException extends RuntimeException {
|
||||
public ExcelDataValidateException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
package com.hzya.frame.mdm.mdmModule.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ExcelTemplateVO {
|
||||
|
||||
@ExcelProperty(value = "中文名称", index = 0)
|
||||
private String chName;
|
||||
|
||||
@ExcelProperty(value = "英文名称", index = 1)
|
||||
private String enName;
|
||||
|
||||
/** 字段类型 1、BIGINT 2、DECIMAL 3、VARCHAR 4、DATETIME */
|
||||
@ExcelProperty(value = "字段类型", index = 2)
|
||||
private String filedType;
|
||||
|
||||
@ExcelProperty(value = "长度", index = 3)
|
||||
private String filedLength;
|
||||
|
||||
@ExcelProperty(value = "是否系统主键", index = 4)
|
||||
private String isSysPk;// Y N
|
||||
|
||||
@ExcelProperty(value = "系统数据编码", index = 5)
|
||||
private String isSysCode;// Y N
|
||||
|
||||
@ExcelProperty(value = "系统数据名称", index = 6)
|
||||
private String isSysName;// Y N
|
||||
|
||||
@ExcelProperty(value = "系统日期", index = 7)
|
||||
private String isSysDate; // Y N
|
||||
|
||||
@ExcelProperty(value = "显示名", index = 8)
|
||||
private String title;
|
||||
|
||||
@ExcelProperty(value = "宽度", index = 9)
|
||||
private String row;
|
||||
|
||||
@ExcelProperty(value = "单元格宽度", index = 10)
|
||||
private String width;
|
||||
|
||||
@ExcelProperty(value = "数据类型",index = 11)
|
||||
private String type;
|
||||
|
||||
@ExcelProperty(value= "必填",index = 12)
|
||||
private String required; // true false
|
||||
|
||||
@ExcelProperty(value= "禁止修改",index = 13)
|
||||
private String disabled; // true false
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.hzya.frame.mdm.mdmModule.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ImportExcelVO {
|
||||
/** 主数据模版ID */
|
||||
private String dbName;
|
||||
/** 主数据模版ID */
|
||||
private String mdmId;
|
||||
/** 模版数据库id */
|
||||
private String dbId;
|
||||
/** 类型 1、主表 2、明细 3、操作日志 4、下发日志 */
|
||||
private String dbType;
|
||||
|
||||
// MultipartFile file;
|
||||
}
|
|
@ -27,7 +27,25 @@ public class MdmModuleDbEntity extends BaseEntity {
|
|||
/** 数据类型 1、新增 2、修改 */
|
||||
private String dataType;
|
||||
private List<MdmModuleDbFiledsEntity> sublistMdmModuleDbFileds;
|
||||
/** 合并规则,字段id使用逗号隔开 */
|
||||
private String mergeRules;
|
||||
private String mergeRulesStr;
|
||||
|
||||
public String getMergeRules() {
|
||||
return mergeRules;
|
||||
}
|
||||
|
||||
public void setMergeRules(String mergeRules) {
|
||||
this.mergeRules = mergeRules;
|
||||
}
|
||||
|
||||
public String getMergeRulesStr() {
|
||||
return mergeRulesStr;
|
||||
}
|
||||
|
||||
public void setMergeRulesStr(String mergeRulesStr) {
|
||||
this.mergeRulesStr = mergeRulesStr;
|
||||
}
|
||||
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<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="mergeRules" column="merge_rules" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id="MdmModuleDbEntity_Base_Column_List">
|
||||
|
@ -32,6 +33,7 @@
|
|||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,merge_rules
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbEntity-result"
|
||||
|
@ -53,6 +55,7 @@
|
|||
<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="mergeRules != null and mergeRules != ''">and merge_rules = #{mergeRules}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
||||
|
@ -77,6 +80,7 @@
|
|||
<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="mergeRules != null and mergeRules != ''">and merge_rules = #{mergeRules}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
||||
|
@ -107,6 +111,7 @@
|
|||
<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="mergeRules != null and mergeRules != ''">and merge_rules like concat('%',#{mergeRules},'%')</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
||||
|
@ -133,6 +138,7 @@
|
|||
<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="mergeRules != null and mergeRules != ''">or merge_rules = #{mergeRules}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
|
||||
|
@ -156,6 +162,7 @@
|
|||
<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="mergeRules != null and mergeRules != ''">merge_rules ,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
|
@ -173,6 +180,7 @@
|
|||
<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="mergeRules != null and mergeRules != ''">#{mergeRules} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
|
@ -180,10 +188,10 @@
|
|||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch">
|
||||
insert into mdm_module_db(mdm_id, db_name, db_type, remark, create_user_id, create_time, modify_user_id,
|
||||
modify_time, sts, org_id, company_id, sts)
|
||||
modify_time, sts, org_id, company_id, merge_rules, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmId},#{entity.dbName},#{entity.dbType},#{entity.remark},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},
|
||||
(#{entity.mdmId},#{entity.dbName},#{entity.dbType},#{entity.remark},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},#{entity.mergeRules},
|
||||
'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
|
@ -223,6 +231,7 @@
|
|||
<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="mergeRules != null and mergeRules != ''">merge_rules = #{mergeRules},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -244,6 +253,7 @@ where id = #{id}
|
|||
<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="mergeRules != null and mergeRules != ''">and merge_rules = #{mergeRules}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package com.hzya.frame.mdm.mdmModuleDbFileds.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
|
@ -20,10 +23,13 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
|
|||
/** 模版数据库id */
|
||||
private String dbId;
|
||||
/** 中文名 */
|
||||
@ExcelProperty(value = "中文名称", index = 0)
|
||||
private String chName;
|
||||
/** 英文名 */
|
||||
@ExcelProperty(value = "英文名称", index = 1)
|
||||
private String enName;
|
||||
/** 字段类型 1、BIGINT 2、DECIMAL 3、VARCHAR 4、DATETIME */
|
||||
@ExcelProperty(value = "字段类型", index = 2)
|
||||
private String filedType;
|
||||
/** 显示类型:新增 */
|
||||
private String addType;
|
||||
|
@ -33,11 +39,13 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
|
|||
private String showType;
|
||||
/** 显示类型:查询 */
|
||||
private String queryType;
|
||||
|
||||
/** 显示类型:列表 */
|
||||
private String listType;
|
||||
/** 显示类型:显示 */
|
||||
private String viewType;
|
||||
/** 长度 */
|
||||
@ExcelProperty(value = "长度", index = 3)
|
||||
private String filedLength;
|
||||
/** 公司id */
|
||||
private String companyId;
|
||||
|
@ -57,6 +65,26 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
|
|||
|
||||
//1、查询2、列表3、新增4、修改 5、查看
|
||||
private String fieldType;
|
||||
/**
|
||||
* 是否sys主键 系统主键(三方系统主键,同步中台之后,该字段作为主键)Y/N
|
||||
*/
|
||||
@ExcelProperty(value = "是否系统主键", index = 4)
|
||||
private String isSysPk;
|
||||
/**
|
||||
* 是否sys编码 系统code(三方系统code,同步中台之后,该字段作为code)Y/N
|
||||
*/
|
||||
@ExcelProperty(value = "是否系统数据编码", index = 5)
|
||||
private String isSysCode;
|
||||
/**
|
||||
* 是否sys名称 系统name(三方系统name,同步中台之后,该字段作为name)Y/N
|
||||
*/
|
||||
@ExcelProperty(value = "是否系统数据名称", index = 6)
|
||||
private String isSysName;
|
||||
/**
|
||||
* 是否sys日期 系统date(三方系统name,同步中台之后,该字段作为name)Y/N
|
||||
*/
|
||||
@ExcelProperty(value = "是否系统日期", index = 7)
|
||||
private String isSysDate;
|
||||
public String getMdmId() {
|
||||
return mdmId;
|
||||
}
|
||||
|
@ -216,5 +244,67 @@ public class MdmModuleDbFiledsEntity extends BaseEntity {
|
|||
public void setDbType(String dbType) {
|
||||
this.dbType = dbType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getIsSysPk() {
|
||||
return isSysPk;
|
||||
}
|
||||
|
||||
public void setIsSysPk(String isSysPk) {
|
||||
this.isSysPk = isSysPk;
|
||||
}
|
||||
|
||||
public String getIsSysCode() {
|
||||
return isSysCode;
|
||||
}
|
||||
|
||||
public void setIsSysCode(String isSysCode) {
|
||||
this.isSysCode = isSysCode;
|
||||
}
|
||||
|
||||
public String getIsSysName() {
|
||||
return isSysName;
|
||||
}
|
||||
|
||||
public void setIsSysName(String isSysName) {
|
||||
this.isSysName = isSysName;
|
||||
}
|
||||
|
||||
public String getIsSysDate() {
|
||||
return isSysDate;
|
||||
}
|
||||
|
||||
public void setIsSysDate(String isSysDate) {
|
||||
this.isSysDate = isSysDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联的表
|
||||
*/
|
||||
private MdmModuleDbEntity mdmModuleDbEntity;
|
||||
|
||||
public MdmModuleDbEntity getMdmModuleDbEntity() {
|
||||
return mdmModuleDbEntity;
|
||||
}
|
||||
|
||||
public void setMdmModuleDbEntity(MdmModuleDbEntity mdmModuleDbEntity) {
|
||||
this.mdmModuleDbEntity = mdmModuleDbEntity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联字段
|
||||
*/
|
||||
private List<MdmModuleDbFiledsEntity> sublistMdmModuleDbFileds;
|
||||
|
||||
public List<MdmModuleDbFiledsEntity> getSublistMdmModuleDbFileds() {
|
||||
return sublistMdmModuleDbFileds;
|
||||
}
|
||||
|
||||
public void setSublistMdmModuleDbFileds(List<MdmModuleDbFiledsEntity> sublistMdmModuleDbFileds) {
|
||||
this.sublistMdmModuleDbFileds = sublistMdmModuleDbFileds;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.hzya.frame.mdm.mdmModuleDbFileds.dao.impl.MdmModuleDbFiledsDaoImpl">
|
||||
|
||||
<resultMap id="get-MdmModuleDbFiledsEntity-result" type="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
|
||||
<resultMap id="get-MdmModuleDbFiledsEntity-result"
|
||||
type="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="mdmId" column="mdm_id" jdbcType="VARCHAR"/>
|
||||
<result property="dbId" column="db_id" jdbcType="VARCHAR"/>
|
||||
|
@ -24,9 +25,13 @@
|
|||
<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="isSysPk" column="sys_pk" jdbcType="VARCHAR"/>
|
||||
<result property="isSysCode" column="sys_code" jdbcType="VARCHAR"/>
|
||||
<result property="isSysName" column="sys_name" jdbcType="VARCHAR"/>
|
||||
<result property="isSysDate" column="sys_date" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
<!-- 查询的字段-->
|
||||
<sql id = "MdmModuleDbFiledsEntity_Base_Column_List">
|
||||
<sql id="MdmModuleDbFiledsEntity_Base_Column_List">
|
||||
id
|
||||
,mdm_id
|
||||
,db_id
|
||||
|
@ -48,34 +53,43 @@
|
|||
,sts
|
||||
,org_id
|
||||
,company_id
|
||||
,sys_pk
|
||||
,sys_code
|
||||
,sys_name
|
||||
,sys_date
|
||||
</sql>
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbFiledsEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
<select id="entity_list_base" resultMap="get-MdmModuleDbFiledsEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List" />
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List"/>
|
||||
from mdm_module_db_fileds
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
|
||||
<if test="chName != null and chName != ''"> and ch_name = #{chName} </if>
|
||||
<if test="enName != null and enName != ''"> and en_name = #{enName} </if>
|
||||
<if test="filedType != null and filedType != ''"> and filed_type = #{filedType} </if>
|
||||
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
|
||||
<if test="updateType != null and updateType != ''"> and update_type = #{updateType} </if>
|
||||
<if test="showType != null and showType != ''"> and show_type = #{showType} </if>
|
||||
<if test="queryType != null and queryType != ''"> and query_type = #{queryType} </if>
|
||||
<if test="listType != null and listType != ''"> and list_type = #{listType} </if>
|
||||
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
|
||||
<if test="filedLength != null and filedLength != ''"> and filed_length = #{filedLength} </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="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
|
||||
<if test="dbId != null and dbId != ''">and db_id = #{dbId}</if>
|
||||
<if test="chName != null and chName != ''">and ch_name = #{chName}</if>
|
||||
<if test="enName != null and enName != ''">and en_name = #{enName}</if>
|
||||
<if test="filedType != null and filedType != ''">and filed_type = #{filedType}</if>
|
||||
<if test="addType != null and addType != ''">and add_type = #{addType}</if>
|
||||
<if test="updateType != null and updateType != ''">and update_type = #{updateType}</if>
|
||||
<if test="showType != null and showType != ''">and show_type = #{showType}</if>
|
||||
<if test="queryType != null and queryType != ''">and query_type = #{queryType}</if>
|
||||
<if test="listType != null and listType != ''">and list_type = #{listType}</if>
|
||||
<if test="viewType != null and viewType != ''">and view_type = #{viewType}</if>
|
||||
<if test="filedLength != null and filedLength != ''">and filed_length = #{filedLength}</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="isSysPk != null and isSysPk != ''">and sys_pk = #{isSysPk}</if>
|
||||
<if test="isSysCode != null and isSysCode != ''">and sys_code = #{isSysCode}</if>
|
||||
<if test="isSysName != null and isSysName != ''">and sys_name = #{isSysName}</if>
|
||||
<if test="isSysDate != null and isSysDate != ''">and sys_date = #{isSysDate}</if>
|
||||
<if test="roletype != null and roletype != ''">
|
||||
and id in (
|
||||
select
|
||||
|
@ -86,172 +100,208 @@
|
|||
</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<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>
|
||||
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
<!-- 查询符合条件的数量 -->
|
||||
<select id="entity_count" resultType="Integer"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select count(1) from mdm_module_db_fileds
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
|
||||
<if test="chName != null and chName != ''"> and ch_name = #{chName} </if>
|
||||
<if test="enName != null and enName != ''"> and en_name = #{enName} </if>
|
||||
<if test="filedType != null and filedType != ''"> and filed_type = #{filedType} </if>
|
||||
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
|
||||
<if test="updateType != null and updateType != ''"> and update_type = #{updateType} </if>
|
||||
<if test="showType != null and showType != ''"> and show_type = #{showType} </if>
|
||||
<if test="queryType != null and queryType != ''"> and query_type = #{queryType} </if>
|
||||
<if test="listType != null and listType != ''"> and list_type = #{listType} </if>
|
||||
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
|
||||
<if test="filedLength != null and filedLength != ''"> and filed_length = #{filedLength} </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="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
|
||||
<if test="dbId != null and dbId != ''">and db_id = #{dbId}</if>
|
||||
<if test="chName != null and chName != ''">and ch_name = #{chName}</if>
|
||||
<if test="enName != null and enName != ''">and en_name = #{enName}</if>
|
||||
<if test="filedType != null and filedType != ''">and filed_type = #{filedType}</if>
|
||||
<if test="addType != null and addType != ''">and add_type = #{addType}</if>
|
||||
<if test="updateType != null and updateType != ''">and update_type = #{updateType}</if>
|
||||
<if test="showType != null and showType != ''">and show_type = #{showType}</if>
|
||||
<if test="queryType != null and queryType != ''">and query_type = #{queryType}</if>
|
||||
<if test="listType != null and listType != ''">and list_type = #{listType}</if>
|
||||
<if test="viewType != null and viewType != ''">and view_type = #{viewType}</if>
|
||||
<if test="filedLength != null and filedLength != ''">and filed_length = #{filedLength}</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="isSysPk != null and isSysPk != ''">and sys_pk = #{isSysPk}</if>
|
||||
<if test="isSysCode != null and isSysCode != ''">and sys_code = #{isSysCode}</if>
|
||||
<if test="isSysName != null and isSysName != ''">and sys_name = #{isSysName}</if>
|
||||
<if test="isSysDate != null and isSysDate != ''">and sys_date = #{isSysDate}</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>
|
||||
<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-MdmModuleDbFiledsEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
<select id="entity_list_like" resultMap="get-MdmModuleDbFiledsEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List" />
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List"/>
|
||||
from mdm_module_db_fileds
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if>
|
||||
<if test="mdmId != null and mdmId != ''"> and mdm_id like concat('%',#{mdmId},'%') </if>
|
||||
<if test="dbId != null and dbId != ''"> and db_id like concat('%',#{dbId},'%') </if>
|
||||
<if test="chName != null and chName != ''"> and ch_name like concat('%',#{chName},'%') </if>
|
||||
<if test="enName != null and enName != ''"> and en_name like concat('%',#{enName},'%') </if>
|
||||
<if test="filedType != null and filedType != ''"> and filed_type like concat('%',#{filedType},'%') </if>
|
||||
<if test="addType != null and addType != ''"> and add_type like concat('%',#{addType},'%') </if>
|
||||
<if test="updateType != null and updateType != ''"> and update_type like concat('%',#{updateType},'%') </if>
|
||||
<if test="showType != null and showType != ''"> and show_type like concat('%',#{showType},'%') </if>
|
||||
<if test="queryType != null and queryType != ''"> and query_type like concat('%',#{queryType},'%') </if>
|
||||
<if test="listType != null and listType != ''"> and list_type like concat('%',#{listType},'%') </if>
|
||||
<if test="viewType != null and viewType != ''"> and view_type like concat('%',#{viewType},'%') </if>
|
||||
<if test="filedLength != null and filedLength != ''"> and filed_length like concat('%',#{filedLength},'%') </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="id != null and id != ''">and id like concat('%',#{id},'%')</if>
|
||||
<if test="mdmId != null and mdmId != ''">and mdm_id like concat('%',#{mdmId},'%')</if>
|
||||
<if test="dbId != null and dbId != ''">and db_id like concat('%',#{dbId},'%')</if>
|
||||
<if test="chName != null and chName != ''">and ch_name like concat('%',#{chName},'%')</if>
|
||||
<if test="enName != null and enName != ''">and en_name like concat('%',#{enName},'%')</if>
|
||||
<if test="filedType != null and filedType != ''">and filed_type like concat('%',#{filedType},'%')</if>
|
||||
<if test="addType != null and addType != ''">and add_type like concat('%',#{addType},'%')</if>
|
||||
<if test="updateType != null and updateType != ''">and update_type like concat('%',#{updateType},'%')</if>
|
||||
<if test="showType != null and showType != ''">and show_type like concat('%',#{showType},'%')</if>
|
||||
<if test="queryType != null and queryType != ''">and query_type like concat('%',#{queryType},'%')</if>
|
||||
<if test="listType != null and listType != ''">and list_type like concat('%',#{listType},'%')</if>
|
||||
<if test="viewType != null and viewType != ''">and view_type like concat('%',#{viewType},'%')</if>
|
||||
<if test="filedLength != null and filedLength != ''">and filed_length like concat('%',#{filedLength},'%')
|
||||
</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="isSysPk != null and isSysPk != ''">and sys_pk like concat('%',#{isSysPk},'%')</if>
|
||||
<if test="isSysCode != null and isSysCode != ''">and sys_code like concat('%',#{isSysCode},'%')</if>
|
||||
<if test="isSysName != null and isSysName != ''">and sys_name like concat('%',#{isSysName},'%')</if>
|
||||
<if test="isSysDate != null and isSysDate != ''">and sys_date like concat('%',#{isSysDate},'%')</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<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>
|
||||
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmModuleDbFiledsentity_list_or" resultMap="get-MdmModuleDbFiledsEntity-result" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
<!-- 查询列表 字段采用or格式 -->
|
||||
<select id="MdmModuleDbFiledsentity_list_or" resultMap="get-MdmModuleDbFiledsEntity-result"
|
||||
parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
select
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List" />
|
||||
<include refid="MdmModuleDbFiledsEntity_Base_Column_List"/>
|
||||
from mdm_module_db_fileds
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="id != null and id != ''"> or id = #{id} </if>
|
||||
<if test="mdmId != null and mdmId != ''"> or mdm_id = #{mdmId} </if>
|
||||
<if test="dbId != null and dbId != ''"> or db_id = #{dbId} </if>
|
||||
<if test="chName != null and chName != ''"> or ch_name = #{chName} </if>
|
||||
<if test="enName != null and enName != ''"> or en_name = #{enName} </if>
|
||||
<if test="filedType != null and filedType != ''"> or filed_type = #{filedType} </if>
|
||||
<if test="addType != null and addType != ''"> or add_type = #{addType} </if>
|
||||
<if test="updateType != null and updateType != ''"> or update_type = #{updateType} </if>
|
||||
<if test="showType != null and showType != ''"> or show_type = #{showType} </if>
|
||||
<if test="queryType != null and queryType != ''"> or query_type = #{queryType} </if>
|
||||
<if test="listType != null and listType != ''"> or list_type = #{listType} </if>
|
||||
<if test="viewType != null and viewType != ''"> or view_type = #{viewType} </if>
|
||||
<if test="filedLength != null and filedLength != ''"> or filed_length = #{filedLength} </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="id != null and id != ''">or id = #{id}</if>
|
||||
<if test="mdmId != null and mdmId != ''">or mdm_id = #{mdmId}</if>
|
||||
<if test="dbId != null and dbId != ''">or db_id = #{dbId}</if>
|
||||
<if test="chName != null and chName != ''">or ch_name = #{chName}</if>
|
||||
<if test="enName != null and enName != ''">or en_name = #{enName}</if>
|
||||
<if test="filedType != null and filedType != ''">or filed_type = #{filedType}</if>
|
||||
<if test="addType != null and addType != ''">or add_type = #{addType}</if>
|
||||
<if test="updateType != null and updateType != ''">or update_type = #{updateType}</if>
|
||||
<if test="showType != null and showType != ''">or show_type = #{showType}</if>
|
||||
<if test="queryType != null and queryType != ''">or query_type = #{queryType}</if>
|
||||
<if test="listType != null and listType != ''">or list_type = #{listType}</if>
|
||||
<if test="viewType != null and viewType != ''">or view_type = #{viewType}</if>
|
||||
<if test="filedLength != null and filedLength != ''">or filed_length = #{filedLength}</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="isSysPk != null and isSysPk != ''">or sys_pk = #{isSysPk}</if>
|
||||
<if test="isSysCode != null and isSysCode != ''">or sys_code = #{isSysCode}</if>
|
||||
<if test="isSysName != null and isSysName != ''">or sys_name = #{isSysName}</if>
|
||||
<if test="isSysDate != null and isSysDate != ''">or sys_date = #{isSysDate}</if>
|
||||
|
||||
and sts='Y'
|
||||
</trim>
|
||||
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
|
||||
<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>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
|
||||
<!--新增所有列-->
|
||||
<insert id="entity_insert" parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
insert into mdm_module_db_fileds(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> id , </if>
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id , </if>
|
||||
<if test="dbId != null and dbId != ''"> db_id , </if>
|
||||
<if test="chName != null and chName != ''"> ch_name , </if>
|
||||
<if test="enName != null and enName != ''"> en_name , </if>
|
||||
<if test="filedType != null and filedType != ''"> filed_type , </if>
|
||||
<if test="addType != null and addType != ''"> add_type , </if>
|
||||
<if test="updateType != null and updateType != ''"> update_type , </if>
|
||||
<if test="showType != null and showType != ''"> show_type , </if>
|
||||
<if test="queryType != null and queryType != ''"> query_type , </if>
|
||||
<if test="listType != null and listType != ''"> list_type , </if>
|
||||
<if test="viewType != null and viewType != ''"> view_type , </if>
|
||||
<if test="filedLength != null and filedLength != ''"> filed_length , </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="id != null and id != ''">id ,</if>
|
||||
<if test="mdmId != null and mdmId != ''">mdm_id ,</if>
|
||||
<if test="dbId != null and dbId != ''">db_id ,</if>
|
||||
<if test="chName != null and chName != ''">ch_name ,</if>
|
||||
<if test="enName != null and enName != ''">en_name ,</if>
|
||||
<if test="filedType != null and filedType != ''">filed_type ,</if>
|
||||
<if test="addType != null and addType != ''">add_type ,</if>
|
||||
<if test="updateType != null and updateType != ''">update_type ,</if>
|
||||
<if test="showType != null and showType != ''">show_type ,</if>
|
||||
<if test="queryType != null and queryType != ''">query_type ,</if>
|
||||
<if test="listType != null and listType != ''">list_type ,</if>
|
||||
<if test="viewType != null and viewType != ''">view_type ,</if>
|
||||
<if test="filedLength != null and filedLength != ''">filed_length ,</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="isSysPk != null and isSysPk != ''">sys_pk ,</if>
|
||||
<if test="isSysCode != null and isSysCode != ''">sys_code ,</if>
|
||||
<if test="isSysName != null and isSysName != ''">sys_name ,</if>
|
||||
<if test="isSysDate != null and isSysDate != ''">sys_date ,</if>
|
||||
<if test="sts == null ">sts,</if>
|
||||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="id != null and id != ''"> #{id} ,</if>
|
||||
<if test="mdmId != null and mdmId != ''"> #{mdmId} ,</if>
|
||||
<if test="dbId != null and dbId != ''"> #{dbId} ,</if>
|
||||
<if test="chName != null and chName != ''"> #{chName} ,</if>
|
||||
<if test="enName != null and enName != ''"> #{enName} ,</if>
|
||||
<if test="filedType != null and filedType != ''"> #{filedType} ,</if>
|
||||
<if test="addType != null and addType != ''"> #{addType} ,</if>
|
||||
<if test="updateType != null and updateType != ''"> #{updateType} ,</if>
|
||||
<if test="showType != null and showType != ''"> #{showType} ,</if>
|
||||
<if test="queryType != null and queryType != ''"> #{queryType} ,</if>
|
||||
<if test="listType != null and listType != ''"> #{listType} ,</if>
|
||||
<if test="viewType != null and viewType != ''"> #{viewType} ,</if>
|
||||
<if test="filedLength != null and filedLength != ''"> #{filedLength} ,</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="id != null and id != ''">#{id} ,</if>
|
||||
<if test="mdmId != null and mdmId != ''">#{mdmId} ,</if>
|
||||
<if test="dbId != null and dbId != ''">#{dbId} ,</if>
|
||||
<if test="chName != null and chName != ''">#{chName} ,</if>
|
||||
<if test="enName != null and enName != ''">#{enName} ,</if>
|
||||
<if test="filedType != null and filedType != ''">#{filedType} ,</if>
|
||||
<if test="addType != null and addType != ''">#{addType} ,</if>
|
||||
<if test="updateType != null and updateType != ''">#{updateType} ,</if>
|
||||
<if test="showType != null and showType != ''">#{showType} ,</if>
|
||||
<if test="queryType != null and queryType != ''">#{queryType} ,</if>
|
||||
<if test="listType != null and listType != ''">#{listType} ,</if>
|
||||
<if test="viewType != null and viewType != ''">#{viewType} ,</if>
|
||||
<if test="filedLength != null and filedLength != ''">#{filedLength} ,</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="isSysPk != null and isSysPk != ''">#{isSysPk} ,</if>
|
||||
<if test="isSysCode != null and isSysCode != ''">#{isSysCode} ,</if>
|
||||
<if test="isSysName != null and isSysName != ''">#{isSysName} ,</if>
|
||||
<if test="isSysDate != null and isSysDate != ''">#{isSysDate} ,</if>
|
||||
<if test="sts == null ">'Y',</if>
|
||||
</trim>
|
||||
)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch" >
|
||||
insert into mdm_module_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, add_type, update_type, show_type, query_type, list_type, view_type, filed_length, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id, sts)
|
||||
</insert>
|
||||
<!-- 批量新增 -->
|
||||
<insert id="entityInsertBatch">
|
||||
insert into mdm_module_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, add_type, update_type, show_type,
|
||||
query_type, list_type, view_type, filed_length, create_user_id, create_time, modify_user_id, modify_time, sts,
|
||||
org_id, company_id, sts)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmId},#{entity.dbId},#{entity.chName},#{entity.enName},#{entity.filedType},#{entity.addType},#{entity.updateType},#{entity.showType},#{entity.queryType},#{entity.listType},#{entity.viewType},#{entity.filedLength},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId}, 'Y')
|
||||
(#{entity.mdmId},#{entity.dbId},#{entity.chName},#{entity.enName},#{entity.filedType},#{entity.addType},#{entity.updateType},#{entity.showType},#{entity.queryType},#{entity.listType},#{entity.viewType},#{entity.filedLength},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId},
|
||||
'Y')
|
||||
</foreach>
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch" >
|
||||
insert into mdm_module_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, add_type, update_type, show_type, query_type, list_type, view_type, filed_length, create_user_id, create_time, modify_user_id, modify_time, sts, org_id, company_id)
|
||||
</insert>
|
||||
<!-- 批量新增或者修改-->
|
||||
<insert id="entityInsertOrUpdateBatch">
|
||||
insert into mdm_module_db_fileds(mdm_id, db_id, ch_name, en_name, filed_type, add_type, update_type, show_type,
|
||||
query_type, list_type, view_type, filed_length, create_user_id, create_time, modify_user_id, modify_time, sts,
|
||||
org_id, company_id)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.mdmId},#{entity.dbId},#{entity.chName},#{entity.enName},#{entity.filedType},#{entity.addType},#{entity.updateType},#{entity.showType},#{entity.queryType},#{entity.listType},#{entity.viewType},#{entity.filedLength},#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.org_id},#{entity.companyId})
|
||||
|
@ -275,68 +325,85 @@
|
|||
modify_time = values(modify_time),
|
||||
sts = values(sts),
|
||||
org_id = values(org_id),
|
||||
company_id = values(company_id)</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
|
||||
update mdm_module_db_fileds set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmId != null and mdmId != ''"> mdm_id = #{mdmId},</if>
|
||||
<if test="dbId != null and dbId != ''"> db_id = #{dbId},</if>
|
||||
<if test="chName != null and chName != ''"> ch_name = #{chName},</if>
|
||||
<if test="enName != null and enName != ''"> en_name = #{enName},</if>
|
||||
<if test="filedType != null and filedType != ''"> filed_type = #{filedType},</if>
|
||||
<if test="addType != null and addType != ''"> add_type = #{addType},</if>
|
||||
<if test="updateType != null and updateType != ''"> update_type = #{updateType},</if>
|
||||
<if test="showType != null and showType != ''"> show_type = #{showType},</if>
|
||||
<if test="queryType != null and queryType != ''"> query_type = #{queryType},</if>
|
||||
<if test="listType != null and listType != ''"> list_type = #{listType},</if>
|
||||
<if test="viewType != null and viewType != ''"> view_type = #{viewType},</if>
|
||||
company_id = values(company_id)
|
||||
</insert>
|
||||
<!--通过主键修改方法-->
|
||||
<update id="entity_update" parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
update mdm_module_db_fileds set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="mdmId != null and mdmId != ''">mdm_id = #{mdmId},</if>
|
||||
<if test="dbId != null and dbId != ''">db_id = #{dbId},</if>
|
||||
<if test="chName != null and chName != ''">ch_name = #{chName},</if>
|
||||
<if test="enName != null and enName != ''">en_name = #{enName},</if>
|
||||
<if test="filedType != null and filedType != ''">filed_type = #{filedType},</if>
|
||||
<if test="addType != null and addType != ''">add_type = #{addType},</if>
|
||||
<if test="updateType != null and updateType != ''">update_type = #{updateType},</if>
|
||||
<if test="showType != null and showType != ''">show_type = #{showType},</if>
|
||||
<if test="queryType != null and queryType != ''">query_type = #{queryType},</if>
|
||||
<if test="listType != null and listType != ''">list_type = #{listType},</if>
|
||||
<if test="viewType != null and viewType != ''">view_type = #{viewType},</if>
|
||||
filed_length = #{filedLength},
|
||||
<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>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType = "com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
|
||||
update mdm_module_db_fileds 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.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity" >
|
||||
update mdm_module_db_fileds set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
|
||||
<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="isSysPk != null and isSysPk != ''">sys_pk = #{isSysPk},</if>
|
||||
<if test="isSysPk == null ">sys_pk = null,</if>
|
||||
<if test="isSysCode != null and isSysCode != ''">sys_code = #{isSysCode},</if>
|
||||
<if test="isSysCode == null ">sys_code = null,</if>
|
||||
<if test="isSysName != null and isSysName != ''">sys_name = #{isSysName},</if>
|
||||
<if test="isSysName == null ">sys_name = null,</if>
|
||||
<if test="isSysDate != null and isSysDate != ''">sys_date = #{isSysDate},</if>
|
||||
<if test="isSysDate == null ">sys_date = null,</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<!-- 逻辑删除 -->
|
||||
<update id="entity_logicDelete" parameterType="com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
update mdm_module_db_fileds
|
||||
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.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity">
|
||||
update mdm_module_db_fileds 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="mdmId != null and mdmId != ''"> and mdm_id = #{mdmId} </if>
|
||||
<if test="dbId != null and dbId != ''"> and db_id = #{dbId} </if>
|
||||
<if test="chName != null and chName != ''"> and ch_name = #{chName} </if>
|
||||
<if test="enName != null and enName != ''"> and en_name = #{enName} </if>
|
||||
<if test="filedType != null and filedType != ''"> and filed_type = #{filedType} </if>
|
||||
<if test="addType != null and addType != ''"> and add_type = #{addType} </if>
|
||||
<if test="updateType != null and updateType != ''"> and update_type = #{updateType} </if>
|
||||
<if test="showType != null and showType != ''"> and show_type = #{showType} </if>
|
||||
<if test="queryType != null and queryType != ''"> and query_type = #{queryType} </if>
|
||||
<if test="listType != null and listType != ''"> and list_type = #{listType} </if>
|
||||
<if test="viewType != null and viewType != ''"> and view_type = #{viewType} </if>
|
||||
<if test="filedLength != null and filedLength != ''"> and filed_length = #{filedLength} </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="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
|
||||
<if test="dbId != null and dbId != ''">and db_id = #{dbId}</if>
|
||||
<if test="chName != null and chName != ''">and ch_name = #{chName}</if>
|
||||
<if test="enName != null and enName != ''">and en_name = #{enName}</if>
|
||||
<if test="filedType != null and filedType != ''">and filed_type = #{filedType}</if>
|
||||
<if test="addType != null and addType != ''">and add_type = #{addType}</if>
|
||||
<if test="updateType != null and updateType != ''">and update_type = #{updateType}</if>
|
||||
<if test="showType != null and showType != ''">and show_type = #{showType}</if>
|
||||
<if test="queryType != null and queryType != ''">and query_type = #{queryType}</if>
|
||||
<if test="listType != null and listType != ''">and list_type = #{listType}</if>
|
||||
<if test="viewType != null and viewType != ''">and view_type = #{viewType}</if>
|
||||
<if test="filedLength != null and filedLength != ''">and filed_length = #{filedLength}</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>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete from mdm_module_db_fileds where id = #{id}
|
||||
</delete>
|
||||
</update>
|
||||
<!--通过主键删除-->
|
||||
<delete id="entity_delete">
|
||||
delete
|
||||
from mdm_module_db_fileds
|
||||
where id = #{id}
|
||||
</delete>
|
||||
<!--通过mdmCode删除-->
|
||||
<delete id="deleteMdmModuleDbFileds" parameterType="com.hzya.frame.mdm.mdmModuleDb.entity.MdmModuleDbEntity">
|
||||
delete from mdm_module_db_fileds where mdm_id = #{mdmId}
|
||||
</delete>
|
||||
delete
|
||||
from mdm_module_db_fileds
|
||||
where mdm_id = #{mdmId}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.hzya.frame.mdm.mdmModuleDbFileds.service.impl;
|
|||
import com.hzya.frame.mdm.mdmModuleDbFileds.entity.MdmModuleDbFiledsEntity;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.dao.IMdmModuleDbFiledsDao;
|
||||
import com.hzya.frame.mdm.mdmModuleDbFileds.service.IMdmModuleDbFiledsService;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import javax.annotation.Resource;
|
||||
|
|
|
@ -310,7 +310,12 @@
|
|||
parameterType="com.hzya.frame.mdm.mdmModuleDbFiledsRule.entity.MdmModuleDbFiledsRuleEntity">
|
||||
select count(1) from mdm_module_db_fileds_rule
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="mdmId != null and mdmId != ''">and mdm_id != #{mdmId}</if>
|
||||
<!-- <if test="mdmId != null and mdmId != ''">and mdm_id != #{mdmId}</if>-->
|
||||
<!-- <if test="ruleCode != null and ruleCode != ''">and rule_code = #{ruleCode}</if>-->
|
||||
<!-- <if test="ruleValue != null and ruleValue != ''">and rule_value = #{ruleValue}</if>-->
|
||||
|
||||
<if test="mdmId != null and mdmId != ''">and mdm_id = #{mdmId}</if>
|
||||
<if test="dbId != null and dbId != ''">and db_id = #{dbId}</if>
|
||||
<if test="ruleCode != null and ruleCode != ''">and rule_code = #{ruleCode}</if>
|
||||
<if test="ruleValue != null and ruleValue != ''">and rule_value = #{ruleValue}</if>
|
||||
and sts='Y'
|
||||
|
|
|
@ -1938,9 +1938,9 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
|
|||
response = closeableHttpClient.execute(post);
|
||||
|
||||
HttpEntity entity = response.getEntity();
|
||||
// synchronized (lock) {
|
||||
synchronized (lock) {
|
||||
body.append(EntityUtils.toString(entity,"UTF-8"));
|
||||
// }
|
||||
}
|
||||
flag = true;
|
||||
logger.info("返回结果:" + body);
|
||||
} catch (Exception e) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -73,11 +73,11 @@
|
|||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-IntegrationTaskLivingDetailsEntity-result">
|
||||
select
|
||||
<include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List" />
|
||||
from integration_task_living_details where id = #{ id } and sts='Y'
|
||||
</select>
|
||||
<!-- <select id="entity_get" resultMap="get-IntegrationTaskLivingDetailsEntity-result">-->
|
||||
<!-- select-->
|
||||
<!-- <include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List" />-->
|
||||
<!-- from integration_task_living_details where id = #{ id } and sts='Y'-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-IntegrationTaskLivingDetailsEntity-result" parameterType = "com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
<artifactId>base-service</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<artifactId>fw-bip</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
||||
<!-- <artifactId>fw-bip</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
||||
<!-- <artifactId>fw-cbs</artifactId>-->
|
||||
|
@ -54,11 +54,11 @@
|
|||
<!-- <artifactId>fw-ningbobank</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<artifactId>fw-oa</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
||||
<!-- <artifactId>fw-oa</artifactId>-->
|
||||
<!-- <version>${revision}</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.frame</groupId>-->
|
||||
<!-- <artifactId>fw-u8</artifactId>-->
|
||||
|
|
|
@ -1,78 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>kangarooDataCenterV3</artifactId>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>fw-bip</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>${revision}</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<artifactId>base-service</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql-connector-java}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.hzya.bip</groupId>
|
||||
<artifactId>pubbaseapp_nccloud_rtLevel</artifactId>
|
||||
<version>1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/pubbaseapp_nccloud_rtLevel-1.jar</systemPath>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.bipyonyoulog</groupId>-->
|
||||
<!-- <artifactId>yonyoulog</artifactId>-->
|
||||
<!-- <version>1</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${basedir}/src/main/resources/lib/yonyoulog.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.bcprov</groupId>-->
|
||||
<!-- <artifactId>bcprov</artifactId>-->
|
||||
<!-- <version>1</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${basedir}/src/main/resources/lib/bcprov-jdk15on-1.70.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.hzya.DataApiSdk</groupId>-->
|
||||
<!-- <artifactId>DataApiSdk</artifactId>-->
|
||||
<!-- <version>1</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${basedir}/src/main/resources/lib/DataApiSdk-jar-with-dependencies.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
||||
<classifier>execute</classifier> <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -1,15 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IBipArchivesDao extends IBaseDao<BipArchivesEntity, String> {
|
||||
|
||||
List<BipArchivesEntity> queryArchivesData(BipArchivesEntity archivesEntity);
|
||||
List<BipArchivesEntity> queryArchivesDatays(BipArchivesEntity archivesEntity);
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IBipOrgsDao extends IBaseDao<BipOrgsEntity, String> {
|
||||
|
||||
/**
|
||||
* 查询BIP业务单元
|
||||
* @param BipOrgsEntity
|
||||
* @return
|
||||
*/
|
||||
List<BipOrgsEntity> thirdInterfaceGetOrgs(BipOrgsEntity BipOrgsEntity);
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsDetailsEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IBipOrgsDetailsDao extends IBaseDao<BipOrgsDetailsEntity, String> {
|
||||
|
||||
/**
|
||||
* 查询BIP业务单元银行账户
|
||||
* @param BipOrgsDetailsEntity
|
||||
* @return
|
||||
*/
|
||||
List<BipOrgsDetailsEntity> thirdInterfaceGetOrgsDetails(BipOrgsDetailsEntity BipOrgsDetailsEntity);
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IBipSupplierDao extends IBaseDao<BipSupplierEntity, String> {
|
||||
|
||||
/**
|
||||
* 查询BIP供应商
|
||||
* @param bipSupplierEntity
|
||||
* @return
|
||||
*/
|
||||
List<BipSupplierEntity> thirdInterfaceGetSupplier(BipSupplierEntity bipSupplierEntity);
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierDetailsEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface IBipSupplierDetailsDao extends IBaseDao<BipSupplierDetailsEntity, String> {
|
||||
|
||||
/**
|
||||
* 查询BIP供应商明细
|
||||
* @param bipSupplierDetailsEntity
|
||||
* @return
|
||||
*/
|
||||
List<BipSupplierDetailsEntity> thirdInterfaceGetSupplierDetails(BipSupplierDetailsEntity bipSupplierDetailsEntity);
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipArchivesDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository("bipArchivesDaoImpl")
|
||||
public class BipArchivesDaoImpl extends MybatisGenericDao<BipArchivesEntity,String> implements IBipArchivesDao {
|
||||
|
||||
@Override
|
||||
public List<BipArchivesEntity> queryArchivesData(BipArchivesEntity entity) {
|
||||
List<BipArchivesEntity> o = super.query(getSqlIdPrifx() + "queryArchivesData", entity);
|
||||
return o;
|
||||
} @Override
|
||||
public List<BipArchivesEntity> queryArchivesDatays(BipArchivesEntity entity) {
|
||||
List<BipArchivesEntity> o = super.query(getSqlIdPrifx() + "queryArchivesDatays", entity);
|
||||
return o;
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository("bipOrgsDaoImpl")
|
||||
public class BipOrgsDaoImpl extends MybatisGenericDao<BipOrgsEntity,String> implements IBipOrgsDao {
|
||||
/**
|
||||
* 查询BIP业务单元
|
||||
* @param BipOrgsEntity
|
||||
* @return
|
||||
*/
|
||||
@DS("oracle91")
|
||||
@Override
|
||||
public List<BipOrgsEntity> thirdInterfaceGetOrgs(BipOrgsEntity BipOrgsEntity) {
|
||||
return super.query("com.hzya.frame.bip.v3.v2207.dao.impl.BipOrgsDaoImpl.thirdInterfaceGetOrgs",BipOrgsEntity);
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsDetailsEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository("bipOrgsDetailsDaoImpl")
|
||||
public class BipOrgsDetailsDaoImpl extends MybatisGenericDao<BipOrgsDetailsEntity,String> implements IBipOrgsDetailsDao {
|
||||
@DS("oracle91")
|
||||
@Override
|
||||
public List<BipOrgsDetailsEntity> thirdInterfaceGetOrgsDetails(BipOrgsDetailsEntity bipOrgsDetailsEntity) {
|
||||
return super.query("com.hzya.frame.bip.v3.v2207.dao.impl.BipOrgsDetailsDaoImpl.thirdInterfaceGetOrgsDetails",bipOrgsDetailsEntity);
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao.impl;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
import com.hzya.frame.util.HttpUtil;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository("bipSupplierDaoImpl")
|
||||
public class BipSupplierDaoImpl extends MybatisGenericDao<BipSupplierEntity,String> implements IBipSupplierDao {
|
||||
/**
|
||||
* 查询BIP供应商
|
||||
* @param bipSupplierEntity
|
||||
* @return
|
||||
*/
|
||||
@DS("oracle91")
|
||||
@Override
|
||||
public List<BipSupplierEntity> thirdInterfaceGetSupplier(BipSupplierEntity bipSupplierEntity) {
|
||||
return super.query("com.hzya.frame.bip.v3.v2207.dao.impl.BipSupplierDaoImpl.thirdInterfaceGetSupplier",bipSupplierEntity);
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dao.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierDetailsEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository("bipSupplierDetailsDaoImpl")
|
||||
public class BipSupplierDetailsDaoImpl extends MybatisGenericDao<BipSupplierDetailsEntity,String> implements IBipSupplierDetailsDao {
|
||||
@DS("oracle91")
|
||||
@Override
|
||||
public List<BipSupplierDetailsEntity> thirdInterfaceGetSupplierDetails(BipSupplierDetailsEntity bipSupplierDetailsEntity) {
|
||||
return super.query("com.hzya.frame.bip.v3.v2207.dao.impl.BipSupplierDetailsDaoImpl.thirdInterfaceGetSupplierDetails",bipSupplierDetailsEntity);
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dps.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
|
||||
public interface IPayMentService {
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 获取杭泰OA付款单传递CFS
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/16 11:59
|
||||
* **/
|
||||
String sendOAPayMentToCFS(JSONObject jsonObject, String type);
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 获取CFS登录校验码
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/16 13:37
|
||||
* **/
|
||||
String sendCFSToken(String name, String password);
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 获取杭泰OA报销单传递CFS
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/16 16:17
|
||||
* **/
|
||||
String sendExpenseToCFS(JSONObject jsonObject);
|
||||
|
||||
}
|
|
@ -1,389 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dps.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.bip.v3.v2207.dps.service.IPayMentService;
|
||||
import com.hzya.frame.dateutil.DateUtil;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentHelper;
|
||||
import org.dom4j.Element;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xml.sax.InputSource;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import java.io.StringReader;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service(value = "payMentServiceImpl")
|
||||
public class PayMentServiceImpl implements IPayMentService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(PayMentServiceImpl.class);
|
||||
|
||||
private static final String NAME="admin";
|
||||
private static final String PASSWORD="aHRzejg4OA==";
|
||||
private static final String CFSURL="http://101.132.140.208:26883/erp/services/";//测试端口:26893,正式端口:26883
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 杭泰OA付款单传递CFS 注:付款单,资金归集,资金拨付,同名账户划转和借款单都用同一个接口
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/13 10:40
|
||||
* **/
|
||||
public String sendOAPayMentToCFS(JSONObject jsonStr,String type){
|
||||
logger.info("开始执行杭泰OA付款单传递CFS");
|
||||
try {
|
||||
String cfsToken = sendCFSToken(NAME, PASSWORD);
|
||||
if(null!=cfsToken) {
|
||||
String jsonStrObj = jsonStr.getString("jsonStr");
|
||||
JSONObject jsonObjectMain = JSON.parseObject(jsonStrObj);
|
||||
String erpVoucherNo = jsonObjectMain.getString("erpVoucherNo");//OA主键
|
||||
String purpose = jsonObjectMain.getString("purpose");//摘要
|
||||
String isForindividual = "0";//是否对私付款
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
String documentType=null;
|
||||
switch (type){
|
||||
case "pay"://付款单
|
||||
documentType="01";
|
||||
break;
|
||||
case "fundc"://资金归集
|
||||
documentType="02";
|
||||
break;
|
||||
case "funda"://资金拨付
|
||||
documentType="03";
|
||||
break;
|
||||
case "acc"://同名账户划转
|
||||
documentType="04";
|
||||
break;
|
||||
case "loan"://借款单
|
||||
documentType="05";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
JSONArray jsonStrList = jsonObjectMain.getJSONArray("details");
|
||||
if (null != jsonStrList && jsonStrList.size() > 0) {
|
||||
for (Object seeyonEntity : jsonStrList) {
|
||||
JSONObject jsonObjectFormson = JSON.parseObject(JSON.toJSONString(seeyonEntity));
|
||||
String payerAccName = jsonObjectFormson.getString("payerAccName");//转出方账户名(付款账户)
|
||||
String payerAccNo = jsonObjectFormson.getString("payerAccNo");//转出方账号(付款账号)
|
||||
String curCode = jsonObjectFormson.getString("curCode");//付款方币种
|
||||
String payeeAccName = jsonObjectFormson.getString("payeeAccName");//收款人帐户名称
|
||||
String payeeAccNo = jsonObjectFormson.getString("payeeAccNo");//收款方账户号
|
||||
BigDecimal amount = jsonObjectFormson.getBigDecimal("amount");//发生额
|
||||
String payeeBankCode = jsonObjectFormson.getString("payeeBankCode");//联行号
|
||||
String isQuick = jsonObjectFormson.getString("isQuick");//加急标志
|
||||
String payType = jsonObjectFormson.getString("payType");//结算方式
|
||||
String businessType = jsonObjectFormson.getString("businessType");//业务类别
|
||||
stringBuffer.append("<map>\n");
|
||||
stringBuffer.append("<documentType>" + nullConvert(documentType) + "</documentType>\n");
|
||||
stringBuffer.append("<erpVoucherNo>" + nullConvert(erpVoucherNo) + "</erpVoucherNo>\n");
|
||||
//stringBuffer.append("<payerAccName>"+"浙江杭泰数智能源开发有限公司"+"</payerAccName>\n");
|
||||
stringBuffer.append("<payerAccName>"+nullConvert(payerAccName)+"</payerAccName>\n");
|
||||
//stringBuffer.append("<payerAccNo>" +"71010122002702903"+ "</payerAccNo>\n");
|
||||
stringBuffer.append("<payerAccNo>" + nullConvert(payerAccNo) + "</payerAccNo>\n");
|
||||
stringBuffer.append("<curCode>" + nullConvert(curCode) + "</curCode>\n");
|
||||
stringBuffer.append("<payeeAccName>" + nullConvert(payeeAccName) + "</payeeAccName>\n");
|
||||
stringBuffer.append("<payeeAccNo>" + nullConvert(payeeAccNo) + "</payeeAccNo>\n");
|
||||
stringBuffer.append("<amount>" + nullConvert(String.valueOf(amount)) + "</amount>\n");
|
||||
//stringBuffer.append("<payeeBankCode>"+"301331000029"+"</payeeBankCode>\n");
|
||||
stringBuffer.append("<payeeBankCode>"+nullConvert(payeeBankCode)+"</payeeBankCode>\n");
|
||||
stringBuffer.append("<isQuick>" + nullConvert(isQuick) + "</isQuick>\n");
|
||||
stringBuffer.append("<isForindividual>" + nullConvert(isForindividual) + "</isForindividual>\n");
|
||||
stringBuffer.append("<payType>" + nullConvert(payType) + "</payType>\n");
|
||||
stringBuffer.append("<purpose>" + nullConvert(purpose) + "</purpose>\n");
|
||||
stringBuffer.append("<businessType>" + nullConvert(businessType) + "</businessType>\n");
|
||||
stringBuffer.append("<debitByCustomer>" + nullConvert(jsonObjectFormson.getString("debitByCustomer")) + "</debitByCustomer>\n");//借方客商辅助核算编码
|
||||
stringBuffer.append("<debitByBankAcc>" + nullConvert(payeeAccNo) + "</debitByBankAcc>\n");//借方银行账户辅助核算编码
|
||||
stringBuffer.append("<debitByPersonnel>" + nullConvert(jsonObjectFormson.getString("debitByPersonnel")) + "</debitByPersonnel>\n");//借方人员辅助核算编码
|
||||
stringBuffer.append("<creditByCustomer>" + nullConvert(jsonObjectFormson.getString("creditByCustomer")) + "</creditByCustomer>\n");//贷方客商辅助核算编码
|
||||
stringBuffer.append("<creditByBankAcc>" + nullConvert(payerAccNo) + "</creditByBankAcc>\n");//贷方银行辅助核算编码
|
||||
stringBuffer.append("</map>\n");
|
||||
}
|
||||
} else {
|
||||
stringBuffer.append("<map>\n");
|
||||
stringBuffer.append("<erpVoucherNo>" + nullConvert(erpVoucherNo) + "</erpVoucherNo>");
|
||||
stringBuffer.append("<purpose>" + nullConvert(purpose) + "</purpose>");
|
||||
stringBuffer.append("<isForindividual>" + nullConvert(isForindividual) + "</isForindividual>");
|
||||
stringBuffer.append("</map>\n");
|
||||
}
|
||||
String result=null;
|
||||
String xml= requestXML(cfsToken,"BkPaymentMainExchange",stringBuffer,"OA付款单同步发送");
|
||||
String url = "HTSZ_OA_BkPaymentMainWebService?wsdl";
|
||||
switch (type){
|
||||
case "pay"://付款单
|
||||
logger.info("OA付款单发送CFS的请求参数为:{}", xml);
|
||||
result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA付款单发送CFS的返回参数为:{}", result);
|
||||
break;
|
||||
case "fundc"://资金归集
|
||||
logger.info("OA资金归集发送CFS的请求参数为:{}", xml);
|
||||
result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA资金归集发送CFS的返回参数为:{}", result);
|
||||
break;
|
||||
case "funda"://资金调拨
|
||||
logger.info("OA资金拨付发送CFS的请求参数为:{}", xml);
|
||||
result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA资金拨付发送CFS的返回参数为:{}", result);
|
||||
break;
|
||||
case "acc"://同名账户划转
|
||||
logger.info("OA同名账户划转发送CFS的请求参数为:{}", xml);
|
||||
result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA同名账户划转发送CFS的返回参数为:{}", result);
|
||||
break;
|
||||
case "loan"://借款单
|
||||
logger.info("OA借还款发送CFS的请求参数为:{}", xml);
|
||||
result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA借还款发送CFS的返回参数为:{}", result);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return analyzeXML(result,"pay");
|
||||
}else{
|
||||
logger.info("请先登录CFS登录接口获取Token");
|
||||
return null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("杭泰OA付款单传递CFS错误,原因为:{}", e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 获取CFS登录校验码
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/13 15:38
|
||||
* **/
|
||||
public String sendCFSToken(String name,String password) {
|
||||
try {
|
||||
String xml="<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:mdm=\"http://mdmData.server.webservice.banck.com\">\n" +
|
||||
" <soap:Header/>\n" +
|
||||
" <soap:Body>\n" +
|
||||
" <mdm:intoPaymentDataXml>\n" +
|
||||
" <!--Optional:-->\n" +
|
||||
" <mdm:xml>\n" +
|
||||
" <![CDATA[\n" +
|
||||
" <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
"<message>\n" +
|
||||
"<head>\n" +
|
||||
"<transCode>LogOn</transCode>\n" +
|
||||
"<erpTimestamp>"+DateUtil.dateToString(new Date(), "yyyy-MM-dd HH:mm:ss")+"</erpTimestamp>\n" +
|
||||
"<sourcePlat>OA</sourcePlat>\n" +
|
||||
"<desPlat>CFS</desPlat>\n" +
|
||||
"<rmk>OA登录验证发送</rmk>\n" +
|
||||
"</head>\n" +
|
||||
"<body>\n" +
|
||||
"<user>"+name+"</user>\n" +
|
||||
"<password>"+password+"</password>\n" +
|
||||
"</body>\n" +
|
||||
"</message>\n" +
|
||||
" ]]>\n" +
|
||||
" </mdm:xml>\n" +
|
||||
" </mdm:intoPaymentDataXml>\n" +
|
||||
" </soap:Body>\n" +
|
||||
"</soap:Envelope>";
|
||||
logger.info("CFS登录的请求参数为:{}",xml);
|
||||
String url="HTSZ_OA_LogOnWebService?wsdl";
|
||||
String result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("CFS登录的返回参数为:{}",result);
|
||||
return analyzeXML(result,"login");
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
logger.info("获取CFS登录失败,原因为:{}",e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 获取杭泰OA报销单传递CFS
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/16 16:17
|
||||
* **/
|
||||
@Override
|
||||
public String sendExpenseToCFS(JSONObject jsonStr) {
|
||||
logger.info("开始执行杭泰OA报销单传递CFS");
|
||||
try {
|
||||
String token = sendCFSToken(NAME, PASSWORD);
|
||||
if(null != token){
|
||||
String jsonStrObj = jsonStr.getString("jsonStr");
|
||||
JSONObject jsonObjectMain = JSON.parseObject(jsonStrObj);
|
||||
String erpVoucherNo = jsonObjectMain.getString("erpVoucherNo");//OA主键
|
||||
String purpose = jsonObjectMain.getString("purpose");//摘要
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
JSONArray jsonStrList = jsonObjectMain.getJSONArray("details");
|
||||
if(null != jsonStrList && jsonStrList.size()>0){
|
||||
for (Object o : jsonStrList) {
|
||||
JSONObject jsonObjectDetails = JSON.parseObject(JSON.toJSONString(o));
|
||||
String payerAccName = jsonObjectDetails.getString("payerAccName");//转出方账户名(付款账户)
|
||||
String payerAccNo = jsonObjectDetails.getString("payerAccNo");//转出方账号(付款账号)
|
||||
String curCode = jsonObjectDetails.getString("curCode");//付款方币种
|
||||
String payeeAccName = jsonObjectDetails.getString("payeeAccName");//收款人帐户名称
|
||||
String payeeAccNo = jsonObjectDetails.getString("payeeAccNo");//收款方账户号
|
||||
BigDecimal amount = jsonObjectDetails.getBigDecimal("amount");//发生额
|
||||
String payeeBankCode = jsonObjectDetails.getString("payeeBankCode");//联行号
|
||||
String isQuick = jsonObjectDetails.getString("isQuick");//加急标志
|
||||
String payType = jsonObjectDetails.getString("payType");//结算方式
|
||||
stringBuffer.append("<map>\n");
|
||||
stringBuffer.append("<erpVoucherNo>" + nullConvert(erpVoucherNo) + "</erpVoucherNo>\n");
|
||||
stringBuffer.append("<payerAccName>" + nullConvert(payerAccName) + "</payerAccName>\n");
|
||||
//stringBuffer.append("<payerAccName>"+"浙江杭泰数智能源开发有限公司"+"</payerAccName>\n");
|
||||
stringBuffer.append("<payerAccNo>" + nullConvert(payerAccNo) + "</payerAccNo>\n");
|
||||
//stringBuffer.append("<payerAccNo>" +"71010122002702903"+ "</payerAccNo>\n");
|
||||
stringBuffer.append("<curCode>" + nullConvert(curCode) + "</curCode>\n");
|
||||
stringBuffer.append("<payeeAccName>" + nullConvert(payeeAccName) + "</payeeAccName>\n");
|
||||
stringBuffer.append("<payeeAccNo>" + nullConvert(payeeAccNo) + "</payeeAccNo>\n");
|
||||
stringBuffer.append("<amount>" + nullConvert(String.valueOf(amount)) + "</amount>\n");
|
||||
stringBuffer.append("<payeeBankCode>" + nullConvert(payeeBankCode) + "</payeeBankCode>\n");
|
||||
//stringBuffer.append("<payeeBankCode>"+"301331000029"+"</payeeBankCode>\n");
|
||||
stringBuffer.append("<isQuick>" + nullConvert(isQuick) + "</isQuick>\n");
|
||||
stringBuffer.append("<payType>" + nullConvert(payType) + "</payType>\n");
|
||||
stringBuffer.append("<purpose>" + nullConvert(purpose) + "</purpose>\n");
|
||||
stringBuffer.append("</map>\n");
|
||||
}
|
||||
} else {
|
||||
stringBuffer.append("<map>\n");
|
||||
stringBuffer.append("<erpVoucherNo>" + erpVoucherNo + "</erpVoucherNo>\n");
|
||||
stringBuffer.append("<purpose>" + purpose + "</purpose>\n");
|
||||
stringBuffer.append("</map>\n");
|
||||
}
|
||||
String xml= requestXML(token,"BkExpenseExchange",stringBuffer,"OA费用报销单同步发送");
|
||||
logger.info("OA报销单发送CFS的请求参数为:{}", xml);
|
||||
String url = "HTSZ_OA_BkExpenseWebService?wsdl";
|
||||
String result = HttpRequest.post(CFSURL+url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
logger.info("OA报销单发送CFS的返回参数为:{}", result);
|
||||
return analyzeXML(result,"pay");
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.info("杭泰OA报销单传递CFS错误,原因为:{}", e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//null转成空字符串
|
||||
private static String nullConvert(String str){
|
||||
if (null == str){
|
||||
return "";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
private String requestXML(String token,String code,StringBuffer stringBuffer,String remark){
|
||||
String xml = "<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:mdm=\"http://mdmData.server.webservice.banck.com\">\n" +
|
||||
" <soap:Header/>\n" +
|
||||
" <soap:Body>\n" +
|
||||
" <mdm:intoPaymentDataXml>\n" +
|
||||
" <!--Optional:-->\n" +
|
||||
" <mdm:xml>\n" +
|
||||
" <![CDATA[\n" +
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
"<message>\n" +
|
||||
"<head>\n" +
|
||||
"<transCode>" + code + "</transCode>\n" +
|
||||
"<erpTimestamp>" + DateUtil.dateToString(new Date(), "yyyy-MM-dd HH:mm:ss") + "</erpTimestamp>\n" +
|
||||
"<sourcePlat>OA</sourcePlat>\n" +
|
||||
"<desPlat>CFS</desPlat>\n" +
|
||||
"<rmk>" + remark + "</rmk>\n" +
|
||||
"<sessionId>" + token + "</sessionId>\n" +
|
||||
"</head>\n" +
|
||||
"<body>\n" +
|
||||
"<list>\n";
|
||||
if (stringBuffer != null) {
|
||||
xml += stringBuffer.toString();
|
||||
xml += "</list>\n" +
|
||||
"</body>\n" +
|
||||
"</message>\n" +
|
||||
" ]]>\n" +
|
||||
" </mdm:xml>\n" +
|
||||
" </mdm:intoPaymentDataXml>\n" +
|
||||
" </soap:Body>\n" +
|
||||
"</soap:Envelope>";
|
||||
} else {
|
||||
xml += "</list>\n" +
|
||||
"</body>\n" +
|
||||
"</message>\n" +
|
||||
"]]>\n" +
|
||||
" </mdm:xml>\n" +
|
||||
" </mdm:intoPaymentDataXml>\n" +
|
||||
" </soap:Body>\n" +
|
||||
"</soap:Envelope>";
|
||||
}
|
||||
return xml;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 解析CFS返回的xml格式
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2023/10/19 14:07
|
||||
* **/
|
||||
private static String analyzeXML(String result,String type){
|
||||
try {
|
||||
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
org.w3c.dom.Document document = builder.parse(new InputSource(new StringReader(result)));
|
||||
org.w3c.dom.Element bodyElement = (org.w3c.dom.Element) document.getElementsByTagName("ns:return").item(0);
|
||||
if (null!=bodyElement) {
|
||||
String textContent = bodyElement.getTextContent();
|
||||
Document documentContext = DocumentHelper.parseText(textContent);
|
||||
Element rootElement = documentContext.getRootElement();
|
||||
Element body = rootElement.element("body");
|
||||
if (null != body) {
|
||||
switch (type) {
|
||||
case "login"://登录
|
||||
Element sessionId = body.element("sessionId");
|
||||
if (null != sessionId) {
|
||||
logger.info("CFS登录的登录校验码为:{}", sessionId.getText());
|
||||
return sessionId.getText();
|
||||
} else {
|
||||
logger.info("CFS登录的登录校验码没有获取到,请重新获取");
|
||||
return null;
|
||||
}
|
||||
case "pay"://付款单和报销单
|
||||
Element list = body.element("list");
|
||||
List<Element> elements = list.elements();
|
||||
String serialNo = null;
|
||||
String statusMsg = null;
|
||||
String erpVoucherNoCfs = null;
|
||||
for (Element element : elements) {
|
||||
serialNo = element.element("serialNo").getText();
|
||||
statusMsg = element.element("statusMsg").getText();
|
||||
erpVoucherNoCfs = element.element("erpVoucherNo").getText();
|
||||
}
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
jsonObject.put("erpVoucherNoCfs",erpVoucherNoCfs);
|
||||
jsonObject.put("statusMsg",statusMsg);
|
||||
jsonObject.put("serialNo",serialNo);
|
||||
//return "当前单据:" + erpVoucherNoCfs + ",传递CFS返回信息:" + statusMsg + ",流水号:" + serialNo;
|
||||
return jsonObject.toJSONString();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.info("解析CFS返回的xml格式错误:{}",e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,194 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.dps.task;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.bip.v3.v2207.dps.service.IPayMentService;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
@EnableScheduling
|
||||
@Component
|
||||
public class ElectronicTask {
|
||||
static Logger logger= LoggerFactory.getLogger(ElectronicTask.class);
|
||||
|
||||
@Resource
|
||||
private IPayMentService payMentService;
|
||||
//@Resource
|
||||
//private ISeeYonDao seeYonDao;
|
||||
//@Resource
|
||||
//private ICtpAttachmentDao ctpAttachmentDao;
|
||||
|
||||
|
||||
//@Scheduled(cron = "0 20 10 * * ?")
|
||||
//public void sendElectronicToCFS() {
|
||||
// logger.info("CFS电子回单共享开始执行---------->");
|
||||
// try {
|
||||
// String token = payMentService.sendCFSToken("admin", "aHRzejg4OA==");
|
||||
// if(null!=token) {
|
||||
// List<SeeyonEntity> seeyonEntities = seeYonDao.selectOAListByTypeformmain_0327(new SeeyonEntity());
|
||||
// if (seeyonEntities != null && seeyonEntities.size() > 0) {
|
||||
// for (SeeyonEntity seeyonEntity : seeyonEntities) {
|
||||
// String bankAcc = seeyonEntity.getField0137();//付款账号
|
||||
// //String bankAcc="03005389347";
|
||||
// String erpVoucherNo = seeyonEntity.getId();//OA付款单号
|
||||
// String xml = "<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:mdm=\"http://mdmData.server.webservice.banck.com\">\n" +
|
||||
// " <soap:Header/>\n" +
|
||||
// " <soap:Body>\n" +
|
||||
// " <mdm:intoPaymentDataXml>\n" +
|
||||
// " <!--Optional:-->\n" +
|
||||
// " <mdm:xml>\n" +
|
||||
// " <![CDATA[\n" +
|
||||
// " <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
// "<message>\n" +
|
||||
// "<head>\n" +
|
||||
// "<transCode>BkReceiptQueryExchange</transCode>\n" +
|
||||
// "<erpTimestamp>" + DateUtil.dateToString(new Date(), "yyyy-mm-dd hh:mm:ss") + "</erpTimestamp>\n" +
|
||||
// "<sourcePlat>CFS</sourcePlat>\n" +
|
||||
// "<desPlat>OA</desPlat>\n" +
|
||||
// "<rmk>OA电子回单共享发送</rmk>\n" +
|
||||
// "<sessionId>" + token + "</sessionId>\n" +
|
||||
// "</head>\n" +
|
||||
// "<body>\n" +
|
||||
// "<bankAcc>" + bankAcc + "</bankAcc>\n" +
|
||||
// "<erpVoucherNo>" + erpVoucherNo + "</erpVoucherNo>\n" +
|
||||
// "</body>\n" +
|
||||
// "</message>\n" +
|
||||
// " ]]>\n" +
|
||||
// " </mdm:xml>\n" +
|
||||
// " </mdm:intoPaymentDataXml>\n" +
|
||||
// " </soap:Body>\n" +
|
||||
// "</soap:Envelope>";
|
||||
// logger.info("CFS电子回单共享请求参数为:{}", xml);
|
||||
// String url = "http://101.132.140.208:26893/erp/services/HTSZ_OA_BkReceiptQueryWebService?wsdl";
|
||||
// String result = HttpRequest.post(url).header("Content-Type", "soap/xml").timeout(30000).body(xml).execute().body();
|
||||
// logger.info("CFS电子回单共享请求参数为:{}", result);
|
||||
// DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
// DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
// org.w3c.dom.Document document = builder.parse(new InputSource(new StringReader(result)));
|
||||
// org.w3c.dom.Element bodyElement = (org.w3c.dom.Element) document.getElementsByTagName("ns:return").item(0);
|
||||
// if (null != bodyElement) {
|
||||
// String textContent = bodyElement.getTextContent();
|
||||
// Document documentContext = DocumentHelper.parseText(textContent);
|
||||
// Element rootElement = documentContext.getRootElement();
|
||||
// Element body = rootElement.element("body");
|
||||
// if("0000".equalsIgnoreCase(rootElement.element("head").element("returnCode").getText())){
|
||||
// if (null != body) {
|
||||
// Element listElc = body.element("list");
|
||||
// List<Element> elementsElc = listElc.elements();
|
||||
// for (Element element : elementsElc) {
|
||||
// String fielPath = element.element("filePath").getText();//电子回单附件路径
|
||||
// if (fielPath != null && fielPath!="") {
|
||||
// // String fielPath="C:\\Users\\笃曙\\Desktop\\15HZ000342CIBN2023091100066856211000001.pdf";
|
||||
// File file = new File(fielPath);
|
||||
// JSONObject jsonObject = fileUpload(file);
|
||||
// logger.info("上传返回的附件id为:{}", jsonObject.getString("fileUrl"));
|
||||
// if (jsonObject.getString("fileUrl") != null) {
|
||||
// //表单的附件字段=ctpAttachment的Sub_reference,表单的Summary_id=ctpAttachment的att_reference
|
||||
// String sub_reference = String.valueOf(UUIDLong.longUUID());
|
||||
// seeyonEntity.setField0264(sub_reference);
|
||||
// seeYonDao.updateFormformmain_0327(seeyonEntity);
|
||||
// //根据附件id查询附件业务数据
|
||||
// String file_url = jsonObject.getString("fileUrl");
|
||||
// CtpAttachmentEntity ctpAttachmentEntity = new CtpAttachmentEntity();
|
||||
// ctpAttachmentEntity.setFile_url(file_url);
|
||||
// String att_reference = seeyonEntity.getSummary_id();//Summary_id
|
||||
// ctpAttachmentEntity.setSub_reference(sub_reference);
|
||||
// ctpAttachmentEntity.setAtt_reference(att_reference);
|
||||
// List<CtpAttachmentEntity> ctpAttachmentEntities = ctpAttachmentDao.queryCtpAttachment(ctpAttachmentEntity);
|
||||
// //如果没有查询到数据,就新增附件业务,否则更新
|
||||
// if (ctpAttachmentEntities.size() == 0) {
|
||||
// String category = jsonObject.getString("category");
|
||||
// String type = jsonObject.getString("type");
|
||||
// String filename = jsonObject.getString("filename");
|
||||
// String mime_type = jsonObject.getString("mimeType");
|
||||
// String attachment_size = jsonObject.getString("size");
|
||||
// String id = String.valueOf(UUIDLong.longUUID());
|
||||
// ctpAttachmentEntity.setCategory(category);
|
||||
// ctpAttachmentEntity.setFilename(filename);
|
||||
// ctpAttachmentEntity.setType(type);
|
||||
// ctpAttachmentEntity.setMime_type(mime_type);
|
||||
// ctpAttachmentEntity.setAttachment_size(attachment_size);
|
||||
// ctpAttachmentEntity.setId(id);
|
||||
// ctpAttachmentEntity.setCategory("66");
|
||||
// ctpAttachmentEntity.setCreatedate(new Date());
|
||||
// ctpAttachmentDao.saveCtpAttachment(ctpAttachmentEntity);
|
||||
// } else {
|
||||
// if (ctpAttachmentEntities.size() > 1) {
|
||||
// throw new BaseSystemException("OA附件业务表中查到多条记录");
|
||||
// }
|
||||
// //更新数据到OA附件业务表中
|
||||
// ctpAttachmentDao.updateCtpAttachment(ctpAttachmentEntity);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// logger.info("CFS电子回单返回得错误编码:{},以及返回的错误信息:{}",rootElement.element("head").element("returnCode").getText(),rootElement.element("head").element("returnMsg").getText());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }catch (Exception e){
|
||||
// logger.info("CFS电子回单共享错误:{}",e.getMessage());
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
public static JSONObject fileUpload(File file) {
|
||||
if (null != file) {
|
||||
try {
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("file", file);
|
||||
String url = "/seeyon/rest/attachment?token=@token@";//如果后面加上applicationCategory=1&extensions=&firstSave=true,附件业务自动生成一条记录
|
||||
url = url.replaceAll("@token@", getToken());
|
||||
String result = HttpUtil.post("http://60.204.152.210" + url, paramMap);
|
||||
if (StrUtil.isNotBlank(result)) {
|
||||
logger.info("附件上传结果"+result);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
String atts = jsonObject.get("atts").toString();
|
||||
if (StrUtil.isNotEmpty(atts)) {
|
||||
JSONArray jsonArray = JSONArray.parseArray(atts);
|
||||
JSONObject res = (JSONObject) jsonArray.get(0);
|
||||
/* String fileUrl = res.getString("fileUrl");
|
||||
logger.info("附件id:" + fileUrl);
|
||||
return fileUrl;*/
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
logger.error("附件上传失败"+e.getMessage());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getToken() {
|
||||
//获取oatoken
|
||||
HashMap<String, String> hashMap = new HashMap<>();
|
||||
hashMap.put("userName", "hzyaRest");
|
||||
hashMap.put("password", "a5ce21b8-91db-4cec-b3e3-3e44719655fd");
|
||||
hashMap.put("loginName","bdmanager");
|
||||
String result = HttpUtil.post("http://60.204.152.210" + "/seeyon/rest/token", JSON.toJSONString(hashMap));
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if (null != jsonObject) {
|
||||
logger.info(result);
|
||||
logger.info("======token:{}======" + jsonObject.getString("id"));
|
||||
return jsonObject.getString("id");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,188 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.hzya.frame.uuid.UUIDUtils;
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (BdCorp)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-09-06 14:47:18
|
||||
*/
|
||||
public class BipArchivesEntity extends BaseEntity {
|
||||
|
||||
private String archivesType;//类型
|
||||
private String leftCode;//左编码
|
||||
private String rightCode;//右编码
|
||||
|
||||
private String leftAppId;//左应用id
|
||||
private String leftAppCode;//左应用编码
|
||||
private String leftAppName;//左应用名称
|
||||
private String leftApiId;//左接口ID
|
||||
private String leftId;//左id
|
||||
private String leftName;//左名称
|
||||
private String rightAppId;//右应用id
|
||||
private String rightAppCode;//右应用编码
|
||||
private String rightAppName;//右应用名称
|
||||
private String rightApiId;//右接口ID
|
||||
private String rightId;//右id
|
||||
private String rightName;//右名称
|
||||
private String leftOrg;//左公司
|
||||
private String rightOrg;//右公司
|
||||
|
||||
public String getArchivesType() {
|
||||
return archivesType;
|
||||
}
|
||||
|
||||
public void setArchivesType(String archivesType) {
|
||||
this.archivesType = archivesType;
|
||||
}
|
||||
|
||||
public String getLeftCode() {
|
||||
return leftCode;
|
||||
}
|
||||
|
||||
public void setLeftCode(String leftCode) {
|
||||
this.leftCode = leftCode;
|
||||
}
|
||||
|
||||
public String getRightCode() {
|
||||
return rightCode;
|
||||
}
|
||||
|
||||
public void setRightCode(String rightCode) {
|
||||
this.rightCode = rightCode;
|
||||
}
|
||||
|
||||
public String getLeftAppId() {
|
||||
return leftAppId;
|
||||
}
|
||||
|
||||
public void setLeftAppId(String leftAppId) {
|
||||
this.leftAppId = leftAppId;
|
||||
}
|
||||
|
||||
public String getLeftAppCode() {
|
||||
return leftAppCode;
|
||||
}
|
||||
|
||||
public void setLeftAppCode(String leftAppCode) {
|
||||
this.leftAppCode = leftAppCode;
|
||||
}
|
||||
|
||||
public String getLeftAppName() {
|
||||
return leftAppName;
|
||||
}
|
||||
|
||||
public void setLeftAppName(String leftAppName) {
|
||||
this.leftAppName = leftAppName;
|
||||
}
|
||||
|
||||
public String getLeftApiId() {
|
||||
return leftApiId;
|
||||
}
|
||||
|
||||
public void setLeftApiId(String leftApiId) {
|
||||
this.leftApiId = leftApiId;
|
||||
}
|
||||
|
||||
public String getLeftId() {
|
||||
return leftId;
|
||||
}
|
||||
|
||||
public void setLeftId(String leftId) {
|
||||
this.leftId = leftId;
|
||||
}
|
||||
|
||||
public String getLeftName() {
|
||||
return leftName;
|
||||
}
|
||||
|
||||
public void setLeftName(String leftName) {
|
||||
this.leftName = leftName;
|
||||
}
|
||||
|
||||
public String getRightAppId() {
|
||||
return rightAppId;
|
||||
}
|
||||
|
||||
public void setRightAppId(String rightAppId) {
|
||||
this.rightAppId = rightAppId;
|
||||
}
|
||||
|
||||
public String getRightAppCode() {
|
||||
return rightAppCode;
|
||||
}
|
||||
|
||||
public void setRightAppCode(String rightAppCode) {
|
||||
this.rightAppCode = rightAppCode;
|
||||
}
|
||||
|
||||
public String getRightAppName() {
|
||||
return rightAppName;
|
||||
}
|
||||
|
||||
public void setRightAppName(String rightAppName) {
|
||||
this.rightAppName = rightAppName;
|
||||
}
|
||||
|
||||
public String getRightApiId() {
|
||||
return rightApiId;
|
||||
}
|
||||
|
||||
public void setRightApiId(String rightApiId) {
|
||||
this.rightApiId = rightApiId;
|
||||
}
|
||||
|
||||
public String getRightId() {
|
||||
return rightId;
|
||||
}
|
||||
|
||||
public void setRightId(String rightId) {
|
||||
this.rightId = rightId;
|
||||
}
|
||||
|
||||
public String getRightName() {
|
||||
return rightName;
|
||||
}
|
||||
|
||||
public void setRightName(String rightName) {
|
||||
this.rightName = rightName;
|
||||
}
|
||||
|
||||
public String getLeftOrg() {
|
||||
return leftOrg;
|
||||
}
|
||||
|
||||
public void setLeftOrg(String leftOrg) {
|
||||
this.leftOrg = leftOrg;
|
||||
}
|
||||
|
||||
public String getRightOrg() {
|
||||
return rightOrg;
|
||||
}
|
||||
|
||||
public void setRightOrg(String rightOrg) {
|
||||
this.rightOrg = rightOrg;
|
||||
}
|
||||
|
||||
public void setCreate() {
|
||||
this.setId(UUIDUtils.getUUID());
|
||||
this.setSts("Y");
|
||||
this.setCreate_user_id("1");
|
||||
this.setModify_user_id("1");
|
||||
this.setCreate_time(new Date());
|
||||
this.setModify_time(new Date());
|
||||
this.setOrg_id("0");
|
||||
this.setCompanyId("0");
|
||||
}
|
||||
//修改信息
|
||||
public void setUpdate() {
|
||||
this.setModify_user_id("1");
|
||||
this.setModify_time(new Date());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
<?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.bip.v3.v2207.dao.impl.BipArchivesDaoImpl">
|
||||
<resultMap id="get-ArchivesEntity-result" type="com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity" >
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="leftAppId" column="left_app_id" jdbcType="VARCHAR"/>
|
||||
<result property="leftAppCode" column="left_app_code" jdbcType="VARCHAR"/>
|
||||
<result property="leftAppName" column="left_app_name" jdbcType="VARCHAR"/>
|
||||
<result property="leftApiId" column="left_api_id" jdbcType="VARCHAR"/>
|
||||
<result property="leftId" column="left_id" jdbcType="VARCHAR"/>
|
||||
<result property="leftCode" column="left_code" jdbcType="VARCHAR"/>
|
||||
<result property="leftName" column="left_name" jdbcType="VARCHAR"/>
|
||||
<result property="rightAppId" column="right_app_id" jdbcType="VARCHAR"/>
|
||||
<result property="rightAppCode" column="right_app_code" jdbcType="VARCHAR"/>
|
||||
<result property="rightAppName" column="right_app_name" jdbcType="VARCHAR"/>
|
||||
<result property="rightApiId" column="right_api_id" jdbcType="VARCHAR"/>
|
||||
<result property="rightId" column="right_id" jdbcType="VARCHAR"/>
|
||||
<result property="rightCode" column="right_code" jdbcType="VARCHAR"/>
|
||||
<result property="rightName" column="right_name" 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"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="queryArchivesData" resultMap="get-ArchivesEntity-result"
|
||||
parameterType="com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity">
|
||||
select
|
||||
right_code
|
||||
from
|
||||
<choose>
|
||||
<when test="archivesType == '1'.toString()"> sys_personnel_control </when>
|
||||
<when test="archivesType == '2'.toString()"> sys_org_control </when>
|
||||
<when test="archivesType == '6'.toString()"> sys_stock_control </when>
|
||||
<when test="archivesType == '73'.toString()"> sys_merchant_control </when>
|
||||
<when test="archivesType == 'D01'.toString()"> sys_taxrate_control </when>
|
||||
<when test="archivesType == 'jobass'.toString()"> sys_project_control </when>
|
||||
<when test="archivesType == '93'.toString()"> sys_bank_control </when>
|
||||
<when test="archivesType == '96'.toString()"> sys_bankaccount_control </when>
|
||||
<when test="archivesType == '22'.toString()"> sys_assets_control </when>
|
||||
</choose>
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="leftCode != null and leftCode != ''">and left_code = #{leftCode}</if>
|
||||
<if test="leftOrg != null and leftOrg != ''">and left_org = #{leftOrg}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="queryArchivesDatays" resultMap="get-ArchivesEntity-result"
|
||||
parameterType="com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity">
|
||||
select
|
||||
right_code
|
||||
from
|
||||
<choose>
|
||||
<when test="archivesType == '0012'.toString()"> sys_stock_control </when>
|
||||
<when test="archivesType == '0006'.toString()"> sys_stock_control </when>
|
||||
<when test="archivesType == '0004'.toString()"> sys_merchant_control </when>
|
||||
</choose>
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="leftCode != null and leftCode != ''">and left_code = #{leftCode}</if>
|
||||
<if test="leftOrg != null and leftOrg != ''">and left_org = #{leftOrg}</if>
|
||||
and sts='Y'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
|
||||
public class BipAss {
|
||||
private String checktypecode;
|
||||
private String checkvaluecode;
|
||||
|
||||
|
||||
public String getChecktypecode() {
|
||||
return checktypecode;
|
||||
}
|
||||
|
||||
public void setChecktypecode(String checktypecode) {
|
||||
this.checktypecode = checktypecode;
|
||||
}
|
||||
|
||||
public String getCheckvaluecode() {
|
||||
return checkvaluecode;
|
||||
}
|
||||
|
||||
public void setCheckvaluecode(String checkvaluecode) {
|
||||
this.checkvaluecode = checkvaluecode;
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
|
||||
public class BipCashflow {
|
||||
private String money;
|
||||
private String pk_cashflow;
|
||||
|
||||
public String getMoney() {
|
||||
return money;
|
||||
}
|
||||
|
||||
public void setMoney(String money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public String getPk_cashflow() {
|
||||
return pk_cashflow;
|
||||
}
|
||||
|
||||
public void setPk_cashflow(String pk_cashflow) {
|
||||
this.pk_cashflow = pk_cashflow;
|
||||
}
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/****
|
||||
* BIP组织账户
|
||||
* @content:
|
||||
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||
* @date 2023-10-24 10:03
|
||||
* @param
|
||||
* @return
|
||||
**/
|
||||
public class BipOrgsDetailsEntity extends BaseEntity {
|
||||
|
||||
/*开户行编码*/
|
||||
private String bankCode;
|
||||
/*开户行名称*/
|
||||
private String bankName;
|
||||
/*账户*/
|
||||
private String accnum;
|
||||
/*与组织关联的字段*/
|
||||
private String controlorg;
|
||||
/*联行号*/
|
||||
private String cnapsCode;
|
||||
|
||||
public String getCnapsCode() {
|
||||
return cnapsCode;
|
||||
}
|
||||
|
||||
public void setCnapsCode(String cnapsCode) {
|
||||
this.cnapsCode = cnapsCode;
|
||||
}
|
||||
|
||||
public String getControlorg() {
|
||||
return controlorg;
|
||||
}
|
||||
|
||||
public void setControlorg(String controlorg) {
|
||||
this.controlorg = controlorg;
|
||||
}
|
||||
|
||||
public String getBankCode() {
|
||||
return bankCode;
|
||||
}
|
||||
|
||||
public void setBankCode(String bankCode) {
|
||||
this.bankCode = bankCode;
|
||||
}
|
||||
|
||||
public String getBankName() {
|
||||
return bankName;
|
||||
}
|
||||
|
||||
public void setBankName(String bankName) {
|
||||
this.bankName = bankName;
|
||||
}
|
||||
|
||||
public String getAccnum() {
|
||||
return accnum;
|
||||
}
|
||||
|
||||
public void setAccnum(String accnum) {
|
||||
this.accnum = accnum;
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
<?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.bip.v3.v2207.dao.impl.BipOrgsDetailsDaoImpl">
|
||||
<resultMap id="get-BipOrgsDetailsEntity-result" type="com.hzya.frame.bip.v3.v2207.entity.BipOrgsDetailsEntity">
|
||||
<result property="bankCode" column="bankCode" />
|
||||
<result property="bankName" column="bankName" />
|
||||
<result property="accnum" column="accnum" />
|
||||
<result property="controlorg" column="controlorg" />
|
||||
<result property="cnapsCode" column="cnapsCode" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="BipOrgsDetailsEntity_Base_Column_List">
|
||||
bankdoc.code as bankCode,bankdoc.name as bankName,bankaccbas.accnum,bankaccbas.controlorg,bankaccbas.combinenum as cnapsCode
|
||||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-BipOrgsDetailsEntity-result">
|
||||
select
|
||||
<include refid="BipOrgsDetailsEntity_Base_Column_List" />
|
||||
from bd_bankaccbas where pk_bankaccbas = #{pk_bankaccbas}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="thirdInterfaceGetOrgsDetails" resultMap="get-BipOrgsDetailsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipOrgsDetailsEntity">
|
||||
select
|
||||
<include refid="BipOrgsDetailsEntity_Base_Column_List" />
|
||||
from bd_bankaccbas bankaccbas
|
||||
left join bd_bankdoc bankdoc on bankdoc.pk_bankdoc=bankaccbas.pk_bankdoc
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="bankCode != null and bankCode !=''">bankdoc.code=#{bankCode}</if>
|
||||
<if test="bankName != null and bankName !='' "> and bankdoc.name = #{bankName}</if>
|
||||
<if test="accnum != null and accnum !='' "> and bankaccbas.accnum = #{accnum}</if>
|
||||
and bankaccbas.dr='0' and bankdoc.dr='0' and bankaccbas.pk_banktype!='0001Z01000000000036S' and bankaccbas.controlorg = #{controlorg}
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* @description: BIP组织 entity
|
||||
* @tableName: org_orgs
|
||||
* @entityName: BipOrgsEntity
|
||||
* @author: gjh
|
||||
* @history: 1.0
|
||||
*/
|
||||
public class BipOrgsEntity extends BaseEntity {
|
||||
/*单位编码*/
|
||||
private String code;
|
||||
/*开户单位*/
|
||||
private String name;
|
||||
/*BIPID*/
|
||||
private String tripartiteId;
|
||||
private String pk_financeorg;
|
||||
private String orgsts;
|
||||
|
||||
public String getOrgsts() {
|
||||
return orgsts;
|
||||
}
|
||||
|
||||
public void setOrgsts(String orgsts) {
|
||||
this.orgsts = orgsts;
|
||||
}
|
||||
|
||||
public String getPk_financeorg() {
|
||||
return pk_financeorg;
|
||||
}
|
||||
|
||||
public void setPk_financeorg(String pk_financeorg) {
|
||||
this.pk_financeorg = pk_financeorg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getTripartiteId() {
|
||||
return tripartiteId;
|
||||
}
|
||||
|
||||
public void setTripartiteId(String tripartiteId) {
|
||||
this.tripartiteId = tripartiteId;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
<?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.bip.v3.v2207.dao.impl.BipOrgsDaoImpl">
|
||||
<resultMap id="get-BipOrgsEntity-result" type="com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity">
|
||||
<result property="tripartiteId" column="tripartiteId" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="pk_financeorg" column="pk_financeorg"/>
|
||||
<result property="orgsts" column="orgsts"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="BipOrgsEntity_Base_Column_List">
|
||||
orgs.pk_financeorg as tripartiteId,
|
||||
orgs.name ,
|
||||
orgs.code,
|
||||
max(org_bank.ts)as ts
|
||||
|
||||
</sql>
|
||||
|
||||
<sql id="BipOrgsEntity_Base_Column_List_details">
|
||||
bankdoc.code as bankCode,bankdoc.name as bankName,bankaccbas.accnum,bankaccbas.controlorg
|
||||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-BipOrgsEntity-result">
|
||||
select
|
||||
<include refid="BipOrgsEntity_Base_Column_List" />
|
||||
from org_financeorg where pk_financeorg = #{pk_financeorg}
|
||||
</select>
|
||||
|
||||
<select id="thirdInterfaceGetOrgs" resultMap="get-BipOrgsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity">
|
||||
select
|
||||
<include refid="BipOrgsEntity_Base_Column_List" />
|
||||
FROM
|
||||
org_financeorg orgs
|
||||
left join v_hzya_org_bank org_bank on org_bank.controlorg = orgs.pk_financeorg
|
||||
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''"> orgs.code = #{code}</if>
|
||||
<if test="name != null and name !='' "> and orgs.name = #{name}</if>
|
||||
<if test="pk_financeorg != null and pk_financeorg !='' "> and orgs.pk_financeorg = #{tripartiteId}</if>
|
||||
<if test="orgsts != null and orgsts !='' "> and orgs.ts >'2023-09-30 14:18:39' and orgs.ts > #{orgsts}</if>
|
||||
and orgs.dr='0'
|
||||
</trim>
|
||||
GROUP BY orgs.pk_financeorg ,orgs.name,orgs.code
|
||||
</select>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="thirdInterfaceGetSupplierDetails" resultMap="get-BipOrgsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity">
|
||||
select
|
||||
<include refid="BipOrgsEntity_Base_Column_List_details" />
|
||||
from bd_bankaccbas bankaccbas
|
||||
left join bd_bankdoc bankdoc on bankdoc.pk_bankdoc=bankaccbas.pk_bankdoc
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">bankdoc.code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and bankdoc.name = #{name}</if>
|
||||
<if test="accnum != null and accnum !='' "> and bankaccbas.accnum = #{accnum}</if>
|
||||
<if test="controlorg != null and controlorg !='' "> and bankaccbas.controlorg = #{controlorg}</if>
|
||||
and bankaccbas.dr='0' and bankdoc.dr='0' and bankaccbas.pk_banktype!='0001Z01000000000036S'
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<!--<select id="BipOrgsEntity_list_base" resultMap="get-BipOrgsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity">
|
||||
select
|
||||
<include refid="BipOrgsEntity_Base_Column_List" />
|
||||
FROM bd_cust_supplier supplier
|
||||
left join db_customerbank bank ON supplier.code = bank.code
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">supplier.code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and supplier.name = #{name}</if>
|
||||
<if test="taxpayerid != null and taxpayerid !='' "> and supplier.taxpayerid = #{taxpayerid}</if>
|
||||
<if test="def1 != null and def1 !='' "> and bank.def1 = #{def1}</if>
|
||||
<if test="def2 != null and def2 !='' "> and bank.def2 = #{def2}</if>
|
||||
<if test="def3 != null and def3 !='' "> and bank.def3 = #{def3}</if>
|
||||
</trim>
|
||||
</select>-->
|
||||
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<!--<select id="entity_list_like" resultMap="get-BipOrgsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity">
|
||||
select
|
||||
<include refid="BipOrgsEntity_Base_Column_List" />
|
||||
FROM bd_cust_supplier supplier
|
||||
left join db_customerbank bank ON supplier.code = bank.code
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''"> supplier.code like concat('%',#{code},'%')</if>
|
||||
<if test="name != null and name !='' "> and supplier.name like concat('%',#{name},'%')</if>
|
||||
<if test="taxpayerid != null and taxpayerid !='' "> and supplier.taxpayeridlike concat('%',#{taxpayeridlike},'%')</if>
|
||||
<if test="def1 != null and def1 !='' "> and bank.def1 like concat('%',#{def1},'%')</if>
|
||||
<if test="def2 != null and def2 !='' "> and bank.def2 like concat('%',#{def2},'%')</if>
|
||||
<if test="def3 != null and def3 !='' "> and bank.def3 like concat('%',#{def3},'%')</if>
|
||||
</trim>
|
||||
</select>-->
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
public class BipSupplierDetailsEntity extends BaseEntity {
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
/*开户行*/
|
||||
private String splitbank;
|
||||
/*银行账号*/
|
||||
private String bankaccno;
|
||||
/*是否默认*/
|
||||
private String isdefault;
|
||||
/*联行号*/
|
||||
private String combinno;
|
||||
|
||||
private String tripartiteId;
|
||||
|
||||
public String getCombinno() {
|
||||
return combinno;
|
||||
}
|
||||
|
||||
public void setCombinno(String combinno) {
|
||||
this.combinno = combinno;
|
||||
}
|
||||
|
||||
public String getTripartiteId() {
|
||||
return tripartiteId;
|
||||
}
|
||||
|
||||
public void setTripartiteId(String tripartiteId) {
|
||||
this.tripartiteId = tripartiteId;
|
||||
}
|
||||
|
||||
public String getIsdefault() {
|
||||
return isdefault;
|
||||
}
|
||||
|
||||
public void setIsdefault(String isdefault) {
|
||||
this.isdefault = isdefault;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getSplitbank() {
|
||||
return splitbank;
|
||||
}
|
||||
|
||||
public void setSplitbank(String splitbank) {
|
||||
this.splitbank = splitbank;
|
||||
}
|
||||
|
||||
public String getBankaccno() {
|
||||
return bankaccno;
|
||||
}
|
||||
|
||||
public void setBankaccno(String bankaccno) {
|
||||
this.bankaccno = bankaccno;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
<?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.bip.v3.v2207.dao.impl.BipSupplierDetailsDaoImpl">
|
||||
<resultMap id="get-BipSupplierDetailsEntity-result" type="com.hzya.frame.bip.v3.v2207.entity.BipSupplierDetailsEntity">
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="splitbank" column="splitbank" />
|
||||
<result property="bankaccno" column="bankaccno" />
|
||||
<result property="tripartiteId" column="tripartiteId"></result>
|
||||
<result property="combinno" column="combinno"></result>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="BipSupplierDetailsEntity_Base_Column_List">
|
||||
splitbank,bankaccno,combinno,name,code
|
||||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-BipSupplierDetailsEntity-result">
|
||||
select
|
||||
<include refid="BipSupplierDetailsEntity_Base_Column_List" />
|
||||
from BD_SUPPLIER where pk_supplier = #{pk_supplier} and sdr='0'
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="thirdInterfaceGetSupplierDetails" resultMap="get-BipSupplierDetailsEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipSupplierDetailsEntity">
|
||||
select
|
||||
<include refid="BipSupplierDetailsEntity_Base_Column_List" />
|
||||
FROM db_customerbank
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and name = #{name}</if>
|
||||
<if test="bankaccno != null and bankaccno !='' "> and bankaccno = #{bankaccno}</if>
|
||||
<if test="splitbank != null and splitbank !='' "> and splitbank = #{splitbank}</if>
|
||||
<if test="combinno != null and combinno !='' "> and combinno = #{combinno}</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* @description: BIP供应商 entity
|
||||
* @tableName: BD_SUPPLIER
|
||||
* @entityName: BipSupplierEntity
|
||||
* @author: gjh
|
||||
* @history: 1.0
|
||||
*/
|
||||
public class BipSupplierEntity extends BaseEntity {
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
/*税号*/
|
||||
private String taxpayerid;
|
||||
/*地址*/
|
||||
private String def1;
|
||||
/*电话*/
|
||||
private String def2;
|
||||
/*联系人*/
|
||||
private String def3;
|
||||
private String tripartiteId;
|
||||
|
||||
public String getTripartiteId() {
|
||||
return tripartiteId;
|
||||
}
|
||||
|
||||
public void setTripartiteId(String tripartiteId) {
|
||||
this.tripartiteId = tripartiteId;
|
||||
}
|
||||
|
||||
private String ts;
|
||||
|
||||
public String getTs() {
|
||||
return ts;
|
||||
}
|
||||
|
||||
public void setTs(String ts) {
|
||||
this.ts = ts;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getTaxpayerid() {
|
||||
return taxpayerid;
|
||||
}
|
||||
|
||||
public void setTaxpayerid(String taxpayerid) {
|
||||
this.taxpayerid = taxpayerid;
|
||||
}
|
||||
|
||||
public String getDef1() {
|
||||
return def1;
|
||||
}
|
||||
|
||||
public void setDef1(String def1) {
|
||||
this.def1 = def1;
|
||||
}
|
||||
|
||||
public String getDef2() {
|
||||
return def2;
|
||||
}
|
||||
|
||||
public void setDef2(String def2) {
|
||||
this.def2 = def2;
|
||||
}
|
||||
|
||||
public String getDef3() {
|
||||
return def3;
|
||||
}
|
||||
|
||||
public void setDef3(String def3) {
|
||||
this.def3 = def3;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,96 +0,0 @@
|
|||
<?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.bip.v3.v2207.dao.impl.BipSupplierDaoImpl">
|
||||
<resultMap id="get-BipSupplierEntity-result" type="com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity">
|
||||
<result property="taxpayerid" column="taxpayerid" />
|
||||
<result property="def1" column="def1" />
|
||||
<result property="def2" column="def2" />
|
||||
<result property="def3" column="def3" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="ts" column="ts" />
|
||||
<result property="tripartiteId" column="tripartiteId" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="BipSupplierEntity_Base_Column_List">
|
||||
supplier.code,supplier.name,supplier.taxpayerid,bank.def1,bank.def2,bank.def3,supplier.ts, supplier.pk_cust_sup as tripartiteId
|
||||
</sql>
|
||||
|
||||
<sql id="BipSupplierEntity_Base_Column_List_details">
|
||||
splitbank,bankaccno,name,code
|
||||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-BipSupplierEntity-result">
|
||||
select
|
||||
<include refid="BipSupplierEntity_Base_Column_List" />
|
||||
from BD_SUPPLIER where pk_supplier = #{pk_supplier} and sdr='0'
|
||||
</select>
|
||||
|
||||
<select id="thirdInterfaceGetSupplier" resultMap="get-BipSupplierEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity">
|
||||
select
|
||||
<include refid="BipSupplierEntity_Base_Column_List" />
|
||||
FROM bd_cust_supplier supplier
|
||||
left join db_customerbank bank ON supplier.code = bank.code
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">supplier.code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and supplier.name = #{name}</if>
|
||||
<if test="taxpayerid != null and taxpayerid !='' "> and supplier.taxpayerid = #{taxpayerid}</if>
|
||||
<if test="def1 != null and def1 !='' "> and bank.def1 = #{def1}</if>
|
||||
<if test="def2 != null and def2 !='' "> and bank.def2 = #{def2}</if>
|
||||
<if test="def3 != null and def3 !='' "> and bank.def3 = #{def3}</if>
|
||||
<if test="tripartiteId != null and tripartiteId !='' "> and supplier.tripartiteId = #{tripartiteId}</if>
|
||||
<if test="ts != null and ts !='' "> and supplier.ts >'2023-09-30 14:18:39' and supplier.ts > #{ts} </if>
|
||||
</trim>
|
||||
group by supplier.code,supplier.name,supplier.taxpayerid,bank.def1,bank.def2,bank.def3,supplier.ts, supplier.pk_cust_sup
|
||||
</select>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="thirdInterfaceGetSupplierDetails" resultMap="get-BipSupplierEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity">
|
||||
select
|
||||
<include refid="BipSupplierEntity_Base_Column_List_details" />
|
||||
FROM db_customerbank
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and name = #{name}</if>
|
||||
<if test="bankaccno != null and bankaccno !='' "> and bankaccno = #{bankaccno}</if>
|
||||
<if test="splitbank != null and splitbank !='' "> and splitbank = #{splitbank}</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="BipSupplierEntity_list_base" resultMap="get-BipSupplierEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity">
|
||||
select
|
||||
<include refid="BipSupplierEntity_Base_Column_List" />
|
||||
FROM bd_cust_supplier supplier
|
||||
left join db_customerbank bank ON supplier.code = bank.code
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''">supplier.code=#{code}</if>
|
||||
<if test="name != null and name !='' "> and supplier.name = #{name}</if>
|
||||
<if test="taxpayerid != null and taxpayerid !='' "> and supplier.taxpayerid = #{taxpayerid}</if>
|
||||
<if test="def1 != null and def1 !='' "> and bank.def1 = #{def1}</if>
|
||||
<if test="def2 != null and def2 !='' "> and bank.def2 = #{def2}</if>
|
||||
<if test="def3 != null and def3 !='' "> and bank.def3 = #{def3}</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 分页查询列表 采用like格式 -->
|
||||
<select id="entity_list_like" resultMap="get-BipSupplierEntity-result" parameterType="com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity">
|
||||
select
|
||||
<include refid="BipSupplierEntity_Base_Column_List" />
|
||||
FROM bd_cust_supplier supplier
|
||||
left join db_customerbank bank ON supplier.code = bank.code
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="code != null and code !=''"> supplier.code like concat('%',#{code},'%')</if>
|
||||
<if test="name != null and name !='' "> and supplier.name like concat('%',#{name},'%')</if>
|
||||
<if test="taxpayerid != null and taxpayerid !='' "> and supplier.taxpayeridlike concat('%',#{taxpayeridlike},'%')</if>
|
||||
<if test="def1 != null and def1 !='' "> and bank.def1 like concat('%',#{def1},'%')</if>
|
||||
<if test="def2 != null and def2 !='' "> and bank.def2 like concat('%',#{def2},'%')</if>
|
||||
<if test="def3 != null and def3 !='' "> and bank.def3 like concat('%',#{def3},'%')</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import com.hzya.frame.web.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* com.hzya.frame.bip.v3.v2207.entity
|
||||
*
|
||||
* @author makejava
|
||||
* @date 2024-05 -27 11:24
|
||||
*/
|
||||
|
||||
public class BipTokenVo extends BaseEntity {
|
||||
}
|
|
@ -1,150 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BipVoucher {
|
||||
private List<BipVoucherDetails> details;
|
||||
private List<BipVoucherDetails> detail;
|
||||
private String no;
|
||||
private String pk_corp;
|
||||
private String pk_glorgbook;
|
||||
private String pk_prepared;
|
||||
private String pk_vouchertype;
|
||||
private String pk_voucher;
|
||||
private String period;
|
||||
private String vouchertype;
|
||||
private String attachment;
|
||||
private String year;
|
||||
private String prepared;
|
||||
private String prepareddate;
|
||||
private String num;
|
||||
private String accbookCode;
|
||||
|
||||
public List<BipVoucherDetails> getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void setDetails(List<BipVoucherDetails> details) {
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
public String getNo() {
|
||||
return no;
|
||||
}
|
||||
|
||||
public void setNo(String no) {
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public String getPk_corp() {
|
||||
return pk_corp;
|
||||
}
|
||||
|
||||
public void setPk_corp(String pk_corp) {
|
||||
this.pk_corp = pk_corp;
|
||||
}
|
||||
|
||||
public String getPk_glorgbook() {
|
||||
return pk_glorgbook;
|
||||
}
|
||||
|
||||
public void setPk_glorgbook(String pk_glorgbook) {
|
||||
this.pk_glorgbook = pk_glorgbook;
|
||||
}
|
||||
|
||||
public String getPk_prepared() {
|
||||
return pk_prepared;
|
||||
}
|
||||
|
||||
public void setPk_prepared(String pk_prepared) {
|
||||
this.pk_prepared = pk_prepared;
|
||||
}
|
||||
|
||||
public String getPk_vouchertype() {
|
||||
return pk_vouchertype;
|
||||
}
|
||||
|
||||
public void setPk_vouchertype(String pk_vouchertype) {
|
||||
this.pk_vouchertype = pk_vouchertype;
|
||||
}
|
||||
|
||||
public String getPk_voucher() {
|
||||
return pk_voucher;
|
||||
}
|
||||
|
||||
public void setPk_voucher(String pk_voucher) {
|
||||
this.pk_voucher = pk_voucher;
|
||||
}
|
||||
|
||||
public List<BipVoucherDetails> getDetail() {
|
||||
return detail;
|
||||
}
|
||||
|
||||
public void setDetail(List<BipVoucherDetails> detail) {
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
public String getPeriod() {
|
||||
return period;
|
||||
}
|
||||
|
||||
public void setPeriod(String period) {
|
||||
this.period = period;
|
||||
}
|
||||
|
||||
public String getVouchertype() {
|
||||
return vouchertype;
|
||||
}
|
||||
|
||||
public void setVouchertype(String vouchertype) {
|
||||
this.vouchertype = vouchertype;
|
||||
}
|
||||
|
||||
public String getAttachment() {
|
||||
return attachment;
|
||||
}
|
||||
|
||||
public void setAttachment(String attachment) {
|
||||
this.attachment = attachment;
|
||||
}
|
||||
|
||||
public String getYear() {
|
||||
return year;
|
||||
}
|
||||
|
||||
public void setYear(String year) {
|
||||
this.year = year;
|
||||
}
|
||||
|
||||
public String getPrepared() {
|
||||
return prepared;
|
||||
}
|
||||
|
||||
public void setPrepared(String prepared) {
|
||||
this.prepared = prepared;
|
||||
}
|
||||
|
||||
public String getPrepareddate() {
|
||||
return prepareddate;
|
||||
}
|
||||
|
||||
public void setPrepareddate(String prepareddate) {
|
||||
this.prepareddate = prepareddate;
|
||||
}
|
||||
|
||||
public String getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(String num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public String getAccbookCode() {
|
||||
return accbookCode;
|
||||
}
|
||||
|
||||
public void setAccbookCode(String accbookCode) {
|
||||
this.accbookCode = accbookCode;
|
||||
}
|
||||
}
|
|
@ -1,186 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BipVoucherDetails {
|
||||
private List<BipAss> ass;
|
||||
private List<BipCashflow> cashflow;
|
||||
private String creditamount;
|
||||
private String debitamount;
|
||||
private String explanation;
|
||||
private String localcreditamount;
|
||||
private String localdebitamount;
|
||||
private String pk_accsubj;
|
||||
private String pk_currtype;
|
||||
private String debitquantity;
|
||||
private String price;
|
||||
private String accountCode;
|
||||
private String amount;
|
||||
private String globalcreditamount;
|
||||
private String globaldebitamount;
|
||||
private String groupdebitamount;
|
||||
private String currtypeCode;
|
||||
private String busidate;
|
||||
private String groupcreditamount;
|
||||
private String detailindex;
|
||||
|
||||
public List<BipAss> getAss() {
|
||||
return ass;
|
||||
}
|
||||
|
||||
public void setAss(List<BipAss> ass) {
|
||||
this.ass = ass;
|
||||
}
|
||||
|
||||
public List<BipCashflow> getCashflow() {
|
||||
return cashflow;
|
||||
}
|
||||
|
||||
public void setCashflow(List<BipCashflow> cashflow) {
|
||||
this.cashflow = cashflow;
|
||||
}
|
||||
|
||||
public String getCreditamount() {
|
||||
return creditamount;
|
||||
}
|
||||
|
||||
public void setCreditamount(String creditamount) {
|
||||
this.creditamount = creditamount;
|
||||
}
|
||||
|
||||
public String getDebitamount() {
|
||||
return debitamount;
|
||||
}
|
||||
|
||||
public void setDebitamount(String debitamount) {
|
||||
this.debitamount = debitamount;
|
||||
}
|
||||
|
||||
public String getExplanation() {
|
||||
return explanation;
|
||||
}
|
||||
|
||||
public void setExplanation(String explanation) {
|
||||
this.explanation = explanation;
|
||||
}
|
||||
|
||||
public String getLocalcreditamount() {
|
||||
return localcreditamount;
|
||||
}
|
||||
|
||||
public void setLocalcreditamount(String localcreditamount) {
|
||||
this.localcreditamount = localcreditamount;
|
||||
}
|
||||
|
||||
public String getLocaldebitamount() {
|
||||
return localdebitamount;
|
||||
}
|
||||
|
||||
public void setLocaldebitamount(String localdebitamount) {
|
||||
this.localdebitamount = localdebitamount;
|
||||
}
|
||||
|
||||
public String getPk_accsubj() {
|
||||
return pk_accsubj;
|
||||
}
|
||||
|
||||
public void setPk_accsubj(String pk_accsubj) {
|
||||
this.pk_accsubj = pk_accsubj;
|
||||
}
|
||||
|
||||
public String getPk_currtype() {
|
||||
return pk_currtype;
|
||||
}
|
||||
|
||||
public void setPk_currtype(String pk_currtype) {
|
||||
this.pk_currtype = pk_currtype;
|
||||
}
|
||||
|
||||
public String getDebitquantity() {
|
||||
return debitquantity;
|
||||
}
|
||||
|
||||
public void setDebitquantity(String debitquantity) {
|
||||
this.debitquantity = debitquantity;
|
||||
}
|
||||
|
||||
public String getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(String price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getAccountCode() {
|
||||
return accountCode;
|
||||
}
|
||||
|
||||
public void setAccountCode(String accountCode) {
|
||||
this.accountCode = accountCode;
|
||||
}
|
||||
|
||||
public String getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(String amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public String getGlobalcreditamount() {
|
||||
return globalcreditamount;
|
||||
}
|
||||
|
||||
public void setGlobalcreditamount(String globalcreditamount) {
|
||||
this.globalcreditamount = globalcreditamount;
|
||||
}
|
||||
|
||||
public String getGlobaldebitamount() {
|
||||
return globaldebitamount;
|
||||
}
|
||||
|
||||
public void setGlobaldebitamount(String globaldebitamount) {
|
||||
this.globaldebitamount = globaldebitamount;
|
||||
}
|
||||
|
||||
public String getGroupdebitamount() {
|
||||
return groupdebitamount;
|
||||
}
|
||||
|
||||
public void setGroupdebitamount(String groupdebitamount) {
|
||||
this.groupdebitamount = groupdebitamount;
|
||||
}
|
||||
|
||||
public String getCurrtypeCode() {
|
||||
return currtypeCode;
|
||||
}
|
||||
|
||||
public void setCurrtypeCode(String currtypeCode) {
|
||||
this.currtypeCode = currtypeCode;
|
||||
}
|
||||
|
||||
public String getBusidate() {
|
||||
return busidate;
|
||||
}
|
||||
|
||||
public void setBusidate(String busidate) {
|
||||
this.busidate = busidate;
|
||||
}
|
||||
|
||||
public String getGroupcreditamount() {
|
||||
return groupcreditamount;
|
||||
}
|
||||
|
||||
public void setGroupcreditamount(String groupcreditamount) {
|
||||
this.groupcreditamount = groupcreditamount;
|
||||
}
|
||||
|
||||
public String getDetailindex() {
|
||||
return detailindex;
|
||||
}
|
||||
|
||||
public void setDetailindex(String detailindex) {
|
||||
this.detailindex = detailindex;
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service;
|
||||
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
|
||||
public interface IBipPzService extends IBaseService<BipTokenVo,String>{
|
||||
|
||||
|
||||
SysExtensionApiEntity getPz(SysExtensionApiEntity entity);
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service;
|
||||
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public interface IBipSsoService extends IBaseService<BipTokenVo,String>{
|
||||
/**
|
||||
*
|
||||
* @content Bip单点统一认证接口
|
||||
* @author laborer
|
||||
* @date 2024/5/30 0030 13:45
|
||||
*
|
||||
*/
|
||||
|
||||
String erpSso(HttpServletRequest request, String ticket)throws Exception;
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取sso动态加密,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
SysExtensionApiEntity ssoEncrypt(SysExtensionApiEntity entity);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service;
|
||||
|
||||
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
|
||||
public interface IBipV32207BillService extends IBaseService<BipTokenVo,String>{
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取BIPtoken,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
|
||||
SysExtensionApiEntity getBipBill(SysExtensionApiEntity entity);
|
||||
SysExtensionApiEntity getBipBillYs(SysExtensionApiEntity entity);
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface IBipV32207Service extends IBaseService<BipSupplierEntity,String>{
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 获取token
|
||||
**/
|
||||
JsonResultEntity thirdInterfaceGetToken(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 获取供应商
|
||||
**/
|
||||
@DS("oracle91")
|
||||
JsonResultEntity thirdInterfaceGetSupplier(JSONObject jsonObject);
|
||||
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 新增供应商
|
||||
**/
|
||||
JsonResultEntity thirdInterfaceSaveSupplier(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* 供应商传递OA
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
JsonResultEntity thirdInterfaceSendOa(JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* 获取BIP组织数据
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
JsonResultEntity thirdInterfaceGetOrgs(JSONObject jsonObject);
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.basedao.service.IBaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
|
||||
public interface IBipV32207TokenService extends IBaseService<BipTokenVo,String>{
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取BIPtoken,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
|
||||
SysExtensionApiEntity getBipToken(SysExtensionApiEntity entity);
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipArchivesDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipAss;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipVoucher;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipVoucherDetails;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipPzService;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import jdk.nashorn.internal.ir.annotations.Reference;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service(value = "bipPzService")
|
||||
public class BipPzServiceImpl extends BaseService<BipTokenVo, String> implements IBipPzService {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@Resource
|
||||
private IBipArchivesDao bipArchivesDao;
|
||||
/**
|
||||
* @param entity
|
||||
* @return com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity
|
||||
* @Author lvleigang
|
||||
* @Description 组装凭证数据
|
||||
* @Date 10:52 上午 2024/11/5
|
||||
**/
|
||||
@Override
|
||||
public SysExtensionApiEntity getPz(SysExtensionApiEntity entity) {
|
||||
String bodys = entity.getBodys();
|
||||
BipVoucher voucher = JSONObject.parseObject(bodys, BipVoucher.class);
|
||||
List<String> fzhs = Arrays.asList(new String[]{"1", "2", "6", "73", "D01", "jobass", "93", "96", "22"});
|
||||
if (voucher.getDetails() != null && voucher.getDetails().size() > 0) {
|
||||
for (int a = 0; a < voucher.getDetails().size(); a++) {
|
||||
BipVoucherDetails voucherDetails = voucher.getDetails().get(a);
|
||||
if (voucherDetails.getAss() != null && voucherDetails.getAss().size() > 0) {
|
||||
for (int b = 0; b < voucherDetails.getAss().size(); b++) {
|
||||
BipAss ass = voucherDetails.getAss().get(b);
|
||||
if (ass.getChecktypecode() != null && !"".equals(ass.getChecktypecode())) {
|
||||
//存在需要转换的
|
||||
if (fzhs.contains(ass.getChecktypecode())) {
|
||||
BipArchivesEntity archivesEntity = new BipArchivesEntity();
|
||||
archivesEntity.setArchivesType(ass.getChecktypecode());
|
||||
archivesEntity.setLeftCode(ass.getCheckvaluecode());
|
||||
archivesEntity.setLeftOrg(voucher.getPk_corp());
|
||||
|
||||
List<BipArchivesEntity> archivesEntities = bipArchivesDao.queryArchivesData(archivesEntity);
|
||||
if (archivesEntities != null && archivesEntities.size() > 0) {
|
||||
ass.setCheckvaluecode(archivesEntities.get(0).getRightCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bodys = JSON.toJSONString(voucher);
|
||||
entity.setBodys(bodys);
|
||||
return entity;
|
||||
}
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpException;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipSsoService;
|
||||
import com.hzya.frame.iputil.IPUtil;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import nccloud.security.impl.SignatureTookKit;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Service(value = "BipSsoServiceImpl")
|
||||
public class BipSsoServiceImpl extends BaseService<BipTokenVo, String> implements IBipSsoService {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
private final String BASEURL = "http://192.168.2.237:8099/seeyon/thirdpartyController.do?ticket=";
|
||||
private final String ESBURL = "http://127.0.0.1:9081/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
/**
|
||||
*
|
||||
* @content Bip单点统一认证接口
|
||||
* @author laborer
|
||||
* @date 2024/5/30 0030 13:45
|
||||
*
|
||||
*/
|
||||
|
||||
@Override
|
||||
public String erpSso(HttpServletRequest request,String userCode)throws Exception {
|
||||
logger.info("当前IP地址为"+ JSON.toJSONString(IPUtil.getIpAddress(request)));
|
||||
String result = "";
|
||||
boolean flag = true;
|
||||
// logger.info("接收到致远OA认证参数的ticket:{}",ticket);
|
||||
//通过ticket获取OA用户信息
|
||||
// String userCode = HttpUtil.get(BASEURL+ticket);
|
||||
logger.info("获取到的OA用户信息:{}",userCode);
|
||||
String dsname = "ycjf";
|
||||
String client_id = "OAREST";//第三方系统id
|
||||
StringBuffer sb = new StringBuffer();
|
||||
if(StrUtil.isNotEmpty(userCode)){
|
||||
try {
|
||||
logger.info("开始加密");
|
||||
String security = genKey(userCode,userCode + (System.currentTimeMillis() + "").substring(0, 6));
|
||||
logger.info("加密结束:{}",security);
|
||||
sb.append("type=type_security&dsname="+dsname+"&usercode="+userCode+"&client_id="+client_id+"&security="+security);
|
||||
String baseUrl = "http://10.75.51.78:8899/service/genThirdPartyAccessToken?"+sb.toString();
|
||||
logger.info("请求BIPtokenbaseUrl:{}",baseUrl);
|
||||
result = HttpRequest.post(baseUrl)
|
||||
.header("Content-Type", "application/x-www-form-urlencoded")//头信息,多个头信息多次调用此方法即可
|
||||
.header("Content-Length", "10000")//头信息,多个头信息多次调用此方法即可
|
||||
.header("userid", "admin")//头信息,多个头信息多次调用此方法即可
|
||||
.body("{}")//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
logger.info("获取到的BIPtoken信息:{}",result);
|
||||
} catch (HttpException e) {
|
||||
flag=false;
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if(flag){
|
||||
String indexUR = "http://10.75.51.78:8899/nccloud/resources/uap/rbac/thirdpartylogin/main/index.html?accesstoken="+result+"&redirect_uri=http://10.75.51.78:8899/nccloud/resources/workbench/public/common/main/index.html#";
|
||||
logger.info(indexUR);
|
||||
return indexUR;
|
||||
}else{
|
||||
return "http://10.75.51.78:8899/nccloud/resources/uap/rbac/login/main/index.html";
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取sso动态加密,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
|
||||
@Override
|
||||
public SysExtensionApiEntity ssoEncrypt(SysExtensionApiEntity entity) {
|
||||
try {
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
String userCode = headers.get("usercode");//用户编码
|
||||
String dsname = headers.get("dsname");//数据源
|
||||
String client_id = headers.get("client_id");//第三方系统id
|
||||
StringBuffer sb = new StringBuffer();
|
||||
String security = genKey(userCode,userCode + (System.currentTimeMillis() + "").substring(0, 6));
|
||||
StringBuffer querys = new StringBuffer();
|
||||
querys.append("type=type_security");
|
||||
querys.append("&dsname="+dsname);
|
||||
querys.append("&usercode="+userCode);
|
||||
querys.append("&client_id="+client_id);
|
||||
querys.append("&security="+security);
|
||||
entity.setQuerys(querys.toString());
|
||||
headers.put("Content-Type", "application/x-www-form-urlencoded");
|
||||
headers.put("userid", "admin");
|
||||
entity.setHeaders(headers);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
/**获取NCC的key*/
|
||||
private static String genKey(String userid, String key) throws Exception {
|
||||
return new Base64().encodeToString(SignatureTookKit.digestSign(userid.getBytes(), key.getBytes()));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,134 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipArchivesDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipArchivesEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipAss;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipTokenVo;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipVoucher;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipVoucherDetails;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207BillService;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207TokenService;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.util.bipV3.Encryption;
|
||||
import com.hzya.frame.util.bipV3.SHA256Util;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Service(value = "BipV32207BillServiceImpl")
|
||||
public class BipV32207BillServiceImpl extends BaseService<BipTokenVo, String> implements IBipV32207BillService {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
@Resource
|
||||
private IBipArchivesDao bipArchivesDao;
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取拼接单据动态加密,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
|
||||
@Override
|
||||
public SysExtensionApiEntity getBipBill(SysExtensionApiEntity entity) {
|
||||
try {
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
String client_id = headers.get("client_id");
|
||||
//token信息
|
||||
String access_token = headers.get("access_token");
|
||||
//公钥
|
||||
String pubKey = headers.get("pubKey");
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(client_id);
|
||||
String parm = entity.getBodys();
|
||||
if (StringUtils.isNotBlank(parm)) {
|
||||
sb.append(parm);
|
||||
}
|
||||
sb.append(pubKey);
|
||||
// 签名
|
||||
String sign = SHA256Util.getSHA256(sb.toString(), pubKey);
|
||||
StringBuffer querys = new StringBuffer();
|
||||
querys.append("access_token="+access_token);
|
||||
querys.append("&signature="+sign);
|
||||
querys.append("&client_id="+client_id);
|
||||
entity.setQuerys(querys.toString());
|
||||
headers.put("signature",sign);
|
||||
// headers.put("content-type","application/x-www-form-urlencoded");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
@Override
|
||||
public SysExtensionApiEntity getBipBillYs(SysExtensionApiEntity entity) {
|
||||
try {
|
||||
String bodys = entity.getBodys();
|
||||
BipVoucher voucher = JSONObject.parseObject(bodys, BipVoucher.class);
|
||||
List<String> fzhs = Arrays.asList(new String[]{"0012", "0006", "0004"});
|
||||
if (voucher.getDetail() != null && voucher.getDetail().size() > 0) {
|
||||
for (int a = 0; a < voucher.getDetail().size(); a++) {
|
||||
BipVoucherDetails voucherDetails = voucher.getDetail().get(a);
|
||||
if (voucherDetails.getAss() != null && voucherDetails.getAss().size() > 0) {
|
||||
for (int b = 0; b < voucherDetails.getAss().size(); b++) {
|
||||
BipAss ass = voucherDetails.getAss().get(b);
|
||||
if (ass.getChecktypecode() != null && !"".equals(ass.getChecktypecode())) {
|
||||
//存在需要转换的
|
||||
if (fzhs.contains(ass.getChecktypecode())) {
|
||||
BipArchivesEntity archivesEntity = new BipArchivesEntity();
|
||||
archivesEntity.setArchivesType(ass.getChecktypecode());
|
||||
archivesEntity.setLeftCode(ass.getCheckvaluecode());
|
||||
archivesEntity.setLeftOrg(voucher.getPk_corp());
|
||||
|
||||
List<BipArchivesEntity> archivesEntities = bipArchivesDao.queryArchivesDatays(archivesEntity);
|
||||
if (archivesEntities != null && archivesEntities.size() > 0) {
|
||||
ass.setCheckvaluecode(archivesEntities.get(0).getRightCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bodys = JSON.toJSONString(voucher);
|
||||
entity.setBodys(bodys);
|
||||
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
String client_id = headers.get("client_id");
|
||||
//token信息
|
||||
String access_token = headers.get("access_token");
|
||||
//公钥
|
||||
String pubKey = headers.get("pubKey");
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(client_id);
|
||||
String parm = entity.getBodys();
|
||||
if (StringUtils.isNotBlank(parm)) {
|
||||
sb.append(parm);
|
||||
}
|
||||
sb.append(pubKey);
|
||||
// 签名
|
||||
String sign = SHA256Util.getSHA256(sb.toString(), pubKey);
|
||||
StringBuffer querys = new StringBuffer();
|
||||
querys.append("access_token="+access_token);
|
||||
querys.append("&signature="+sign);
|
||||
querys.append("&client_id="+client_id);
|
||||
entity.setQuerys(querys.toString());
|
||||
headers.put("signature",sign);
|
||||
// headers.put("content-type","application/x-www-form-urlencoded");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
}
|
|
@ -1,480 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.google.gson.Gson;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsDetailsEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipOrgsEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierDetailsEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.BipSupplierEntity;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207Service;
|
||||
import com.hzya.frame.dateutil.DateUtil;
|
||||
import com.hzya.frame.util.PluginUtils;
|
||||
import com.hzya.frame.util.bipV3.Encryption;
|
||||
import com.hzya.frame.util.bipV3.SHA256Util;
|
||||
import com.hzya.frame.util.oldNcc.CompressUtil;
|
||||
import com.hzya.frame.util.oldNcc.Decryption;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@Service(value = "bipV32207Service")
|
||||
public class BipV32207ServiceImpl extends BaseService<BipSupplierEntity, String> implements IBipV32207Service {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
//定义项目开始同步日期
|
||||
private String ts = "2023-09-30 15:47:08";
|
||||
//组织的同步日期
|
||||
private String orgsts = "2023-09-30 15:47:08";
|
||||
@Autowired
|
||||
private IBipSupplierDao bipSupplierDao;
|
||||
|
||||
@Autowired
|
||||
private IBipSupplierDetailsDao bipSupplierDetailsDao;
|
||||
|
||||
@Autowired
|
||||
private IBipOrgsDao bipOrgsDao;
|
||||
|
||||
@Autowired
|
||||
private IBipOrgsDetailsDao bipOrgsDetailsDao;
|
||||
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 获取token
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceGetToken(JSONObject object) {
|
||||
JSONObject jsonObject = getstrObj("jsonStr", object);
|
||||
String client_id = jsonObject.getString("client_id");
|
||||
String pubKey = jsonObject.getString("pubKey");
|
||||
String client_secret = jsonObject.getString("client_secret");
|
||||
String username = jsonObject.getString("username");
|
||||
String pwd = jsonObject.getString("pwd");
|
||||
String busi_center = jsonObject.getString("busi_center");
|
||||
String dsname = jsonObject.getString("dsname");
|
||||
String baseUrl = jsonObject.getString("baseUrl");
|
||||
Map<String, String> paramMap = new HashMap<String, String>();
|
||||
// 密码模式认证
|
||||
paramMap.put("grant_type", "password");
|
||||
// 第三方应用id
|
||||
paramMap.put("client_id", client_id);
|
||||
// 第三方应用secret 公钥加密
|
||||
try {
|
||||
paramMap.put("client_secret", URLEncoder.encode(Encryption.pubEncrypt(pubKey, client_secret), "utf-8"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// ncc用户名
|
||||
paramMap.put("username", username);
|
||||
// 密码 公钥加密
|
||||
try {
|
||||
paramMap.put("password", URLEncoder.encode(Encryption.pubEncrypt(pubKey, pwd), "utf-8"));
|
||||
} catch (Exception e) {
|
||||
return BaseResult.getFailureMessageEntity("获取token失败");
|
||||
}
|
||||
// 账套编码
|
||||
paramMap.put("biz_center", busi_center);
|
||||
// 签名
|
||||
String sign = SHA256Util.getSHA256(client_id + client_secret + username + pwd + pubKey, pubKey);
|
||||
paramMap.put("signature", sign);
|
||||
paramMap.put("dsname", dsname);
|
||||
String url = baseUrl + "/nccloud/opm/accesstoken";
|
||||
String mediaType = "application/x-www-form-urlencoded";
|
||||
String token = null;
|
||||
try {
|
||||
token = doPostHutool(url, paramMap, mediaType, null, "", "token");
|
||||
} catch (Exception e) {
|
||||
return BaseResult.getFailureMessageEntity("获取token失败");
|
||||
}
|
||||
if (JSONUtil.isTypeJSON(token)) {
|
||||
JSONObject jsonObject1 = JSONObject.parseObject(token);
|
||||
return BaseResult.getSuccessMessageEntity("获取token成功", jsonObject1);
|
||||
} else {
|
||||
return BaseResult.getSuccessMessageEntity("获取token成功", token);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送post请求
|
||||
*
|
||||
* @param baseUrl
|
||||
* @param paramMap
|
||||
* @param mediaType
|
||||
* @param headers
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
private String doPostHutool(String baseUrl, Map<String, String> paramMap, String mediaType, Map<String, String> headers, String json, String type) {
|
||||
String result = null;
|
||||
|
||||
try {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(baseUrl);
|
||||
if (paramMap != null) {
|
||||
sb.append("?");
|
||||
for (Map.Entry<String, String> entry : paramMap.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
String value = entry.getValue();
|
||||
sb.append(key + "=" + value).append("&");
|
||||
}
|
||||
}
|
||||
if ("bill".equals(type)) {
|
||||
sb.append("?");
|
||||
for (Map.Entry<String, String> entry : headers.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
String value = entry.getValue();
|
||||
sb.append(key + "=" + value).append("&");
|
||||
}
|
||||
}
|
||||
baseUrl = sb.toString().substring(0, sb.toString().length() - 1);
|
||||
HttpRequest re = HttpRequest.post(baseUrl);
|
||||
re.addHeaders(headers);
|
||||
result = re.body(json)
|
||||
.timeout(2000000)//超时,毫秒
|
||||
.execute().body();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param key
|
||||
* @param object
|
||||
* @return com.alibaba.fastjson.JSONObject
|
||||
* @Author lvleigang
|
||||
* @Description 获取对象转换成jsonobj
|
||||
* @Date 11:51 下午 2023/7/10
|
||||
**/
|
||||
public JSONObject getstrObj(String key, JSONObject object) {
|
||||
if (checkStr(object.getString(key))) {
|
||||
return object.getJSONObject(key);
|
||||
}
|
||||
return new JSONObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param str
|
||||
* @return void
|
||||
* @Author lvleigang
|
||||
* @Description 校验字符串
|
||||
* @Date 11:41 上午 2022/12/7
|
||||
**/
|
||||
protected Boolean checkStr(String str) {
|
||||
Boolean flag = true;
|
||||
if (str == null || "".equals(str)) {
|
||||
flag = false;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jsonObject
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 获取供应商
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceGetSupplier(JSONObject jsonObject) {
|
||||
BipSupplierEntity bipSupplierEntity = getData("jsonStr", jsonObject, BipSupplierEntity.class);
|
||||
//设置查询区间
|
||||
bipSupplierEntity.setTs(ts);
|
||||
logger.info("查询供应商数据,当前TS:"+ts);
|
||||
List<BipSupplierEntity> bipSupplierEntities = bipSupplierDao.thirdInterfaceGetSupplier(bipSupplierEntity);
|
||||
//更新TS时间
|
||||
ts = DateUtil.dateToString(new Date(),"yyyy-MM-dd HH:mm:ss");
|
||||
logger.info("TS已更新:"+ts);
|
||||
//System.out.println("查询供应商明细");
|
||||
logger.info("查询供应商明细"+JSON.toJSONString(bipSupplierEntities));
|
||||
List<JSONObject> jsonObjectList=new ArrayList<>();
|
||||
//[{"code":"SL20231101727","dataSourceCode":"master","name":"无锡恒君安管理咨询有限公司","taxpayerid":"91320205MAD2HAQN6Q","tripartiteId":"0001A31000000002M3TS","ts":"2023-11-16 14:05:10"}]
|
||||
|
||||
List<BipSupplierDetailsEntity> bipSupplierDetails = null;
|
||||
for (BipSupplierEntity supplierEntity : bipSupplierEntities) {
|
||||
List<JSONObject> list=new ArrayList<>();
|
||||
JSONObject jsonObjectResult=new JSONObject();
|
||||
jsonObjectResult.put("code",supplierEntity.getCode());
|
||||
jsonObjectResult.put("name",supplierEntity.getName());
|
||||
jsonObjectResult.put("taxpayerid",supplierEntity.getTaxpayerid());
|
||||
jsonObjectResult.put("def1",supplierEntity.getDef1());
|
||||
jsonObjectResult.put("def2",supplierEntity.getDef2());
|
||||
jsonObjectResult.put("def3",supplierEntity.getDef3());
|
||||
jsonObjectResult.put("tripartiteId",supplierEntity.getTripartiteId());
|
||||
//根据供应商编码和名称查询明细
|
||||
String code = supplierEntity.getCode();
|
||||
String name = supplierEntity.getName();
|
||||
//System.out.println("根据供应处名称,编码获取明细数据:code:"+code +"name:"+name);
|
||||
logger.info("根据供应处名称,编码获取明细数据:code:"+code +"name:"+name);
|
||||
BipSupplierDetailsEntity bipSupplierDetailsEntity = new BipSupplierDetailsEntity();
|
||||
bipSupplierDetailsEntity.setCode(code);
|
||||
bipSupplierDetailsEntity.setName(name);
|
||||
logger.info("根据供应商编码,名称查询银行档案 {}",JSON.toJSONString(bipSupplierDetailsEntity));
|
||||
List<BipSupplierDetailsEntity> bipSupplierDetailsEntities = queryBipSupplierDetails(bipSupplierDetailsEntity) ;
|
||||
// /bipSupplierDetails.stream().filter(that-> code.equalsIgnoreCase(that.getCode() ) && name.equalsIgnoreCase(that.getName() ) ).collect(Collectors.toList());
|
||||
logger.info("根据供应处名称,编码获取明细数据 bipSupplierDetailsEntities值:{}",JSON.toJSONString(bipSupplierDetailsEntities));
|
||||
if (bipSupplierDetailsEntities.size()>0 && null!=bipSupplierDetailsEntities){
|
||||
bipSupplierDetailsEntities.get(0).setIsdefault("-8073674727882144390");
|
||||
for (BipSupplierDetailsEntity supplierDetailsEntity : bipSupplierDetailsEntities) {
|
||||
JSONObject jsonObjectDetails=new JSONObject();
|
||||
jsonObjectDetails.put("splitbank",supplierDetailsEntity.getSplitbank());
|
||||
jsonObjectDetails.put("bankaccno",supplierDetailsEntity.getBankaccno());
|
||||
jsonObjectDetails.put("combinno",supplierDetailsEntity.getCombinno());
|
||||
jsonObjectDetails.put("isdefault",supplierDetailsEntity.getIsdefault());
|
||||
list.add(jsonObjectDetails);
|
||||
}
|
||||
}
|
||||
jsonObjectResult.put("details",list);
|
||||
jsonObjectList.add(jsonObjectResult);
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询成功",jsonObjectList);
|
||||
}
|
||||
@DS("oracle91")
|
||||
private List<BipSupplierDetailsEntity> queryBipSupplierDetails(BipSupplierDetailsEntity bipSupplierDetailsEntity){
|
||||
// BipSupplierDetailsEntity bipSupplierDetailsEntity=new BipSupplierDetailsEntity();
|
||||
// bipSupplierDetailsEntity.setCode(supplierEntity.getCode());
|
||||
// bipSupplierDetailsEntity.setName(supplierEntity.getName());
|
||||
|
||||
List<BipSupplierDetailsEntity> bipSupplierDetailsEntities = bipSupplierDetailsDao.thirdInterfaceGetSupplierDetails(bipSupplierDetailsEntity);
|
||||
return bipSupplierDetailsEntities;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取BIP组织数据
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceGetOrgs(JSONObject jsonObject) {
|
||||
BipOrgsEntity bipOrgsEntity = getData("jsonStr", jsonObject, BipOrgsEntity.class);
|
||||
//设置查询区间
|
||||
bipOrgsEntity.setOrgsts(orgsts);
|
||||
logger.info("查询组织数据,当前TS:" + orgsts);
|
||||
List<BipOrgsEntity> bipOrgsEntities = bipOrgsDao.thirdInterfaceGetOrgs(bipOrgsEntity);
|
||||
//更新TS时间
|
||||
orgsts = DateUtil.dateToString(new Date(), "yyyy-MM-dd HH:mm:ss");
|
||||
logger.info("组织TS已更新:" + orgsts);
|
||||
logger.info("查询组织明细" + JSON.toJSONString(bipOrgsEntities));
|
||||
List<JSONObject> jsonObjectList = new ArrayList<>();
|
||||
if (null != bipOrgsEntities && bipOrgsEntities.size() > 0) {
|
||||
for (BipOrgsEntity orgsEntity : bipOrgsEntities) {
|
||||
List<JSONObject> list = new ArrayList<>();
|
||||
JSONObject jsonObjectResult = new JSONObject();
|
||||
jsonObjectResult.put("code", orgsEntity.getCode());//单位编码
|
||||
jsonObjectResult.put("name", orgsEntity.getName());//单位名称
|
||||
jsonObjectResult.put("tripartiteId", orgsEntity.getTripartiteId());//BIPID
|
||||
//根据组织主键查询明细
|
||||
String tripartiteId = orgsEntity.getTripartiteId();
|
||||
//System.out.println("根据供应处名称,编码获取明细数据:code:"+code +"name:"+name);
|
||||
logger.info("根据组织主键获取明细数据:pk_financeorg:{}", tripartiteId);
|
||||
BipOrgsDetailsEntity bipOrgsDetailsEntity = new BipOrgsDetailsEntity();
|
||||
bipOrgsDetailsEntity.setControlorg(tripartiteId);
|
||||
List<BipOrgsDetailsEntity> bipOrgsDetailsEntities = queryBipOrgsDetails(bipOrgsDetailsEntity);
|
||||
if (bipOrgsDetailsEntities.size() > 0 && null != bipOrgsDetailsEntities) {
|
||||
for (BipOrgsDetailsEntity orgsDetailsEntity : bipOrgsDetailsEntities) {
|
||||
JSONObject jsonObjectDetails = new JSONObject();
|
||||
jsonObjectDetails.put("bankCode", orgsDetailsEntity.getBankCode());//开户行编码
|
||||
jsonObjectDetails.put("bankName", orgsDetailsEntity.getBankName());//开户行名称
|
||||
jsonObjectDetails.put("accnum", orgsDetailsEntity.getAccnum());//账户
|
||||
jsonObjectDetails.put("cnapsCode", orgsDetailsEntity.getCnapsCode());//联行号
|
||||
list.add(jsonObjectDetails);
|
||||
}
|
||||
}
|
||||
jsonObjectResult.put("details", list);
|
||||
jsonObjectList.add(jsonObjectResult);
|
||||
}
|
||||
}
|
||||
return BaseResult.getSuccessMessageEntity("查询成功", jsonObjectList);
|
||||
}
|
||||
private List<BipOrgsDetailsEntity> queryBipOrgsDetails(BipOrgsDetailsEntity bipOrgsDetailsEntity){
|
||||
List<BipOrgsDetailsEntity> bipOrgsDetailsEntities = bipOrgsDetailsDao.thirdInterfaceGetOrgsDetails(bipOrgsDetailsEntity);
|
||||
return bipOrgsDetailsEntities;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* @return com.hzya.frame.web.entity.JsonResultEntity
|
||||
* @Description 新增供应商
|
||||
**/
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceSaveSupplier(JSONObject object) {
|
||||
JSONObject jsonObject = getstrObj("jsonStr", object);
|
||||
//认证access_token
|
||||
String access_token = jsonObject.getString("access_token");
|
||||
//认证security_key
|
||||
String security_key = jsonObject.getString("security_key");
|
||||
//服务器ip:port
|
||||
String baseUrl = jsonObject.getString("baseUrl");
|
||||
//api方法
|
||||
String apiUrl = jsonObject.getString("apiUrl");
|
||||
//发送的数据
|
||||
String sendData =jsonObject.getString("sendData");
|
||||
//对应于在第三方应用注册当中的app_id
|
||||
String client_id = jsonObject.getString("client_id");
|
||||
//公钥
|
||||
String pubKey = jsonObject.getString("pubKey");
|
||||
//接口调用业务标识
|
||||
String busi_id = jsonObject.getString("busi_id");
|
||||
//重复调用检查
|
||||
String repeat_check = jsonObject.getString("repeat_check");
|
||||
//返回值压缩加密级别
|
||||
String secret_level = jsonObject.getString("secret_level") == null ? "L0": jsonObject.getString("secret_level") ;
|
||||
try {
|
||||
String returnStr = sendApi(access_token, security_key, baseUrl,apiUrl,sendData,client_id,pubKey,busi_id,repeat_check,secret_level);
|
||||
if(JSONUtil.isTypeJSON(returnStr)){
|
||||
JSONObject jsonObject1 = JSONObject.parseObject(returnStr);
|
||||
return BaseResult.getSuccessMessageEntity("发送数据成功",jsonObject1);
|
||||
}else {
|
||||
return BaseResult.getSuccessMessageEntity("发送数据成功",returnStr);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return BaseResult.getFailureMessageEntity("发送数据错误");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应商传递OA
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public JsonResultEntity thirdInterfaceSendOa(JSONObject jsonObject) throws Exception {
|
||||
JSONObject jsonObjectStr = getstrObj("jsonStr", jsonObject);
|
||||
PluginBaseEntity pluginBaseEntity = PluginUtils.getPluginsById(jsonObjectStr.getString("plug_id"));
|
||||
JsonResultEntity s = pluginBaseEntity.executeBusiness(jsonObjectStr);
|
||||
return BaseResult.getSuccessMessageEntity("传递成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param access_token 认证access_token
|
||||
* @param security_key 认证security_key
|
||||
* @param baseUrl 服务器ip:port
|
||||
* @param apiUrl api方法
|
||||
* @param putParameter 发送的数据
|
||||
* @param client_id 对应于在第三方应用注册当中的app_id
|
||||
* @param pubKey 公钥
|
||||
* @param busi_id 接口调用业务标识
|
||||
* @param repeat_check 重复调用检查
|
||||
* @param secret_level 返回值压缩加密级别
|
||||
* @return java.lang.String
|
||||
* @Author lvleigang
|
||||
* @Description 发起api接口
|
||||
* @Date 9:52 上午 2023/8/22
|
||||
**/
|
||||
private String sendApi(String access_token, String security_key, String baseUrl, String apiUrl, String putParameter, String client_id, String pubKey, String busi_id, String repeat_check, String secret_level) throws Exception{
|
||||
// header 参数
|
||||
Map<String, String> headermap = new HashMap<>();
|
||||
headermap.put("access_token", access_token);
|
||||
headermap.put("client_id", client_id);
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(client_id);
|
||||
if (StringUtils.isNotBlank(putParameter)) {
|
||||
sb.append(putParameter);
|
||||
}
|
||||
sb.append(pubKey);
|
||||
String sign = SHA256Util.getSHA256(sb.toString(), pubKey);
|
||||
headermap.put("signature", sign);
|
||||
if (StringUtils.isNotBlank(busi_id)) {
|
||||
headermap.put("busi_id", busi_id);
|
||||
}
|
||||
if (StringUtils.isNotBlank(repeat_check)) {
|
||||
headermap.put("repeat_check", repeat_check);
|
||||
}
|
||||
String mediaType = "application/json;charset=utf-8";
|
||||
// 表体数据json
|
||||
// 根据安全级别选择加密或压缩请求表体参数
|
||||
String json = dealRequestBody(putParameter, security_key, secret_level);
|
||||
// 返回值
|
||||
String sendUrl = baseUrl + apiUrl;
|
||||
String result = doPostHutool(sendUrl, null, mediaType, headermap, json, "bill");
|
||||
String changeData = dealResponseBody(result, security_key, secret_level);
|
||||
return changeData;
|
||||
}
|
||||
|
||||
// 返回值进行过加密和压缩,对返回值进行解压和解密
|
||||
private static String dealResponseBody(String source, String security_key, String level) throws Exception {
|
||||
String result = null;
|
||||
if (StringUtils.isEmpty(level) || SecretConst.LEVEL0.equals(level)) {
|
||||
result = source;
|
||||
} else if (SecretConst.LEVEL1.equals(level)) {
|
||||
result = Decryption.symDecrypt(security_key, source);
|
||||
} else if (SecretConst.LEVEL2.equals(level)) {
|
||||
result = CompressUtil.gzipDecompress(source);
|
||||
} else if (SecretConst.LEVEL3.equals(level)) {
|
||||
result = CompressUtil.gzipDecompress(Decryption.symDecrypt(security_key, source));
|
||||
} else if (SecretConst.LEVEL4.equals(level)) {
|
||||
result = Decryption.symDecrypt(security_key, CompressUtil.gzipDecompress(source));
|
||||
} else {
|
||||
throw new Exception("无效的安全等级");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// 根据安全级别设置,表体是否加密或压缩
|
||||
private static String dealRequestBody(String source, String security_key, String level) throws Exception {
|
||||
String result = null;
|
||||
if (StringUtils.isEmpty(level) || SecretConst.LEVEL0.equals(level)) {
|
||||
result = source;
|
||||
} else if (SecretConst.LEVEL1.equals(level)) {
|
||||
result = Encryption.symEncrypt(security_key, source);
|
||||
} else if (SecretConst.LEVEL2.equals(level)) {
|
||||
result = CompressUtil.gzipCompress(source);
|
||||
} else if (SecretConst.LEVEL3.equals(level)) {
|
||||
result = Encryption.symEncrypt(security_key, CompressUtil.gzipCompress(source));
|
||||
} else if (SecretConst.LEVEL4.equals(level)) {
|
||||
result = CompressUtil.gzipCompress(Encryption.symEncrypt(security_key, source));
|
||||
} else {
|
||||
throw new Exception("无效的安全等级");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
class SecretConst {
|
||||
/**
|
||||
* LEVEL0 不压缩、不加密
|
||||
*/
|
||||
public static final String LEVEL0 = "L0";
|
||||
/**
|
||||
* LEVEL1 只加密、不压缩
|
||||
*/
|
||||
public static final String LEVEL1 = "L1";
|
||||
/**
|
||||
* LEVEL2 只压缩、不加密
|
||||
*/
|
||||
public static final String LEVEL2 = "L2";
|
||||
/**
|
||||
* LEVEL3 先压缩、后加密
|
||||
*/
|
||||
public static final String LEVEL3 = "L3";
|
||||
/**
|
||||
* LEVEL4 先加密、后压缩
|
||||
*/
|
||||
public static final String LEVEL4 = "L4";
|
||||
}
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.hzya.frame.base.PluginBaseEntity;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipOrgsDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDao;
|
||||
import com.hzya.frame.bip.v3.v2207.dao.IBipSupplierDetailsDao;
|
||||
import com.hzya.frame.bip.v3.v2207.entity.*;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207Service;
|
||||
import com.hzya.frame.bip.v3.v2207.service.IBipV32207TokenService;
|
||||
import com.hzya.frame.dateutil.DateUtil;
|
||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||
import com.hzya.frame.util.PluginUtils;
|
||||
import com.hzya.frame.util.bipV3.Encryption;
|
||||
import com.hzya.frame.util.bipV3.SHA256Util;
|
||||
import com.hzya.frame.util.oldNcc.CompressUtil;
|
||||
import com.hzya.frame.util.oldNcc.Decryption;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@Service(value = "bipV32207TokenService")
|
||||
public class BipV32207TokenServiceImpl extends BaseService<BipTokenVo, String> implements IBipV32207TokenService {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
/**
|
||||
*
|
||||
* @content 此方法获取BIPtoken,heade参数动态传入
|
||||
* @author laborer
|
||||
* @date 2024/5/27 0027 11:38
|
||||
*
|
||||
*/
|
||||
|
||||
@Override
|
||||
public SysExtensionApiEntity getBipToken(SysExtensionApiEntity entity) {
|
||||
try {
|
||||
Map<String, String> headers = entity.getHeaders();
|
||||
String client_id = headers.get("client_id");
|
||||
Map<String, String> paramMap = new HashMap<String, String>();
|
||||
// 密码模式认证
|
||||
paramMap.put("grant_type", "client_credentials");
|
||||
// 第三方应用id
|
||||
paramMap.put("client_id", client_id);
|
||||
// 第三方应用secret]
|
||||
String client_secret = headers.get("client_secret");
|
||||
// 账套编码
|
||||
String busi_center = headers.get("busi_center");
|
||||
//用户编码
|
||||
String usercode = headers.get("usercode");
|
||||
//数据库编码
|
||||
String dsname = headers.get("dsname");
|
||||
String pubKey = headers.get("pubKey");
|
||||
// 第三方应用secret 公钥加密]
|
||||
paramMap.put("client_secret", URLEncoder.encode(Encryption.pubEncrypt(pubKey, client_secret), "utf-8"));
|
||||
// 账套编码
|
||||
paramMap.put("biz_center", busi_center);
|
||||
// // TODO 传递数据源和ncc登录用户
|
||||
paramMap.put("dsname", dsname);
|
||||
paramMap.put("usercode", usercode);
|
||||
// 签名
|
||||
String sign = SHA256Util.getSHA256(client_id + client_secret + pubKey,pubKey);
|
||||
paramMap.put("signature", sign);
|
||||
StringBuffer querys = new StringBuffer();
|
||||
querys.append("biz_center="+busi_center);
|
||||
querys.append("&grant_type="+"client_credentials");
|
||||
querys.append("&signature="+sign);
|
||||
querys.append("&dsname="+dsname);
|
||||
querys.append("&client_secret="+URLEncoder.encode(Encryption.pubEncrypt(pubKey, client_secret), "utf-8"));
|
||||
querys.append("&usercode="+usercode);
|
||||
querys.append("&client_id="+client_id);
|
||||
entity.setQuerys(querys.toString());
|
||||
headers.put("content-type","application/x-www-form-urlencoded");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
package com.hzya.frame.bip.v3.v2207.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* com.hzya.frame.bip.v3.v2207.util
|
||||
*
|
||||
* @author makejava
|
||||
* @date 2024-05 -30 14:20
|
||||
*/
|
||||
|
||||
public class BipUtil {
|
||||
/**
|
||||
*
|
||||
* @content 发送单据到BIP系统
|
||||
* @author laborer
|
||||
* @date 2024/6/21 0021 10:51
|
||||
*
|
||||
*/
|
||||
|
||||
public static String sendU9cTOBipEsb(String parm, String apiCode,String token){
|
||||
String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
System.out.println("推送参数"+parm);
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800023")//头信息,多个头信息多次调用此方法即可
|
||||
.header("access_token", token)//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body(parm)//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
System.out.println("返回参数"+result);
|
||||
if(StrUtil.isNotEmpty(result)){
|
||||
return analytic(result);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String getBipToken(String userCode, String apiCode){
|
||||
String baseUrl = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
|
||||
String result = HttpRequest.post(baseUrl)
|
||||
.header("appId", "800023")//头信息,多个头信息多次调用此方法即可
|
||||
.header("apiCode", apiCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("usercode", userCode)//头信息,多个头信息多次调用此方法即可
|
||||
.header("publicKey", "ZJYA1vBeY1ai53iNmbAEsw6DImjkXGBkdMailxcBdliFC85Ce7eDIk+3zDUT+v578prj")//头信息,多个头信息多次调用此方法即可
|
||||
.header("secretKey", "7Gp6OjHrIaQ6R3tXGPrI4morjQyWL+qu4JJschQnkBRtv26VDgGFVYKOy5kMZfd/j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")//头信息,多个头信息多次调用此方法即可
|
||||
.body("")//表单内容
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute().body();
|
||||
System.out.println("返回参数"+result);
|
||||
if(StrUtil.isNotEmpty(result)){
|
||||
JSONObject obj = JSON.parseObject( analytic(result));
|
||||
JSONObject data = obj.getJSONObject("data");
|
||||
return data.getString("access_token");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String analytic(String parm){
|
||||
JSONObject main = JSON.parseObject(parm);
|
||||
return main.getString("attribute");
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
</web-app>
|
|
@ -1,48 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>kangarooDataCenterV3</artifactId>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>fw-oa</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>${revision}</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<artifactId>base-service</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql-connector-java}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>none</mainClass> <!-- 取消查找本项目下的Main方法:为了解决Unable to find main class的问题 -->
|
||||
<classifier>execute</classifier> <!-- 为了解决依赖模块找不到此模块中的类或属性 -->
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -1,74 +0,0 @@
|
|||
package com.hzya.frame.seeyon.cap4.form.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 无流程表单批量保存请求参数
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/1/8 11:18
|
||||
**/
|
||||
public class FormDTO {
|
||||
@JSONField(ordinal = 4)
|
||||
private String formCode;//模版编号
|
||||
@JSONField(ordinal = 5)
|
||||
private String loginName;//模版编号
|
||||
@JSONField(ordinal = 2)
|
||||
private String rightId;//权限id,找到无流程表单,点新增,弹出的窗口上会有这个参数
|
||||
@JSONField(ordinal = 3)
|
||||
private List<FormDataDTO> dataList;//导入的数据
|
||||
@JSONField(ordinal = 1)
|
||||
private String[] uniqueFiled;//更新用的唯一标识
|
||||
@JSONField(ordinal = 6)
|
||||
private Boolean doTrigger;//是否执行触发(Since V8.0sp2),测试中发现传了这个参数会报错
|
||||
|
||||
public String getFormCode() {
|
||||
return formCode;
|
||||
}
|
||||
|
||||
public void setFormCode(String formCode) {
|
||||
this.formCode = formCode;
|
||||
}
|
||||
|
||||
public String getLoginName() {
|
||||
return loginName;
|
||||
}
|
||||
|
||||
public void setLoginName(String loginName) {
|
||||
this.loginName = loginName;
|
||||
}
|
||||
|
||||
public String getRightId() {
|
||||
return rightId;
|
||||
}
|
||||
|
||||
public void setRightId(String rightId) {
|
||||
this.rightId = rightId;
|
||||
}
|
||||
|
||||
public List<FormDataDTO> getDataList() {
|
||||
return dataList;
|
||||
}
|
||||
|
||||
public void setDataList(List<FormDataDTO> dataList) {
|
||||
this.dataList = dataList;
|
||||
}
|
||||
|
||||
public String[] getUniqueFiled() {
|
||||
return uniqueFiled;
|
||||
}
|
||||
|
||||
public void setUniqueFiled(String[] uniqueFiled) {
|
||||
this.uniqueFiled = uniqueFiled;
|
||||
}
|
||||
|
||||
public Boolean getDoTrigger() {
|
||||
return doTrigger;
|
||||
}
|
||||
|
||||
public void setDoTrigger(Boolean doTrigger) {
|
||||
this.doTrigger = doTrigger;
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
package com.hzya.frame.seeyon.cap4.form.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description dataList节点
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/1/8 11:26
|
||||
**/
|
||||
public class FormDataDTO {
|
||||
@JSONField(ordinal = 1)
|
||||
private MasterTableDTO masterTable;//主表数据
|
||||
@JSONField(ordinal = 2)
|
||||
private List<SubTableDTO> subTables;//子表数据
|
||||
|
||||
//private List<> attachmentInfos;//附件列表
|
||||
|
||||
public MasterTableDTO getMasterTable() {
|
||||
return masterTable;
|
||||
}
|
||||
|
||||
public void setMasterTable(MasterTableDTO masterTable) {
|
||||
this.masterTable = masterTable;
|
||||
}
|
||||
|
||||
public List<SubTableDTO> getSubTables() {
|
||||
return subTables;
|
||||
}
|
||||
|
||||
public void setSubTables(List<SubTableDTO> subTables) {
|
||||
this.subTables = subTables;
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
package com.hzya.frame.seeyon.cap4.form.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 主表数据
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/1/8 11:29
|
||||
**/
|
||||
|
||||
public class MasterTableDTO {
|
||||
@JSONField(ordinal = 1)
|
||||
private String name;//表名
|
||||
@JSONField(ordinal = 2)
|
||||
private RecordDTO record;//数据
|
||||
@JSONField(ordinal = 3)
|
||||
private List<String> changedFields;//需要计算的字段
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public RecordDTO getRecord() {
|
||||
return record;
|
||||
}
|
||||
|
||||
public void setRecord(RecordDTO record) {
|
||||
this.record = record;
|
||||
}
|
||||
|
||||
public List<String> getChangedFields() {
|
||||
return changedFields;
|
||||
}
|
||||
|
||||
public void setChangedFields(List<String> changedFields) {
|
||||
this.changedFields = changedFields;
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package com.hzya.frame.seeyon.cap4.form.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description record节点
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/1/8 11:31
|
||||
**/
|
||||
public class RecordDTO {
|
||||
@JSONField(ordinal = 1)
|
||||
private long id;//数据id,测试中发现新增时这个参数随便填写 不影响导入
|
||||
@JSONField(ordinal = 2)
|
||||
private List<RecordFieldDTO> fields;//字段列表
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public List<RecordFieldDTO> getFields() {
|
||||
return fields;
|
||||
}
|
||||
|
||||
public void setFields(List<RecordFieldDTO> fields) {
|
||||
this.fields = fields;
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
package com.hzya.frame.seeyon.cap4.form.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* @Description masterTable—record—fields的结构
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/1/8 11:32
|
||||
**/
|
||||
public class RecordFieldDTO {
|
||||
@JSONField(ordinal = 1)
|
||||
private String name;//数据域名称 ,fieldxxxx
|
||||
@JSONField(ordinal = 2)
|
||||
private String value;//数据值(优先)
|
||||
@JSONField(ordinal = 3)
|
||||
private String showValue;//显示值
|
||||
|
||||
public RecordFieldDTO() {
|
||||
|
||||
}
|
||||
|
||||
public RecordFieldDTO(String name, String value, String showValue) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.showValue = showValue;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getShowValue() {
|
||||
return showValue;
|
||||
}
|
||||
|
||||
public void setShowValue(String showValue) {
|
||||
this.showValue = showValue;
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
package com.hzya.frame.seeyon.cap4.form.dto;
|
||||
|
||||
/**
|
||||
* @Description 子表数据
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/1/8 11:29
|
||||
**/
|
||||
public class SubTableDTO {
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package com.hzya.frame.seeyon.cbs8.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentEntity;
|
||||
|
||||
/**
|
||||
* @Description 代发代扣
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/26 10:50
|
||||
**/
|
||||
public interface IAgentPaymentDao extends IBaseDao<AgentPaymentEntity,String> {
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package com.hzya.frame.seeyon.cbs8.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.AgentPaymentDetailEntity;
|
||||
|
||||
/**
|
||||
* @Description 代发代扣明细
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/26 10:54
|
||||
**/
|
||||
public interface IAgentPaymentDetailDao extends IBaseDao<AgentPaymentDetailEntity,String> {
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package com.hzya.frame.seeyon.cbs8.dao;
|
||||
|
||||
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||
import com.hzya.frame.seeyon.cbs8.entity.CbsLogEntity;
|
||||
|
||||
/**
|
||||
* @Description cbs8支付日志
|
||||
* @Author xiangerlin
|
||||
* @Date 2024/6/14 17:30
|
||||
**/
|
||||
public interface ICbsLogDao extends IBaseDao<CbsLogEntity,String> {
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue