pc_operator字段添加与筛选

master
Zangzhipeng 2 years ago
parent fd3776838d
commit db3d0763f1
  1. 5
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/controller/ConfigController.java
  2. 3
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/controller/HighDangerController.java
  3. 2
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/mapper/ConfigMapper.java
  4. 2
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/mapper/HighDangerMapper.java
  5. 2
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/service/IConfigService.java
  6. 4
      hiatmp-hidden-danger-server/src/main/java/com/hisense/hiatmp/server_api/service/impl/ConfigServiceImpl.java
  7. 12
      hiatmp-hidden-danger-server/src/main/resources/sql-mapper/ConfigMapper.xml
  8. 27
      hiatmp-hidden-danger-server/src/main/resources/sql-mapper/HighDangerMapper.xml
  9. 3
      hiatmp-model/src/main/java/com/hisense/hiatmp/model/common/ManualInvestigation.java
  10. 3
      hiatmp-model/src/main/java/com/hisense/hiatmp/model/dmr/LineInfo.java

@ -64,10 +64,11 @@ public class ConfigController extends HiatmpController {
基础信息预留展示接口
*/
@GetMapping("/getDangerBaseData")
public ServerResponse<?> getBaseData(@RequestParam String sectionCode){
public ServerResponse<?> getBaseData(@RequestParam String sectionCode,
@RequestParam String businessId){
log.info("/getDangerBaseData(排查第一页默认数据回显)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(),sectionCode);
// 查询默认数据
LineInfo dangerBaseData = configService.getDangerBaseData(sectionCode);
LineInfo dangerBaseData = configService.getDangerBaseData(sectionCode,businessId);
/*List<EnumRoadType> roadTypes = highDangerMapper.getRoadTypes();
if(dangerBaseData.getSectionType() != null){

@ -1104,7 +1104,6 @@ public class HighDangerController {
// }
// manualInvestigation.setKeySet(keys.toString());
// 暂存数据
if (manualInvestigation.getTemporary() == Boolean.FALSE) {
// highDangerMapper.updateTemporary(manualInvestigation.getBusinessId(), "99");
@ -1118,7 +1117,7 @@ public class HighDangerController {
if (CollectionUtils.isNotEmpty(manualInvestigation.getDescribe())) {
hdFlag = "1";
}
highDangerMapper.updateDangerRoad(hdFlag, manualInvestigation.getBusinessId(), pcCount);
highDangerMapper.updateDangerRoad(hdFlag, manualInvestigation.getBusinessId(), pcCount, manualInvestigation.getOperator());
ThtApprove thtAApprove = new ThtApprove();
UUID uuid = UUID.randomUUID();
String uuidString = uuid.toString().replace("-", "");

@ -19,5 +19,5 @@ public interface ConfigMapper {
List<StreetCommunity> getStreetCommunityByXq(String xqcode);
LineInfo getDangerBaseData(String sectionCode);
LineInfo getDangerBaseData(@Param("sectionCode") String sectionCode, @Param("businessId") String businessId);
}

@ -72,7 +72,7 @@ public interface HighDangerMapper{
void updateTemporary(String businessId);
void updateDangerRoad(String hdFlag,String businessId,String pcCount);
void updateDangerRoad(String hdFlag,String businessId,String pcCount,String operator);
void saveHiddenDataCollectConfig(ThtHiddenDataCollectConfig config);

@ -17,5 +17,5 @@ public interface IConfigService {
List<StreetCommunity> getStreetCommunityByXq(String xqcode);
LineInfo getDangerBaseData(String sectionCode);
LineInfo getDangerBaseData(String sectionCode, String businessId);
}

@ -37,9 +37,9 @@ public List<StreetCommunity> getStreetCommunityByXq(String xqcode) {
}
@Override
public LineInfo getDangerBaseData(String sectionCode) {
public LineInfo getDangerBaseData(String sectionCode,String businessId) {
return configMapper.getDangerBaseData(sectionCode);
return configMapper.getDangerBaseData(sectionCode,businessId);
}

@ -13,13 +13,17 @@
</select>
<select id="getStreetCommunityById" resultType="com.hisense.hiatmp.server_api.model.StreetCommunity">
select DISTINCT xqcode,xqname from tlv_street_community
select DISTINCT xqcode,xqname
<if test="jdcode != null and jdcode != ''">
,jdcode,jdname
</if>
from tlv_street_community
where
1 = 1
AND xqcode = #{xqcode}
<if test="jdcode != null and jdcode != ''">
AND jdcode = #{jdcode}
</if>
AND xqcode = #{xqcode}
</select>
<select id="getStreetCommunityByXq" resultType="com.hisense.hiatmp.server_api.model.StreetCommunity">
@ -27,6 +31,8 @@
</select>
<select id="getDangerBaseData" resultType="com.hisense.hiatmp.model.dmr.LineInfo">
select * from bis_section where section_code = #{sectionCode};
select bs.*,thdr.belong_xq as xqcode,thdr.xzjd as jdcode from bis_section bs
LEFT JOIN tht_hidden_danger_road thdr on thdr.business_id = #{businessId}
where bs.section_code = #{sectionCode};
</select>
</mapper>

@ -95,12 +95,10 @@
ON hdb.business_id = hdr.business_id AND hdb.pc_count = hdr.pc_count
LEFT JOIN department dp ON hdb.handle_dept = dp.cdepartmentid
LEFT JOIN enum_type et ON et.ENUMTYPEID = '6601' AND et.enumvalue = hdb.status
LEFT JOIN tht_timeline tt ON tt.business_id = hdb.business_id
WHERE
1 = 1
AND hdb.status = '10'
AND hdr.nid is not null
AND tt.operator = #{nuserid}
AND COALESCE(hdb.approve_status,'0') not IN('0','-1') AND hdb.approve_status is not null
<if test="cdepartmentid != null">
AND hdr.belong_xq like concat(concat(#{cdepartmentid}::text,'%'))
@ -152,10 +150,9 @@
ON hdb.business_id = hdr.business_id AND hdb.pc_count = hdr.pc_count
LEFT JOIN department dp ON hdb.handle_dept = dp.cdepartmentid
LEFT JOIN enum_type et ON et.ENUMTYPEID = '6601' AND et.enumvalue = hdb.status
LEFT JOIN tht_timeline tt ON tt.business_id = hdb.business_id
WHERE
tt.operator = #{nuserid}
AND tt.title = '隐患上报'
1 = 1
AND hdr.pc_operator = #{nuserid}
AND hdb.status = '10'
AND hdr.nid is not null
AND hdb.approve_status != '0' AND hdb.approve_status != '-1'
@ -245,14 +242,10 @@
WHEN now() AT TIME ZONE 'Asia/Shanghai' >= t1.planEndTime THEN 1 --超期
END AS time_status
, t1.*
-- , EXTRACT(EPOCH FROM NOW() - t1.planEndTime) AS timeDiffEnd
-- , EXTRACT(EPOCH FROM t1.planEndTime - NOW() ) AS timeDiffStart
, floor(EXTRACT(EPOCH FROM(now() AT TIME ZONE 'Asia/Shanghai' - planEndTime))/(1440*60)) delayDay
, ceil(mod(ceil(EXTRACT(EPOCH FROM(now() AT TIME ZONE 'Asia/Shanghai' -planEndTime)))::INTEGER , 1440*60)::FLOAT/3600) delayHour
, floor(EXTRACT(EPOCH FROM(planEndTime -now() AT TIME ZONE 'Asia/Shanghai'))/(1440*60)) nearDay
, ceil(mod(ceil(EXTRACT(EPOCH FROM(planEndTime -now() AT TIME ZONE 'Asia/Shanghai')))::INTEGER , 1440*60)::FLOAT/3600) nearHour
-- , now() - t1.planEndTime as timeDiffEnd
-- , now() - t1.nearEndTime as timeDiffStart
]]>
FROM (SELECT hdb.nid
, hdb.name
@ -285,9 +278,6 @@
AND et.enumvalue = hdb.status
LEFT JOIN bis_section bs ON hdr.section_code = bs.section_code
LEFT JOIN tht_param_config tpc ON tpc.param_code = 'THT_PC_ROAD_XT'
<if test="classification != ''">
LEFT JOIN tht_timeline tt ON tt.business_id = hdb.business_id
</if>
WHERE
hdb.status = #{status}
AND hdr.nid is not null
@ -303,16 +293,12 @@
<if test="search != null and search != ''">
AND hdb.name like concat(concat('%',#{search}),'%')
</if>
<if test="classification == 1">
AND tt.operator = #{nuserId}
</if>
<if test="classification == 2">
AND tt.title = '隐患上报'
AND tt.operator = #{nuserId}
AND hdr.pc_operator = #{nuserId}
</if>
<if test="classification == 3">
AND tt.title != '隐患上报'
AND tt.operator = #{nuserId}
AND hdr.pc_operator != #{nuserId}
</if>
) t1
ORDER BY time_status, planEndTime DESC
@ -574,7 +560,8 @@
<update id="updateDangerRoad">
update tht_hidden_danger_road
set hd_flag = #{hdFlag}
, pc_end_time = CURRENT_TIMESTAMP,last_mod_date = NOW()
,last_mod_date = NOW()
, pc_operator = #{operator}
where business_id = #{businessId}
and pc_count = #{pcCount}
</update>

@ -14,6 +14,9 @@ public class ManualInvestigation implements Serializable {
private static final long serialVersionUID = 1L;
// 用户
String operator;
// 第一页,基本信息
String businessId;

@ -22,6 +22,9 @@ public class LineInfo {
private String lineModel;
private String lineType;
private String xqcode;
private String jdcode;
private List<SectionInfo> sectionList;
}

Loading…
Cancel
Save