| @@ -65,10 +65,9 @@ public class WxRentContractController extends BaseController { | |||||
| public ResultData updateFile(@RequestBody WxRentContract wxRentContract) { | public ResultData updateFile(@RequestBody WxRentContract wxRentContract) { | ||||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::updateFile"); | logger.debug("[" + getIpAddr() + "] WxRentContractController::updateFile"); | ||||
| wxRentContract.setTenantId(getTenantId()); | wxRentContract.setTenantId(getTenantId()); | ||||
| return wxRentContractService.updateFile(wxRentContract, getUser().getId()); | |||||
| return wxRentContractService.updateFile(wxRentContract, getUser().getId(),getUser().getName()); | |||||
| } | } | ||||
| @GetMapping("/del") | @GetMapping("/del") | ||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | ||||
| public ResultData delete(String id) { | public ResultData delete(String id) { | ||||
| @@ -62,7 +62,7 @@ public interface WxRentContractService { | |||||
| void exportContract(HttpServletRequest request, HttpServletResponse response, String tenantId, Long id); | void exportContract(HttpServletRequest request, HttpServletResponse response, String tenantId, Long id); | ||||
| ResultData updateFile(WxRentContract wxRentContract, Long userId); | |||||
| ResultData updateFile(WxRentContract wxRentContract, Long userId,String userName); | |||||
| ResultData updateRentContractStatus(Long id); | ResultData updateRentContractStatus(Long id); | ||||
| @@ -803,8 +803,24 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData updateFile(WxRentContract record, Long userId) { | |||||
| return getResultDataForUpdate(record, userId); | |||||
| @Transactional(rollbackFor = {Exception.class}) | |||||
| public ResultData updateFile(WxRentContract record, Long userId,String userName) { | |||||
| ResultData resultData = getResultDataForUpdate(record, userId); | |||||
| try { | |||||
| record.getFlowParams().put("businessId",record.getId().toString()); | |||||
| record.getFlowParams().put("supplement",true); | |||||
| wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId()); | |||||
| // 合同状态改成待签约 | |||||
| WxRentContract updateRentContract = new WxRentContract(); | |||||
| updateRentContract.setId(record.getId()); | |||||
| updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); | |||||
| wxRentContractMapper.updateStatus(updateRentContract); | |||||
| } catch (Exception e) { | |||||
| logger.error("启动审批流失败,e:" + e.getMessage()); | |||||
| throw new MallinkException(ErrorCode.FLOW_FAIL.getCode(), "FLOW FAILD " + e.getMessage()); | |||||
| } | |||||
| return resultData; | |||||
| } | } | ||||
| @Override | @Override | ||||