Commit 39728e00 authored by 耿迪迪's avatar 耿迪迪

检查记录、监督检查隐患整改结果上传

parent ac6180ce
......@@ -94,4 +94,20 @@ public class TInsHazRefController extends BaseController
{
return toAjax(tInsHazRefService.deleteTInsHazRefByIds(fInsHazRefIds));
}
/**
* 上传监督检查发现隐患及整改、执法结果
* @param fInsHazRefId 结果id
* @return
*/
@GetMapping("/reportHazRefInfo")
public AjaxResult reportHazRefInfo(Long fInsHazRefId){
try{
return toAjax(tInsHazRefService.reportHazRefInfo(fInsHazRefId));
}catch (Exception e){
logger.error("上传监督检查发现隐患及整改、执法结果接口异常=====",e);
return AjaxResult.error("上传监督检查发现隐患及整改、执法结果接口异常");
}
}
}
......@@ -104,4 +104,19 @@ public class TInsRecInforController extends BaseController
{
return toAjax(tInsRecInforService.deleteTInsRecInforByIds(fInsRecInforIds));
}
/**
* 上传检查记录
* @param fInsRecInforId 检查记录id
* @return
*/
@GetMapping("/reportRecInfo")
public AjaxResult reportRecInfo(Long fInsRecInforId){
try{
return toAjax(tInsRecInforService.reportRecInfo(fInsRecInforId));
}catch (Exception e){
logger.error("上传检查记录接口异常=====",e);
return AjaxResult.error("上传检查记录接口异常");
}
}
}
package com.zehong.system.domain.vo;
public class TInsHazRefVo {
/** 隐患唯一编码*/
private String hazardUniqueCode;
/** 隐患在市级平台系统中的自有编号*/
private String hazardOutUniqueCode;
/** 检查记录编码*/
private String checkCode;
/** 涉及供气企业编码*/
private String involveEnterpriseCode;
/** 对象分类*/
private String objType;
/** 对象编码*/
private String objCode;
/** 对象所在行政区,县级行政区 ID*/
private String objBelongRegionId;
/** 监 督 检 查 时 间*/
private String checkTime;
/** 隐患分类分级编码*/
private String hazardTypeLevelId;
/** 隐患分类分级标准*/
private String hazardDesc;
private String rectificationStatus;
/** 整改资金*/
private String rectificationFund;
/**整改完成日期 */
private String completionDate;
/** 整改或管控措施描述*/
private String controlMeasure;
/** 隐患整改前照片*/
private String beforePicture;
/** 隐患整改后照片*/
private String afterPicture;
private String isEnforcement;
private String enforcementType;
/** 处罚金额*/
private Integer penaltyAmount;
/**其他执法情况说明 */
private String penaltyDesc;
/**执法日期 */
private String penaltyDate;
/**备注 */
private String remark;
/**最 后 修 改 时 间 */
private String lastTime;
public String getHazardUniqueCode() {
return hazardUniqueCode;
}
public void setHazardUniqueCode(String hazardUniqueCode) {
this.hazardUniqueCode = hazardUniqueCode;
}
public String getHazardOutUniqueCode() {
return hazardOutUniqueCode;
}
public void setHazardOutUniqueCode(String hazardOutUniqueCode) {
this.hazardOutUniqueCode = hazardOutUniqueCode;
}
public String getCheckCode() {
return checkCode;
}
public void setCheckCode(String checkCode) {
this.checkCode = checkCode;
}
public String getInvolveEnterpriseCode() {
return involveEnterpriseCode;
}
public void setInvolveEnterpriseCode(String involveEnterpriseCode) {
this.involveEnterpriseCode = involveEnterpriseCode;
}
public String getObjType() {
return objType;
}
public void setObjType(String objType) {
this.objType = objType;
}
public String getObjCode() {
return objCode;
}
public void setObjCode(String objCode) {
this.objCode = objCode;
}
public String getObjBelongRegionId() {
return objBelongRegionId;
}
public void setObjBelongRegionId(String objBelongRegionId) {
this.objBelongRegionId = objBelongRegionId;
}
public String getCheckTime() {
return checkTime;
}
public void setCheckTime(String checkTime) {
this.checkTime = checkTime;
}
public String getHazardTypeLevelId() {
return hazardTypeLevelId;
}
public void setHazardTypeLevelId(String hazardTypeLevelId) {
this.hazardTypeLevelId = hazardTypeLevelId;
}
public String getHazardDesc() {
return hazardDesc;
}
public void setHazardDesc(String hazardDesc) {
this.hazardDesc = hazardDesc;
}
public String getRectificationStatus() {
return rectificationStatus;
}
public void setRectificationStatus(String rectificationStatus) {
this.rectificationStatus = rectificationStatus;
}
public String getRectificationFund() {
return rectificationFund;
}
public void setRectificationFund(String rectificationFund) {
this.rectificationFund = rectificationFund;
}
public String getCompletionDate() {
return completionDate;
}
public void setCompletionDate(String completionDate) {
this.completionDate = completionDate;
}
public String getControlMeasure() {
return controlMeasure;
}
public void setControlMeasure(String controlMeasure) {
this.controlMeasure = controlMeasure;
}
public String getBeforePicture() {
return beforePicture;
}
public void setBeforePicture(String beforePicture) {
this.beforePicture = beforePicture;
}
public String getAfterPicture() {
return afterPicture;
}
public void setAfterPicture(String afterPicture) {
this.afterPicture = afterPicture;
}
public String getIsEnforcement() {
return isEnforcement;
}
public void setIsEnforcement(String isEnforcement) {
this.isEnforcement = isEnforcement;
}
public String getEnforcementType() {
return enforcementType;
}
public void setEnforcementType(String enforcementType) {
this.enforcementType = enforcementType;
}
public Integer getPenaltyAmount() {
return penaltyAmount;
}
public void setPenaltyAmount(Integer penaltyAmount) {
this.penaltyAmount = penaltyAmount;
}
public String getPenaltyDesc() {
return penaltyDesc;
}
public void setPenaltyDesc(String penaltyDesc) {
this.penaltyDesc = penaltyDesc;
}
}
package com.zehong.system.domain.vo;
public class TInsRecInforVo {
/** 检查记录编码*/
private String checkCode;
/**关联的检查任务编码 */
private String checkTaskCode;
/** 县级行政区*/
private String regionCode;
/** 按分类代码表*/
private String objectType;
/** 对象编码*/
private String objectCode;
/**检查人员 id*/
private String checkUserId;
/** 检查人员名称*/
private String checkUserName;
/** 检查人员联系电话*/
private String checkManPhone;
/**检查时间 */
private String checkTime;
/**隐患数量 */
private String hazardsNum;
/** 是否需执法*/
private String adoseNeedExecute;
/** 检查单等照片*/
private String annex;
/** 最 后 修 改 时 间*/
private String lastUpdeteTime;
/** 描述*/
private String remark;
public String getCheckCode() {
return checkCode;
}
public void setCheckCode(String checkCode) {
this.checkCode = checkCode;
}
public String getCheckTaskCode() {
return checkTaskCode;
}
public void setCheckTaskCode(String checkTaskCode) {
this.checkTaskCode = checkTaskCode;
}
public String getRegionCode() {
return regionCode;
}
public void setRegionCode(String regionCode) {
this.regionCode = regionCode;
}
public String getObjectType() {
return objectType;
}
public void setObjectType(String objectType) {
this.objectType = objectType;
}
public String getObjectCode() {
return objectCode;
}
public void setObjectCode(String objectCode) {
this.objectCode = objectCode;
}
public String getCheckUserId() {
return checkUserId;
}
public void setCheckUserId(String checkUserId) {
this.checkUserId = checkUserId;
}
public String getCheckUserName() {
return checkUserName;
}
public void setCheckUserName(String checkUserName) {
this.checkUserName = checkUserName;
}
public String getCheckManPhone() {
return checkManPhone;
}
public void setCheckManPhone(String checkManPhone) {
this.checkManPhone = checkManPhone;
}
public String getCheckTime() {
return checkTime;
}
public void setCheckTime(String checkTime) {
this.checkTime = checkTime;
}
public String getHazardsNum() {
return hazardsNum;
}
public void setHazardsNum(String hazardsNum) {
this.hazardsNum = hazardsNum;
}
public String getAdoseNeedExecute() {
return adoseNeedExecute;
}
public void setAdoseNeedExecute(String adoseNeedExecute) {
this.adoseNeedExecute = adoseNeedExecute;
}
public String getAnnex() {
return annex;
}
public void setAnnex(String annex) {
this.annex = annex;
}
public String getLastUpdeteTime() {
return lastUpdeteTime;
}
public void setLastUpdeteTime(String lastUpdeteTime) {
this.lastUpdeteTime = lastUpdeteTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
......@@ -58,4 +58,11 @@ public interface ITInsHazRefService
* @return 结果
*/
public int deleteTInsHazRefById(Long fInsHazRefId);
/**
* 上传监督检查发现隐患及整改、执法结果
* @param fInsHazRefId 结果id
* @return
*/
int reportHazRefInfo(Long fInsHazRefId) throws Exception;
}
......@@ -58,4 +58,11 @@ public interface ITInsRecInforService
* @return 结果
*/
public int deleteTInsRecInforById(Long fInsRecInforId);
/**
* 上传检查记录
* @param fInsRecInforId 检查记录id
* @return
*/
int reportRecInfo(Long fInsRecInforId) throws Exception;
}
package com.zehong.system.service.impl;
import java.sql.SQLIntegrityConstraintViolationException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.alibaba.fastjson.JSONObject;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.GovernmentDataCopyUtil;
import com.zehong.common.utils.GovernmentDataUtil;
import com.zehong.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TInsHazRefMapper;
import com.zehong.system.domain.TInsHazRef;
import com.zehong.system.domain.vo.TInsHazRefVo;
import com.zehong.system.mapper.TInsHazRefMapper;
import com.zehong.system.service.ITInsHazRefService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.SQLIntegrityConstraintViolationException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 监督检查-监督检查发现隐患及整改,执法结果Service业务层处理
......@@ -22,9 +30,14 @@ import com.zehong.system.service.ITInsHazRefService;
@Service
public class TInsHazRefServiceImpl implements ITInsHazRefService
{
private static final Logger log = LoggerFactory.getLogger(TInsHazRefServiceImpl.class);
@Autowired
private TInsHazRefMapper tInsHazRefMapper;
@Resource
private GovernmentDataUtil governmentDataUtil;
/**
* 查询监督检查-监督检查发现隐患及整改,执法结果
*
......@@ -121,4 +134,18 @@ public class TInsHazRefServiceImpl implements ITInsHazRefService
{
return tInsHazRefMapper.deleteTInsHazRefById(fInsHazRefId);
}
@Override
public int reportHazRefInfo(Long fInsHazRefId) throws Exception {
TInsHazRef insHazRef = tInsHazRefMapper.selectTInsHazRefById(fInsHazRefId);
TInsHazRefVo insHazRefVo = new TInsHazRefVo();
GovernmentDataCopyUtil.copyToGovernData(insHazRef,insHazRefVo);
List<TInsHazRefVo> data = new ArrayList<>();
data.add(insHazRefVo);
JSONObject reportResult = governmentDataUtil.setInfo("inspection/record/information","WRITE",data);
log.info("上传监督检查发现隐患及整改、执法结果===================" + reportResult.toJSONString());
if(!"0".equals(reportResult.getString("resultCode"))) throw new CustomException("上传监督检查发现隐患及整改、执法结果市局接口失败");
return 1;
}
}
package com.zehong.system.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.GovernmentDataCopyUtil;
import com.zehong.common.utils.GovernmentDataUtil;
import com.zehong.system.domain.TInsRecInfor;
import com.zehong.system.domain.vo.TInsRecInforVo;
import com.zehong.system.mapper.TInsRecInforMapper;
import com.zehong.system.service.ITInsRecInforService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TInsRecInforMapper;
import com.zehong.system.domain.TInsRecInfor;
import com.zehong.system.service.ITInsRecInforService;
/**
* 监督检查-检查记录Service业务层处理
......@@ -18,9 +28,14 @@ import com.zehong.system.service.ITInsRecInforService;
@Service
public class TInsRecInforServiceImpl implements ITInsRecInforService
{
private static final Logger log = LoggerFactory.getLogger(TInsRecInforServiceImpl.class);
@Autowired
private TInsRecInforMapper tInsRecInforMapper;
@Resource
private GovernmentDataUtil governmentDataUtil;
/**
* 查询监督检查-检查记录
*
......@@ -94,4 +109,22 @@ public class TInsRecInforServiceImpl implements ITInsRecInforService
{
return tInsRecInforMapper.deleteTInsRecInforById(fInsRecInforId);
}
/**
* 上传检查记录
* @param fInsRecInforId 检查记录id
* @return
*/
@Override
public int reportRecInfo(Long fInsRecInforId) throws Exception {
TInsRecInfor recInfor = tInsRecInforMapper.selectTInsRecInforById(fInsRecInforId);
TInsRecInforVo insRecInforVo = new TInsRecInforVo();
GovernmentDataCopyUtil.copyToGovernData(recInfor,insRecInforVo);
List<TInsRecInforVo> data = new ArrayList<>();
data.add(insRecInforVo);
JSONObject reportResult = governmentDataUtil.setInfo("inspection/record/information","WRITE",data);
log.info("上传检查记录结果===================" + reportResult.toJSONString());
if(!"0".equals(reportResult.getString("resultCode"))) throw new CustomException("上传检查记录市局接口失败");
return 1;
}
}
......@@ -60,3 +60,12 @@ export function recordList(query) {
params: query
})
}
//上传检查记录
export function reportRecInfo(query) {
return request({
url: '/supervision/record/reportRecInfo',
method: 'get',
params: query
})
}
......@@ -51,3 +51,12 @@ export function exportRef(query) {
params: query
})
}
//上传
export function reportHazRefInfo(query) {
return request({
url: '/supervision/rectification/reportHazRefInfo',
method: 'get',
params: query
})
}
......@@ -135,6 +135,11 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
<el-button
size="mini"
type="text"
@click="handleReport(scope.row)"
>上传</el-button>
</template>
</el-table-column>
</el-table>
......@@ -283,7 +288,7 @@
</template>
<script>
import { listInfor, getInfor, delInfor, addInfor, updateInfor, exportInfor } from "@/api/supervision/record";
import { listInfor, getInfor, delInfor, addInfor, updateInfor, exportInfor, reportRecInfo } from "@/api/supervision/record";
import ImageUpload from '@/components/ImageUpload';
import { taskList } from "@/api/supervision/task";
import DetailInfo from "./components/DetailInfo";
......@@ -502,6 +507,20 @@ export default {
handleDetail(row){
this.$refs.detail.getDetailInfo(row.fInsRecInforId);
},
//上传
/** 删除按钮操作 */
handleReport(row) {
this.$confirm('是否确认上传检查记录编码为"' + row.fCheckCode + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return reportRecInfo({fInsRecInforId : row.fInsRecInforId});
}).then(() => {
this.getList();
this.msgSuccess("上传成功");
}).catch(() => {});
},
}
};
</script>
......@@ -173,6 +173,11 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
<el-button
size="mini"
type="text"
@click="handleReport(scope.row)"
>上传</el-button>
</template>
</el-table-column>
</el-table>
......@@ -398,7 +403,7 @@
</template>
<script>
import { listRef, getRef, delRef, addRef, updateRef, exportRef } from "@/api/supervision/rectification";
import { listRef, getRef, delRef, addRef, updateRef, exportRef, reportHazRefInfo } from "@/api/supervision/rectification";
import ImageUpload from '@/components/ImageUpload';
import { recordList } from "@/api/supervision/record";
import DetailInfo from "./components/DetailInfo";
......@@ -639,6 +644,19 @@ export default {
handleDetail(row){
this.$refs.detail.getDetailInfo(row.fInsHazRefId);
},
//上传
handleReport(row) {
this.$confirm('是否确认上传隐患及整改,执法结果,执法结果编号为"' + row.fInsHazRefId + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return reportHazRefInfo({fInsHazRefId : row.fInsHazRefI});
}).then(() => {
this.getList();
this.msgSuccess("上传成功");
}).catch(() => {});
},
}
};
</script>
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