| | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.security.ShiroUtils; |
| | | import com.ruoyi.doublePrevention.service.RiskService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | |
| | | import com.ruoyi.project.tr.hiddenDangerCheckPoint.service.IHiddenDangerCheckPointService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IHiddenDangerCheckPointService hiddenDangerCheckPointService; |
| | | |
| | | @Autowired |
| | | private RiskService riskService; |
| | | |
| | | @GetMapping() |
| | | public String hiddenDangerCheckPoint() { |
| | |
| | | @Log(title = "隐患验收--保存", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/editDangerAcceptSave") |
| | | @ResponseBody |
| | | @Transactional |
| | | public AjaxResult editDangerAcceptSave(HiddenDangerCheckPoint hiddenDangerCheckPoint) { |
| | | //获取当前更新用户信息 |
| | | User sysUser = getSysUser(); |
| | |
| | | } else if ("1".equals(hiddenDangerCheckPoint.getAcceptResult())) { |
| | | hiddenDangerCheckPoint.setAcceptCreateTime(DateUtils.getNowDate());//设置验收时间 |
| | | hiddenDangerCheckPoint.setAcceptStatus(TrHiddenDangerCheckConstants.ACCEPT_STATUS_ALREADY_ACCEPT_PASS);//验收状态(验收通过) |
| | | |
| | | } |
| | | } |
| | | int i = hiddenDangerCheckPointService.updateHiddenDangerCheckPoint(hiddenDangerCheckPoint); |
| | | |
| | | // todo-2022 验收通过 |
| | | int result = riskService.updateDangerInfoAccept(hiddenDangerCheckPoint); |
| | | if (result < 1){ |
| | | throw new RuntimeException("隐患验收信息保存失败"); |
| | | } |
| | | |
| | | hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送 |
| | | return toAjax(i); |
| | | } |