|
|
@ -176,11 +176,11 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres |
|
|
|
record.setImages(list1); |
|
|
|
if ("待提交".equals(record.getState())) { |
|
|
|
record.setShowDetectBtn(true); |
|
|
|
record.setShowDownloadBtn(true); |
|
|
|
record.setShowUpdateBtn(true); |
|
|
|
} |
|
|
|
if ("已办结".equals(record.getState())) { |
|
|
|
record.setShowUploadBtn(true); |
|
|
|
record.setShowDownloadBtn(true); |
|
|
|
} |
|
|
|
} |
|
|
|
return iPage; |
|
|
@ -228,7 +228,7 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres |
|
|
|
record.setShowDetectBtn(true); |
|
|
|
record.setShowUpdateBtn(true); |
|
|
|
} |
|
|
|
if ("审批通过".equals(record.getState())) { |
|
|
|
if ("已办结".equals(record.getState())) { |
|
|
|
record.setShowDownloadBtn(true); |
|
|
|
record.setShowUploadBtn(true); |
|
|
|
} |
|
|
@ -398,6 +398,8 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public ResultBean deleteCarTransfer(String sid) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
String type1 = "04"; //保单照片
|
|
|
|
String type2 = "05"; //现场照片
|
|
|
|
ScmVehicleGression scmVehicleGression = fetchBySid(sid); |
|
|
|
if (scmVehicleGression == null) { |
|
|
|
return rb.setMsg("该数据已被删除"); |
|
|
@ -406,6 +408,8 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres |
|
|
|
if (i <= 0) { |
|
|
|
return rb.setMsg("删除失败"); |
|
|
|
} |
|
|
|
scmFileService.deleteByLinkSidAndType(sid, type1); |
|
|
|
scmFileService.deleteByLinkSidAndType(sid, type2); |
|
|
|
return rb.success().setMsg("删除成功"); |
|
|
|
} |
|
|
|
|
|
|
@ -634,6 +638,10 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres |
|
|
|
ResultBean<List<GetNodeVo>> rb = new ResultBean<>(); |
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
BeanUtil.copyProperties(query, bv); |
|
|
|
Map<String, Object> formVariables = query.getFormVariables(); |
|
|
|
//判断流程分支
|
|
|
|
Map<String, Object> map = IsTrue(formVariables.get("businessSid")); |
|
|
|
bv.setFormVariables(map); |
|
|
|
bv.setModelId(ProcDefEnum.SCMCARTRANSFER.getProDefId()); |
|
|
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getPreviousNodesForReject(bv); |
|
|
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|
|
@ -651,6 +659,10 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres |
|
|
|
ResultBean<List<GetNodeVo>> rb = ResultBean.fireFail(); |
|
|
|
BusinessVariables bv = new BusinessVariables(); |
|
|
|
BeanUtil.copyProperties(query, bv); |
|
|
|
Map<String, Object> formVariables = query.getFormVariables(); |
|
|
|
//判断流程分支
|
|
|
|
Map<String, Object> map = IsTrue(formVariables.get("businessSid")); |
|
|
|
bv.setFormVariables(map); |
|
|
|
bv.setModelId(ProcDefEnum.SCMCARTRANSFER.getProDefId()); |
|
|
|
ResultBean<List<Map<String, Object>>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); |
|
|
|
//判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给getNodeVo
|
|
|
@ -709,7 +721,7 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres |
|
|
|
BeanUtil.copyProperties(query, flowTaskVo); |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.revokeProcess(flowTaskVo); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
return rb.setMsg("操作失败!"); |
|
|
|
} |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
|
return rb.success().setData(resultBean.getData()); |
|
|
@ -778,4 +790,27 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres |
|
|
|
} |
|
|
|
return rb.success().setMsg("删除成功"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据业务sid查询,判断流程分支 |
|
|
|
* |
|
|
|
* @param businessSid |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public Map<String, Object> IsTrue(Object businessSid) { |
|
|
|
ScmVehicleGression scmVehicleGression = fetchBySid(businessSid.toString()); |
|
|
|
boolean isTrue = false; |
|
|
|
if (StringUtils.isNotBlank(scmVehicleGression.getApplicantFunds())) { |
|
|
|
if ("0".equals(scmVehicleGression.getApplicantFunds())) { |
|
|
|
isTrue = false; |
|
|
|
} else { |
|
|
|
isTrue = true; |
|
|
|
} |
|
|
|
} else { |
|
|
|
isTrue = false; |
|
|
|
} |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
map.put("isTrue", isTrue); |
|
|
|
return map; |
|
|
|
} |
|
|
|
} |