Commit 8ca0008e authored by wanghao's avatar wanghao

1 监督检查-抽查隐患- 增加 “处置” 逻辑

parent e353ab3a
......@@ -84,6 +84,16 @@ public class TInsSpotHazardRefController extends BaseController
return toAjax(tInsSpotHazardRefService.updateTInsSpotHazardRef(tInsSpotHazardRef));
}
/**
* 修改监督检查-抽查隐患-处置
*/
@Log(title = "监督检查-抽查隐患", businessType = BusinessType.UPDATE)
@PutMapping(value = "/disposeOfInsSpotHazardRef")
public AjaxResult disposeOfInsSpotHazardRef(@RequestBody TInsSpotHazardRef tInsSpotHazardRef)
{
return toAjax(tInsSpotHazardRefService.disposeOfInsSpotHazardRef(tInsSpotHazardRef));
}
/**
* 删除监督检查-抽查隐患
*/
......
package com.zehong.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 监督检查-抽查隐患对象 t_ins_spot_hazard_ref
*
......@@ -63,7 +66,7 @@ public class TInsSpotHazardRef extends BaseEntity
private String fObjCode;
/** 对象所在行政区,县级行政区ID */
private String fObjBelongRegionId;
private Long fObjBelongRegionId;
@Excel(name = "县级行政区")
private String countyName;
......@@ -100,7 +103,50 @@ public class TInsSpotHazardRef extends BaseEntity
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
private String fLastTime;
public void setfInsSpotHazardRefId(Long fInsSpotHazardRefId)
/**
* 隐患整改后照片
*/
@Excel(name = "隐患整改后照片")
private String afterPicture;
/**
* 处置描述
*/
@Excel(name = "处置描述")
private String disposalDetails;
/**
* 处置描述
*/
@Excel(name = "处置时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date disposalTime;
public Date getDisposalTime() {
return disposalTime;
}
public void setDisposalTime(Date disposalTime) {
this.disposalTime = disposalTime;
}
public String getAfterPicture() {
return afterPicture;
}
public void setAfterPicture(String afterPicture) {
this.afterPicture = afterPicture;
}
public String getDisposalDetails() {
return disposalDetails;
}
public void setDisposalDetails(String disposalDetails) {
this.disposalDetails = disposalDetails;
}
public void setfInsSpotHazardRefId(Long fInsSpotHazardRefId)
{
this.fInsSpotHazardRefId = fInsSpotHazardRefId;
}
......@@ -154,12 +200,12 @@ public class TInsSpotHazardRef extends BaseEntity
{
return fObjCode;
}
public void setfObjBelongRegionId(String fObjBelongRegionId)
public void setfObjBelongRegionId(Long fObjBelongRegionId)
{
this.fObjBelongRegionId = fObjBelongRegionId;
}
public String getfObjBelongRegionId()
public Long getfObjBelongRegionId()
{
return fObjBelongRegionId;
}
......
......@@ -43,6 +43,13 @@ public interface TInsSpotHazardRefMapper
*/
public int updateTInsSpotHazardRef(TInsSpotHazardRef tInsSpotHazardRef);
/**
* 抽查隐患处置
* @param tInsSpotHazardRef t
* @return r
*/
public int disposeOfInsSpotHazardRef(TInsSpotHazardRef tInsSpotHazardRef);
/**
* 删除监督检查-抽查隐患
*
......
......@@ -43,6 +43,13 @@ public interface ITInsSpotHazardRefService
*/
public int updateTInsSpotHazardRef(TInsSpotHazardRef tInsSpotHazardRef);
/**
* 抽查隐患-处置
* @param tInsSpotHazardRef t
* @return r
*/
public int disposeOfInsSpotHazardRef(TInsSpotHazardRef tInsSpotHazardRef);
/**
* 批量删除监督检查-抽查隐患
*
......
......@@ -98,6 +98,17 @@ public class TInsSpotHazardRefServiceImpl implements ITInsSpotHazardRefService
}
}
/**
* 抽查隐患-处置
* @param tInsSpotHazardRef t
* @return
*/
@Override
public int disposeOfInsSpotHazardRef(TInsSpotHazardRef tInsSpotHazardRef) {
tInsSpotHazardRef.setDisposalTime(new Date());
return tInsSpotHazardRefMapper.disposeOfInsSpotHazardRef(tInsSpotHazardRef);
}
/**
* 批量删除监督检查-抽查隐患
*
......
......@@ -19,6 +19,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fIsEnforcement" column="f_is_enforcement" />
<result property="fRemark" column="f_remark" />
<result property="fLastTime" column="f_last_time" />
<result property="afterPicture" column="f_after_picture" />
<result property="disposalDetails" column="f_disposal_details" />
<result property="disposalTime" column="f_disposal_time" />
</resultMap>
<sql id="selectTInsSpotHazardRefVo">
......@@ -37,6 +41,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
spot.f_is_enforcement,
spot.f_remark,
spot.f_last_time,
spot.f_after_picture,
spot.f_disposal_details,
spot.f_disposal_time,
(select rec.f_name from t_county_level_region rec where rec.f_id = spot.f_obj_belong_region_id) AS countyName,
(select en.enterprise_name from t_enterprise_info en where enterprise_id = spot.f_involve_enterprise_code)AS enterpriseName,
(select inf.f_hazard_name from t_ins_sta_infor inf where inf.f_ins_sta_infor_id = spot.f_hazard_type_level_id)AS levelName
......@@ -112,6 +119,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where f_ins_spot_hazard_ref_id = #{fInsSpotHazardRefId}
</update>
<update id="disposeOfInsSpotHazardRef" parameterType="TInsSpotHazardRef">
update t_ins_spot_hazard_ref
<trim prefix="SET" suffixOverrides=",">
<if test="afterPicture != null and afterPicture != ''">f_after_picture = #{afterPicture},</if>
<if test="disposalDetails != null and disposalDetails != ''">f_disposal_details = #{disposalDetails},</if>
<if test="disposalTime != null">f_disposal_time = #{disposalTime},</if>
</trim>
where f_ins_spot_hazard_ref_id = #{fInsSpotHazardRefId}
</update>
<delete id="deleteTInsSpotHazardRefById" parameterType="Long">
delete from t_ins_spot_hazard_ref where f_ins_spot_hazard_ref_id = #{fInsSpotHazardRefId}
......
......@@ -35,6 +35,15 @@ export function updateRef(data) {
})
}
// 监督检查-抽查隐患-处置
export function disposeOfInsSpotHazardRef(data) {
return request({
url: '/supervision/spot/disposeOfInsSpotHazardRef',
method: 'put',
data: data
})
}
// 删除监督检查-抽查隐患
export function delRef(fInsSpotHazardRefId) {
return request({
......
......@@ -59,20 +59,21 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="24">
<el-form-item label="隐患描述">
<span v-if="detailInfo.fHazardDesc">{{ detailInfo.fHazardDesc }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- 先隐藏掉 -->
<!-- <el-col :span="12">
<el-form-item label="是否执行" prop="fIsEnforcement">
<span v-if="detailInfo.fIsEnforcement == '1'"></span>
<span v-else-if="detailInfo.fIsEnforcement == '0'"></span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="12">
......@@ -86,13 +87,40 @@
></el-image>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注">
<span v-if="detailInfo.fRemark">{{ detailInfo.fRemark }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
<el-divider v-if="detailInfo.afterPicture != null" content-position="left">处置</el-divider>
<el-row v-if="detailInfo.afterPicture != null">
<el-form-item label="隐患整改后照片">
<el-col :span="24">
<el-image
:src="detailInfo.afterPicture"
:preview-src-list="[detailInfo.afterPicture]"
v-if="detailInfo.afterPicture != '' && detailInfo.afterPicture != null"
:z-index=5000
style="width: 200px;height: 200px;"
></el-image>
<span v-else>-</span>
</el-col>
</el-form-item>
<el-col :span="24">
<el-form-item label="处置描述" prop="disposalDetails">
<span v-if="detailInfo.disposalDetails">{{ detailInfo.disposalDetails }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注">
<span v-if="detailInfo.fRemark">{{ detailInfo.fRemark }}</span>
<el-form-item label="处置时间" prop="disposalDetails">
<span v-if="detailInfo.disposalTime">{{ detailInfo.disposalTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment