| | |
| | | } |
| | | SysCompanyBo companyBo = new SysCompanyBo(); |
| | | companyBo.setCompanyId(company.getCompanyId()); |
| | | if (company.getCheckStatus()!=0){ |
| | | throw new BaseException("该企业已审批!"); |
| | | } |
| | | if (bo.getCheckStatus()== -1){ |
| | | company.setCheckStatus(-1); |
| | | companyBo.setCompanyStatus(1); |
| | |
| | | if (order==null) { |
| | | throw new BaseException("没有找到对应数据,请检查审核类型!"); |
| | | } |
| | | if (order.getOrderStatus()!=1){ |
| | | throw new BaseException("该执法单已审批"); |
| | | } |
| | | addCheckLog(order, bo); |
| | | if (bo.getCheckStatus()==-1){ |
| | | order.setOrderStatus(-1); |
| | | order.setCheckStatus(-1); |
| | | //审批拒绝,给申请人发送短信,如果通知企业也给企业发送短信 |
| | | smsService.sendCheckMsg(order.getApplyPhone(), order.getCheckStatus()); |
| | | orderService.updateById(order); |
| | | } else { |
| | | List<String> phones = orderService.getCheckPhones(order.getCheckLevel()+1, order.getApplyDeptId()); |
| | | if (StringUtils.isNotEmpty(phones)){ |
| | | phones.remove(0); |
| | | order.setCheckStatus(1); |
| | | //给下一级审批人发送短信 |
| | | smsService.sendApplyMsg(phones, order.getApplyUser()); |