| | |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.project.common.core.domain.entity.SysUser; |
| | | import com.project.common.exception.base.BaseException; |
| | | import com.project.common.utils.DateUtils; |
| | | import com.project.common.utils.SecurityUtils; |
| | | import com.project.common.utils.StringUtils; |
| | | import com.project.enforce.domain.EnforceCheckLog; |
| | |
| | | //审批拒绝,给申请人发送短信,如果通知企业也给企业发送短信 |
| | | smsService.sendCheckMsg(order.getApplyPhone(), order.getCheckStatus()); |
| | | } else { |
| | | List<String> phones = orderService.getCheckPhones(order.getCheckLevel(), order.getApplyDeptId()); |
| | | List<String> phones = orderService.getCheckPhones(order.getCheckLevel()+1, order.getApplyDeptId()); |
| | | if (StringUtils.isNotEmpty(phones)){ |
| | | order.setCheckStatus(1); |
| | | //给下一级审批人发送短信 |
| | | smsService.sendApplyMsg(phones, order.getApplyUser()); |
| | | String checkPhones = StringUtils.join(phones, ","); |
| | | orderService.update(orderService.lu().set(EnforceOrder::getCheckIds, checkPhones).eq(EnforceOrder::getOrderId, order.getOrderId())); |
| | | } else { |
| | | order.setCheckStatus(2); |
| | | order.setOrderStatus(2); |
| | |
| | | checkLog.setCheckUser(loginUser.getUserName()); |
| | | checkLog.setCheckPhone(loginUser.getPhonenumber()); |
| | | checkLog.setCheckStatus(bo.getCheckStatus()); |
| | | checkLog.setCheckTime(DateUtils.getNowDate()); |
| | | checkLog.setCheckReason(bo.getCheckReason()); |
| | | boolean save = checkLogService.save(checkLog); |
| | | if (!save) { |