新增检查和大屏企业数据
This commit is contained in:
parent
4d758edb4a
commit
1f016236dc
|
|
@ -82,4 +82,7 @@ public interface ChkBillDetailMapper {
|
|||
|
||||
/*按照检查项查询*/
|
||||
ChkBillDetailWithBLOBs findByName(@Param("checkObjectName") String checkObjectName);
|
||||
|
||||
/*查询检查项*/
|
||||
List<ChkBillDetailWithBLOBs> findByChkGovBillId(@Param("chkGovBillId") String chkGovBillId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@ public interface ChkGovBillMapper {
|
|||
/*通过企业id 查询企业清单*/
|
||||
List<ChkGovBill> entBillList(@Param("sysEnterpriseId") String sysEnterpriseId,
|
||||
@Param("sysUnitId") String sysUnitId);
|
||||
|
||||
/*行业下检查清单*/
|
||||
List<ChkGovBill> findByInClassId(@Param("baseInClassId") String baseInClassId);
|
||||
|
||||
|
||||
/*通过安全类别 查询企业清单*/
|
||||
List<ChkGovBill> entBillBySafe(@Param("baseInClassId") String baseInClassId,
|
||||
@Param("safeIds") List<String> safeIds,
|
||||
|
|
|
|||
|
|
@ -72,8 +72,19 @@ public class MinWorkUnit implements Serializable {
|
|||
@ApiModelProperty("最小单元分类名称")
|
||||
private String minCategoryName;
|
||||
|
||||
@ApiModelProperty("检查表类型 1:最小工作单元 2:监管执法")
|
||||
private Integer checkType;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getCheckType() {
|
||||
return checkType;
|
||||
}
|
||||
|
||||
public void setCheckType(Integer checkType) {
|
||||
this.checkType = checkType;
|
||||
}
|
||||
|
||||
public String getDangerinfo() {
|
||||
return dangerinfo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -884,4 +884,13 @@
|
|||
SELECT * FROM `chkbilldetail` cd WHERE cd.`CheckObjectName` = #{checkObjectName}
|
||||
order by cd.CreatedOn desc limit 1
|
||||
</select>
|
||||
|
||||
<!--查询检查项-->
|
||||
<select id="findByChkGovBillId" resultMap="ResultMapWithBLOBs">
|
||||
SELECT cl.*
|
||||
FROM `chkbilldetail` cl
|
||||
LEFT JOIN `chkgovbilldetail` cd ON cl.`ChkBillDetailId` = cd.`ChkBillDetailId`
|
||||
WHERE cd.`ChkGovBillId` = #{chkGovBillId}
|
||||
AND cl.`del_state` = 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -525,6 +525,11 @@
|
|||
ORDER BY cb.SortId DESC
|
||||
</select>
|
||||
|
||||
<!--通过行业查询-->
|
||||
<select id="findByInClassId" resultMap="BaseResultMap">
|
||||
SELECT * FROM `chkgovbill` cb
|
||||
WHERE cb.`BaseInClassId` LIKE #{baseInClassId}
|
||||
</select>
|
||||
|
||||
<!--通用检查清单-->
|
||||
<select id="entBillBySafe" resultMap="BaseResultMap">
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@
|
|||
<result column="Notice" jdbcType="LONGVARCHAR" property="notice" />
|
||||
<result column="BasicsFact" jdbcType="LONGVARCHAR" property="basicsfact" />
|
||||
<result column="Remark" jdbcType="LONGVARCHAR" property="remark" />
|
||||
<result column="HiddenDanger" jdbcType="VARCHAR" property="HiddenDanger" />
|
||||
<result column="HiddenDanger" jdbcType="VARCHAR" property="hiddenDanger" />
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
|
|
|
|||
|
|
@ -2497,7 +2497,9 @@
|
|||
from SysEnterprise se
|
||||
left join BookEntHT be on se.SysEnterpriseId = be.SysEnterpriseId
|
||||
where se.State = '启用'
|
||||
and se.street_code = #{streetCode}
|
||||
<if test="null != streetCode and '' != streetCode">
|
||||
AND FIND_IN_SET(#{streetCode},sys.area_path)
|
||||
</if>
|
||||
group by se.SysEnterpriseId
|
||||
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -255,25 +255,78 @@ public class MinWorkController extends BaseController{
|
|||
@PostMapping("/getMinWorkUnitList/{parentId}")
|
||||
@ResponseBody
|
||||
public SingleResult getMinWorkUnitList(@PathVariable String parentId){
|
||||
|
||||
|
||||
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
SingleResult singleResult = new SingleResult();
|
||||
List<MinWorkUnit> byparentIdList = minWorkUnitMapper.getByparentIdList(parentId);
|
||||
|
||||
SysEnterprise sysEnterprise = sysEnterpriseMapper.selectByPrimaryKey(parentId);
|
||||
|
||||
|
||||
|
||||
|
||||
if (sysEnterprise != null){
|
||||
if (StringUtils.isNotEmpty(sysEnterprise.getQrCode())){
|
||||
map.put("parentCode",sysEnterprise.getQrCode());
|
||||
}else{
|
||||
map.put("parentCode",null);
|
||||
}
|
||||
|
||||
List<MinWorkUnit> byparentIdList = new ArrayList<>();
|
||||
|
||||
//最小工作单元检查表
|
||||
List<MinWorkUnit> workUnitList = minWorkUnitMapper.getByparentIdList(parentId);
|
||||
if(null != workUnitList){
|
||||
for (MinWorkUnit workUnit : workUnitList){
|
||||
workUnit.setCheckType(1);
|
||||
workUnit.setTitle("工作单元:"+workUnit.getTitle());
|
||||
}
|
||||
byparentIdList.addAll(workUnitList);
|
||||
}
|
||||
|
||||
String baseInClassId = sysEnterprise.getWorkClassId();
|
||||
|
||||
//监管执法清单
|
||||
List<ChkGovBill> govBills = new ArrayList<>();
|
||||
|
||||
//企业清单
|
||||
List<ChkGovBill> entGovBills = chkGovBillMapper.entBillList(sysEnterprise.getSysenterpriseid(),"");
|
||||
if(null != entGovBills && entGovBills.size() > 0){
|
||||
govBills.addAll(entGovBills);
|
||||
}
|
||||
|
||||
//行业清单
|
||||
List<ChkGovBill> inGovBills = chkGovBillMapper.findByInClassId(baseInClassId);
|
||||
if(null != inGovBills && inGovBills.size() > 0){
|
||||
govBills.addAll(inGovBills);
|
||||
}
|
||||
|
||||
|
||||
if(null != govBills && govBills.size() > 0){
|
||||
for (ChkGovBill govBill : govBills){
|
||||
MinWorkUnit workUnit = new MinWorkUnit();
|
||||
workUnit.setId(govBill.getChkgovbillid());
|
||||
workUnit.setMinCategoryName(govBill.getChkbillname());
|
||||
workUnit.setCheckType(2);
|
||||
workUnit.setMinCategory(govBill.getChkgovbillid());
|
||||
workUnit.setTitle("监管执法:"+govBill.getChkbillname());
|
||||
byparentIdList.add(workUnit);
|
||||
}
|
||||
}
|
||||
|
||||
if (byparentIdList.size()>0) {
|
||||
map.put("minWorkUnitList", byparentIdList);
|
||||
}else{
|
||||
map.put("minWorkUnitList", null);
|
||||
}
|
||||
singleResult.setData(map);
|
||||
|
||||
|
||||
}else{
|
||||
map.put("parentCode",null);
|
||||
}
|
||||
if (byparentIdList.size()>0) {
|
||||
map.put("minWorkUnitList", byparentIdList);
|
||||
}else{
|
||||
map.put("minWorkUnitList", null);
|
||||
}
|
||||
singleResult.setData(map);
|
||||
|
||||
return singleResult;
|
||||
}
|
||||
|
||||
|
|
@ -289,7 +342,29 @@ public class MinWorkController extends BaseController{
|
|||
@ResponseBody
|
||||
public SingleResult getMinWorkUnitCheckItem(String minCategory){
|
||||
SingleResult singleResult = new SingleResult();
|
||||
List<MinMiddleIndex>list = minMiddleIndexMapper.selectCheckItem(minCategory);
|
||||
List<MinMiddleIndex>list = new ArrayList<>();
|
||||
|
||||
//工作单元检查项:
|
||||
List<MinMiddleIndex> workUnitList = minMiddleIndexMapper.selectCheckItem(minCategory);
|
||||
if(null != workUnitList && workUnitList.size() > 0){
|
||||
list.addAll(workUnitList);
|
||||
}
|
||||
|
||||
//监管执法检查项
|
||||
List<ChkBillDetailWithBLOBs> billDetails = chkBillDetailMapper.findByChkGovBillId(minCategory);
|
||||
if(null != billDetails && billDetails.size() > 0){
|
||||
for (ChkBillDetailWithBLOBs chkBillDetail : billDetails){
|
||||
MinMiddleIndex minMiddleIndex = new MinMiddleIndex();
|
||||
minMiddleIndex.setIndexId(chkBillDetail.getChkbilldetailid());
|
||||
minMiddleIndex.setMinCategoryId(minCategory);
|
||||
minMiddleIndex.setId(minCategory);
|
||||
minMiddleIndex.setChkBillDetailWithBLOBs(chkBillDetail);
|
||||
minMiddleIndex.setCreateTime(chkBillDetail.getCreatedon());
|
||||
minMiddleIndex.setHiddenarea(chkBillDetail.getCheckobjectname());
|
||||
list.add(minMiddleIndex);
|
||||
}
|
||||
}
|
||||
|
||||
singleResult.setData(list);
|
||||
return singleResult;
|
||||
}
|
||||
|
|
@ -1396,6 +1471,23 @@ public class MinWorkController extends BaseController{
|
|||
public SingleResult minWorkUnitDetail(String id)throws Exception{
|
||||
SingleResult singleResult = new SingleResult();
|
||||
MinWorkUnit minWorkUnit = minWorkUnitMapper.selectByPrimaryKey(id);
|
||||
if(null == minWorkUnit){
|
||||
|
||||
ChkGovBill chkGovBill = chkGovBillMapper.selectByPrimaryKey(id);
|
||||
if(null != chkGovBill){
|
||||
minWorkUnit = new MinWorkUnit();
|
||||
minWorkUnit.setId(chkGovBill.getChkgovbillid());
|
||||
minWorkUnit.setMinCategoryName(chkGovBill.getChkbillname());
|
||||
minWorkUnit.setCheckType(2);
|
||||
minWorkUnit.setMinCategory(chkGovBill.getChkgovbillid());
|
||||
minWorkUnit.setTitle("监管执法:"+chkGovBill.getChkbillname());
|
||||
}
|
||||
|
||||
}else{
|
||||
minWorkUnit.setCheckType(1);
|
||||
minWorkUnit.setTitle("工作单元:"+minWorkUnit.getTitle());
|
||||
}
|
||||
|
||||
singleResult.setData(minWorkUnit);
|
||||
return singleResult;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -233,7 +233,9 @@ public class PcCheckController extends com.rzyc.controller.BaseController {
|
|||
chkGovBill.setDelState(1);
|
||||
/***重要关注地方,企业id格式*/
|
||||
List<String> companyId = JSONArray.parseArray(chkGovBill.getSysEnterpriseId(),String.class);
|
||||
chkGovBill.setSysEnterpriseId(builder.toString().substring(0,builder.toString().length()-1));
|
||||
if(StringUtils.isNotBlank(builder.toString())){
|
||||
chkGovBill.setSysEnterpriseId(builder.toString().substring(0,builder.toString().length()-1));
|
||||
}
|
||||
if (chkGovBill1 != null){
|
||||
chkGovBillMapper.updateByPrimaryKey(chkGovBill);
|
||||
entBillConMapper.deleteByChkGovBill(chkGovBill.getChkgovbillid());
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user