| | |
| | | * 查询JobAndMeasure - By JobId
|
| | | */
|
| | | PreventRiskJobAndMeasure getJobAndMeasureByJobId(Long jobId);
|
| | |
|
| | | List<PreventRiskJobAndMeasure> getJobAndMeasureListByJobId(Long jobId);
|
| | | /**
|
| | | * 删除job管控措施的附属表关联信息
|
| | | */
|
| | |
| | | * 查询JobAndMeasure - By JobId
|
| | | */
|
| | | PreventRiskJobAndMeasure getJobAndMeasureByJobId(Long jobId);
|
| | |
|
| | | List<PreventRiskJobAndMeasure> getJobAndMeasureListByJobId(Long jobId);
|
| | | /**
|
| | | * 删除job管控措施的附属表关联信息
|
| | | */
|
| | |
| | | public PreventRiskJobAndMeasure getJobAndMeasureByJobId(Long jobId) {
|
| | | return preventRiskJobAndMeasureRepository.getJobAndMeasureByJobId(jobId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<PreventRiskJobAndMeasure> getJobAndMeasureListByJobId(Long jobId) {
|
| | | return preventRiskJobAndMeasureRepository.getJobAndMeasureListByJobId(jobId);
|
| | | }
|
| | | /**
|
| | | * 删除job管控措施的附属表关联信息
|
| | | */
|
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.connection.ReactiveListCommands; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | throw new RuntimeException("整改信息保存失败"); |
| | | } |
| | | return ApiResult.success("隐患整改保存成功"); |
| | | } catch (Exception e) { |
| | | return ApiResult.error("异常"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 整改延期--保存 |
| | | */ |
| | | public ApiResult rectifyTimeOutSave(String str, ApiRequestHeader header) { |
| | | //验证userId,loginName,token,deviceType,deviceId,appType 是否一致 |
| | | ApiRequestHeader requestHeader = getHeader(header); |
| | | if (!(header.equals(requestHeader))) { |
| | | return ApiResult.errorToken("验证userId,loginName,token,deviceType,deviceId,appType 不一致"); |
| | | } |
| | | try { |
| | | HiddenDangerCheckPoint hdcp = new ObjectMapper().readValue(str, HiddenDangerCheckPoint.class); |
| | | hdcp.setUpdateBy(header.loginName); |
| | | hdcp.setUpdateTime(DateUtils.getNowDate()); |
| | | |
| | | int result = hdcpService.rectifyTimeOut(hdcp.getId(), hdcp.getRectifyDeadlineTime()); |
| | | if (result < 1) { |
| | | return ApiResult.error("延期失败"); |
| | | } |
| | | |
| | | return ApiResult.success("延期成功"); |
| | | } catch (Exception e) { |
| | | return ApiResult.error("异常"); |
| | | } |
| | |
| | | return map; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | return hiddenDangerCheckService.editDangerRectifySave(str, header); |
| | | } |
| | | |
| | | //隐患整改--延期 todo |
| | | public ApiResult rectifyTimeOutSave(String str, ApiRequestHeader header) { |
| | | return hiddenDangerCheckService.rectifyTimeOutSave(str, header); |
| | | } |
| | | |
| | | //隐患验收--保存 |
| | | public ApiResult editDangerAcceptSave(String str, ApiRequestHeader header) { |
| | | return hiddenDangerCheckService.editDangerAcceptSave(str, header); |
| | |
| | | |
| | | import com.ruoyi.common.constant.TrHiddenDangerCheckConstants; |
| | | 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.project.system.user.service.IUserService; |
| | | 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; |
| | |
| | | return prefix + "/detailDangerRectify"; |
| | | } |
| | | |
| | | /** |
| | | * 隐患整改延期 |
| | | */ |
| | | @Log(title = "隐患上报", businessType = BusinessType.DELETE) |
| | | @PostMapping("/rectifyTimeOut") |
| | | @ResponseBody |
| | | @Transactional |
| | | public AjaxResult rectifyTimeOut(HiddenDangerCheckPoint hdcp) { |
| | | if(ObjectUtils.isEmpty(hdcp.getId())){ |
| | | return AjaxResult.error("id不能为空"); |
| | | } |
| | | if(ObjectUtils.isEmpty(hdcp.getRectifyDeadlineTime())){ |
| | | return AjaxResult.error("延期时间不能为空"); |
| | | } |
| | | int i = hiddenDangerCheckPointService.rectifyTimeOut(hdcp.getId(), hdcp.getRectifyDeadlineTime()); |
| | | if (i < 1){ |
| | | return AjaxResult.error("操作失败"); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ruoyi.project.tr.hiddenDangerCheckPoint.domain.RiskCheckPointDTO; |
| | | import com.ruoyi.project.tr.riskCheckPoint.domain.RiskCheckPoint; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | HiddenDangerCheckPoint getHiddenDangerCheckPointById(Long dangerCheckPointId); |
| | | |
| | | List<HiddenDangerCheckPoint> getHiddenDangerCheckPointByCheckId(Long checkId); |
| | | |
| | | int rectifyTimeOut(Long id , Date rectifyDeadlineTime); |
| | | } |
| | |
| | | package com.ruoyi.project.tr.hiddenDangerCheckPoint.service; |
| | | |
| | | import com.ruoyi.doublePrevention.entity.CJReport.CJdto.Data; |
| | | import com.ruoyi.project.tr.hiddenDangerCheckPoint.domain.BaseCheckPointDTO; |
| | | import com.ruoyi.project.tr.hiddenDangerCheckPoint.domain.HiddenDangerCheckPoint; |
| | | import com.ruoyi.project.tr.hiddenDangerCheckPoint.domain.RiskCheckPointDTO; |
| | | import com.ruoyi.project.tr.riskCheckPoint.domain.RiskCheckPoint; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * 查询by CheckId |
| | | */ |
| | | List<HiddenDangerCheckPoint> getHiddenDangerCheckPointByCheckId(Long checkId); |
| | | |
| | | int rectifyTimeOut(Long id , Date rectifyDeadlineTime); |
| | | } |
| | |
| | | package com.ruoyi.project.tr.hiddenDangerCheckPoint.service.impl; |
| | | |
| | | import com.ruoyi.common.utils.text.Convert; |
| | | import com.ruoyi.doublePrevention.entity.CJReport.CJdto.Data; |
| | | import com.ruoyi.framework.web.service.JpushService; |
| | | import com.ruoyi.project.system.user.domain.User; |
| | | import com.ruoyi.project.system.user.service.IUserService; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | return hiddenDangerCheckPointMapper.getHiddenDangerCheckPointByCheckId(checkId); |
| | | } |
| | | |
| | | @Override |
| | | public int rectifyTimeOut(Long id , Date rectifyDeadlineTime) { |
| | | Date date = new Date(); |
| | | if (date.getTime() - rectifyDeadlineTime.getTime() < 0){ |
| | | throw new RuntimeException("延期时间设置不合理"); |
| | | } |
| | | return hiddenDangerCheckPointMapper.rectifyTimeOut(id, rectifyDeadlineTime); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | <select id="listReportTask" resultMap="BaseResultMap"> |
| | | select * from prevent_risk_danger_check_log |
| | | where report_switch = 0 and (update_report_data_time > report_time or report_time is null) and mobile_code is not null |
| | | <!-- where report_switch = 0 and (update_report_data_time > report_time or report_time is null) and mobile_code is not null and job_id = 47--> |
| | | order by update_report_data_time |
| | | limit 50 |
| | | </select> |
| | | |
| | | <!-- int updateEventReportStatus(HandlerReportParam handlerReportParam);--> |
| | |
| | | where job_id = #{jobId} |
| | | limit 1 |
| | | </select> |
| | | <select id="getJobAndMeasureListByJobId" resultMap="BaseResultMap"> |
| | | select * from prevent_risk_job_and_measure |
| | | where job_id = #{jobId} |
| | | </select> |
| | | |
| | | <!-- int deleteJobAndMeasure(Long jobId);--> |
| | | <delete id="deleteJobAndMeasure"> |
| | |
| | | <!-- List<PreventRiskJobAndMeasure> listReportWork();--> |
| | | <select id="listReportWorkTest" resultMap="BaseResultMap"> |
| | | select * from prevent_risk_job_and_measure |
| | | where job_id = 84 |
| | | <!-- where job_id in (43,47,50,53,56,59,63,65,68,71,75,77,81)--> |
| | | <!-- where job_id in (44,46,49,52,55,58,61,64,67,70,73,76,79)--> |
| | | where job_id in (45,48,51,54,57,60,62,66,69,72,74,78,80) |
| | | </select> |
| | | </mapper> |
| | | |
| | |
| | | select * from tr_hidden_danger_check_point |
| | | where check_id = #{checkId} |
| | | </select> |
| | | |
| | | <!-- int rectifyTimeOut(HiddenDangerCheckPoint hdcp);--> |
| | | <update id="rectifyTimeOut" parameterType="HiddenDangerCheckPoint"> |
| | | update tr_hidden_danger_check_point set |
| | | rectify_deadline_time = #{rectifyDeadlineTime} |
| | | where id = #{id} |
| | | </update> |
| | | </mapper> |