fanxw 11 ヶ月 前
コミット
a91494e241

+ 1 - 1
src/main/java/com/chinaitop/depot/yjbj/controller/StorageTemperaturepointWarningController.java

@@ -33,7 +33,7 @@ public class StorageTemperaturepointWarningController {
33 33
 	private SbyjService storageTemperaturepointWarningService;
34 34
 
35 35
 	@RequestMapping(value="/getCwdgzPageList", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
36
-	@ApiOperation(value="查询测温设备故障列表", notes = "支持分页")
36
+	@ApiOperation(value="查询测温设备故障、测温数据上传故障列表", notes = "支持分页")
37 37
 	@ApiImplicitParams({
38 38
 		@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
39 39
         @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),

+ 5 - 3
src/main/java/com/chinaitop/depot/yjbj/controller/YjbjController.java

@@ -53,15 +53,17 @@ public class YjbjController {
53 53
 		@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
54 54
         @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
55 55
         @ApiImplicitParam(name = "jkdmc", value = "监控点名称", paramType = "query"),
56
-        @ApiImplicitParam(name = "orgId", value = "库ID", required=true, paramType = "query")
56
+        @ApiImplicitParam(name = "orgId", value = "库ID", required=true, paramType = "query"),
57
+        @ApiImplicitParam(name = "approvalStatus", value = "督办处理状态编码", paramType = "query"),
58
+        @ApiImplicitParam(name = "yjzt", value = "预警状态", paramType = "query")
57 59
 	})
58
-	public ResponseEntity getJksbgzPageList(Integer pageNum, Integer pageSize, String jkdmc, Integer orgId) {
60
+	public ResponseEntity getJksbgzPageList(Integer pageNum, Integer pageSize, String jkdmc, Integer orgId, String approvalStatus, String yjzt) {
59 61
 		PageInfo<Jksbgz> pageInfo = null;
60 62
 		try {
61 63
 			if (pageNum != null && pageSize != null) {
62 64
 	            PageHelper.startPage(pageNum, pageSize);
63 65
 	        }
64
-			List<Jksbgz> list = yjbjService.selectJksbgz(orgId, jkdmc);
66
+			List<Jksbgz> list = yjbjService.selectJksbgz(orgId, jkdmc, approvalStatus, yjzt);
65 67
 			pageInfo = new PageInfo<>(list);
66 68
 			return ResponseEntity.ok(pageInfo);
67 69
 		} catch (Exception e) {

+ 13 - 1
src/main/java/com/chinaitop/depot/yjbj/mapper/SbyjMapper.java

@@ -6,7 +6,19 @@ import org.apache.ibatis.annotations.Param;
6 6
 
7 7
 public interface SbyjMapper {
8 8
 
9
-    List<Sbyj> selectByExample(@Param("obj") Sbyj obj);
9
+	/**
10
+	 * 测温设备故障
11
+	 * @param obj
12
+	 * @return
13
+	 */
14
+    List<Sbyj> selectByCwsbgzExample(@Param("obj") Sbyj obj);
15
+    
16
+    /**
17
+	 * 测温数据上传故障
18
+	 * @param obj
19
+	 * @return
20
+	 */
21
+    List<Sbyj> selectByCwsjscgzExample(@Param("obj") Sbyj obj);
10 22
 
11 23
     Sbyj selectByPrimaryKey(String id);
12 24
 

+ 42 - 1
src/main/java/com/chinaitop/depot/yjbj/mapper/SbyjMapper.xml

@@ -40,7 +40,7 @@
40 40
     process_status, process_status_name, supervise_status, supervise_status_name, alarm_type, 
41 41
     pzbm, hfzcsj
42 42
   </sql>
43
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="map">
43
+  <select id="selectByCwsbgzExample" resultMap="BaseResultMap" parameterType="map">
44 44
     select 
45 45
  	    *
46 46
 	from (
@@ -82,6 +82,47 @@
82 82
     </where>
83 83
     order by a.bjsj desc
84 84
   </select>
85
+  <select id="selectByCwsjscgzExample" resultMap="BaseResultMap" parameterType="map">
86
+    select 
87
+ 	    *
88
+	from (
89
+  		select 
90
+		    <include refid="Base_Column_List" />,
91
+		    case approval_status 
92
+		        when '120200' then '待市级管理单位处理'
93
+		        when '120201' then '待市级管理单位审核'
94
+		        when '120203' then '待市级管理单位处理(驳回)'
95
+		        when '140200' then '待区级管理单位处理'
96
+		        when '140201' then '待区级管理单位审核'
97
+		        when '140203' then '待区级管理单位处理(驳回)'
98
+		        when '999999' then '处理完成'
99
+		        else ''
100
+		    end clordbzt,
101
+		    case when hfzcsj is not null and approval_status = '999999' then '已解决' else'未解决' end yjzt
102
+		from storage_temperaturepoint_warning
103
+	) a 
104
+    <where>
105
+      <if test="obj.dataFlag != null">
106
+        and a.data_flag = #{obj.dataFlag,jdbcType=VARCHAR}
107
+      </if>
108
+      <if test="obj.alarmType != null">
109
+        and a.alarm_type = #{obj.alarmType,jdbcType=INTEGER}
110
+      </if>
111
+      <if test="obj.cfbm != null">
112
+        and a.cfbm = #{obj.cfbm,jdbcType=VARCHAR}
113
+      </if>
114
+      <if test="obj.orgId != null">
115
+        and a.org_id = #{obj.orgId,jdbcType=INTEGER}
116
+      </if>
117
+      <if test="obj.approvalStatus != null">
118
+        and a.approval_status = #{obj.approvalStatus,jdbcType=VARCHAR}
119
+      </if>
120
+      <if test="obj.yjzt != null">
121
+        and a.yjzt = #{obj.yjzt,jdbcType=VARCHAR}
122
+      </if>
123
+    </where>
124
+    order by a.bjsj desc
125
+  </select>
85 126
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
86 127
     select 
87 128
     <include refid="Base_Column_List" />

+ 15 - 4
src/main/java/com/chinaitop/depot/yjbj/mapper/YjbjMapper.xml

@@ -4,14 +4,25 @@
4 4
   <!-- 监控设备故障数据查询 -->
5 5
   <select id="selectJksbgz" resultType="com.chinaitop.depot.yjbj.model.Jksbgz" parameterType="map">
6 6
     select 
7
-      id, kdmc, jkdmc, gzlx, cxts, lxsj, bjsj, org_id orgId, is_alarm isAlarm 
8
-    from storage_monitoring_alarm
7
+ 	    *
8
+	from (
9
+  		select 
10
+      		id, kdmc, jkdmc, gzlx, cxts, lxsj, bjsj, org_id orgId, is_alarm isAlarm, hfzcsj, approval_status approvalStatus, approval_status_name approvalStatusName,
11
+		    case when hfzcsj is not null and approval_status = '999999' then '已解决' else '未解决' end yjzt
12
+		from storage_monitoring_alarm
13
+	) a 
9 14
     <where>
10 15
       <if test="obj.jkdmc != null">
11
-        and jkdmc like #{obj.jkdmc,jdbcType=VARCHAR}
16
+        and a.jkdmc like #{obj.jkdmc,jdbcType=VARCHAR}
12 17
       </if>
13 18
       <if test="obj.orgId != null">
14
-        and org_id = #{obj.orgId,jdbcType=INTEGER}
19
+        and a.org_id = #{obj.orgId,jdbcType=INTEGER}
20
+      </if>
21
+      <if test="obj.approvalStatus != null">
22
+        and a.approval_status = #{obj.approvalStatus,jdbcType=VARCHAR}
23
+      </if>
24
+      <if test="obj.yjzt != null">
25
+        and a.yjzt = #{obj.yjzt,jdbcType=VARCHAR}
15 26
       </if>
16 27
     </where>
17 28
     order by bjsj desc

+ 5 - 0
src/main/java/com/chinaitop/depot/yjbj/model/Jksbgz.java

@@ -25,5 +25,10 @@ public class Jksbgz {
25 25
 	private Date bjsj;//报警时间
26 26
 	private String isAlarm;//是否预警 0:否 1:是
27 27
 	private Integer orgId;//库ID
28
+	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
29
+	private Date hfzcsj;//故障类型
30
+	private String approvalStatus;//督办处理状态编码
31
+	private String approvalStatusName;//督办处理状态名称
32
+	private String yjzt;//预警状态
28 33
 
29 34
 }

+ 3 - 1
src/main/java/com/chinaitop/depot/yjbj/service/YjbjService.java

@@ -22,10 +22,12 @@ public interface YjbjService {
22 22
 	 * 监控设备故障数据查询
23 23
 	 * @param orgId 库ID
24 24
 	 * @param jkdmc 监控点名称
25
+	 * @param approvalStatus 督办处理状态编码
26
+	 * @param yjzt 预警状态
25 27
 	 * @return
26 28
 	 * @throws Exception
27 29
 	 */
28
-	List<Jksbgz> selectJksbgz(Integer orgId, String jkdmc) throws Exception;
30
+	List<Jksbgz> selectJksbgz(Integer orgId, String jkdmc, String approvalStatus, String yjzt) throws Exception;
29 31
 
30 32
 	/**
31 33
 	 * 同号牌入库预警数据查询

+ 8 - 1
src/main/java/com/chinaitop/depot/yjbj/service/impl/SbyjServiceImpl.java

@@ -36,7 +36,14 @@ public class SbyjServiceImpl implements SbyjService {
36 36
 		if (StringUtils.isNotBlank(yjzt)) {
37 37
 			obj.setYjzt(yjzt.trim());
38 38
 		}
39
-		return sbyjMapper.selectByExample(obj);
39
+		List<Sbyj> list = null;
40
+		if (alarmType == 1) {
41
+			list = sbyjMapper.selectByCwsbgzExample(obj);
42
+		}
43
+		if (alarmType == 2) {
44
+			list = sbyjMapper.selectByCwsjscgzExample(obj);
45
+		}
46
+		return list;
40 47
 	}
41 48
 
42 49
 	@Override

+ 7 - 1
src/main/java/com/chinaitop/depot/yjbj/service/impl/YjbjServiceImpl.java

@@ -33,12 +33,18 @@ public class YjbjServiceImpl implements YjbjService {
33 33
 	private YjbjMapper yjbjMapper;
34 34
 
35 35
 	@Override
36
-	public List<Jksbgz> selectJksbgz(Integer orgId, String jkdmc) throws Exception {
36
+	public List<Jksbgz> selectJksbgz(Integer orgId, String jkdmc, String approvalStatus, String yjzt) throws Exception {
37 37
 		Jksbgz obj = new Jksbgz();
38 38
 		obj.setOrgId(orgId);
39 39
 		if (StringUtils.isNotBlank(jkdmc)) {
40 40
 			obj.setJkdmc("%"+jkdmc+"%");
41 41
 		}
42
+		if (StringUtils.isNotBlank(approvalStatus)) {
43
+			obj.setApprovalStatus(approvalStatus.trim());
44
+		}
45
+		if (StringUtils.isNotBlank(yjzt)) {
46
+			obj.setYjzt(yjzt.trim());
47
+		}
42 48
 		return yjbjMapper.selectJksbgz(obj);
43 49
 	}
44 50