Commit 9149e3c8 authored by zhangjianqian's avatar zhangjianqian

修改bug

parent bb7c1475
......@@ -2,6 +2,7 @@ package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TInsHazRef;
import org.apache.ibatis.annotations.Param;
/**
* 监督检查-监督检查发现隐患及整改,执法结果Mapper接口
......@@ -59,5 +60,6 @@ public interface TInsHazRefMapper
*/
public int deleteTInsHazRefByIds(Long[] fInsHazRefIds);
int deleteTInsHazRefByCheckCode(String fCheckCode);
int deleteTInsHazRefByCheckCode(@Param("fCheckCode")String fCheckCode, @Param("list") List<Long> list);
}
......@@ -112,14 +112,18 @@ public class TInsRecInforServiceImpl implements ITInsRecInforService
public int updateTInsRecInfor(TInsRecInfor tInsRecInfor){
tInsRecInfor.setfLastUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
if(tInsRecInfor.getRectificationList()!=null){
tInsHazRefMapper.deleteTInsHazRefByCheckCode(tInsRecInfor.getfCheckCode());
List<Long> ids = new ArrayList<>();
for(TInsHazRef ref : tInsRecInfor.getRectificationList()){
ids.add(ref.getfInsHazRefId());
if(ref.getfInsHazRefId()==null){
ref.setfObjType(tInsRecInfor.getfObjectType());
ref.setfObjCode(tInsRecInfor.getfObjectCode());
ref.setfCheckCode(tInsRecInfor.getfCheckCode());
addInsHazRef(ref);
}
}
tInsHazRefMapper.deleteTInsHazRefByCheckCode(tInsRecInfor.getfCheckCode(),ids);
}
return tInsRecInforMapper.updateTInsRecInfor(tInsRecInfor);
}
......
......@@ -40,6 +40,7 @@
<if test="warningSign != null and warningSign != ''"> and warning_sign = #{warningSign}</if>
<if test="lastDate != null "> and last_date = #{lastDate}</if>
</where>
order by create_time desc
</select>
<select id="selectTConfinedSpaceById" parameterType="Long" resultMap="TConfinedSpaceResult">
......
......@@ -150,6 +150,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteTInsHazRefByCheckCode" parameterType="String">
delete from t_ins_haz_ref where f_check_code = #{fCheckCode}
delete from t_ins_haz_ref where f_check_code = #{fCheckCode} and
f_ins_haz_ref_id not in
<foreach item="fInsHazRefId" collection="list" open="(" separator="," close=")">
#{fInsHazRefId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -91,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fVillageName != null and fVillageName != ''"> and f_village_name like concat('%', #{fVillageName}, '%')</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != '-2' and beyondEnterpriseId != ''"> and f_beyond_enterprise_id = #{beyondEnterpriseId} </if>
</where>
order by village.f_village_id desc
</select>
<select id="queryUserManageVillageForThirdParty" resultMap="TUserManageVillageThirdPartyVoResult">
select village.f_village_id,
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="98px">
<!-- <el-form-item label="重大危险源监管表 id" prop="fHazardId" v-if="false">
<el-input
v-model="queryParams.fHazardId"
......
......@@ -109,21 +109,25 @@
</el-table-column>
<el-table-column label="照片" align="center" >
<template slot-scope="List">
<img :src="List.row.pictureAddress" width="100px">
</template>
</el-table-column>
<el-table-column label="照片" align="center" >
<template slot-scope="List">
<span
class="dbtn"
@click="checkFile(List.row.pictureAddress)"
<MyImage
v-if="List.row.pictureAddress"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
:src="List.row.pictureAddress.split(',')[0]"
:previewSrcList="List.row.pictureAddress.split(',')"
/>
</template>
</el-table-column>
<!--<el-table-column label="照片" align="center" >-->
<!--<template slot-scope="List">-->
<!--<span-->
<!--class="dbtn"-->
<!--@click="checkFile(List.row.pictureAddress)"-->
<!--v-if="List.row.pictureAddress"-->
<!--&gt;-->
<!--<i class="el-icon el-icon-view"></i>查看/下载-->
<!--</span>-->
<!--<span v-else>-</span>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
......@@ -426,11 +430,12 @@ import { listStation, getStation, delStation, addStation, updateStation, exportS
import { getDdeviceDetailInfo,addDetailInfos,deleteDetailInfo,deleteeListDetailInfo,selectDetailInfoList,deleteDeviceDetailInfo,updateDetailInfoLists} from "@/api/regulation/device";
import GetPos from '@/components/GetPos';
import FileUpload from '@/components/FileSuperviseUpload';
import MyImage from "@/components/MyImage/index.vue";
export default {
name: "Station",
components: {
GetPos,
FileUpload,
FileUpload,MyImage
},
data() {
return {
......@@ -545,21 +550,18 @@ export default {
methods: {
/**上传头像*/
getFileInfo(res){
this.form.dealPlan = res.fileName;
this.form.pictureAddress = res.url;
this.form.burl=res.burl;
this.fileList.push({
name: res.fileName,
url: uploadfile,
burl:res.burl,
url: res.url,
});
this.form.pictureAddress = this.fileList.map(file => file.url).join(',');
},
checkFile(url) {
window.open(url,'_blank');
},
listRemove(e) {
this.form.dealPlan = "";
this.fileList = [];
this.fileList = this.fileList.filter(obj => obj.uid !== e.uid);
this.form.pictureAddress = this.fileList.map(file => file.url).join(',');
},
/** 查询厂站信息列表 */
......@@ -583,6 +585,7 @@ export default {
},
// 表单重置
reset() {
this.fileList=[];
this.form = {
siteStationId: null,
siteStationType: null,
......@@ -665,11 +668,13 @@ export default {
this.open = true;
//图片回显
if (this.form.pictureAddress) {
for(var item of this.form.pictureAddress.split(',')){
this.fileList.push({
name: '照片',
url: this.form.pictureAddress,
url: item,
});
}
}
this.title = "修改厂站信息";
this.devicePos = [response.data.longitude, response.data.latitude];
});
......
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