qijirenjian 3 months ago
parent c17f974d74
commit e0736a7b5b

@ -190,7 +190,10 @@ public class ConfigProp {
private String didiRuleId_2;
@Value("${didiRuleId_3}")
private String didiRuleId_3;
@Value("${message_url}")
private String message_url;
@Value("${htportaloaUrl-pc_url}")
private String htportaloaUrl_pc_url;
//htpmoasync
@Value("${projectConclusion}")

@ -107,52 +107,73 @@ public class CustomTeAction extends BaseBean implements Action, EsbServerlessRpc
// RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
// String sql1 = "select field1 from e10_common.dbo.uf_CustomFlow where field1 = 5 and delete_type = 0";
String tablename = "hrmemployeedefined";
if("t6kj9c07jr".equals(tenantKey)){
tablename = "hrmemployeedefined";
}else if("tttit1yc38".equals(tenantKey)){//光电
tablename = "hrmemployeedefined_12";
}else if("tejiddakia".equals(tenantKey)){//华海
tablename = "hrmemployeedefined_11";
}
String sql1 = "select id,field3 from eteams.dbo." + tablename + " where FORM_DATA_ID= '100005650000063120' ";
// String sql1 = "select field3 from eteams.dbo.hrmemployeedefined where FORM_DATA_ID= '100005650000000052'";
// String tablename = "hrmemployeedefined";
// if("t6kj9c07jr".equals(tenantKey)){
// tablename = "hrmemployeedefined";
// }else if("tttit1yc38".equals(tenantKey)){//光电
// tablename = "hrmemployeedefined_12";
// }else if("tejiddakia".equals(tenantKey)){//华海
// tablename = "hrmemployeedefined_11";
// }
// String sql1 = "select id,field3 from eteams.dbo." + tablename + " where FORM_DATA_ID= '100005650000063120' ";
//// String sql1 = "select field3 from eteams.dbo.hrmemployeedefined where FORM_DATA_ID= '100005650000000052'";
//
// String poolname = CONN_TYPE.hrm.getType();
String poolname = CONN_TYPE.hrm.getType();
// logger.error("sql1 =" + sql1);
// logger.error("poolname =" + poolname);
//
// try {
// rs.executeSql(sql1, poolname);
// } catch (Exception e) {
// logger.error("rs-------", e);
// logger.error("getExecuteResult =" + rs.getExecuteResult());
// }
logger.error("sql1 =" + sql1);
logger.error("poolname =" + poolname);
try {
rs.executeSql(sql1, poolname);
} catch (Exception e) {
logger.error("rs-------", e);
logger.error("getExecuteResult =" + rs.getExecuteResult());
}
// logger.error("执行rs.executeSql成功");
//
// if (rs.next()) {
// String field3 = rs.getString("id");
// logger.error("field3 = " + field3);
// }
// //
// //
// // String sql2 = "update e10_common.dbo.uf_CustomFlow set field2 = '修改后数据' where field1 = 2 and delete_type = 0 ";
// // boolean b = rs.executeSql(sql2, poolname);
// // logger.error("更新 = " + b);
// //
// //
// // //rpc新增建模数据
// Long uf_CustomFlow_formId = commonDevUtil.getObjId("uf_CustomFlow");
// logger.error("uf_CustomFlow_formId = " + uf_CustomFlow_formId);
// Long recodId = ebFormDataDubboService.addEmptyData(uf_CustomFlow_formId, currentEmployee);// 获取插入的空的建模id
// String sql3 = "update e10_common.dbo.uf_CustomFlow set field2 = '添加数据' where id = " + recodId + " and delete_type = 0 ";
// boolean b1 = rs.executeSql(sql3, poolname);
// logger.error("sql3 = " + sql3);
// logger.error("添加 = " + b1);
logger.error("执行rs.executeSql成功");
if (rs.next()) {
String field3 = rs.getString("id");
logger.error("field3 = " + field3);
try {
logger.error("程序开始等待两分钟...");
// 1 分钟等于 60000 毫秒2 分钟则是 120000 毫秒
Thread.sleep(120000);
logger.error("两分钟等待结束,程序继续执行。");
String s = null;
System.out.println(s.equals("2"));
} catch (Exception e) {
// 当线程在睡眠过程中被中断时,捕获该异常并输出错误信息
logger.error("线程在等待过程中被中断: " , e);
// 重新设置中断状态
Thread.currentThread().interrupt();
return WeaResult.fail(500, "出错啦", getResultMapForAction(weaverResultMap, "result", e.getMessage(), request.getRequestManager()));
}
//
//
// String sql2 = "update e10_common.dbo.uf_CustomFlow set field2 = '修改后数据' where field1 = 2 and delete_type = 0 ";
// boolean b = rs.executeSql(sql2, poolname);
// logger.error("更新 = " + b);
//
//
// //rpc新增建模数据
Long uf_CustomFlow_formId = commonDevUtil.getObjId("uf_CustomFlow");
logger.error("uf_CustomFlow_formId = " + uf_CustomFlow_formId);
Long recodId = ebFormDataDubboService.addEmptyData(uf_CustomFlow_formId, currentEmployee);// 获取插入的空的建模id
String sql3 = "update e10_common.dbo.uf_CustomFlow set field2 = '添加数据' where id = " + recodId + " and delete_type = 0 ";
boolean b1 = rs.executeSql(sql3, poolname);
logger.error("sql3 = " + sql3);
logger.error("添加 = " + b1);
// remoteAuthorityRoleService.batchDeleteUserRole();
logger.error("stop CustomTeAction");
Map<String, Object> res = new HashMap<>();
res.put("status", true);

@ -65,9 +65,10 @@ public class UpdateTaskNumber implements Action, EsbServerlessRpcRemoteInterface
String requestId = paramRequestInfo.getRequestid();
String tablename = paramRequestInfo.getRequestManager().getBillTableName();
String dataid = commonDevUtil.getidByrequestid(requestId);
String detailTablename = commonDevUtil.getDetailTableName(tablename,"1");
String sql = "select t.id from e10_core_business.dbo." + detailTablename + " t left join e10_core_business.dbo." + tablename + " a on a.form_data_id = t.form_data_id where a.id = " + requestId + " order by t.id";
String sql = "select t.id from e10_core_business.dbo." + detailTablename + " t left join e10_core_business.dbo." + tablename + " a on a.form_data_id = t.form_data_id where a.FORM_DATA_ID = " + dataid+ " order by t.id";
logger_2c12a616.error(String.valueOf("sql=" + sql));
String poolname = CONN_TYPE.workflow.getType();
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源
@ -84,7 +85,7 @@ public class UpdateTaskNumber implements Action, EsbServerlessRpcRemoteInterface
seq = (k + 1) + "";
}
String sql1 = "update e10_core_business.dbo." + detailTablename + " set rwbh='" + rwbh + "_" + seq + "' where id=" + id;
String sql1 = "update e10_core_business.dbo." + detailTablename + " set rwbh='" + rwbh + "_" + seq + "' where a.FORM_DATA_ID = " + dataid;
boolean b1 = rs2.executeUpdate(sql1);
if(!b1){
logger_2c12a616.error("更新rwbh失败。" );

@ -41,6 +41,8 @@ import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -76,7 +78,7 @@ public class ApiController {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(ApiController.class);
@GetMapping("/hello")
//@PostMapping("/post")
public WeaResult<String> hello(@RequestParam("key") String key) {
public WeaResult<String> hello(@RequestParam("key") String key , HttpServletResponse response) {
// todo api
logger.error("ApiController info : hello " );
@ -93,6 +95,15 @@ public class ApiController {
Map<String ,String > map = new HashMap<>();
RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
try {
String url = "http://party.hengtonggroup.com.cn:903/Account/SSO";
logger.error("sendRedirect url == " + url);
response.sendRedirect(url);
} catch (IOException e) {
logger.error("sendRedirect err == " ,e);
throw new RuntimeException(e);
}
/**
*
*/
@ -112,19 +123,19 @@ public class ApiController {
/**
*
*/
String sql = "select count(1) as zs from atdpersoncardexview " +
"where extype = '未刷卡' and shoulddate > '2024-12-01' and shoulddate < '2025-02-24'";
logger.error("sql == " +sql);
boolean b1 = rs.executeQuery(sql, "hr");
logger.error("b1 == " + b1);
logger.error("getExecuteResult == " +rs.getExecuteResult());
if(rs.next()){
logger.error("zs == " +rs.getString("zs"));
map.put("zs", rs.getString("zs"));
}
// String sql = "select count(1) as zs from atdpersoncardexview " +
// "where extype = '未刷卡' and shoulddate > '2024-12-01' and shoulddate < '2025-02-24'";
//
// logger.error("sql == " +sql);
// boolean b1 = rs.executeQuery(sql, "hr");
//
// logger.error("b1 == " + b1);
// logger.error("getExecuteResult == " +rs.getExecuteResult());
//
// if(rs.next()){
// logger.error("zs == " +rs.getString("zs"));
// map.put("zs", rs.getString("zs"));
// }
// logger.error("ApiController info : hello " );

@ -37,6 +37,8 @@ import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.ServiceException;
import javax.xml.rpc.encoding.XMLType;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.rmi.RemoteException;
import java.text.SimpleDateFormat;
@ -63,7 +65,7 @@ public class MessageSubscriptionController {
private ConfigProp configProp;
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(MessageSubscriptionController.class);
@PostMapping("/subscription")
public WeaResult<String> subscription(@RequestParam Map<String,Object> param, @RequestBody Map<String,Object> params ) throws ServiceException, RemoteException {
public WeaResult<String> subscription(@RequestParam Map<String,Object> param, @RequestBody Map<String,Object> params ) throws ServiceException, RemoteException, MalformedURLException {
logger.error("MessageSubscriptionController Start " );
String jtzhkey = "t6kj9c07jr";
// String jtzhadmin = configProp.getJtzhadmin();
@ -82,7 +84,7 @@ public class MessageSubscriptionController {
return WeaResult.success(map.toString());
}
private void sendMsg(Map<String,Object> params) throws RemoteException, ServiceException {
private void sendMsg(Map<String,Object> params) throws RemoteException, ServiceException, MalformedURLException {
// logger.error("sendMsg params " + params);
String systemId = "SYS006";
String password = "123456";
@ -93,8 +95,13 @@ public class MessageSubscriptionController {
String mobileurl = String.valueOf(params.get("h5Url"));
// String pcurl = configProp.getPc_url()+ URLEncoder.encode(url);
// String msgurl = configProp.getPc_url()+ URLEncoder.encode(mobileurl);
String pcurl = url;
String msgurl = mobileurl;
String pcurl = configProp.getHtportaloaUrl_pc_url()+new URL(url).getPath();
String msgurl = configProp.getHtportaloaUrl_pc_url()+new URL(mobileurl).getPath();
logger.error(" url: " + url);
logger.error(" pcurl: " + pcurl);
String m_msgtitle = String.valueOf(params.get("title"));
String sendid = String.valueOf(params.get("senderId"));
@ -194,7 +201,8 @@ public class MessageSubscriptionController {
String typeNamespace = "http://message.ht_portal_webservice.com";
// String endpoint = "https://sappop.htgd.com.cn:50001/XISOAPAdapter/MessageServlet?senderParty=&senderService=BS_HTU_POP&receiverParty=&receiverService=&interface=SI_HTPortalMessage_OUT&interfaceNamespace=http%3A%2F%2Fhengtong.com%2FHTU%2FHTPortalMessage";
String endpoint = "http://sappod.hengtong.com:50000/XISOAPAdapter/MessageServlet?senderParty=&senderService=BS_HTU&receiverParty=&receiverService=&interface=SI_HTPortalMessage_OUT&interfaceNamespace=http%3A%2F%2Fhengtong.com%2FHTU%2FHTPortalMessage";
// String endpoint = "http://sappod.hengtong.com:50000/XISOAPAdapter/MessageServlet?senderParty=&senderService=BS_HTU&receiverParty=&receiverService=&interface=SI_HTPortalMessage_OUT&interfaceNamespace=http%3A%2F%2Fhengtong.com%2FHTU%2FHTPortalMessage";
String endpoint = configProp.getMessage_url();
Service service = new Service();
Call call = (Call) service.createCall();
call.setTimeout(300000);
@ -215,10 +223,10 @@ public class MessageSubscriptionController {
}
headers.put("Authorization", configProp.getUrl_password());
// logger.error(" Url_password(): " + configProp.getUrl_password());
// logger.error(" systemId: " + systemId);
// logger.error(" password: " + password);
// logger.error(" moudule: " + moudule);
logger.error(" Url_password(): " + configProp.getUrl_password());
logger.error(" systemId: " + systemId);
logger.error(" password: " + password);
logger.error(" moudule: " + moudule);
logger.error(" messages: " + messages);
Object[] val = new Object[] { systemId, password, moudule, messages };

Loading…
Cancel
Save