|
|
@@ -8,6 +8,7 @@ import com.malk.hangshi.service.DingTalkService;
|
|
|
import com.malk.hangshi.service.PayService;
|
|
|
import com.malk.server.aliwork.YDConf;
|
|
|
import com.malk.server.aliwork.YDParam;
|
|
|
+import com.malk.server.common.McException;
|
|
|
import com.malk.server.dingtalk.DDConf;
|
|
|
import com.malk.server.dingtalk.DDR;
|
|
|
import com.malk.server.dingtalk.MDR;
|
|
|
@@ -460,11 +461,35 @@ public class PayServiceImpl implements PayService {
|
|
|
formData.put("dateField_mlj0cv20",timestamp);
|
|
|
formData.put("radioField_mke10pcc",classType);//是否外包
|
|
|
formData.put("textareaField_mke0p9o9",content[0]);//上级部门内容
|
|
|
- formData.put("textField_mjsiv3xl",UtilMap.getList(e, "departmentSelectField_mjgj9noi").get(0).toString()+dateStr+"班前会");//会议主题
|
|
|
- ydClient.operateData(_initLYParam()
|
|
|
- .formUuid("FORM-18921AB3A1AD4CC6853EB7631B9ABA0AHCF3")
|
|
|
- .formDataJson(JSON.toJSONString(formData))
|
|
|
- .build(), YDConf.FORM_OPERATION.start);
|
|
|
+ String name = "";
|
|
|
+ try {
|
|
|
+ Map deptInfo = ddClient_contacts.getDepartmentInfo(ddClient.getAccessToken(), Long.parseLong(UtilMap.getList(e, "departmentSelectField_mjgj9noi_id").get(0).toString()));
|
|
|
+ name = UtilMap.getString(deptInfo, "name");
|
|
|
+ log.info("部门信息:{}",deptInfo);
|
|
|
+ } catch (NumberFormatException ex) {
|
|
|
+ name = UtilMap.getList(e, "departmentSelectField_mjgj9noi").get(0).toString();
|
|
|
+ log.info("获取部门信息出错:{}",ex.toString());
|
|
|
+ ex.printStackTrace();
|
|
|
+ }
|
|
|
+ formData.put("textField_mjsiv3xl",name + dateStr + "班前会");//会议主题
|
|
|
+ try {
|
|
|
+ ydClient.operateData(_initLYParam()
|
|
|
+ .formUuid("FORM-18921AB3A1AD4CC6853EB7631B9ABA0AHCF3")
|
|
|
+ .formDataJson(JSON.toJSONString(formData))
|
|
|
+ .build(), YDConf.FORM_OPERATION.start);
|
|
|
+ }catch (McException mcException){
|
|
|
+ try {
|
|
|
+ Thread.sleep(10000);
|
|
|
+ } catch (InterruptedException ex) {
|
|
|
+ throw new RuntimeException(ex);
|
|
|
+ }
|
|
|
+ ydClient.operateData(_initLYParam()
|
|
|
+ .formUuid("FORM-18921AB3A1AD4CC6853EB7631B9ABA0AHCF3")
|
|
|
+ .formDataJson(JSON.toJSONString(formData))
|
|
|
+ .build(), YDConf.FORM_OPERATION.start);
|
|
|
+ mcException.printStackTrace();
|
|
|
+
|
|
|
+ }
|
|
|
}else {
|
|
|
if(depType.equals("下属公司")){
|
|
|
formData.put("departmentSelectField_mkkjlg1x",issueDepartment);
|