|
|
|
@ -15,6 +15,7 @@ import com.spring.modules.base.data.OaUserData; |
|
|
|
import com.spring.modules.base.data.PlmPropertiesItemAvailableData; |
|
|
|
import com.spring.modules.base.data.PlmPropertiesItemData; |
|
|
|
import com.spring.modules.base.data.PlmPropertiesModelHeaderData; |
|
|
|
import com.spring.modules.base.entity.Bu; |
|
|
|
import com.spring.modules.base.service.BaseService; |
|
|
|
import com.spring.modules.base.service.TransNoControlService; |
|
|
|
import com.spring.modules.base.utils.CommonUtils; |
|
|
|
@ -1227,24 +1228,55 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap |
|
|
|
* 回滚方法 |
|
|
|
*/ |
|
|
|
public void rollBackFunction(ParamData paramData, Exception e) { |
|
|
|
// 撤回接口 |
|
|
|
DoForceDrawBackParam doForceDrawBackParam = new DoForceDrawBackParam(); |
|
|
|
doForceDrawBackParam.setUserId(paramData.getUserId()); |
|
|
|
doForceDrawBackParam.setRequestId(paramData.getRequestId()); |
|
|
|
String doForceDrawBackURL = apiUrlOa + "/oa/interface/doForceDrawBack"; |
|
|
|
ResponseData doForceDrawBackResponses = HttpClientUtil.doPostByRawWithOA(doForceDrawBackURL, doForceDrawBackParam); |
|
|
|
if (!"0".equals(doForceDrawBackResponses.getCode())) { |
|
|
|
throw new RuntimeException(e.getMessage() + "; OA撤回流程异常信息:" + doForceDrawBackResponses.getMsg()); |
|
|
|
} |
|
|
|
// 调用删除流程接口 |
|
|
|
RequestOperatorInfoParam requestOperatorInfoParam = new RequestOperatorInfoParam(); |
|
|
|
requestOperatorInfoParam.setUserId(paramData.getUserId()); |
|
|
|
requestOperatorInfoParam.setRequestId(paramData.getRequestId()); |
|
|
|
String deleteRequestURL = apiUrlOa + "/oa/interface/deleteRequest"; |
|
|
|
ResponseData deleteRequestResponses = HttpClientUtil.doPostByRawWithOA(deleteRequestURL, requestOperatorInfoParam); |
|
|
|
if (!"0".equals(deleteRequestResponses.getCode())) { |
|
|
|
throw new RuntimeException(e.getMessage() + "; OA删除流程异常信息:" + deleteRequestResponses.getMsg()); |
|
|
|
if (e.getMessage().contains("OA新建流程异常信息")) { |
|
|
|
// 撤回接口 |
|
|
|
DoForceDrawBackParam doForceDrawBackParam = new DoForceDrawBackParam(); |
|
|
|
doForceDrawBackParam.setUserId(paramData.getUserId()); |
|
|
|
doForceDrawBackParam.setRequestId(paramData.getRequestId()); |
|
|
|
String doForceDrawBackURL = apiUrlOa + "/oa/interface/doForceDrawBack"; |
|
|
|
ResponseData doForceDrawBackResponses = HttpClientUtil.doPostByRawWithOA(doForceDrawBackURL, doForceDrawBackParam); |
|
|
|
if (!"0".equals(doForceDrawBackResponses.getCode())) { |
|
|
|
throw new RuntimeException(e.getMessage() + "; 强制收回流程异常信息:" + doForceDrawBackResponses.getMsg()); |
|
|
|
} |
|
|
|
// 调用删除流程接口 |
|
|
|
RequestOperatorInfoParam requestOperatorInfoParam = new RequestOperatorInfoParam(); |
|
|
|
requestOperatorInfoParam.setUserId(paramData.getUserId()); |
|
|
|
requestOperatorInfoParam.setRequestId(paramData.getRequestId()); |
|
|
|
String deleteRequestURL = apiUrlOa + "/oa/interface/deleteRequest"; |
|
|
|
ResponseData deleteRequestResponses = HttpClientUtil.doPostByRawWithOA(deleteRequestURL, requestOperatorInfoParam); |
|
|
|
if (!"0".equals(deleteRequestResponses.getCode())) { |
|
|
|
throw new RuntimeException(e.getMessage() + "; OA删除流程异常信息:" + deleteRequestResponses.getMsg()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 撤回接口 |
|
|
|
DoForceDrawBackParam doForceDrawBackParam = new DoForceDrawBackParam(); |
|
|
|
doForceDrawBackParam.setUserId(paramData.getUserId()); |
|
|
|
doForceDrawBackParam.setRequestId(paramData.getRequestId()); |
|
|
|
String doForceDrawBackURL = apiUrlOa + "/oa/interface/doForceDrawBack"; |
|
|
|
ResponseData doForceDrawBackResponses = HttpClientUtil.doPostByRawWithOA(doForceDrawBackURL, doForceDrawBackParam); |
|
|
|
if (!"0".equals(doForceDrawBackResponses.getCode())) { |
|
|
|
throw new RuntimeException(e.getMessage() + "; 强制收回流程异常信息:" + doForceDrawBackResponses.getMsg()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// // 撤回接口 |
|
|
|
// DoForceDrawBackParam doForceDrawBackParam = new DoForceDrawBackParam(); |
|
|
|
// doForceDrawBackParam.setUserId(paramData.getUserId()); |
|
|
|
// doForceDrawBackParam.setRequestId(paramData.getRequestId()); |
|
|
|
// String doForceDrawBackURL = apiUrlOa + "/oa/interface/doForceDrawBack"; |
|
|
|
// ResponseData doForceDrawBackResponses = HttpClientUtil.doPostByRawWithOA(doForceDrawBackURL, doForceDrawBackParam); |
|
|
|
// if (!"0".equals(doForceDrawBackResponses.getCode())) { |
|
|
|
// throw new RuntimeException(e.getMessage() + "; OA撤回流程异常信息:" + doForceDrawBackResponses.getMsg()); |
|
|
|
// } |
|
|
|
// // 调用删除流程接口 |
|
|
|
// RequestOperatorInfoParam requestOperatorInfoParam = new RequestOperatorInfoParam(); |
|
|
|
// requestOperatorInfoParam.setUserId(paramData.getUserId()); |
|
|
|
// requestOperatorInfoParam.setRequestId(paramData.getRequestId()); |
|
|
|
// String deleteRequestURL = apiUrlOa + "/oa/interface/deleteRequest"; |
|
|
|
// ResponseData deleteRequestResponses = HttpClientUtil.doPostByRawWithOA(deleteRequestURL, requestOperatorInfoParam); |
|
|
|
// if (!"0".equals(deleteRequestResponses.getCode())) { |
|
|
|
// throw new RuntimeException(e.getMessage() + "; OA删除流程异常信息:" + deleteRequestResponses.getMsg()); |
|
|
|
// } |
|
|
|
throw new RuntimeException(e.getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
@ -1812,6 +1844,17 @@ public class ChangeManagementServiceImpl extends ServiceImpl<ChangeManagementMap |
|
|
|
return list; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @param data |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<Bu> getBuBySite(Bu data) { |
|
|
|
List<Bu> buList = changeManagementMapper.getBuBySite(data); |
|
|
|
return buList; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 变更申请新增校验参数 |
|
|
|
|