parent
							
								
									47bb4f9999
								
							
						
					
					
						commit
						6cac95c4b2
					
				|  | @ -72,6 +72,7 @@ public class FWImpl { | ||||||
|     public static String sendFW(DynamicObject pm_purorderbill){ |     public static String sendFW(DynamicObject pm_purorderbill){ | ||||||
|         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||||||
|         String billno = pm_purorderbill.getString("billno");//lcbh |         String billno = pm_purorderbill.getString("billno");//lcbh | ||||||
|  |         String tqq9_fwrequestid = pm_purorderbill.getString("tqq9_fwrequestid");//泛微流程ID | ||||||
|         DynamicObject creator = pm_purorderbill.getDynamicObject("creator");//cjr |         DynamicObject creator = pm_purorderbill.getDynamicObject("creator");//cjr | ||||||
|         String cjr = "363"; |         String cjr = "363"; | ||||||
|         if(creator != null){ |         if(creator != null){ | ||||||
|  | @ -497,7 +498,12 @@ public class FWImpl { | ||||||
|         } |         } | ||||||
|         String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZCGDD"); |         String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZCGDD"); | ||||||
|         FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); |         FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); | ||||||
|         String resultStr = fwRestfulUtils.doBillAction(mainArr, detailRootArr, "新增采购单", fw_wfid_xzcgdd, billno); |         //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 | ||||||
|  |         boolean isCreate = true; | ||||||
|  |         if(StringUtils.isNotBlank(tqq9_fwrequestid)){ | ||||||
|  |             isCreate = false; | ||||||
|  |         } | ||||||
|  |         String resultStr = fwRestfulUtils.doBillAction(mainArr, detailRootArr, "新增采购单", fw_wfid_xzcgdd, billno, isCreate); | ||||||
|         return resultStr; |         return resultStr; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -167,7 +167,7 @@ public class FWRestfulUtils { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 发起审批流程 |      * 调用泛微流程接口 | ||||||
|      * @param mainData |      * @param mainData | ||||||
|      * @param detailData |      * @param detailData | ||||||
|      * @param requestName |      * @param requestName | ||||||
|  | @ -175,7 +175,7 @@ public class FWRestfulUtils { | ||||||
|      * @param billno |      * @param billno | ||||||
|      * @return |      * @return | ||||||
|      */ |      */ | ||||||
|     public String doBillAction(JSONArray mainData, JSONArray detailData, String requestName, String workflowid, String billno){ |     public String doBillAction(JSONArray mainData, JSONArray detailData, String requestName, String workflowid, String billno, boolean isCreate){ | ||||||
|         Map<String, Object> registMap = regist(); |         Map<String, Object> registMap = regist(); | ||||||
|         if(registMap != null && registMap.size() > 0){ |         if(registMap != null && registMap.size() > 0){ | ||||||
|             String spk = StrUtil.nullToEmpty((String) registMap.get("spk")); |             String spk = StrUtil.nullToEmpty((String) registMap.get("spk")); | ||||||
|  | @ -186,7 +186,12 @@ public class FWRestfulUtils { | ||||||
|                     CloseableHttpResponse response;// 响应类, |                     CloseableHttpResponse response;// 响应类, | ||||||
|                     CloseableHttpClient httpClient = HttpClients.createDefault(); |                     CloseableHttpClient httpClient = HttpClients.createDefault(); | ||||||
|                     //restful接口url |                     //restful接口url | ||||||
|                     String url = "http://180.166.208.42:8043/" + "api/workflow/paService/doCreateRequest"; |                     String url = "http://180.166.208.42:8043/"; | ||||||
|  |                     if(isCreate){ | ||||||
|  |                         url = url + "api/workflow/paService/doCreateRequest"; | ||||||
|  |                     }else{ | ||||||
|  |                         url = url + "api/workflow/paService/submitRequest"; | ||||||
|  |                     } | ||||||
|                     HttpPost httpPost = new HttpPost(url); |                     HttpPost httpPost = new HttpPost(url); | ||||||
|                     //当前日期 |                     //当前日期 | ||||||
|                     String currentDate = getCurrentDate(); |                     String currentDate = getCurrentDate(); | ||||||
|  | @ -240,6 +245,7 @@ public class FWRestfulUtils { | ||||||
|         return null; |         return null; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|     public String getMD5Str(String plainText){ |     public String getMD5Str(String plainText){ | ||||||
|         //定义一个字节数组 |         //定义一个字节数组 | ||||||
|         byte[] secretBytes = null; |         byte[] secretBytes = null; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue