双重预防项目-国泰新华二开定制版
16639036659
2023-06-06 73d5cb4c8b3def02dda3addb09469713cc878ba1
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerExamineController.java
@@ -5,6 +5,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;
@@ -47,6 +48,10 @@
    @Autowired
    JpushService jpushService;
    @Autowired
    private RiskService riskService;
    @GetMapping()
    public String dangerExamine() {
@@ -142,10 +147,19 @@
                hiddenDangerCheckPoint.setWhetherDanger(TrHiddenDangerCheckConstants.WHETHER_DANGER_NOT);//是否为隐患(正常)
            }
        }
        int i = hiddenDangerCheckPointService.updateHiddenDangerCheckPoint(hiddenDangerCheckPoint);
        if(hiddenDangerCheckPoint.getRectifyDeadlineTime()!=null) {
            rectifyRemindJPush(hiddenDangerCheckPoint);
        }
        // todo-2022 此处插入附属表
//        HiddenDangerCheckPoint hiddenDangerCheckPointById = hiddenDangerCheckPointService.getHiddenDangerCheckPointById(hiddenDangerCheckPoint.getId());
        int result = riskService.insertDangerInfo(hiddenDangerCheckPoint.getId(), hiddenDangerCheckPoint);
        if (result< 1){
            throw new RuntimeException("添加隐患附属信息失败");
        }
        hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送
        return toAjax(i);
    }
@@ -167,13 +181,8 @@
        extrasMap.put("methodType", "goToRectify");
        extrasMap.put("hiddenDangerCheckPoint", JSONObject.toJSONString(whole));
        //大文本通知栏样式
        jpushService.sendPushByAndroidBigText(title, content, 1, content, extrasMap, whole.getRectifyUserId().toString());
    }