webservice待办列表

ht
qijirenjian 3 months ago
parent c04cd0cbfe
commit 55cfcf3312

@ -181,6 +181,11 @@ public class ConfigProp {
private String didiRuleId_0;
@Value("${didiRuleId_1}")
private String didiRuleId_1;
@Value("${didiRuleId_2}")
private String didiRuleId_2;
@Value("${didiRuleId_3}")
private String didiRuleId_3;
//htpmoasync
@Value("${projectConclusion}")

@ -42,6 +42,7 @@ public class CallDTtripService extends BaseBean {
try {
// String url = Util.null2String(I18nContextUtilcus.getBean(Environment.class).getProperty("htsloasync.dttrip_orderUrl")).trim();
String url = configProp.getDttrip_orderUrl();
logger_a99d9846.error("optForDTtrip url = " + url);
JSONObject jsonObject = new JSONObject();
jsonObject.put("isEncrypt", false);
jsonObject.put("random", UUID.randomUUID().toString());
@ -60,6 +61,10 @@ public class CallDTtripService extends BaseBean {
password = map.get("password");
secret = map.get("secret");
}
logger_a99d9846.error("jsonObject = " + jsonObject);
logger_a99d9846.error("account = " + account);
logger_a99d9846.error("password = " + password);
String accessToken = getToken(jsonObject,account,password);
if ("E".equals(accessToken)) {
str[0] = "E";
@ -70,6 +75,7 @@ public class CallDTtripService extends BaseBean {
jsonObject.put("accessToken", accessToken);
jsonObject.put("param", param);
logger_a99d9846.error("调用同程差旅单接口数据:" + jsonObject.toJSONString());
logger_a99d9846.error("secret" + secret);
httpPost = new HttpPost(url + "?sign=" + getSign(jsonObject.toJSONString(),secret));
httpPost.setHeader(HTTP.CONTENT_TYPE, "application/json; charset=UTF-8");
httpPost.setHeader("Accept", "application/json; charset=UTF-8");
@ -114,6 +120,8 @@ public class CallDTtripService extends BaseBean {
// String account = Util.null2String(I18nContextUtilcus.getBean(Environment.class).getProperty("htsloasync.dttrip_account")).trim();
// String password = Util.null2String(I18nContextUtilcus.getBean(Environment.class).getProperty("htsloasync.dttrip_password")).trim();
String url = configProp.getDttrip_tokenUrl();
logger_a99d9846.error("getToken url = " + url);
// String account = configProp.getDttrip_account();
// String password = configProp.getDttrip_password();
httpPost = new HttpPost(url);
@ -156,8 +164,6 @@ public class CallDTtripService extends BaseBean {
}
public String getSign(String postJson,String secret){
// String secret = Util.null2String(I18nContextUtilcus.getBean(Environment.class).getProperty("htsloasync.dttrip_secret")).trim();
// String secret = configProp.getDttrip_secret();
String postData_md5 = SecureUtil.md5(postJson).toLowerCase();
String finallySign = SecureUtil.md5(postData_md5 + secret).toLowerCase();
return finallySign;

@ -73,6 +73,10 @@ public class DidiYongCheAction extends BaseBean implements Action, EsbServerless
ruleId=configProp.getDidiRuleId_0();
}else if(map.get("YCZD").equals("1")){
ruleId=configProp.getDidiRuleId_1();
}else if(map.get("YCZD").equals("2")){
ruleId=configProp.getDidiRuleId_2();
}else if(map.get("YCZD").equals("3")){
ruleId=configProp.getDidiRuleId_3();
}
String startTime = map.get("DDKSRQ") + " 00:00:00";
String endTime = map.get("DDJSRQ") + " 23:59:59";

@ -169,7 +169,7 @@ public class AutoCreateWorkflowService {
Object value = entry.getValue();
FormDataDuty formDataDuty = FormDataDuty.builder().build();
Long optionId = null;
String optionId = null;
// log.error("入参key:"+key+" value:"+value);
String code = "";
JSONObject doc = new JSONObject();
@ -205,12 +205,12 @@ public class AutoCreateWorkflowService {
if(mainMap.get("hrm:"+str2) != null){
String hrmResource = (String) mainMap.get("hrm:"+str2);
Long id = getIdByWorkcode(hrmResource,createTenantKey,zhsjy);
SimpleEmployee simpleEmployee = hrmCommonUtil.getSimpleEmployee(id);
String id = getIdByWorkcode(hrmResource,createTenantKey,zhsjy);
SimpleEmployee simpleEmployee = hrmCommonUtil.getSimpleEmployee(Long.valueOf(id));
log.error("simpleEmployee == " + simpleEmployee.toString());
optionId = simpleEmployee.getDepartmentId();
optionId = String.valueOf(simpleEmployee.getDepartmentId());
if (key.contains("com:")) {
optionId = Long.valueOf(departmentComInfo.getSubcompanyid1(String.valueOf(optionId)));
optionId = departmentComInfo.getSubcompanyid1(String.valueOf(optionId)) ;
}
key = str3;
formDataDuty.setDataKey(key);
@ -235,7 +235,7 @@ public class AutoCreateWorkflowService {
String docId = docUtil.createdocByBase642(docName, base64, "", creator, "");
log.error("生成的附件id"+docId);
formDataDuty.setDataKey(key);
DataOptions options = DataOptions.builder().optionId(Long.parseLong(docId)).content(docName).build();
DataOptions options = DataOptions.builder().optionId( docId ).content(docName).build();
List<DataOptions> dataOptions = new ArrayList();
dataOptions.add(options);
formDataDuty.setDataOptions(dataOptions);
@ -293,7 +293,7 @@ public class AutoCreateWorkflowService {
// 遍历内部 JSONArray
for (int j = 0; j < innerArray.size(); j++) {
JSONObject jsonDetail = innerArray.getJSONObject(j);
Long optionId = null;
String optionId = null;
// 遍历 JSONObject 的键值对
for (String key : jsonDetail.keySet()) {
@ -325,11 +325,11 @@ public class AutoCreateWorkflowService {
if(mainMap.get("hrm:"+str2) != null){
String hrmResource = (String) mainMap.get("hrm:"+str2);
Long id = getIdByWorkcode(hrmResource,createTenantKey,zhsjy);
SimpleEmployee simpleEmployee = hrmCommonUtil.getSimpleEmployee(id);
optionId = simpleEmployee.getDepartmentId();
String id = getIdByWorkcode(hrmResource,createTenantKey,zhsjy);
SimpleEmployee simpleEmployee = hrmCommonUtil.getSimpleEmployee(Long.valueOf(id));
optionId = String.valueOf(simpleEmployee.getDepartmentId());
if (key.contains("com:")) {
optionId = Long.valueOf(departmentComInfo.getSubcompanyid1(String.valueOf(optionId)));
optionId = departmentComInfo.getSubcompanyid1(String.valueOf(optionId)) ;
}
key = str3;
formDataDuty.setDataKey(key);
@ -431,10 +431,9 @@ public class AutoCreateWorkflowService {
* @param workcode
* @return
*/
private Long getIdByWorkcode(String workcode,String createTenantKey , String zhsjy) {
private String getIdByWorkcode(String workcode,String createTenantKey , String zhsjy) {
log.error("人员工号:"+workcode);
String groupId = "weaver-ebuilder-form-service";
String sql = "select ID from eteams.dbo.employee where status = 'normal' and job_num = '"+workcode+"' and tenant_key = '"+createTenantKey+"'";
Map<String,Object> recordMap = new HashMap<>();
// String sourceType = "LOGIC";
String sourceType = zhsjy;
@ -444,13 +443,26 @@ public class AutoCreateWorkflowService {
// recordMap = recordList.get(0);
// }
RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
rs.executeQuery(sql, zhsjy);
Long id = null;
if(rs.next()){
id = Long.parseLong(rs.getString("id"));
}
log.error("人员ID"+id);
return id;
List<String> list = Arrays.asList(workcode.split(","));
String ids = "";
for (String code: list) {
Long id = null;
String sql = "select ID from eteams.dbo.employee where status = 'normal' and job_num = '"+code+"' and tenant_key = '"+createTenantKey+"'";
rs.executeQuery(sql, zhsjy);
if(rs.next()){
id = Long.parseLong(rs.getString("id"));
}
log.error("人员ID"+id);
ids+=id;
};
return ids;
}
}

@ -18,7 +18,7 @@ import lombok.NoArgsConstructor;
public class DataOptions {
private Long optionId;
private String optionId;
private Long dataKey;

Loading…
Cancel
Save