Merge remote-tracking branch 'origin/ht' into ht

# Conflicts:
#	secondev-history-action/src/main/java/com/weaver/seconddev/interfaces/prop/ConfigProp.java
ht
calyrex 3 months ago
commit 59fb0f04a6

@ -71,14 +71,22 @@ public class CallEasBlacklistServices {
info.setSYSID("SYS005"); info.setSYSID("SYS005");
input.setSyncBlackListInfo(info); input.setSyncBlackListInfo(info);
String uri = configProp.getNewblacklist(); String uri = configProp.getNewblacklist();
logger.error("------- uri= " + uri);
SI_BlacklistSync_OUTServiceStub stub = new SI_BlacklistSync_OUTServiceStub(uri); SI_BlacklistSync_OUTServiceStub stub = new SI_BlacklistSync_OUTServiceStub(uri);
stub._getServiceClient().getOptions().setProperty("__CHUNKED__", Boolean.FALSE); stub._getServiceClient().getOptions().setProperty("__CHUNKED__", Boolean.FALSE);
stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(300000); stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(300000);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.SO_TIMEOUT,300000); stub._getServiceClient().getOptions().setProperty(HTTPConstants.SO_TIMEOUT,300000);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.CONNECTION_TIMEOUT,300000); stub._getServiceClient().getOptions().setProperty(HTTPConstants.CONNECTION_TIMEOUT,300000);
HttpTransportPropertiesImpl.Authenticator auth = new HttpTransportPropertiesImpl.Authenticator(); HttpTransportPropertiesImpl.Authenticator auth = new HttpTransportPropertiesImpl.Authenticator();
auth.setUsername("pouser");
auth.setPassword("htjt_2018"); // auth.setUsername("pouser");
// auth.setPassword("htjt_2018");
String user = configProp.getHtsysjcmt_po_user();
String password = configProp.getHtsysjcmt_po_password();
logger.error("------- user : " + user);
logger.error("------- password : " + password);
auth.setUsername(user);
auth.setPassword(password);
stub._getServiceClient().getOptions().setProperty(org.apache.axis2.kernel.http.HTTPConstants.AUTHENTICATE,auth); stub._getServiceClient().getOptions().setProperty(org.apache.axis2.kernel.http.HTTPConstants.AUTHENTICATE,auth);

