双重预防项目-国泰新华二开定制版
16639036659
2022-09-27 906a46c22911f37bca4c6b727a7e0e57551b3ac0
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java
@@ -3,6 +3,7 @@
import com.ruoyi.common.constant.TrHiddenDangerCheckConstants;
import com.ruoyi.common.utils.DateUtils;
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;
@@ -15,6 +16,7 @@
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.*;
@@ -40,6 +42,9 @@
    @Autowired
    JpushService jpushService;
    @Autowired
    private RiskService riskService;
    @GetMapping()
    public String hiddenDangerCheckPoint() {
        return prefix + "/dangerRectify";
@@ -59,6 +64,7 @@
    /**
     * 隐患整改--整改
     *
     */
    @Log(title = "隐患整改--整改")
    @GetMapping("/editDangerRectify/{id}")
@@ -85,6 +91,7 @@
    @Log(title = "隐患整改--保存", businessType = BusinessType.UPDATE)
    @PostMapping("/editDangerRectifySave")
    @ResponseBody
    @Transactional
    public AjaxResult editDangerRectifySave(HiddenDangerCheckPoint hiddenDangerCheckPoint) {
        //获取当前更新用户信息
        hiddenDangerCheckPoint.setUpdateBy(ShiroUtils.getLoginName());
@@ -95,6 +102,9 @@
        hiddenDangerCheckPoint.setStage(TrHiddenDangerCheckConstants.DANGER_STAGE_PLAN_ACCEPT);//隐患验收阶段(数据进入到隐患验收阶段)
        int i = hiddenDangerCheckPointService.updateHiddenDangerCheckPoint(hiddenDangerCheckPoint);
        // todo-2022 隐患信息保存
        int result = riskService.updateDangerInfoRectify(hiddenDangerCheckPoint);
        hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送
        return toAjax(i);