Prechádzať zdrojové kódy

优艾特参数分析优化以及智能表档案查询调整

lihaoli 1 týždeň pred
rodič
commit
50c1faad88

+ 1 - 16
collect_fees_hdx_api/fees-hdx-api/src/main/resources/mapper/yhgl/YhKhjbxxMapper.xml

@@ -680,8 +680,7 @@
         SELECT a.yhbh, a.yhxm, a.yhdz,a.lxdh,
         b.sbbh AS sbbh,
         (select NBSYJE from yy_zjzh where yhbh=a.yhbh) bjye,
-        da.cl_cljg tbbz,
-        decode(zl.cl_cljg, '0', '1', decode(zl.ZLVALUE,'true','0','2')) fmzt,
+        b.fmzt fmzt,
         f.cbbmc AS sscbbmc,
         g.cbpqmc AS sscbpqmc,
         d.name AS sblbmc,
@@ -692,20 +691,6 @@
         LEFT JOIN bm_cbb f ON a.sscbb = f.cbbbm
         LEFT JOIN bm_cbpq g ON a.sscbpq = g.cbpqbm
         LEFT JOIN bm_sbsccj h on b.sbsccj=h.code
-        LEFT JOIN (
-        select * from(
-        select a.*,row_number() over (partition by YHBH,CBKH order by CZSJ desc) as rn from
-        znb_da_log a)
-        where rn=1
-        ) da ON b.yhbh=da.yhbh and b.cbkh=da.cbkh
-        LEFT JOIN (
-        select * from(
-        select a.*,row_number() over (partition by YHBH,CBKH order by CZSJ desc) as rn from
-        znb_zl_log a
-        where a.zltype='1'
-        )
-        where rn=1
-        ) zl ON b.yhbh=zl.yhbh and b.cbkh=zl.cbkh
         WHERE 1=1 AND b.sblb in ('2','3')
         <!--模糊查询 -->
         <if test="filter.searchText!=null">

+ 1 - 1
collect_fees_hdx_api/third-system-service/src/main/java/com/tofly/third/entity/YhCbkxx.java

@@ -216,7 +216,7 @@ public class YhCbkxx implements Serializable {
     @ApiModelProperty("智能表剩余金额")
     private BigDecimal syje = BigDecimal.ZERO;
 
-    @ApiModelProperty("阀门状态(0关阀 1处理中 2开阀)")
+    @ApiModelProperty("阀门状态(0开阀 1处理中 2关阀 )")
     private String fmzt;
 
     @ApiModelProperty("用水类型")

+ 19 - 1
collect_fees_hdx_api/third-system-service/src/main/java/com/tofly/third/service/ZnbZlLogService.java

@@ -270,7 +270,19 @@ public class ZnbZlLogService extends ServiceImpl<ZnbZlLogMapper, ZnbZlLog> {
                     if (jsonObject.getBoolean("requestCode")) {
                         YatFkcxxx yatFkcxxx = JSONObject.parseObject(jsondata, YatFkcxxx.class);
                         if (yatFkcxxx != null) {
-                            if ("等待".equals(yatFkcxxx.getCommandStatus())) {
+                            if (yatFkcxxx.getValStatus().contains("无阀门")) {
+                                this.lambdaUpdate()
+                                        .set(ZnbZlLog::getClLock, "0")
+                                        .set(ZnbZlLog::getClCljg, "1")
+                                        .set(ZnbZlLog::getClRemessage, "无阀门")
+                                        .set(ZnbZlLog::getClClsj, new Date())
+                                        .eq(ZnbZlLog::getId, item.getId())
+                                        .update();
+                                yhCbkxxService.lambdaUpdate()
+                                        .set(YhCbkxx::getFmzt, "0")
+                                        .in(YhCbkxx::getCbkid, item.getCbkid())
+                                        .update();
+                            } else if ("等待".equals(yatFkcxxx.getCommandStatus())) {
                                 this.lambdaUpdate()
                                         .set(ZnbZlLog::getClLock, "0")
                                         .set(ZnbZlLog::getClCljg, "8")
@@ -284,11 +296,16 @@ public class ZnbZlLogService extends ServiceImpl<ZnbZlLogMapper, ZnbZlLog> {
                                 if ("成功".equals(yatFkcxxx.getCommandStatus())) {
                                     clcljg = "1";
                                     message = "";
+                                    yhCbkxxService.lambdaUpdate()
+                                            .set(YhCbkxx::getFmzt, item.getZlvalue().equals("1") ? "0" : "2")
+                                            .in(YhCbkxx::getCbkid, item.getCbkid())
+                                            .update();
                                 }
                                 if ("撤销".equals(yatFkcxxx.getCommandStatus())) {
                                     clcljg = "-2";
                                     message = "指令已撤销";
                                 }
+
                                 this.lambdaUpdate()
                                         .set(ZnbZlLog::getClLock, "0")
                                         .set(ZnbZlLog::getClCljg, clcljg)
@@ -298,6 +315,7 @@ public class ZnbZlLogService extends ServiceImpl<ZnbZlLogMapper, ZnbZlLog> {
                                         .update();
                             }
                         }
+
                     } else {
                         this.lambdaUpdate()
                                 .set(ZnbZlLog::getClLock, "0")