@ -24,7 +24,7 @@ public class ChangeWhiteListState {
public static final org.slf4j.Logger logger = LoggerFactory.getLogger(ChangeWhiteListState.class); public static final org.slf4j.Logger logger = LoggerFactory.getLogger(ChangeWhiteListState.class);
public void changeState(List<Map<String, String>> list) { public void changeState(List<Map<String, String>> list) {
logger.error(String.valueOf("新增黑名单时更改白名单状态开始")); logger.error(String.valueOf("新增黑名单时更改白名单状态开始 list = " + list.toString()));
RecordSet rs = I18nContextUtil.getBean(RecordSet.class); RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
try { try {
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
@ -34,10 +34,12 @@ public class ChangeWhiteListState {
String dm = list.get(i).get("dm"); String dm = list.get(i).get("dm");
String sql = ""; String sql = "";
if (!"".equals(mc) && mc != null) { if (!"".equals(mc) && mc != null) {
sql = "select * from e10_core_business.dbo.formtable_main_1556 where (mc='" + mc + "' or shxydm='" + dm + "') and bmdzt='0'"; sql = "select * from e10_core_business.dbo.formtable_main_1716 where (mc='" + mc + "' or shxydm='" + dm + "') and bmdzt='0'";
logger.error(String.valueOf("sql1 = " + sql ));
String poolname = CONN_TYPE.workflow.getType(); String poolname = CONN_TYPE.workflow.getType();
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源 // TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源
rs.executeSql(sql, poolname); boolean b1 = rs.executeSql(sql, poolname);
logger.error(String.valueOf("b1 = " + b1 ));
} }
if (rs != null) { if (rs != null) {
while (rs.next()) { while (rs.next()) {
@ -80,14 +82,16 @@ public class ChangeWhiteListState {
info.setReason(reason); info.setReason(reason);
infos.addWhiteListInfos(info); infos.addWhiteListInfos(info);
} }
String sql_update = "update e10_core_business.dbo.formtable_main_1556 set bmdzt='1' where mc='" + mc + "'"; String sql_update = "update e10_core_business.dbo.formtable_main_1716 set bmdzt='1' where mc='" + mc + "'";
rs.executeSql(sql_update); logger.error(String.valueOf("sql_update = " + sql_update ));
boolean b2 = rs.executeSql(sql_update);
logger.error(String.valueOf("b2 = " + b2 ));
infos.setITFID(""); infos.setITFID("");
infos.setSENDID(""); infos.setSENDID("");
infos.setSYSID(""); infos.setSYSID("");
input.setSyncWhiteListInfo(infos); input.setSyncWhiteListInfo(infos);
String[] returnArr = syncState(input); String[] returnArr = syncState(input);
logger.error("新增黑名单时更改白名单状态--(" + mc, dm + "):state--" + returnArr[0] + ",message--" + returnArr[2]); logger.error("新增黑名单时更改白名单状态--(" + mc + dm + "):state--" + returnArr[0] + ",message--" + returnArr[2]);
} }
} }
logger.error("新增黑名单时更改白名单状态完成"); logger.error("新增黑名单时更改白名单状态完成");
@ -98,15 +102,23 @@ public class ChangeWhiteListState {
public String[] syncState(SI_WhitelistSync_OUTServiceStub.SyncWhiteListService input) throws Exception { public String[] syncState(SI_WhitelistSync_OUTServiceStub.SyncWhiteListService input) throws Exception {
String[] result = new String[5]; String[] result = new String[5];
String uri = "http://sappod.hengtong.com:50000/XISOAPAdapter/MessageServlet?senderParty=&senderService=BS_OA&receiverParty=&receiverService=&interface=SI_WhitelistSync_OUT&interfaceNamespace=http://hengtong.com/OA/WhitelistSync"; // String uri = "http://sappod.hengtong.com:50000/XISOAPAdapter/MessageServlet?senderParty=&senderService=BS_OA&receiverParty=&receiverService=&interface=SI_WhitelistSync_OUT&interfaceNamespace=http://hengtong.com/OA/WhitelistSync";
String uri = configProp.getWhiteList();
SI_WhitelistSync_OUTServiceStub stub = new SI_WhitelistSync_OUTServiceStub(uri); SI_WhitelistSync_OUTServiceStub stub = new SI_WhitelistSync_OUTServiceStub(uri);
stub._getServiceClient().getOptions().setProperty("__CHUNKED__", Boolean.FALSE); stub._getServiceClient().getOptions().setProperty("__CHUNKED__", Boolean.FALSE);
stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(300000); stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(300000);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.SO_TIMEOUT,300000); stub._getServiceClient().getOptions().setProperty(HTTPConstants.SO_TIMEOUT,300000);
stub._getServiceClient().getOptions().setProperty(HTTPConstants.CONNECTION_TIMEOUT,300000); stub._getServiceClient().getOptions().setProperty(HTTPConstants.CONNECTION_TIMEOUT,300000);
HttpTransportPropertiesImpl.Authenticator auth = new HttpTransportPropertiesImpl.Authenticator(); HttpTransportPropertiesImpl.Authenticator auth = new HttpTransportPropertiesImpl.Authenticator();
auth.setUsername("pouser"); // auth.setUsername("pouser");
auth.setPassword("654321"); // auth.setPassword("654321");
String user = configProp.getHtsysjcmt_po_user();
String password = configProp.getHtsysjcmt_po_password();
logger.error("------- user : " + user);
logger.error("------- password : " + password);
auth.setUsername(user);
auth.setPassword(password);
stub._getServiceClient().getOptions().setProperty(org.apache.axis2.kernel.http.HTTPConstants.AUTHENTICATE,auth); stub._getServiceClient().getOptions().setProperty(org.apache.axis2.kernel.http.HTTPConstants.AUTHENTICATE,auth);
SI_WhitelistSync_OUTServiceStub.SyncWhiteListServiceResponse response = stub.sI_WhitelistSync_OUT(input); SI_WhitelistSync_OUTServiceStub.SyncWhiteListServiceResponse response = stub.sI_WhitelistSync_OUT(input);
SI_WhitelistSync_OUTServiceStub.ResultInfo resultInfo = response.get_return(); SI_WhitelistSync_OUTServiceStub.ResultInfo resultInfo = response.get_return();

@ -92,6 +92,8 @@ public class ConfigProp {
//htecmoasync //htecmoasync
@Value("${isoresulturl}") @Value("${isoresulturl}")
private String isoresulturl; private String isoresulturl;
@Value("${whiteList}")
private String whiteList;
//htemail //htemail
@ -223,8 +225,6 @@ public class ConfigProp {
private String efsaccount; private String efsaccount;
@Value("${efspassword}") @Value("${efspassword}")
private String efspassword; private String efspassword;
@Value("${gy103gsid}")
private String gy103gsid;

@ -19,7 +19,9 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -55,6 +57,19 @@ public class CustomJavaCode extends BaseBean implements Action, EsbServerlessRpc
logger.error("start CustomTeAction"); logger.error("start CustomTeAction");
logger.error("params = " + JSON.toJSONString(params)); logger.error("params = " + JSON.toJSONString(params));
Map<String, Object> weaverResultMap = new HashMap<>(); Map<String, Object> weaverResultMap = new HashMap<>();
// 获取当前日期和时间
Date currentDate = new Date();
// 格式化日期
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
String formattedDate = dateFormat.format(currentDate);
// 格式化时间
SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
String formattedTime = timeFormat.format(currentDate);
Long billid = Long.parseLong(String.valueOf(params.getOrDefault("billid", -1))); Long billid = Long.parseLong(String.valueOf(params.getOrDefault("billid", -1)));
logger.error("billid = " + billid); logger.error("billid = " + billid);
@ -67,9 +82,9 @@ public class CustomJavaCode extends BaseBean implements Action, EsbServerlessRpc
recordSet.executeSql(str1); recordSet.executeSql(str1);
ArrayList<Map<String, String>> arrayList = new ArrayList(); ArrayList<Map<String, String>> arrayList = new ArrayList();
while (recordSet.next()) { while (recordSet.next()) {
int k = recordSet.getInt("id"); String k = recordSet.getString("id");
String str4 = recordSet.getString("bh"); String str4 = recordSet.getString("bh");
int m = recordSet.getInt("lx"); String m = recordSet.getString("lx");
String str5 = recordSet.getString("mc"); String str5 = recordSet.getString("mc");
String str6 = recordSet.getString("dm"); String str6 = recordSet.getString("dm");
String str7 = recordSet.getInt("zt") + ""; String str7 = recordSet.getInt("zt") + "";
@ -77,13 +92,13 @@ public class CustomJavaCode extends BaseBean implements Action, EsbServerlessRpc
String str9 = recordSet.getString("jyyy"); String str9 = recordSet.getString("jyyy");
if (!"".equals(str9)) if (!"".equals(str9))
str9 = str9.replace("<br>", ""); str9 = str9.replace("<br>", "");
String str10 = recordSet.getString("modedatacreatedate"); String str10 =formattedDate;
String str11 = recordSet.getString("modedatacreatetime"); String str11 = formattedTime;
Map<String, String> hashMap = new HashMap<String, String>(); Map<String, String> hashMap = new HashMap<String, String>();
hashMap.put("id", k + ""); hashMap.put("id", k );
hashMap.put("bh", str4); hashMap.put("bh", str4);
hashMap.put("dm", str6); hashMap.put("dm", str6);
hashMap.put("lx", m + ""); hashMap.put("lx", m );
hashMap.put("mc", str5); hashMap.put("mc", str5);
hashMap.put("zt", str7); hashMap.put("zt", str7);
hashMap.put("yxjzq", str8); hashMap.put("yxjzq", str8);
@ -97,7 +112,7 @@ public class CustomJavaCode extends BaseBean implements Action, EsbServerlessRpc
String[] arrayOfString = callEasBlacklistServices.syncBlacklist(arrayList); String[] arrayOfString = callEasBlacklistServices.syncBlacklist(arrayList);
String str2 = arrayOfString[0]; String str2 = arrayOfString[0];
String str3 = arrayOfString[1]; String str3 = arrayOfString[1];
logger.error("do blacklist webservice: " + str2 + "][message : " + str3 + "]"); logger.error("callEasBlacklistServices do blacklist webservice: " + str2 + "][message : " + str3 + "]");
changeWhiteListState.changeState(arrayList); changeWhiteListState.changeState(arrayList);

@ -51,7 +51,7 @@ public class NewBuKaAction extends BaseBean implements Action, EsbServerlessRpcR
Long userIdTemp = Long.parseLong(String.valueOf(requestInfoMap.getOrDefault("userid", -1))); Long userIdTemp = Long.parseLong(String.valueOf(requestInfoMap.getOrDefault("userid", -1)));
RequestInfo request = requestInfoTemp.getRequestInfo(requestIdTemp, userIdTemp); RequestInfo request = requestInfoTemp.getRequestInfo(requestIdTemp, userIdTemp);
try { try {
String requestid = request.getRequestid(); String requestid =String.valueOf(requestIdTemp);
try { try {
logger_eae3b780.error(String.valueOf("NewBuKaAction--start--" + requestid)); logger_eae3b780.error(String.valueOf("NewBuKaAction--start--" + requestid));
String creater = request.getCreatorid(); String creater = request.getCreatorid();
@ -115,11 +115,20 @@ public class NewBuKaAction extends BaseBean implements Action, EsbServerlessRpcR
bkyy = valueq; bkyy = valueq;
} }
} }
long generate = IdGenerator.generate(); // long generate = IdGenerator.generate();
String insertsql = "insert into buka_log_new(requestid,gh,punchreason,punchtype,TimeCardDate,TimeCardTime,createrId,BKRQ) values(" + requestid + ",'" + GH + "','" + bkyy + "','" + kz + "','" + qksj + "','" + bkrq + " " + bksj + "','" + createrId + "','" + BKRQ + "')"; RecordSet recordSet = I18nContextUtil.getBean(RecordSet.class);
String poolname_g0 = CONN_TYPE.workflow.getType(); String poolname_g0 = CONN_TYPE.workflow.getType();
logger_eae3b780.error("generate:"+generate+",poolname_g0:"+poolname_g0+",sql1:" + insertsql); String newIdSql = "SELECT ISNULL((SELECT TOP 1 id FROM buka_log_new ORDER BY id DESC), 0) + 1 AS id";
boolean b1 = rs.executeSql(insertsql, poolname_g0,generate); logger_eae3b780.error("newIdSql----------- " + newIdSql);
boolean flag = rs.executeSql(newIdSql, poolname_g0);
logger_eae3b780.error("flag---"+flag);
long newId = 0;
if (recordSet.next()) {
newId = Long.parseLong(recordSet.getString("id"));
}
String insertsql = "insert into buka_log_new(id,requestid,gh,punchreason,punchtype,TimeCardDate,TimeCardTime,createrId,BKRQ) values(" + newId + ",'"+ requestid + ",'" + GH + "','" + bkyy + "','" + kz + "','" + qksj + "','" + bkrq + " " + bksj + "','" + createrId + "','" + BKRQ + "')";
logger_eae3b780.error("newId:"+newId+",poolname_g0:"+poolname_g0+",sql1:" + insertsql);
boolean b1 = rs.executeSql(insertsql, poolname_g0);
logger_eae3b780.error("b1--"+b1); logger_eae3b780.error("b1--"+b1);
// /* *TODO 检测到insert语句 -> E9插入sql迁移到E10需要特殊处理请参考文档进行调整 https://www.e-cology.com.cn/sp/doc/docShare/1027709301045985331?tenantKey=t7akvdnf84 // /* *TODO 检测到insert语句 -> E9插入sql迁移到E10需要特殊处理请参考文档进行调整 https://www.e-cology.com.cn/sp/doc/docShare/1027709301045985331?tenantKey=t7akvdnf84
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源*/ // TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源*/

@ -146,22 +146,38 @@ public class OaSrmVenMatExtAction extends BaseBean implements Action, EsbServerl
} }
logger_e97618d9.error(String.valueOf(requestid + "GY104--建议处理类型" + cllx)); logger_e97618d9.error(String.valueOf(requestid + "GY104--建议处理类型" + cllx));
DetailTable[] detailtable = null; DetailTable[] detailtable = null;
if (requestinfo.getDetailTableInfo() != null) { if (requestinfo != null && requestinfo.getDetailTableInfo() != null) {
detailtable = requestinfo.getDetailTableInfo().getDetailTable(); detailtable = requestinfo.getDetailTableInfo().getDetailTable();
} }
DetailTable dtq = null; DetailTable dtq = null;
if (detailtable != null && detailtable.length > 0) { if (detailtable != null && detailtable.length > 0) {
dtq = detailtable[0]; dtq = detailtable[0];
} }
logger_e97618d9.error("dtq===> "+dtq);
Row[] sq = null; Row[] sq = null;
if (dtq != null && dtq.getRow() != null) { if (dtq != null) {
sq = dtq.getRow(); logger_e97618d9.error("dtq != null===> "+dtq);
try {
// 尝试获取 dtq 的行
if (dtq.getRow() != null) {
sq = dtq.getRow();
}
} catch (NullPointerException e) {
// 捕获并记录异常信息
logger_e97618d9.error("调用 dtq.getRow() 时发生 NullPointerException: " + e.getMessage());
}
} }
SRM_OA_VENMATEXT_RESULT param = new SRM_OA_VENMATEXT_RESULT(); SRM_OA_VENMATEXT_RESULT param = new SRM_OA_VENMATEXT_RESULT();
VenMatExtResultIn paramInfo = new VenMatExtResultIn(); VenMatExtResultIn paramInfo = new VenMatExtResultIn();
Set<String> set = new HashSet<String>(); Set<String> set = new HashSet<String>();
VenMatExtResultItemIn[] item = new VenMatExtResultItemIn[sq.length]; int length = 0;
if(sq != null){
length = sq.length;
}
VenMatExtResultItemIn[] item = new VenMatExtResultItemIn[length];
if (sq != null && ( "6".equals(cllx) || "7".equals(cllx))) { if (sq != null && ( "6".equals(cllx) || "7".equals(cllx))) {
for (int j = 0; j < sq.length; j++) { for (int j = 0; j < sq.length; j++) {
// 指定行 // 指定行

@ -177,38 +177,44 @@ public class SCFAndEASApplyUserSyncAction extends BaseBean implements Action, Es
String poolname_7m = CONN_TYPE.workflow.getType(); String poolname_7m = CONN_TYPE.workflow.getType();
/* /*
TODO E10sql使/使*/ TODO E10sql使/使*/
boolean b1 = rs.executeSql("update e10_common.dbo.uf_applyUser set " + "'E10无此字段formmodeid'='139'" + ", modedatacreater=" + sqr + ", 'E10无此字段modedatacreatertype'= '0'" + ", modedatacreatedate= '" + currentdate + "'" + ", modedatacreatetime= '" + currenttime + "'" + ", oafqr=" + list.get(i).get("oafqr") + ",oafqrgh='" + list.get(i).get("oafqrgh") + "'" + " where companycode='" + companyCode + "' and lclx=" + list.get(i).get("lclx"), poolname_7m); // boolean b1 = rs.executeSql("update e10_common.dbo.uf_applyUser set " + "'E10无此字段formmodeid'='139'" + ", modedatacreater=" + sqr + ", 'E10无此字段modedatacreatertype'= '0'" + ", modedatacreatedate= '" + currentdate + "'" + ", modedatacreatetime= '" + currenttime + "'" + ", oafqr=" + list.get(i).get("oafqr") + ",oafqrgh='" + list.get(i).get("oafqrgh") + "'" + " where companycode='" + companyCode + "' and lclx=" + list.get(i).get("lclx"), poolname_7m);
boolean b1 = rs.executeSql("update e10_common.dbo.uf_applyUser set oafqr=" + list.get(i).get("oafqr") + ",oafqrgh='" + list.get(i).get("oafqrgh") + "'" + " where companycode='" + companyCode + "' and lclx=" + list.get(i).get("lclx"), poolname_7m);
logger_c018d513.error("b1 -----"+ b1); logger_c018d513.error("b1 -----"+ b1);
} else { } else {
String poolname_19 = CONN_TYPE.workflow.getType(); String poolname_19 = CONN_TYPE.workflow.getType();
/* /*
TODO E10sql使/使*/ TODO E10sql使/使*/
boolean b1 = rs.executeSql("update e10_common.dbo.uf_applyUser set " + "'E10无此字段formmodeid'='139'" + ", modedatacreater=" + sqr + ", 'E10无此字段modedatacreatertype'= '0'" + ", modedatacreatedate= '" + currentdate + "'" + ", modedatacreatetime= '" + currenttime + "'" + ", oafqr=" + list.get(i).get("oafqr") + ",oafqrgh='" + list.get(i).get("oafqrgh") + "'" + ", easfqr=" + list.get(i).get("oafqr") + ",easfqrgh='" + list.get(i).get("oafqrgh") + "'" + " where companycode='" + companyCode + "' and lclx=" + list.get(i).get("lclx"), poolname_19); // boolean b1 = rs.executeSql("update e10_common.dbo.uf_applyUser set " + "'E10无此字段formmodeid'='139'" + ", modedatacreater=" + sqr + ", 'E10无此字段modedatacreatertype'= '0'" + ", modedatacreatedate= '" + currentdate + "'" + ", modedatacreatetime= '" + currenttime + "'" + ", oafqr=" + list.get(i).get("oafqr") + ",oafqrgh='" + list.get(i).get("oafqrgh") + "'" + ", easfqr=" + list.get(i).get("oafqr") + ",easfqrgh='" + list.get(i).get("oafqrgh") + "'" + " where companycode='" + companyCode + "' and lclx=" + list.get(i).get("lclx"), poolname_19);
boolean b1 = rs.executeSql("update e10_common.dbo.uf_applyUser set oafqr=" + list.get(i).get("oafqr") + ",oafqrgh='" + list.get(i).get("oafqrgh") + "'" + ", easfqr=" + list.get(i).get("oafqr") + ",easfqrgh='" + list.get(i).get("oafqrgh") + "'" + " where companycode='" + companyCode + "' and lclx=" + list.get(i).get("lclx"), poolname_19);
logger_c018d513.error("b1 -----"+ b1); logger_c018d513.error("b1 -----"+ b1);
} }
// rs.execute("update uf_applyUser set oafqr="+list.get(i).get("oafqr")+",oafqrgh='"+list.get(i).get("oafqrgh")+"',easfqr="+list.get(i).get("easfqr")+",easfqrgh='"+list.get(i).get("easfqrgh")+"' where companycode='"+companyCode+"' and lclx="+list.get(i).get("lclx")); // rs.execute("update uf_applyUser set oafqr="+list.get(i).get("oafqr")+",oafqrgh='"+list.get(i).get("oafqrgh")+"',easfqr="+list.get(i).get("easfqr")+",easfqrgh='"+list.get(i).get("easfqrgh")+"' where companycode='"+companyCode+"' and lclx="+list.get(i).get("lclx"));
} else {
String uuid = UUID.randomUUID().toString();
if ("0".equals(lclx)) {
String poolname_qw = CONN_TYPE.workflow.getType();
// 开票申请
/* *TODO insert -> E9sqlE10 https://www.e-cology.com.cn/sp/doc/docShare/1027709301045985331?tenantKey=t7akvdnf84
TODO E10sql使/使*/
long generate = IdGenerator.generate();
boolean b1 = rs.executeSql("insert into e10_common.dbo.uf_applyUseruf_applyUser(companycode,formmodeid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime," + "lclx,oafqr,oafqrgh,modeuuid) " + "values('" + companyCode + "'," + "'139'," + sqr + "," + "'0'," + "'" + currentdate + "'," + "'" + currenttime + "'," + list.get(i).get("lclx") + "," + list.get(i).get("oafqr") + ",'" + list.get(i).get("oafqrgh") + "','" + uuid + "')", poolname_qw, generate);
logger_c018d513.error("b1 -----"+ b1);
} else {
String poolname_2n = CONN_TYPE.workflow.getType();
/*
TODO insert -> E9sqlE10 https://www.e-cology.com.cn/sp/doc/docShare/1027709301045985331?tenantKey=t7akvdnf84
TODO E10sql使/使*/
long generate = IdGenerator.generate();
boolean b1 = rs.executeSql("insert into e10_common.dbo.uf_applyUseruf_applyUser(companycode,formmodeid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime," + "lclx,oafqr,oafqrgh,easfqr,easfqrgh,modeuuid) " + "values('" + companyCode + "'," + "'139'," + sqr + "," + "'0'," + "'" + currentdate + "'," + "'" + currenttime + "'," + list.get(i).get("lclx") + "," + list.get(i).get("oafqr") + ",'" + list.get(i).get("oafqrgh") + "'," + list.get(i).get("oafqr") + ",'" + list.get(i).get("oafqrgh") + "','" + uuid + // DiscountedInvoiceApplicationImpl 使用eas发起人
"')", poolname_2n, generate);
logger_c018d513.error("b1 -----"+ b1);
}
// rs.execute("F");
} }
/*TODO
formmodeidmodeUUID 2025/02/27
*/
// else {
// String uuid = UUID.randomUUID().toString();
// if ("0".equals(lclx)) {
// String poolname_qw = CONN_TYPE.workflow.getType();
// // 开票申请
// /* *TODO 检测到insert语句 -> E9插入sql迁移到E10需要特殊处理请参考文档进行调整 https://www.e-cology.com.cn/sp/doc/docShare/1027709301045985331?tenantKey=t7akvdnf84
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源*/
// long generate = IdGenerator.generate();
// boolean b1 = rs.executeSql("insert into e10_common.dbo.uf_applyUseruf_applyUser(companycode,formmodeid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime," + "lclx,oafqr,oafqrgh,modeuuid) " + "values('" + companyCode + "'," + "'139'," + sqr + "," + "'0'," + "'" + currentdate + "'," + "'" + currenttime + "'," + list.get(i).get("lclx") + "," + list.get(i).get("oafqr") + ",'" + list.get(i).get("oafqrgh") + "','" + uuid + "')", poolname_qw, generate);
// logger_c018d513.error("b1 -----"+ b1);
// } else {
// String poolname_2n = CONN_TYPE.workflow.getType();
// /*直贷业务
// TODO 检测到insert语句 -> E9插入sql迁移到E10需要特殊处理请参考文档进行调整 https://www.e-cology.com.cn/sp/doc/docShare/1027709301045985331?tenantKey=t7akvdnf84
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源*/
// long generate = IdGenerator.generate();
// boolean b1 = rs.executeSql("insert into e10_common.dbo.uf_applyUseruf_applyUser(companycode,formmodeid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime," + "lclx,oafqr,oafqrgh,easfqr,easfqrgh,modeuuid) " + "values('" + companyCode + "'," + "'139'," + sqr + "," + "'0'," + "'" + currentdate + "'," + "'" + currenttime + "'," + list.get(i).get("lclx") + "," + list.get(i).get("oafqr") + ",'" + list.get(i).get("oafqrgh") + "'," + list.get(i).get("oafqr") + ",'" + list.get(i).get("oafqrgh") + "','" + uuid + // DiscountedInvoiceApplicationImpl 使用eas发起人
// "')", poolname_2n, generate);
// logger_c018d513.error("b1 -----"+ b1);
// }
// // rs.execute("F");
// }
} }
} }

@ -2,9 +2,12 @@ package com.weaver.seconddev.interfaces.workflow.action;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.weaver.common.distribution.genid.IdGenerator;
import com.weaver.common.i18n.tool.util.I18nContextUtil; import com.weaver.common.i18n.tool.util.I18nContextUtil;
import com.weaver.esb.api.rpc.EsbServerlessRpcRemoteInterface; import com.weaver.esb.api.rpc.EsbServerlessRpcRemoteInterface;
import com.weaver.common.base.entity.result.WeaResult; import com.weaver.common.base.entity.result.WeaResult;
import com.weaver.mc.util.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.weaver.verupgrade.formmode.data.GetCubeBtnActionParam; import com.weaver.verupgrade.formmode.data.GetCubeBtnActionParam;
@ -42,11 +45,9 @@ public class UpdateSecLevelAndLockStatus implements EsbServerlessRpcRemoteInterf
logger_b15f4fa5.error("htjt_mode_UpdateSecLevelAndLockStatus start param == " + param); logger_b15f4fa5.error("htjt_mode_UpdateSecLevelAndLockStatus start param == " + param);
// 构建E9 requestInfo对象参数
I18nContextUtil.getBean(GetCubeBtnActionParam.class).getCubeBtnActionParam(param);
Long billid = Long.parseLong(String.valueOf(param.getOrDefault("billid", -1))); Long billid = Long.parseLong(String.valueOf(param.getOrDefault("billid", -1)));
logger_b15f4fa5.error("billid == "+ billid ); logger_b15f4fa5.error("UpdateSecLevelAndLockStatus billid == "+ billid );
Map<String, String> result = new HashMap<String, String>(); Map<String, String> result = new HashMap<String, String>();
try { try {
@ -57,6 +58,7 @@ public class UpdateSecLevelAndLockStatus implements EsbServerlessRpcRemoteInterf
if (billid > 0 ) { if (billid > 0 ) {
RecordSet rs = I18nContextUtil.getBean(RecordSet.class); RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
String sql = "select * from e10_common.dbo.uf_sellevellock_chg where id=" + billid; String sql = "select * from e10_common.dbo.uf_sellevellock_chg where id=" + billid;
logger_b15f4fa5.error("UpdateSecLevelAndLockStatus sql == "+ sql );
String ry = ""; String ry = "";
String aqjb = ""; String aqjb = "";
String zhsd = ""; String zhsd = "";
@ -69,9 +71,40 @@ public class UpdateSecLevelAndLockStatus implements EsbServerlessRpcRemoteInterf
if ("".equals(zhsd)) { if ("".equals(zhsd)) {
zhsd = "0"; zhsd = "0";
} }
sql = "update eteams.dbo.employee as hrmresource set seclevel=" + aqjb + ",passwordlock=" + zhsd + " where id=" + ry + ""; sql = "update eteams.dbo.employee as hrmresource set sec_level=" + aqjb + " where id=" + ry + "";
logger_b15f4fa5.error("UpdateSecLevelAndLockStatus updatesec_level == "+ sql );
boolean execute = rs.execute(sql); boolean execute = rs.execute(sql);
logger_b15f4fa5.error("execute == "+ execute ); logger_b15f4fa5.error("execute == "+ execute );
if(StringUtils.isNotEmpty(zhsd)){
if(zhsd.equals(0)){ //未锁定,删除所有锁定记录
sql = "update ec_passport.dbo.user_lock_info set delete_type = 1 where user_id = " + ry + "and delete_type_type != 3 ";
}else if(zhsd.equals(0)){//锁定,新增一条数据
sql = "SELECT COUNT (1) AS sd FROM eteams.dbo.employee a ,ec_passport.dbo.user_lock_info b " +
"WHERE a.id = " + ry +" AND a.user_id = b.user_id AND a.delete_type = 0 ";
boolean b1 = rs.executeQuery(sql);
if(rs.next()){
int sd = rs.getInt("sd");
if(sd > 0 ){
//有记录
}else{
sql = "INSERT INTO passport.user_lock_info (" +
"id, create_time, update_time, creator, delete_type, " +
"tenant_key, user_id, employee_id, overdue_time, user_status, lock_type" +
") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
Long id = IdGenerator.generate();
}
}
}
logger_b15f4fa5.error("UpdateSecLevelAndLockStatus updatedelete_type == "+ sql );
boolean execute1 = rs.execute(sql);
logger_b15f4fa5.error("execute1 == "+ execute1 );
}
ResourceComInfo rci = I18nContextUtil.getBean(ResourceComInfo.class); ResourceComInfo rci = I18nContextUtil.getBean(ResourceComInfo.class);
rci.updateResourceInfoCache(ry); rci.updateResourceInfoCache(ry);
} }

@ -27,6 +27,8 @@ import com.weaver.verupgrade.soa.workflow.request.Cell;
import com.weaver.verupgrade.soa.workflow.request.DetailTable; import com.weaver.verupgrade.soa.workflow.request.DetailTable;
import com.weaver.verupgrade.soa.workflow.request.Row; import com.weaver.verupgrade.soa.workflow.request.Row;
//废弃
@org.springframework.stereotype.Service("workflow_action_YongGongXuQiuAction") @org.springframework.stereotype.Service("workflow_action_YongGongXuQiuAction")
public class YongGongXuQiuAction implements Action, EsbServerlessRpcRemoteInterface { public class YongGongXuQiuAction implements Action, EsbServerlessRpcRemoteInterface {
@ -47,184 +49,185 @@ public class YongGongXuQiuAction implements Action, EsbServerlessRpcRemoteInterf
} }
public WeaResult<Map<String, Object>> execute(Map<String, Object> requestInfoMap) { public WeaResult<Map<String, Object>> execute(Map<String, Object> requestInfoMap) {
logger_42aadd27.error("YongGongXuQiuAction start"); return null ;
Map<String, Object> weaverResultMap = new HashMap<>(); // logger_42aadd27.error("YongGongXuQiuAction start");
Long requestIdTemp = Long.parseLong(String.valueOf(requestInfoMap.getOrDefault("requestid", -1))); // Map<String, Object> weaverResultMap = new HashMap<>();
Long userIdTemp = Long.parseLong(String.valueOf(requestInfoMap.getOrDefault("userid", -1))); // Long requestIdTemp = Long.parseLong(String.valueOf(requestInfoMap.getOrDefault("requestid", -1)));
RequestInfo request = requestInfoTemp.getRequestInfo(requestIdTemp, userIdTemp); // Long userIdTemp = Long.parseLong(String.valueOf(requestInfoMap.getOrDefault("userid", -1)));
// int departmentId = Util.getIntValue(rs2.getString("id")); // RequestInfo request = requestInfoTemp.getRequestInfo(requestIdTemp, userIdTemp);
// String GWXL = "";//岗位序列 // // int departmentId = Util.getIntValue(rs2.getString("id"));
// String GWLX = "";//岗位类型 // // String GWXL = "";//岗位序列
// String PositionStatus = "0"; //是否新增岗位 // // String GWLX = "";//岗位类型
// RecordSet rs3 = new RecordSet(); // // String PositionStatus = "0"; //是否新增岗位
// rs3.executeSql("select * from HrmJobTitles where id="+XQGW); // // RecordSet rs3 = new RecordSet();
// if (!rs3.next()){ // // rs3.executeSql("select * from HrmJobTitles where id="+XQGW);
// PositionStatus = "1"; // // if (!rs3.next()){
// } // // PositionStatus = "1";
try { // // }
log.error("do action on request:" + request.getRequestid()); // try {
String requestid = request.getRequestid(); // log.error("do action on request:" + request.getRequestid());
// String lastoperator = request.getLastoperator(); // String requestid = request.getRequestid();
// String creater = request.getCreatorid(); //// String lastoperator = request.getLastoperator();
RecordSet rs = I18nContextUtil.getBean(RecordSet.class); //// String creater = request.getCreatorid();
// RecordSet rs2 = I18nContextUtil.getBean(RecordSet.class); // RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
// String workflowid = request.getWorkflowid(); //// RecordSet rs2 = I18nContextUtil.getBean(RecordSet.class);
// String maintable = ""; //// String workflowid = request.getWorkflowid();
// String sql = "select b.tablename from e10_common.dbo.wfp_base a,e10_common.dbo.form b where a.formid = b.id and a.id = " + workflowid; //// String maintable = "";
// logger_42aadd27.error("getMainTableInfo sql = " + sql); //// String sql = "select b.tablename from e10_common.dbo.wfp_base a,e10_common.dbo.form b where a.formid = b.id and a.id = " + workflowid;
// String createsqlString = "select id from eteams.dbo.employee as hrmresource where lastname ='" + creater + "'"; //// logger_42aadd27.error("getMainTableInfo sql = " + sql);
// String poolname = CONN_TYPE.workflow.getType(); //// String createsqlString = "select id from eteams.dbo.employee as hrmresource where lastname ='" + creater + "'";
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源 //// String poolname = CONN_TYPE.workflow.getType();
// boolean b = rs2.executeSql(createsqlString, poolname); // // TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源
// logger_42aadd27.error("getMainTableInfo rs2.executeSql = " + b); //// boolean b = rs2.executeSql(createsqlString, poolname);
// rs2.next(); //// logger_42aadd27.error("getMainTableInfo rs2.executeSql = " + b);
// String createrId = rs2.getString("id"); //// rs2.next();
// String poolname_hy = CONN_TYPE.workflow.getType(); //// String createrId = rs2.getString("id");
// int departmentId = Util.getIntValue(rs2.getString("id")); //// String poolname_hy = CONN_TYPE.workflow.getType();
/* String creater = rs2.getString("departmentmark") + "_" + rs2.getString("lastname"); // // int departmentId = Util.getIntValue(rs2.getString("id"));
TODO E10sql使/使*/ // /* String creater = rs2.getString("departmentmark") + "_" + rs2.getString("lastname");
// boolean b1 = rs.executeSql(sql, poolname_hy); // TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源*/
// logger_42aadd27.error("getMainTableInfo rs.executeSql = " + b1); //// boolean b1 = rs.executeSql(sql, poolname_hy);
// while (rs.next()) { //// logger_42aadd27.error("getMainTableInfo rs.executeSql = " + b1);
// maintable = rs.getString("tablename"); //// while (rs.next()) {
//// maintable = rs.getString("tablename");
//// }
// // 需求部门
// String XQBM = "";
// // String GWXL = "";//岗位序列
// // String GWLX = "";//岗位类型
// // 需求岗位
// String XQGW = "";
// // 申请日期
// String SQRQ = "";
// // 需求人数
// String XQRS = "";
// // 希望报到期限
// String XWBDQX = "";
// // 增补方式
// String ZBFS = "";
// // 需求原因
// String XQYY = "";
// String DeptID = "";
// String positionID = "";
// // 离职补员
// String LZBY = "";
// // 人员调动替补
// String RYDD = "";
// // 新增岗位或人员
// String XZGWRY = "";
// // 人才储备
// String RCCB = "";
// // String PositionStatus = "0"; //是否新增岗位
// // 获取表单主字段信息
// Property[] properties = request.getMainTableInfo().getProperty();
// for (int i = 0; i < properties.length; i++) {
// // 主表数据
// // 字段名
// String name = properties[i].getName().toUpperCase();
// // 值
// String value = Util.null2String(properties[i].getValue());
// if (name.equals("XQBM")) {
// XQBM = value;
// String poolname_rh = CONN_TYPE.workflow.getType();
// // TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源
// String sql1 = "select code from eteams.dbo.department as HrmDepartment where id =" + XQBM;
// logger_42aadd27.error("getMainTableInfo sql = " + sql1);
// rs.executeSql(sql1, poolname_rh);
// rs.next();
// DeptID = Util.null2String(rs.getString("departmentcode"));
// } else if (name.equals("XQGW")) {
// XQGW = value;
// String poolname_qe = CONN_TYPE.workflow.getType();
// // TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源
// String sql1 = "select code from position as HrmJobTitles where id =" + XQGW;
// logger_42aadd27.error("getMainTableInfo sql = " + sql1);
// rs.executeSql(sql1, poolname_qe);
// rs.next();
// positionID = Util.null2String(rs.getString("jobtitlecode"));
// } else if (name.equals("SQRQ")) {
// SQRQ = value;
// SQRQ = SQRQ.substring(0, 10);
// } else if (name.equals("XWBDQX")) {
// XWBDQX = value;
// XWBDQX = XWBDQX.substring(0, 10);
// } else if (name.equals("LZBY")) {
// LZBY = value;
// } else if (name.equals("RYDD")) {
// RYDD = value;
// } else if (name.equals("XZGWRY")) {
// XZGWRY = value;
// } else if (name.equals("RCCB")) {
// RCCB = value;
// } else if (name.equals("XQRS")) {
// XQRS = value;
// } else if (name.equals("ZBFS")) {
// ZBFS = value;
// }
// logger_42aadd27.error(" YongGongXuQiuAction main:" + requestid + " " + name + " " + value);
// } // }
// 需求部门 // if (!"".equals(LZBY)) {
String XQBM = ""; // XQYY = LZBY;
// String GWXL = "";//岗位序列 // }
// String GWLX = "";//岗位类型 // if (!"".equals(RYDD)) {
// 需求岗位 // XQYY = RYDD;
String XQGW = ""; // }
// 申请日期 // if (!"".equals(XZGWRY)) {
String SQRQ = ""; // XQYY = XZGWRY;
// 需求人数 // }
String XQRS = ""; // if (!"".equals(RCCB)) {
// 希望报到期限 // XQYY = RCCB;
String XWBDQX = ""; // }
// 增补方式 // String ZBFS2 = "";
String ZBFS = ""; // if (ZBFS.equals("2")) {
// 需求原因 // ZBFS2 = "1";
String XQYY = ""; // } else {
String DeptID = ""; // ZBFS2 = "0";
String positionID = ""; // }
// 离职补员 // // RecordSet rs3 = new RecordSet();
String LZBY = ""; // // rs3.executeSql("select * from HrmJobTitles where id="+XQGW);
// 人员调动替补 // // if (!rs3.next()){
String RYDD = ""; // // PositionStatus = "1";
// 新增岗位或人员 // // }
String XZGWRY = ""; // try {
// 人才储备 // logger_42aadd27.error("YongGongXuQiuAction endPoint" );
String RCCB = ""; // // ApplyPositionFormWS(XQBM,XQGW,SQRQ,Integer.parseInt(XQRS),XWBDRQ,ZBFS2,XQYY1);
// String PositionStatus = "0"; //是否新增岗位 // // JobCodeToDeptFormWS(XQBM,XQGW,createrId,SQRQ);
// 获取表单主字段信息 // String endPoint = "http://10.6.2.12/hengtongws/HengtongWebService.asmx";
Property[] properties = request.getMainTableInfo().getProperty(); // String soapaction = "http://tempuri.org/";
for (int i = 0; i < properties.length; i++) { // Service service = new Service();
// 主表数据 // Call call1 = (Call) service.createCall();
// 字段名 // call1.setTargetEndpointAddress(new java.net.URL(endPoint));
String name = properties[i].getName().toUpperCase(); // call1.setOperationName(new QName(soapaction, "ApplyPositionFormWS"));
// 值 // call1.addParameter(new QName(soapaction, "DeptID"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
String value = Util.null2String(properties[i].getValue()); // call1.addParameter(new QName(soapaction, "positionID"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
if (name.equals("XQBM")) { // call1.addParameter(new QName(soapaction, "ApplyDate"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
XQBM = value; // call1.addParameter(new QName(soapaction, "PositionCount"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
String poolname_rh = CONN_TYPE.workflow.getType(); // call1.addParameter(new QName(soapaction, "ONDUTYDATE"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源 // call1.addParameter(new QName(soapaction, "INTERIOR"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
String sql1 = "select code from eteams.dbo.department as HrmDepartment where id =" + XQBM; // call1.addParameter(new QName(soapaction, "ReasonID"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
logger_42aadd27.error("getMainTableInfo sql = " + sql1); // call1.setReturnType(new QName(soapaction, "ApplyPositionFormWS"), String.class);
rs.executeSql(sql1, poolname_rh); // call1.setUseSOAPAction(true);
rs.next(); // call1.setSOAPActionURI(soapaction + "ApplyPositionFormWS");
DeptID = Util.null2String(rs.getString("departmentcode")); // logger_42aadd27.error("DeptID:" + DeptID + "positionID" + positionID);
} else if (name.equals("XQGW")) { // String str = (String) call1.invoke(new Object[] { DeptID, positionID, SQRQ, XQRS, XWBDQX, ZBFS2, XQYY });
XQGW = value; // logger_42aadd27.error("str:" + str);
String poolname_qe = CONN_TYPE.workflow.getType(); // if (!str.equals("SUCCESS")) {
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源 // request.getRequestManager().setMessageid("100002");
String sql1 = "select code from position as HrmJobTitles where id =" + XQGW; // request.getRequestManager().setMessagecontent(str);
logger_42aadd27.error("getMainTableInfo sql = " + sql1); // return WeaResult.fail(500, "YongGongXuQiuActionstr"+ str, getResultMapForAction(weaverResultMap, "result",str, request.getRequestManager()));
rs.executeSql(sql1, poolname_qe); //
rs.next(); // }
positionID = Util.null2String(rs.getString("jobtitlecode")); // } catch (Exception e) {
} else if (name.equals("SQRQ")) { // logger_42aadd27.error("YongGongXuQiuAction catchErr:" + e.toString());
SQRQ = value; // return WeaResult.fail(500, "YongGongXuQiuAction err"+ e, getResultMapForAction(weaverResultMap, "result",e.getMessage(), request.getRequestManager()));
SQRQ = SQRQ.substring(0, 10); //
} else if (name.equals("XWBDQX")) { // }
XWBDQX = value; // return WeaResult.success(getResultMapForAction(weaverResultMap, "result", Action.SUCCESS, request.getRequestManager()));
XWBDQX = XWBDQX.substring(0, 10); // } catch (Exception e) {
} else if (name.equals("LZBY")) { // e.printStackTrace();
LZBY = value; // logger_42aadd27.error("YongGongXuQiuAction e: {}", e.getMessage());
} else if (name.equals("RYDD")) { // return WeaResult.fail(500, "YongGongXuQiuAction e {}"+ e, getResultMapForAction(weaverResultMap, "result",e.getMessage(), request.getRequestManager()));
RYDD = value; // }
} else if (name.equals("XZGWRY")) {
XZGWRY = value;
} else if (name.equals("RCCB")) {
RCCB = value;
} else if (name.equals("XQRS")) {
XQRS = value;
} else if (name.equals("ZBFS")) {
ZBFS = value;
}
logger_42aadd27.error(" YongGongXuQiuAction main:" + requestid + " " + name + " " + value);
}
if (!"".equals(LZBY)) {
XQYY = LZBY;
}
if (!"".equals(RYDD)) {
XQYY = RYDD;
}
if (!"".equals(XZGWRY)) {
XQYY = XZGWRY;
}
if (!"".equals(RCCB)) {
XQYY = RCCB;
}
String ZBFS2 = "";
if (ZBFS.equals("2")) {
ZBFS2 = "1";
} else {
ZBFS2 = "0";
}
// RecordSet rs3 = new RecordSet();
// rs3.executeSql("select * from HrmJobTitles where id="+XQGW);
// if (!rs3.next()){
// PositionStatus = "1";
// }
try {
logger_42aadd27.error("YongGongXuQiuAction endPoint" );
// ApplyPositionFormWS(XQBM,XQGW,SQRQ,Integer.parseInt(XQRS),XWBDRQ,ZBFS2,XQYY1);
// JobCodeToDeptFormWS(XQBM,XQGW,createrId,SQRQ);
String endPoint = "http://10.6.2.12/hengtongws/HengtongWebService.asmx";
String soapaction = "http://tempuri.org/";
Service service = new Service();
Call call1 = (Call) service.createCall();
call1.setTargetEndpointAddress(new java.net.URL(endPoint));
call1.setOperationName(new QName(soapaction, "ApplyPositionFormWS"));
call1.addParameter(new QName(soapaction, "DeptID"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
call1.addParameter(new QName(soapaction, "positionID"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
call1.addParameter(new QName(soapaction, "ApplyDate"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
call1.addParameter(new QName(soapaction, "PositionCount"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
call1.addParameter(new QName(soapaction, "ONDUTYDATE"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
call1.addParameter(new QName(soapaction, "INTERIOR"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
call1.addParameter(new QName(soapaction, "ReasonID"), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.INOUT);
call1.setReturnType(new QName(soapaction, "ApplyPositionFormWS"), String.class);
call1.setUseSOAPAction(true);
call1.setSOAPActionURI(soapaction + "ApplyPositionFormWS");
logger_42aadd27.error("DeptID:" + DeptID + "positionID" + positionID);
String str = (String) call1.invoke(new Object[] { DeptID, positionID, SQRQ, XQRS, XWBDQX, ZBFS2, XQYY });
logger_42aadd27.error("str:" + str);
if (!str.equals("SUCCESS")) {
request.getRequestManager().setMessageid("100002");
request.getRequestManager().setMessagecontent(str);
return WeaResult.fail(500, "YongGongXuQiuActionstr"+ str, getResultMapForAction(weaverResultMap, "result",str, request.getRequestManager()));
}
} catch (Exception e) {
logger_42aadd27.error("YongGongXuQiuAction catchErr:" + e.toString());
return WeaResult.fail(500, "YongGongXuQiuAction err"+ e, getResultMapForAction(weaverResultMap, "result",e.getMessage(), request.getRequestManager()));
}
return WeaResult.success(getResultMapForAction(weaverResultMap, "result", Action.SUCCESS, request.getRequestManager()));
} catch (Exception e) {
e.printStackTrace();
logger_42aadd27.error("YongGongXuQiuAction e: {}", e.getMessage());
return WeaResult.fail(500, "YongGongXuQiuAction e {}"+ e, getResultMapForAction(weaverResultMap, "result",e.getMessage(), request.getRequestManager()));
}
} }
Map<String, Object> getResultMapForAction(Map<String, Object> map, String key, Object value, RequestManager requestManager) { Map<String, Object> getResultMapForAction(Map<String, Object> map, String key, Object value, RequestManager requestManager) {

@ -0,0 +1,73 @@
package com.weaver.seconddev.interfaces.workflow.controller;
import com.alibaba.fastjson.JSONObject;
import com.weaver.common.base.entity.result.WeaResult;
import com.weaver.common.distribution.lock.DistributionLockInterface;
import com.weaver.common.i18n.tool.util.I18nContextUtil;
import com.weaver.custom.configcenter.htsysjcmtConfig;
import com.weaver.ecode.api.rpc.EcodeService;
import com.weaver.framework.rpc.annotation.RpcReference;
import com.weaver.framework.rpc.context.impl.TenantRpcContext;
import com.weaver.openapi.pojo.ApiResult;
import com.weaver.openapi.pojo.auth.params.AccessTokenParam;
import com.weaver.openapi.pojo.auth.params.CodeParam;
import com.weaver.openapi.pojo.auth.res.AccessToken;
import com.weaver.openapi.pojo.auth.res.Code;
import com.weaver.openapi.pojo.message.params.MessageVo;
import com.weaver.openapi.pojo.message.params.vo.MessageEntity;
import com.weaver.openapi.pojo.message.params.vo.MessageReciver;
import com.weaver.openapi.pojo.message.params.vo.MessageSender;
import com.weaver.openapi.service.AuthService;
import com.weaver.openapi.service.MessageService;
import com.weaver.seconddev.interfaces.prop.ConfigProp;
import com.weaver.verupgrade.conn.RecordSet;
import com.weaver.workflow.list.api.rest.publicapi.WflRequestListRest;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
@RequestMapping({"/papi/secondev/message"})
//@WeaPermission
public class MessageSubscriptionController {
// api 需要用户会话e10入口地址访问
// papi 任何人都可以直接访问 public apie10入口地址访问
// sapi 服务内部通信的接口路由前缀 /sapi/secondeve10入口地址访问不了
// 二开服务新接口:/api/secondev/papi/secondev
@RpcReference(timeout = 10000)
EcodeService ecodeService;
@RpcReference(timeout = 2000, group = "workflow")
WflRequestListRest wflRequestListRest;
@Autowired
private DistributionLockInterface distributionLock;
@Autowired
private ConfigProp configProp;
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(MessageSubscriptionController.class);
@PostMapping("/subscription")
public WeaResult<String> subscription(@RequestParam Map<String,Object> params, @RequestBody Map<String,Object> param ) {
logger.error("MessageSubscriptionController Start " );
String jtzhkey = "t6kj9c07jr";
// String jtzhadmin = configProp.getJtzhadmin();
// log.error("jtzhkey:"+jtzhkey+" jtzhadmin:"+itzhadmin);
TenantRpcContext.setTargetTenantKey(jtzhkey);
// TenantRpcContext.setTargetEmployeeId(jtzhadmin);
Map<String ,String > map = new HashMap<>();
RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
logger.error("subscription 推送成功");
map.put("msg","推送成功");
return WeaResult.success(map.toString());
}
}

@ -60,7 +60,8 @@ public class AutoCreateWorkflowService {
public String createWorkflow(String loginName, String password, String workflowId, String creator, String requestLevel, String mainTable , String[] detailTables){ public String createWorkflow(String loginName, String password, String workflowId, String creator, String requestLevel, String mainTable , String[] detailTables){
log.error("AutoCreateWorkflowService start"); log.error("AutoCreateWorkflowService start");
log.error("loginName:"+loginName+"=> password:"+password+"=> workflowId:"+workflowId+"=> creator:"+creator); log.error("loginName:"+loginName+"=> password:"+password+"=> workflowId:"+workflowId+"=> creator:"+creator);
log.error("requestLevel:"+requestLevel);
log.error("mainTable:"+mainTable);
String jtzhkey = configProp.getJtzhkey(); String jtzhkey = configProp.getJtzhkey();
String jtzhadmin = configProp.getJtzhadmin(); String jtzhadmin = configProp.getJtzhadmin();
//log.error("jtzhkey:"+jtzhkey+" jtzhadmin:"+itzhadmin); //log.error("jtzhkey:"+jtzhkey+" jtzhadmin:"+itzhadmin);
@ -142,7 +143,7 @@ public class AutoCreateWorkflowService {
List<Long> detailFormId = SecondUtil.getDetailFormId(workflowId); List<Long> detailFormId = SecondUtil.getDetailFormId(workflowId,zhsjy);
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();

@ -102,18 +102,20 @@ public class SecondUtil {
* @param workflowId * @param workflowId
* @return * @return
*/ */
public static List<Long> getDetailFormId(String workflowId) { public static List<Long> getDetailFormId(String workflowId,String zhsjy) {
log.error("getDetailFormId start : " + workflowId); log.error("getDetailFormId start : " + workflowId );
log.error("getDetailFormId zhsjy : " + zhsjy );
List<Long> formIdList = new ArrayList(); List<Long> formIdList = new ArrayList();
RecordSet rs = I18nContextUtil.getBean(RecordSet.class); RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
String poolname = CONN_TYPE.workflow.getType(); String poolname = zhsjy;
String sql = "select form_id from form_table where form_id in (select id from sub_form where form_id in (select relatekey from e10_core_business.dbo.wfp_relateform where workflowid = '"+workflowId+"'))"; String sql = "select form_id from e10_core_business.dbo.form_table where form_id in (select id from e10_core_business.dbo.sub_form where form_id in (select relatekey from e10_core_business.dbo.wfp_relateform where workflowid = '"+workflowId+"'))";
log.error("getDetailFormId sql : " + sql);
rs.executeSql(sql,poolname); rs.executeSql(sql,poolname);
while (rs.next()){ while (rs.next()){
formIdList.add(Util.getLongValue(rs.getString("form_id"))); formIdList.add(Util.getLongValue(rs.getString("form_id")));
} }
log.error("formIdList : " + formIdList); log.error("getDetailFormId formIdList : " + formIdList);
return formIdList; return formIdList;
} }

Loading…
Cancel
Save