16639036659
2023-12-11 56c84cd7fb04407536eb0135162313029828a81f
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerAcceptController.java
@@ -13,6 +13,7 @@
import com.ruoyi.project.system.user.domain.User;
import com.ruoyi.project.tr.hiddenDangerCheckPoint.domain.HiddenDangerCheckPoint;
import com.ruoyi.project.tr.hiddenDangerCheckPoint.service.IHiddenDangerCheckPointService;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
@@ -81,15 +82,18 @@
        User sysUser = getSysUser();
        hiddenDangerCheckPoint.setUpdateBy(ShiroUtils.getLoginName());
        hiddenDangerCheckPoint.setUpdateTime(DateUtils.getNowDate());
        if (ObjectUtils.isEmpty(hiddenDangerCheckPoint.getAcceptCreateTime())){
            throw new RuntimeException("请填写验收时间");
        }
        if (!StringUtils.isEmpty(hiddenDangerCheckPoint.getAcceptResult())) {
            //验收结果 (0不通过 打回上一级整改阶段  1通过)
            if ("0".equals(hiddenDangerCheckPoint.getAcceptResult())) {
                hiddenDangerCheckPoint.setAcceptCreateTime(DateUtils.getNowDate());//设置验收时间
                hiddenDangerCheckPoint.setAcceptCreateTime(hiddenDangerCheckPoint.getAcceptCreateTime());//设置验收时间 todo 改为使用前端传输的时间
                hiddenDangerCheckPoint.setStage(TrHiddenDangerCheckConstants.DANGER_STAGE_PLAN_RECTIFY);//隐患整改阶段(数据进入到隐患整改阶段)
                hiddenDangerCheckPoint.setRectifyStatus(TrHiddenDangerCheckConstants.RECTIFY_STATUS_NOT_RECTIFY);//整改状态(未整改)
                hiddenDangerCheckPoint.setAcceptStatus(TrHiddenDangerCheckConstants.ACCEPT_STATUS_ALREADY_ACCEPT_NOT_PASS);//验收状态(验收未通过)
            } else if ("1".equals(hiddenDangerCheckPoint.getAcceptResult())) {
                hiddenDangerCheckPoint.setAcceptCreateTime(DateUtils.getNowDate());//设置验收时间
                hiddenDangerCheckPoint.setAcceptCreateTime(hiddenDangerCheckPoint.getAcceptCreateTime());
                hiddenDangerCheckPoint.setAcceptStatus(TrHiddenDangerCheckConstants.ACCEPT_STATUS_ALREADY_ACCEPT_PASS);//验收状态(验收通过)
            }
        }