Compare commits
48 Commits
Author | SHA1 | Date |
---|---|---|
|
b5a3a83b6c | |
|
ad94d9af6b | |
|
9198838cc7 | |
|
fb1017c7e1 | |
|
0a3c2882f5 | |
|
51e73b984a | |
|
dc63d24384 | |
|
b98da3d866 | |
|
30e35f622b | |
|
0442127dbd | |
|
c909794330 | |
|
e34228fddb | |
|
6ad60418e7 | |
|
f256761790 | |
|
52f61a4308 | |
|
15c8dcc302 | |
|
ef8f21e525 | |
|
461661ea5f | |
|
807c929ef8 | |
|
c72bd3cb76 | |
|
0b2af4b9d4 | |
|
17ba8fc88b | |
|
8a4f453a0c | |
|
e74c8668ff | |
|
b777063325 | |
|
bf572a3401 | |
|
38c70cd3a4 | |
|
89496fb10f | |
|
a5e9345296 | |
|
998e7aaf52 | |
|
0d90e54da2 | |
|
20044be5b6 | |
|
456a3fdbd6 | |
|
dfab9aa128 | |
|
bdbadb95b7 | |
|
f1eab91cad | |
|
c098bbee28 | |
|
72e6df6558 | |
|
549cf2a345 | |
|
7fc8a2876a | |
|
869a8014ea | |
|
8ff964c6cd | |
|
ef6eb4b807 | |
|
6997fb81ba | |
|
df93aa6891 | |
|
3f6ea50b70 | |
|
3f3eedbfdd | |
|
aeeb47299b |
|
@ -107,6 +107,7 @@ public class SeeyonExtPluginInitializer extends PluginBaseEntity {
|
||||||
@Override
|
@Override
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
try {
|
try {
|
||||||
|
logger.info("重试插件:{}",JSONObject.toJSON(requestJson));
|
||||||
//重试方法
|
//重试方法
|
||||||
if (null != requestJson){
|
if (null != requestJson){
|
||||||
//JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
|
//JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
|
||||||
|
|
|
@ -0,0 +1,141 @@
|
||||||
|
package com.hzya.frame.plugin.ydc.plugin;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.seeyon.service.ISeeYonInterFace;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0226Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmain0226Service;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description ydc客户档案同步
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/9 08:59
|
||||||
|
**/
|
||||||
|
public class CustomerPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Value("${oa.datasource_code}")
|
||||||
|
public String dataSourceCode;
|
||||||
|
@Autowired
|
||||||
|
private IFormmain0226Service formmain0226Service;
|
||||||
|
@Autowired
|
||||||
|
private ISeeYonInterFace seeYonInterFace;
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "YDCCustomerPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "OA客户档案同步U8插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "OA客户档案同步U8插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
logger.info("开始执行OA客户同步U8定时任务:{}",JSONObject.toJSONString(requestJson));
|
||||||
|
//1、查询OA审批完成且未推送U8的客户申请
|
||||||
|
Formmain0226Entity formmain0226Entity = new Formmain0226Entity();
|
||||||
|
formmain0226Entity.setFinishedflag("1");
|
||||||
|
formmain0226Entity.setField0028Flag("1");
|
||||||
|
formmain0226Entity.setDataSourceCode(dataSourceCode);
|
||||||
|
List<Formmain0226Entity> list = formmain0226Service.query(formmain0226Entity);
|
||||||
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
for (Formmain0226Entity f : list) {
|
||||||
|
try {
|
||||||
|
//2、调用插件方法
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("formAppId", "-9122508232154527168");
|
||||||
|
param.put("formMainIds", Convert.toStrArray(f.getId()));
|
||||||
|
param.put("dataSourceCode", "ydc_oa_sqlserver");
|
||||||
|
param.put("eventType", "onProcessFinished");
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("jsonStr",param.toString());
|
||||||
|
seeYonInterFace.thirdInterfaceSeeYonDefinitionRePush(json);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("OA客户档案同步U8出错:{}", e);
|
||||||
|
} finally {
|
||||||
|
f.setField0028("1");
|
||||||
|
f.setDataSourceCode(dataSourceCode);
|
||||||
|
formmain0226Service.updateFlag(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return BaseResult.getSuccessMessageEntity("成功");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,142 @@
|
||||||
|
package com.hzya.frame.plugin.ydc.plugin;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.seeyon.service.ISeeYonInterFace;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0227Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmain0227Service;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 英德赛 OA存货档案同步到U8
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 09:56
|
||||||
|
**/
|
||||||
|
public class InventoryPluginInitializer extends PluginBaseEntity {
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISeeYonInterFace seeYonInterFace;
|
||||||
|
@Autowired
|
||||||
|
private IFormmain0227Service formmain0227Service;
|
||||||
|
|
||||||
|
@Value("${oa.datasource_code}")
|
||||||
|
public String dataSourceCode;
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "YDCInventoryPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "OA存货档案同步U8插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "OA存货档案同步U8插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
logger.info("开始执行OA存货同步U8定时任务{}",JSONObject.toJSONString(requestJson));
|
||||||
|
//1、查询OA审批完成且未推送U8的存货申请
|
||||||
|
Formmain0227Entity formmain0227 = new Formmain0227Entity();
|
||||||
|
formmain0227.setFinishedflag("1");
|
||||||
|
formmain0227.setField0022Flag("1");
|
||||||
|
//formmain0227.setId("-8891720615522383237");
|
||||||
|
formmain0227.setDataSourceCode(dataSourceCode);
|
||||||
|
List<Formmain0227Entity> list = formmain0227Service.query(formmain0227);
|
||||||
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
for (Formmain0227Entity f : list) {
|
||||||
|
try {
|
||||||
|
//2、调用插件方法
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("formAppId","-8691606453890363968");
|
||||||
|
param.put("formMainIds", Convert.toStrArray(f.getId()));
|
||||||
|
param.put("dataSourceCode","ydc_oa_sqlserver");
|
||||||
|
param.put("eventType","onProcessFinished");
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("jsonStr",param.toString());
|
||||||
|
seeYonInterFace.thirdInterfaceSeeYonDefinitionRePush(json);
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.error("OA存货档案同步U8出错:{}",e);
|
||||||
|
}finally {
|
||||||
|
f.setField0022("1");
|
||||||
|
f.setDataSourceCode(dataSourceCode);
|
||||||
|
formmain0227Service.updateFlag(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return BaseResult.getSuccessMessageEntity("成功");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,143 @@
|
||||||
|
package com.hzya.frame.plugin.ydc.plugin;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.base.PluginBaseEntity;
|
||||||
|
import com.hzya.frame.seeyon.service.ISeeYonInterFace;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmain0225Service;
|
||||||
|
import com.hzya.frame.web.entity.BaseResult;
|
||||||
|
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description ydc供应商档案同步
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 14:31
|
||||||
|
**/
|
||||||
|
public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
@Value("${oa.datasource_code}")
|
||||||
|
public String dataSourceCode;
|
||||||
|
@Autowired
|
||||||
|
private IFormmain0225Service formmain0225Service;
|
||||||
|
@Autowired
|
||||||
|
private ISeeYonInterFace seeYonInterFace;
|
||||||
|
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件初始化方法
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 10:48
|
||||||
|
* @Param []
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void initialize() {
|
||||||
|
logger.info(getPluginLabel() + "執行初始化方法initialize()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件销毁方法
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的ID
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginId() {
|
||||||
|
return "YDCSupplierPlugin";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的名称
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginName() {
|
||||||
|
return "OA供应商档案同步U8插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/****
|
||||||
|
* 插件的显示值
|
||||||
|
* @author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @date 2023-08-02 10:48
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginLabel() {
|
||||||
|
return "OA供应商档案同步U8插件";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 插件类型 1、场景插件
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-02 14:01
|
||||||
|
* @Param []
|
||||||
|
* @return java.lang.String
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public String getPluginType() {
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 执行业务代码
|
||||||
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
* @Date 2023-08-07 11:20
|
||||||
|
* @param requestJson 执行业务代码的参数
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
|
logger.info("开始执行OA供应商同步U8定时任务:{}",JSONObject.toJSONString(requestJson));
|
||||||
|
//1、查询OA审批完成且为推送U8的供应商申请
|
||||||
|
Formmain0225Entity formmain0225Entity = new Formmain0225Entity();
|
||||||
|
formmain0225Entity.setFinishedflag("1");
|
||||||
|
formmain0225Entity.setField0025Flag("1");
|
||||||
|
formmain0225Entity.setDataSourceCode(dataSourceCode);
|
||||||
|
List<Formmain0225Entity> list = formmain0225Service.query(formmain0225Entity);
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
for (Formmain0225Entity f : list) {
|
||||||
|
//2、调用插件方法
|
||||||
|
try {
|
||||||
|
//2、调用插件方法
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("formAppId", "6223456019738676230");
|
||||||
|
param.put("formMainIds", Convert.toStrArray(f.getId()));
|
||||||
|
param.put("dataSourceCode", "ydc_oa_sqlserver");
|
||||||
|
param.put("eventType", "onProcessFinished");
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("jsonStr",param.toString());
|
||||||
|
seeYonInterFace.thirdInterfaceSeeYonDefinitionRePush(json);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("OA供应商档案同步U8出错:{}", e);
|
||||||
|
} finally {
|
||||||
|
f.setField0025("1");
|
||||||
|
f.setDataSourceCode(dataSourceCode);
|
||||||
|
formmain0225Service.updateFlag(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return BaseResult.getSuccessMessageEntity("成功");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.hzya.frame.plugin.ydc.plugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 15:31
|
||||||
|
**/
|
||||||
|
public class YdcConstant {
|
||||||
|
|
||||||
|
//public static String dataSourceCode = "ydc_oa_sqlserver";
|
||||||
|
}
|
|
@ -12,10 +12,12 @@ spring:
|
||||||
dynamic:
|
dynamic:
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
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
|
username: root
|
||||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
savefile:
|
savefile:
|
||||||
# 文件保存路径
|
# 文件保存路径
|
||||||
path: /Users/xiangerlin/work/app/logs/ydc
|
path: /Users/xiangerlin/work/app/logs/ydc
|
||||||
|
oa:
|
||||||
|
datasource_code: ydc_oa_sqlserver_test
|
||||||
|
|
|
@ -3,19 +3,21 @@ logging:
|
||||||
#日志级别 指定目录级别
|
#日志级别 指定目录级别
|
||||||
level:
|
level:
|
||||||
root: info
|
root: info
|
||||||
encodings: UTF-8
|
encodings: gbk
|
||||||
file:
|
file:
|
||||||
# 日志保存路径
|
# 日志保存路径
|
||||||
path: /Users/xiangerlin/work/app/logs/ydc
|
path: D:\yongansystem\logs
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
dynamic:
|
dynamic:
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
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
|
username: root
|
||||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||||
savefile:
|
savefile:
|
||||||
# 文件保存路径
|
# 文件保存路径
|
||||||
path: /Users/xiangerlin/work/app/logs/ydc
|
path: D:\yongansystem\ydc
|
||||||
|
oa:
|
||||||
|
datasource_code: ydc_oa_sqlserver
|
||||||
|
|
|
@ -2,4 +2,7 @@
|
||||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||||
<beans default-autowire="byName">
|
<beans default-autowire="byName">
|
||||||
<bean name="seeyonExtPluginInitializer" class="com.hzya.frame.plugin.seeyonExt.plugin.SeeyonExtPluginInitializer" />
|
<bean name="seeyonExtPluginInitializer" class="com.hzya.frame.plugin.seeyonExt.plugin.SeeyonExtPluginInitializer" />
|
||||||
|
<bean name="inventoryPluginInitializer" class="com.hzya.frame.plugin.ydc.plugin.InventoryPluginInitializer" />
|
||||||
|
<bean name="supplierPluginInitializer" class="com.hzya.frame.plugin.ydc.plugin.SupplierPluginInitializer" />
|
||||||
|
<bean name="customerPluginInitializer" class="com.hzya.frame.plugin.ydc.plugin.CustomerPluginInitializer" />
|
||||||
</beans>
|
</beans>
|
||||||
|
|
|
@ -2,8 +2,10 @@ package com.hzya.frame;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.execsql.service.IExecSqlService;
|
||||||
import com.hzya.frame.plugin.mdmDistribute.plugin.MdmModulePluginInitializer;
|
import com.hzya.frame.plugin.mdmDistribute.plugin.MdmModulePluginInitializer;
|
||||||
import com.hzya.frame.plugin.seeyonExt.plugin.SeeyonExtPluginInitializer;
|
import com.hzya.frame.plugin.seeyonExt.plugin.SeeyonExtPluginInitializer;
|
||||||
|
import com.hzya.frame.seeyon.service.ISeeyonExtService;
|
||||||
import com.hzya.frame.util.AESUtil;
|
import com.hzya.frame.util.AESUtil;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
@ -26,6 +28,22 @@ public class temButtom {
|
||||||
SeeyonExtPluginInitializer seeyonExtPluginInitializer;
|
SeeyonExtPluginInitializer seeyonExtPluginInitializer;
|
||||||
@Resource
|
@Resource
|
||||||
MdmModulePluginInitializer mdmModulePluginInitializer;
|
MdmModulePluginInitializer mdmModulePluginInitializer;
|
||||||
|
@Resource
|
||||||
|
private IExecSqlService executionService;
|
||||||
|
@Resource
|
||||||
|
private ISeeyonExtService seeyonExtService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void execSqlTest(){
|
||||||
|
String sql = "update formmain_025 set ";
|
||||||
|
try {
|
||||||
|
// executionService.execUpdateSql(sql,"abc");
|
||||||
|
//seeyonExtService.updateYdcForm("update formmain_0229 set field0002 = '10241' where field0001 = 'GYSXZ-20240709003'");
|
||||||
|
System.out.println("11");
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
@Test
|
@Test
|
||||||
public void seeyonExtTest(){
|
public void seeyonExtTest(){
|
||||||
JSONObject jsonStr = new JSONObject();
|
JSONObject jsonStr = new JSONObject();
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.hzya.frame.execsql.service;
|
package com.hzya.frame.execsql.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.hzya.frame.datasource.DataSourceUtil;
|
import com.hzya.frame.datasource.DataSourceUtil;
|
||||||
import com.hzya.frame.execsql.entity.ExecSqlEntity;
|
import com.hzya.frame.execsql.entity.ExecSqlEntity;
|
||||||
import org.apache.ibatis.session.SqlSession;
|
import org.apache.ibatis.session.SqlSession;
|
||||||
|
@ -79,15 +80,15 @@ public class ExecSqlServiceImpl implements IExecSqlService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int execUpdateSql(String sql, String data_source_code) throws Exception {
|
public int execUpdateSql(String sql, String data_source_code) throws Exception {
|
||||||
logger.info("=============进入execUpdateSql方法============");
|
logger.info("=============进入execUpdateSql方法============{},{}",sql,data_source_code);
|
||||||
if (ObjectUtils.isEmpty(sql)) {
|
if (StrUtil.isNotEmpty(sql)) {
|
||||||
if (sql.contains("where") || sql.contains("WHERE")) {
|
if (sql.contains("where") || sql.contains("WHERE")) {
|
||||||
// SqlSession sqlSession = getSqlSession(data_source_code);
|
// SqlSession sqlSession = getSqlSession(data_source_code);
|
||||||
// SqlSession sqlSession = new DataSourceUtil().getDefaultSqlSession();
|
// SqlSession sqlSession = new DataSourceUtil().getDefaultSqlSession();
|
||||||
logger.info("=============execUpdateSql方法要执行的sql:============" + sql);
|
logger.info("=============execUpdateSql方法要执行的sql:============" + sql);
|
||||||
ExecSqlEntity entity = new ExecSqlEntity();
|
ExecSqlEntity entity = new ExecSqlEntity();
|
||||||
entity.setSql(sql);
|
entity.setSql(sql);
|
||||||
int result = sqlSession.update("com.hzya.frame.sysnew.execsql.entity.ExecSqlEntity.ExecSqlEntity_execsql_update", entity);
|
int result = sqlSession.update("com.hzya.frame.execsql.entity.ExecSqlEntity.ExecSqlEntity_execsql_update", entity);
|
||||||
logger.info("update受影响行数:" + result);
|
logger.info("update受影响行数:" + result);
|
||||||
//sqlSession.close();
|
//sqlSession.close();
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -216,7 +216,7 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
||||||
Object summaryObj = entity.getSummaryObj();
|
Object summaryObj = entity.getSummaryObj();
|
||||||
String deeCfgId = entity.getDeeCfgId();
|
String deeCfgId = entity.getDeeCfgId();
|
||||||
String currentNodeLast = entity.getCurrentNodeLast();
|
String currentNodeLast = entity.getCurrentNodeLast();
|
||||||
Map<String, Object> businessData = JSON.parseObject(entity.getBusinessDataStr(), Map.class);
|
JSONObject businessData = JSON.parseObject(entity.getBusinessDataStr());
|
||||||
Map<String, Object> extData = entity.getExtData();
|
Map<String, Object> extData = entity.getExtData();
|
||||||
/** 表单表的FORM ID,用此字段标记是哪个流程*/
|
/** 表单表的FORM ID,用此字段标记是哪个流程*/
|
||||||
String formApp = entity.getFormApp();
|
String formApp = entity.getFormApp();
|
||||||
|
@ -248,14 +248,38 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
||||||
/** 结束事件*/
|
/** 结束事件*/
|
||||||
case "onProcessFinished":
|
case "onProcessFinished":
|
||||||
if (StrUtil.isNotEmpty(formApp)){
|
if (StrUtil.isNotEmpty(formApp)){
|
||||||
|
String type = "_add";
|
||||||
|
switch (formApp){
|
||||||
|
case "-8691606453890363968"://存货
|
||||||
|
JSONObject formmain0227 = businessData.getJSONObject("formmain_0227");
|
||||||
|
//新增还是修改
|
||||||
|
type = formmain0227.getString("field0014");
|
||||||
|
break;
|
||||||
|
case "6223456019738676230"://供应商
|
||||||
|
JSONObject formmain0225 = businessData.getJSONObject("formmain_0225");
|
||||||
|
type = formmain0225.getString("field0019");
|
||||||
|
break;
|
||||||
|
case "-9122508232154527168"://客户
|
||||||
|
JSONObject formmain0226 = businessData.getJSONObject("formmain_0226");
|
||||||
|
type = formmain0226.getString("field0024");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//这个枚举代表修改
|
||||||
|
if (type.equals("7858843591961101741")){
|
||||||
|
type = "_add";
|
||||||
|
}else {
|
||||||
|
type = "_edit";
|
||||||
|
}
|
||||||
SysApplicationApiEntity sysApplicationApiEntity = new SysApplicationApiEntity();
|
SysApplicationApiEntity sysApplicationApiEntity = new SysApplicationApiEntity();
|
||||||
sysApplicationApiEntity.setHeaderIn(formApp);
|
sysApplicationApiEntity.setHeaderIn(formApp+type);
|
||||||
List<SysApplicationApiEntity> applist = sysApplicationApiService.queryByLike(sysApplicationApiEntity);
|
List<SysApplicationApiEntity> applist = sysApplicationApiService.queryByLike(sysApplicationApiEntity);
|
||||||
if (CollectionUtil.isNotEmpty(applist)){
|
if (CollectionUtil.isNotEmpty(applist)){
|
||||||
if (applist.size() > 1){
|
if (applist.size() > 1){
|
||||||
return BaseResult.getFailureMessageEntity("根据formID:" + formApp+"查询出多条数据", "");
|
return BaseResult.getFailureMessageEntity("根据formApp:" + formApp+"查询出多条数据", "");
|
||||||
}
|
}
|
||||||
SysApplicationApiEntity sysApp = applist.get(0);
|
SysApplicationApiEntity sysApp = applist.get(0);
|
||||||
|
//存货要循环调用
|
||||||
|
if (!formApp.equals("-8691606453890363968")){
|
||||||
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||||
.put("apiCode", String.valueOf(sysApp.getApiCode()))
|
.put("apiCode", String.valueOf(sysApp.getApiCode()))
|
||||||
.put("publicKey","ZJYAlF4yjkjZaXmjLOUqsoGzTHAlWpoTdqT7/AEYaXIwpXNCe7eDIk+3zDUT+v578prj")
|
.put("publicKey","ZJYAlF4yjkjZaXmjLOUqsoGzTHAlWpoTdqT7/AEYaXIwpXNCe7eDIk+3zDUT+v578prj")
|
||||||
|
@ -264,6 +288,29 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
||||||
.build();
|
.build();
|
||||||
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(jsonStr).timeout(60000).execute().body();
|
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(jsonStr).timeout(60000).execute().body();
|
||||||
logger.info("调用中台返回的参数:{}",body);
|
logger.info("调用中台返回的参数:{}",body);
|
||||||
|
}else {
|
||||||
|
//物料主表
|
||||||
|
JSONObject formmain0227 = businessData.getJSONObject("formmain_0227");
|
||||||
|
//物料明细表
|
||||||
|
JSONArray formson0228Arr = businessData.getJSONArray("formson_0228");
|
||||||
|
for (int i=0; i< formson0228Arr.size(); i++){
|
||||||
|
// JSONObject jsonObject1 = formson0228Arr.getJSONObject(i);
|
||||||
|
//if (jsonObject1.getString("id").equals("4321107568383836461")) {
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("formmain_0227",formmain0227);
|
||||||
|
param.put("formson_0228",formson0228Arr.getJSONObject(i));
|
||||||
|
entity.setBusinessDataStr(JSON.toJSONString(param));
|
||||||
|
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
|
||||||
|
.put("apiCode", String.valueOf(sysApp.getApiCode()))
|
||||||
|
.put("publicKey","ZJYAlF4yjkjZaXmjLOUqsoGzTHAlWpoTdqT7/AEYaXIwpXNCe7eDIk+3zDUT+v578prj")
|
||||||
|
.put("secretKey","RJTPEoOSDdaBeoxoMs465tcTqy38bRag+12S7kIv2Lxd38wgLeVfWVl/ipVKVu8Qj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
|
||||||
|
.put("appId","800018")
|
||||||
|
.build();
|
||||||
|
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(JSON.toJSONString(entity)).timeout(60000).execute().body();
|
||||||
|
logger.info("调用中台返回的参数:{}",body);
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,24 +1,38 @@
|
||||||
package com.hzya.frame.seeyon.service.impl;
|
package com.hzya.frame.seeyon.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.hzya.frame.execsql.service.IExecSqlService;
|
||||||
import com.hzya.frame.seeyon.entity.OAWorkflowEventDataEntity;
|
import com.hzya.frame.seeyon.entity.OAWorkflowEventDataEntity;
|
||||||
import com.hzya.frame.seeyon.service.ISeeyonExtService;
|
import com.hzya.frame.seeyon.service.ISeeyonExtService;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmain0225Dao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmain0226Dao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmain0227Dao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0226Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0227Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.FormmainEntity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmain0225Service;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmain0226Service;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmain0227Service;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmainService;
|
||||||
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
import com.hzya.frame.sysnew.application.entity.SysExtensionApiEntity;
|
||||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
|
||||||
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
|
||||||
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity;
|
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogEntity;
|
||||||
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogStatusEnum;
|
import com.hzya.frame.sysnew.messageManageLog.entity.SysMessageManageLogStatusEnum;
|
||||||
import com.hzya.frame.u8.util.U8Util;
|
|
||||||
import com.hzya.frame.uuid.UUIDLong;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -31,12 +45,36 @@ import java.util.Map;
|
||||||
@Service(value = "seeyonExt")
|
@Service(value = "seeyonExt")
|
||||||
public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||||
|
|
||||||
|
static final String KEY = "`o7eotan9ws8c:aj";
|
||||||
|
//static String oaDataSourceCode = "ydc_oa_sqlserver";
|
||||||
|
@Value("${oa.datasource_code}")
|
||||||
|
public String dataSourceCode;
|
||||||
Logger logger = LogManager.getLogger(getClass());
|
Logger logger = LogManager.getLogger(getClass());
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
private IFormmainService formmainService;
|
||||||
|
//存货属性枚举
|
||||||
|
private static Map<String,String> inventoryAttrMap;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
|
||||||
|
@Autowired
|
||||||
|
private IExecSqlService executionService;
|
||||||
|
@Resource
|
||||||
|
private IFormmain0225Service formmain0225Service;
|
||||||
|
@Resource
|
||||||
|
private IFormmain0226Service formmain0226Service;
|
||||||
|
@Resource
|
||||||
|
private IFormmain0227Service formmain0227Service;
|
||||||
|
static {
|
||||||
|
inventoryAttrMap = new HashMap<>();
|
||||||
|
inventoryAttrMap.put("4447593729630683530","采购");
|
||||||
|
inventoryAttrMap.put("-387621385918919664","生产耗用");
|
||||||
|
inventoryAttrMap.put("5069685839370801039","内销");
|
||||||
|
inventoryAttrMap.put("6067929382885409752","自制");
|
||||||
|
inventoryAttrMap.put("-8216072224610695901","资产");
|
||||||
|
inventoryAttrMap.put("-949779340021054755","应税劳务");
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 英德赛 OA档案传U8
|
* 英德赛 OA档案传U8
|
||||||
* 根据不同formApp来调U8不同接口
|
* 根据不同formApp来调U8不同接口
|
||||||
|
@ -53,7 +91,7 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||||
String businessDataStr = dataEntity.getBusinessDataStr();//oa表单参数
|
String businessDataStr = dataEntity.getBusinessDataStr();//oa表单参数
|
||||||
JSONObject businessData = JSON.parseObject(businessDataStr);
|
JSONObject businessData = JSON.parseObject(businessDataStr);
|
||||||
String formApp = dataEntity.getFormApp();
|
String formApp = dataEntity.getFormApp();
|
||||||
SysExtensionApiEntity param = new SysExtensionApiEntity();
|
// SysExtensionApiEntity param = new SysExtensionApiEntity();
|
||||||
Map<String, String> headerMap = entity.getHeaders();
|
Map<String, String> headerMap = entity.getHeaders();
|
||||||
JSONObject hzyaExtData = dataEntity.getHzyaExtData();//扩展参数
|
JSONObject hzyaExtData = dataEntity.getHzyaExtData();//扩展参数
|
||||||
if (null == hzyaExtData){
|
if (null == hzyaExtData){
|
||||||
|
@ -62,21 +100,21 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||||
//根据forApp组装不同参数
|
//根据forApp组装不同参数
|
||||||
switch (formApp){
|
switch (formApp){
|
||||||
case "-8691606453890363968"://
|
case "-8691606453890363968"://
|
||||||
hzyaExtData.put("billCode", "cunhuoabc123456");
|
getInventory(businessData,entity,hzyaExtData);
|
||||||
getInventory(businessData,param);
|
|
||||||
break;
|
break;
|
||||||
case "6223456019738676230":
|
case "6223456019738676230":
|
||||||
getSupplier(businessData,param,hzyaExtData);
|
getSupplier(businessData,entity,hzyaExtData);
|
||||||
break;
|
break;
|
||||||
case "-9122508232154527168":
|
case "-9122508232154527168":
|
||||||
getCustomer(businessData,param,hzyaExtData);
|
getCustomer(businessData,entity,hzyaExtData);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
param.setBodys("未匹配到表单!当前formID:"+ formApp);
|
entity.setBodys("未匹配到表单!当前formID:"+ formApp);
|
||||||
logger.error("未匹配到表单!当前formID:"+formApp);
|
logger.error("未匹配到表单!当前formID:"+formApp);
|
||||||
}
|
}
|
||||||
headerMap.put("hzyaExtData", JSON.toJSONString(hzyaExtData));
|
headerMap.put("hzyaExtData", JSON.toJSONString(hzyaExtData));
|
||||||
return param;
|
entity.setHeaders(headerMap);
|
||||||
|
return entity;
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("执行英德赛OA存货同步U8接口报错:{}", e);
|
logger.error("执行英德赛OA存货同步U8接口报错:{}", e);
|
||||||
|
@ -98,30 +136,95 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||||
JSONObject targetData = JSON.parseObject(logEntity.getTargetData());//这个对象里的body是 发送到u8的请求报文
|
JSONObject targetData = JSON.parseObject(logEntity.getTargetData());//这个对象里的body是 发送到u8的请求报文
|
||||||
JSONObject sourceData = JSON.parseObject(logEntity.getSourceData());
|
JSONObject sourceData = JSON.parseObject(logEntity.getSourceData());
|
||||||
JSONObject sourceHeaders = sourceData.getJSONObject("header");//源数据header
|
JSONObject sourceHeaders = sourceData.getJSONObject("header");//源数据header
|
||||||
|
JSONObject targetHeaders = targetData.getJSONObject("header");//源数据header
|
||||||
JSONObject sourceBody = sourceData.getJSONObject("body");//源数据body
|
JSONObject sourceBody = sourceData.getJSONObject("body");//源数据body
|
||||||
JSONObject hzyaExtData = sourceHeaders.getJSONObject("hzyaExtData");
|
JSONObject targetBody = targetData.getJSONObject("body");//目标数据body
|
||||||
|
JSONObject hzyaExtData = targetHeaders.getJSONObject("hzyaExtData");// 这里刚开始用sourceHeaders取的,2024-06-04 14:24:19改成从target里取,因为从apipost请求后在source里取不到
|
||||||
|
String targetFormApp = targetHeaders.getString("formApp");//这个字段可以判断出来是新增还是修改
|
||||||
JSONArray formMainIds = new JSONArray();
|
JSONArray formMainIds = new JSONArray();
|
||||||
formMainIds.add(sourceBody.getString("id"));
|
formMainIds.add(sourceBody.getString("id"));
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
String formApp = sourceBody.getString("formApp");
|
String formApp = sourceBody.getString("formApp");
|
||||||
param.put("formAppId",formApp);
|
param.put("formAppId",formApp);
|
||||||
param.put("formMainIds",formMainIds);
|
param.put("formMainIds",formMainIds);
|
||||||
param.put("dataSourceCode","ht_oa_sqlserver");
|
param.put("dataSourceCode",dataSourceCode);
|
||||||
param.put("eventType",sourceBody.getString("eventType"));
|
param.put("eventType",sourceBody.getString("eventType"));
|
||||||
|
|
||||||
//把返回的单号更新到oa档案表
|
//把返回的单号更新到oa档案表
|
||||||
String sql = "";
|
String returnDataStr = logEntity.getReturnData();
|
||||||
|
if (JSONUtil.isTypeJSON(returnDataStr)){
|
||||||
|
JSONObject returnData = JSONObject.parseObject(returnDataStr);
|
||||||
|
String success = returnData.getString("success");
|
||||||
|
//新增的流程申请 才处理回写单号的处理
|
||||||
|
if (!targetFormApp.contains("edit")){
|
||||||
|
if ("true".equals(success)){
|
||||||
|
JSONArray dataArr = returnData.getJSONArray("data");
|
||||||
|
if (null != dataArr){
|
||||||
|
String code = dataArr.getString(0);
|
||||||
switch (formApp){
|
switch (formApp){
|
||||||
case "-8691606453890363968"://存货
|
case "-8691606453890363968"://存货
|
||||||
sql = "";
|
FormmainEntity inventory = new FormmainEntity();
|
||||||
|
//sql = "update formmain_0231 set field0014 = '"+code +"' where field0009 = '"+hzyaExtData.getString("billCode")+"' and field0024 = '"+hzyaExtData.getString("serialNumber")+"'";
|
||||||
|
inventory.setField0002(code);
|
||||||
|
inventory.setField0016(hzyaExtData.getString("billCode"));
|
||||||
|
inventory.setField0028(hzyaExtData.getString("serialNumber"));
|
||||||
|
inventory.setDataSourceCode(dataSourceCode);
|
||||||
|
formmainService.updateInventoryCode(inventory);
|
||||||
break;
|
break;
|
||||||
case "6223456019738676230"://供应商
|
case "6223456019738676230"://供应商
|
||||||
sql = "update formmain_0229 set field0002 = '' where field0001 = "+hzyaExtData.getString("billCode");
|
FormmainEntity supplier = new FormmainEntity();
|
||||||
|
//sql = "update formmain_0229 set field0002 = '"+ code + "' where field0001 = '"+hzyaExtData.getString("billCode")+"'";
|
||||||
|
supplier.setField0001(code);
|
||||||
|
supplier.setField0017(hzyaExtData.getString("billCode"));
|
||||||
|
supplier.setDataSourceCode(dataSourceCode);
|
||||||
|
formmainService.updateSupplierCode(supplier);
|
||||||
break;
|
break;
|
||||||
case "-9122508232154527168"://客户
|
case "-9122508232154527168"://客户
|
||||||
sql = "update formmain_0230 set field0002 = '' where field0001 = "+hzyaExtData.getString("billCode");
|
//sql = "update formmain_0230 set field0002 = '"+ code + "' where field0001 = '"+hzyaExtData.getString("billCode")+"'";
|
||||||
|
FormmainEntity customer = new FormmainEntity();
|
||||||
|
//sql = "update formmain_0229 set field0002 = '"+ code + "' where field0001 = '"+hzyaExtData.getString("billCode")+"'";
|
||||||
|
customer.setField0002(code);
|
||||||
|
customer.setField0001(hzyaExtData.getString("billCode"));
|
||||||
|
customer.setDataSourceCode(dataSourceCode);
|
||||||
|
formmainService.updateCustomerCode(customer);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//回写u8返回信息到流程表
|
||||||
|
try {
|
||||||
|
//更新u8返回信息到流程表
|
||||||
|
switch (formApp){
|
||||||
|
case "-8691606453890363968"://存货
|
||||||
|
Formmain0227Entity formmain0227 = new Formmain0227Entity();
|
||||||
|
formmain0227.setId(targetBody.getString("billid"));
|
||||||
|
formmain0227.setField0029(returnData.getString("message"));
|
||||||
|
formmain0227.setField0030(isSuccess(success));
|
||||||
|
formmain0227.setDataSourceCode(dataSourceCode);
|
||||||
|
formmain0227Service.updateU8ResMsg(formmain0227);
|
||||||
|
break;
|
||||||
|
case "6223456019738676230"://供应商
|
||||||
|
Formmain0225Entity formmain0225 = new Formmain0225Entity();
|
||||||
|
formmain0225.setId(targetBody.getString("billid"));
|
||||||
|
formmain0225.setField0032(returnData.getString("message"));
|
||||||
|
formmain0225.setField0033(isSuccess(success));
|
||||||
|
formmain0225.setDataSourceCode(dataSourceCode);
|
||||||
|
formmain0225Service.updateFlag(formmain0225);
|
||||||
|
break;
|
||||||
|
case "-9122508232154527168"://客户
|
||||||
|
Formmain0226Entity formmain0226 = new Formmain0226Entity();
|
||||||
|
formmain0226.setId(targetBody.getString("billid"));
|
||||||
|
formmain0226.setField0082(returnData.getString("message"));
|
||||||
|
formmain0226.setField0083(isSuccess(success));
|
||||||
|
formmain0226.setDataSourceCode(dataSourceCode);
|
||||||
|
formmain0226Service.updateFlag(formmain0226);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.error("更新u8返回信息到OA流程表出错",e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity();
|
IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity();
|
||||||
logDetails.setRootAppPk(JSON.toJSONString(param));
|
logDetails.setRootAppPk(JSON.toJSONString(param));
|
||||||
logDetails.setRootAppBill(hzyaExtData.getString("billCode"));
|
logDetails.setRootAppBill(hzyaExtData.getString("billCode"));
|
||||||
|
@ -131,6 +234,8 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||||
//logDetails.setNewState(SysMessageManageLogStatusEnum.statusGetValue(logEntity.getStatus()));
|
//logDetails.setNewState(SysMessageManageLogStatusEnum.statusGetValue(logEntity.getStatus()));
|
||||||
logDetails.setPluginId("SeeyonExtPlugin");
|
logDetails.setPluginId("SeeyonExtPlugin");
|
||||||
try {
|
try {
|
||||||
|
logDetails.setCreate_time(new Date());
|
||||||
|
logDetails.setModify_time(new Date());
|
||||||
if (StrUtil.isEmpty(hzyaExtData.getString("integration_task_living_details_id"))){
|
if (StrUtil.isEmpty(hzyaExtData.getString("integration_task_living_details_id"))){
|
||||||
if (SysMessageManageLogStatusEnum.SUCCESS.getType().equals(logEntity.getStatus())) {//成功
|
if (SysMessageManageLogStatusEnum.SUCCESS.getType().equals(logEntity.getStatus())) {//成功
|
||||||
taskLivingDetailsService.saveLogToSuccess(logDetails);
|
taskLivingDetailsService.saveLogToSuccess(logDetails);
|
||||||
|
@ -139,6 +244,7 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
logDetails.setId(hzyaExtData.getString("integration_task_living_details_id"));
|
logDetails.setId(hzyaExtData.getString("integration_task_living_details_id"));
|
||||||
|
logDetails.setModify_time(new Date());
|
||||||
if (SysMessageManageLogStatusEnum.SUCCESS.getType().equals(logEntity.getStatus())) {//成功
|
if (SysMessageManageLogStatusEnum.SUCCESS.getType().equals(logEntity.getStatus())) {//成功
|
||||||
taskLivingDetailsService.saveLogFailToSuccess(logDetails);
|
taskLivingDetailsService.saveLogFailToSuccess(logDetails);
|
||||||
}else {
|
}else {
|
||||||
|
@ -151,28 +257,90 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||||
}
|
}
|
||||||
|
|
||||||
//存货参数组装
|
//存货参数组装
|
||||||
private SysExtensionApiEntity getInventory(JSONObject businessData,SysExtensionApiEntity param){
|
private SysExtensionApiEntity getInventory(JSONObject businessData,SysExtensionApiEntity param,JSONObject hzyaExtData){
|
||||||
if (null != businessData){
|
if (null != businessData){
|
||||||
|
//物料主表
|
||||||
JSONObject formmain0227 = businessData.getJSONObject("formmain_0227");
|
JSONObject formmain0227 = businessData.getJSONObject("formmain_0227");
|
||||||
JSONArray formson0228Arr = businessData.getJSONArray("formson_0228");
|
//物料明细表 (上层方法处理了,这里是单条传)
|
||||||
for (int i=0; i< formson0228Arr.size(); i++){
|
JSONObject formson0228 = businessData.getJSONObject("formson_0228");
|
||||||
JSONObject formson0228 = formson0228Arr.getJSONObject(i);
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("Token", "Hzya1314_CheckSkip");
|
jsonObject.put("Token", "Hzya1314_CheckSkip");
|
||||||
jsonObject.put("billid", formson0228.getString("id"));
|
jsonObject.put("billid", formson0228.getString("id"));
|
||||||
jsonObject.put("AccId", formmain0227.getString("field0015"));
|
jsonObject.put("AccId", formmain0227.getString("field0015"));
|
||||||
|
/**
|
||||||
|
* bPurchase 是否外购
|
||||||
|
* bComsume 是否生产耗用
|
||||||
|
* bSale 是否销售
|
||||||
|
* bSelf 是否自制
|
||||||
|
* bService 应税劳务
|
||||||
|
* bInvAsset 资产
|
||||||
|
*
|
||||||
|
* iSupplyType 供应类型 默认领用 0
|
||||||
|
* idrawtype 领料方式 默认申请领用
|
||||||
|
* cValueType 计价方式 默认 全月平均法 全月平均法
|
||||||
|
* iImpTaxRate 进项税率 默认13
|
||||||
|
*/
|
||||||
JSONObject oArchives = new JSONObject();
|
JSONObject oArchives = new JSONObject();
|
||||||
oArchives.put("cInvCode", formson0228.getString("field0002"));
|
oArchives.put("cInvCode", formson0228.getString("field0002"));
|
||||||
oArchives.put("cInvCCode", formson0228.getString("field0005"));
|
oArchives.put("cInvCCode", formson0228.getString("field0016"));
|
||||||
oArchives.put("cInvName", formson0228.getString("field0003"));
|
oArchives.put("cInvName", formson0228.getString("field0003"));
|
||||||
//todo 这个没值
|
oArchives.put("cGroupCode", formson0228.getString("field0018"));
|
||||||
oArchives.put("cGroupCode", "01");
|
oArchives.put("cComUnitCode", formson0228.getString("field0017"));
|
||||||
oArchives.put("cComUnitCode", formson0228.getString("field0006"));
|
oArchives.put("cInvStd", formson0228.getString("field0004"));
|
||||||
|
oArchives.put("iSafeNum", formson0228.getString("field0008"));
|
||||||
|
|
||||||
|
oArchives.put("bPurchase",0);
|
||||||
|
oArchives.put("bComsume",0);
|
||||||
|
oArchives.put("bSale",0);
|
||||||
|
oArchives.put("bSelf",0);
|
||||||
|
oArchives.put("bInvAsset",0);
|
||||||
|
oArchives.put("bService",0);
|
||||||
|
|
||||||
|
//存货属性勾选
|
||||||
|
//String attr = formson0228.getString("field0007");
|
||||||
|
String attr = formson0228.getString("field0023");
|
||||||
|
if (StrUtil.isNotEmpty(attr)){
|
||||||
|
String[] attrArr = attr.split("、");
|
||||||
|
for (String s : attrArr) {
|
||||||
|
switch (s){
|
||||||
|
case "采购"://采购
|
||||||
|
case "4447593729630683530"://采购
|
||||||
|
oArchives.put("bPurchase",1);
|
||||||
|
break;
|
||||||
|
case "生产耗用"://生产耗用
|
||||||
|
case "-387621385918919664"://生产耗用
|
||||||
|
oArchives.put("bComsume",1);
|
||||||
|
break;
|
||||||
|
case "内销"://内销
|
||||||
|
case "5069685839370801039"://内销
|
||||||
|
oArchives.put("bSale",1);
|
||||||
|
break;
|
||||||
|
case "自制"://自制
|
||||||
|
case "6067929382885409752"://自制
|
||||||
|
oArchives.put("bSelf",1);
|
||||||
|
break;
|
||||||
|
case "资产"://资产
|
||||||
|
case "-8216072224610695901"://资产
|
||||||
|
oArchives.put("bInvAsset",1);
|
||||||
|
break;
|
||||||
|
case "应税劳务"://应税劳务
|
||||||
|
case "-949779340021054755"://应税劳务
|
||||||
|
oArchives.put("bService",1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
oArchives.put("iSupplyType",0);
|
||||||
|
oArchives.put("idrawtype",1);
|
||||||
|
oArchives.put("cValueType","全月平均法");
|
||||||
|
oArchives.put("iImpTaxRate","13");
|
||||||
|
oArchives.put("iTaxRate","13");
|
||||||
jsonObject.put("oArchives", oArchives);
|
jsonObject.put("oArchives", oArchives);
|
||||||
param.setBodys(JSON.toJSONString(jsonObject));
|
param.setBodys(JSON.toJSONString(jsonObject));
|
||||||
}
|
hzyaExtData.put("serialNumber",formson0228.getString("field0021"));
|
||||||
|
hzyaExtData.put("billCode",formmain0227.getString("field0009"));
|
||||||
|
hzyaExtData.put("formsonId",formson0228.getString("id"));
|
||||||
|
hzyaExtData.put("formmainId",formmain0227.getString("id"));
|
||||||
}
|
}
|
||||||
return param;
|
return param;
|
||||||
}
|
}
|
||||||
|
@ -183,13 +351,22 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("billid", formmain0225.getString("id"));
|
jsonObject.put("billid", formmain0225.getString("id"));
|
||||||
jsonObject.put("AccId", formmain0225.getString("field0020"));
|
jsonObject.put("AccId", formmain0225.getString("field0020"));
|
||||||
jsonObject.put("Token", U8Util.getToken());
|
//jsonObject.put("Token", U8Util.getToken());
|
||||||
|
jsonObject.put("Token", "Hzya1314_CheckSkip");
|
||||||
JSONObject oArchives = new JSONObject();
|
JSONObject oArchives = new JSONObject();
|
||||||
|
//供应商编码由U8生成
|
||||||
oArchives.put("cVenCode", formmain0225.getString("field0002"));
|
oArchives.put("cVenCode", formmain0225.getString("field0002"));
|
||||||
oArchives.put("cVenName ", formmain0225.getString("field0003"));
|
oArchives.put("cVenName", formmain0225.getString("field0003"));
|
||||||
oArchives.put("cVenAbbName", formmain0225.getString("field0004"));
|
oArchives.put("cVenAbbName", formmain0225.getString("field0004"));
|
||||||
oArchives.put("cVCCode", formmain0225.getString("field0006"));
|
oArchives.put("cVCCode", formmain0225.getString("field0021"));
|
||||||
oArchives.put("cVenExch_name", formmain0225.getString("field0010"));
|
oArchives.put("iVenTaxRate", formmain0225.getString("field0007"));
|
||||||
|
oArchives.put("cDCCode", formmain0225.getString("field0026"));
|
||||||
|
oArchives.put("cVenExch_name", getExchName(formmain0225.getString("field0010")));
|
||||||
|
oArchives.put("cVenAddress", formmain0225.getString("field0017"));
|
||||||
|
oArchives.put("cVenPerson", formmain0225.getString("field0014"));
|
||||||
|
oArchives.put("cVenPhone", formmain0225.getString("field0015"));
|
||||||
|
oArchives.put("cVenHand", formmain0225.getString("field0015"));
|
||||||
|
oArchives.put("cMemo", formmain0225.getString("field0023"));
|
||||||
//oArchives.put("bVenTax", "false");
|
//oArchives.put("bVenTax", "false");
|
||||||
//oArchives.put("bLicenceDate", "false");
|
//oArchives.put("bLicenceDate", "false");
|
||||||
//oArchives.put("bBusinessDate", "false");
|
//oArchives.put("bBusinessDate", "false");
|
||||||
|
@ -206,6 +383,20 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||||
oArchives.put("cVenRegCode", formmain0225.getString("field0009"));
|
oArchives.put("cVenRegCode", formmain0225.getString("field0009"));
|
||||||
oArchives.put("cVenBank", formmain0225.getString("field0011"));
|
oArchives.put("cVenBank", formmain0225.getString("field0011"));
|
||||||
oArchives.put("cVenAccount", formmain0225.getString("field0012"));
|
oArchives.put("cVenAccount", formmain0225.getString("field0012"));
|
||||||
|
if (StrUtil.isNotEmpty(formmain0225.getString("field0018"))){
|
||||||
|
String field0018 = DateUtil.format(formmain0225.getDate("field0018"), "yyyy-MM-dd");
|
||||||
|
oArchives.put("dVenDevDate", field0018);
|
||||||
|
}
|
||||||
|
oArchives.put("cVenPPerson",formmain0225.getString("field0028"));
|
||||||
|
//专管业务员 09001是张燕
|
||||||
|
if (StrUtil.isEmpty(formmain0225.getString("field0028"))){
|
||||||
|
oArchives.put("cVenPPerson","09001");
|
||||||
|
}
|
||||||
|
oArchives.put("cVenDepart",formmain0225.getString("field0029"));
|
||||||
|
//分管部门 13是采购部
|
||||||
|
if (StrUtil.isEmpty(formmain0225.getString("field0029"))){
|
||||||
|
oArchives.put("cVenDepart","13");
|
||||||
|
}
|
||||||
jsonObject.put("oArchives", oArchives);
|
jsonObject.put("oArchives", oArchives);
|
||||||
param.setBodys(JSON.toJSONString(jsonObject));
|
param.setBodys(JSON.toJSONString(jsonObject));
|
||||||
hzyaExtData.put("billCode", formmain0225.getString("field0001"));
|
hzyaExtData.put("billCode", formmain0225.getString("field0001"));
|
||||||
|
@ -226,11 +417,33 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||||
oArchives.put("cCusCode", formmain0226.getString("field0002"));
|
oArchives.put("cCusCode", formmain0226.getString("field0002"));
|
||||||
oArchives.put("cCusName", formmain0226.getString("field0007"));
|
oArchives.put("cCusName", formmain0226.getString("field0007"));
|
||||||
oArchives.put("cCusAbbName", formmain0226.getString("field0008"));
|
oArchives.put("cCusAbbName", formmain0226.getString("field0008"));
|
||||||
oArchives.put("cCCCode", formmain0226.getString("field0012"));
|
oArchives.put("cCCCode", formmain0226.getString("field0026"));
|
||||||
oArchives.put("cCusExch_name", formmain0226.getString("field0013"));
|
oArchives.put("cCusExch_name", getExchName(formmain0226.getString("field0013")));
|
||||||
// todo 这个字段没值
|
|
||||||
oArchives.put("cCusMngTypeCode", "999");
|
|
||||||
|
|
||||||
|
oArchives.put("cCusAddress", formmain0226.getString("field0009"));
|
||||||
|
oArchives.put("dCusDevDate", formmain0226.getString("field0010"));
|
||||||
|
if (StrUtil.isNotEmpty(formmain0226.getString("field0010"))) {
|
||||||
|
String field0010 = DateUtil.format(formmain0226.getDate("field0010"), "yyyy-MM-dd");
|
||||||
|
oArchives.put("dDepBeginDate", field0010);
|
||||||
|
}
|
||||||
|
oArchives.put("dCusDevDate", DateUtil.today());
|
||||||
|
oArchives.put("cDCCode", formmain0226.getString("field0029"));
|
||||||
|
oArchives.put("cCusRegCode", formmain0226.getString("field0014"));
|
||||||
|
oArchives.put("cCusAccount", formmain0226.getString("field0015"));
|
||||||
|
oArchives.put("cCusBank", formmain0226.getString("field0016"));
|
||||||
|
oArchives.put("cCusPerson", formmain0226.getString("field0020"));
|
||||||
|
oArchives.put("cCusHand", formmain0226.getString("field0021"));
|
||||||
|
oArchives.put("cCusPhone", formmain0226.getString("field0021"));
|
||||||
|
oArchives.put("cCusDepart",formmain0226.getString("field0074"));
|
||||||
|
oArchives.put("cCusPPerson",formmain0226.getString("field0073"));
|
||||||
|
//客户管理类型 默认 999
|
||||||
|
oArchives.put("cCusMngTypeCode", "999");
|
||||||
|
//bCusOverseas 是否国外
|
||||||
|
//bCusDomestic 是否国内
|
||||||
|
oArchives.put("bCusDomestic","1");
|
||||||
|
oArchives.put("bCusOverseas","1");
|
||||||
|
//整车结算
|
||||||
|
oArchives.put("cCusDefine2",getZcjsName(formmain0226.getString("field0022")));
|
||||||
jsonObject.put("oArchives", oArchives);
|
jsonObject.put("oArchives", oArchives);
|
||||||
param.setBodys(JSON.toJSONString(jsonObject));
|
param.setBodys(JSON.toJSONString(jsonObject));
|
||||||
hzyaExtData.put("billCode",formmain0226.getString("field0001"));
|
hzyaExtData.put("billCode",formmain0226.getString("field0001"));
|
||||||
|
@ -238,4 +451,29 @@ public class SeeyonExtServiceImpl implements ISeeyonExtService {
|
||||||
}
|
}
|
||||||
return param;
|
return param;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//币种枚举
|
||||||
|
private String getExchName(String exchId){
|
||||||
|
if ("-4937388245590851205".equals(exchId)){
|
||||||
|
return "人民币";
|
||||||
|
}else if ("-4041702741131967213".equals(exchId)){
|
||||||
|
return "美元";
|
||||||
|
}
|
||||||
|
return "人民币";
|
||||||
|
}
|
||||||
|
//整车结算枚举
|
||||||
|
private String getZcjsName(String enumId){
|
||||||
|
if (StrUtil.isNotEmpty(enumId)){
|
||||||
|
if ("8135646086311530334".equals(enumId)){
|
||||||
|
return "整车结算";
|
||||||
|
}else if ("4519958681973247818".equals(enumId)){
|
||||||
|
return "实际用量结算";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "实际用量结算";
|
||||||
|
}
|
||||||
|
|
||||||
|
private String isSuccess(String flag){
|
||||||
|
return "true".equals(flag) ? "成功" : "失败";
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description ydc 供应商申请表
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 14:10
|
||||||
|
**/
|
||||||
|
public interface IFormmain0225Dao extends IBaseDao<Formmain0225Entity, String> {
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0226Entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description ydc 客户申请表
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/9 08:48
|
||||||
|
**/
|
||||||
|
public interface IFormmain0226Dao extends IBaseDao<Formmain0226Entity, String> {
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.dao;
|
||||||
|
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0227Entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ydc oa存货申请
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 10:47
|
||||||
|
**/
|
||||||
|
public interface IFormmain0227Dao extends IBaseDao<Formmain0227Entity, String> {
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.dao;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.IBaseDao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.FormmainEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 公用
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/9 14:29
|
||||||
|
**/
|
||||||
|
public interface IFormmainDao extends IBaseDao<FormmainEntity, String> {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmain0225Dao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 14:12
|
||||||
|
**/
|
||||||
|
@Repository(value = "Formmain0225DaoImpl")
|
||||||
|
public class Formmain0225DaoImpl extends MybatisGenericDao<Formmain0225Entity, String> implements IFormmain0225Dao {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmain0226Dao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0226Entity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/9 08:49
|
||||||
|
**/
|
||||||
|
@Repository(value = "Formmain0226DaoImpl")
|
||||||
|
public class Formmain0226DaoImpl extends MybatisGenericDao<Formmain0226Entity, String> implements IFormmain0226Dao {
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.dao.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmain0227Dao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0227Entity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 10:54
|
||||||
|
**/
|
||||||
|
@Repository(value = "Formmain0227DaoImpl")
|
||||||
|
public class Formmain0227DaoImpl extends MybatisGenericDao<Formmain0227Entity, String> implements IFormmain0227Dao {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.dao.impl;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.dao.MybatisGenericDao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmain0225Dao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmainDao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.FormmainEntity;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/9 14:29
|
||||||
|
**/
|
||||||
|
@Repository(value = "FormmainDaoImpl")
|
||||||
|
public class FormmainDaoImpl extends MybatisGenericDao<FormmainEntity, String> implements IFormmainDao {
|
||||||
|
}
|
|
@ -0,0 +1,96 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description ydc 供应商申请表
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 14:04
|
||||||
|
**/
|
||||||
|
public class Formmain0225Entity extends BaseEntity {
|
||||||
|
|
||||||
|
private String field0001;//单据编号
|
||||||
|
private String field0002;//供应商编码
|
||||||
|
private String field0003;//供应商名称
|
||||||
|
private String field0004;//供应商简称
|
||||||
|
private String field0025;//推送标记
|
||||||
|
//推送标记查询用
|
||||||
|
private String field0025Flag;
|
||||||
|
//流程结束标记
|
||||||
|
private String finishedflag;
|
||||||
|
//u8返回信息
|
||||||
|
private String field0032;
|
||||||
|
//u8返回结果
|
||||||
|
private String field0033;
|
||||||
|
public String getField0001() {
|
||||||
|
return field0001;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0001(String field0001) {
|
||||||
|
this.field0001 = field0001;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0002() {
|
||||||
|
return field0002;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0002(String field0002) {
|
||||||
|
this.field0002 = field0002;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0003() {
|
||||||
|
return field0003;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0003(String field0003) {
|
||||||
|
this.field0003 = field0003;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0004() {
|
||||||
|
return field0004;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0004(String field0004) {
|
||||||
|
this.field0004 = field0004;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0025() {
|
||||||
|
return field0025;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0025(String field0025) {
|
||||||
|
this.field0025 = field0025;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0025Flag() {
|
||||||
|
return field0025Flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0025Flag(String field0025Flag) {
|
||||||
|
this.field0025Flag = field0025Flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFinishedflag() {
|
||||||
|
return finishedflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFinishedflag(String finishedflag) {
|
||||||
|
this.finishedflag = finishedflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0032() {
|
||||||
|
return field0032;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0032(String field0032) {
|
||||||
|
this.field0032 = field0032;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0033() {
|
||||||
|
return field0033;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0033(String field0033) {
|
||||||
|
this.field0033 = field0033;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hzya.frame.seeyon.ydc.dao.impl.Formmain0225DaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-Formmain0225-result" type="com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0001" column="field0001" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0002" column="field0002" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0003" column="field0003" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0004" column="field0004" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0025" column="field0025" jdbcType="VARCHAR"/>
|
||||||
|
<result property="finishedflag" column="finishedflag" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "Formmain0225_Base_Column_List">
|
||||||
|
id,
|
||||||
|
field0001,
|
||||||
|
field0002,
|
||||||
|
field0003,
|
||||||
|
field0004,
|
||||||
|
field0025,
|
||||||
|
finishedflag
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-Formmain0225-result" parameterType = "com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity">
|
||||||
|
select
|
||||||
|
<include refid="Formmain0225_Base_Column_List" />
|
||||||
|
from formmain_0225
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="field0001 != null and field0001 != ''"> and field0001 = #{field0001} </if>
|
||||||
|
<if test="finishedflag != null and finishedflag != ''"> and finishedflag = #{finishedflag} </if>
|
||||||
|
<if test="field0025Flag != null and field0025Flag != ''"> and field0025 is null </if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity" >
|
||||||
|
update formmain_0225 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="field0025 != null and field0025 != ''"> field0025 = #{field0025},</if>
|
||||||
|
<if test="field0032 != null and field0032 != ''"> field0032 = #{field0032},</if>
|
||||||
|
<if test="field0033 != null and field0033 != ''"> field0033 = #{field0033}</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,148 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description ydc 客户申请表
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 15:42
|
||||||
|
**/
|
||||||
|
public class Formmain0226Entity extends BaseEntity {
|
||||||
|
|
||||||
|
private String field0001;//单据编号
|
||||||
|
private String field0002;//档案编号
|
||||||
|
private String field0003;//体系编号
|
||||||
|
private String field0004;//发起人
|
||||||
|
private String field0005;//发起部门
|
||||||
|
private String field0006;//填表日期
|
||||||
|
private String field0007;//客户公司名称
|
||||||
|
private String field0008;//客户简称
|
||||||
|
private String field0009;//公司地址
|
||||||
|
private String field0010;//成立时间
|
||||||
|
private String field0028;//推送标记
|
||||||
|
private String field0028Flag;//推送标记查询字段
|
||||||
|
//流程结束标记
|
||||||
|
private String finishedflag;
|
||||||
|
|
||||||
|
private String field0082;//u8返回信息
|
||||||
|
private String field0083;//u8返回结果
|
||||||
|
public String getField0001() {
|
||||||
|
return field0001;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0001(String field0001) {
|
||||||
|
this.field0001 = field0001;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0002() {
|
||||||
|
return field0002;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0002(String field0002) {
|
||||||
|
this.field0002 = field0002;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0003() {
|
||||||
|
return field0003;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0003(String field0003) {
|
||||||
|
this.field0003 = field0003;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0004() {
|
||||||
|
return field0004;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0004(String field0004) {
|
||||||
|
this.field0004 = field0004;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0005() {
|
||||||
|
return field0005;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0005(String field0005) {
|
||||||
|
this.field0005 = field0005;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0006() {
|
||||||
|
return field0006;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0006(String field0006) {
|
||||||
|
this.field0006 = field0006;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0007() {
|
||||||
|
return field0007;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0007(String field0007) {
|
||||||
|
this.field0007 = field0007;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0008() {
|
||||||
|
return field0008;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0008(String field0008) {
|
||||||
|
this.field0008 = field0008;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0009() {
|
||||||
|
return field0009;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0009(String field0009) {
|
||||||
|
this.field0009 = field0009;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0010() {
|
||||||
|
return field0010;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0010(String field0010) {
|
||||||
|
this.field0010 = field0010;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0028() {
|
||||||
|
return field0028;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0028(String field0028) {
|
||||||
|
this.field0028 = field0028;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0028Flag() {
|
||||||
|
return field0028Flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0028Flag(String field0028Flag) {
|
||||||
|
this.field0028Flag = field0028Flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFinishedflag() {
|
||||||
|
return finishedflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFinishedflag(String finishedflag) {
|
||||||
|
this.finishedflag = finishedflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0082() {
|
||||||
|
return field0082;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0082(String field0082) {
|
||||||
|
this.field0082 = field0082;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0083() {
|
||||||
|
return field0083;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0083(String field0083) {
|
||||||
|
this.field0083 = field0083;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hzya.frame.seeyon.ydc.dao.impl.Formmain0226DaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-Formmain0226-result" type="com.hzya.frame.seeyon.ydc.entity.Formmain0226Entity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0001" column="field0001" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0002" column="field0002" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0003" column="field0003" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0004" column="field0004" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0005" column="field0005" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0006" column="field0006" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0007" column="field0007" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0008" column="field0008" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0009" column="field0009" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0010" column="field0010" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0028" column="field0028" jdbcType="VARCHAR"/>
|
||||||
|
<result property="finishedflag" column="finishedflag" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "Formmain0226_Base_Column_List">
|
||||||
|
id,
|
||||||
|
field0001,
|
||||||
|
field0002,
|
||||||
|
field0003,
|
||||||
|
field0004,
|
||||||
|
field0005,
|
||||||
|
field0006,
|
||||||
|
field0007,
|
||||||
|
field0008,
|
||||||
|
field0009,
|
||||||
|
field0010,
|
||||||
|
field0028,
|
||||||
|
finishedflag
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-Formmain0226-result" parameterType = "com.hzya.frame.seeyon.ydc.entity.Formmain0226Entity">
|
||||||
|
select
|
||||||
|
<include refid="Formmain0226_Base_Column_List" />
|
||||||
|
from formmain_0226
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="field0001 != null and field0001 != ''"> and field0001 = #{field0001} </if>
|
||||||
|
<if test="finishedflag != null and finishedflag != ''"> and finishedflag = #{finishedflag} </if>
|
||||||
|
<if test="field0028Flag != null and field0028Flag != ''"> and field0028 is null </if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.seeyon.ydc.entity.Formmain0226Entity" >
|
||||||
|
update formmain_0226 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="field0028 != null and field0028 != ''"> field0028 = #{field0028},</if>
|
||||||
|
<if test="field0082 != null and field0082 != ''"> field0082 = #{field0082},</if>
|
||||||
|
<if test="field0083 != null and field0083 != ''"> field0083 = #{field0083}</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,130 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description OA存货申请
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 10:27
|
||||||
|
**/
|
||||||
|
public class Formmain0227Entity extends BaseEntity {
|
||||||
|
|
||||||
|
//单据编号
|
||||||
|
private String field0009;
|
||||||
|
//发起人
|
||||||
|
private String field0010;
|
||||||
|
//发起部门
|
||||||
|
private String field0011;
|
||||||
|
//填表日期
|
||||||
|
private String field0012;
|
||||||
|
//所属公司
|
||||||
|
private String field0013;
|
||||||
|
//新增或修改
|
||||||
|
private String field0014;
|
||||||
|
//所属帐套
|
||||||
|
private String field0015;
|
||||||
|
//推送标记
|
||||||
|
private String field0022;
|
||||||
|
//推送标记查询用
|
||||||
|
private String field0022Flag;
|
||||||
|
//流程结束标记
|
||||||
|
private String finishedflag;
|
||||||
|
|
||||||
|
private String field0029;//子表的u8返回信息
|
||||||
|
private String field0030;//子表的u8返回状态
|
||||||
|
public String getField0009() {
|
||||||
|
return field0009;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0009(String field0009) {
|
||||||
|
this.field0009 = field0009;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0010() {
|
||||||
|
return field0010;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0010(String field0010) {
|
||||||
|
this.field0010 = field0010;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0011() {
|
||||||
|
return field0011;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0011(String field0011) {
|
||||||
|
this.field0011 = field0011;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0012() {
|
||||||
|
return field0012;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0012(String field0012) {
|
||||||
|
this.field0012 = field0012;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0013() {
|
||||||
|
return field0013;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0013(String field0013) {
|
||||||
|
this.field0013 = field0013;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0014() {
|
||||||
|
return field0014;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0014(String field0014) {
|
||||||
|
this.field0014 = field0014;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0015() {
|
||||||
|
return field0015;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0015(String field0015) {
|
||||||
|
this.field0015 = field0015;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFinishedflag() {
|
||||||
|
return finishedflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFinishedflag(String finishedflag) {
|
||||||
|
this.finishedflag = finishedflag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0022() {
|
||||||
|
return field0022;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0022(String field0022) {
|
||||||
|
this.field0022 = field0022;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0022Flag() {
|
||||||
|
return field0022Flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0022Flag(String field0022Flag) {
|
||||||
|
this.field0022Flag = field0022Flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0029() {
|
||||||
|
return field0029;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0029(String field0029) {
|
||||||
|
this.field0029 = field0029;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0030() {
|
||||||
|
return field0030;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0030(String field0030) {
|
||||||
|
this.field0030 = field0030;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hzya.frame.seeyon.ydc.dao.impl.Formmain0227DaoImpl">
|
||||||
|
|
||||||
|
<resultMap id="get-Formmain0227-result" type="com.hzya.frame.seeyon.ydc.entity.Formmain0227Entity" >
|
||||||
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0009" column="field0009" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0010" column="field0010" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0011" column="field0011" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0013" column="field0013" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0014" column="field0014" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0015" column="field0015" jdbcType="VARCHAR"/>
|
||||||
|
<result property="field0022" column="field0022" jdbcType="VARCHAR"/>
|
||||||
|
<result property="finishedflag" column="finishedflag" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
<!-- 查询的字段-->
|
||||||
|
<sql id = "Formmain0227_Base_Column_List">
|
||||||
|
id,
|
||||||
|
field0009,
|
||||||
|
field0010,
|
||||||
|
field0011,
|
||||||
|
field0013,
|
||||||
|
field0014,
|
||||||
|
finishedflag,
|
||||||
|
field0022,
|
||||||
|
field0015
|
||||||
|
</sql>
|
||||||
|
<!-- 查询 采用==查询 -->
|
||||||
|
<select id="entity_list_base" resultMap="get-Formmain0227-result" parameterType = "com.hzya.frame.seeyon.ydc.entity.Formmain0227Entity">
|
||||||
|
select
|
||||||
|
<include refid="Formmain0227_Base_Column_List" />
|
||||||
|
from formmain_0227
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="field0009 != null and field0009 != ''"> and field0009 = #{field0009} </if>
|
||||||
|
<if test="finishedflag != null and finishedflag != ''"> and finishedflag = #{finishedflag} </if>
|
||||||
|
<if test="field0022Flag != null and field0022Flag != ''"> and field0022 is null </if>
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<!--通过主键修改方法-->
|
||||||
|
<update id="entity_update" parameterType = "com.hzya.frame.seeyon.ydc.entity.Formmain0227Entity" >
|
||||||
|
update formmain_0227 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="field0022 != null and field0022 != ''"> field0022 = #{field0022}</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!--更新子表-->
|
||||||
|
<update id="entity_update_formson" parameterType = "com.hzya.frame.seeyon.ydc.entity.Formmain0227Entity" >
|
||||||
|
update formson_0228 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="field0029 != null and field0029 != ''"> field0029 = #{field0029},</if>
|
||||||
|
<if test="field0030 != null and field0030 != ''"> field0030 = #{field0030}</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,102 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.entity;
|
||||||
|
|
||||||
|
import com.hzya.frame.web.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 公用
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/9 14:25
|
||||||
|
**/
|
||||||
|
public class FormmainEntity extends BaseEntity {
|
||||||
|
|
||||||
|
private String field0001;
|
||||||
|
private String field0002;
|
||||||
|
private String field0003;
|
||||||
|
private String field0009;
|
||||||
|
private String field0014;
|
||||||
|
private String field0015;
|
||||||
|
private String field0016;
|
||||||
|
private String field0017;
|
||||||
|
private String field0024;
|
||||||
|
private String field0028;
|
||||||
|
|
||||||
|
public String getField0001() {
|
||||||
|
return field0001;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0001(String field0001) {
|
||||||
|
this.field0001 = field0001;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0002() {
|
||||||
|
return field0002;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0002(String field0002) {
|
||||||
|
this.field0002 = field0002;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0003() {
|
||||||
|
return field0003;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0003(String field0003) {
|
||||||
|
this.field0003 = field0003;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0009() {
|
||||||
|
return field0009;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0009(String field0009) {
|
||||||
|
this.field0009 = field0009;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0014() {
|
||||||
|
return field0014;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0014(String field0014) {
|
||||||
|
this.field0014 = field0014;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0024() {
|
||||||
|
return field0024;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0024(String field0024) {
|
||||||
|
this.field0024 = field0024;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0017() {
|
||||||
|
return field0017;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0017(String field0017) {
|
||||||
|
this.field0017 = field0017;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0015() {
|
||||||
|
return field0015;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0015(String field0015) {
|
||||||
|
this.field0015 = field0015;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0016() {
|
||||||
|
return field0016;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0016(String field0016) {
|
||||||
|
this.field0016 = field0016;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getField0028() {
|
||||||
|
return field0028;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setField0028(String field0028) {
|
||||||
|
this.field0028 = field0028;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.hzya.frame.seeyon.ydc.dao.impl.FormmainDaoImpl">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 供应商底表 -->
|
||||||
|
<update id="entity_update_0056" parameterType = "com.hzya.frame.seeyon.ydc.entity.FormmainEntity" >
|
||||||
|
update formmain_0056 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="field0001 != null and field0001 != ''"> field0001 = #{field0001}</if>
|
||||||
|
</trim>
|
||||||
|
where field0017 = #{field0017}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 客户底表 -->
|
||||||
|
<update id="entity_update_0230" parameterType = "com.hzya.frame.seeyon.ydc.entity.FormmainEntity" >
|
||||||
|
update formmain_0230 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="field0002 != null and field0002 != ''"> field0002 = #{field0002}</if>
|
||||||
|
</trim>
|
||||||
|
where field0001 = #{field0001}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 存货底表 -->
|
||||||
|
<update id="entity_update_0055" parameterType = "com.hzya.frame.seeyon.ydc.entity.FormmainEntity" >
|
||||||
|
update formmain_0055 set
|
||||||
|
<trim suffix="" suffixOverrides=",">
|
||||||
|
<if test="field0002 != null and field0002 != ''"> field0002 = #{field0002}</if>
|
||||||
|
</trim>
|
||||||
|
where field0016 = #{field0016} and field0028 = #{field0028}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description ydc oa供应商申请
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 14:18
|
||||||
|
**/
|
||||||
|
public interface IFormmain0225Service extends IBaseService<Formmain0225Entity, String> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新推送标记
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
void updateFlag(Formmain0225Entity entity);
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0226Entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/9 08:54
|
||||||
|
**/
|
||||||
|
public interface IFormmain0226Service extends IBaseService<Formmain0226Entity, String> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新推送标记
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
void updateFlag(Formmain0226Entity entity);
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0227Entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description ydc oa存货申请
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 10:56
|
||||||
|
**/
|
||||||
|
public interface IFormmain0227Service extends IBaseService<Formmain0227Entity, String> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新推送标记
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
void updateFlag(Formmain0227Entity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新u8返回信息
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
void updateU8ResMsg(Formmain0227Entity entity);
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.service;
|
||||||
|
|
||||||
|
import com.hzya.frame.basedao.service.IBaseService;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.FormmainEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/9 14:30
|
||||||
|
**/
|
||||||
|
public interface IFormmainService extends IBaseService<FormmainEntity, String> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新供应商档案编码
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
void updateSupplierCode(FormmainEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新客户档案编码
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
void updateCustomerCode(FormmainEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新存货档案编码
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
void updateInventoryCode(FormmainEntity entity);
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmain0225Dao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmain0225Service;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 14:19
|
||||||
|
**/
|
||||||
|
@Service()
|
||||||
|
public class Formmain0225ServiceImpl extends BaseService<Formmain0225Entity, String> implements IFormmain0225Service {
|
||||||
|
|
||||||
|
private IFormmain0225Dao formmain0225Dao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setFormmain0225Dao(IFormmain0225Dao dao) {
|
||||||
|
this.formmain0225Dao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新推送标记
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public void updateFlag(Formmain0225Entity entity) {
|
||||||
|
formmain0225Dao.update("com.hzya.frame.seeyon.ydc.dao.impl.Formmain0225DaoImpl.entity_update",entity);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmain0226Dao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0226Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmain0225Service;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmain0226Service;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/9 08:55
|
||||||
|
**/
|
||||||
|
@Service()
|
||||||
|
public class Formmain0226ServiceImpl extends BaseService<Formmain0226Entity, String> implements IFormmain0226Service {
|
||||||
|
|
||||||
|
private IFormmain0226Dao formmain0226Dao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setFormmain0226Dao(IFormmain0226Dao dao) {
|
||||||
|
this.formmain0226Dao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新推送标记
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public void updateFlag(Formmain0226Entity entity) {
|
||||||
|
formmain0226Dao.update("com.hzya.frame.seeyon.ydc.dao.impl.Formmain0226DaoImpl.entity_update",entity);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmain0227Dao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0227Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmain0227Service;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description ydc oa存货申请
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/8 10:57
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class Formmain0227ServiceImpl extends BaseService<Formmain0227Entity, String> implements IFormmain0227Service {
|
||||||
|
|
||||||
|
IFormmain0227Dao formmain0227Dao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setFormmain0227Dao(IFormmain0227Dao dao) {
|
||||||
|
this.formmain0227Dao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新推送标记
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public void updateFlag(Formmain0227Entity entity) {
|
||||||
|
formmain0227Dao.update("com.hzya.frame.seeyon.ydc.dao.impl.Formmain0227DaoImpl.entity_update",entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新u8返回信息
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public void updateU8ResMsg(Formmain0227Entity entity) {
|
||||||
|
formmain0227Dao.update("com.hzya.frame.seeyon.ydc.dao.impl.Formmain0227DaoImpl.entity_update_formson",entity);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,72 @@
|
||||||
|
package com.hzya.frame.seeyon.ydc.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||||
|
import com.hzya.frame.seeyon.ydc.dao.IFormmainDao;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.entity.FormmainEntity;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmain0225Service;
|
||||||
|
import com.hzya.frame.seeyon.ydc.service.IFormmainService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description
|
||||||
|
* @Author xiangerlin
|
||||||
|
* @Date 2024/7/9 14:30
|
||||||
|
**/
|
||||||
|
@Service()
|
||||||
|
public class FormmainServiceImpl extends BaseService<FormmainEntity, String> implements IFormmainService {
|
||||||
|
|
||||||
|
private IFormmainDao formmainDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setFormmainDao(IFormmainDao dao) {
|
||||||
|
this.formmainDao = dao;
|
||||||
|
this.dao = dao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新供应商档案编码
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public void updateSupplierCode(FormmainEntity entity) {
|
||||||
|
if (null != entity && StrUtil.isNotEmpty(entity.getField0001()) && StrUtil.isNotEmpty(entity.getField0017())){
|
||||||
|
formmainDao.update("com.hzya.frame.seeyon.ydc.dao.impl.FormmainDaoImpl.entity_update_0056",entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新客户档案编码
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public void updateCustomerCode(FormmainEntity entity) {
|
||||||
|
if (null != entity
|
||||||
|
&& StrUtil.isNotEmpty(entity.getField0002())
|
||||||
|
&& StrUtil.isNotEmpty(entity.getField0001())){
|
||||||
|
formmainDao.update("com.hzya.frame.seeyon.ydc.dao.impl.FormmainDaoImpl.entity_update_0230",entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新存货档案编码
|
||||||
|
*
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public void updateInventoryCode(FormmainEntity entity) {
|
||||||
|
if (null != entity
|
||||||
|
&& StrUtil.isNotEmpty(entity.getField0016())
|
||||||
|
&& StrUtil.isNotEmpty(entity.getField0028())){
|
||||||
|
formmainDao.update("com.hzya.frame.seeyon.ydc.dao.impl.FormmainDaoImpl.entity_update_0055",entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -143,8 +143,7 @@
|
||||||
<if test="companyId != null and companyId != ''">and company_id like concat('%',#{companyId},'%')</if>
|
<if test="companyId != null and companyId != ''">and company_id like concat('%',#{companyId},'%')</if>
|
||||||
and sts='Y'
|
and sts='Y'
|
||||||
</trim>
|
</trim>
|
||||||
<if test=" sort == null or sort == ''.toString() ">order by sorts desc</if>
|
order by modify_time desc
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询列表 字段采用or格式 -->
|
<!-- 查询列表 字段采用or格式 -->
|
||||||
|
|
|
@ -18,9 +18,10 @@ public class U8Util {
|
||||||
|
|
||||||
//获取token
|
//获取token
|
||||||
public static String getToken() {
|
public static String getToken() {
|
||||||
String url = "http://127.0.0.1:51910/Api/Base/GetToken";
|
String url = "http://192.168.16.254:8090/Api/Base/GetToken";
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("secretkey", "L1NhkDrQhtBDzTxFxPI0jxWcBzTBSPvaI5xZusRRi9ofS9d6ngxrj1erwbdjxtUT");
|
jsonObject.put("appid","");
|
||||||
|
jsonObject.put("secretkey", "TTbL3vW+7zacFsXMC6+Shb5glU+akoflYopJ0OdEGVA=");
|
||||||
logger.info("获取U8token参数:{}", jsonObject.toJSONString());
|
logger.info("获取U8token参数:{}", jsonObject.toJSONString());
|
||||||
String token = HttpRequest.post( url).body(jsonObject.toJSONString()).timeout(60000).execute().body();
|
String token = HttpRequest.post( url).body(jsonObject.toJSONString()).timeout(60000).execute().body();
|
||||||
logger.info("token返回参数:{}", jsonObject.toJSONString());
|
logger.info("token返回参数:{}", jsonObject.toJSONString());
|
||||||
|
|
Loading…
Reference in New Issue