|
|
@ -1130,7 +1130,6 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
baseMapper.updateStateBySid(1, query.getBusinessSid()); |
|
|
|
Map<String, Object> map = BeanUtil.beanToMap(resultBean.getData()); |
|
|
|
//更新业务中的流程相关的参数
|
|
|
|
|
|
|
|
updateFlowFiled(map); |
|
|
|
busDeliveredApply = fetchBySid(query.getBusinessSid()); |
|
|
|
ResultBean<List<LatestTaskVo>> listResultBean = flowTaskFeign.getLatestTasks(busDeliveredApply.getProcInstId()); |
|
|
@ -1735,6 +1734,30 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
boolean isTrue = false; |
|
|
|
//若为本销售订单中最后一批车辆出库,则需要判断是否还有未赠送的套餐,如果存在则不允许提交
|
|
|
|
//查询该合同的销售订单的车辆sid集合
|
|
|
|
List<String> busSidList = busSalesOrderService.selectByContractNoToVin(dto.getContractId()); |
|
|
|
//查询已出库或出库审批中的车辆sid集合
|
|
|
|
List<String> applyBusSidList = baseMapper.selectByContractNoToVin(dto.getContractId()); |
|
|
|
//所有车辆与已出库或审批中的车辆集合查询出差集
|
|
|
|
busSidList.removeAll(applyBusSidList); |
|
|
|
//根据合同编号以及车辆sid查询busVinSid
|
|
|
|
List<String> busVinSidList = baseMapper.selectByContractNoToVinSid(dto.getContractId(),vinSid); |
|
|
|
busSidList.removeAll(busVinSidList); |
|
|
|
busVinSidList.removeAll(Collections.singleton(null)); |
|
|
|
if(busVinSidList.isEmpty()){ |
|
|
|
isTrue = true; |
|
|
|
} |
|
|
|
//是否是最后一批出库车辆
|
|
|
|
if(isTrue){ |
|
|
|
//是否存在未赠送的套餐,如果存在则不允许提交
|
|
|
|
int num = baseMapper.selectNumByContractNo(dto.getContractId()); |
|
|
|
int orderNum = busSalesOrderDiscountService.selectByContractNo(dto.getContractId()); |
|
|
|
if(orderNum>num){ |
|
|
|
return rb.setMsg("该合同还有未赠送的套餐,不允许提交"); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
return rb.setMsg("请选择要出库的车辆"); |
|
|
|
} |
|
|
|