|
|
@ -233,6 +233,7 @@ public class BaseShuntingInvoicingApplyService extends MybatisBaseService<BaseSh |
|
|
|
|
|
|
|
public ResultBean submitSunInv(SubmitBaseShuntingInvoicingApplyDto dto) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
List<BaseShuntingInvoicinApplyeVehDto> baseShuntingInvoicinApplyeVehs = dto.getBaseShuntingInvoicinApplyeVehs(); |
|
|
|
//根据用户sid获取staffSid
|
|
|
|
ResultBean<SysUserVo> userVoResultBean = sysUserFeign.fetchBySid(dto.getCreateBySid()); |
|
|
|
if (!userVoResultBean.getSuccess()) { |
|
|
@ -281,6 +282,11 @@ public class BaseShuntingInvoicingApplyService extends MybatisBaseService<BaseSh |
|
|
|
} |
|
|
|
UpdateFlowFieldVo ufVo = voResultBean.getData(); |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(ufVo)); |
|
|
|
if (baseShuntingInvoicinApplyeVehs.size() > 0){ |
|
|
|
for (BaseShuntingInvoicinApplyeVehDto baseShuntingInvoicinApplyeVeh : baseShuntingInvoicinApplyeVehs) { |
|
|
|
baseInternalPurchaseVehicleService.updateIsInvoicing(baseShuntingInvoicinApplyeVeh.getPurchaseSid(),"2"); |
|
|
|
} |
|
|
|
} |
|
|
|
return voResultBean; |
|
|
|
} |
|
|
|
if (r == 2) { |
|
|
@ -395,12 +401,20 @@ public class BaseShuntingInvoicingApplyService extends MybatisBaseService<BaseSh |
|
|
|
} |
|
|
|
|
|
|
|
private ResultBean handleProcess(BusinessVariables bv, ResultBean rb, BaseShuntingInvoicingApply baseShuntingInvoicingApply) { |
|
|
|
List<BaseShuntingInvoicinApplyeVehDetailsVo> baseShuntingInvoicinApplyeVehDetailsVos = baseShuntingInvoicinApplyeVehService.fetchByMainSid(baseShuntingInvoicingApply.getSid()); |
|
|
|
if (bv.getTaskId().equals(baseShuntingInvoicingApply.getTaskId())) { |
|
|
|
ResultBean<UpdateFlowFieldVo> resultBean = flowableFeign.handleProsess(bv); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg(resultBean.getMsg()); |
|
|
|
} |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
|
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { |
|
|
|
if (baseShuntingInvoicinApplyeVehDetailsVos.size() > 0){ |
|
|
|
for (BaseShuntingInvoicinApplyeVehDetailsVo baseShuntingInvoicinApplyeVehDetailsVo : baseShuntingInvoicinApplyeVehDetailsVos) { |
|
|
|
baseInternalPurchaseVehicleService.updateIsInvoicing(baseShuntingInvoicinApplyeVehDetailsVo.getPurchaseSid(),"1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return rb.success().setData(resultBean.getData()); |
|
|
|
} else { |
|
|
|
return rb.setMsg("操作失败!提交的数据不一致"); |
|
|
@ -493,6 +507,7 @@ public class BaseShuntingInvoicingApplyService extends MybatisBaseService<BaseSh |
|
|
|
return rb.setMsg("参数错误:userSid"); |
|
|
|
} |
|
|
|
BaseShuntingInvoicingApply baseShuntingInvoicingApply = fetchBySid(query.getBusinessSid()); |
|
|
|
List<BaseShuntingInvoicinApplyeVehDetailsVo> baseShuntingInvoicinApplyeVehDetailsVos = baseShuntingInvoicinApplyeVehService.fetchByMainSid(baseShuntingInvoicingApply.getSid()); |
|
|
|
String businessTaskId = baseShuntingInvoicingApply.getTaskId(); |
|
|
|
if (StringUtils.isNotBlank(businessTaskId)) { |
|
|
|
if (businessTaskId.equals(query.getTaskId())) { |
|
|
@ -504,6 +519,11 @@ public class BaseShuntingInvoicingApplyService extends MybatisBaseService<BaseSh |
|
|
|
} |
|
|
|
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); |
|
|
|
updateFlowFiled(map); |
|
|
|
if (baseShuntingInvoicinApplyeVehDetailsVos.size() > 0){ |
|
|
|
for (BaseShuntingInvoicinApplyeVehDetailsVo baseShuntingInvoicinApplyeVehDetailsVo : baseShuntingInvoicinApplyeVehDetailsVos) { |
|
|
|
baseInternalPurchaseVehicleService.updateIsInvoicing(baseShuntingInvoicinApplyeVehDetailsVo.getPurchaseSid(),"0"); |
|
|
|
} |
|
|
|
} |
|
|
|
return rb.success().setData(resultBean.getData()); |
|
|
|
} |
|
|
|
} |
|
|
|