|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.jeeplus.centerservice.dto.reimbursement.SaveInfoDto;
|
|
|
+import com.jeeplus.centerservice.enums.TaskAliasEnum;
|
|
|
import com.jeeplus.centerservice.service.ccpm.CcpmRequest;
|
|
|
import com.jeeplus.centerservice.service.ccpm.flow.FlowRequest;
|
|
|
import com.jeeplus.centerservice.utils.ConvertServiceUtil;
|
|
@@ -30,11 +31,12 @@ public class ReimbursementService {
|
|
|
/**
|
|
|
* 查询报销待办详情
|
|
|
* @param id
|
|
|
+ * @param processDefKey 流程key:例如 13、102...
|
|
|
* @return
|
|
|
*/
|
|
|
- public SaveInfoDto getReimbursementById(String id) {
|
|
|
+ public SaveInfoDto getReimbursementById(String id, String processDefKey) {
|
|
|
SaveInfoDto saveInfoDto = new SaveInfoDto();
|
|
|
- Object response = ccpmRequest.getById(id, "13"); // 报销详情
|
|
|
+ Object response = ccpmRequest.getById(id, processDefKey); // 报销详情
|
|
|
if (Objects.nonNull(response)) {
|
|
|
saveInfoDto = ConvertServiceUtil.convertReim(response); // 格式转换
|
|
|
if (Objects.nonNull(saveInfoDto) && StringUtils.isNotBlank(saveInfoDto.getProcInsId())) {
|
|
@@ -60,15 +62,14 @@ public class ReimbursementService {
|
|
|
* 报销审核通过、驳回
|
|
|
* @param id
|
|
|
* @param flag
|
|
|
- * @param taskDefKey
|
|
|
* @return
|
|
|
*/
|
|
|
- public Map<String, Object> reimAudit(String id, String flag, String taskDefKey, String comment) {
|
|
|
+ public Map<String, Object> reimAudit(String id, String flag, String comment, String processDefKey) {
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
- Object response = ccpmRequest.getById(id, "13"); // 报销详情
|
|
|
+ Object response = ccpmRequest.getById(id, processDefKey); // 报销详情
|
|
|
if (Objects.nonNull(response)) {
|
|
|
Map<String, Object> resp = JSONObject.parseObject(JSON.toJSONString(response));
|
|
|
- Object result = ccpmRequest.saveAuditFunc(resp, taskDefKey, flag, comment); // 审核通过、审核驳回
|
|
|
+ Object result = ccpmRequest.saveAuditFunc(resp, flag, comment, processDefKey); // 审核通过、审核驳回
|
|
|
if (Objects.nonNull(result)) {
|
|
|
resultMap = JSONObject.parseObject(JSON.toJSONString(result));
|
|
|
} else {
|
|
@@ -90,7 +91,7 @@ public class ReimbursementService {
|
|
|
*/
|
|
|
public Map<String, Object> deleteReim(String id) {
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
- Object result = flowRequest.deleteNotify(id,"13"); // 13代表报销模块
|
|
|
+ Object result = flowRequest.deleteNotify(id, TaskAliasEnum.REIMBURSEMENT.getCcpmTaskAlias()); // 13代表报销模块
|
|
|
if (Objects.nonNull(result)) {
|
|
|
resultMap.putAll(JSONObject.parseObject(JSON.toJSONString(result)));
|
|
|
} else {
|