dengyj hace 3 años
padre
commit
f81ee8ac24

+ 2 - 0
src/main/java/com/steerinfo/metermonitor/metermonitornote/controller/MeterMonitorNoteController.java

@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 
@@ -128,6 +129,7 @@ public class MeterMonitorNoteController extends BaseRESTfulController {
     public RESTfulResult update(@PathVariable String id, @RequestBody MeterMonitorNote model) {
         try {
             model.setId(id);
+            model.setUpdateTime(new Date());
             MeterMonitorNote meterMonitorNote = meterMonitorNoteService.modify(model);
             return success(meterMonitorNote);
         } catch (Exception ex) {

+ 72 - 1
src/main/java/com/steerinfo/metermonitor/metermonitornote/mapper/MeterMonitorNoteMapper.xml

@@ -656,7 +656,78 @@
 
   <select id="likeByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     <include refid="select"/>
-    <include refid="whereLike"/>
+    <where>
+      <if test="noteNo != null and noteNo != ''">
+        and NOTE_NO LIKE '%${noteNo}%'
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and BASE_SPOT_NO LIKE '%${baseSpotNo}%'
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and BASE_SPOT_NAME LIKE '%${baseSpotName}%'
+      </if>
+      <if test="operationContent != null and operationContent != ''">
+        and OPERATION_CONTENT LIKE '%${operationContent}%'
+      </if>
+      <if test="operationTime != null and operationTime != ''">
+        and OPERATION_TIME LIKE '%${operationTime}%'
+      </if>
+      <if test="carNo != null and carNo != ''">
+        and CAR_NO LIKE '%${carNo}%'
+      </if>
+      <if test="meterManNo != null and meterManNo != ''">
+        and METER_MAN_NO LIKE '%${meterManNo}%'
+      </if>
+      <if test="meterManName != null and meterManName != ''">
+        and METER_MAN_NAME LIKE '%${meterManName}%'
+      </if>
+      <if test="meterNoteSource != null and meterNoteSource != ''">
+        and METER_NOTE_SOURCE LIKE '%${meterNoteSource}%'
+      </if>
+      <if test="noteTypeNo != null and noteTypeNo != ''">
+        and NOTE_TYPE_NO LIKE '%${noteTypeNo}%'
+      </if>
+      <if test="noteTypeName != null and noteTypeName != ''">
+        and NOTE_TYPE_NAME LIKE '%${noteTypeName}%'
+      </if>
+      <if test="predictionNo != null and predictionNo != ''">
+        and PREDICTION_NO LIKE '%${predictionNo}%'
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO LIKE '%${createManNo}%'
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME LIKE '%${createManName}%'
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO LIKE '%${updateManNo}%'
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME LIKE '%${updateManName}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="monitorNote != null and monitorNote != ''">
+        and MONITOR_NOTE LIKE '%${monitorNote}%'
+      </if>
+      <if test="baseSpotNoStr != null and baseSpotNoStr != ''">
+        and BASE_SPOT_NO in
+        <foreach collection="spotNoStr" index="item" open="(" separator="," close=")">
+          #{item}
+        </foreach>
+      </if>
+      <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+        and to_date(OPERATION_TIME ,'yyyy-mm-dd HH24:mi:ss') >= to_date(#{startTime},'yyyy-mm-dd HH24:mi:ss')-3/24/60
+        and to_date(OPERATION_TIME ,'yyyy-mm-dd HH24:mi:ss') &lt;= to_date(#{endTime},'yyyy-mm-dd HH24:mi:ss') + 1/(24*60)
+      </if>
+    </where>
     order by operation_time desc
   </select>
 

+ 8 - 0
src/main/java/com/steerinfo/metermonitor/metermonitornote/service/impl/MeterMonitorNoteServiceImpl.java

@@ -57,6 +57,14 @@ public class MeterMonitorNoteServiceImpl extends BaseServiceImpl<MeterMonitorNot
     @Override
     public PageList<MeterMonitorNote> likeByDesc(Map<String, Object> parmas, Integer pageNum, Integer pageSize) {
         PageHelper.startPage(pageNum, pageSize);
+        if(parmas.get("baseSpotNoStr") != null) {
+            String spotNoStr[] = parmas.get("baseSpotNoStr").toString().split(",");
+            parmas.put("spotNoStr", spotNoStr);
+        }
+//        if(parmas.get("createManNoStr") != null) {
+//            String manNoStr[] = parmas.get("createManNoStr").toString().split(",");
+//            parmas.put("manNoStr", manNoStr);
+//        }
         List<MeterMonitorNote> rows = meterMonitorNoteMapper.likeByDesc(parmas);
         PageList pageInfo = new PageList(rows);
         return pageInfo;

+ 10 - 2
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java

@@ -333,8 +333,12 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                     firstGross.setValueFlag("0");
 //                    meterWorkRailwayActFirstMapper.updateByPrimaryKeySelective(firstGross);
                     meterWorkRailwayActFirstMapper.deleteByPrimaryKey(firstGross.getActualFirstNo());
+                    MeterWorkRailwayReceived received = meterWorkRailwayReceivedMapper.selectAndRemove(firstGross.getActualFirstNo());
+                    received.setValueFlag("0");
+                    received.setIsAutoOperation("1");
+                    meterWorkRailwayReceivedMapper.updateByPrimaryKeySelective(received);
                     //恢复从表数据
-                    preRailwayScaleMapper.updateMeterWorkRailwayReceiveds(firstGross.getActualFirstNo());
+//                    preRailwayScaleMapper.updateMeterWorkRailwayReceiveds(firstGross.getActualFirstNo());
                 }
 
                 MeterWorkRailwayActFirst firstTare = meterWorkRailwayActFirstMapper.selectByPrimaryKey(model.getActualFirst2No());
@@ -348,8 +352,12 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                     firstTare.setIsPreSacale("0");
                     firstTare.setValueFlag("0");
                     meterWorkRailwayActFirstMapper.deleteByPrimaryKey(firstTare.getActualFirstNo());
+                    MeterWorkRailwayReceived received = meterWorkRailwayReceivedMapper.selectAndRemove(firstTare.getActualFirstNo());
+                    received.setValueFlag("0");
+                    received.setIsAutoOperation("1");
+                    meterWorkRailwayReceivedMapper.updateByPrimaryKeySelective(received);
                     //恢复从表数据
-                    preRailwayScaleMapper.updateMeterWorkRailwayReceiveds(firstTare.getActualFirstNo());
+//                    preRailwayScaleMapper.updateMeterWorkRailwayReceiveds(firstTare.getActualFirstNo());
                 }
                 // 作废结净数据并解除委托
                 MeterWorkRailwayActual actualRow = meterWorkRailwayActualMapper.cleanPredcition(model.getActualNo());

+ 56 - 1
src/main/java/com/steerinfo/meterwork/meterworkrailwayscheduledhelp/mapper/MeterWorkRailwayScheduledHelpMapper.xml

@@ -458,7 +458,62 @@
 
   <select id="likeByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     <include refid="select"/>
-    <include refid="whereLike"/>
+    <where>
+      <if test="helpId != null and helpId != ''">
+        and HELP_ID LIKE '%${helpId}%'
+      </if>
+      <if test="railwayNo != null and railwayNo != ''">
+        and RAILWAY_NO LIKE '%${railwayNo}%'
+      </if>
+      <if test="helpContent != null and helpContent != ''">
+        and HELP_CONTENT LIKE '%${helpContent}%'
+      </if>
+      <if test="createNo != null and createNo != ''">
+        and CREATE_NO LIKE '%${createNo}%'
+      </if>
+      <if test="createName != null and createName != ''">
+        and CREATE_NAME LIKE '%${createName}%'
+      </if>
+      <if test="result != null and result != ''">
+        and RESULT LIKE '%${result}%'
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG LIKE '%${valueFlag}%'
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and BASE_SPOT_NO LIKE '%${baseSpotNo}%'
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and BASE_SPOT_NAME LIKE '%${baseSpotName}%'
+      </if>
+      <if test="measureTaskNum != null and measureTaskNum != ''">
+        and MEASURE_TASK_NUM LIKE '%${measureTaskNum}%'
+      </if>
+      <if test="warmType != null and warmType != ''">
+        and WARM_TYPE LIKE '%${warmType}%'
+      </if>
+      <if test="warmTypeName != null and warmTypeName != ''">
+        and WARM_TYPE_NAME LIKE '%${warmTypeName}%'
+      </if>
+      <if test="startTime01 != null and startTime01 != ''">
+        and create_time >= to_date(#{startTime01}, 'yyyy-MM-dd HH24:mi:ss')
+      </if>
+      <if test="endTime01 != null and endTime01 != ''">
+        and create_time &lt;= to_date(#{endTime01}, 'yyyy-MM-dd HH24:mi:ss')
+      </if>
+      <if test="baseSpotNoStr != null and baseSpotNoStr != ''">
+        and base_spot_no in
+        <foreach collection="spotNoStr" item="item" separator="," open="(" close=")">
+          #{item}
+        </foreach>
+      </if>
+      <if test="createManNoStr != null and createManNoStr != ''">
+        and create_no in
+        <foreach collection="manNoStr" item="item" separator="," open="(" close=")">
+          #{item}
+        </foreach>
+      </if>
+    </where>
     order By create_time desc
   </select>
 </mapper>

+ 8 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayscheduledhelp/service/impl/MeterWorkRailwayScheduledHelpServiceImpl.java

@@ -47,6 +47,14 @@ public class MeterWorkRailwayScheduledHelpServiceImpl extends BaseServiceImpl<Me
     @Override
     public PageList<MeterWorkRailwayScheduledHelp> likeByDesc(HashMap<String, Object> parameters, Integer pageNum, Integer pageSize) {
         PageHelper.startPage(pageNum, pageSize);
+        if(parameters.get("baseSpotNoStr") != null) {
+            String spotNoStr[] = parameters.get("baseSpotNoStr").toString().split(",");
+            parameters.put("spotNoStr", spotNoStr);
+        }
+        if(parameters.get("createManNoStr") != null) {
+            String manNoStr[] = parameters.get("createManNoStr").toString().split(",");
+            parameters.put("manNoStr", manNoStr);
+        }
         List<MeterWorkRailwayScheduledHelp> rows = meterWorkRailwayScheduledHelpMapper.likeByDesc(parameters);
         PageList pageInfo = new PageList(rows);
         return pageInfo;

+ 12 - 6
src/main/java/com/steerinfo/meterwork/meterworkscheduledhelp/mapper/MeterWorkScheduledHelpMapper.xml

@@ -468,12 +468,6 @@
       <if test="helpContent != null and helpContent != ''">
         and HELP_CONTENT LIKE '%${helpContent}%'
       </if>
-      <if test="createTime != null">
-        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
-      </if>
-      <if test="endTime != null">
-        and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
-      </if>
       <if test="createNo != null and createNo != ''">
         and CREATE_NO LIKE '%${createNo}%'
       </if>
@@ -507,6 +501,18 @@
       <if test="endTime01 != null and endTime01 != ''">
         and create_time &lt;= to_date(#{endTime01}, 'yyyy-MM-dd HH24:mi:ss')
       </if>
+      <if test="baseSpotNoStr != null and baseSpotNoStr != ''">
+        and base_spot_no in
+        <foreach collection="spotNoStr" item="item" separator="," open="(" close=")">
+          #{item}
+        </foreach>
+      </if>
+      <if test="createManNoStr != null and createManNoStr != ''">
+        and create_no in
+        <foreach collection="manNoStr" item="item" separator="," open="(" close=")">
+          #{item}
+        </foreach>
+      </if>
       and warm_type in ('1', '2', '3')
       and warm_type not in ('8')
     </where>

+ 9 - 0
src/main/java/com/steerinfo/meterwork/meterworkscheduledhelp/service/impl/MeterWorkScheduledHelpServiceImpl.java

@@ -11,6 +11,7 @@ import com.steerinfo.meterwork.meterworkscheduledhelp.mapper.MeterWorkScheduledH
 import com.steerinfo.meterwork.meterworkscheduledhelp.model.MeterWorkScheduledHelp;
 import com.steerinfo.meterwork.meterworkscheduledhelp.service.IMeterWorkScheduledHelpService;
 import com.steerinfo.util.PublicMethod;
+import com.steerinfo.util.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.mail.MailParseException;
 import org.springframework.stereotype.Service;
@@ -153,6 +154,14 @@ public class MeterWorkScheduledHelpServiceImpl extends BaseServiceImpl<MeterWork
     @Override
     public PageList<MeterWorkScheduledHelp> likeByDesc(Map<String, Object> parameters, Integer pageNum, Integer pageSize) {
         PageHelper.startPage(pageNum, pageSize);
+        if(parameters.get("baseSpotNoStr") != null) {
+            String spotNoStr[] = parameters.get("baseSpotNoStr").toString().split(",");
+            parameters.put("spotNoStr", spotNoStr);
+        }
+        if(parameters.get("createManNoStr") != null) {
+            String manNoStr[] = parameters.get("createManNoStr").toString().split(",");
+            parameters.put("manNoStr", manNoStr);
+        }
         List<MeterWorkScheduledHelp> rows = meterWorkScheduledHelpMapper.likeByDesc(parameters);
         PageList pageInfo = new PageList(rows);
         return pageInfo;

+ 6 - 0
src/main/java/com/steerinfo/meterwork/meterworkzeroalarm/mapper/MeterWorkZeroAlarmMapper.xml

@@ -570,6 +570,12 @@
       <if test="validFlag != null and validFlag != ''">
         and VALID_FLAG = #{validFlag}
       </if>
+      <if test="startTime != null and startTime != ''">
+        and create_time >= to_date(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
+      </if>
+      <if test="endTime != null and endTime != ''">
+        and create_time &lt;= to_date(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+      </if>
       and ZERO_WEIGHT != 0
     </where>
     order by create_time desc