duyong il y a 4 ans
Parent
commit
04508648a5
100 fichiers modifiés avec 10820 ajouts et 1968 suppressions
  1. 6 2
      src/main/java/com/steerinfo/baseinfo/appphonehelp/controller/AppPhoneHelpController.java
  2. 2 1
      src/main/java/com/steerinfo/baseinfo/appverificationcode/service/impl/AppVerificationCodeServiceImpl.java
  3. 14 8
      src/main/java/com/steerinfo/baseinfo/appversionmsg/controller/AppVersionMsgController.java
  4. 0 1
      src/main/java/com/steerinfo/baseinfo/appversionmsg/mapper/AppVersionMsgMapper.java
  5. 512 72
      src/main/java/com/steerinfo/baseinfo/appversionmsg/mapper/AppVersionMsgMapper.xml
  6. 282 25
      src/main/java/com/steerinfo/baseinfo/appversionmsg/model/AppVersionMsg.java
  7. 7 5
      src/main/java/com/steerinfo/baseinfo/appversionmsg/service/IAppVersionMsgService.java
  8. 37 7
      src/main/java/com/steerinfo/baseinfo/appversionmsg/service/impl/AppVersionMsgServiceImpl.java
  9. 158 59
      src/main/java/com/steerinfo/baseinfo/meterbasecar/controller/MeterBaseCarController.java
  10. 7 0
      src/main/java/com/steerinfo/baseinfo/meterbasecar/mapper/MeterBaseCarMapper.java
  11. 162 9
      src/main/java/com/steerinfo/baseinfo/meterbasecar/mapper/MeterBaseCarMapper.xml
  12. 76 0
      src/main/java/com/steerinfo/baseinfo/meterbasecar/model/MeterBaseCar.java
  13. 3 1
      src/main/java/com/steerinfo/baseinfo/meterbasecar/service/IMeterBaseCarService.java
  14. 126 68
      src/main/java/com/steerinfo/baseinfo/meterbasecar/service/impl/MeterBaseCarServiceImpl.java
  15. 3 0
      src/main/java/com/steerinfo/baseinfo/meterbasedriver/mapper/MeterBaseDriverMapper.java
  16. 8 0
      src/main/java/com/steerinfo/baseinfo/meterbasedriver/mapper/MeterBaseDriverMapper.xml
  17. 1 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/service/impl/MeterBaseRailwayHisTareDataServiceImpl.java
  18. 119 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/controller/MeterBaseRailwayHisTareDetailController.java
  19. 15 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/mapper/MeterBaseRailwayHisTareDetailMapper.java
  20. 325 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/mapper/MeterBaseRailwayHisTareDetailMapper.xml
  21. 168 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/model/MeterBaseRailwayHisTareDetail.java
  22. 24 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/service/IMeterBaseRailwayHisTareDetailService.java
  23. 46 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/service/impl/MeterBaseRailwayHisTareDetailServiceImpl.java
  24. 124 0
      src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/controller/MeterBaseRfidInfoController.java
  25. 11 0
      src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/mapper/MeterBaseRfidInfoMapper.java
  26. 268 0
      src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/mapper/MeterBaseRfidInfoMapper.xml
  27. 138 0
      src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/model/MeterBaseRfidInfo.java
  28. 25 0
      src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/service/IMeterBaseRfidInfoService.java
  29. 62 0
      src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/service/impl/MeterBaseRfidInfoServiceImpl.java
  30. 1 1
      src/main/java/com/steerinfo/baseinfo/meterbasescalepoint/controller/MeterBaseScalePointController.java
  31. 319 63
      src/main/java/com/steerinfo/baseinfo/meterbasescalepoint/mapper/MeterBaseScalePointMapper.xml
  32. 151 0
      src/main/java/com/steerinfo/baseinfo/meterbasescalepoint/model/MeterBaseScalePoint.java
  33. 19 0
      src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/controller/MeterBaseSpotInfoController.java
  34. 2 0
      src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/mapper/MeterBaseSpotInfoMapper.java
  35. 342 318
      src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/mapper/MeterBaseSpotInfoMapper.xml
  36. 21 9
      src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/model/MeterBaseSpotInfo.java
  37. 1 1
      src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/service/impl/MeterBaseSpotInfoServiceImpl.java
  38. 12 0
      src/main/java/com/steerinfo/baseinfo/meterbasetermtaredata/controller/MeterBaseTermTareDataController.java
  39. 3 0
      src/main/java/com/steerinfo/baseinfo/meterbasetermtaredata/mapper/MeterBaseTermTareDataMapper.java
  40. 8 0
      src/main/java/com/steerinfo/baseinfo/meterbasetermtaredata/mapper/MeterBaseTermTareDataMapper.xml
  41. 2 0
      src/main/java/com/steerinfo/baseinfo/meterbasetermtaredata/service/IMeterBaseTermTareDataService.java
  42. 41 6
      src/main/java/com/steerinfo/baseinfo/meterbasetermtaredata/service/impl/MeterBaseTermTareDataServiceImpl.java
  43. 136 0
      src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/controller/MeterBaseUnitInfoController.java
  44. 14 0
      src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/mapper/MeterBaseUnitInfoMapper.java
  45. 483 0
      src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/mapper/MeterBaseUnitInfoMapper.xml
  46. 258 0
      src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/model/MeterBaseUnitInfo.java
  47. 26 0
      src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/service/IMeterBaseUnitInfoService.java
  48. 80 0
      src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/service/impl/MeterBaseUnitInfoServiceImpl.java
  49. 159 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/controller/MeterBaseUserSpotController.java
  50. 11 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/mapper/MeterBaseUserSpotMapper.java
  51. 319 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/mapper/MeterBaseUserSpotMapper.xml
  52. 158 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/model/MeterBaseUserSpot.java
  53. 29 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/service/IMeterBaseUserSpotService.java
  54. 75 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/service/impl/MeterBaseUserSpotServiceImpl.java
  55. 12 0
      src/main/java/com/steerinfo/metermonitor/metermonitornote/controller/MeterMonitorNoteController.java
  56. 4 0
      src/main/java/com/steerinfo/metermonitor/metermonitornote/mapper/MeterMonitorNoteMapper.java
  57. 9 0
      src/main/java/com/steerinfo/metermonitor/metermonitornote/mapper/MeterMonitorNoteMapper.xml
  58. 4 0
      src/main/java/com/steerinfo/metermonitor/metermonitornote/service/IMeterMonitorNoteService.java
  59. 7 0
      src/main/java/com/steerinfo/metermonitor/metermonitornote/service/impl/MeterMonitorNoteServiceImpl.java
  60. 177 7
      src/main/java/com/steerinfo/meterwork/meterworkcaractual/controller/MeterWorkCarActualController.java
  61. 4 0
      src/main/java/com/steerinfo/meterwork/meterworkcaractual/mapper/MeterWorkCarActualMapper.java
  62. 373 330
      src/main/java/com/steerinfo/meterwork/meterworkcaractual/mapper/MeterWorkCarActualMapper.xml
  63. 31 0
      src/main/java/com/steerinfo/meterwork/meterworkcaractual/model/MeterWorkCarActual.java
  64. 17 1
      src/main/java/com/steerinfo/meterwork/meterworkcaractual/service/IMeterWorkCarActualService.java
  65. 600 56
      src/main/java/com/steerinfo/meterwork/meterworkcaractual/service/impl/MeterWorkCarActualServiceImpl.java
  66. 121 22
      src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/controller/MeterWorkCarActualFirstController.java
  67. 5 0
      src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/mapper/MeterWorkCarActualFirstMapper.java
  68. 32 3
      src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/mapper/MeterWorkCarActualFirstMapper.xml
  69. 12 2
      src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/IMeterWorkCarActualFirstService.java
  70. 596 150
      src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/impl/MeterWorkCarActualFirstServiceImpl.java
  71. 160 7
      src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/mapper/MeterWorkHookActFirstMapper.xml
  72. 93 2
      src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/model/MeterWorkHookActFirst.java
  73. 1 1
      src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/service/impl/MeterWorkHookActFirstServiceImpl.java
  74. 46 4
      src/main/java/com/steerinfo/meterwork/meterworkhookactual/controller/MeterWorkHookActualController.java
  75. 190 9
      src/main/java/com/steerinfo/meterwork/meterworkhookactual/mapper/MeterWorkHookActualMapper.xml
  76. 109 2
      src/main/java/com/steerinfo/meterwork/meterworkhookactual/model/MeterWorkHookActual.java
  77. 3 0
      src/main/java/com/steerinfo/meterwork/meterworkhookactual/service/IMeterWorkHookActualService.java
  78. 127 1
      src/main/java/com/steerinfo/meterwork/meterworkhookactual/service/impl/MeterWorkHookActualServiceImpl.java
  79. 1 0
      src/main/java/com/steerinfo/meterwork/meterworkimage/controller/MeterWorkImageController.java
  80. 13 13
      src/main/java/com/steerinfo/meterwork/meterworkimage/service/impl/MeterWorkImageServiceImpl.java
  81. 3 0
      src/main/java/com/steerinfo/meterwork/meterworkmonitor/mapper/MeterWorkMonitorMapper.java
  82. 778 366
      src/main/java/com/steerinfo/meterwork/meterworkmonitor/mapper/MeterWorkMonitorMapper.xml
  83. 247 6
      src/main/java/com/steerinfo/meterwork/meterworkmonitor/model/MeterWorkMonitor.java
  84. 5 0
      src/main/java/com/steerinfo/meterwork/meterworkmonitor/service/IMeterWorkMonitorService.java
  85. 2 0
      src/main/java/com/steerinfo/meterwork/meterworkmonitor/service/impl/MeterWorkMonitorServiceImpl.java
  86. 72 27
      src/main/java/com/steerinfo/meterwork/meterworkprewgttype/controller/MeterWorkPreWgttypeController.java
  87. 4 1
      src/main/java/com/steerinfo/meterwork/meterworkprewgttype/service/IMeterWorkPreWgttypeService.java
  88. 131 56
      src/main/java/com/steerinfo/meterwork/meterworkprewgttype/service/impl/MeterWorkPreWgttypeServiceImpl.java
  89. 82 21
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/controller/MeterWorkRailwayActFirstController.java
  90. 5 6
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/mapper/MeterWorkRailwayActFirstMapper.java
  91. 27 10
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/mapper/MeterWorkRailwayActFirstMapper.xml
  92. 8 2
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/IMeterWorkRailwayActFirstService.java
  93. 447 148
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/impl/MeterWorkRailwayActFirstServiceImpl.java
  94. 121 15
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/controller/MeterWorkRailwayActualController.java
  95. 6 7
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/mapper/MeterWorkRailwayActualMapper.java
  96. 159 22
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/mapper/MeterWorkRailwayActualMapper.xml
  97. 61 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/model/MeterWorkRailwayActual.java
  98. 12 4
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/IMeterWorkRailwayActualService.java
  99. 502 10
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java
  100. 2 1
      src/main/java/com/steerinfo/meterwork/meterworkzeroalarm/service/impl/MeterWorkZeroAlarmServiceImpl.java

+ 6 - 2
src/main/java/com/steerinfo/baseinfo/appphonehelp/controller/AppPhoneHelpController.java

@@ -138,9 +138,13 @@ public class AppPhoneHelpController extends BaseRESTfulController {
     }
 
     @ApiOperation(value = "App端远程求助确认按钮", notes = "App端远程求助确认按钮")
-    @GetMapping(value = "/phoneHelpComfirm")
-    public RESTfulResult phoneHelpComfirm(@RequestParam String id, String createNo, String createName, String result) {
+    @PostMapping(value = "/phoneHelpConfirm")
+    public RESTfulResult phoneHelpConfirm(@RequestBody HashMap params) {
         RESTfulResult rm = failed();
+        String id = params.get("helpId") == null ? "": params.get("helpId").toString();
+        String createNo = params.get("createNo") == null ? "" : params.get("createNo").toString();
+        String createName = params.get("createName") == null ? "" : params.get("createName").toString();
+        String result = params.get("result") == null ? "" : params.get("result").toString();
         try{
             if(com.steerinfo.util.StringUtils.isEmpty(id)){
                 rm.setMessage("远程求助ID不能为空!!");

+ 2 - 1
src/main/java/com/steerinfo/baseinfo/appverificationcode/service/impl/AppVerificationCodeServiceImpl.java

@@ -23,6 +23,7 @@ import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
@@ -43,7 +44,7 @@ import java.util.Date;
 @Service(value = "appVerificationCodeService")
 public class AppVerificationCodeServiceImpl extends BaseServiceImpl<AppVerificationCode, String> implements IAppVerificationCodeService {
 
-    @Autowired
+    @Resource
     private AppVerificationCodeMapper appVerificationCodeMapper;
 
     @Override

+ 14 - 8
src/main/java/com/steerinfo/baseinfo/appversionmsg/controller/AppVersionMsgController.java

@@ -1,32 +1,28 @@
 package com.steerinfo.baseinfo.appversionmsg.controller;
 
+import com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg;
+import com.steerinfo.baseinfo.appversionmsg.service.IAppVersionMsgService;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.framework.utils.collection.ListUtils;
-import com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg;
-import com.steerinfo.baseinfo.appversionmsg.service.IAppVersionMsgService;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
-import java.util.ArrayList;
-import java.math.BigDecimal;
 
 /**
  * AppVersionMsg RESTful接口:
  * @author generator
- * @version 1.0-SNAPSHORT 2022-01-22 09:58
+ * @version 1.0-SNAPSHORT 2022-04-09 11:53
  * 类描述
  * 修订历史:
- * 日期:2022-01-22
+ * 日期:2022-04-09
  * 作者:generator
  * 参考:
  * 描述:AppVersionMsg RESTful接口
@@ -107,4 +103,14 @@ public class AppVersionMsgController extends BaseRESTfulController {
     	}
       return success();
     }
+
+
+    /*@ApiOperation(value="创建", notes="根据AppVersionMsg对象创建")
+    @PostMapping(value = "/addModel")
+    public RESTfulResult addModel(@RequestBody HashMap params){
+        RESTfulResult rm = failed();
+
+        rm = appVersionMsgService.addModel(params);
+        return success(rm);
+    }*/
 }

+ 0 - 1
src/main/java/com/steerinfo/baseinfo/appversionmsg/mapper/AppVersionMsgMapper.java

@@ -2,7 +2,6 @@ package com.steerinfo.baseinfo.appversionmsg.mapper;
 
 import com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg;
 import com.steerinfo.framework.mapper.IBaseMapper;
-import java.math.*;
 import org.apache.ibatis.annotations.Mapper;
 
 @Mapper

+ 512 - 72
src/main/java/com/steerinfo/baseinfo/appversionmsg/mapper/AppVersionMsgMapper.xml

@@ -3,39 +3,114 @@
 <mapper namespace="com.steerinfo.baseinfo.appversionmsg.mapper.AppVersionMsgMapper">
   <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg">
     <id column="VERSION_ID" jdbcType="VARCHAR" property="versionId" />
-    <result column="APP_NAME" jdbcType="VARCHAR" property="appName" />
-    <result column="RESOURCE_URL" jdbcType="VARCHAR" property="resourceUrl" />
+    <result column="TEANT_ID" jdbcType="VARCHAR" property="teantId" />
+    <result column="PROGRAM_ID" jdbcType="VARCHAR" property="programId" />
+    <result column="PROGRAM_NAME" jdbcType="VARCHAR" property="programName" />
     <result column="VERSION_NUM" jdbcType="VARCHAR" property="versionNum" />
-    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="PROGRAM_TYPE" jdbcType="VARCHAR" property="programType" />
+    <result column="VERSION_UPDATE_CONTENT" jdbcType="VARCHAR" property="versionUpdateContent" />
+    <result column="PUBLISH_DATE" jdbcType="TIMESTAMP" property="publishDate" />
+    <result column="PUBLISH_USER_ID" jdbcType="VARCHAR" property="publishUserId" />
+    <result column="PUBLISH_USER_NAME" jdbcType="VARCHAR" property="publishUserName" />
+    <result column="PUBLISH_IP" jdbcType="VARCHAR" property="publishIp" />
+    <result column="PUBLISH_TO_URL" jdbcType="VARCHAR" property="publishToUrl" />
+    <result column="DOWNLOAD_FROM_URL" jdbcType="VARCHAR" property="downloadFromUrl" />
+    <result column="IS_MUST_DOWNLOAD_TAG" jdbcType="VARCHAR" property="isMustDownloadTag" />
+    <result column="REMARK" jdbcType="VARCHAR" property="remark" />
+    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
+    <result column="CREATE_ID" jdbcType="VARCHAR" property="createId" />
+    <result column="CREATE_NAME" jdbcType="VARCHAR" property="createName" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="UPDATE_ID" jdbcType="VARCHAR" property="updateId" />
+    <result column="UPDATE_NAME" jdbcType="VARCHAR" property="updateName" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
   </resultMap>
   <sql id="columns">
-    VERSION_ID, APP_NAME, RESOURCE_URL, VERSION_NUM, MEMO
+    VERSION_ID, TEANT_ID, PROGRAM_ID, PROGRAM_NAME, VERSION_NUM, PROGRAM_TYPE, VERSION_UPDATE_CONTENT, 
+    PUBLISH_DATE, PUBLISH_USER_ID, PUBLISH_USER_NAME, PUBLISH_IP, PUBLISH_TO_URL, DOWNLOAD_FROM_URL, 
+    IS_MUST_DOWNLOAD_TAG, REMARK, VALUE_FLAG, CREATE_ID, CREATE_NAME, CREATE_TIME, UPDATE_ID, 
+    UPDATE_NAME, UPDATE_TIME
   </sql>
   <sql id="columns_alias">
-    t.VERSION_ID, t.APP_NAME, t.RESOURCE_URL, t.VERSION_NUM, t.MEMO
+    t.VERSION_ID, t.TEANT_ID, t.PROGRAM_ID, t.PROGRAM_NAME, t.VERSION_NUM, t.PROGRAM_TYPE, 
+    t.VERSION_UPDATE_CONTENT, t.PUBLISH_DATE, t.PUBLISH_USER_ID, t.PUBLISH_USER_NAME, 
+    t.PUBLISH_IP, t.PUBLISH_TO_URL, t.DOWNLOAD_FROM_URL, t.IS_MUST_DOWNLOAD_TAG, t.REMARK, 
+    t.VALUE_FLAG, t.CREATE_ID, t.CREATE_NAME, t.CREATE_TIME, t.UPDATE_ID, t.UPDATE_NAME, 
+    t.UPDATE_TIME
   </sql>
   <sql id="select">
-    SELECT <include refid="columns"/> FROM APP_VERSION_MSG
+    SELECT <include refid="columns" /> FROM APP_VERSION_MSG
   </sql>
   <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM APP_VERSION_MSG t
+    SELECT <include refid="columns_alias" /> FROM APP_VERSION_MSG t
   </sql>
   <sql id="where">
     <where> 
       <if test="versionId != null and versionId != ''">
         and VERSION_ID = #{versionId}
       </if>
-      <if test="appName != null and appName != ''">
-        and APP_NAME = #{appName}
+      <if test="teantId != null and teantId != ''">
+        and TEANT_ID = #{teantId}
       </if>
-      <if test="resourceUrl != null and resourceUrl != ''">
-        and RESOURCE_URL = #{resourceUrl}
+      <if test="programId != null and programId != ''">
+        and PROGRAM_ID = #{programId}
+      </if>
+      <if test="programName != null and programName != ''">
+        and PROGRAM_NAME = #{programName}
       </if>
       <if test="versionNum != null and versionNum != ''">
         and VERSION_NUM = #{versionNum}
       </if>
-      <if test="memo != null and memo != ''">
-        and MEMO = #{memo}
+      <if test="programType != null and programType != ''">
+        and PROGRAM_TYPE = #{programType}
+      </if>
+      <if test="versionUpdateContent != null and versionUpdateContent != ''">
+        and VERSION_UPDATE_CONTENT = #{versionUpdateContent}
+      </if>
+      <if test="publishDate != null">
+        and TO_CHAR(PUBLISH_DATE,'yyyy-MM-dd') = #{publishDate}
+      </if>
+      <if test="publishUserId != null and publishUserId != ''">
+        and PUBLISH_USER_ID = #{publishUserId}
+      </if>
+      <if test="publishUserName != null and publishUserName != ''">
+        and PUBLISH_USER_NAME = #{publishUserName}
+      </if>
+      <if test="publishIp != null and publishIp != ''">
+        and PUBLISH_IP = #{publishIp}
+      </if>
+      <if test="publishToUrl != null and publishToUrl != ''">
+        and PUBLISH_TO_URL = #{publishToUrl}
+      </if>
+      <if test="downloadFromUrl != null and downloadFromUrl != ''">
+        and DOWNLOAD_FROM_URL = #{downloadFromUrl}
+      </if>
+      <if test="isMustDownloadTag != null and isMustDownloadTag != ''">
+        and IS_MUST_DOWNLOAD_TAG = #{isMustDownloadTag}
+      </if>
+      <if test="remark != null and remark != ''">
+        and REMARK = #{remark}
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG = #{valueFlag}
+      </if>
+      <if test="createId != null and createId != ''">
+        and CREATE_ID = #{createId}
+      </if>
+      <if test="createName != null and createName != ''">
+        and CREATE_NAME = #{createName}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateId != null and updateId != ''">
+        and UPDATE_ID = #{updateId}
+      </if>
+      <if test="updateName != null and updateName != ''">
+        and UPDATE_NAME = #{updateName}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
       </if>
     </where>
   </sql>
@@ -44,17 +119,68 @@
       <if test="versionId != null and versionId != ''">
         and VERSION_ID LIKE '%${versionId}%'
       </if>
-      <if test="appName != null and appName != ''">
-        and APP_NAME LIKE '%${appName}%'
+      <if test="teantId != null and teantId != ''">
+        and TEANT_ID LIKE '%${teantId}%'
       </if>
-      <if test="resourceUrl != null and resourceUrl != ''">
-        and RESOURCE_URL LIKE '%${resourceUrl}%'
+      <if test="programId != null and programId != ''">
+        and PROGRAM_ID LIKE '%${programId}%'
+      </if>
+      <if test="programName != null and programName != ''">
+        and PROGRAM_NAME LIKE '%${programName}%'
       </if>
       <if test="versionNum != null and versionNum != ''">
         and VERSION_NUM LIKE '%${versionNum}%'
       </if>
-      <if test="memo != null and memo != ''">
-        and MEMO LIKE '%${memo}%'
+      <if test="programType != null and programType != ''">
+        and PROGRAM_TYPE LIKE '%${programType}%'
+      </if>
+      <if test="versionUpdateContent != null and versionUpdateContent != ''">
+        and VERSION_UPDATE_CONTENT LIKE '%${versionUpdateContent}%'
+      </if>
+      <if test="publishDate != null">
+        and TO_CHAR(PUBLISH_DATE,'yyyy-MM-dd') = #{publishDate}
+      </if>
+      <if test="publishUserId != null and publishUserId != ''">
+        and PUBLISH_USER_ID LIKE '%${publishUserId}%'
+      </if>
+      <if test="publishUserName != null and publishUserName != ''">
+        and PUBLISH_USER_NAME LIKE '%${publishUserName}%'
+      </if>
+      <if test="publishIp != null and publishIp != ''">
+        and PUBLISH_IP LIKE '%${publishIp}%'
+      </if>
+      <if test="publishToUrl != null and publishToUrl != ''">
+        and PUBLISH_TO_URL LIKE '%${publishToUrl}%'
+      </if>
+      <if test="downloadFromUrl != null and downloadFromUrl != ''">
+        and DOWNLOAD_FROM_URL LIKE '%${downloadFromUrl}%'
+      </if>
+      <if test="isMustDownloadTag != null and isMustDownloadTag != ''">
+        and IS_MUST_DOWNLOAD_TAG LIKE '%${isMustDownloadTag}%'
+      </if>
+      <if test="remark != null and remark != ''">
+        and REMARK LIKE '%${remark}%'
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG LIKE '%${valueFlag}%'
+      </if>
+      <if test="createId != null and createId != ''">
+        and CREATE_ID LIKE '%${createId}%'
+      </if>
+      <if test="createName != null and createName != ''">
+        and CREATE_NAME LIKE '%${createName}%'
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="updateId != null and updateId != ''">
+        and UPDATE_ID LIKE '%${updateId}%'
+      </if>
+      <if test="updateName != null and updateName != ''">
+        and UPDATE_NAME LIKE '%${updateName}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
       </if>
     </where>
   </sql>
@@ -65,24 +191,87 @@
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from APP_VERSION_MSG
     where 1!=1 
-      <if test="appName != null and appName != ''">
-        or APP_NAME = #{appName}
+      <if test="teantId != null and teantId != ''">
+        or TEANT_ID = #{teantId}
       </if>
-      <if test="resourceUrl != null and resourceUrl != ''">
-        or RESOURCE_URL = #{resourceUrl}
+      <if test="programId != null and programId != ''">
+        or PROGRAM_ID = #{programId}
+      </if>
+      <if test="programName != null and programName != ''">
+        or PROGRAM_NAME = #{programName}
       </if>
       <if test="versionNum != null and versionNum != ''">
         or VERSION_NUM = #{versionNum}
       </if>
-      <if test="memo != null and memo != ''">
-        or MEMO = #{memo}
+      <if test="programType != null and programType != ''">
+        or PROGRAM_TYPE = #{programType}
+      </if>
+      <if test="versionUpdateContent != null and versionUpdateContent != ''">
+        or VERSION_UPDATE_CONTENT = #{versionUpdateContent}
+      </if>
+      <if test="publishDate != null">
+        or TO_CHAR(PUBLISH_DATE,'yyyy-MM-dd') = '#{publishDate}'
+      </if>
+      <if test="publishUserId != null and publishUserId != ''">
+        or PUBLISH_USER_ID = #{publishUserId}
+      </if>
+      <if test="publishUserName != null and publishUserName != ''">
+        or PUBLISH_USER_NAME = #{publishUserName}
+      </if>
+      <if test="publishIp != null and publishIp != ''">
+        or PUBLISH_IP = #{publishIp}
+      </if>
+      <if test="publishToUrl != null and publishToUrl != ''">
+        or PUBLISH_TO_URL = #{publishToUrl}
+      </if>
+      <if test="downloadFromUrl != null and downloadFromUrl != ''">
+        or DOWNLOAD_FROM_URL = #{downloadFromUrl}
+      </if>
+      <if test="isMustDownloadTag != null and isMustDownloadTag != ''">
+        or IS_MUST_DOWNLOAD_TAG = #{isMustDownloadTag}
+      </if>
+      <if test="remark != null and remark != ''">
+        or REMARK = #{remark}
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        or VALUE_FLAG = #{valueFlag}
+      </if>
+      <if test="createId != null and createId != ''">
+        or CREATE_ID = #{createId}
+      </if>
+      <if test="createName != null and createName != ''">
+        or CREATE_NAME = #{createName}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="updateId != null and updateId != ''">
+        or UPDATE_ID = #{updateId}
+      </if>
+      <if test="updateName != null and updateName != ''">
+        or UPDATE_NAME = #{updateName}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
       </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg">
-    insert into APP_VERSION_MSG (VERSION_ID, APP_NAME, RESOURCE_URL, 
-      VERSION_NUM, MEMO)
-    values (#{versionId,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR}, #{resourceUrl,jdbcType=VARCHAR}, 
-      #{versionNum,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR})
+    insert into APP_VERSION_MSG (VERSION_ID, TEANT_ID, PROGRAM_ID, 
+      PROGRAM_NAME, VERSION_NUM, PROGRAM_TYPE, 
+      VERSION_UPDATE_CONTENT, PUBLISH_DATE, PUBLISH_USER_ID, 
+      PUBLISH_USER_NAME, PUBLISH_IP, PUBLISH_TO_URL, 
+      DOWNLOAD_FROM_URL, IS_MUST_DOWNLOAD_TAG, REMARK, 
+      VALUE_FLAG, CREATE_ID, CREATE_NAME, 
+      CREATE_TIME, UPDATE_ID, UPDATE_NAME, 
+      UPDATE_TIME)
+    values (#{versionId,jdbcType=VARCHAR}, #{teantId,jdbcType=VARCHAR}, #{programId,jdbcType=VARCHAR}, 
+      #{programName,jdbcType=VARCHAR}, #{versionNum,jdbcType=VARCHAR}, #{programType,jdbcType=VARCHAR}, 
+      #{versionUpdateContent,jdbcType=VARCHAR}, #{publishDate,jdbcType=TIMESTAMP}, #{publishUserId,jdbcType=VARCHAR}, 
+      #{publishUserName,jdbcType=VARCHAR}, #{publishIp,jdbcType=VARCHAR}, #{publishToUrl,jdbcType=VARCHAR}, 
+      #{downloadFromUrl,jdbcType=VARCHAR}, #{isMustDownloadTag,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, 
+      #{valueFlag,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createName,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateId,jdbcType=VARCHAR}, #{updateName,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg">
     insert into APP_VERSION_MSG
@@ -90,123 +279,374 @@
       <if test="versionId != null">
         VERSION_ID,
       </if>
-      <if test="appName != null">
-        APP_NAME,
+      <if test="teantId != null">
+        TEANT_ID,
       </if>
-      <if test="resourceUrl != null">
-        RESOURCE_URL,
+      <if test="programId != null">
+        PROGRAM_ID,
+      </if>
+      <if test="programName != null">
+        PROGRAM_NAME,
       </if>
       <if test="versionNum != null">
         VERSION_NUM,
       </if>
-      <if test="memo != null">
-        MEMO,
+      <if test="programType != null">
+        PROGRAM_TYPE,
+      </if>
+      <if test="versionUpdateContent != null">
+        VERSION_UPDATE_CONTENT,
+      </if>
+      <if test="publishDate != null">
+        PUBLISH_DATE,
+      </if>
+      <if test="publishUserId != null">
+        PUBLISH_USER_ID,
+      </if>
+      <if test="publishUserName != null">
+        PUBLISH_USER_NAME,
+      </if>
+      <if test="publishIp != null">
+        PUBLISH_IP,
+      </if>
+      <if test="publishToUrl != null">
+        PUBLISH_TO_URL,
+      </if>
+      <if test="downloadFromUrl != null">
+        DOWNLOAD_FROM_URL,
+      </if>
+      <if test="isMustDownloadTag != null">
+        IS_MUST_DOWNLOAD_TAG,
+      </if>
+      <if test="remark != null">
+        REMARK,
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG,
+      </if>
+      <if test="createId != null">
+        CREATE_ID,
+      </if>
+      <if test="createName != null">
+        CREATE_NAME,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="updateId != null">
+        UPDATE_ID,
+      </if>
+      <if test="updateName != null">
+        UPDATE_NAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="versionId != null">
         #{versionId,jdbcType=VARCHAR},
       </if>
-      <if test="appName != null">
-        #{appName,jdbcType=VARCHAR},
+      <if test="teantId != null">
+        #{teantId,jdbcType=VARCHAR},
       </if>
-      <if test="resourceUrl != null">
-        #{resourceUrl,jdbcType=VARCHAR},
+      <if test="programId != null">
+        #{programId,jdbcType=VARCHAR},
+      </if>
+      <if test="programName != null">
+        #{programName,jdbcType=VARCHAR},
       </if>
       <if test="versionNum != null">
         #{versionNum,jdbcType=VARCHAR},
       </if>
-      <if test="memo != null">
-        #{memo,jdbcType=VARCHAR},
+      <if test="programType != null">
+        #{programType,jdbcType=VARCHAR},
+      </if>
+      <if test="versionUpdateContent != null">
+        #{versionUpdateContent,jdbcType=VARCHAR},
+      </if>
+      <if test="publishDate != null">
+        #{publishDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="publishUserId != null">
+        #{publishUserId,jdbcType=VARCHAR},
+      </if>
+      <if test="publishUserName != null">
+        #{publishUserName,jdbcType=VARCHAR},
+      </if>
+      <if test="publishIp != null">
+        #{publishIp,jdbcType=VARCHAR},
+      </if>
+      <if test="publishToUrl != null">
+        #{publishToUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="downloadFromUrl != null">
+        #{downloadFromUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="isMustDownloadTag != null">
+        #{isMustDownloadTag,jdbcType=VARCHAR},
+      </if>
+      <if test="remark != null">
+        #{remark,jdbcType=VARCHAR},
+      </if>
+      <if test="valueFlag != null">
+        #{valueFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="createId != null">
+        #{createId,jdbcType=VARCHAR},
+      </if>
+      <if test="createName != null">
+        #{createName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateId != null">
+        #{updateId,jdbcType=VARCHAR},
+      </if>
+      <if test="updateName != null">
+        #{updateName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
       </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg">
     update APP_VERSION_MSG
-    set APP_NAME = #{appName,jdbcType=VARCHAR},
-      RESOURCE_URL = #{resourceUrl,jdbcType=VARCHAR},
+    set TEANT_ID = #{teantId,jdbcType=VARCHAR},
+      PROGRAM_ID = #{programId,jdbcType=VARCHAR},
+      PROGRAM_NAME = #{programName,jdbcType=VARCHAR},
       VERSION_NUM = #{versionNum,jdbcType=VARCHAR},
-      MEMO = #{memo,jdbcType=VARCHAR}
+      PROGRAM_TYPE = #{programType,jdbcType=VARCHAR},
+      VERSION_UPDATE_CONTENT = #{versionUpdateContent,jdbcType=VARCHAR},
+      PUBLISH_DATE = #{publishDate,jdbcType=TIMESTAMP},
+      PUBLISH_USER_ID = #{publishUserId,jdbcType=VARCHAR},
+      PUBLISH_USER_NAME = #{publishUserName,jdbcType=VARCHAR},
+      PUBLISH_IP = #{publishIp,jdbcType=VARCHAR},
+      PUBLISH_TO_URL = #{publishToUrl,jdbcType=VARCHAR},
+      DOWNLOAD_FROM_URL = #{downloadFromUrl,jdbcType=VARCHAR},
+      IS_MUST_DOWNLOAD_TAG = #{isMustDownloadTag,jdbcType=VARCHAR},
+      REMARK = #{remark,jdbcType=VARCHAR},
+      VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
+      CREATE_ID = #{createId,jdbcType=VARCHAR},
+      CREATE_NAME = #{createName,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_ID = #{updateId,jdbcType=VARCHAR},
+      UPDATE_NAME = #{updateName,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
     where VERSION_ID = #{versionId,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg">
     update APP_VERSION_MSG
     <set>
-      <if test="appName != null">
-        APP_NAME = #{appName,jdbcType=VARCHAR},
+      <if test="teantId != null">
+        TEANT_ID = #{teantId,jdbcType=VARCHAR},
       </if>
-      <if test="resourceUrl != null">
-        RESOURCE_URL = #{resourceUrl,jdbcType=VARCHAR},
+      <if test="programId != null">
+        PROGRAM_ID = #{programId,jdbcType=VARCHAR},
+      </if>
+      <if test="programName != null">
+        PROGRAM_NAME = #{programName,jdbcType=VARCHAR},
       </if>
       <if test="versionNum != null">
         VERSION_NUM = #{versionNum,jdbcType=VARCHAR},
       </if>
-      <if test="memo != null">
-        MEMO = #{memo,jdbcType=VARCHAR},
+      <if test="programType != null">
+        PROGRAM_TYPE = #{programType,jdbcType=VARCHAR},
+      </if>
+      <if test="versionUpdateContent != null">
+        VERSION_UPDATE_CONTENT = #{versionUpdateContent,jdbcType=VARCHAR},
+      </if>
+      <if test="publishDate != null">
+        PUBLISH_DATE = #{publishDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="publishUserId != null">
+        PUBLISH_USER_ID = #{publishUserId,jdbcType=VARCHAR},
+      </if>
+      <if test="publishUserName != null">
+        PUBLISH_USER_NAME = #{publishUserName,jdbcType=VARCHAR},
+      </if>
+      <if test="publishIp != null">
+        PUBLISH_IP = #{publishIp,jdbcType=VARCHAR},
+      </if>
+      <if test="publishToUrl != null">
+        PUBLISH_TO_URL = #{publishToUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="downloadFromUrl != null">
+        DOWNLOAD_FROM_URL = #{downloadFromUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="isMustDownloadTag != null">
+        IS_MUST_DOWNLOAD_TAG = #{isMustDownloadTag,jdbcType=VARCHAR},
+      </if>
+      <if test="remark != null">
+        REMARK = #{remark,jdbcType=VARCHAR},
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="createId != null">
+        CREATE_ID = #{createId,jdbcType=VARCHAR},
+      </if>
+      <if test="createName != null">
+        CREATE_NAME = #{createName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateId != null">
+        UPDATE_ID = #{updateId,jdbcType=VARCHAR},
+      </if>
+      <if test="updateName != null">
+        UPDATE_NAME = #{updateName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
       </if>
     </set>
     where VERSION_ID = #{versionId,jdbcType=VARCHAR}
   </update>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    <include refid="select"/>
+    <include refid="select" />
     where VERSION_ID = #{versionId,jdbcType=VARCHAR}
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
+    <include refid="select" />
+    <include refid="where" />
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
+    <include refid="select" />
+    <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
     insert into APP_VERSION_MSG 
       (VERSION_ID, 
-      APP_NAME, RESOURCE_URL, VERSION_NUM, 
-      MEMO)
+      TEANT_ID, PROGRAM_ID, PROGRAM_NAME, 
+      VERSION_NUM, PROGRAM_TYPE, VERSION_UPDATE_CONTENT, 
+      PUBLISH_DATE, PUBLISH_USER_ID, 
+      PUBLISH_USER_NAME, PUBLISH_IP, PUBLISH_TO_URL, 
+      DOWNLOAD_FROM_URL, IS_MUST_DOWNLOAD_TAG, 
+      REMARK, VALUE_FLAG, CREATE_ID, 
+      CREATE_NAME, CREATE_TIME, UPDATE_ID, 
+      UPDATE_NAME, UPDATE_TIME)
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.versionId,jdbcType=VARCHAR}, 
-      #{item.appName,jdbcType=VARCHAR}, #{item.resourceUrl,jdbcType=VARCHAR}, #{item.versionNum,jdbcType=VARCHAR}, 
-      #{item.memo,jdbcType=VARCHAR} from dual  
+      #{item.teantId,jdbcType=VARCHAR}, #{item.programId,jdbcType=VARCHAR}, #{item.programName,jdbcType=VARCHAR}, 
+      #{item.versionNum,jdbcType=VARCHAR}, #{item.programType,jdbcType=VARCHAR}, #{item.versionUpdateContent,jdbcType=VARCHAR}, 
+      #{item.publishDate,jdbcType=TIMESTAMP}, #{item.publishUserId,jdbcType=VARCHAR}, 
+      #{item.publishUserName,jdbcType=VARCHAR}, #{item.publishIp,jdbcType=VARCHAR}, #{item.publishToUrl,jdbcType=VARCHAR}, 
+      #{item.downloadFromUrl,jdbcType=VARCHAR}, #{item.isMustDownloadTag,jdbcType=VARCHAR}, 
+      #{item.remark,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR}, #{item.createId,jdbcType=VARCHAR}, 
+      #{item.createName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateId,jdbcType=VARCHAR}, 
+      #{item.updateName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP} from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
      update APP_VERSION_MSG
      set
        VERSION_ID=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
           when #{item.versionId,jdbcType=VARCHAR} then #{item.versionId,jdbcType=VARCHAR}
        </foreach>
-       ,APP_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
-          when #{item.versionId,jdbcType=VARCHAR} then #{item.appName,jdbcType=VARCHAR}
+       ,TEANT_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.teantId,jdbcType=VARCHAR}
        </foreach>
-       ,RESOURCE_URL=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
-          when #{item.versionId,jdbcType=VARCHAR} then #{item.resourceUrl,jdbcType=VARCHAR}
+       ,PROGRAM_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.programId,jdbcType=VARCHAR}
+       </foreach>
+       ,PROGRAM_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.programName,jdbcType=VARCHAR}
        </foreach>
        ,VERSION_NUM=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
           when #{item.versionId,jdbcType=VARCHAR} then #{item.versionNum,jdbcType=VARCHAR}
        </foreach>
-       ,MEMO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
-          when #{item.versionId,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
+       ,PROGRAM_TYPE=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.programType,jdbcType=VARCHAR}
+       </foreach>
+       ,VERSION_UPDATE_CONTENT=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.versionUpdateContent,jdbcType=VARCHAR}
+       </foreach>
+       ,PUBLISH_DATE=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.publishDate,jdbcType=TIMESTAMP}
+       </foreach>
+       ,PUBLISH_USER_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.publishUserId,jdbcType=VARCHAR}
+       </foreach>
+       ,PUBLISH_USER_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.publishUserName,jdbcType=VARCHAR}
+       </foreach>
+       ,PUBLISH_IP=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.publishIp,jdbcType=VARCHAR}
+       </foreach>
+       ,PUBLISH_TO_URL=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.publishToUrl,jdbcType=VARCHAR}
+       </foreach>
+       ,DOWNLOAD_FROM_URL=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.downloadFromUrl,jdbcType=VARCHAR}
+       </foreach>
+       ,IS_MUST_DOWNLOAD_TAG=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.isMustDownloadTag,jdbcType=VARCHAR}
+       </foreach>
+       ,REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.remark,jdbcType=VARCHAR}
+       </foreach>
+       ,VALUE_FLAG=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.createId,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.createName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.updateId,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.updateName,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+          when #{item.versionId,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
      where VERSION_ID in 
-     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.versionId,jdbcType=VARCHAR}
      </foreach> 
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from APP_VERSION_MSG
     where VERSION_ID in 
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   
+  
 </mapper>

+ 282 - 25
src/main/java/com/steerinfo/baseinfo/appversionmsg/model/AppVersionMsg.java

@@ -4,6 +4,8 @@ import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
+import java.util.Date;
+
 @ApiModel(value="app版本信息表")
 public class AppVersionMsg implements IBasePO<String> {
     /**
@@ -13,28 +15,130 @@ public class AppVersionMsg implements IBasePO<String> {
     private String versionId;
 
     /**
-     * app名称(APP_NAME,VARCHAR,30)
+     * 租户ID(TEANT_ID,VARCHAR,30)
+     */
+    @ApiModelProperty(value="租户ID",required=false)
+    private String teantId;
+
+    /**
+     * 程序ID(PROGRAM_ID,VARCHAR,30)
      */
-    @ApiModelProperty(value="app名称",required=false)
-    private String appName;
+    @ApiModelProperty(value="程序ID",required=false)
+    private String programId;
 
     /**
-     * app资源路径(RESOURCE_URL,VARCHAR,30)
+     * 程序名称(PROGRAM_NAME,VARCHAR,30)
      */
-    @ApiModelProperty(value="app资源路径",required=false)
-    private String resourceUrl;
+    @ApiModelProperty(value="程序名称",required=false)
+    private String programName;
 
     /**
-     * app版本号(VERSION_NUM,VARCHAR,20)
+     * 程序版本号(VERSION_NUM,VARCHAR,30)
      */
-    @ApiModelProperty(value="app版本号",required=false)
+    @ApiModelProperty(value="程序版本号",required=false)
     private String versionNum;
 
     /**
-     * 备注(MEMO,VARCHAR,100)
+     * 程序类型(PROGRAM_TYPE,VARCHAR,50)
+     */
+    @ApiModelProperty(value="程序类型",required=false)
+    private String programType;
+
+    /**
+     * 更新内容(VERSION_UPDATE_CONTENT,VARCHAR,500)
+     */
+    @ApiModelProperty(value="更新内容",required=false)
+    private String versionUpdateContent;
+
+    /**
+     * 发布时间(PUBLISH_DATE,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="发布时间",required=false)
+    private Date publishDate;
+
+    /**
+     * 发布用户(PUBLISH_USER_ID,VARCHAR,30)
+     */
+    @ApiModelProperty(value="发布用户",required=false)
+    private String publishUserId;
+
+    /**
+     * 发布人(PUBLISH_USER_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="发布人",required=false)
+    private String publishUserName;
+
+    /**
+     * 发布人IP(PUBLISH_IP,VARCHAR,30)
+     */
+    @ApiModelProperty(value="发布人IP",required=false)
+    private String publishIp;
+
+    /**
+     * 发布到地址(PUBLISH_TO_URL,VARCHAR,200)
+     */
+    @ApiModelProperty(value="发布到地址",required=false)
+    private String publishToUrl;
+
+    /**
+     * 下载地址(DOWNLOAD_FROM_URL,VARCHAR,200)
+     */
+    @ApiModelProperty(value="下载地址",required=false)
+    private String downloadFromUrl;
+
+    /**
+     * 强制更新标记(IS_MUST_DOWNLOAD_TAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="强制更新标记",required=false)
+    private String isMustDownloadTag;
+
+    /**
+     * 备注(REMARK,VARCHAR,200)
      */
     @ApiModelProperty(value="备注",required=false)
-    private String memo;
+    private String remark;
+
+    /**
+     * 有效标记(0:正常 1:作废)(VALUE_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="有效标记(0:正常 1:作废)",required=false)
+    private String valueFlag;
+
+    /**
+     * 创建人ID(CREATE_ID,VARCHAR,30)
+     */
+    @ApiModelProperty(value="创建人ID",required=false)
+    private String createId;
+
+    /**
+     * 创建人(CREATE_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="创建人",required=false)
+    private String createName;
+
+    /**
+     * 创建时间(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建时间",required=false)
+    private Date createTime;
+
+    /**
+     * 修改人ID(UPDATE_ID,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改人ID",required=false)
+    private String updateId;
+
+    /**
+     * 修改人(UPDATE_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改人",required=false)
+    private String updateName;
+
+    /**
+     * 修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间",required=false)
+    private Date updateTime;
 
     private static final long serialVersionUID = 1L;
 
@@ -56,20 +160,28 @@ public class AppVersionMsg implements IBasePO<String> {
         this.versionId = versionId == null ? null : versionId.trim();
     }
 
-    public String getAppName() {
-        return appName;
+    public String getTeantId() {
+        return teantId;
     }
 
-    public void setAppName(String appName) {
-        this.appName = appName == null ? null : appName.trim();
+    public void setTeantId(String teantId) {
+        this.teantId = teantId == null ? null : teantId.trim();
     }
 
-    public String getResourceUrl() {
-        return resourceUrl;
+    public String getProgramId() {
+        return programId;
     }
 
-    public void setResourceUrl(String resourceUrl) {
-        this.resourceUrl = resourceUrl == null ? null : resourceUrl.trim();
+    public void setProgramId(String programId) {
+        this.programId = programId == null ? null : programId.trim();
+    }
+
+    public String getProgramName() {
+        return programName;
+    }
+
+    public void setProgramName(String programName) {
+        this.programName = programName == null ? null : programName.trim();
     }
 
     public String getVersionNum() {
@@ -80,12 +192,140 @@ public class AppVersionMsg implements IBasePO<String> {
         this.versionNum = versionNum == null ? null : versionNum.trim();
     }
 
-    public String getMemo() {
-        return memo;
+    public String getProgramType() {
+        return programType;
+    }
+
+    public void setProgramType(String programType) {
+        this.programType = programType == null ? null : programType.trim();
+    }
+
+    public String getVersionUpdateContent() {
+        return versionUpdateContent;
+    }
+
+    public void setVersionUpdateContent(String versionUpdateContent) {
+        this.versionUpdateContent = versionUpdateContent == null ? null : versionUpdateContent.trim();
+    }
+
+    public Date getPublishDate() {
+        return publishDate;
+    }
+
+    public void setPublishDate(Date publishDate) {
+        this.publishDate = publishDate;
+    }
+
+    public String getPublishUserId() {
+        return publishUserId;
+    }
+
+    public void setPublishUserId(String publishUserId) {
+        this.publishUserId = publishUserId == null ? null : publishUserId.trim();
+    }
+
+    public String getPublishUserName() {
+        return publishUserName;
+    }
+
+    public void setPublishUserName(String publishUserName) {
+        this.publishUserName = publishUserName == null ? null : publishUserName.trim();
+    }
+
+    public String getPublishIp() {
+        return publishIp;
+    }
+
+    public void setPublishIp(String publishIp) {
+        this.publishIp = publishIp == null ? null : publishIp.trim();
+    }
+
+    public String getPublishToUrl() {
+        return publishToUrl;
+    }
+
+    public void setPublishToUrl(String publishToUrl) {
+        this.publishToUrl = publishToUrl == null ? null : publishToUrl.trim();
+    }
+
+    public String getDownloadFromUrl() {
+        return downloadFromUrl;
+    }
+
+    public void setDownloadFromUrl(String downloadFromUrl) {
+        this.downloadFromUrl = downloadFromUrl == null ? null : downloadFromUrl.trim();
+    }
+
+    public String getIsMustDownloadTag() {
+        return isMustDownloadTag;
+    }
+
+    public void setIsMustDownloadTag(String isMustDownloadTag) {
+        this.isMustDownloadTag = isMustDownloadTag == null ? null : isMustDownloadTag.trim();
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark == null ? null : remark.trim();
+    }
+
+    public String getValueFlag() {
+        return valueFlag;
+    }
+
+    public void setValueFlag(String valueFlag) {
+        this.valueFlag = valueFlag == null ? null : valueFlag.trim();
+    }
+
+    public String getCreateId() {
+        return createId;
+    }
+
+    public void setCreateId(String createId) {
+        this.createId = createId == null ? null : createId.trim();
+    }
+
+    public String getCreateName() {
+        return createName;
+    }
+
+    public void setCreateName(String createName) {
+        this.createName = createName == null ? null : createName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateId() {
+        return updateId;
+    }
+
+    public void setUpdateId(String updateId) {
+        this.updateId = updateId == null ? null : updateId.trim();
+    }
+
+    public String getUpdateName() {
+        return updateName;
+    }
+
+    public void setUpdateName(String updateName) {
+        this.updateName = updateName == null ? null : updateName.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
     }
 
-    public void setMemo(String memo) {
-        this.memo = memo == null ? null : memo.trim();
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
     }
 
     @Override
@@ -95,10 +335,27 @@ public class AppVersionMsg implements IBasePO<String> {
         sb.append(" [");
         sb.append("Hash = ").append(hashCode());
         sb.append(", versionId=").append(versionId);
-        sb.append(", appName=").append(appName);
-        sb.append(", resourceUrl=").append(resourceUrl);
+        sb.append(", teantId=").append(teantId);
+        sb.append(", programId=").append(programId);
+        sb.append(", programName=").append(programName);
         sb.append(", versionNum=").append(versionNum);
-        sb.append(", memo=").append(memo);
+        sb.append(", programType=").append(programType);
+        sb.append(", versionUpdateContent=").append(versionUpdateContent);
+        sb.append(", publishDate=").append(publishDate);
+        sb.append(", publishUserId=").append(publishUserId);
+        sb.append(", publishUserName=").append(publishUserName);
+        sb.append(", publishIp=").append(publishIp);
+        sb.append(", publishToUrl=").append(publishToUrl);
+        sb.append(", downloadFromUrl=").append(downloadFromUrl);
+        sb.append(", isMustDownloadTag=").append(isMustDownloadTag);
+        sb.append(", remark=").append(remark);
+        sb.append(", valueFlag=").append(valueFlag);
+        sb.append(", createId=").append(createId);
+        sb.append(", createName=").append(createName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateId=").append(updateId);
+        sb.append(", updateName=").append(updateName);
+        sb.append(", updateTime=").append(updateTime);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 7 - 5
src/main/java/com/steerinfo/baseinfo/appversionmsg/service/IAppVersionMsgService.java

@@ -1,17 +1,18 @@
 package com.steerinfo.baseinfo.appversionmsg.service;
 
-import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg;
-import java.util.Date;
-import java.math.BigDecimal;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.util.HashMap;
 
 /**
  * AppVersionMsg服务接口:
  * @author generator
- * @version 1.0-SNAPSHORT 2022-01-22 09:58
+ * @version 1.0-SNAPSHORT 2022-04-09 11:53
  * 类描述
  * 修订历史:
- * 日期:2022-01-22
+ * 日期:2022-04-09
  * 作者:generator
  * 参考:
  * 描述:AppVersionMsg服务接口
@@ -19,5 +20,6 @@ import java.math.BigDecimal;
  * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  */
 public interface IAppVersionMsgService extends IBaseService<AppVersionMsg, String>{
+    /*RESTfulResult addModel(HashMap<String, Object> params);*/
 
 }

+ 37 - 7
src/main/java/com/steerinfo/baseinfo/appversionmsg/service/impl/AppVersionMsgServiceImpl.java

@@ -1,22 +1,26 @@
 package com.steerinfo.baseinfo.appversionmsg.service.impl;
 
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
-import com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg;
 import com.steerinfo.baseinfo.appversionmsg.mapper.AppVersionMsgMapper;
+import com.steerinfo.baseinfo.appversionmsg.model.AppVersionMsg;
 import com.steerinfo.baseinfo.appversionmsg.service.IAppVersionMsgService;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.framework.user.UserPayload;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
 import java.util.Date;
-import java.math.BigDecimal;
+import java.util.HashMap;
 
 /**
  * AppVersionMsg服务实现:
  * @author generator
- * @version 1.0-SNAPSHORT 2022-01-22 09:58
+ * @version 1.0-SNAPSHORT 2022-04-09 11:53
  * 类描述
  * 修订历史:
- * 日期:2022-01-22
+ * 日期:2022-04-09
  * 作者:generator
  * 参考:
  * 描述:AppVersionMsg服务实现
@@ -26,11 +30,37 @@ import java.math.BigDecimal;
 @Service(value = "appVersionMsgService")
 public class AppVersionMsgServiceImpl extends BaseServiceImpl<AppVersionMsg, String> implements IAppVersionMsgService {
 
-    @Autowired
+    @Resource
     private AppVersionMsgMapper appVersionMsgMapper;
 
     @Override
     protected IBaseMapper<AppVersionMsg, String> getMapper() {
         return appVersionMsgMapper;
     }
+
+    /*@Override
+    public RESTfulResult addModel(HashMap<String, Object> params) {
+        RESTfulResult rm = new RESTfulResult();
+
+        AppVersionMsg model = new AppVersionMsg();
+        model.setVersionId(model.getId());
+        model.setValueFlag("0");
+        //获取用户ID和用户名
+        UserPayload payload = UserPayload.getCurrUser();
+        String userId = payload.getId();
+        String userName = payload.getUserName();
+        model.setCreateId(userId);
+        model.setCreateName(userName);
+        model.setCreateTime(new Date());
+        int i = appVersionMsgMapper.insertSelective(model);
+        if(i >= 1) {
+            rm.setSucceed();
+            rm.setMessage("操作成功!!");
+            rm.setCode("200");
+            rm.setData(model);
+            return rm;
+        }else {
+            return null;
+        }
+    }*/
 }

+ 158 - 59
src/main/java/com/steerinfo/baseinfo/meterbasecar/controller/MeterBaseCarController.java

@@ -20,6 +20,7 @@ import com.steerinfo.baseinfo.meterbasecar.service.IMeterBaseCarService;
 import com.steerinfo.meterwork.except.MarkerMetException;
 import com.steerinfo.util.CommonPage;
 import com.steerinfo.util.SSOUtil;
+import io.micrometer.core.instrument.Meter;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -30,6 +31,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import java.util.*;
 import java.math.BigDecimal;
 
@@ -58,19 +60,19 @@ public class MeterBaseCarController extends BaseRESTfulController {
     @Autowired
     IMeterBaseDriverService meterBaseDriverService;
 
-    @Autowired
+    @Resource
     MeterBaseCarMapper meterBaseCarMapper;
 
-    @Autowired
+    @Resource
     MeterBaseDriverMapper meterBaseDriverMapper;
 
-    @Autowired
+    @Resource
     MeterBaseTravellingMerchantMapper meterBaseTravellingMerchantMapper;
 
-    @Autowired
+    @Resource
     AppVerificationCodeMapper appVerificationCodeMapper;
 
-    @Autowired
+    @Resource
     MeterBaseVerificationCodeMapper meterBaseVerificationCodeMapper;
 
     @ApiOperation(value = "获取列表", notes = "分页查询")
@@ -85,6 +87,18 @@ public class MeterBaseCarController extends BaseRESTfulController {
         return success(list);
     }
 
+    @ApiOperation(value = "获取列表", notes = "不分页查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbasecar:view")
+    @GetMapping(value = "/queryForNoPage")
+    public RESTfulResult list(@RequestParam HashMap parmas) {
+        List<MeterBaseCar> list = meterBaseCarService.queryForNoPage(parmas);
+        return success(list);
+    }
+
     @ApiOperation(value = "获取列表", notes = "分页模糊查询")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
@@ -202,12 +216,16 @@ public class MeterBaseCarController extends BaseRESTfulController {
                 HashMap queryCar = new HashMap();
                 queryCar.put("carNo", params.get("carNo").toString());
                 queryCar.put("validFlag", "0");
-                List<MeterBaseCar> queryList = meterBaseCarService.query(queryCar);
+                String carNo = params.get("carNo").toString();
+                //查询服役状态的车辆信息
+                List<MeterBaseCar> queryList01 = meterBaseCarService.query(queryCar);
+                //查询停役、删除状态的车辆信息
+                List<MeterBaseCar> queryList02 = meterBaseCarMapper.selectByMap(queryCar);
 
-                meterBaseDriverMapper.batchDeleteSelf(params.get("carNo").toString());
+                //meterBaseDriverMapper.batchDeleteSelf(params.get("carNo").toString());
 
-                // 车辆表已存在时,跳过
-                if (queryList.size() == 0) {
+                // 车辆表已存在车辆信息时,跳过
+                if (queryList01.size()+queryList02.size() == 0) {
                     // 新增车辆
                     MeterBaseCar car = new MeterBaseCar();
                     car.setCarNo(params.get("carNo").toString());
@@ -217,15 +235,23 @@ public class MeterBaseCarController extends BaseRESTfulController {
                     if (params.get("carCarrierWeight") != null) {
                         new BigDecimal(params.get("carCarrierWeight").toString());
                     }
-
                     // 将sso id写入车辆表,便于以后删除和重置密码
                     car.setSsoId(ssoMap.get("data").toString());
-
                     car.setCreateManNo("admin");
                     car.setCreateManName("admins");
                     car.setCreateTime(new Date());
 
                     meterBaseCarService.add(car);
+                }else if(queryList02.size() >= 1){
+                    for (MeterBaseCar model: queryList02) {
+                        HashMap map = new HashMap();
+                        queryCar.put("carId",model.getCarNo());
+                        queryCar.put("pkNo", model.getPkNo());
+                        //停役或者删除状态的车辆信息更新为服役状态
+                        meterBaseCarMapper.updateValidFlagById(map);
+                        //停役或者删除状态的司机信息更新为服役状态
+                        meterBaseDriverMapper.updateValidFlagByCarId(map);
+                    }
                 }
                 // 拆分司机list,新增司机表
                 List<MeterBaseDriver> driverList = JSONObject.parseArray(params.get("driverList").toString(), MeterBaseDriver.class);
@@ -233,7 +259,8 @@ public class MeterBaseCarController extends BaseRESTfulController {
                 for (MeterBaseDriver driver : driverList) {
                     // 检查司机是否存在
                     HashMap query = new HashMap();
-                    query.put("carNo", params.get("carNo").toString());
+                    query.put("carId", params.get("carNo").toString());
+                    query.put("driverName", driver.getDriverName());
                     query.put("telNum", driver.getTelNum());
                     query.put("validFlag", "0");
 
@@ -245,15 +272,25 @@ public class MeterBaseCarController extends BaseRESTfulController {
 //                        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
 //                        String no = meterBaseDriverMapper.getNewID(sdf.format(new Date()));
 //                        driver.setId(sdf.format(new Date()) + no);
-                        driver.setId(params.get("carNo").toString() + driver.getTelNum());
+                        String pkNO = params.get("carNo").toString() + driver.getTelNum();
+                        driver.setId(pkNO);
                         driver.setCarId(params.get("carNo").toString());
+                        driver.setDriverName(driver.getDriverName());
+                        driver.setTelNum(driver.getTelNum());
                         driver.setValidFlag("0");
-
                         driver.setCreateManNo("admin");
                         driver.setCreateManName("admins");
                         driver.setCreateTime(new Date());
 
-                        meterBaseDriverService.add(driver);
+                        MeterBaseDriver list1 = meterBaseDriverMapper.selectByPrimaryKey(pkNO);
+                        if(list1 == null){
+                            meterBaseDriverService.add(driver);
+                        }
+                        else {
+                            list1.setValidFlag("0");
+                            meterBaseDriverMapper.updateByPrimaryKeySelective(list1);
+                        }
+
                     }
 
                     if (com.steerinfo.util.StringUtils.isNotEmpty(msg)) {
@@ -482,47 +519,56 @@ public class MeterBaseCarController extends BaseRESTfulController {
                 rm.setMessage("验证码不能为空!!");
                 return rm;
             } else {
-                //通过手机获取验证码列表
-                AppVerificationCode modelTemp =  appVerificationCodeMapper.selectByPhone(telNum);
-                if(modelTemp!=null){
-                    //当前时间是否在过期时间之内
-                    Date date = new Date();
-                    //验证码是否过期
-                    int flag = date.compareTo(modelTemp.getExpirationTime());
-                    if(flag > 0 || modelTemp.getValueFlag().equals("0")){
-                        rm.setMessage("验证码已过期,请重新发送验证码!!");
-                        modelTemp.setValueFlag("0");
-                        appVerificationCodeMapper.updateByPrimaryKey(modelTemp);
-                        return rm;
-                    }
-                    //验证码没过期且相等
-                    if(modelTemp.getCode().equals(passCode) && modelTemp.getValueFlag().equals("1")){
-                        modelTemp.setValueFlag("0");
-                        appVerificationCodeMapper.updateByPrimaryKey(modelTemp);
-                        // 判断车号,司机手机号是否存在
-                        List<MeterBaseDriver> list = meterBaseDriverService.query(params);
-                        if (list.size() >= 1) {
-                            // 获取车辆SSO ID
-                            HashMap queryMap = new HashMap();
-                            queryMap.put("carNo", params.get("carNo").toString());
-
-                            MeterBaseCar car = meterBaseCarService.getByParams(queryMap);
-
-                            // 通过车辆SSO ID重置密码
-                            if (car != null) {
-                                // SSO重置密码
-                                SSOUtil ssoUtil = new SSOUtil();
-                                rm.setMessage(ssoUtil.ssoResetPwd(car.getSsoId(), params.get("password").toString(), ""));
+                HashMap<String, Object> map = new HashMap<>();
+                map.put("carNo", carNo);
+                map.put("telNum", telNum);
+                List<MeterBaseDriver> driverModel = meterBaseDriverMapper.selectByParameters(map);
+                if(driverModel.size() >= 1){
+                    //通过手机获取验证码列表
+                    AppVerificationCode modelTemp =  appVerificationCodeMapper.selectByPhone(telNum);
+                    if(modelTemp!=null){
+                        //当前时间是否在过期时间之内
+                        Date date = new Date();
+                        //验证码是否过期
+                        int flag = date.compareTo(modelTemp.getExpirationTime());
+                        if(flag > 0 || modelTemp.getValueFlag().equals("0")){
+                            rm.setMessage("验证码已过期,请重新发送验证码!!");
+                            modelTemp.setValueFlag("0");
+                            appVerificationCodeMapper.updateByPrimaryKey(modelTemp);
+                            return rm;
+                        }
+                        //验证码没过期且相等
+                        if(modelTemp.getCode().equals(passCode) && modelTemp.getValueFlag().equals("1")){
+                            modelTemp.setValueFlag("0");
+                            appVerificationCodeMapper.updateByPrimaryKey(modelTemp);
+                            // 判断车号,司机手机号是否存在
+                            List<MeterBaseDriver> list = meterBaseDriverService.query(params);
+                            if (list.size() >= 1) {
+                                // 获取车辆SSO ID
+                                HashMap queryMap = new HashMap();
+                                queryMap.put("carNo", params.get("carNo").toString());
+
+                                MeterBaseCar car = meterBaseCarService.getByParams(queryMap);
+
+                                // 通过车辆SSO ID重置密码
+                                if (car != null) {
+                                    // SSO重置密码
+                                    SSOUtil ssoUtil = new SSOUtil();
+                                    rm.setMessage(ssoUtil.ssoResetPwd(car.getSsoId(), params.get("password").toString(), ""));
+                                }
+                            } else {
+                                rm.setMessage("没有此车号或手机号");
                             }
-                        } else {
-                            rm.setMessage("没有此车号或手机号");
                         }
+                        if (com.steerinfo.util.StringUtils.isNotEmpty(rm.getMessage())) {
+                            return failed(null, rm.getMessage());
+                        }
+                    }else{
+                        rm.setMessage("验证码有误!!");
+                        return rm;
                     }
-                    if (com.steerinfo.util.StringUtils.isNotEmpty(rm.getMessage())) {
-                        return failed(null, rm.getMessage());
-                    }
-                }else{
-                    rm.setMessage("验证码有误!!");
+                }else {
+                    rm.setMessage("重置密码失败,根据手机号和车号未查询到相应的账号!!");
                     return rm;
                 }
             }
@@ -679,6 +725,61 @@ public class MeterBaseCarController extends BaseRESTfulController {
         return success();
     }
 
+    @ApiOperation(value = "PC新增车辆", notes = "PC新增车辆")
+    @Transactional
+    @PostMapping(value = "/addByCarNo")
+    public RESTfulResult addByCarNo(@RequestBody HashMap params) {
+        MeterBaseCar car = new MeterBaseCar();
+        try {
+            String msg = "";
+            // 检查车辆是否存在
+            HashMap query = new HashMap();
+            query.put("carNo", params.get("carNo").toString());
+            query.put("validFlag", "0");
+
+            List<MeterBaseCar> list = meterBaseCarService.query(query);
+            if (list.size() == 0) {
+                // sso注册
+                params.put("password", "jg123456");
+                SSOUtil ssoUtil = new SSOUtil();
+                HashMap ssoMap = ssoUtil.ssoRegister(params);
+
+                // sso注册成功时,增加车辆表
+                if (ssoMap.get("code").equals("1")) {
+                    return failed(null, ssoMap.get("msg").toString());
+                } else {
+                    // sso注册成功时,增加车辆表
+                    // 将车辆类型,载重信息加入实体
+                    car.setCarNo(params.get("carNo").toString());
+                    car.setCarTypeNo(params.get("carTypeNo").toString());
+                    car.setCarTypeName(params.get("carTypeName").toString());
+//                        car.setMnemonicCode(params.get("mnemonicCode").toString());
+//                        car.setCustomerSupplierName(params.get("customerSupplierName").toString());
+//                        car.setMemo(params.get("memo").toString());
+                    car.setCreateManNo("admin");
+                    car.setCreateManName("admins");
+                    car.setCreateTime(new Date());
+                    // 将sso id写入车辆表,便于以后删除和重置密码
+                    car.setSsoId(ssoMap.get("data").toString());
+
+                    msg = meterBaseCarService.checkandadd(car);
+                }
+            } else {
+                msg = "车辆已存在";
+            }
+
+            if (com.steerinfo.util.StringUtils.isNotEmpty(msg)) {
+                return failed(null, msg);
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+        return success(car);
+    }
+
     @ApiOperation(value = "PC新增司机", notes = "PC新增司机")
     @Transactional
     @PostMapping(value = "/adddriver")
@@ -748,16 +849,14 @@ public class MeterBaseCarController extends BaseRESTfulController {
     }
 
 
-    @ApiOperation(value = "批量新增车辆", notes = "批量新增车辆")
+    @ApiOperation(value = "批量车辆导入", notes = "批量车辆导入")
 
     @PostMapping(value = "/batchAddCar")
     public RESTfulResult batchAddCar(@RequestBody List<HashMap> model) {
+        RESTfulResult rm = failed();
         try {
-            String msg = meterBaseCarService.batchAddCar(model);
-            if (msg != "" || !"".equals(msg)){
-                return failed(null,msg);
-            }
-            return success();
+            rm = meterBaseCarService.batchAddCar(model);
+            return rm;
         } catch (Exception e) {
             e.printStackTrace();
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();

+ 7 - 0
src/main/java/com/steerinfo/baseinfo/meterbasecar/mapper/MeterBaseCarMapper.java

@@ -4,11 +4,13 @@ import com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar;
 import com.steerinfo.baseinfo.meterbasedriver.model.MeterBaseDriver;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import java.math.*;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
 import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
 import feign.Param;
+import io.micrometer.core.instrument.Meter;
 import org.apache.ibatis.annotations.Mapper;
 
 @Mapper
@@ -19,4 +21,9 @@ public interface MeterBaseCarMapper extends IBaseMapper<MeterBaseCar, String> {
 
     void deleteCarById(@Param("list") List<String> driverNos);
 
+    List<MeterBaseCar> selectByMap(Map<String, Object> parameters);
+
+    int updateValidFlagById(Map<String, Object> parameters);
+
+    List<MeterBaseCar> selectByParametersNoPage(Map<String, Object> parmas);
 }

+ 162 - 9
src/main/java/com/steerinfo/baseinfo/meterbasecar/mapper/MeterBaseCarMapper.xml

@@ -27,20 +27,27 @@
     <result column="BELONG_UNIT_TYPE_NO" jdbcType="VARCHAR" property="belongUnitTypeNo" />
     <result column="BELONG_UNIT_TYPE_NAME" jdbcType="VARCHAR" property="belongUnitTypeName" />
     <result column="USET_DEPARTMENT" jdbcType="VARCHAR" property="usetDepartment" />
+    <result column="VEHICLE_IDENTIFY_NO" jdbcType="VARCHAR" property="vehicleIdentifyNo" />
+    <result column="FILLING_DEPARTMENT" jdbcType="VARCHAR" property="fillingDepartment" />
+    <result column="FILLING_USER" jdbcType="VARCHAR" property="fillingUser" />
+    <result column="IS_INSURANCE" jdbcType="VARCHAR" property="isInsurance" />
+    <result column="OTHER_INSURANCE" jdbcType="VARCHAR" property="otherInsurance" />
   </resultMap>
   <sql id="columns">
     PK_NO, CAR_NO, MNEMONIC_CODE, CUSTOMER_SUPPLIER_NO, CUSTOMER_SUPPLIER_NAME, CAR_TYPE_NO, 
     CAR_TYPE_NAME, CAR_CARRIER_WEIGHT, CAR_SELF_WEIGHT, MEMO, VALID_FLAG, CREATE_MAN_NO, 
     CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, 
     DELETE_MAN_NAME, DELETE_TIME, SSO_ID, VEHICLE_TYPE, BELONG_UNIT_TYPE_NO, BELONG_UNIT_TYPE_NAME, 
-    USET_DEPARTMENT
+    USET_DEPARTMENT, VEHICLE_IDENTIFY_NO, FILLING_DEPARTMENT, FILLING_USER, IS_INSURANCE, 
+    OTHER_INSURANCE
   </sql>
   <sql id="columns_alias">
     t.PK_NO, t.CAR_NO, t.MNEMONIC_CODE, t.CUSTOMER_SUPPLIER_NO, t.CUSTOMER_SUPPLIER_NAME, 
     t.CAR_TYPE_NO, t.CAR_TYPE_NAME, t.CAR_CARRIER_WEIGHT, t.CAR_SELF_WEIGHT, t.MEMO, 
     t.VALID_FLAG, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, 
     t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, t.DELETE_TIME, 
-    t.SSO_ID, t.VEHICLE_TYPE, t.BELONG_UNIT_TYPE_NO, t.BELONG_UNIT_TYPE_NAME, t.USET_DEPARTMENT
+    t.SSO_ID, t.VEHICLE_TYPE, t.BELONG_UNIT_TYPE_NO, t.BELONG_UNIT_TYPE_NAME, t.USET_DEPARTMENT, 
+    t.VEHICLE_IDENTIFY_NO, t.FILLING_DEPARTMENT, t.FILLING_USER, t.IS_INSURANCE, t.OTHER_INSURANCE
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM METER_BASE_CAR
@@ -125,6 +132,21 @@
       <if test="usetDepartment != null and usetDepartment != ''">
         and USET_DEPARTMENT = #{usetDepartment}
       </if>
+      <if test="vehicleIdentifyNo != null and vehicleIdentifyNo != ''">
+        and VEHICLE_IDENTIFY_NO = #{vehicleIdentifyNo}
+      </if>
+      <if test="fillingDepartment != null and fillingDepartment != ''">
+        and FILLING_DEPARTMENT = #{fillingDepartment}
+      </if>
+      <if test="fillingUser != null and fillingUser != ''">
+        and FILLING_USER = #{fillingUser}
+      </if>
+      <if test="isInsurance != null and isInsurance != ''">
+        and IS_INSURANCE = #{isInsurance}
+      </if>
+      <if test="otherInsurance != null and otherInsurance != ''">
+        and OTHER_INSURANCE = #{otherInsurance}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -204,6 +226,21 @@
       <if test="usetDepartment != null and usetDepartment != ''">
         and USET_DEPARTMENT LIKE '%${usetDepartment}%'
       </if>
+      <if test="vehicleIdentifyNo != null and vehicleIdentifyNo != ''">
+        and VEHICLE_IDENTIFY_NO LIKE '%${vehicleIdentifyNo}%'
+      </if>
+      <if test="fillingDepartment != null and fillingDepartment != ''">
+        and FILLING_DEPARTMENT LIKE '%${fillingDepartment}%'
+      </if>
+      <if test="fillingUser != null and fillingUser != ''">
+        and FILLING_USER LIKE '%${fillingUser}%'
+      </if>
+      <if test="isInsurance != null and isInsurance != ''">
+        and IS_INSURANCE LIKE '%${isInsurance}%'
+      </if>
+      <if test="otherInsurance != null and otherInsurance != ''">
+        and OTHER_INSURANCE LIKE '%${otherInsurance}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -285,6 +322,21 @@
       <if test="usetDepartment != null and usetDepartment != ''">
         or USET_DEPARTMENT = #{usetDepartment}
       </if>
+      <if test="vehicleIdentifyNo != null and vehicleIdentifyNo != ''">
+        or VEHICLE_IDENTIFY_NO = #{vehicleIdentifyNo}
+      </if>
+      <if test="fillingDepartment != null and fillingDepartment != ''">
+        or FILLING_DEPARTMENT = #{fillingDepartment}
+      </if>
+      <if test="fillingUser != null and fillingUser != ''">
+        or FILLING_USER = #{fillingUser}
+      </if>
+      <if test="isInsurance != null and isInsurance != ''">
+        or IS_INSURANCE = #{isInsurance}
+      </if>
+      <if test="otherInsurance != null and otherInsurance != ''">
+        or OTHER_INSURANCE = #{otherInsurance}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
     insert into METER_BASE_CAR (PK_NO, CAR_NO, MNEMONIC_CODE, 
@@ -295,7 +347,9 @@
       UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
       DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
       SSO_ID, VEHICLE_TYPE, BELONG_UNIT_TYPE_NO, 
-      BELONG_UNIT_TYPE_NAME, USET_DEPARTMENT)
+      BELONG_UNIT_TYPE_NAME, USET_DEPARTMENT, VEHICLE_IDENTIFY_NO, 
+      FILLING_DEPARTMENT, FILLING_USER, IS_INSURANCE, 
+      OTHER_INSURANCE)
     values (#{pkNo,jdbcType=VARCHAR}, #{carNo,jdbcType=VARCHAR}, #{mnemonicCode,jdbcType=VARCHAR}, 
       #{customerSupplierNo,jdbcType=VARCHAR}, #{customerSupplierName,jdbcType=VARCHAR}, 
       #{carTypeNo,jdbcType=VARCHAR}, #{carTypeName,jdbcType=VARCHAR}, #{carCarrierWeight,jdbcType=DECIMAL}, 
@@ -304,7 +358,9 @@
       #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
       #{deleteManNo,jdbcType=VARCHAR}, #{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, 
       #{ssoId,jdbcType=VARCHAR}, #{vehicleType,jdbcType=VARCHAR}, #{belongUnitTypeNo,jdbcType=VARCHAR}, 
-      #{belongUnitTypeName,jdbcType=VARCHAR}, #{usetDepartment,jdbcType=VARCHAR})
+      #{belongUnitTypeName,jdbcType=VARCHAR}, #{usetDepartment,jdbcType=VARCHAR}, #{vehicleIdentifyNo,jdbcType=VARCHAR}, 
+      #{fillingDepartment,jdbcType=VARCHAR}, #{fillingUser,jdbcType=VARCHAR}, #{isInsurance,jdbcType=VARCHAR}, 
+      #{otherInsurance,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
     insert into METER_BASE_CAR
@@ -384,6 +440,21 @@
       <if test="usetDepartment != null">
         USET_DEPARTMENT,
       </if>
+      <if test="vehicleIdentifyNo != null">
+        VEHICLE_IDENTIFY_NO,
+      </if>
+      <if test="fillingDepartment != null">
+        FILLING_DEPARTMENT,
+      </if>
+      <if test="fillingUser != null">
+        FILLING_USER,
+      </if>
+      <if test="isInsurance != null">
+        IS_INSURANCE,
+      </if>
+      <if test="otherInsurance != null">
+        OTHER_INSURANCE,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="pkNo != null">
@@ -461,6 +532,21 @@
       <if test="usetDepartment != null">
         #{usetDepartment,jdbcType=VARCHAR},
       </if>
+      <if test="vehicleIdentifyNo != null">
+        #{vehicleIdentifyNo,jdbcType=VARCHAR},
+      </if>
+      <if test="fillingDepartment != null">
+        #{fillingDepartment,jdbcType=VARCHAR},
+      </if>
+      <if test="fillingUser != null">
+        #{fillingUser,jdbcType=VARCHAR},
+      </if>
+      <if test="isInsurance != null">
+        #{isInsurance,jdbcType=VARCHAR},
+      </if>
+      <if test="otherInsurance != null">
+        #{otherInsurance,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
@@ -488,7 +574,12 @@
       VEHICLE_TYPE = #{vehicleType,jdbcType=VARCHAR},
       BELONG_UNIT_TYPE_NO = #{belongUnitTypeNo,jdbcType=VARCHAR},
       BELONG_UNIT_TYPE_NAME = #{belongUnitTypeName,jdbcType=VARCHAR},
-      USET_DEPARTMENT = #{usetDepartment,jdbcType=VARCHAR}
+      USET_DEPARTMENT = #{usetDepartment,jdbcType=VARCHAR},
+      VEHICLE_IDENTIFY_NO = #{vehicleIdentifyNo,jdbcType=VARCHAR},
+      FILLING_DEPARTMENT = #{fillingDepartment,jdbcType=VARCHAR},
+      FILLING_USER = #{fillingUser,jdbcType=VARCHAR},
+      IS_INSURANCE = #{isInsurance,jdbcType=VARCHAR},
+      OTHER_INSURANCE = #{otherInsurance,jdbcType=VARCHAR}
     where PK_NO = #{pkNo,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar">
@@ -566,6 +657,21 @@
       <if test="usetDepartment != null">
         USET_DEPARTMENT = #{usetDepartment,jdbcType=VARCHAR},
       </if>
+      <if test="vehicleIdentifyNo != null">
+        VEHICLE_IDENTIFY_NO = #{vehicleIdentifyNo,jdbcType=VARCHAR},
+      </if>
+      <if test="fillingDepartment != null">
+        FILLING_DEPARTMENT = #{fillingDepartment,jdbcType=VARCHAR},
+      </if>
+      <if test="fillingUser != null">
+        FILLING_USER = #{fillingUser,jdbcType=VARCHAR},
+      </if>
+      <if test="isInsurance != null">
+        IS_INSURANCE = #{isInsurance,jdbcType=VARCHAR},
+      </if>
+      <if test="otherInsurance != null">
+        OTHER_INSURANCE = #{otherInsurance,jdbcType=VARCHAR},
+      </if>
     </set>
     where PK_NO = #{pkNo,jdbcType=VARCHAR}
   </update>
@@ -592,7 +698,9 @@
       UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
       DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
       SSO_ID, VEHICLE_TYPE, BELONG_UNIT_TYPE_NO, 
-      BELONG_UNIT_TYPE_NAME, USET_DEPARTMENT
+      BELONG_UNIT_TYPE_NAME, USET_DEPARTMENT, 
+      VEHICLE_IDENTIFY_NO, FILLING_DEPARTMENT, 
+      FILLING_USER, IS_INSURANCE, OTHER_INSURANCE
       )
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
@@ -605,7 +713,9 @@
       #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
       #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP}, 
       #{item.ssoId,jdbcType=VARCHAR}, #{item.vehicleType,jdbcType=VARCHAR}, #{item.belongUnitTypeNo,jdbcType=VARCHAR}, 
-      #{item.belongUnitTypeName,jdbcType=VARCHAR}, #{item.usetDepartment,jdbcType=VARCHAR}
+      #{item.belongUnitTypeName,jdbcType=VARCHAR}, #{item.usetDepartment,jdbcType=VARCHAR}, 
+      #{item.vehicleIdentifyNo,jdbcType=VARCHAR}, #{item.fillingDepartment,jdbcType=VARCHAR}, 
+      #{item.fillingUser,jdbcType=VARCHAR}, #{item.isInsurance,jdbcType=VARCHAR}, #{item.otherInsurance,jdbcType=VARCHAR}
        from dual  
    </foreach> )
   </insert>
@@ -712,6 +822,26 @@
        <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
           when #{item.pkNo,jdbcType=VARCHAR} then #{item.usetDepartment,jdbcType=VARCHAR}
        </foreach>
+       ,VEHICLE_IDENTIFY_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+          when #{item.pkNo,jdbcType=VARCHAR} then #{item.vehicleIdentifyNo,jdbcType=VARCHAR}
+       </foreach>
+       ,FILLING_DEPARTMENT=
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+          when #{item.pkNo,jdbcType=VARCHAR} then #{item.fillingDepartment,jdbcType=VARCHAR}
+       </foreach>
+       ,FILLING_USER=
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+          when #{item.pkNo,jdbcType=VARCHAR} then #{item.fillingUser,jdbcType=VARCHAR}
+       </foreach>
+       ,IS_INSURANCE=
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+          when #{item.pkNo,jdbcType=VARCHAR} then #{item.isInsurance,jdbcType=VARCHAR}
+       </foreach>
+       ,OTHER_INSURANCE=
+       <foreach close="end" collection="list" index="index" item="item" open="case PK_NO" separator=" ">
+          when #{item.pkNo,jdbcType=VARCHAR} then #{item.otherInsurance,jdbcType=VARCHAR}
+       </foreach>
      where PK_NO in 
      <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.pkNo,jdbcType=VARCHAR}
@@ -726,8 +856,6 @@
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  <!-- 友情提示!!!-->
-  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <select id="GetNewID" parameterType="java.lang.String" resultType="java.lang.String">
     SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(PK_NO, LENGTH(PK_NO) -3))),0) + 1,4,'0') PK_NO
     FROM METER_BASE_CAR
@@ -753,4 +881,29 @@
     </foreach>
   </update>
 
+  <select id="selectByMap" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    where valid_flag in ('1', '2')
+    <if test="carNo != null and carNo != ''">
+      and CAR_NO = '${carNo}'
+    </if>
+  </select>
+
+  <update id="updateValidFlagById" parameterType="java.util.HashMap">
+    update METER_BASE_CAR set VALID_FLAG = '0'
+    where 1=1
+    <if test="pkNo != null and pkNo != ''">
+      and PK_NO = #{pkNo}
+    </if>
+  </update>
+
+  <select id="selectByParametersNoPage" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="where" />
+    <if test="flag != null and flag != ''">
+      where valid_flag = '0'
+      and car_type_no = '001004003'
+    </if>
+  </select>
+  
 </mapper>

+ 76 - 0
src/main/java/com/steerinfo/baseinfo/meterbasecar/model/MeterBaseCar.java

@@ -3,6 +3,7 @@ package com.steerinfo.baseinfo.meterbasecar.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -158,6 +159,36 @@ public class MeterBaseCar implements IBasePO<String> {
     @ApiModelProperty(value="使用部门",required=false)
     private String usetDepartment;
 
+    /**
+     * 车辆识别号(VEHICLE_IDENTIFY_NO,VARCHAR,30)
+     */
+    @ApiModelProperty(value="车辆识别号",required=false)
+    private String vehicleIdentifyNo;
+
+    /**
+     * 备案部门(FILLING_DEPARTMENT,VARCHAR,30)
+     */
+    @ApiModelProperty(value="备案部门",required=false)
+    private String fillingDepartment;
+
+    /**
+     * 备案人(FILLING_USER,VARCHAR,30)
+     */
+    @ApiModelProperty(value="备案人",required=false)
+    private String fillingUser;
+
+    /**
+     * 是否交强险(0:已交 1:未交)(IS_INSURANCE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否交强险(0:已交 1:未交)",required=false)
+    private String isInsurance;
+
+    /**
+     * 其他保险项(OTHER_INSURANCE,VARCHAR,30)
+     */
+    @ApiModelProperty(value="其他保险项",required=false)
+    private String otherInsurance;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -370,6 +401,46 @@ public class MeterBaseCar implements IBasePO<String> {
         this.usetDepartment = usetDepartment == null ? null : usetDepartment.trim();
     }
 
+    public String getVehicleIdentifyNo() {
+        return vehicleIdentifyNo;
+    }
+
+    public void setVehicleIdentifyNo(String vehicleIdentifyNo) {
+        this.vehicleIdentifyNo = vehicleIdentifyNo == null ? null : vehicleIdentifyNo.trim();
+    }
+
+    public String getFillingDepartment() {
+        return fillingDepartment;
+    }
+
+    public void setFillingDepartment(String fillingDepartment) {
+        this.fillingDepartment = fillingDepartment == null ? null : fillingDepartment.trim();
+    }
+
+    public String getFillingUser() {
+        return fillingUser;
+    }
+
+    public void setFillingUser(String fillingUser) {
+        this.fillingUser = fillingUser == null ? null : fillingUser.trim();
+    }
+
+    public String getIsInsurance() {
+        return isInsurance;
+    }
+
+    public void setIsInsurance(String isInsurance) {
+        this.isInsurance = isInsurance == null ? null : isInsurance.trim();
+    }
+
+    public String getOtherInsurance() {
+        return otherInsurance;
+    }
+
+    public void setOtherInsurance(String otherInsurance) {
+        this.otherInsurance = otherInsurance == null ? null : otherInsurance.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -401,6 +472,11 @@ public class MeterBaseCar implements IBasePO<String> {
         sb.append(", belongUnitTypeNo=").append(belongUnitTypeNo);
         sb.append(", belongUnitTypeName=").append(belongUnitTypeName);
         sb.append(", usetDepartment=").append(usetDepartment);
+        sb.append(", vehicleIdentifyNo=").append(vehicleIdentifyNo);
+        sb.append(", fillingDepartment=").append(fillingDepartment);
+        sb.append(", fillingUser=").append(fillingUser);
+        sb.append(", isInsurance=").append(isInsurance);
+        sb.append(", otherInsurance=").append(otherInsurance);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 3 - 1
src/main/java/com/steerinfo/baseinfo/meterbasecar/service/IMeterBaseCarService.java

@@ -6,6 +6,7 @@ import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar;
 import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
 import com.steerinfo.util.CommonPage;
+import io.micrometer.core.instrument.Meter;
 
 import java.util.Date;
 import java.math.BigDecimal;
@@ -36,8 +37,9 @@ public interface IMeterBaseCarService extends IBaseService<MeterBaseCar, String>
 
     String checkandupdate(String id,MeterBaseCar model);
 
-    String batchAddCar(List<HashMap> models);
+    RESTfulResult batchAddCar(List<HashMap> models);
 
+    List<MeterBaseCar> queryForNoPage(HashMap<String, Object> parmas);
 
 
 }

+ 126 - 68
src/main/java/com/steerinfo/baseinfo/meterbasecar/service/impl/MeterBaseCarServiceImpl.java

@@ -1,5 +1,7 @@
 package com.steerinfo.baseinfo.meterbasecar.service.impl;
 
+import com.steerinfo.baseinfo.meterbasedriver.mapper.MeterBaseDriverMapper;
+import com.steerinfo.baseinfo.meterbasedriver.model.MeterBaseDriver;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
@@ -12,12 +14,15 @@ import com.steerinfo.meterwork.meterworkcaractual.mapper.MeterWorkCarActualMappe
 import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
 import com.steerinfo.util.CommonPage;
 import com.steerinfo.util.FieldsCollector;
+import com.steerinfo.util.SSOUtil;
 import com.steerinfo.util.StringUtils;
+import io.micrometer.core.instrument.Meter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
+import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.math.BigDecimal;
@@ -38,12 +43,15 @@ import java.math.BigDecimal;
 @Service(value = "meterBaseCarService")
 public class MeterBaseCarServiceImpl extends BaseServiceImpl<MeterBaseCar, String> implements IMeterBaseCarService {
 
-    @Autowired
+    @Resource
     private MeterBaseCarMapper meterBaseCarMapper;
 
-    @Autowired
+    @Resource
     private MeterWorkCarActualMapper meterWorkCarActualMapper;
 
+    @Resource
+    private MeterBaseDriverMapper meterBaseDriverMapper;
+
     @Override
     protected IBaseMapper<MeterBaseCar, String> getMapper() {
         return meterBaseCarMapper;
@@ -134,72 +142,122 @@ public class MeterBaseCarServiceImpl extends BaseServiceImpl<MeterBaseCar, Strin
 
     @Override
     @Transactional
-    public String batchAddCar(List<HashMap> models) {
-//        try{
-//            for (HashMap model : models){
-//                String msg = "";
-//
-//                if(model.get("carNo") == null || model.get("carNo").equals("")){
-//                    return "存在空车号";
-//                }
-//                // 检查车辆是否存在
-//                HashMap query = new HashMap();
-//                query.put("carNo", model.get("carNo").toString());
-//                query.put("validFlag", "0");
-//
-//
-//                List<MeterBaseCar> list = query(query);
-//                if (list.size() == 0) {
-//                    // sso注册
-//                    SSOUtil ssoUtil = new SSOUtil();
-//                    HashMap ssoMap = ssoUtil.ssoRegister(model);
-//                    // sso注册成功时,增加车辆表
-//                    if (ssoMap.get("code").equals("1") && !"账号已被注册".equals(ssoMap.get("msg").toString())) {
-//                        return ssoMap.get("msg").toString();
-//                    } else {
-//                        String ssoID = "";
-//                        if (ssoMap.get("code").equals("1") && "账号已被注册".equals(ssoMap.get("msg").toString())) {
-//
-//                        }
-//                        // sso注册成功时,增加车辆表
-//                        MeterBaseCar car = new MeterBaseCar();
-//                        // 将车辆类型,载重信息加入实体
-//                        car.setCarNo(model.get("carNo").toString());
-//                        car.setCarTypeNo(model.get("carTypeNo").toString());
-//                        car.setCarTypeName(model.get("carTypeName").toString());
-//                        if (model.get("carSelfWeight") != null) {
-//                            car.setCarSelfWeight(new BigDecimal(model.get("carSelfWeight").toString()));
-//                        }
-//                        if (model.get("carCarrierWeight") != null) {
-//                            car.setCarCarrierWeight(new BigDecimal(model.get("carCarrierWeight").toString()));
-//                        }
-//                        if (model.get("mnemonicCode") != null) {
-//                            car.setMnemonicCode(model.get("mnemonicCode").toString());
-//                        }
-//                        if (model.get("customerSupplierName") != null) {
-//                            car.setCustomerSupplierName(model.get("customerSupplierName").toString());
-//                        }
-//                        car.setCreateManNo("admin");
-//                        car.setCreateManName("admins");
-//                        car.setCreateTime(new Date());
-//                        car.setValidFlag("0");
-//
-//                        // 将sso id写入车辆表,便于以后删除和重置密码
-//                        car.setSsoId(ssoMap.get("data").toString());
-//
-//                        String no=meterBaseCarMapper.GetNewID();
-//                        car.setId(new SimpleDateFormat("yyyyMMdd").format(new Date())+no);
-//                        meterBaseCarMapper.insertSelective(car);
-//
-//                    }
-//                }
-//            }
-//        }catch (Exception e){
-//            e.printStackTrace();
-//            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-//            return "操作异常,请确认";
-//        }
-        return "失败";
+    public RESTfulResult batchAddCar(List<HashMap> models) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+        rm.setCode("500");
+        rm.setMessage("操作失败!!");
+        try{
+            for(HashMap model: models) {
+                if(model.get("carNo") == null || model.get("carNo").equals("")){
+                    rm.setMessage("存在空车号");
+                    return rm;
+                }
+            }
+            for (HashMap model : models){
+                //检查车辆是否有停役状态的车
+                HashMap query = new HashMap();
+                query.put("carNo", model.get("carNo").toString());
+                query.put("validFlag", "1");
+                List<MeterBaseCar> list = query(query);
+                if(list.size() >= 1) {
+                    //查询到停役车辆信息,则将该车辆以及该车辆下面的司机信息还原成服役状态
+                    for(MeterBaseCar carModel: list) {
+                        carModel.setValidFlag("0");
+                        meterBaseCarMapper.updateByPrimaryKey(carModel);
+                        HashMap map = new HashMap();
+                        query.put("carId", model.get("carNo").toString());
+                        List<MeterBaseDriver> driverModels = meterBaseDriverMapper.selectByParameters(map);
+                        if(driverModels.size() >= 1) {
+                            for (MeterBaseDriver driver: driverModels) {
+                                driver.setValidFlag("0");
+                                meterBaseDriverMapper.updateByPrimaryKey(driver);
+                            }
+                        }
+                    }
+                }
+                // 检查车辆是否有服役状态的车
+                query.put("validFlag", "0");
+                list = query(query);
+                if (list.size() == 0) {
+                    //没有查询到服役的车辆信息,注册并插入车辆信息和司机信息
+                    // sso注册
+                    if(model.get("password").toString().equals("")) {
+                        model.remove("password");
+                        model.put("password", "jg123456");
+                    }
+                    SSOUtil ssoUtil = new SSOUtil();
+                    HashMap ssoMap = ssoUtil.ssoRegister(model);
+                    // sso注册成功时,增加车辆表
+                    if (ssoMap.get("code").equals("1") && !"账号已被注册".equals(ssoMap.get("msg").toString())) {
+                        rm.setMessage(ssoMap.get("msg").toString());
+                    } else {
+                        // sso注册成功时,增加车辆表
+                        MeterBaseCar car = new MeterBaseCar();
+                        car.setCarNo(model.get("carNo").toString());
+                        car.setMnemonicCode(model.get("mnemonicCode").toString());
+                        car.setVehicleType(model.get("vehicleType").toString());
+                        //car.setBelongUnitTypeNo();
+                        car.setBelongUnitTypeName(model.get("belongUnitTypeName").toString());
+                        car.setUsetDepartment(model.get("usetDepartmentment").toString());
+                        car.setVehicleIdentifyNo(model.get("vehicleIdentifyNo").toString());
+                        car.setFillingDepartment(model.get("fillingDepartment").toString());
+                        car.setFillingUser(model.get("fillingUser").toString());
+                        car.setIsInsurance(model.get("isInsurance").toString());
+                        car.setOtherInsurance(model.get("otherInsurance").toString());
+                        //car.setCustomerSupplierNo();
+                        car.setCustomerSupplierName(model.get("customerSupplierName").toString());
+                        car.setCarTypeNo(model.get("carTypeNo").toString());
+                        car.setCarTypeName(model.get("carTypeName").toString());
+                        car.setCarCarrierWeight(new BigDecimal(model.get("carCarrierWeight").toString()));
+                        car.setCarSelfWeight(new BigDecimal(model.get("carSelfWeight").toString()));
+                        car.setCreateManNo("admin");
+                        car.setCreateManName("admins");
+                        car.setCreateTime(new Date());
+                        car.setValidFlag("0");
+                        // 将sso id写入车辆表,便于以后删除和重置密码
+                        car.setSsoId(ssoMap.get("data").toString());
+                        String no=meterBaseCarMapper.GetNewID();
+                        car.setId(new SimpleDateFormat("yyyyMMdd").format(new Date())+no);
+                        meterBaseCarMapper.insertSelective(car);
+                    }
+                }
+                //将司机信息写入司机表
+                MeterBaseDriver driver = new MeterBaseDriver();
+                driver.setDriverNo(model.get("carNo") + model.get("telNum").toString());
+                driver.setDriverName(model.get("driverName").toString());
+                driver.setIdNum(model.get("idNum").toString());
+                driver.setTelNum(model.get("telNum").toString());
+                driver.setCreateManNo("admins");
+                driver.setCreateManName("admins");
+                driver.setCreateTime(new Date());
+                driver.setCarId(model.get("carNo").toString());
+                driver.setValidFlag("0");
+
+                MeterBaseDriver findCar = meterBaseDriverMapper.selectByPrimaryKey(driver.getDriverNo());
+                if(findCar == null) {
+                    meterBaseDriverMapper.insertSelective(driver);
+                }
+            }
+            rm.setSucceed();
+            rm.setCode("200");
+            rm.setMessage("操作成功!!");
+        }catch (Exception e){
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            rm.setMessage("操作异常,请确认");
+            return rm;
+        }
+        return rm;
+    }
+
+    @Override
+    public List<MeterBaseCar> queryForNoPage(HashMap<String, Object> parmas) {
+        if(parmas.isEmpty()){
+            parmas.put("flag", "0");
+        }
+        List<MeterBaseCar> list = meterBaseCarMapper.selectByParametersNoPage(parmas);
+        return list;
     }
 
     private String check(MeterBaseCar model)

+ 3 - 0
src/main/java/com/steerinfo/baseinfo/meterbasedriver/mapper/MeterBaseDriverMapper.java

@@ -4,6 +4,7 @@ import com.steerinfo.baseinfo.meterbasedriver.model.MeterBaseDriver;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import java.math.*;
 import java.util.List;
+import java.util.Map;
 
 import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
 import feign.Param;
@@ -23,4 +24,6 @@ public interface MeterBaseDriverMapper extends IBaseMapper<MeterBaseDriver, Stri
     void deleteCarById(@Param("list") List<String> carNos);
 
     List<MeterBaseDriver> getDirverBySup(String customerSupplierNo);
+
+    int updateValidFlagByCarId(Map<String, Object> parameters);
 }

+ 8 - 0
src/main/java/com/steerinfo/baseinfo/meterbasedriver/mapper/MeterBaseDriverMapper.xml

@@ -538,4 +538,12 @@
   <select id="getDirverBySup" parameterType="java.lang.String" resultMap="BaseResultMap">
     select * from METER_BASE_DRIVER where CAR_ID in (select CAR_NO from METER_BASE_CAR WHERE CUSTOMER_SUPPLIER_NO = #{customerSupplierNo})
   </select>
+
+  <update id="updateValidFlagByCarId" parameterType="java.util.HashMap">
+    update METER_BASE_DRIVER set VALID_FLAG = '0'
+    where 1=1
+      <if test="carId != null and carId != ''">
+        and car_id = #{carId}
+      </if>
+  </update>
 </mapper>

+ 1 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/service/impl/MeterBaseRailwayHisTareDataServiceImpl.java

@@ -59,6 +59,7 @@ public class MeterBaseRailwayHisTareDataServiceImpl extends BaseServiceImpl<Mete
                 MeterBaseRailwayHisTareData hisTaremodel = model.get(0);
                 hisTaremodel.setMeterWeight(Long.parseLong(meterWeight));
                 hisTaremodel.setMeterTime(new Date());
+                hisTaremodel.setMeterName(meterName);
                 hisTaremodel.setValueFlag("0");
                 hisTaremodel.setUpWeight(hisTaremodel.getMeterWeight());
                 //新平均重量 = 当前平均重量*总次数+当前计量重量/(总次数+1)

+ 119 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/controller/MeterBaseRailwayHisTareDetailController.java

@@ -0,0 +1,119 @@
+package com.steerinfo.baseinfo.meterbaserailwayhistaredetail.controller;
+
+import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail;
+import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.service.IMeterBaseRailwayHisTareDetailService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * MeterBaseRailwayHisTareDetail RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-04-02 10:57
+ * 类描述
+ * 修订历史:
+ * 日期:2022-04-02
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseRailwayHisTareDetail RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/meterbaserailwayhistaredetails")
+public class MeterBaseRailwayHisTareDetailController extends BaseRESTfulController {
+
+    @Autowired
+    IMeterBaseRailwayHisTareDetailService meterBaseRailwayHisTareDetailService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbaserailwayhistaredetail:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseRailwayHisTareDetail> list = meterBaseRailwayHisTareDetailService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbaserailwayhistaredetail:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseRailwayHisTareDetail> list = meterBaseRailwayHisTareDetailService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据MeterBaseRailwayHisTareDetail对象创建")
+    @ApiImplicitParam(name = "meterBaseRailwayHisTareDetail", value = "详细实体meterBaseRailwayHisTareDetail", required = true, dataType = "MeterBaseRailwayHisTareDetail")
+    //@RequiresPermissions("meterbaserailwayhistaredetail:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute MeterBaseRailwayHisTareDetail model){
+        MeterBaseRailwayHisTareDetail meterBaseRailwayHisTareDetail = meterBaseRailwayHisTareDetailService.add(model);
+        return success(meterBaseRailwayHisTareDetail);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaserailwayhistaredetail:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        MeterBaseRailwayHisTareDetail meterBaseRailwayHisTareDetail = meterBaseRailwayHisTareDetailService.getById(id);
+        return success(meterBaseRailwayHisTareDetail);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的meterBaseRailwayHisTareDetail信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "meterBaseRailwayHisTareDetail", value = "详细实体meterBaseRailwayHisTareDetail", required = true, dataType = "MeterBaseRailwayHisTareDetail")
+    })
+    //@RequiresPermissions("meterbaserailwayhistaredetail:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody MeterBaseRailwayHisTareDetail model){
+        model.setId(id);
+        MeterBaseRailwayHisTareDetail meterBaseRailwayHisTareDetail = meterBaseRailwayHisTareDetailService.modify(model);
+        return success(meterBaseRailwayHisTareDetail);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaserailwayhistaredetail:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  meterBaseRailwayHisTareDetailService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value="获取最新详细列表", notes="分页查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbaserailwayhistaredetail:view")
+    @GetMapping(value = "/listByDesc")
+    public RESTfulResult listByDesc(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseRailwayHisTareDetail> list = meterBaseRailwayHisTareDetailService.listByDesc(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+}

+ 15 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/mapper/MeterBaseRailwayHisTareDetailMapper.java

@@ -0,0 +1,15 @@
+package com.steerinfo.baseinfo.meterbaserailwayhistaredetail.mapper;
+
+import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface MeterBaseRailwayHisTareDetailMapper extends IBaseMapper<MeterBaseRailwayHisTareDetail, String> {
+    String getNewID(@Param(value="afl")String afl);
+    List<MeterBaseRailwayHisTareDetail> selectByParameter(Map<String, Object> parameters);
+}

+ 325 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/mapper/MeterBaseRailwayHisTareDetailMapper.xml

@@ -0,0 +1,325 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.steerinfo.baseinfo.meterbaserailwayhistaredetail.mapper.MeterBaseRailwayHisTareDetailMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail">
+    <id column="DETAIL_NO" jdbcType="VARCHAR" property="detailNo" />
+    <result column="ACTUAL_FIRST_NO" jdbcType="VARCHAR" property="actualFirstNo" />
+    <result column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
+    <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
+    <result column="CAR_NO" jdbcType="VARCHAR" property="carNo" />
+    <result column="METER_WEIGHT" jdbcType="DECIMAL" property="meterWeight" />
+    <result column="METER_NAME" jdbcType="VARCHAR" property="meterName" />
+    <result column="METER_TIME" jdbcType="TIMESTAMP" property="meterTime" />
+    <result column="METER_ORDER" jdbcType="VARCHAR" property="meterOrder" />
+  </resultMap>
+  <sql id="columns">
+    DETAIL_NO, ACTUAL_FIRST_NO, BASE_SPOT_NO, BASE_SPOT_NAME, CAR_NO, METER_WEIGHT, METER_NAME, 
+    METER_TIME, METER_ORDER
+  </sql>
+  <sql id="columns_alias">
+    t.DETAIL_NO, t.ACTUAL_FIRST_NO, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.CAR_NO, t.METER_WEIGHT, 
+    t.METER_NAME, t.METER_TIME, t.METER_ORDER
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM METER_BASE_RAILWAY_HIS_TARE_DETAIL
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM METER_BASE_RAILWAY_HIS_TARE_DETAIL t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="detailNo != null and detailNo != ''">
+        and DETAIL_NO = #{detailNo}
+      </if>
+      <if test="actualFirstNo != null and actualFirstNo != ''">
+        and ACTUAL_FIRST_NO = #{actualFirstNo}
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and BASE_SPOT_NO = #{baseSpotNo}
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="carNo != null and carNo != ''">
+        and CAR_NO = #{carNo}
+      </if>
+      <if test="meterWeight != null">
+        and METER_WEIGHT = #{meterWeight}
+      </if>
+      <if test="meterName != null and meterName != ''">
+        and METER_NAME = #{meterName}
+      </if>
+      <if test="meterTime != null">
+        and TO_CHAR(METER_TIME,'yyyy-MM-dd') = #{meterTime}
+      </if>
+      <if test="meterOrder != null and meterOrder != ''">
+        and METER_ORDER = #{meterOrder}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="detailNo != null and detailNo != ''">
+        and DETAIL_NO LIKE '%${detailNo}%'
+      </if>
+      <if test="actualFirstNo != null and actualFirstNo != ''">
+        and ACTUAL_FIRST_NO LIKE '%${actualFirstNo}%'
+      </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="carNo != null and carNo != ''">
+        and CAR_NO LIKE '%${carNo}%'
+      </if>
+      <if test="meterWeight != null">
+        and METER_WEIGHT = #{meterWeight}
+      </if>
+      <if test="meterName != null and meterName != ''">
+        and METER_NAME LIKE '%${meterName}%'
+      </if>
+      <if test="meterTime != null">
+        and TO_CHAR(METER_TIME,'yyyy-MM-dd') = #{meterTime}
+      </if>
+      <if test="meterOrder != null and meterOrder != ''">
+        and METER_ORDER LIKE '%${meterOrder}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from METER_BASE_RAILWAY_HIS_TARE_DETAIL
+    where DETAIL_NO = #{detailNo,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from METER_BASE_RAILWAY_HIS_TARE_DETAIL
+    where 1!=1 
+      <if test="actualFirstNo != null and actualFirstNo != ''">
+        or ACTUAL_FIRST_NO = #{actualFirstNo}
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        or BASE_SPOT_NO = #{baseSpotNo}
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        or BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="carNo != null and carNo != ''">
+        or CAR_NO = #{carNo}
+      </if>
+      <if test="meterWeight != null">
+        or METER_WEIGHT = #{meterWeight}
+      </if>
+      <if test="meterName != null and meterName != ''">
+        or METER_NAME = #{meterName}
+      </if>
+      <if test="meterTime != null">
+        or TO_CHAR(METER_TIME,'yyyy-MM-dd') = '#{meterTime}'
+      </if>
+      <if test="meterOrder != null and meterOrder != ''">
+        or METER_ORDER = #{meterOrder}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail">
+    insert into METER_BASE_RAILWAY_HIS_TARE_DETAIL (DETAIL_NO, ACTUAL_FIRST_NO, BASE_SPOT_NO, 
+      BASE_SPOT_NAME, CAR_NO, METER_WEIGHT, 
+      METER_NAME, METER_TIME, METER_ORDER
+      )
+    values (#{detailNo,jdbcType=VARCHAR}, #{actualFirstNo,jdbcType=VARCHAR}, #{baseSpotNo,jdbcType=VARCHAR}, 
+      #{baseSpotName,jdbcType=VARCHAR}, #{carNo,jdbcType=VARCHAR}, #{meterWeight,jdbcType=DECIMAL}, 
+      #{meterName,jdbcType=VARCHAR}, #{meterTime,jdbcType=TIMESTAMP}, #{meterOrder,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail">
+    insert into METER_BASE_RAILWAY_HIS_TARE_DETAIL
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="detailNo != null">
+        DETAIL_NO,
+      </if>
+      <if test="actualFirstNo != null">
+        ACTUAL_FIRST_NO,
+      </if>
+      <if test="baseSpotNo != null">
+        BASE_SPOT_NO,
+      </if>
+      <if test="baseSpotName != null">
+        BASE_SPOT_NAME,
+      </if>
+      <if test="carNo != null">
+        CAR_NO,
+      </if>
+      <if test="meterWeight != null">
+        METER_WEIGHT,
+      </if>
+      <if test="meterName != null">
+        METER_NAME,
+      </if>
+      <if test="meterTime != null">
+        METER_TIME,
+      </if>
+      <if test="meterOrder != null">
+        METER_ORDER,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="detailNo != null">
+        #{detailNo,jdbcType=VARCHAR},
+      </if>
+      <if test="actualFirstNo != null">
+        #{actualFirstNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotNo != null">
+        #{baseSpotNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotName != null">
+        #{baseSpotName,jdbcType=VARCHAR},
+      </if>
+      <if test="carNo != null">
+        #{carNo,jdbcType=VARCHAR},
+      </if>
+      <if test="meterWeight != null">
+        #{meterWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="meterName != null">
+        #{meterName,jdbcType=VARCHAR},
+      </if>
+      <if test="meterTime != null">
+        #{meterTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="meterOrder != null">
+        #{meterOrder,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail">
+    update METER_BASE_RAILWAY_HIS_TARE_DETAIL
+    set ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR},
+      BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
+      BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
+      CAR_NO = #{carNo,jdbcType=VARCHAR},
+      METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
+      METER_NAME = #{meterName,jdbcType=VARCHAR},
+      METER_TIME = #{meterTime,jdbcType=TIMESTAMP},
+      METER_ORDER = #{meterOrder,jdbcType=VARCHAR}
+    where DETAIL_NO = #{detailNo,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail">
+    update METER_BASE_RAILWAY_HIS_TARE_DETAIL
+    <set>
+      <if test="actualFirstNo != null">
+        ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotNo != null">
+        BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotName != null">
+        BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
+      </if>
+      <if test="carNo != null">
+        CAR_NO = #{carNo,jdbcType=VARCHAR},
+      </if>
+      <if test="meterWeight != null">
+        METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="meterName != null">
+        METER_NAME = #{meterName,jdbcType=VARCHAR},
+      </if>
+      <if test="meterTime != null">
+        METER_TIME = #{meterTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="meterOrder != null">
+        METER_ORDER = #{meterOrder,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where DETAIL_NO = #{detailNo,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where DETAIL_NO = #{detailNo,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into METER_BASE_RAILWAY_HIS_TARE_DETAIL 
+      (DETAIL_NO, 
+      ACTUAL_FIRST_NO, BASE_SPOT_NO, BASE_SPOT_NAME, 
+      CAR_NO, METER_WEIGHT, METER_NAME, 
+      METER_TIME, METER_ORDER)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.detailNo,jdbcType=VARCHAR}, 
+      #{item.actualFirstNo,jdbcType=VARCHAR}, #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, 
+      #{item.carNo,jdbcType=VARCHAR}, #{item.meterWeight,jdbcType=DECIMAL}, #{item.meterName,jdbcType=VARCHAR}, 
+      #{item.meterTime,jdbcType=TIMESTAMP}, #{item.meterOrder,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update METER_BASE_RAILWAY_HIS_TARE_DETAIL
+     set
+       DETAIL_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+          when #{item.detailNo,jdbcType=VARCHAR} then #{item.detailNo,jdbcType=VARCHAR}
+       </foreach>
+       ,ACTUAL_FIRST_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+          when #{item.detailNo,jdbcType=VARCHAR} then #{item.actualFirstNo,jdbcType=VARCHAR}
+       </foreach>
+       ,BASE_SPOT_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+          when #{item.detailNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
+       </foreach>
+       ,BASE_SPOT_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+          when #{item.detailNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
+       </foreach>
+       ,CAR_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+          when #{item.detailNo,jdbcType=VARCHAR} then #{item.carNo,jdbcType=VARCHAR}
+       </foreach>
+       ,METER_WEIGHT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+          when #{item.detailNo,jdbcType=VARCHAR} then #{item.meterWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,METER_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+          when #{item.detailNo,jdbcType=VARCHAR} then #{item.meterName,jdbcType=VARCHAR}
+       </foreach>
+       ,METER_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+          when #{item.detailNo,jdbcType=VARCHAR} then #{item.meterTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,METER_ORDER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+          when #{item.detailNo,jdbcType=VARCHAR} then #{item.meterOrder,jdbcType=VARCHAR}
+       </foreach>
+     where DETAIL_NO in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.detailNo,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from METER_BASE_RAILWAY_HIS_TARE_DETAIL
+    where DETAIL_NO in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
+    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(DETAIL_NO, LENGTH(DETAIL_NO) - 3))),0) + 1,4,'0') DETAIL_NO
+    FROM METER_BASE_Railway_HIS_TARE_DETAIL where instr(DETAIL_NO,#{afl,jdbcType=VARCHAR})>0
+  </select>
+
+  <select id="selectByParameter" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+    order by meter_time desc
+  </select>
+</mapper>

+ 168 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/model/MeterBaseRailwayHisTareDetail.java

@@ -0,0 +1,168 @@
+package com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+@ApiModel(value="历史皮重计算配置表")
+public class MeterBaseRailwayHisTareDetail implements IBasePO<String> {
+    /**
+     * 数据编号(YYYYMMDD+4位流水)(DETAIL_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="数据编号(YYYYMMDD+4位流水)",required=true)
+    private String detailNo;
+
+    /**
+     * 作业编号(ACTUAL_FIRST_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="作业编号",required=false)
+    private String actualFirstNo;
+
+    /**
+     * 计量点编号(BASE_SPOT_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="计量点编号",required=false)
+    private String baseSpotNo;
+
+    /**
+     * 计量点名称(BASE_SPOT_NAME,VARCHAR,40)
+     */
+    @ApiModelProperty(value="计量点名称",required=false)
+    private String baseSpotName;
+
+    /**
+     * 车号(CAR_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="车号",required=true)
+    private String carNo;
+
+    /**
+     * 皮重数据(kg)(METER_WEIGHT,DECIMAL,10)
+     */
+    @ApiModelProperty(value="皮重数据(kg)",required=true)
+    private Long meterWeight;
+
+    /**
+     * 皮重计量员(METER_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="皮重计量员",required=false)
+    private String meterName;
+
+    /**
+     * 皮重计量时间(YYYY-MM-DD HH:mm:ss)(METER_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="皮重计量时间(YYYY-MM-DD HH:mm:ss)",required=true)
+    private Date meterTime;
+
+    /**
+     * 计量次序(1:一次计量;2:二次计量; 3:期限皮重)(METER_ORDER,VARCHAR,1)
+     */
+    @ApiModelProperty(value="计量次序(1:一次计量;2:二次计量; 3:期限皮重)",required=true)
+    private String meterOrder;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.detailNo;
+    }
+
+    @Override
+    public void setId(String detailNo) {
+        this.detailNo = detailNo == null ? null : detailNo.trim();
+    }
+
+    public String getDetailNo() {
+        return detailNo;
+    }
+
+    public void setDetailNo(String detailNo) {
+        this.detailNo = detailNo == null ? null : detailNo.trim();
+    }
+
+    public String getActualFirstNo() {
+        return actualFirstNo;
+    }
+
+    public void setActualFirstNo(String actualFirstNo) {
+        this.actualFirstNo = actualFirstNo == null ? null : actualFirstNo.trim();
+    }
+
+    public String getBaseSpotNo() {
+        return baseSpotNo;
+    }
+
+    public void setBaseSpotNo(String baseSpotNo) {
+        this.baseSpotNo = baseSpotNo == null ? null : baseSpotNo.trim();
+    }
+
+    public String getBaseSpotName() {
+        return baseSpotName;
+    }
+
+    public void setBaseSpotName(String baseSpotName) {
+        this.baseSpotName = baseSpotName == null ? null : baseSpotName.trim();
+    }
+
+    public String getCarNo() {
+        return carNo;
+    }
+
+    public void setCarNo(String carNo) {
+        this.carNo = carNo == null ? null : carNo.trim();
+    }
+
+    public Long getMeterWeight() {
+        return meterWeight;
+    }
+
+    public void setMeterWeight(Long meterWeight) {
+        this.meterWeight = meterWeight;
+    }
+
+    public String getMeterName() {
+        return meterName;
+    }
+
+    public void setMeterName(String meterName) {
+        this.meterName = meterName == null ? null : meterName.trim();
+    }
+
+    public Date getMeterTime() {
+        return meterTime;
+    }
+
+    public void setMeterTime(Date meterTime) {
+        this.meterTime = meterTime;
+    }
+
+    public String getMeterOrder() {
+        return meterOrder;
+    }
+
+    public void setMeterOrder(String meterOrder) {
+        this.meterOrder = meterOrder == null ? null : meterOrder.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", detailNo=").append(detailNo);
+        sb.append(", actualFirstNo=").append(actualFirstNo);
+        sb.append(", baseSpotNo=").append(baseSpotNo);
+        sb.append(", baseSpotName=").append(baseSpotName);
+        sb.append(", carNo=").append(carNo);
+        sb.append(", meterWeight=").append(meterWeight);
+        sb.append(", meterName=").append(meterName);
+        sb.append(", meterTime=").append(meterTime);
+        sb.append(", meterOrder=").append(meterOrder);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 24 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/service/IMeterBaseRailwayHisTareDetailService.java

@@ -0,0 +1,24 @@
+package com.steerinfo.baseinfo.meterbaserailwayhistaredetail.service;
+
+import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail;
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.framework.service.pagehelper.PageList;
+
+import java.util.Map;
+
+/**
+ * MeterBaseRailwayHisTareDetail服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-04-02 10:57
+ * 类描述
+ * 修订历史:
+ * 日期:2022-04-02
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseRailwayHisTareDetail服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IMeterBaseRailwayHisTareDetailService extends IBaseService<MeterBaseRailwayHisTareDetail, String>{
+    PageList<MeterBaseRailwayHisTareDetail> listByDesc(Map<String, Object> parameters, Integer pageNum, Integer pageSize);
+}

+ 46 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/service/impl/MeterBaseRailwayHisTareDetailServiceImpl.java

@@ -0,0 +1,46 @@
+package com.steerinfo.baseinfo.meterbaserailwayhistaredetail.service.impl;
+
+import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.mapper.MeterBaseRailwayHisTareDetailMapper;
+import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail;
+import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.service.IMeterBaseRailwayHisTareDetailService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * MeterBaseRailwayHisTareDetail服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-04-02 10:57
+ * 类描述
+ * 修订历史:
+ * 日期:2022-04-02
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseRailwayHisTareDetail服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "meterBaseRailwayHisTareDetailService")
+public class MeterBaseRailwayHisTareDetailServiceImpl extends BaseServiceImpl<MeterBaseRailwayHisTareDetail, String> implements IMeterBaseRailwayHisTareDetailService {
+
+    @Autowired
+    private MeterBaseRailwayHisTareDetailMapper meterBaseRailwayHisTareDetailMapper;
+
+    @Override
+    protected IBaseMapper<MeterBaseRailwayHisTareDetail, String> getMapper() {
+        return meterBaseRailwayHisTareDetailMapper;
+    }
+
+    public PageList<MeterBaseRailwayHisTareDetail> listByDesc(Map<String, Object> parameters, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<MeterBaseRailwayHisTareDetail> rows = meterBaseRailwayHisTareDetailMapper.selectByParameter(parameters);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
+}

+ 124 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/controller/MeterBaseRfidInfoController.java

@@ -0,0 +1,124 @@
+package com.steerinfo.baseinfo.meterbaserfidinfo.controller;
+
+import com.steerinfo.baseinfo.meterbaserfidinfo.model.MeterBaseRfidInfo;
+import com.steerinfo.baseinfo.meterbaserfidinfo.service.IMeterBaseRfidInfoService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * MeterBaseRfidInfo RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-04-07 10:21
+ * 类描述
+ * 修订历史:
+ * 日期:2022-04-07
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseRfidInfo RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/meterbaserfidinfos")
+public class MeterBaseRfidInfoController extends BaseRESTfulController {
+
+    @Autowired
+    IMeterBaseRfidInfoService meterBaseRfidInfoService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbaserfidinfo:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseRfidInfo> list = meterBaseRfidInfoService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbaserfidinfo:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseRfidInfo> list = meterBaseRfidInfoService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据MeterBaseRfidInfo对象创建")
+    @ApiImplicitParam(name = "meterBaseRfidInfo", value = "详细实体meterBaseRfidInfo", required = true, dataType = "MeterBaseRfidInfo")
+    //@RequiresPermissions("meterbaserfidinfo:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@RequestParam MeterBaseRfidInfo model){
+        MeterBaseRfidInfo meterBaseRfidInfo = meterBaseRfidInfoService.add(model);
+        return success(meterBaseRfidInfo);
+    }
+
+    @ApiOperation(value="根据rfid和carNo新增对象", notes="根据rfid和carNo新增对象")
+    @PostMapping(value = "/checkAndAdd")
+    public RESTfulResult checkAndAdd(@RequestBody HashMap model){
+        RESTfulResult rm = failed();
+        String rfidCode = model.get("rfidCode") == null ? "" : model.get("rfidCode").toString();
+        String carNo = model.get("carNo") == null ? "" : model.get("carNo").toString();
+        if(com.steerinfo.util.StringUtils.isEmpty(rfidCode)) {
+            rm.setMessage("rfid编号不能为空,请确认!!");
+            return rm;
+        }
+        if(com.steerinfo.util.StringUtils.isEmpty(carNo)) {
+            rm.setMessage("车号不能为空,请确认!!");
+            return rm;
+        }
+        MeterBaseRfidInfo meterBaseRfidInfo = meterBaseRfidInfoService.checkAndAdd(model);
+        return success(meterBaseRfidInfo);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaserfidinfo:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        MeterBaseRfidInfo meterBaseRfidInfo = meterBaseRfidInfoService.getById(id);
+        return success(meterBaseRfidInfo);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的meterBaseRfidInfo信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "meterBaseRfidInfo", value = "详细实体meterBaseRfidInfo", required = true, dataType = "MeterBaseRfidInfo")
+    })
+    //@RequiresPermissions("meterbaserfidinfo:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody MeterBaseRfidInfo model){
+        model.setId(id);
+        MeterBaseRfidInfo meterBaseRfidInfo = meterBaseRfidInfoService.modify(model);
+        return success(meterBaseRfidInfo);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaserfidinfo:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  meterBaseRfidInfoService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 11 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/mapper/MeterBaseRfidInfoMapper.java

@@ -0,0 +1,11 @@
+package com.steerinfo.baseinfo.meterbaserfidinfo.mapper;
+
+import com.steerinfo.baseinfo.meterbaserfidinfo.model.MeterBaseRfidInfo;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface MeterBaseRfidInfoMapper extends IBaseMapper<MeterBaseRfidInfo, String> {
+    String getNewID(@Param(value="afl")String afl);
+}

+ 268 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/mapper/MeterBaseRfidInfoMapper.xml

@@ -0,0 +1,268 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.steerinfo.baseinfo.meterbaserfidinfo.mapper.MeterBaseRfidInfoMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbaserfidinfo.model.MeterBaseRfidInfo">
+    <id column="RFID_ID" jdbcType="VARCHAR" property="rfidId" />
+    <result column="RFID_CODE" jdbcType="VARCHAR" property="rfidCode" />
+    <result column="CAR_NO" jdbcType="VARCHAR" property="carNo" />
+    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
+    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
+  </resultMap>
+  <sql id="columns">
+    RFID_ID, RFID_CODE, CAR_NO, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, VALUE_FLAG
+  </sql>
+  <sql id="columns_alias">
+    t.RFID_ID, t.RFID_CODE, t.CAR_NO, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, 
+    t.VALUE_FLAG
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM METER_BASE_RFID_INFO
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM METER_BASE_RFID_INFO t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="rfidId != null and rfidId != ''">
+        and RFID_ID = #{rfidId}
+      </if>
+      <if test="rfidCode != null and rfidCode != ''">
+        and RFID_CODE = #{rfidCode}
+      </if>
+      <if test="carNo != null and carNo != ''">
+        and CAR_NO = #{carNo}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG = #{valueFlag}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="rfidId != null and rfidId != ''">
+        and RFID_ID LIKE '%${rfidId}%'
+      </if>
+      <if test="rfidCode != null and rfidCode != ''">
+        and RFID_CODE LIKE '%${rfidCode}%'
+      </if>
+      <if test="carNo != null and carNo != ''">
+        and CAR_NO LIKE '%${carNo}%'
+      </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="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG LIKE '%${valueFlag}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from METER_BASE_RFID_INFO
+    where RFID_ID = #{rfidId,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from METER_BASE_RFID_INFO
+    where 1!=1 
+      <if test="rfidCode != null and rfidCode != ''">
+        or RFID_CODE = #{rfidCode}
+      </if>
+      <if test="carNo != null and carNo != ''">
+        or CAR_NO = #{carNo}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        or CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        or CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        or VALUE_FLAG = #{valueFlag}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbaserfidinfo.model.MeterBaseRfidInfo">
+    insert into METER_BASE_RFID_INFO (RFID_ID, RFID_CODE, CAR_NO, 
+      CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
+      VALUE_FLAG)
+    values (#{rfidId,jdbcType=VARCHAR}, #{rfidCode,jdbcType=VARCHAR}, #{carNo,jdbcType=VARCHAR}, 
+      #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{valueFlag,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbaserfidinfo.model.MeterBaseRfidInfo">
+    insert into METER_BASE_RFID_INFO
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="rfidId != null">
+        RFID_ID,
+      </if>
+      <if test="rfidCode != null">
+        RFID_CODE,
+      </if>
+      <if test="carNo != null">
+        CAR_NO,
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO,
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="rfidId != null">
+        #{rfidId,jdbcType=VARCHAR},
+      </if>
+      <if test="rfidCode != null">
+        #{rfidCode,jdbcType=VARCHAR},
+      </if>
+      <if test="carNo != null">
+        #{carNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="valueFlag != null">
+        #{valueFlag,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbaserfidinfo.model.MeterBaseRfidInfo">
+    update METER_BASE_RFID_INFO
+    set RFID_CODE = #{rfidCode,jdbcType=VARCHAR},
+      CAR_NO = #{carNo,jdbcType=VARCHAR},
+      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR}
+    where RFID_ID = #{rfidId,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbaserfidinfo.model.MeterBaseRfidInfo">
+    update METER_BASE_RFID_INFO
+    <set>
+      <if test="rfidCode != null">
+        RFID_CODE = #{rfidCode,jdbcType=VARCHAR},
+      </if>
+      <if test="carNo != null">
+        CAR_NO = #{carNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where RFID_ID = #{rfidId,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where RFID_ID = #{rfidId,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into METER_BASE_RFID_INFO 
+      (RFID_ID, 
+      RFID_CODE, CAR_NO, CREATE_MAN_NO, 
+      CREATE_MAN_NAME, CREATE_TIME, 
+      VALUE_FLAG)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.rfidId,jdbcType=VARCHAR}, 
+      #{item.rfidCode,jdbcType=VARCHAR}, #{item.carNo,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, 
+      #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
+      #{item.valueFlag,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update METER_BASE_RFID_INFO
+     set
+       RFID_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RFID_ID" close="end">
+          when #{item.rfidId,jdbcType=VARCHAR} then #{item.rfidId,jdbcType=VARCHAR}
+       </foreach>
+       ,RFID_CODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RFID_ID" close="end">
+          when #{item.rfidId,jdbcType=VARCHAR} then #{item.rfidCode,jdbcType=VARCHAR}
+       </foreach>
+       ,CAR_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RFID_ID" close="end">
+          when #{item.rfidId,jdbcType=VARCHAR} then #{item.carNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RFID_ID" close="end">
+          when #{item.rfidId,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RFID_ID" close="end">
+          when #{item.rfidId,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RFID_ID" close="end">
+          when #{item.rfidId,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,VALUE_FLAG=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RFID_ID" close="end">
+          when #{item.rfidId,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
+       </foreach>
+     where RFID_ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.rfidId,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from METER_BASE_RFID_INFO
+    where RFID_ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
+    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(rfid_Id, LENGTH(rfid_Id) - 3))),0) + 1,4,'0') rfid_Id
+    FROM meter_base_rfid_info where instr(rfid_Id,#{afl,jdbcType=VARCHAR})>0
+  </select>
+</mapper>

+ 138 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/model/MeterBaseRfidInfo.java

@@ -0,0 +1,138 @@
+package com.steerinfo.baseinfo.meterbaserfidinfo.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+@ApiModel(value="rfid卡配置信息表")
+public class MeterBaseRfidInfo implements IBasePO<String> {
+    /**
+     * 主键Id(YYYY-MM-dd+流水号)(RFID_ID,VARCHAR,20)
+     */
+    @ApiModelProperty(value="主键Id(YYYY-MM-dd+流水号)",required=true)
+    private String rfidId;
+
+    /**
+     * RFID号(RFID_CODE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="RFID号",required=false)
+    private String rfidCode;
+
+    /**
+     * 车号(CAR_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="车号",required=false)
+    private String carNo;
+
+    /**
+     * 录入人编号(CREATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="录入人编号",required=false)
+    private String createManNo;
+
+    /**
+     * 录入人姓名(CREATE_MAN_NAME,VARCHAR,40)
+     */
+    @ApiModelProperty(value="录入人姓名",required=false)
+    private String createManName;
+
+    /**
+     * 录入时间(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="录入时间",required=false)
+    private Date createTime;
+
+    /**
+     * 状态(0:有效,1:挂失)(VALUE_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="状态(0:有效,1:挂失)",required=false)
+    private String valueFlag;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.rfidId;
+    }
+
+    @Override
+    public void setId(String rfidId) {
+        this.rfidId = rfidId == null ? null : rfidId.trim();
+    }
+
+    public String getRfidId() {
+        return rfidId;
+    }
+
+    public void setRfidId(String rfidId) {
+        this.rfidId = rfidId == null ? null : rfidId.trim();
+    }
+
+    public String getRfidCode() {
+        return rfidCode;
+    }
+
+    public void setRfidCode(String rfidCode) {
+        this.rfidCode = rfidCode == null ? null : rfidCode.trim();
+    }
+
+    public String getCarNo() {
+        return carNo;
+    }
+
+    public void setCarNo(String carNo) {
+        this.carNo = carNo == null ? null : carNo.trim();
+    }
+
+    public String getCreateManNo() {
+        return createManNo;
+    }
+
+    public void setCreateManNo(String createManNo) {
+        this.createManNo = createManNo == null ? null : createManNo.trim();
+    }
+
+    public String getCreateManName() {
+        return createManName;
+    }
+
+    public void setCreateManName(String createManName) {
+        this.createManName = createManName == null ? null : createManName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getValueFlag() {
+        return valueFlag;
+    }
+
+    public void setValueFlag(String valueFlag) {
+        this.valueFlag = valueFlag == null ? null : valueFlag.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", rfidId=").append(rfidId);
+        sb.append(", rfidCode=").append(rfidCode);
+        sb.append(", carNo=").append(carNo);
+        sb.append(", createManNo=").append(createManNo);
+        sb.append(", createManName=").append(createManName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", valueFlag=").append(valueFlag);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 25 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/service/IMeterBaseRfidInfoService.java

@@ -0,0 +1,25 @@
+package com.steerinfo.baseinfo.meterbaserfidinfo.service;
+
+import com.steerinfo.baseinfo.meterbaserfidinfo.model.MeterBaseRfidInfo;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.util.HashMap;
+
+/**
+ * MeterBaseRfidInfo服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-04-07 10:21
+ * 类描述
+ * 修订历史:
+ * 日期:2022-04-07
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseRfidInfo服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IMeterBaseRfidInfoService extends IBaseService<MeterBaseRfidInfo, String>{
+
+    MeterBaseRfidInfo checkAndAdd(HashMap<String, Object> map);
+
+}

+ 62 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserfidinfo/service/impl/MeterBaseRfidInfoServiceImpl.java

@@ -0,0 +1,62 @@
+package com.steerinfo.baseinfo.meterbaserfidinfo.service.impl;
+
+import com.steerinfo.baseinfo.meterbaserfidinfo.mapper.MeterBaseRfidInfoMapper;
+import com.steerinfo.baseinfo.meterbaserfidinfo.model.MeterBaseRfidInfo;
+import com.steerinfo.baseinfo.meterbaserfidinfo.service.IMeterBaseRfidInfoService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.framework.user.UserPayload;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+
+/**
+ * MeterBaseRfidInfo服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-04-07 10:21
+ * 类描述
+ * 修订历史:
+ * 日期:2022-04-07
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseRfidInfo服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "meterBaseRfidInfoService")
+public class MeterBaseRfidInfoServiceImpl extends BaseServiceImpl<MeterBaseRfidInfo, String> implements IMeterBaseRfidInfoService {
+
+    @Autowired
+    private MeterBaseRfidInfoMapper meterBaseRfidInfoMapper;
+
+    @Override
+    protected IBaseMapper<MeterBaseRfidInfo, String> getMapper() {
+        return meterBaseRfidInfoMapper;
+    }
+
+    @Override
+    public MeterBaseRfidInfo checkAndAdd(HashMap<String, Object> map) {
+        MeterBaseRfidInfo model = new MeterBaseRfidInfo();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        String no = meterBaseRfidInfoMapper.getNewID(sdf.format(new Date()));
+        model.setRfidId(sdf.format(new Date()) + no);
+        model.setRfidCode(map.get("rfidCode").toString());
+        model.setCarNo(map.get("carNo").toString());
+        model.setCreateTime(new Date());
+        UserPayload payload = UserPayload.getCurrUser();
+        String userId = payload.getId();
+        String userName = payload.getUserName();
+        model.setCreateManNo(userId);
+        model.setCreateManName(userName);
+        model.setValueFlag("0");
+        int i = meterBaseRfidInfoMapper.insertSelective(model);
+        if(i >= 1) {
+            return model;
+        }else {
+            return null;
+        }
+    }
+}

+ 1 - 1
src/main/java/com/steerinfo/baseinfo/meterbasescalepoint/controller/MeterBaseScalePointController.java

@@ -38,7 +38,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/${api.version}/meterbasescalepoints")
-@Api(value = "/${api.version}/meterbasescalepoints", tags = "秤点配置 - MeterBaseScalePointController")
+@Api(value = "/${api.version}/meterbasescalepoints", tags = "秤点配置 - Controller")
 public class MeterBaseScalePointController extends BaseRESTfulController {
 
     @Autowired

+ 319 - 63
src/main/java/com/steerinfo/baseinfo/meterbasescalepoint/mapper/MeterBaseScalePointMapper.xml

@@ -47,6 +47,16 @@
     <result column="RIGHT_INFRARED_RAY_STATE" jdbcType="VARCHAR" property="rightInfraredRayState" />
     <result column="AMPLIFIER_STATE" jdbcType="VARCHAR" property="amplifierState" />
     <result column="LAMP_STATE" jdbcType="VARCHAR" property="lampState" />
+    <result column="ENTRUST_STATE" jdbcType="VARCHAR" property="entrustState" />
+    <result column="VERSION" jdbcType="DECIMAL" property="version" />
+    <result column="SCAN_CAR" jdbcType="VARCHAR" property="scanCar" />
+    <result column="MSG_INFO" jdbcType="VARCHAR" property="msgInfo" />
+    <result column="STOP_OVER_TIME" jdbcType="VARCHAR" property="stopOverTime" />
+    <result column="VALID_IS_PRE" jdbcType="VARCHAR" property="validIsPre" />
+    <result column="RED_GREEN_LIGHT_STATE" jdbcType="VARCHAR" property="redGreenLightState" />
+    <result column="FRONT_INFRARED_RAY_STATE" jdbcType="VARCHAR" property="frontInfraredRayState" />
+    <result column="REAR_INFRARED_RAY_STATE" jdbcType="VARCHAR" property="rearInfraredRayState" />
+    <result column="RFID_STATE" jdbcType="VARCHAR" property="rfidState" />
   </resultMap>
   <sql id="columns">
     SCALE_POINT_NO, SCALE_POINT_NAME, BASE_SPOT_NO, BASE_SPOT_NAME, WEIGH_INSTRUMENT_MODEL, 
@@ -56,7 +66,9 @@
     SPOT_TYPE_NO, SPOT_TYPE_NAME, WEIGHT_ZERO, MONITOR_USER_IP, IS_HELP, IS_TAKE_OVER, 
     LED_WRITER, RFID_CAR, PHOTO_CAR, WGT_ERR, USER_IP, AI_WEIGHT, CAR_ERR, POWER_STATE, 
     DVR_STATE, MOXA_STATE, PLC_STATE, LEFT_INFRARED_RAY_STATE, RIGHT_INFRARED_RAY_STATE, 
-    AMPLIFIER_STATE, LAMP_STATE
+    AMPLIFIER_STATE, LAMP_STATE, ENTRUST_STATE, VERSION, SCAN_CAR, MSG_INFO, STOP_OVER_TIME, 
+    VALID_IS_PRE, RED_GREEN_LIGHT_STATE, FRONT_INFRARED_RAY_STATE, REAR_INFRARED_RAY_STATE, 
+    RFID_STATE
   </sql>
   <sql id="columns_alias">
     t.SCALE_POINT_NO, t.SCALE_POINT_NAME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.WEIGH_INSTRUMENT_MODEL, 
@@ -67,13 +79,15 @@
     t.MONITOR_USER_IP, t.IS_HELP, t.IS_TAKE_OVER, t.LED_WRITER, t.RFID_CAR, t.PHOTO_CAR, 
     t.WGT_ERR, t.USER_IP, t.AI_WEIGHT, t.CAR_ERR, t.POWER_STATE, t.DVR_STATE, t.MOXA_STATE, 
     t.PLC_STATE, t.LEFT_INFRARED_RAY_STATE, t.RIGHT_INFRARED_RAY_STATE, t.AMPLIFIER_STATE, 
-    t.LAMP_STATE
+    t.LAMP_STATE, t.ENTRUST_STATE, t.VERSION, t.SCAN_CAR, t.MSG_INFO, t.STOP_OVER_TIME, 
+    t.VALID_IS_PRE, t.RED_GREEN_LIGHT_STATE, t.FRONT_INFRARED_RAY_STATE, t.REAR_INFRARED_RAY_STATE, 
+    t.RFID_STATE
   </sql>
   <sql id="select">
-    SELECT <include refid="columns"/> FROM METER_BASE_SCALE_POINT
+    SELECT <include refid="columns" /> FROM METER_BASE_SCALE_POINT
   </sql>
   <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM METER_BASE_SCALE_POINT t
+    SELECT <include refid="columns_alias" /> FROM METER_BASE_SCALE_POINT t
   </sql>
   <sql id="where">
     <where> 
@@ -212,6 +226,36 @@
       <if test="lampState != null and lampState != ''">
         and LAMP_STATE = #{lampState}
       </if>
+      <if test="entrustState != null and entrustState != ''">
+        and ENTRUST_STATE = #{entrustState}
+      </if>
+      <if test="version != null">
+        and VERSION = #{version}
+      </if>
+      <if test="scanCar != null and scanCar != ''">
+        and SCAN_CAR = #{scanCar}
+      </if>
+      <if test="msgInfo != null and msgInfo != ''">
+        and MSG_INFO = #{msgInfo}
+      </if>
+      <if test="stopOverTime != null and stopOverTime != ''">
+        and STOP_OVER_TIME = #{stopOverTime}
+      </if>
+      <if test="validIsPre != null and validIsPre != ''">
+        and VALID_IS_PRE = #{validIsPre}
+      </if>
+      <if test="redGreenLightState != null and redGreenLightState != ''">
+        and RED_GREEN_LIGHT_STATE = #{redGreenLightState}
+      </if>
+      <if test="frontInfraredRayState != null and frontInfraredRayState != ''">
+        and FRONT_INFRARED_RAY_STATE = #{frontInfraredRayState}
+      </if>
+      <if test="rearInfraredRayState != null and rearInfraredRayState != ''">
+        and REAR_INFRARED_RAY_STATE = #{rearInfraredRayState}
+      </if>
+      <if test="rfidState != null and rfidState != ''">
+        and RFID_STATE = #{rfidState}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -351,6 +395,36 @@
       <if test="lampState != null and lampState != ''">
         and LAMP_STATE LIKE '%${lampState}%'
       </if>
+      <if test="entrustState != null and entrustState != ''">
+        and ENTRUST_STATE LIKE '%${entrustState}%'
+      </if>
+      <if test="version != null">
+        and VERSION = #{version}
+      </if>
+      <if test="scanCar != null and scanCar != ''">
+        and SCAN_CAR LIKE '%${scanCar}%'
+      </if>
+      <if test="msgInfo != null and msgInfo != ''">
+        and MSG_INFO LIKE '%${msgInfo}%'
+      </if>
+      <if test="stopOverTime != null and stopOverTime != ''">
+        and STOP_OVER_TIME LIKE '%${stopOverTime}%'
+      </if>
+      <if test="validIsPre != null and validIsPre != ''">
+        and VALID_IS_PRE LIKE '%${validIsPre}%'
+      </if>
+      <if test="redGreenLightState != null and redGreenLightState != ''">
+        and RED_GREEN_LIGHT_STATE LIKE '%${redGreenLightState}%'
+      </if>
+      <if test="frontInfraredRayState != null and frontInfraredRayState != ''">
+        and FRONT_INFRARED_RAY_STATE LIKE '%${frontInfraredRayState}%'
+      </if>
+      <if test="rearInfraredRayState != null and rearInfraredRayState != ''">
+        and REAR_INFRARED_RAY_STATE LIKE '%${rearInfraredRayState}%'
+      </if>
+      <if test="rfidState != null and rfidState != ''">
+        and RFID_STATE LIKE '%${rfidState}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -492,6 +566,36 @@
       <if test="lampState != null and lampState != ''">
         or LAMP_STATE = #{lampState}
       </if>
+      <if test="entrustState != null and entrustState != ''">
+        or ENTRUST_STATE = #{entrustState}
+      </if>
+      <if test="version != null">
+        or VERSION = #{version}
+      </if>
+      <if test="scanCar != null and scanCar != ''">
+        or SCAN_CAR = #{scanCar}
+      </if>
+      <if test="msgInfo != null and msgInfo != ''">
+        or MSG_INFO = #{msgInfo}
+      </if>
+      <if test="stopOverTime != null and stopOverTime != ''">
+        or STOP_OVER_TIME = #{stopOverTime}
+      </if>
+      <if test="validIsPre != null and validIsPre != ''">
+        or VALID_IS_PRE = #{validIsPre}
+      </if>
+      <if test="redGreenLightState != null and redGreenLightState != ''">
+        or RED_GREEN_LIGHT_STATE = #{redGreenLightState}
+      </if>
+      <if test="frontInfraredRayState != null and frontInfraredRayState != ''">
+        or FRONT_INFRARED_RAY_STATE = #{frontInfraredRayState}
+      </if>
+      <if test="rearInfraredRayState != null and rearInfraredRayState != ''">
+        or REAR_INFRARED_RAY_STATE = #{rearInfraredRayState}
+      </if>
+      <if test="rfidState != null and rfidState != ''">
+        or RFID_STATE = #{rfidState}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasescalepoint.model.MeterBaseScalePoint">
     insert into METER_BASE_SCALE_POINT (SCALE_POINT_NO, SCALE_POINT_NAME, BASE_SPOT_NO, 
@@ -509,7 +613,10 @@
       CAR_ERR, POWER_STATE, DVR_STATE, 
       MOXA_STATE, PLC_STATE, LEFT_INFRARED_RAY_STATE, 
       RIGHT_INFRARED_RAY_STATE, AMPLIFIER_STATE, 
-      LAMP_STATE)
+      LAMP_STATE, ENTRUST_STATE, VERSION, 
+      SCAN_CAR, MSG_INFO, STOP_OVER_TIME, 
+      VALID_IS_PRE, RED_GREEN_LIGHT_STATE, FRONT_INFRARED_RAY_STATE, 
+      REAR_INFRARED_RAY_STATE, RFID_STATE)
     values (#{scalePointNo,jdbcType=VARCHAR}, #{scalePointName,jdbcType=VARCHAR}, #{baseSpotNo,jdbcType=VARCHAR}, 
       #{baseSpotName,jdbcType=VARCHAR}, #{weighInstrumentModel,jdbcType=VARCHAR}, #{weighInstrumentParam,jdbcType=VARCHAR}, 
       #{moxaIp,jdbcType=VARCHAR}, #{moxaPort,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, 
@@ -525,7 +632,10 @@
       #{carErr,jdbcType=VARCHAR}, #{powerState,jdbcType=VARCHAR}, #{dvrState,jdbcType=VARCHAR}, 
       #{moxaState,jdbcType=VARCHAR}, #{plcState,jdbcType=VARCHAR}, #{leftInfraredRayState,jdbcType=VARCHAR}, 
       #{rightInfraredRayState,jdbcType=VARCHAR}, #{amplifierState,jdbcType=VARCHAR}, 
-      #{lampState,jdbcType=VARCHAR})
+      #{lampState,jdbcType=VARCHAR}, #{entrustState,jdbcType=VARCHAR}, #{version,jdbcType=DECIMAL}, 
+      #{scanCar,jdbcType=VARCHAR}, #{msgInfo,jdbcType=VARCHAR}, #{stopOverTime,jdbcType=VARCHAR}, 
+      #{validIsPre,jdbcType=VARCHAR}, #{redGreenLightState,jdbcType=VARCHAR}, #{frontInfraredRayState,jdbcType=VARCHAR}, 
+      #{rearInfraredRayState,jdbcType=VARCHAR}, #{rfidState,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasescalepoint.model.MeterBaseScalePoint">
     insert into METER_BASE_SCALE_POINT
@@ -665,6 +775,36 @@
       <if test="lampState != null">
         LAMP_STATE,
       </if>
+      <if test="entrustState != null">
+        ENTRUST_STATE,
+      </if>
+      <if test="version != null">
+        VERSION,
+      </if>
+      <if test="scanCar != null">
+        SCAN_CAR,
+      </if>
+      <if test="msgInfo != null">
+        MSG_INFO,
+      </if>
+      <if test="stopOverTime != null">
+        STOP_OVER_TIME,
+      </if>
+      <if test="validIsPre != null">
+        VALID_IS_PRE,
+      </if>
+      <if test="redGreenLightState != null">
+        RED_GREEN_LIGHT_STATE,
+      </if>
+      <if test="frontInfraredRayState != null">
+        FRONT_INFRARED_RAY_STATE,
+      </if>
+      <if test="rearInfraredRayState != null">
+        REAR_INFRARED_RAY_STATE,
+      </if>
+      <if test="rfidState != null">
+        RFID_STATE,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="scalePointNo != null">
@@ -802,6 +942,36 @@
       <if test="lampState != null">
         #{lampState,jdbcType=VARCHAR},
       </if>
+      <if test="entrustState != null">
+        #{entrustState,jdbcType=VARCHAR},
+      </if>
+      <if test="version != null">
+        #{version,jdbcType=DECIMAL},
+      </if>
+      <if test="scanCar != null">
+        #{scanCar,jdbcType=VARCHAR},
+      </if>
+      <if test="msgInfo != null">
+        #{msgInfo,jdbcType=VARCHAR},
+      </if>
+      <if test="stopOverTime != null">
+        #{stopOverTime,jdbcType=VARCHAR},
+      </if>
+      <if test="validIsPre != null">
+        #{validIsPre,jdbcType=VARCHAR},
+      </if>
+      <if test="redGreenLightState != null">
+        #{redGreenLightState,jdbcType=VARCHAR},
+      </if>
+      <if test="frontInfraredRayState != null">
+        #{frontInfraredRayState,jdbcType=VARCHAR},
+      </if>
+      <if test="rearInfraredRayState != null">
+        #{rearInfraredRayState,jdbcType=VARCHAR},
+      </if>
+      <if test="rfidState != null">
+        #{rfidState,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasescalepoint.model.MeterBaseScalePoint">
@@ -849,7 +1019,17 @@
       LEFT_INFRARED_RAY_STATE = #{leftInfraredRayState,jdbcType=VARCHAR},
       RIGHT_INFRARED_RAY_STATE = #{rightInfraredRayState,jdbcType=VARCHAR},
       AMPLIFIER_STATE = #{amplifierState,jdbcType=VARCHAR},
-      LAMP_STATE = #{lampState,jdbcType=VARCHAR}
+      LAMP_STATE = #{lampState,jdbcType=VARCHAR},
+      ENTRUST_STATE = #{entrustState,jdbcType=VARCHAR},
+      VERSION = #{version,jdbcType=DECIMAL},
+      SCAN_CAR = #{scanCar,jdbcType=VARCHAR},
+      MSG_INFO = #{msgInfo,jdbcType=VARCHAR},
+      STOP_OVER_TIME = #{stopOverTime,jdbcType=VARCHAR},
+      VALID_IS_PRE = #{validIsPre,jdbcType=VARCHAR},
+      RED_GREEN_LIGHT_STATE = #{redGreenLightState,jdbcType=VARCHAR},
+      FRONT_INFRARED_RAY_STATE = #{frontInfraredRayState,jdbcType=VARCHAR},
+      REAR_INFRARED_RAY_STATE = #{rearInfraredRayState,jdbcType=VARCHAR},
+      RFID_STATE = #{rfidState,jdbcType=VARCHAR}
     where SCALE_POINT_NO = #{scalePointNo,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasescalepoint.model.MeterBaseScalePoint">
@@ -987,20 +1167,50 @@
       <if test="lampState != null">
         LAMP_STATE = #{lampState,jdbcType=VARCHAR},
       </if>
+      <if test="entrustState != null">
+        ENTRUST_STATE = #{entrustState,jdbcType=VARCHAR},
+      </if>
+      <if test="version != null">
+        VERSION = #{version,jdbcType=DECIMAL},
+      </if>
+      <if test="scanCar != null">
+        SCAN_CAR = #{scanCar,jdbcType=VARCHAR},
+      </if>
+      <if test="msgInfo != null">
+        MSG_INFO = #{msgInfo,jdbcType=VARCHAR},
+      </if>
+      <if test="stopOverTime != null">
+        STOP_OVER_TIME = #{stopOverTime,jdbcType=VARCHAR},
+      </if>
+      <if test="validIsPre != null">
+        VALID_IS_PRE = #{validIsPre,jdbcType=VARCHAR},
+      </if>
+      <if test="redGreenLightState != null">
+        RED_GREEN_LIGHT_STATE = #{redGreenLightState,jdbcType=VARCHAR},
+      </if>
+      <if test="frontInfraredRayState != null">
+        FRONT_INFRARED_RAY_STATE = #{frontInfraredRayState,jdbcType=VARCHAR},
+      </if>
+      <if test="rearInfraredRayState != null">
+        REAR_INFRARED_RAY_STATE = #{rearInfraredRayState,jdbcType=VARCHAR},
+      </if>
+      <if test="rfidState != null">
+        RFID_STATE = #{rfidState,jdbcType=VARCHAR},
+      </if>
     </set>
     where SCALE_POINT_NO = #{scalePointNo,jdbcType=VARCHAR}
   </update>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    <include refid="select"/>
+    <include refid="select" />
     where SCALE_POINT_NO = #{scalePointNo,jdbcType=VARCHAR}
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
+    <include refid="select" />
+    <include refid="where" />
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
+    <include refid="select" />
+    <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
     insert into METER_BASE_SCALE_POINT 
@@ -1020,7 +1230,11 @@
       CAR_ERR, POWER_STATE, DVR_STATE, 
       MOXA_STATE, PLC_STATE, LEFT_INFRARED_RAY_STATE, 
       RIGHT_INFRARED_RAY_STATE, AMPLIFIER_STATE, 
-      LAMP_STATE)
+      LAMP_STATE, ENTRUST_STATE, VERSION, 
+      SCAN_CAR, MSG_INFO, STOP_OVER_TIME, 
+      VALID_IS_PRE, RED_GREEN_LIGHT_STATE, 
+      FRONT_INFRARED_RAY_STATE, REAR_INFRARED_RAY_STATE, 
+      RFID_STATE)
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.scalePointNo,jdbcType=VARCHAR}, 
@@ -1039,208 +1253,250 @@
       #{item.carErr,jdbcType=VARCHAR}, #{item.powerState,jdbcType=VARCHAR}, #{item.dvrState,jdbcType=VARCHAR}, 
       #{item.moxaState,jdbcType=VARCHAR}, #{item.plcState,jdbcType=VARCHAR}, #{item.leftInfraredRayState,jdbcType=VARCHAR}, 
       #{item.rightInfraredRayState,jdbcType=VARCHAR}, #{item.amplifierState,jdbcType=VARCHAR}, 
-      #{item.lampState,jdbcType=VARCHAR} from dual  
+      #{item.lampState,jdbcType=VARCHAR}, #{item.entrustState,jdbcType=VARCHAR}, #{item.version,jdbcType=DECIMAL}, 
+      #{item.scanCar,jdbcType=VARCHAR}, #{item.msgInfo,jdbcType=VARCHAR}, #{item.stopOverTime,jdbcType=VARCHAR}, 
+      #{item.validIsPre,jdbcType=VARCHAR}, #{item.redGreenLightState,jdbcType=VARCHAR}, 
+      #{item.frontInfraredRayState,jdbcType=VARCHAR}, #{item.rearInfraredRayState,jdbcType=VARCHAR}, 
+      #{item.rfidState,jdbcType=VARCHAR} from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
      update METER_BASE_SCALE_POINT
      set
        SCALE_POINT_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.scalePointNo,jdbcType=VARCHAR}
        </foreach>
        ,SCALE_POINT_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.scalePointName,jdbcType=VARCHAR}
        </foreach>
        ,BASE_SPOT_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
        </foreach>
        ,BASE_SPOT_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
        </foreach>
        ,WEIGH_INSTRUMENT_MODEL=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.weighInstrumentModel,jdbcType=VARCHAR}
        </foreach>
        ,WEIGH_INSTRUMENT_PARAM=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.weighInstrumentParam,jdbcType=VARCHAR}
        </foreach>
        ,MOXA_IP=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.moxaIp,jdbcType=VARCHAR}
        </foreach>
        ,MOXA_PORT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.moxaPort,jdbcType=VARCHAR}
        </foreach>
        ,VALID_FLAG=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
        </foreach>
        ,LAST_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.lastTime,jdbcType=TIMESTAMP}
        </foreach>
        ,WEIGHT_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.weightTime,jdbcType=TIMESTAMP}
        </foreach>
        ,USER_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.userNo,jdbcType=VARCHAR}
        </foreach>
        ,MONITOR_USER_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.monitorUserNo,jdbcType=VARCHAR}
        </foreach>
        ,WEIGHT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.weight,jdbcType=DECIMAL}
        </foreach>
        ,COLLECTION_CODE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.collectionCode,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
        ,UPDATE_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
        ,DELETE_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
        </foreach>
        ,DELETE_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
        </foreach>
        ,DELETE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
        </foreach>
        ,SPOT_TYPE_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.spotTypeNo,jdbcType=VARCHAR}
        </foreach>
        ,SPOT_TYPE_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.spotTypeName,jdbcType=VARCHAR}
        </foreach>
        ,WEIGHT_ZERO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.weightZero,jdbcType=DECIMAL}
        </foreach>
        ,MONITOR_USER_IP=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.monitorUserIp,jdbcType=VARCHAR}
        </foreach>
        ,IS_HELP=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.isHelp,jdbcType=VARCHAR}
        </foreach>
        ,IS_TAKE_OVER=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.isTakeOver,jdbcType=VARCHAR}
        </foreach>
        ,LED_WRITER=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.ledWriter,jdbcType=VARCHAR}
        </foreach>
        ,RFID_CAR=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.rfidCar,jdbcType=VARCHAR}
        </foreach>
        ,PHOTO_CAR=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.photoCar,jdbcType=VARCHAR}
        </foreach>
        ,WGT_ERR=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.wgtErr,jdbcType=VARCHAR}
        </foreach>
        ,USER_IP=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.userIp,jdbcType=VARCHAR}
        </foreach>
        ,AI_WEIGHT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.aiWeight,jdbcType=VARCHAR}
        </foreach>
        ,CAR_ERR=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.carErr,jdbcType=VARCHAR}
        </foreach>
        ,POWER_STATE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.powerState,jdbcType=VARCHAR}
        </foreach>
        ,DVR_STATE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.dvrState,jdbcType=VARCHAR}
        </foreach>
        ,MOXA_STATE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.moxaState,jdbcType=VARCHAR}
        </foreach>
        ,PLC_STATE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.plcState,jdbcType=VARCHAR}
        </foreach>
        ,LEFT_INFRARED_RAY_STATE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.leftInfraredRayState,jdbcType=VARCHAR}
        </foreach>
        ,RIGHT_INFRARED_RAY_STATE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.rightInfraredRayState,jdbcType=VARCHAR}
        </foreach>
        ,AMPLIFIER_STATE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.amplifierState,jdbcType=VARCHAR}
        </foreach>
        ,LAMP_STATE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case SCALE_POINT_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
           when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.lampState,jdbcType=VARCHAR}
        </foreach>
+       ,ENTRUST_STATE=
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
+          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.entrustState,jdbcType=VARCHAR}
+       </foreach>
+       ,VERSION=
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
+          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.version,jdbcType=DECIMAL}
+       </foreach>
+       ,SCAN_CAR=
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
+          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.scanCar,jdbcType=VARCHAR}
+       </foreach>
+       ,MSG_INFO=
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
+          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.msgInfo,jdbcType=VARCHAR}
+       </foreach>
+       ,STOP_OVER_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
+          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.stopOverTime,jdbcType=VARCHAR}
+       </foreach>
+       ,VALID_IS_PRE=
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
+          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.validIsPre,jdbcType=VARCHAR}
+       </foreach>
+       ,RED_GREEN_LIGHT_STATE=
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
+          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.redGreenLightState,jdbcType=VARCHAR}
+       </foreach>
+       ,FRONT_INFRARED_RAY_STATE=
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
+          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.frontInfraredRayState,jdbcType=VARCHAR}
+       </foreach>
+       ,REAR_INFRARED_RAY_STATE=
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
+          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.rearInfraredRayState,jdbcType=VARCHAR}
+       </foreach>
+       ,RFID_STATE=
+       <foreach close="end" collection="list" index="index" item="item" open="case SCALE_POINT_NO" separator=" ">
+          when #{item.scalePointNo,jdbcType=VARCHAR} then #{item.rfidState,jdbcType=VARCHAR}
+       </foreach>
      where SCALE_POINT_NO in 
-     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.scalePointNo,jdbcType=VARCHAR}
      </foreach> 
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from METER_BASE_SCALE_POINT
     where SCALE_POINT_NO in 
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  <!-- 友情提示!!!-->
-  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
     SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(SCALE_POINT_NO, LENGTH(SCALE_POINT_NO) - 2))),0) + 1,3,'0') SCALE_POINT_NO
     FROM METER_BASE_SCALE_POINT where instr(SCALE_POINT_NO,#{baseSpotNo,jdbcType=VARCHAR})>0

+ 151 - 0
src/main/java/com/steerinfo/baseinfo/meterbasescalepoint/model/MeterBaseScalePoint.java

@@ -3,6 +3,7 @@ package com.steerinfo.baseinfo.meterbasescalepoint.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -278,6 +279,66 @@ public class MeterBaseScalePoint implements IBasePO<String> {
     @ApiModelProperty(value="照明灯状态(0正常 1异常)",required=false)
     private String lampState;
 
+    /**
+     * 确认计量状态(0未确认 1已确认)(ENTRUST_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="确认计量状态(0未确认 1已确认)",required=false)
+    private String entrustState;
+
+    /**
+     * 乐观锁(版本号)每次更新时比较版本是否相同,相同就修改并加1,不相同不修改(VERSION,DECIMAL,0)
+     */
+    @ApiModelProperty(value="乐观锁(版本号)每次更新时比较版本是否相同,相同就修改并加1,不相同不修改",required=false)
+    private Short version;
+
+    /**
+     * 扫描车号(SCAN_CAR,VARCHAR,20)
+     */
+    @ApiModelProperty(value="扫描车号",required=false)
+    private String scanCar;
+
+    /**
+     * 现场终端提示信息(MSG_INFO,VARCHAR,400)
+     */
+    @ApiModelProperty(value="现场终端提示信息",required=false)
+    private String msgInfo;
+
+    /**
+     * 0:正常 1:停留超时(STOP_OVER_TIME,VARCHAR,1)
+     */
+    @ApiModelProperty(value="0:正常 1:停留超时",required=false)
+    private String stopOverTime;
+
+    /**
+     * 委托异常 0:正常  1:异常(VALID_IS_PRE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="委托异常 0:正常  1:异常",required=false)
+    private String validIsPre;
+
+    /**
+     * 红绿灯状态(0绿灯 1红灯)(RED_GREEN_LIGHT_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="红绿灯状态(0绿灯 1红灯)",required=false)
+    private String redGreenLightState;
+
+    /**
+     * 前红外光栅状态(0正常 1异常)(FRONT_INFRARED_RAY_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="前红外光栅状态(0正常 1异常)",required=false)
+    private String frontInfraredRayState;
+
+    /**
+     * 后红外光栅状态(0正常 1异常)(REAR_INFRARED_RAY_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="后红外光栅状态(0正常 1异常)",required=false)
+    private String rearInfraredRayState;
+
+    /**
+     * rfid状态(0正常 1异常)(RFID_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="rfid状态(0正常 1异常)",required=false)
+    private String rfidState;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -650,6 +711,86 @@ public class MeterBaseScalePoint implements IBasePO<String> {
         this.lampState = lampState == null ? null : lampState.trim();
     }
 
+    public String getEntrustState() {
+        return entrustState;
+    }
+
+    public void setEntrustState(String entrustState) {
+        this.entrustState = entrustState == null ? null : entrustState.trim();
+    }
+
+    public Short getVersion() {
+        return version;
+    }
+
+    public void setVersion(Short version) {
+        this.version = version;
+    }
+
+    public String getScanCar() {
+        return scanCar;
+    }
+
+    public void setScanCar(String scanCar) {
+        this.scanCar = scanCar == null ? null : scanCar.trim();
+    }
+
+    public String getMsgInfo() {
+        return msgInfo;
+    }
+
+    public void setMsgInfo(String msgInfo) {
+        this.msgInfo = msgInfo == null ? null : msgInfo.trim();
+    }
+
+    public String getStopOverTime() {
+        return stopOverTime;
+    }
+
+    public void setStopOverTime(String stopOverTime) {
+        this.stopOverTime = stopOverTime == null ? null : stopOverTime.trim();
+    }
+
+    public String getValidIsPre() {
+        return validIsPre;
+    }
+
+    public void setValidIsPre(String validIsPre) {
+        this.validIsPre = validIsPre == null ? null : validIsPre.trim();
+    }
+
+    public String getRedGreenLightState() {
+        return redGreenLightState;
+    }
+
+    public void setRedGreenLightState(String redGreenLightState) {
+        this.redGreenLightState = redGreenLightState == null ? null : redGreenLightState.trim();
+    }
+
+    public String getFrontInfraredRayState() {
+        return frontInfraredRayState;
+    }
+
+    public void setFrontInfraredRayState(String frontInfraredRayState) {
+        this.frontInfraredRayState = frontInfraredRayState == null ? null : frontInfraredRayState.trim();
+    }
+
+    public String getRearInfraredRayState() {
+        return rearInfraredRayState;
+    }
+
+    public void setRearInfraredRayState(String rearInfraredRayState) {
+        this.rearInfraredRayState = rearInfraredRayState == null ? null : rearInfraredRayState.trim();
+    }
+
+    public String getRfidState() {
+        return rfidState;
+    }
+
+    public void setRfidState(String rfidState) {
+        this.rfidState = rfidState == null ? null : rfidState.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -701,6 +842,16 @@ public class MeterBaseScalePoint implements IBasePO<String> {
         sb.append(", rightInfraredRayState=").append(rightInfraredRayState);
         sb.append(", amplifierState=").append(amplifierState);
         sb.append(", lampState=").append(lampState);
+        sb.append(", entrustState=").append(entrustState);
+        sb.append(", version=").append(version);
+        sb.append(", scanCar=").append(scanCar);
+        sb.append(", msgInfo=").append(msgInfo);
+        sb.append(", stopOverTime=").append(stopOverTime);
+        sb.append(", validIsPre=").append(validIsPre);
+        sb.append(", redGreenLightState=").append(redGreenLightState);
+        sb.append(", frontInfraredRayState=").append(frontInfraredRayState);
+        sb.append(", rearInfraredRayState=").append(rearInfraredRayState);
+        sb.append(", rfidState=").append(rfidState);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 19 - 0
src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/controller/MeterBaseSpotInfoController.java

@@ -14,11 +14,13 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import org.hibernate.validator.constraints.pl.REGON;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -46,6 +48,9 @@ public class MeterBaseSpotInfoController extends BaseRESTfulController {
     @Autowired
     IMeterBaseSpotInfoService meterBaseSpotInfoService;
 
+    @Resource
+    MeterBaseSpotInfoMapper meterBaseSpotInfoMapper;
+
 
     @ApiOperation(value = "获取列表", notes = "分页查询")
     @ApiImplicitParams({
@@ -294,4 +299,18 @@ public class MeterBaseSpotInfoController extends BaseRESTfulController {
         }
 
     }
+
+    @ApiOperation(value = "通过userID获取列表", notes = "不分页查询")
+    @GetMapping(value = "/selectSpotByUserID")
+    public RESTfulResult selectSpotByUserID(@RequestParam String userID) {
+        try {
+            HashMap map = new HashMap();
+            map.put("userID",userID);
+            List<MeterBaseSpotInfo> list = meterBaseSpotInfoMapper.selectSpotByUserID(map);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
 }

+ 2 - 0
src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/mapper/MeterBaseSpotInfoMapper.java

@@ -19,4 +19,6 @@ public interface MeterBaseSpotInfoMapper extends IBaseMapper<MeterBaseSpotInfo,
      List<MeterBaseSpotInfo> selectcorrelation();
 
      List<MeterBaseSpotInfo> calibcorrelation();
+
+     List<MeterBaseSpotInfo> selectSpotByUserID(Map<String, Object> parameters);
 }

+ 342 - 318
src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/mapper/MeterBaseSpotInfoMapper.xml

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.baseinfo.meterbasespotinfo.mapper.MeterBaseSpotInfoMapper">
-
   <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
     <id column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
     <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
@@ -33,30 +32,31 @@
     <result column="MES_SPOT_ID" jdbcType="VARCHAR" property="mesSpotId" />
     <result column="SPOT_AREA_NO" jdbcType="VARCHAR" property="spotAreaNo" />
     <result column="SPOT_AREA_NAME" jdbcType="VARCHAR" property="spotAreaName" />
+    <result column="ALLOWED_TARE_WEIGHT" jdbcType="VARCHAR" property="allowedTareWeight" />
   </resultMap>
   <sql id="columns">
-    BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO, SPOT_TYPE_NAME, SPOT_STATE_NO, SPOT_STATE_NAME,
-    VIDEO_IP, VIDEO_PORT, VIDEO_USER_NAME, VIDEO_PASSWORD, LED_IP, PRINTER_IP, PRINTER_NAME,
-    COUNT_NUM, USED_NUM, CONTROL_IP, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME,
-    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME,
-    FLAT_COMPUTER_IP, MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME
+    BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO, SPOT_TYPE_NAME, SPOT_STATE_NO, SPOT_STATE_NAME, 
+    VIDEO_IP, VIDEO_PORT, VIDEO_USER_NAME, VIDEO_PASSWORD, LED_IP, PRINTER_IP, PRINTER_NAME, 
+    COUNT_NUM, USED_NUM, CONTROL_IP, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
+    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
+    FLAT_COMPUTER_IP, MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, ALLOWED_TARE_WEIGHT
   </sql>
   <sql id="columns_alias">
-    t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.SPOT_TYPE_NO, t.SPOT_TYPE_NAME, t.SPOT_STATE_NO,
-    t.SPOT_STATE_NAME, t.VIDEO_IP, t.VIDEO_PORT, t.VIDEO_USER_NAME, t.VIDEO_PASSWORD,
-    t.LED_IP, t.PRINTER_IP, t.PRINTER_NAME, t.COUNT_NUM, t.USED_NUM, t.CONTROL_IP, t.VALID_FLAG,
-    t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME,
-    t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, t.DELETE_TIME, t.FLAT_COMPUTER_IP,
-    t.MES_SPOT_ID, t.SPOT_AREA_NO, t.SPOT_AREA_NAME
+    t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.SPOT_TYPE_NO, t.SPOT_TYPE_NAME, t.SPOT_STATE_NO, 
+    t.SPOT_STATE_NAME, t.VIDEO_IP, t.VIDEO_PORT, t.VIDEO_USER_NAME, t.VIDEO_PASSWORD, 
+    t.LED_IP, t.PRINTER_IP, t.PRINTER_NAME, t.COUNT_NUM, t.USED_NUM, t.CONTROL_IP, t.VALID_FLAG, 
+    t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, 
+    t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, t.DELETE_TIME, t.FLAT_COMPUTER_IP, 
+    t.MES_SPOT_ID, t.SPOT_AREA_NO, t.SPOT_AREA_NAME, t.ALLOWED_TARE_WEIGHT
   </sql>
   <sql id="select">
-    SELECT <include refid="columns"/> FROM METER_BASE_SPOT_INFO
+    SELECT <include refid="columns" /> FROM METER_BASE_SPOT_INFO
   </sql>
   <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM METER_BASE_SPOT_INFO t
+    SELECT <include refid="columns_alias" /> FROM METER_BASE_SPOT_INFO t
   </sql>
   <sql id="where">
-    <where>
+    <where> 
       <if test="baseSpotNo != null and baseSpotNo != ''">
         and BASE_SPOT_NO = #{baseSpotNo}
       </if>
@@ -147,10 +147,13 @@
       <if test="spotAreaName != null and spotAreaName != ''">
         and SPOT_AREA_NAME = #{spotAreaName}
       </if>
+      <if test="allowedTareWeight != null and allowedTareWeight != ''">
+        and ALLOWED_TARE_WEIGHT = #{allowedTareWeight}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where>
+    <where> 
       <if test="baseSpotNo != null and baseSpotNo != ''">
         and BASE_SPOT_NO LIKE '%${baseSpotNo}%'
       </if>
@@ -241,6 +244,9 @@
       <if test="spotAreaName != null and spotAreaName != ''">
         and SPOT_AREA_NAME LIKE '%${spotAreaName}%'
       </if>
+      <if test="allowedTareWeight != null and allowedTareWeight != ''">
+        and ALLOWED_TARE_WEIGHT LIKE '%${allowedTareWeight}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -249,118 +255,121 @@
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from METER_BASE_SPOT_INFO
-    where 1!=1
-    <if test="baseSpotName != null and baseSpotName != ''">
-      or BASE_SPOT_NAME = #{baseSpotName}
-    </if>
-    <if test="spotTypeNo != null and spotTypeNo != ''">
-      or SPOT_TYPE_NO = #{spotTypeNo}
-    </if>
-    <if test="spotTypeName != null and spotTypeName != ''">
-      or SPOT_TYPE_NAME = #{spotTypeName}
-    </if>
-    <if test="spotStateNo != null and spotStateNo != ''">
-      or SPOT_STATE_NO = #{spotStateNo}
-    </if>
-    <if test="spotStateName != null and spotStateName != ''">
-      or SPOT_STATE_NAME = #{spotStateName}
-    </if>
-    <if test="videoIp != null and videoIp != ''">
-      or VIDEO_IP = #{videoIp}
-    </if>
-    <if test="videoPort != null and videoPort != ''">
-      or VIDEO_PORT = #{videoPort}
-    </if>
-    <if test="videoUserName != null and videoUserName != ''">
-      or VIDEO_USER_NAME = #{videoUserName}
-    </if>
-    <if test="videoPassword != null and videoPassword != ''">
-      or VIDEO_PASSWORD = #{videoPassword}
-    </if>
-    <if test="ledIp != null and ledIp != ''">
-      or LED_IP = #{ledIp}
-    </if>
-    <if test="printerIp != null and printerIp != ''">
-      or PRINTER_IP = #{printerIp}
-    </if>
-    <if test="printerName != null and printerName != ''">
-      or PRINTER_NAME = #{printerName}
-    </if>
-    <if test="countNum != null">
-      or COUNT_NUM = #{countNum}
-    </if>
-    <if test="usedNum != null">
-      or USED_NUM = #{usedNum}
-    </if>
-    <if test="controlIp != null and controlIp != ''">
-      or CONTROL_IP = #{controlIp}
-    </if>
-    <if test="validFlag != null and validFlag != ''">
-      or VALID_FLAG = #{validFlag}
-    </if>
-    <if test="createManNo != null and createManNo != ''">
-      or CREATE_MAN_NO = #{createManNo}
-    </if>
-    <if test="createManName != null and createManName != ''">
-      or CREATE_MAN_NAME = #{createManName}
-    </if>
-    <if test="createTime != null">
-      or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
-    </if>
-    <if test="updateManNo != null and updateManNo != ''">
-      or UPDATE_MAN_NO = #{updateManNo}
-    </if>
-    <if test="updateManName != null and updateManName != ''">
-      or UPDATE_MAN_NAME = #{updateManName}
-    </if>
-    <if test="updateTime != null">
-      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
-    </if>
-    <if test="deleteManNo != null and deleteManNo != ''">
-      or DELETE_MAN_NO = #{deleteManNo}
-    </if>
-    <if test="deleteManName != null and deleteManName != ''">
-      or DELETE_MAN_NAME = #{deleteManName}
-    </if>
-    <if test="deleteTime != null">
-      or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
-    </if>
-    <if test="flatComputerIp != null and flatComputerIp != ''">
-      or FLAT_COMPUTER_IP = #{flatComputerIp}
-    </if>
-    <if test="mesSpotId != null and mesSpotId != ''">
-      or MES_SPOT_ID = #{mesSpotId}
-    </if>
-    <if test="spotAreaNo != null and spotAreaNo != ''">
-      or SPOT_AREA_NO = #{spotAreaNo}
-    </if>
-    <if test="spotAreaName != null and spotAreaName != ''">
-      or SPOT_AREA_NAME = #{spotAreaName}
-    </if>
+    where 1!=1 
+      <if test="baseSpotName != null and baseSpotName != ''">
+        or BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="spotTypeNo != null and spotTypeNo != ''">
+        or SPOT_TYPE_NO = #{spotTypeNo}
+      </if>
+      <if test="spotTypeName != null and spotTypeName != ''">
+        or SPOT_TYPE_NAME = #{spotTypeName}
+      </if>
+      <if test="spotStateNo != null and spotStateNo != ''">
+        or SPOT_STATE_NO = #{spotStateNo}
+      </if>
+      <if test="spotStateName != null and spotStateName != ''">
+        or SPOT_STATE_NAME = #{spotStateName}
+      </if>
+      <if test="videoIp != null and videoIp != ''">
+        or VIDEO_IP = #{videoIp}
+      </if>
+      <if test="videoPort != null and videoPort != ''">
+        or VIDEO_PORT = #{videoPort}
+      </if>
+      <if test="videoUserName != null and videoUserName != ''">
+        or VIDEO_USER_NAME = #{videoUserName}
+      </if>
+      <if test="videoPassword != null and videoPassword != ''">
+        or VIDEO_PASSWORD = #{videoPassword}
+      </if>
+      <if test="ledIp != null and ledIp != ''">
+        or LED_IP = #{ledIp}
+      </if>
+      <if test="printerIp != null and printerIp != ''">
+        or PRINTER_IP = #{printerIp}
+      </if>
+      <if test="printerName != null and printerName != ''">
+        or PRINTER_NAME = #{printerName}
+      </if>
+      <if test="countNum != null">
+        or COUNT_NUM = #{countNum}
+      </if>
+      <if test="usedNum != null">
+        or USED_NUM = #{usedNum}
+      </if>
+      <if test="controlIp != null and controlIp != ''">
+        or CONTROL_IP = #{controlIp}
+      </if>
+      <if test="validFlag != null and validFlag != ''">
+        or VALID_FLAG = #{validFlag}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        or CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        or CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        or UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        or UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+      <if test="deleteManNo != null and deleteManNo != ''">
+        or DELETE_MAN_NO = #{deleteManNo}
+      </if>
+      <if test="deleteManName != null and deleteManName != ''">
+        or DELETE_MAN_NAME = #{deleteManName}
+      </if>
+      <if test="deleteTime != null">
+        or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
+      </if>
+      <if test="flatComputerIp != null and flatComputerIp != ''">
+        or FLAT_COMPUTER_IP = #{flatComputerIp}
+      </if>
+      <if test="mesSpotId != null and mesSpotId != ''">
+        or MES_SPOT_ID = #{mesSpotId}
+      </if>
+      <if test="spotAreaNo != null and spotAreaNo != ''">
+        or SPOT_AREA_NO = #{spotAreaNo}
+      </if>
+      <if test="spotAreaName != null and spotAreaName != ''">
+        or SPOT_AREA_NAME = #{spotAreaName}
+      </if>
+      <if test="allowedTareWeight != null and allowedTareWeight != ''">
+        or ALLOWED_TARE_WEIGHT = #{allowedTareWeight}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
-    insert into METER_BASE_SPOT_INFO (BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO,
-                                      SPOT_TYPE_NAME, SPOT_STATE_NO, SPOT_STATE_NAME,
-                                      VIDEO_IP, VIDEO_PORT, VIDEO_USER_NAME,
-                                      VIDEO_PASSWORD, LED_IP, PRINTER_IP,
-                                      PRINTER_NAME, COUNT_NUM, USED_NUM,
-                                      CONTROL_IP, VALID_FLAG, CREATE_MAN_NO,
-                                      CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO,
-                                      UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO,
-                                      DELETE_MAN_NAME, DELETE_TIME, FLAT_COMPUTER_IP,
-                                      MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME
-    )
-    values (#{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, #{spotTypeNo,jdbcType=VARCHAR},
-            #{spotTypeName,jdbcType=VARCHAR}, #{spotStateNo,jdbcType=VARCHAR}, #{spotStateName,jdbcType=VARCHAR},
-            #{videoIp,jdbcType=VARCHAR}, #{videoPort,jdbcType=VARCHAR}, #{videoUserName,jdbcType=VARCHAR},
-            #{videoPassword,jdbcType=VARCHAR}, #{ledIp,jdbcType=VARCHAR}, #{printerIp,jdbcType=VARCHAR},
-            #{printerName,jdbcType=VARCHAR}, #{countNum,jdbcType=DECIMAL}, #{usedNum,jdbcType=DECIMAL},
-            #{controlIp,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR},
-            #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR},
-            #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteManNo,jdbcType=VARCHAR},
-            #{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{flatComputerIp,jdbcType=VARCHAR},
-            #{mesSpotId,jdbcType=VARCHAR}, #{spotAreaNo,jdbcType=VARCHAR}, #{spotAreaName,jdbcType=VARCHAR}
-           )
+    insert into METER_BASE_SPOT_INFO (BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO, 
+      SPOT_TYPE_NAME, SPOT_STATE_NO, SPOT_STATE_NAME, 
+      VIDEO_IP, VIDEO_PORT, VIDEO_USER_NAME, 
+      VIDEO_PASSWORD, LED_IP, PRINTER_IP, 
+      PRINTER_NAME, COUNT_NUM, USED_NUM, 
+      CONTROL_IP, VALID_FLAG, CREATE_MAN_NO, 
+      CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, 
+      UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, 
+      DELETE_MAN_NAME, DELETE_TIME, FLAT_COMPUTER_IP, 
+      MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, 
+      ALLOWED_TARE_WEIGHT)
+    values (#{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, #{spotTypeNo,jdbcType=VARCHAR}, 
+      #{spotTypeName,jdbcType=VARCHAR}, #{spotStateNo,jdbcType=VARCHAR}, #{spotStateName,jdbcType=VARCHAR}, 
+      #{videoIp,jdbcType=VARCHAR}, #{videoPort,jdbcType=VARCHAR}, #{videoUserName,jdbcType=VARCHAR}, 
+      #{videoPassword,jdbcType=VARCHAR}, #{ledIp,jdbcType=VARCHAR}, #{printerIp,jdbcType=VARCHAR}, 
+      #{printerName,jdbcType=VARCHAR}, #{countNum,jdbcType=DECIMAL}, #{usedNum,jdbcType=DECIMAL}, 
+      #{controlIp,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, 
+      #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, 
+      #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteManNo,jdbcType=VARCHAR}, 
+      #{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{flatComputerIp,jdbcType=VARCHAR}, 
+      #{mesSpotId,jdbcType=VARCHAR}, #{spotAreaNo,jdbcType=VARCHAR}, #{spotAreaName,jdbcType=VARCHAR}, 
+      #{allowedTareWeight,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
     insert into METER_BASE_SPOT_INFO
@@ -455,6 +464,9 @@
       <if test="spotAreaName != null">
         SPOT_AREA_NAME,
       </if>
+      <if test="allowedTareWeight != null">
+        ALLOWED_TARE_WEIGHT,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="baseSpotNo != null">
@@ -547,39 +559,43 @@
       <if test="spotAreaName != null">
         #{spotAreaName,jdbcType=VARCHAR},
       </if>
+      <if test="allowedTareWeight != null">
+        #{allowedTareWeight,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
     update METER_BASE_SPOT_INFO
     set BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
-        SPOT_TYPE_NO = #{spotTypeNo,jdbcType=VARCHAR},
-        SPOT_TYPE_NAME = #{spotTypeName,jdbcType=VARCHAR},
-        SPOT_STATE_NO = #{spotStateNo,jdbcType=VARCHAR},
-        SPOT_STATE_NAME = #{spotStateName,jdbcType=VARCHAR},
-        VIDEO_IP = #{videoIp,jdbcType=VARCHAR},
-        VIDEO_PORT = #{videoPort,jdbcType=VARCHAR},
-        VIDEO_USER_NAME = #{videoUserName,jdbcType=VARCHAR},
-        VIDEO_PASSWORD = #{videoPassword,jdbcType=VARCHAR},
-        LED_IP = #{ledIp,jdbcType=VARCHAR},
-        PRINTER_IP = #{printerIp,jdbcType=VARCHAR},
-        PRINTER_NAME = #{printerName,jdbcType=VARCHAR},
-        COUNT_NUM = #{countNum,jdbcType=DECIMAL},
-        USED_NUM = #{usedNum,jdbcType=DECIMAL},
-        CONTROL_IP = #{controlIp,jdbcType=VARCHAR},
-        VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
-        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
-        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
-        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
-        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
-        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
-        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
-        DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
-        DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
-        DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
-        FLAT_COMPUTER_IP = #{flatComputerIp,jdbcType=VARCHAR},
-        MES_SPOT_ID = #{mesSpotId,jdbcType=VARCHAR},
-        SPOT_AREA_NO = #{spotAreaNo,jdbcType=VARCHAR},
-        SPOT_AREA_NAME = #{spotAreaName,jdbcType=VARCHAR}
+      SPOT_TYPE_NO = #{spotTypeNo,jdbcType=VARCHAR},
+      SPOT_TYPE_NAME = #{spotTypeName,jdbcType=VARCHAR},
+      SPOT_STATE_NO = #{spotStateNo,jdbcType=VARCHAR},
+      SPOT_STATE_NAME = #{spotStateName,jdbcType=VARCHAR},
+      VIDEO_IP = #{videoIp,jdbcType=VARCHAR},
+      VIDEO_PORT = #{videoPort,jdbcType=VARCHAR},
+      VIDEO_USER_NAME = #{videoUserName,jdbcType=VARCHAR},
+      VIDEO_PASSWORD = #{videoPassword,jdbcType=VARCHAR},
+      LED_IP = #{ledIp,jdbcType=VARCHAR},
+      PRINTER_IP = #{printerIp,jdbcType=VARCHAR},
+      PRINTER_NAME = #{printerName,jdbcType=VARCHAR},
+      COUNT_NUM = #{countNum,jdbcType=DECIMAL},
+      USED_NUM = #{usedNum,jdbcType=DECIMAL},
+      CONTROL_IP = #{controlIp,jdbcType=VARCHAR},
+      VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
+      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
+      DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
+      DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+      FLAT_COMPUTER_IP = #{flatComputerIp,jdbcType=VARCHAR},
+      MES_SPOT_ID = #{mesSpotId,jdbcType=VARCHAR},
+      SPOT_AREA_NO = #{spotAreaNo,jdbcType=VARCHAR},
+      SPOT_AREA_NAME = #{spotAreaName,jdbcType=VARCHAR},
+      ALLOWED_TARE_WEIGHT = #{allowedTareWeight,jdbcType=VARCHAR}
     where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
@@ -672,191 +688,195 @@
       <if test="spotAreaName != null">
         SPOT_AREA_NAME = #{spotAreaName,jdbcType=VARCHAR},
       </if>
+      <if test="allowedTareWeight != null">
+        ALLOWED_TARE_WEIGHT = #{allowedTareWeight,jdbcType=VARCHAR},
+      </if>
     </set>
     where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
   </update>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    <include refid="select"/>
+    <include refid="select" />
     where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
-    order by CREATE_TIME  desc
+    <include refid="select" />
+    <include refid="where" />
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
-    order by CREATE_TIME  desc
+    <include refid="select" />
+    <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into METER_BASE_SPOT_INFO
-    (BASE_SPOT_NO,
-    BASE_SPOT_NAME, SPOT_TYPE_NO, SPOT_TYPE_NAME,
-    SPOT_STATE_NO, SPOT_STATE_NAME, VIDEO_IP,
-    VIDEO_PORT, VIDEO_USER_NAME, VIDEO_PASSWORD,
-    LED_IP, PRINTER_IP, PRINTER_NAME,
-    COUNT_NUM, USED_NUM, CONTROL_IP,
-    VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME,
-    CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME,
-    UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME,
-    DELETE_TIME, FLAT_COMPUTER_IP,
-    MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME
-    )
-    ( <foreach collection="list" item="item" separator="union all">
-    select
-    #{item.baseSpotNo,jdbcType=VARCHAR},
-    #{item.baseSpotName,jdbcType=VARCHAR}, #{item.spotTypeNo,jdbcType=VARCHAR}, #{item.spotTypeName,jdbcType=VARCHAR},
-    #{item.spotStateNo,jdbcType=VARCHAR}, #{item.spotStateName,jdbcType=VARCHAR}, #{item.videoIp,jdbcType=VARCHAR},
-    #{item.videoPort,jdbcType=VARCHAR}, #{item.videoUserName,jdbcType=VARCHAR}, #{item.videoPassword,jdbcType=VARCHAR},
-    #{item.ledIp,jdbcType=VARCHAR}, #{item.printerIp,jdbcType=VARCHAR}, #{item.printerName,jdbcType=VARCHAR},
-    #{item.countNum,jdbcType=DECIMAL}, #{item.usedNum,jdbcType=DECIMAL}, #{item.controlIp,jdbcType=VARCHAR},
-    #{item.validFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR},
-    #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR},
-    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR},
-    #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.flatComputerIp,jdbcType=VARCHAR},
-    #{item.mesSpotId,jdbcType=VARCHAR}, #{item.spotAreaNo,jdbcType=VARCHAR}, #{item.spotAreaName,jdbcType=VARCHAR}
-    from dual
-  </foreach> )
+    insert into METER_BASE_SPOT_INFO 
+      (BASE_SPOT_NO, 
+      BASE_SPOT_NAME, SPOT_TYPE_NO, SPOT_TYPE_NAME, 
+      SPOT_STATE_NO, SPOT_STATE_NAME, VIDEO_IP, 
+      VIDEO_PORT, VIDEO_USER_NAME, VIDEO_PASSWORD, 
+      LED_IP, PRINTER_IP, PRINTER_NAME, 
+      COUNT_NUM, USED_NUM, CONTROL_IP, 
+      VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, 
+      CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
+      UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, 
+      DELETE_TIME, FLAT_COMPUTER_IP, 
+      MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, 
+      ALLOWED_TARE_WEIGHT)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.baseSpotNo,jdbcType=VARCHAR}, 
+      #{item.baseSpotName,jdbcType=VARCHAR}, #{item.spotTypeNo,jdbcType=VARCHAR}, #{item.spotTypeName,jdbcType=VARCHAR}, 
+      #{item.spotStateNo,jdbcType=VARCHAR}, #{item.spotStateName,jdbcType=VARCHAR}, #{item.videoIp,jdbcType=VARCHAR}, 
+      #{item.videoPort,jdbcType=VARCHAR}, #{item.videoUserName,jdbcType=VARCHAR}, #{item.videoPassword,jdbcType=VARCHAR}, 
+      #{item.ledIp,jdbcType=VARCHAR}, #{item.printerIp,jdbcType=VARCHAR}, #{item.printerName,jdbcType=VARCHAR}, 
+      #{item.countNum,jdbcType=DECIMAL}, #{item.usedNum,jdbcType=DECIMAL}, #{item.controlIp,jdbcType=VARCHAR}, 
+      #{item.validFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, 
+      #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, 
+      #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.flatComputerIp,jdbcType=VARCHAR}, 
+      #{item.mesSpotId,jdbcType=VARCHAR}, #{item.spotAreaNo,jdbcType=VARCHAR}, #{item.spotAreaName,jdbcType=VARCHAR}, 
+      #{item.allowedTareWeight,jdbcType=VARCHAR} from dual  
+   </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-    update METER_BASE_SPOT_INFO
-    set
-    BASE_SPOT_NO=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
-    </foreach>
-    ,BASE_SPOT_NAME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
-    </foreach>
-    ,SPOT_TYPE_NO=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotTypeNo,jdbcType=VARCHAR}
-    </foreach>
-    ,SPOT_TYPE_NAME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotTypeName,jdbcType=VARCHAR}
-    </foreach>
-    ,SPOT_STATE_NO=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotStateNo,jdbcType=VARCHAR}
-    </foreach>
-    ,SPOT_STATE_NAME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotStateName,jdbcType=VARCHAR}
-    </foreach>
-    ,VIDEO_IP=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoIp,jdbcType=VARCHAR}
-    </foreach>
-    ,VIDEO_PORT=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoPort,jdbcType=VARCHAR}
-    </foreach>
-    ,VIDEO_USER_NAME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoUserName,jdbcType=VARCHAR}
-    </foreach>
-    ,VIDEO_PASSWORD=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoPassword,jdbcType=VARCHAR}
-    </foreach>
-    ,LED_IP=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.ledIp,jdbcType=VARCHAR}
-    </foreach>
-    ,PRINTER_IP=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.printerIp,jdbcType=VARCHAR}
-    </foreach>
-    ,PRINTER_NAME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.printerName,jdbcType=VARCHAR}
-    </foreach>
-    ,COUNT_NUM=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.countNum,jdbcType=DECIMAL}
-    </foreach>
-    ,USED_NUM=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.usedNum,jdbcType=DECIMAL}
-    </foreach>
-    ,CONTROL_IP=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.controlIp,jdbcType=VARCHAR}
-    </foreach>
-    ,VALID_FLAG=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
-    </foreach>
-    ,CREATE_MAN_NO=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
-    </foreach>
-    ,CREATE_MAN_NAME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
-    </foreach>
-    ,CREATE_TIME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
-    </foreach>
-    ,UPDATE_MAN_NO=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
-    </foreach>
-    ,UPDATE_MAN_NAME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
-    </foreach>
-    ,UPDATE_TIME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
-    </foreach>
-    ,DELETE_MAN_NO=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
-    </foreach>
-    ,DELETE_MAN_NAME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
-    </foreach>
-    ,DELETE_TIME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
-    </foreach>
-    ,FLAT_COMPUTER_IP=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.flatComputerIp,jdbcType=VARCHAR}
-    </foreach>
-    ,MES_SPOT_ID=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.mesSpotId,jdbcType=VARCHAR}
-    </foreach>
-    ,SPOT_AREA_NO=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotAreaNo,jdbcType=VARCHAR}
-    </foreach>
-    ,SPOT_AREA_NAME=
-    <foreach collection="list" item="item" index="index" separator=" " open="case BASE_SPOT_NO" close="end">
-      when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotAreaName,jdbcType=VARCHAR}
-    </foreach>
-    where BASE_SPOT_NO in
-    <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
-      #{item.baseSpotNo,jdbcType=VARCHAR}
-    </foreach>
+     update METER_BASE_SPOT_INFO
+     set
+       BASE_SPOT_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
+       </foreach>
+       ,BASE_SPOT_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
+       </foreach>
+       ,SPOT_TYPE_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotTypeNo,jdbcType=VARCHAR}
+       </foreach>
+       ,SPOT_TYPE_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotTypeName,jdbcType=VARCHAR}
+       </foreach>
+       ,SPOT_STATE_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotStateNo,jdbcType=VARCHAR}
+       </foreach>
+       ,SPOT_STATE_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotStateName,jdbcType=VARCHAR}
+       </foreach>
+       ,VIDEO_IP=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoIp,jdbcType=VARCHAR}
+       </foreach>
+       ,VIDEO_PORT=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoPort,jdbcType=VARCHAR}
+       </foreach>
+       ,VIDEO_USER_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoUserName,jdbcType=VARCHAR}
+       </foreach>
+       ,VIDEO_PASSWORD=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.videoPassword,jdbcType=VARCHAR}
+       </foreach>
+       ,LED_IP=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.ledIp,jdbcType=VARCHAR}
+       </foreach>
+       ,PRINTER_IP=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.printerIp,jdbcType=VARCHAR}
+       </foreach>
+       ,PRINTER_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.printerName,jdbcType=VARCHAR}
+       </foreach>
+       ,COUNT_NUM=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.countNum,jdbcType=DECIMAL}
+       </foreach>
+       ,USED_NUM=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.usedNum,jdbcType=DECIMAL}
+       </foreach>
+       ,CONTROL_IP=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.controlIp,jdbcType=VARCHAR}
+       </foreach>
+       ,VALID_FLAG=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_MAN_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_MAN_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,DELETE_MAN_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,DELETE_MAN_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
+       </foreach>
+       ,DELETE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,FLAT_COMPUTER_IP=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.flatComputerIp,jdbcType=VARCHAR}
+       </foreach>
+       ,MES_SPOT_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.mesSpotId,jdbcType=VARCHAR}
+       </foreach>
+       ,SPOT_AREA_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotAreaNo,jdbcType=VARCHAR}
+       </foreach>
+       ,SPOT_AREA_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.spotAreaName,jdbcType=VARCHAR}
+       </foreach>
+       ,ALLOWED_TARE_WEIGHT=
+       <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
+          when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.allowedTareWeight,jdbcType=VARCHAR}
+       </foreach>
+     where BASE_SPOT_NO in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.baseSpotNo,jdbcType=VARCHAR}
+     </foreach> 
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from METER_BASE_SPOT_INFO
-    where BASE_SPOT_NO in
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
+    where BASE_SPOT_NO in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <sql id="whereOr">
@@ -979,4 +999,8 @@
     where VALID_FLAG='1'
   </select>
 
+  <select id="selectSpotByUserID"  parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    select * from METER_BASE_SPOT_INFO where BASE_SPOT_NO not in (select BASE_SPOT_NO from METER_BASE_USER_SPOT where USER_ID = '${userID}')
+  </select>
+  
 </mapper>

+ 21 - 9
src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/model/MeterBaseSpotInfo.java

@@ -3,6 +3,7 @@ package com.steerinfo.baseinfo.meterbasespotinfo.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.util.Date;
 
 @ApiModel(value="计量点配置表")
@@ -89,17 +90,13 @@ public class MeterBaseSpotInfo implements IBasePO<String> {
      * 总纸张(COUNT_NUM,DECIMAL,4)
      */
     @ApiModelProperty(value="总纸张",required=false)
-    private int countNum;
-
-    public void setCountNum(int countNum) {
-        this.countNum = countNum;
-    }
+    private Short countNum;
 
     /**
      * 已用纸张(USED_NUM,DECIMAL,4)
      */
     @ApiModelProperty(value="已用纸张",required=false)
-    private int usedNum;
+    private Short usedNum;
 
     /**
      * 接管终端IP(CONTROL_IP,VARCHAR,20)
@@ -191,6 +188,12 @@ public class MeterBaseSpotInfo implements IBasePO<String> {
     @ApiModelProperty(value="计量点所属区域名称(基础信息:001047)",required=false)
     private String spotAreaName;
 
+    /**
+     * 是否允许使用期限皮重(0不可,1可以)(ALLOWED_TARE_WEIGHT,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否允许使用期限皮重(0不可,1可以)",required=false)
+    private String allowedTareWeight;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -307,7 +310,7 @@ public class MeterBaseSpotInfo implements IBasePO<String> {
         this.printerName = printerName == null ? null : printerName.trim();
     }
 
-    public int getCountNum() {
+    public Short getCountNum() {
         return countNum;
     }
 
@@ -315,11 +318,11 @@ public class MeterBaseSpotInfo implements IBasePO<String> {
         this.countNum = countNum;
     }
 
-    public int getUsedNum() {
+    public Short getUsedNum() {
         return usedNum;
     }
 
-    public void setUsedNum(int usedNum) {
+    public void setUsedNum(Short usedNum) {
         this.usedNum = usedNum;
     }
 
@@ -443,6 +446,14 @@ public class MeterBaseSpotInfo implements IBasePO<String> {
         this.spotAreaName = spotAreaName == null ? null : spotAreaName.trim();
     }
 
+    public String getAllowedTareWeight() {
+        return allowedTareWeight;
+    }
+
+    public void setAllowedTareWeight(String allowedTareWeight) {
+        this.allowedTareWeight = allowedTareWeight == null ? null : allowedTareWeight.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -479,6 +490,7 @@ public class MeterBaseSpotInfo implements IBasePO<String> {
         sb.append(", mesSpotId=").append(mesSpotId);
         sb.append(", spotAreaNo=").append(spotAreaNo);
         sb.append(", spotAreaName=").append(spotAreaName);
+        sb.append(", allowedTareWeight=").append(allowedTareWeight);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 1 - 1
src/main/java/com/steerinfo/baseinfo/meterbasespotinfo/service/impl/MeterBaseSpotInfoServiceImpl.java

@@ -197,7 +197,7 @@ public class MeterBaseSpotInfoServiceImpl extends BaseServiceImpl<MeterBaseSpotI
 
     @Override
     public MeterBaseSpotInfo doUpdateNumWf(MeterBaseSpotInfo model) {
-        model.setUsedNum(model.getUsedNum()+1);
+        model.setUsedNum((short) (model.getUsedNum()+1));
         meterBaseSpotInfoMapper.updateByPrimaryKeySelective(model);
         return meterBaseSpotInfoMapper.selectByPrimaryKey(model.getBaseSpotNo());
     }

+ 12 - 0
src/main/java/com/steerinfo/baseinfo/meterbasetermtaredata/controller/MeterBaseTermTareDataController.java

@@ -276,4 +276,16 @@ throw new MarkerMetException(500, "操作异常!!");
             return failed(null, "保存失败,请确认!");
         }
     }
+
+    @ApiOperation(value = "根据车号获取期限皮未失效的数据", notes = "不分页查询")
+    @GetMapping(value = "/listBycarNo")
+    public RESTfulResult listBycarNo(@RequestParam HashMap parmas) {
+        try {
+            RESTfulResult rm = meterBaseTermTareDataService.listBycarNo(parmas);
+            return rm;
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
 }

+ 3 - 0
src/main/java/com/steerinfo/baseinfo/meterbasetermtaredata/mapper/MeterBaseTermTareDataMapper.java

@@ -23,4 +23,7 @@ public interface MeterBaseTermTareDataMapper extends IBaseMapper<MeterBaseTermTa
 
     MeterBaseTermTareData selectByDataNo(HashMap<String, Object> mp);
 
+    List<MeterBaseTermTareData> listBycarNo(Map<String, Object> map);
+
+
 }

+ 8 - 0
src/main/java/com/steerinfo/baseinfo/meterbasetermtaredata/mapper/MeterBaseTermTareDataMapper.xml

@@ -607,4 +607,12 @@
     where CAR_NO = '${carNo}'
     ORDER BY CREATE_TIME desc
   </select>
+
+  <select id="listBycarNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+    and start_time &lt;= sysdate
+    and end_time &gt;= sysdate
+    order by CREATE_TIME  desc
+  </select>
 </mapper>

+ 2 - 0
src/main/java/com/steerinfo/baseinfo/meterbasetermtaredata/service/IMeterBaseTermTareDataService.java

@@ -33,4 +33,6 @@ public interface IMeterBaseTermTareDataService extends IBaseService<MeterBaseTer
     RESTfulResult doSaveWf(MeterBaseTermTareData oci, MeterMonitorNote note);
 
     RESTfulResult doSaveTerm(String id);
+
+    RESTfulResult listBycarNo(HashMap<String, Object> parmas);
 }

+ 41 - 6
src/main/java/com/steerinfo/baseinfo/meterbasetermtaredata/service/impl/MeterBaseTermTareDataServiceImpl.java

@@ -56,7 +56,7 @@ public class MeterBaseTermTareDataServiceImpl extends BaseServiceImpl<MeterBaseT
     @Resource
     private MeterWorkCarActualFirstMapper meterWorkCarActualFirstMapper;
 
-    @Autowired
+    @Resource
     private MeterBaseTermTareTimeMapper meterBaseTermTareTimeMapper;
 
     @Resource
@@ -257,25 +257,38 @@ public class MeterBaseTermTareDataServiceImpl extends BaseServiceImpl<MeterBaseT
         BigDecimal meterWeight = modelTemp.getMeterWeight();
         if(carNo == null){
             rm.setMessage("车号不能为空,请确认!!");
-            rm.setCode("500");
+            rm.setCode("1");
             return rm;
         }
         if(baseSpotNo == null && baseSpotName  == null){
             rm.setMessage("计量点编号或者计量点名称为空,请确认!!");
-            rm.setCode("500");
+            rm.setCode("1");
             return rm;
         }
         if(meterTime == null){
             rm.setMessage("计量时间不能为空!!");
-            rm.setCode("500");
+            rm.setCode("1");
             return rm;
         }
         UserPayload payload = UserPayload.getCurrUser();
         String userId = payload.getId();
         String userName = payload.getUserName();
+        if(modelTemp.getWeightType().equals("0")) {
+            rm.setMessage("计量类型为毛重,不能进行期限皮重保存!!");
+            rm.setCode("1");
+            return rm;
+        }else {
+            modelTemp.setWeightType("2");
+            modelTemp.setUpdateManName(userId);
+            modelTemp.setUpdateManNo(userName);
+            modelTemp.setUpdateTime(new Date());
+            modelTemp.setNote("期限皮重保存");
+            meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(modelTemp);
+        }
+
         if(userId == null && userName == null){
             rm.setMessage("计量人编号或者计量员为空,请确认");
-            rm.setCode("500");
+            rm.setCode("1");
             return rm;
         }
         //根据车号查询期限表的期限皮重信息
@@ -304,7 +317,7 @@ public class MeterBaseTermTareDataServiceImpl extends BaseServiceImpl<MeterBaseT
             model.setWarnTime(new Date(warnDate.getTime()));
         }else{
             rm.setMessage("计量人编号或者计量员为空,请确认");
-            rm.setCode("500");
+            rm.setCode("1");
             return rm;
         }
         model.setMeterTime(meterTime);
@@ -339,6 +352,28 @@ public class MeterBaseTermTareDataServiceImpl extends BaseServiceImpl<MeterBaseT
         return rm;
     }
 
+    @Override
+    public RESTfulResult listBycarNo(HashMap<String, Object> parmas) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+        rm.setMessage("操作失败!!");
+        try{
+            List<MeterBaseTermTareData> models = meterBaseTermTareDataMapper.listBycarNo(parmas);
+            if(models.size() >= 0) {
+                rm.setSucceed();
+                rm.setMessage("操作成功!!");
+                rm.setData(models.get(0));
+                rm.setCode("200");
+                return rm;
+            }
+            return rm;
+        }catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!!" + e.getMessage());
+            return rm;
+        }
+    }
+
     private String saveNote(MeterMonitorNote note){
         SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
         String afl = formatter.format(new Date());

+ 136 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/controller/MeterBaseUnitInfoController.java

@@ -0,0 +1,136 @@
+package com.steerinfo.baseinfo.meterbaseunitinfo.controller;
+
+import com.steerinfo.baseinfo.meterbaseunitinfo.model.MeterBaseUnitInfo;
+import com.steerinfo.baseinfo.meterbaseunitinfo.service.IMeterBaseUnitInfoService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * MeterBaseUnitInfo RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-04-12 10:02
+ * 类描述
+ * 修订历史:
+ * 日期:2022-04-12
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseUnitInfo RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/meterbaseunitinfos")
+public class MeterBaseUnitInfoController extends BaseRESTfulController {
+
+    @Autowired
+    IMeterBaseUnitInfoService meterBaseUnitInfoService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbaseunitinfo:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseUnitInfo> list = meterBaseUnitInfoService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbaseunitinfo:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseUnitInfo> list = meterBaseUnitInfoService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据MeterBaseUnitInfo对象创建")
+    @ApiImplicitParam(name = "meterBaseUnitInfo", value = "详细实体meterBaseUnitInfo", required = true, dataType = "MeterBaseUnitInfo")
+    //@RequiresPermissions("meterbaseunitinfo:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@RequestBody MeterBaseUnitInfo model){
+        MeterBaseUnitInfo meterBaseUnitInfo = meterBaseUnitInfoService.add(model);
+        return success(meterBaseUnitInfo);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaseunitinfo:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        MeterBaseUnitInfo meterBaseUnitInfo = meterBaseUnitInfoService.getById(id);
+        return success(meterBaseUnitInfo);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的meterBaseUnitInfo信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "meterBaseUnitInfo", value = "详细实体meterBaseUnitInfo", required = true, dataType = "MeterBaseUnitInfo")
+    })
+    //@RequiresPermissions("meterbaseunitinfo:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody MeterBaseUnitInfo model){
+        model.setId(id);
+        MeterBaseUnitInfo meterBaseUnitInfo = meterBaseUnitInfoService.modify(model);
+        return success(meterBaseUnitInfo);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaseunitinfo:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  meterBaseUnitInfoService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value="获取不分页列表", notes="不分页模糊查询")
+    @GetMapping(value = "/noPage/")
+    public RESTfulResult queryBynoPage(@RequestParam HashMap parmas){
+        List<MeterBaseUnitInfo> list = meterBaseUnitInfoService.queryBynoPage(parmas);
+        return success(list);
+    }
+
+    @ApiOperation(value="创建", notes="根据MeterBaseUnitInfo对象创建")
+    @ApiImplicitParam(name = "meterBaseUnitInfo", value = "详细实体meterBaseUnitInfo", required = true, dataType = "MeterBaseUnitInfo")
+    @PostMapping(value = "/addModel")
+    public RESTfulResult addModel(@RequestBody MeterBaseUnitInfo model){
+        RESTfulResult rm = meterBaseUnitInfoService.addModel(model);
+        return rm;
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @PostMapping(value = "/delModel")//String
+    public RESTfulResult delModel(@RequestBody List<MeterBaseUnitInfo> models){
+        List<String> list = new ArrayList<>();
+        for(MeterBaseUnitInfo model: models) {
+            list.add(model.getUnitNo());
+        }
+        if(ListUtils.isNotEmpty(list)) {
+            List<String> ids = ListUtils.convertList(list);
+            meterBaseUnitInfoService.delete(ids);
+        }
+        return success(null,"删除成功");
+    }
+}

+ 14 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/mapper/MeterBaseUnitInfoMapper.java

@@ -0,0 +1,14 @@
+package com.steerinfo.baseinfo.meterbaseunitinfo.mapper;
+
+import com.steerinfo.baseinfo.meterbaseunitinfo.model.MeterBaseUnitInfo;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface MeterBaseUnitInfoMapper extends IBaseMapper<MeterBaseUnitInfo, String> {
+    String getNewID(@org.apache.ibatis.annotations.Param(value="afl")String afl);
+    List<MeterBaseUnitInfo> queryBynoPage(Map<String, Object> map);
+}

+ 483 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/mapper/MeterBaseUnitInfoMapper.xml

@@ -0,0 +1,483 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.steerinfo.baseinfo.meterbaseunitinfo.mapper.MeterBaseUnitInfoMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbaseunitinfo.model.MeterBaseUnitInfo">
+    <id column="UNIT_NO" jdbcType="VARCHAR" property="unitNo" />
+    <result column="FORWARDING_UNIT_NO" jdbcType="VARCHAR" property="forwardingUnitNo" />
+    <result column="FORWARDING_UNIT_NAME" jdbcType="VARCHAR" property="forwardingUnitName" />
+    <result column="RECEIVING_UNIT_NO" jdbcType="VARCHAR" property="receivingUnitNo" />
+    <result column="RECEIVING_UNIT_NAME" jdbcType="VARCHAR" property="receivingUnitName" />
+    <result column="ALLOWED_TARE_WEIGHT" jdbcType="VARCHAR" property="allowedTareWeight" />
+    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
+    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
+    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="DELETE_MAN_NO" jdbcType="VARCHAR" property="deleteManNo" />
+    <result column="DELETE_MAN_NAME" jdbcType="VARCHAR" property="deleteManName" />
+    <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
+  </resultMap>
+  <sql id="columns">
+    UNIT_NO, FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, RECEIVING_UNIT_NO, RECEIVING_UNIT_NAME, 
+    ALLOWED_TARE_WEIGHT, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, 
+    UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME
+  </sql>
+  <sql id="columns_alias">
+    t.UNIT_NO, t.FORWARDING_UNIT_NO, t.FORWARDING_UNIT_NAME, t.RECEIVING_UNIT_NO, t.RECEIVING_UNIT_NAME, 
+    t.ALLOWED_TARE_WEIGHT, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, 
+    t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, t.DELETE_TIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM METER_BASE_UNIT_INFO
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM METER_BASE_UNIT_INFO t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="unitNo != null and unitNo != ''">
+        and UNIT_NO = #{unitNo}
+      </if>
+      <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+        and FORWARDING_UNIT_NO = #{forwardingUnitNo}
+      </if>
+      <if test="forwardingUnitName != null and forwardingUnitName != ''">
+        and FORWARDING_UNIT_NAME = #{forwardingUnitName}
+      </if>
+      <if test="receivingUnitNo != null and receivingUnitNo != ''">
+        and RECEIVING_UNIT_NO = #{receivingUnitNo}
+      </if>
+      <if test="receivingUnitName != null and receivingUnitName != ''">
+        and RECEIVING_UNIT_NAME = #{receivingUnitName}
+      </if>
+      <if test="allowedTareWeight != null and allowedTareWeight != ''">
+        and ALLOWED_TARE_WEIGHT = #{allowedTareWeight}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME = #{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 = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="deleteManNo != null and deleteManNo != ''">
+        and DELETE_MAN_NO = #{deleteManNo}
+      </if>
+      <if test="deleteManName != null and deleteManName != ''">
+        and DELETE_MAN_NAME = #{deleteManName}
+      </if>
+      <if test="deleteTime != null">
+        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="unitNo != null and unitNo != ''">
+        and UNIT_NO LIKE '%${unitNo}%'
+      </if>
+      <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+        and FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
+      </if>
+      <if test="forwardingUnitName != null and forwardingUnitName != ''">
+        and FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
+      </if>
+      <if test="receivingUnitNo != null and receivingUnitNo != ''">
+        and RECEIVING_UNIT_NO LIKE '%${receivingUnitNo}%'
+      </if>
+      <if test="receivingUnitName != null and receivingUnitName != ''">
+        and RECEIVING_UNIT_NAME LIKE '%${receivingUnitName}%'
+      </if>
+      <if test="allowedTareWeight != null and allowedTareWeight != ''">
+        and ALLOWED_TARE_WEIGHT LIKE '%${allowedTareWeight}%'
+      </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="deleteManNo != null and deleteManNo != ''">
+        and DELETE_MAN_NO LIKE '%${deleteManNo}%'
+      </if>
+      <if test="deleteManName != null and deleteManName != ''">
+        and DELETE_MAN_NAME LIKE '%${deleteManName}%'
+      </if>
+      <if test="deleteTime != null">
+        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from METER_BASE_UNIT_INFO
+    where UNIT_NO = #{unitNo,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from METER_BASE_UNIT_INFO
+    where 1!=1 
+      <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+        or FORWARDING_UNIT_NO = #{forwardingUnitNo}
+      </if>
+      <if test="forwardingUnitName != null and forwardingUnitName != ''">
+        or FORWARDING_UNIT_NAME = #{forwardingUnitName}
+      </if>
+      <if test="receivingUnitNo != null and receivingUnitNo != ''">
+        or RECEIVING_UNIT_NO = #{receivingUnitNo}
+      </if>
+      <if test="receivingUnitName != null and receivingUnitName != ''">
+        or RECEIVING_UNIT_NAME = #{receivingUnitName}
+      </if>
+      <if test="allowedTareWeight != null and allowedTareWeight != ''">
+        or ALLOWED_TARE_WEIGHT = #{allowedTareWeight}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        or CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        or CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        or UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        or UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+      <if test="deleteManNo != null and deleteManNo != ''">
+        or DELETE_MAN_NO = #{deleteManNo}
+      </if>
+      <if test="deleteManName != null and deleteManName != ''">
+        or DELETE_MAN_NAME = #{deleteManName}
+      </if>
+      <if test="deleteTime != null">
+        or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbaseunitinfo.model.MeterBaseUnitInfo">
+    insert into METER_BASE_UNIT_INFO (UNIT_NO, FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, 
+      RECEIVING_UNIT_NO, RECEIVING_UNIT_NAME, ALLOWED_TARE_WEIGHT, 
+      CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
+      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
+      DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME
+      )
+    values (#{unitNo,jdbcType=VARCHAR}, #{forwardingUnitNo,jdbcType=VARCHAR}, #{forwardingUnitName,jdbcType=VARCHAR}, 
+      #{receivingUnitNo,jdbcType=VARCHAR}, #{receivingUnitName,jdbcType=VARCHAR}, #{allowedTareWeight,jdbcType=VARCHAR}, 
+      #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{deleteManNo,jdbcType=VARCHAR}, #{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbaseunitinfo.model.MeterBaseUnitInfo">
+    insert into METER_BASE_UNIT_INFO
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="unitNo != null">
+        UNIT_NO,
+      </if>
+      <if test="forwardingUnitNo != null">
+        FORWARDING_UNIT_NO,
+      </if>
+      <if test="forwardingUnitName != null">
+        FORWARDING_UNIT_NAME,
+      </if>
+      <if test="receivingUnitNo != null">
+        RECEIVING_UNIT_NO,
+      </if>
+      <if test="receivingUnitName != null">
+        RECEIVING_UNIT_NAME,
+      </if>
+      <if test="allowedTareWeight != null">
+        ALLOWED_TARE_WEIGHT,
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO,
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO,
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="deleteManNo != null">
+        DELETE_MAN_NO,
+      </if>
+      <if test="deleteManName != null">
+        DELETE_MAN_NAME,
+      </if>
+      <if test="deleteTime != null">
+        DELETE_TIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="unitNo != null">
+        #{unitNo,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardingUnitNo != null">
+        #{forwardingUnitNo,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardingUnitName != null">
+        #{forwardingUnitName,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUnitNo != null">
+        #{receivingUnitNo,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUnitName != null">
+        #{receivingUnitName,jdbcType=VARCHAR},
+      </if>
+      <if test="allowedTareWeight != null">
+        #{allowedTareWeight,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateManNo != null">
+        #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="deleteManNo != null">
+        #{deleteManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteManName != null">
+        #{deleteManName,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteTime != null">
+        #{deleteTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbaseunitinfo.model.MeterBaseUnitInfo">
+    update METER_BASE_UNIT_INFO
+    set FORWARDING_UNIT_NO = #{forwardingUnitNo,jdbcType=VARCHAR},
+      FORWARDING_UNIT_NAME = #{forwardingUnitName,jdbcType=VARCHAR},
+      RECEIVING_UNIT_NO = #{receivingUnitNo,jdbcType=VARCHAR},
+      RECEIVING_UNIT_NAME = #{receivingUnitName,jdbcType=VARCHAR},
+      ALLOWED_TARE_WEIGHT = #{allowedTareWeight,jdbcType=VARCHAR},
+      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
+      DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
+      DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP}
+    where UNIT_NO = #{unitNo,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbaseunitinfo.model.MeterBaseUnitInfo">
+    update METER_BASE_UNIT_INFO
+    <set>
+      <if test="forwardingUnitNo != null">
+        FORWARDING_UNIT_NO = #{forwardingUnitNo,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardingUnitName != null">
+        FORWARDING_UNIT_NAME = #{forwardingUnitName,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUnitNo != null">
+        RECEIVING_UNIT_NO = #{receivingUnitNo,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUnitName != null">
+        RECEIVING_UNIT_NAME = #{receivingUnitName,jdbcType=VARCHAR},
+      </if>
+      <if test="allowedTareWeight != null">
+        ALLOWED_TARE_WEIGHT = #{allowedTareWeight,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="deleteManNo != null">
+        DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteManName != null">
+        DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteTime != null">
+        DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where UNIT_NO = #{unitNo,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where UNIT_NO = #{unitNo,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into METER_BASE_UNIT_INFO 
+      (UNIT_NO, 
+      FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, 
+      RECEIVING_UNIT_NO, RECEIVING_UNIT_NAME, 
+      ALLOWED_TARE_WEIGHT, CREATE_MAN_NO, 
+      CREATE_MAN_NAME, CREATE_TIME, 
+      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
+      DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.unitNo,jdbcType=VARCHAR}, 
+      #{item.forwardingUnitNo,jdbcType=VARCHAR}, #{item.forwardingUnitName,jdbcType=VARCHAR}, 
+      #{item.receivingUnitNo,jdbcType=VARCHAR}, #{item.receivingUnitName,jdbcType=VARCHAR}, 
+      #{item.allowedTareWeight,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, 
+      #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
+      #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
+      #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update METER_BASE_UNIT_INFO
+     set
+       UNIT_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.unitNo,jdbcType=VARCHAR}
+       </foreach>
+       ,FORWARDING_UNIT_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.forwardingUnitNo,jdbcType=VARCHAR}
+       </foreach>
+       ,FORWARDING_UNIT_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.forwardingUnitName,jdbcType=VARCHAR}
+       </foreach>
+       ,RECEIVING_UNIT_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.receivingUnitNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RECEIVING_UNIT_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.receivingUnitName,jdbcType=VARCHAR}
+       </foreach>
+       ,ALLOWED_TARE_WEIGHT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.allowedTareWeight,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,DELETE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,DELETE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
+       </foreach>
+       ,DELETE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case UNIT_NO" close="end">
+          when #{item.unitNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
+       </foreach>
+     where UNIT_NO in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.unitNo,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from METER_BASE_UNIT_INFO
+    where UNIT_NO in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
+    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(unit_no,9))),0) + 1,4,'0') unit_no
+    FROM meter_base_unit_info where instr(unit_no,#{afl,jdbcType=VARCHAR})>0
+  </select>
+
+  <select id="queryBynoPage" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+    order by create_time desc
+  </select>
+</mapper>

+ 258 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/model/MeterBaseUnitInfo.java

@@ -0,0 +1,258 @@
+package com.steerinfo.baseinfo.meterbaseunitinfo.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+@ApiModel(value="收发货单位期限配置表")
+public class MeterBaseUnitInfo implements IBasePO<String> {
+    /**
+     * 主键编号(YYYYMMDD+流水号)(UNIT_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="主键编号(YYYYMMDD+流水号)",required=true)
+    private String unitNo;
+
+    /**
+     * 发货单位编号(FORWARDING_UNIT_NO,VARCHAR,40)
+     */
+    @ApiModelProperty(value="发货单位编号",required=true)
+    private String forwardingUnitNo;
+
+    /**
+     * 收货单位(FORWARDING_UNIT_NAME,VARCHAR,40)
+     */
+    @ApiModelProperty(value="收货单位",required=true)
+    private String forwardingUnitName;
+
+    /**
+     * 收货单位编号(RECEIVING_UNIT_NO,VARCHAR,40)
+     */
+    @ApiModelProperty(value="收货单位编号",required=true)
+    private String receivingUnitNo;
+
+    /**
+     * 发货单位(RECEIVING_UNIT_NAME,VARCHAR,40)
+     */
+    @ApiModelProperty(value="发货单位",required=true)
+    private String receivingUnitName;
+
+    /**
+     * 是否允许使用期限皮重(0不可,1可以)(ALLOWED_TARE_WEIGHT,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否允许使用期限皮重(0不可,1可以)",required=false)
+    private String allowedTareWeight;
+
+    /**
+     * 创建人编号(CREATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="创建人编号",required=true)
+    private String createManNo;
+
+    /**
+     * 创建人姓名(CREATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="创建人姓名",required=true)
+    private String createManName;
+
+    /**
+     * 创建时间(YYYY-MM-DD HH:mm:SS)(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建时间(YYYY-MM-DD HH:mm:SS)",required=true)
+    private Date createTime;
+
+    /**
+     * 修改人编号(UPDATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="修改人编号",required=false)
+    private String updateManNo;
+
+    /**
+     * 修改人姓名(UPDATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改人姓名",required=false)
+    private String updateManName;
+
+    /**
+     * 修改时间(YYYY-MM-DD HH:mm:SS)(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间(YYYY-MM-DD HH:mm:SS)",required=false)
+    private Date updateTime;
+
+    /**
+     * 删除人编号(DELETE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="删除人编号",required=false)
+    private String deleteManNo;
+
+    /**
+     * 删除人姓名(DELETE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="删除人姓名",required=false)
+    private String deleteManName;
+
+    /**
+     * 删除时间(YYYY-MM-DD HH:mm:SS)(DELETE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="删除时间(YYYY-MM-DD HH:mm:SS)",required=false)
+    private Date deleteTime;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.unitNo;
+    }
+
+    @Override
+    public void setId(String unitNo) {
+        this.unitNo = unitNo == null ? null : unitNo.trim();
+    }
+
+    public String getUnitNo() {
+        return unitNo;
+    }
+
+    public void setUnitNo(String unitNo) {
+        this.unitNo = unitNo == null ? null : unitNo.trim();
+    }
+
+    public String getForwardingUnitNo() {
+        return forwardingUnitNo;
+    }
+
+    public void setForwardingUnitNo(String forwardingUnitNo) {
+        this.forwardingUnitNo = forwardingUnitNo == null ? null : forwardingUnitNo.trim();
+    }
+
+    public String getForwardingUnitName() {
+        return forwardingUnitName;
+    }
+
+    public void setForwardingUnitName(String forwardingUnitName) {
+        this.forwardingUnitName = forwardingUnitName == null ? null : forwardingUnitName.trim();
+    }
+
+    public String getReceivingUnitNo() {
+        return receivingUnitNo;
+    }
+
+    public void setReceivingUnitNo(String receivingUnitNo) {
+        this.receivingUnitNo = receivingUnitNo == null ? null : receivingUnitNo.trim();
+    }
+
+    public String getReceivingUnitName() {
+        return receivingUnitName;
+    }
+
+    public void setReceivingUnitName(String receivingUnitName) {
+        this.receivingUnitName = receivingUnitName == null ? null : receivingUnitName.trim();
+    }
+
+    public String getAllowedTareWeight() {
+        return allowedTareWeight;
+    }
+
+    public void setAllowedTareWeight(String allowedTareWeight) {
+        this.allowedTareWeight = allowedTareWeight == null ? null : allowedTareWeight.trim();
+    }
+
+    public String getCreateManNo() {
+        return createManNo;
+    }
+
+    public void setCreateManNo(String createManNo) {
+        this.createManNo = createManNo == null ? null : createManNo.trim();
+    }
+
+    public String getCreateManName() {
+        return createManName;
+    }
+
+    public void setCreateManName(String createManName) {
+        this.createManName = createManName == null ? null : createManName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateManNo() {
+        return updateManNo;
+    }
+
+    public void setUpdateManNo(String updateManNo) {
+        this.updateManNo = updateManNo == null ? null : updateManNo.trim();
+    }
+
+    public String getUpdateManName() {
+        return updateManName;
+    }
+
+    public void setUpdateManName(String updateManName) {
+        this.updateManName = updateManName == null ? null : updateManName.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getDeleteManNo() {
+        return deleteManNo;
+    }
+
+    public void setDeleteManNo(String deleteManNo) {
+        this.deleteManNo = deleteManNo == null ? null : deleteManNo.trim();
+    }
+
+    public String getDeleteManName() {
+        return deleteManName;
+    }
+
+    public void setDeleteManName(String deleteManName) {
+        this.deleteManName = deleteManName == null ? null : deleteManName.trim();
+    }
+
+    public Date getDeleteTime() {
+        return deleteTime;
+    }
+
+    public void setDeleteTime(Date deleteTime) {
+        this.deleteTime = deleteTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", unitNo=").append(unitNo);
+        sb.append(", forwardingUnitNo=").append(forwardingUnitNo);
+        sb.append(", forwardingUnitName=").append(forwardingUnitName);
+        sb.append(", receivingUnitNo=").append(receivingUnitNo);
+        sb.append(", receivingUnitName=").append(receivingUnitName);
+        sb.append(", allowedTareWeight=").append(allowedTareWeight);
+        sb.append(", createManNo=").append(createManNo);
+        sb.append(", createManName=").append(createManName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateManNo=").append(updateManNo);
+        sb.append(", updateManName=").append(updateManName);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", deleteManNo=").append(deleteManNo);
+        sb.append(", deleteManName=").append(deleteManName);
+        sb.append(", deleteTime=").append(deleteTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 26 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/service/IMeterBaseUnitInfoService.java

@@ -0,0 +1,26 @@
+package com.steerinfo.baseinfo.meterbaseunitinfo.service;
+
+import com.steerinfo.baseinfo.meterbaseunitinfo.model.MeterBaseUnitInfo;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * MeterBaseUnitInfo服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-04-12 10:02
+ * 类描述
+ * 修订历史:
+ * 日期:2022-04-12
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseUnitInfo服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IMeterBaseUnitInfoService extends IBaseService<MeterBaseUnitInfo, String>{
+    List<MeterBaseUnitInfo> queryBynoPage(Map<String, Object> parmas);
+    RESTfulResult addModel(MeterBaseUnitInfo model);
+}

+ 80 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseunitinfo/service/impl/MeterBaseUnitInfoServiceImpl.java

@@ -0,0 +1,80 @@
+package com.steerinfo.baseinfo.meterbaseunitinfo.service.impl;
+
+import com.steerinfo.baseinfo.meterbaseunitinfo.mapper.MeterBaseUnitInfoMapper;
+import com.steerinfo.baseinfo.meterbaseunitinfo.model.MeterBaseUnitInfo;
+import com.steerinfo.baseinfo.meterbaseunitinfo.service.IMeterBaseUnitInfoService;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * MeterBaseUnitInfo服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-04-12 10:02
+ * 类描述
+ * 修订历史:
+ * 日期:2022-04-12
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseUnitInfo服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "meterBaseUnitInfoService")
+public class MeterBaseUnitInfoServiceImpl extends BaseServiceImpl<MeterBaseUnitInfo, String> implements IMeterBaseUnitInfoService {
+
+    @Resource
+    private MeterBaseUnitInfoMapper meterBaseUnitInfoMapper;
+
+    @Override
+    protected IBaseMapper<MeterBaseUnitInfo, String> getMapper() {
+        return meterBaseUnitInfoMapper;
+    }
+
+    @Override
+    public List<MeterBaseUnitInfo> queryBynoPage(Map<String, Object> parmas) {
+        List<MeterBaseUnitInfo> list = meterBaseUnitInfoMapper.queryBynoPage(parmas);
+        return list;
+    }
+
+    @Override
+    public RESTfulResult addModel(MeterBaseUnitInfo model) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+
+        try{
+            if(model.getForwardingUnitName() == null || model.getReceivingUnitName() == null) {
+                rm.setMessage("收发货单位头不能为空,请确认!!");
+                return rm;
+            }
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String no = meterBaseUnitInfoMapper.getNewID(sdf.format(new Date()));
+            model.setUnitNo(sdf.format(new Date()) + no);
+            model.setCreateTime(new Date());
+            int i = meterBaseUnitInfoMapper.insertSelective(model);
+            if(i >= 1){
+                rm.setSucceed();
+                rm.setCode("200");
+                rm.setMessage("操作成功!!");
+                rm.setData(model);
+                return rm;
+            }
+            rm.setMessage("未配置成功,请确认!!");
+            return rm;
+        }catch(Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常!!" + e.getMessage());
+            return rm;
+        }
+    }
+
+
+}

+ 159 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/controller/MeterBaseUserSpotController.java

@@ -0,0 +1,159 @@
+package com.steerinfo.baseinfo.meterbaseuserspot.controller;
+
+import com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo;
+import com.steerinfo.baseinfo.meterbaseuserspot.mapper.MeterBaseUserSpotMapper;
+import com.steerinfo.baseinfo.meterbaseuserspot.model.MeterBaseUserSpot;
+import com.steerinfo.baseinfo.meterbaseuserspot.service.IMeterBaseUserSpotService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.meterwork.except.MarkerMetException;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * MeterBaseUserSpot RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-03-31 04:18
+ * 类描述
+ * 修订历史:
+ * 日期:2022-03-31
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseUserSpot RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/meterbaseuserspots")
+public class MeterBaseUserSpotController extends BaseRESTfulController {
+
+    @Autowired
+    IMeterBaseUserSpotService meterBaseUserSpotService;
+
+    @Autowired
+    MeterBaseUserSpotMapper meterBaseUserSpotMapper;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbaseuserspot:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseUserSpot> list = meterBaseUserSpotService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbaseuserspot:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseUserSpot> list = meterBaseUserSpotService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value = "获取列表", notes = "不分页查询")
+    @GetMapping(value = "/noPage")
+    public RESTfulResult listall(@RequestParam HashMap parmas) {
+        try {
+            List<MeterBaseUserSpot> list = meterBaseUserSpotService.queryall(parmas);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+    
+    @ApiOperation(value="创建", notes="根据MeterBaseUserSpot对象创建")
+    @ApiImplicitParam(name = "meterBaseUserSpot", value = "详细实体meterBaseUserSpot", required = true, dataType = "MeterBaseUserSpot")
+    //@RequiresPermissions("meterbaseuserspot:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@RequestBody MeterBaseUserSpot model){
+        MeterBaseUserSpot meterBaseUserSpot = meterBaseUserSpotService.add(model);
+        return success(meterBaseUserSpot);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaseuserspot:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        MeterBaseUserSpot meterBaseUserSpot = meterBaseUserSpotService.getById(id);
+        return success(meterBaseUserSpot);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的meterBaseUserSpot信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "meterBaseUserSpot", value = "详细实体meterBaseUserSpot", required = true, dataType = "MeterBaseUserSpot")
+    })
+    //@RequiresPermissions("meterbaseuserspot:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody MeterBaseUserSpot model){
+        model.setId(id);
+        MeterBaseUserSpot meterBaseUserSpot = meterBaseUserSpotService.modify(model);
+        return success(meterBaseUserSpot);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaseuserspot:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  meterBaseUserSpotService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value="根据用户和计量点ID创建对象", notes="根据sso.sys_user表和meter_base_spot_info表的id创建MeterBaseUserSpot对象")
+    @PostMapping(value = "/checkAdd")
+    public RESTfulResult checkAdd(@RequestBody List<MeterBaseUserSpot> model){
+        RESTfulResult rm = failed();
+        try{
+            rm = meterBaseUserSpotService.checkAdd(model);
+            return success(rm);
+        }catch(Exception e){
+            e.printStackTrace();
+            return rm;
+        }
+    }
+
+    @ApiOperation(value="删除称点信息", notes="通过ID删除")
+    @PostMapping(value = "/deleteUserSpot")
+    public RESTfulResult deleteUserSpot(@RequestBody List<MeterBaseUserSpot> models){
+        RESTfulResult rm = failed();
+        try{
+            List<String> list = new ArrayList<String>();
+            for (MeterBaseUserSpot model:models){
+                String id = model.getId();
+                list.add(id);
+            }
+            if(ListUtils.isNotEmpty(list)) {
+                List<String> ids = ListUtils.convertList(list);
+                meterBaseUserSpotService.delete(ids);
+            }
+            return success();
+        }catch(Exception e){
+            e.printStackTrace();
+            return failed(null,"操作异常,请重试");
+        }
+    }
+}

+ 11 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/mapper/MeterBaseUserSpotMapper.java

@@ -0,0 +1,11 @@
+package com.steerinfo.baseinfo.meterbaseuserspot.mapper;
+
+import com.steerinfo.baseinfo.meterbaseuserspot.model.MeterBaseUserSpot;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import feign.Param;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface MeterBaseUserSpotMapper extends IBaseMapper<MeterBaseUserSpot, String> {
+    String getNewID(@Param(value = "afl") String afl);
+}

+ 319 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/mapper/MeterBaseUserSpotMapper.xml

@@ -0,0 +1,319 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.steerinfo.baseinfo.meterbaseuserspot.mapper.MeterBaseUserSpotMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbaseuserspot.model.MeterBaseUserSpot">
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="USER_ID" jdbcType="VARCHAR" property="userId" />
+    <result column="USER_CODE" jdbcType="VARCHAR" property="userCode" />
+    <result column="USER_NAME" jdbcType="VARCHAR" property="userName" />
+    <result column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
+    <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
+    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
+    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="columns">
+    ID, USER_ID, USER_CODE, USER_NAME, BASE_SPOT_NO, BASE_SPOT_NAME, CREATE_MAN_NO, CREATE_MAN_NAME, 
+    CREATE_TIME
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.USER_ID, t.USER_CODE, t.USER_NAME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.CREATE_MAN_NO, 
+    t.CREATE_MAN_NAME, t.CREATE_TIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM METER_BASE_USER_SPOT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM METER_BASE_USER_SPOT t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID = #{id}
+      </if>
+      <if test="userId != null and userId != ''">
+        and USER_ID = #{userId}
+      </if>
+      <if test="userCode != null and userCode != ''">
+        and USER_CODE = #{userCode}
+      </if>
+      <if test="userName != null and userName != ''">
+        and USER_NAME = #{userName}
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and BASE_SPOT_NO = #{baseSpotNo}
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID LIKE '%${id}%'
+      </if>
+      <if test="userId != null and userId != ''">
+        and USER_ID LIKE '%${userId}%'
+      </if>
+      <if test="userCode != null and userCode != ''">
+        and USER_CODE LIKE '%${userCode}%'
+      </if>
+      <if test="userName != null and userName != ''">
+        and USER_NAME LIKE '%${userName}%'
+      </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="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>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from METER_BASE_USER_SPOT
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from METER_BASE_USER_SPOT
+    where 1!=1 
+      <if test="userId != null and userId != ''">
+        or USER_ID = #{userId}
+      </if>
+      <if test="userCode != null and userCode != ''">
+        or USER_CODE = #{userCode}
+      </if>
+      <if test="userName != null and userName != ''">
+        or USER_NAME = #{userName}
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        or BASE_SPOT_NO = #{baseSpotNo}
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        or BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        or CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        or CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbaseuserspot.model.MeterBaseUserSpot">
+    insert into METER_BASE_USER_SPOT (ID, USER_ID, USER_CODE, 
+      USER_NAME, BASE_SPOT_NO, BASE_SPOT_NAME, 
+      CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME
+      )
+    values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{userCode,jdbcType=VARCHAR}, 
+      #{userName,jdbcType=VARCHAR}, #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, 
+      #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbaseuserspot.model.MeterBaseUserSpot">
+    insert into METER_BASE_USER_SPOT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="userId != null">
+        USER_ID,
+      </if>
+      <if test="userCode != null">
+        USER_CODE,
+      </if>
+      <if test="userName != null">
+        USER_NAME,
+      </if>
+      <if test="baseSpotNo != null">
+        BASE_SPOT_NO,
+      </if>
+      <if test="baseSpotName != null">
+        BASE_SPOT_NAME,
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO,
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="userId != null">
+        #{userId,jdbcType=VARCHAR},
+      </if>
+      <if test="userCode != null">
+        #{userCode,jdbcType=VARCHAR},
+      </if>
+      <if test="userName != null">
+        #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotNo != null">
+        #{baseSpotNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotName != null">
+        #{baseSpotName,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbaseuserspot.model.MeterBaseUserSpot">
+    update METER_BASE_USER_SPOT
+    set USER_ID = #{userId,jdbcType=VARCHAR},
+      USER_CODE = #{userCode,jdbcType=VARCHAR},
+      USER_NAME = #{userName,jdbcType=VARCHAR},
+      BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
+      BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
+      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbaseuserspot.model.MeterBaseUserSpot">
+    update METER_BASE_USER_SPOT
+    <set>
+      <if test="userId != null">
+        USER_ID = #{userId,jdbcType=VARCHAR},
+      </if>
+      <if test="userCode != null">
+        USER_CODE = #{userCode,jdbcType=VARCHAR},
+      </if>
+      <if test="userName != null">
+        USER_NAME = #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotNo != null">
+        BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotName != null">
+        BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into METER_BASE_USER_SPOT 
+      (ID, 
+      USER_ID, USER_CODE, USER_NAME, 
+      BASE_SPOT_NO, BASE_SPOT_NAME, CREATE_MAN_NO, 
+      CREATE_MAN_NAME, CREATE_TIME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=VARCHAR}, 
+      #{item.userId,jdbcType=VARCHAR}, #{item.userCode,jdbcType=VARCHAR}, #{item.userName,jdbcType=VARCHAR}, 
+      #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, 
+      #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update METER_BASE_USER_SPOT
+     set
+       ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.id,jdbcType=VARCHAR}
+       </foreach>
+       ,USER_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.userId,jdbcType=VARCHAR}
+       </foreach>
+       ,USER_CODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.userCode,jdbcType=VARCHAR}
+       </foreach>
+       ,USER_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.userName,jdbcType=VARCHAR}
+       </foreach>
+       ,BASE_SPOT_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
+       </foreach>
+       ,BASE_SPOT_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+     where ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.id,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from METER_BASE_USER_SPOT
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
+    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(id, LENGTH(id) - 3))),0) + 1,4,'0') id
+    FROM meter_base_user_spot where instr(id,#{afl,jdbcType=VARCHAR})>0
+  </select>
+</mapper>

+ 158 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/model/MeterBaseUserSpot.java

@@ -0,0 +1,158 @@
+package com.steerinfo.baseinfo.meterbaseuserspot.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+@ApiModel(value="用户和计量点映射表")
+public class MeterBaseUserSpot implements IBasePO<String> {
+    /**
+     * 用户计量点映射Id(ID,VARCHAR,20)
+     */
+    @ApiModelProperty(value="用户计量点映射Id",required=true)
+    private String id;
+
+    /**
+     * 用户ID(USER_ID,VARCHAR,40)
+     */
+    @ApiModelProperty(value="用户ID",required=false)
+    private String userId;
+
+    /**
+     * 用户编号(USER_CODE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="用户编号",required=false)
+    private String userCode;
+
+    /**
+     * 用户姓名(USER_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="用户姓名",required=false)
+    private String userName;
+
+    /**
+     * 计量点编号(BASE_SPOT_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="计量点编号",required=false)
+    private String baseSpotNo;
+
+    /**
+     * 计量点名称(BASE_SPOT_NAME,VARCHAR,40)
+     */
+    @ApiModelProperty(value="计量点名称",required=false)
+    private String baseSpotName;
+
+    /**
+     * 创建人编号(CREATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="创建人编号",required=false)
+    private String createManNo;
+
+    /**
+     * 创建人名称(CREATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="创建人名称",required=false)
+    private String createManName;
+
+    /**
+     * 创建时间(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建时间",required=false)
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId == null ? null : userId.trim();
+    }
+
+    public String getUserCode() {
+        return userCode;
+    }
+
+    public void setUserCode(String userCode) {
+        this.userCode = userCode == null ? null : userCode.trim();
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName == null ? null : userName.trim();
+    }
+
+    public String getBaseSpotNo() {
+        return baseSpotNo;
+    }
+
+    public void setBaseSpotNo(String baseSpotNo) {
+        this.baseSpotNo = baseSpotNo == null ? null : baseSpotNo.trim();
+    }
+
+    public String getBaseSpotName() {
+        return baseSpotName;
+    }
+
+    public void setBaseSpotName(String baseSpotName) {
+        this.baseSpotName = baseSpotName == null ? null : baseSpotName.trim();
+    }
+
+    public String getCreateManNo() {
+        return createManNo;
+    }
+
+    public void setCreateManNo(String createManNo) {
+        this.createManNo = createManNo == null ? null : createManNo.trim();
+    }
+
+    public String getCreateManName() {
+        return createManName;
+    }
+
+    public void setCreateManName(String createManName) {
+        this.createManName = createManName == null ? null : createManName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", userId=").append(userId);
+        sb.append(", userCode=").append(userCode);
+        sb.append(", userName=").append(userName);
+        sb.append(", baseSpotNo=").append(baseSpotNo);
+        sb.append(", baseSpotName=").append(baseSpotName);
+        sb.append(", createManNo=").append(createManNo);
+        sb.append(", createManName=").append(createManName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 29 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/service/IMeterBaseUserSpotService.java

@@ -0,0 +1,29 @@
+package com.steerinfo.baseinfo.meterbaseuserspot.service;
+
+import com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo;
+import com.steerinfo.baseinfo.meterbaseuserspot.model.MeterBaseUserSpot;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.IBaseService;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * MeterBaseUserSpot服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-03-31 04:18
+ * 类描述
+ * 修订历史:
+ * 日期:2022-03-31
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseUserSpot服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IMeterBaseUserSpotService extends IBaseService<MeterBaseUserSpot, String>{
+    RESTfulResult checkAdd(List<MeterBaseUserSpot> models);
+
+    List<MeterBaseUserSpot> queryall(Map<String,Object> parmas);
+}

+ 75 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspot/service/impl/MeterBaseUserSpotServiceImpl.java

@@ -0,0 +1,75 @@
+package com.steerinfo.baseinfo.meterbaseuserspot.service.impl;
+
+import com.alibaba.druid.pool.ha.selector.RandomDataSourceRecoverThread;
+import com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo;
+import com.steerinfo.baseinfo.meterbaseuserspot.mapper.MeterBaseUserSpotMapper;
+import com.steerinfo.baseinfo.meterbaseuserspot.model.MeterBaseUserSpot;
+import com.steerinfo.baseinfo.meterbaseuserspot.service.IMeterBaseUserSpotService;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.util.SSOUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * MeterBaseUserSpot服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-03-31 04:18
+ * 类描述
+ * 修订历史:
+ * 日期:2022-03-31
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseUserSpot服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "meterBaseUserSpotService")
+public class MeterBaseUserSpotServiceImpl extends BaseServiceImpl<MeterBaseUserSpot, String> implements IMeterBaseUserSpotService {
+
+    @Autowired
+    private MeterBaseUserSpotMapper meterBaseUserSpotMapper;
+
+    @Override
+    protected IBaseMapper<MeterBaseUserSpot, String> getMapper() {
+        return meterBaseUserSpotMapper;
+    }
+
+    @Override
+    public RESTfulResult checkAdd(List<MeterBaseUserSpot> models) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setCode("200");
+        try{
+            int num = 0;
+            for(MeterBaseUserSpot model: models) {
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+                String afl = sdf.format(new Date());
+                String userSpotNo = sdf.format(new Date()) + meterBaseUserSpotMapper.getNewID(afl);
+                model.setId(userSpotNo);
+                model.setCreateTime(new Date());
+                meterBaseUserSpotMapper.insertSelective(model);
+                num++;
+            }
+            rm.setData(num);
+            rm.setMessage("");
+        }
+        catch (Exception e){
+            e.printStackTrace();
+            rm.setCode("500");
+            rm.setMessage(e.getMessage());
+        }
+        return rm;
+    }
+
+    @Override
+    public List<MeterBaseUserSpot> queryall(Map<String,Object> parmas)
+    {
+        return meterBaseUserSpotMapper.selectByParameters(parmas);
+    }
+}

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

@@ -7,6 +7,7 @@ import com.steerinfo.framework.utils.collection.ListUtils;
 import com.steerinfo.metermonitor.metermonitornote.model.MeterMonitorNote;
 import com.steerinfo.metermonitor.metermonitornote.service.IMeterMonitorNoteService;
 import com.steerinfo.meterwork.except.MarkerMetException;
+import com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
@@ -205,4 +206,15 @@ public class MeterMonitorNoteController extends BaseRESTfulController {
         return rm;
     }
 
+    @ApiOperation(value = "获取列表", notes = "不分页模糊查询最新前100条记录")
+    @GetMapping(value = "/noPage")
+    public RESTfulResult noPage(@RequestParam HashMap parmas) {
+        try {
+            List<MeterMonitorNote> list = meterMonitorNoteService.queryLikeNoPage(parmas);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
 }

+ 4 - 0
src/main/java/com/steerinfo/metermonitor/metermonitornote/mapper/MeterMonitorNoteMapper.java

@@ -2,9 +2,11 @@ package com.steerinfo.metermonitor.metermonitornote.mapper;
 
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.metermonitor.metermonitornote.model.MeterMonitorNote;
+import com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor;
 import feign.Param;
 import org.apache.ibatis.annotations.Mapper;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -17,4 +19,6 @@ public interface MeterMonitorNoteMapper extends IBaseMapper<MeterMonitorNote, St
     String getNewID(@Param(value = "afl") String afl);
 
     List<MeterMonitorNote> selectByType(Map<String, Object> parmas);
+
+    List<MeterMonitorNote> queryLikeNoPage(HashMap<String, Object> params);
 }

+ 9 - 0
src/main/java/com/steerinfo/metermonitor/metermonitornote/mapper/MeterMonitorNoteMapper.xml

@@ -644,4 +644,13 @@
       where t1.spot_type_no = #{spotTypeNo})
     </where>
   </select>
+
+  <select id="queryLikeNoPage" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    select * from (
+    <include refid="select" />
+    <include refid="where" />
+    order by operation_time desc
+    )
+    where rownum &lt;= 100
+  </select>
 </mapper>

+ 4 - 0
src/main/java/com/steerinfo/metermonitor/metermonitornote/service/IMeterMonitorNoteService.java

@@ -3,8 +3,10 @@ package com.steerinfo.metermonitor.metermonitornote.service;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.metermonitor.metermonitornote.model.MeterMonitorNote;
+import com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -30,4 +32,6 @@ public interface IMeterMonitorNoteService extends IBaseService<MeterMonitorNote,
 
     PageList<MeterMonitorNote> selectByType(HashMap parmas, Integer pageNum, Integer pageSize);
 
+    List<MeterMonitorNote> queryLikeNoPage(HashMap<String, Object> params);
+
 }

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

@@ -8,6 +8,7 @@ import com.steerinfo.metermonitor.metermonitornote.mapper.MeterMonitorNoteMapper
 import com.steerinfo.metermonitor.metermonitornote.model.MeterMonitorNote;
 import com.steerinfo.metermonitor.metermonitornote.service.IMeterMonitorNoteService;
 import com.steerinfo.meterwork.except.MarkerMetException;
+import com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -90,4 +91,10 @@ public class MeterMonitorNoteServiceImpl extends BaseServiceImpl<MeterMonitorNot
         PageList pageInfo = new PageList(rows);
         return pageInfo;
     }
+
+    @Override
+    public List<MeterMonitorNote> queryLikeNoPage(HashMap<String, Object> params) {
+        List<MeterMonitorNote> monitors = meterMonitorNoteMapper.queryLikeNoPage(params);
+        return monitors;
+    }
 }

+ 177 - 7
src/main/java/com/steerinfo/meterwork/meterworkcaractual/controller/MeterWorkCarActualController.java

@@ -33,11 +33,10 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.io.IOException;
+import java.math.BigDecimal;
 import java.text.ParseException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 /**
  * MeterWorkCarActual RESTful接口:
@@ -101,6 +100,38 @@ throw new MarkerMetException(500, "操作异常!!");
         }
     }
 
+    @ApiOperation(value = "获取列表", notes = "分页模糊查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    @PostMapping(value = "/likeByDesc")
+    public RESTfulResult likeByDesc(@RequestBody HashMap params, Integer pageNum, Integer pageSize) {
+        try {
+            PageList<MeterWorkCarActual> list = meterWorkCarActualService.likeByDesc(params, pageNum, pageSize);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
+    @ApiOperation(value = "获取列表", notes = "分页模糊查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    @PostMapping(value = "/likeByValueFlag/")
+    public RESTfulResult likeByValueFlag(@RequestBody HashMap params, Integer pageNum, Integer pageSize) {
+        try {
+            PageList<MeterWorkCarActual> list = meterWorkCarActualService.likeByDesc(params, pageNum, pageSize);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
     @ApiOperation(value = "获取列表", notes = "分页模糊查询")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
@@ -413,8 +444,8 @@ throw new MarkerMetException(500, "操作异常!!");
     public RESTfulResult matchPrediction(@RequestParam String actualNo, String predictionNo, String note) {
         RESTfulResult rm = failed();
         try {
-            MeterWorkCarActual mwca = meterWorkCarActualService.matchPrediction(actualNo, predictionNo, note);
-            return success(mwca);
+            rm = meterWorkCarActualService.matchPrediction(actualNo, predictionNo, note);
+            return rm;
         } catch (MarkerMetException e) {
             e.printStackTrace();
             rm.setMessage(e.getMessage());
@@ -446,7 +477,7 @@ throw new MarkerMetException(500, "操作异常!!");
         return rm;
     }
 
-    @ApiOperation(value = "解除", notes = "将洁净后的数据进行还原")
+    @ApiOperation(value = "解除", notes = "将洁净后的数据进行还原且清除委托信息")
     @PostMapping(value = "/remove")
     public RESTfulResult remove(@RequestBody List<MeterWorkCarActual> models) {
         RESTfulResult rm = failed();
@@ -468,6 +499,44 @@ throw new MarkerMetException(500, "操作异常!!");
         }
         return rm;
     }
+    @ApiOperation(value = "解除", notes = "将洁净后的数据进行还原但不清除委托信息")
+    @PostMapping(value = "/removeButNotEntrust")
+    public RESTfulResult removeButNotEntrust(@RequestBody List<MeterWorkCarActual> models) {
+        RESTfulResult rm = failed();
+        try {
+            int num = meterWorkCarActualService.removeButNotEntrust(models);
+            if (num >= 1) {
+                return success(num);
+            } else {
+                return failed("操作失败");
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "特殊委托解除洁净", notes = "将洁净后的数据进行还原")
+    @PostMapping(value = "/specialRemove")
+    public RESTfulResult specialRemove(@RequestBody HashMap params) {
+        RESTfulResult rm = failed();
+        try {
+            rm = meterWorkCarActualService.specialRemove(params);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        }
+        return rm;
+    }
 
     @ApiOperation(value = "查询计量票据录入数据")
     @PostMapping(value = "/selectManualData")
@@ -709,4 +778,105 @@ throw new MarkerMetException(500, "操作异常!!");
         }
         return rm;
     }
+
+    @ApiOperation(value = "汽车衡净重数据补录", notes = "根据MeterWorkCarActual对象创建")
+    @PostMapping(value = "/supplementaryData")
+    public RESTfulResult supplementaryData(@RequestBody HashMap map) {
+        RESTfulResult rm = failed();
+        try {
+            SimpleDateFormat simpleFormat = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
+            String grossTimeTemp = map.get("grossTime").toString().replaceAll("-", "/");
+            String tareTimeTemp = map.get("tareTime").toString().replaceAll("-", "/");
+            String netTimeTemp = map.get("netTime").toString().replaceAll("-", "/");
+
+            Date grossTime = simpleFormat.parse(grossTimeTemp);
+            Date tareTime = simpleFormat.parse(tareTimeTemp);
+            Date netTime = simpleFormat.parse(netTimeTemp);
+
+            MeterWorkCarActual model = new MeterWorkCarActual();
+            model.setPredictionNo(map.get("predictionNo").toString());
+            model.setBaseSpot1No(map.get("baseSpot1No").toString());
+            model.setBaseSpot1Name(map.get("baseSpot1Name").toString());
+            model.setGrossManNo(map.get("grossManNo").toString());
+            model.setGrossManName(map.get("grossManName").toString());
+            model.setGrossTime(grossTime);
+            model.setTareTime(tareTime);
+            model.setNetTime(netTime);
+            model.setBaseSpot2No(map.get("baseSpot2No").toString());
+            model.setBaseSpot2Name(map.get("baseSpot2Name").toString());
+            model.setCarNo(map.get("carNo").toString());
+            model.setGrossWeight(new BigDecimal(map.get("grossWeight").toString()));
+            model.setTareWeight(new BigDecimal(map.get("tareWeight").toString()));
+            rm = meterWorkCarActualService.supplementaryData(model);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "根据实绩id获取一次计量信息和委托信息", notes = "根据实绩id获取一次计量信息和委托信息")
+    @PostMapping(value = "/firstAndEntrustById")
+    public RESTfulResult firstAndEntrustById(@RequestBody HashMap params) {
+        RESTfulResult rm = failed();
+        try {
+            String actualNo = params.get("actualNo") == null ? "" : params.get("actualNo").toString();
+            rm = meterWorkCarActualService.firstAndEntrustById(actualNo);
+            if (rm.getData() != null) {
+                return rm;
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "废除标识", notes = "根据List对象,更新valueFlag状态")
+    @ApiImplicitParams({
+            @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "meterWorkCarActual", value = "详细实体meterWorkCarActual", required = true, dataType = "MeterWorkCarActual")
+    })
+    @PutMapping(value = "/abolish", produces = "application/json;charset=UTF-8")
+    public RESTfulResult abolish(@RequestBody List<MeterWorkCarActual> models) {
+        RESTfulResult rm = failed();
+        try {
+            rm = meterWorkCarActualService.abolish(models);
+            return success(rm);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
+    @ApiOperation(value = "根据HashMap查询最新的洁净信息", notes = "根据HashMap查询最新的洁净信息")
+    @PostMapping(value = "/selectByMap")
+    public RESTfulResult selectByMap(@RequestBody HashMap params) {
+        RESTfulResult rm = failed();
+        try {
+            rm = meterWorkCarActualService.selectByMap(params);
+            if (rm.getData() != null) {
+                return rm;
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
 }

+ 4 - 0
src/main/java/com/steerinfo/meterwork/meterworkcaractual/mapper/MeterWorkCarActualMapper.java

@@ -53,4 +53,8 @@ public interface MeterWorkCarActualMapper extends IBaseMapper<MeterWorkCarActual
     List<MeterWorkCarActual> getCarActual(Map<String, Object> obj);
 
     MeterWorkCarActual selectActual(String actualFirstNo);
+
+    List<MeterWorkCarActual> likeByDesc(Map<String, Object> params);
+
+    List<MeterWorkCarActual> selectByMap(Map<String, Object> params);
 }

Fichier diff supprimé car celui-ci est trop grand
+ 373 - 330
src/main/java/com/steerinfo/meterwork/meterworkcaractual/mapper/MeterWorkCarActualMapper.xml


+ 31 - 0
src/main/java/com/steerinfo/meterwork/meterworkcaractual/model/MeterWorkCarActual.java

@@ -3,6 +3,7 @@ package com.steerinfo.meterwork.meterworkcaractual.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -668,6 +669,18 @@ public class MeterWorkCarActual implements IBasePO<String> {
     @ApiModelProperty(value="是否匹配委托(0:未匹配,1:已匹配)",required=false)
     private String isPreScale;
 
+    /**
+     * 电子磅单地址(BOUND_LIST_URL,VARCHAR,100)
+     */
+    @ApiModelProperty(value="电子磅单地址",required=false)
+    private String boundListUrl;
+
+    /**
+     * 是否生成电子磅单标识(0:未生成, 1:已生成)(IS_BOUND_LIST,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否生成电子磅单标识(0:未生成, 1:已生成)",required=false)
+    private String isBoundList;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -1560,6 +1573,22 @@ public class MeterWorkCarActual implements IBasePO<String> {
         this.isPreScale = isPreScale == null ? null : isPreScale.trim();
     }
 
+    public String getBoundListUrl() {
+        return boundListUrl;
+    }
+
+    public void setBoundListUrl(String boundListUrl) {
+        this.boundListUrl = boundListUrl == null ? null : boundListUrl.trim();
+    }
+
+    public String getIsBoundList() {
+        return isBoundList;
+    }
+
+    public void setIsBoundList(String isBoundList) {
+        this.isBoundList = isBoundList == null ? null : isBoundList.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -1676,6 +1705,8 @@ public class MeterWorkCarActual implements IBasePO<String> {
         sb.append(", createTime=").append(createTime);
         sb.append(", dataSource=").append(dataSource);
         sb.append(", isPreScale=").append(isPreScale);
+        sb.append(", boundListUrl=").append(boundListUrl);
+        sb.append(", isBoundList=").append(isBoundList);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 17 - 1
src/main/java/com/steerinfo/meterwork/meterworkcaractual/service/IMeterWorkCarActualService.java

@@ -7,7 +7,9 @@ import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
 import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
 import com.steerinfo.util.CommonPage;
 import io.micrometer.core.instrument.Meter;
+import org.apache.shiro.crypto.hash.Hash;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -31,6 +33,8 @@ public interface IMeterWorkCarActualService extends IBaseService<MeterWorkCarAct
 
     int checkandadditional(MeterWorkCarActual model);
 
+    RESTfulResult supplementaryData(MeterWorkCarActual model);
+
     int audit(MeterWorkCarActual model);
 
     int unaudit(MeterWorkCarActual model);
@@ -45,7 +49,7 @@ public interface IMeterWorkCarActualService extends IBaseService<MeterWorkCarAct
 
     int manualInput (MeterWorkCarActual model);
 
-    MeterWorkCarActual matchPrediction(String actualNo, String predictionNo, String note);
+    RESTfulResult matchPrediction(String actualNo, String predictionNo, String note);
 
     MeterWorkCarActual cleanPrediction(MeterWorkCarActual model);
 
@@ -55,6 +59,10 @@ public interface IMeterWorkCarActualService extends IBaseService<MeterWorkCarAct
 
     int remove(List<MeterWorkCarActual> models);
 
+    public int removeButNotEntrust(List<MeterWorkCarActual> models);
+
+    RESTfulResult specialRemove(HashMap map);
+
     MeterWorkCarActual termclean(String actualFirstNo, String dataNo);
 
     RESTfulResult doQueryWf(CommonPage<MeterWorkCarActual> oci);
@@ -81,4 +89,12 @@ public interface IMeterWorkCarActualService extends IBaseService<MeterWorkCarAct
 
     // 根据传入的一次计量数据和洁净数据实体进行洁净操作
     MeterWorkCarActual clientClean(MeterWorkCarActualFirst first, MeterWorkCarActual net);
+    //根据实绩id获取一次计量信息和委托信息
+    RESTfulResult firstAndEntrustById(String actualNo);
+
+    PageList<MeterWorkCarActual> likeByDesc(HashMap<String, Object> params, Integer pageNum, Integer pageSize);
+
+    RESTfulResult abolish(List<MeterWorkCarActual> models);
+
+    RESTfulResult selectByMap(HashMap<String, Object> params);
 }

+ 600 - 56
src/main/java/com/steerinfo/meterwork/meterworkcaractual/service/impl/MeterWorkCarActualServiceImpl.java

@@ -21,7 +21,6 @@ import com.steerinfo.meterwork.meterworkcaractualfirst.mapper.MeterWorkCarActual
 import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
 import com.steerinfo.meterwork.meterworkcaractualfirst.service.IMeterWorkCarActualFirstService;
 import com.steerinfo.meterwork.meterworkprelink.mapper.MeterWorkPreLinkMapper;
-import com.steerinfo.meterwork.meterworkprelink.model.MeterWorkPreLink;
 import com.steerinfo.meterwork.meterworkprelink.service.IMeterWorkPreLinkService;
 import com.steerinfo.meterwork.meterworkrailwayactual.mapper.MeterWorkRailwayActualMapper;
 import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
@@ -390,7 +389,6 @@ public class MeterWorkCarActualServiceImpl extends BaseServiceImpl<MeterWorkCarA
             actualRow.setActualNo(sdf.format(new Date()) + no);
             actualRow.setNote(note);
             actualRow.setUploadFlag("1");
-//            actualRow.setDataSource("1");
             actualRow.setNetWeight(mwcaf1.getMeterWeight().subtract(mwcaf2.getMeterWeight()));
             meterWorkCarActualMapper.insertSelective(actualRow);
             return actualRow;
@@ -484,6 +482,347 @@ public class MeterWorkCarActualServiceImpl extends BaseServiceImpl<MeterWorkCarA
         }
     }
 
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int removeButNotEntrust(List<MeterWorkCarActual> models) {
+        try {
+            int num = 0;
+            if (models == null || models.size() <= 0) {
+                throw new MarkerMetException(500, "参数为空!!!");
+            }
+            for (MeterWorkCarActual model : models) {
+                //毛重
+                MeterWorkCarActualFirst mwcaf1 = meterWorkCarActualFirstMapper.selectByPrimaryKey(model.getActualFirst1No());
+                if (mwcaf1 == null) {
+                    throw new MarkerMetException(500, "未查询到相应的毛重数据!!");
+                }
+                // 清空毛重数据中的委托信息
+                mwcaf1.setValueFlag(DbConstants.VALID);
+                mwcaf1.setNote(model.getNote());
+                mwcaf1.setUpdateManName("system");
+                mwcaf1.setUpdateManName("二次计量解除更新");
+                mwcaf1.setUpdateTime(new Date());
+                meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf1);
+                //皮重
+                MeterWorkCarActualFirst mwcaf2 = meterWorkCarActualFirstMapper.selectByPrimaryKey(model.getActualFirst2No());
+                MeterBaseTermTareData mbttd = meterBaseTermTareDataMapper.selectByPrimaryKey(model.getActualFirst2No());
+                if (mwcaf2 == null && mbttd == null) {
+                    throw new MarkerMetException(500, "未查询到相应的皮重数据!!");
+                }
+                if (mwcaf2 != null) {
+                    if ("2".equals(mwcaf2.getWeightType())) {
+                        mwcaf2.setValueFlag(DbConstants.INVALID); //期限皮重置为作废
+                        mwcaf2.setUpdateManName("system");
+                        mwcaf2.setUpdateManName("二次计量解除作废");
+                        mwcaf2.setUpdateTime(new Date());
+                    } else {
+                        mwcaf2.setValueFlag(DbConstants.VALID);
+                        mwcaf2.setUpdateManName("system");
+                        mwcaf2.setUpdateManName("二次计量解除更新");
+                        mwcaf2.setNote(model.getNote());
+                        mwcaf2.setUpdateTime(new Date());
+                    }
+                    meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf2);
+                }
+                meterWorkCarActualMapper.deleteByPrimaryKey(model.getActualNo());
+                //model.setUploadFlag("1");
+                //model.setValueFlag("0");
+                //meterWorkCarActualMapper.updateByPrimaryKey(model);
+                num++;
+            }
+            return num;
+        } catch (MarkerMetException e) {
+            throw e;
+        }
+    }
+
+    @Override
+    public RESTfulResult specialRemove(HashMap params) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+        rm.setData(null);
+        rm.setCode("500");
+        String type = params.get("type") == null ? "" : params.get("type").toString();
+        MeterWorkCarActual actualModel01 = meterWorkCarActualMapper.selectByPrimaryKey(params.get("actualNo01").toString());
+        MeterWorkCarActual actualModel02 = meterWorkCarActualMapper.selectByPrimaryKey(params.get("actualNo02").toString());
+        if(actualModel01 == null || actualModel02 == null){
+            rm.setMessage("未找到一次计量数据,请确认!!!");
+            return rm;
+        }
+        List<MeterWorkCarActual> models = new ArrayList<MeterWorkCarActual>();
+        models.add(actualModel01);
+        models.add(actualModel02);
+
+        if(models == null || models.size() == 0) {
+            rm.setMessage("参数为空,请确认!!!");
+            return rm;
+        }
+        //models必须是2个,而且他们的预报组合号一致
+        if(models.size() != 2 && models.get(0).getPredictionCombination().equals(models.get(1).getPredictionCombination())){
+            rm.setMessage("必须选择两个预报组合号一致的洁净数据!!!");
+            return rm;
+        }
+
+        switch(type){
+            case "5": {
+                //类型为双委托类型
+                for (MeterWorkCarActual model: models) {
+                    if(!model.getPredictionType().equals("5")) {
+                           rm.setMessage("选中的计量数据当中有一条或多条不是双委托洁净数据,请确认!!");
+                           return rm;
+                    }
+                }
+                for (MeterWorkCarActual model: models) {
+                    //循环每一个洁净记录
+                    //判断委托是否为双委托组合的第二个委托,是:删除一次数据和洁净记录、否:修改一次记录、
+                    String combination = model.getPredictionCombination();
+                    String[] param = combination.split(",");
+
+                    if(model.getPredictionNo().equals(param[1])){
+                        // 改委托
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreTrackScale scale = preTrackScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("双委托解除操作");
+                            preTrackScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        // 删一次
+                        MeterWorkCarActualFirst firstGross = meterWorkCarActualFirstMapper.selectByPrimaryKey(model.getActualFirst1No());
+                        MeterWorkCarActualFirst firstTare = meterWorkCarActualFirstMapper.selectByPrimaryKey(model.getActualFirst2No());
+                        if(firstGross.getPredictionNo().equals(model.getPredictionNo())){
+                            meterWorkCarActualFirstMapper.deleteByPrimaryKey(model.getActualFirst1No());
+                        }
+                        if(firstTare.getPredictionNo().equals(model.getPredictionNo())){
+                            meterWorkCarActualFirstMapper.deleteByPrimaryKey(model.getActualFirst2No());
+                        }
+
+                        // 删洁净
+                        meterWorkCarActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                    else {
+                        // 清空毛重数据中的委托信息
+                        MeterWorkCarActualFirst mwcafg = meterWorkCarActualFirstMapper.selectAndRemove(model.getActualFirst1No());
+                        if (mwcafg == null) {
+                            rm.setMessage("未查询到相应的毛重数据!!");
+                            return rm;
+                        }
+                        mwcafg.setValueFlag(DbConstants.VALID);
+                        mwcafg.setNote(model.getNote());
+                        mwcafg.setUpdateManName("system");
+                        mwcafg.setUpdateManName("双委托解除更新");
+                        mwcafg.setUpdateTime(new Date());
+                        mwcafg.setIsPreScale("0");
+                        meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcafg);
+                        //皮重
+                        MeterWorkCarActualFirst mwcaft = meterWorkCarActualFirstMapper.selectAndRemove(model.getActualFirst2No());
+                        if (mwcaft == null) {
+                            rm.setMessage("未查询到相应的皮重数据!!");
+                            return rm;
+                        }
+                        mwcaft.setValueFlag(DbConstants.VALID);
+                        mwcaft.setUpdateManName("system");
+                        mwcaft.setUpdateManName("双委托解除更新");
+                        mwcaft.setNote(model.getNote());
+                        mwcaft.setUpdateTime(new Date());
+                        mwcaft.setIsPreScale("0");
+                        meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaft);
+                        //修改预报
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreTrackScale scale = preTrackScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("双委托解除操作");
+                            preTrackScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        meterWorkCarActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                }
+                rm.setSucceed();
+                rm.setMessage("操作成功!!");
+                rm.setCode("200");
+            }
+            break;
+            case "6": {         //类型为混卸类型
+                for (MeterWorkCarActual model: models) {
+                    if(!model.getPredictionType().equals("6")) {
+                        rm.setMessage("选中的计量数据当中有一条或多条不是混卸委托洁净数据,请确认!!");
+                    }
+                }
+                for (MeterWorkCarActual model: models) {
+                    //循环每一个洁净记录
+                    //判断委托是否为双委托组合的第二个委托,是:删除一次数据和洁净记录、否:修改一次记录、
+                    String combination = model.getPredictionCombination();
+                    String[] param = combination.split(",");
+
+                    if(model.getPredictionNo().equals(param[1])){
+                        // 改委托
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreTrackScale scale = preTrackScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("混卸解除操作");
+                            preTrackScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        // 删一次毛重、清空一次皮重委托信息
+                        MeterWorkCarActualFirst firstTare = meterWorkCarActualFirstMapper.selectByPrimaryKey(model.getActualFirst2No());
+                        MeterWorkCarActualFirst firstGross = meterWorkCarActualFirstMapper.selectAndRemove(model.getActualFirst1No());
+                        if(firstTare.getPredictionNo().equals(model.getPredictionNo())){
+                            meterWorkCarActualFirstMapper.deleteByPrimaryKey(model.getActualFirst2No());
+                        }
+                        if(firstGross != null){
+                            firstGross.setValueFlag(DbConstants.VALID);
+                            firstGross.setUpdateManName("system");
+                            firstGross.setUpdateManName("混卸解除更新");
+                            firstGross.setNote(model.getNote());
+                            firstGross.setUpdateTime(new Date());
+                            firstGross.setIsPreScale("0");
+                            meterWorkCarActualFirstMapper.updateByPrimaryKey(firstGross);
+                        }
+                        // 删洁净
+                        meterWorkCarActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                    else {
+                        // 清空毛重数据中的委托信息
+                        MeterWorkCarActualFirst mwcafg = meterWorkCarActualFirstMapper.selectAndRemove(model.getActualFirst1No());
+                        if (mwcafg == null) {
+                            rm.setMessage("未查询到相应的毛重数据!!");
+                            return rm;
+                        }
+                        mwcafg.setValueFlag(DbConstants.VALID);
+                        mwcafg.setNote(model.getNote());
+                        mwcafg.setUpdateManName("system");
+                        mwcafg.setUpdateManName("混卸解除更新");
+                        mwcafg.setUpdateTime(new Date());
+                        mwcafg.setIsPreScale("0");
+                        meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcafg);
+                        //皮重
+                        MeterWorkCarActualFirst mwcaft = meterWorkCarActualFirstMapper.selectAndRemove(model.getActualFirst2No());
+                        if (mwcaft == null) {
+                            rm.setMessage("未查询到相应的皮重数据!!");
+                            return rm;
+                        }
+                        mwcaft.setValueFlag(DbConstants.VALID);
+                        mwcaft.setUpdateManName("system");
+                        mwcaft.setUpdateManName("混卸解除更新");
+                        mwcaft.setNote(model.getNote());
+                        mwcaft.setUpdateTime(new Date());
+                        mwcaft.setIsPreScale("0");
+                        meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaft);
+                        //修改预报
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreTrackScale scale = preTrackScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("混卸解除操作");
+                            preTrackScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        meterWorkCarActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                }
+                rm.setSucceed();
+                rm.setMessage("操作成功!!");
+                rm.setCode("200");
+            }
+            break;
+            case "7": {         //类型为混装类型
+                for (MeterWorkCarActual model: models) {
+                    if(!model.getPredictionType().equals("7")) {
+                        rm.setMessage("选中的计量数据当中有一条或多条不是混装委托洁净数据,请确认!!");
+                    }
+                }
+                for (MeterWorkCarActual model: models) {
+                    //循环每一个洁净记录
+                    //判断委托是否为双委托组合的第二个委托,是:删除一次数据和洁净记录、否:修改一次记录、
+                    String combination = model.getPredictionCombination();
+                    String[] param = combination.split(",");
+
+                    if(model.getPredictionNo().equals(param[1])){
+                        // 改委托
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreTrackScale scale = preTrackScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("混装解除操作");
+                            preTrackScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        // 删一次毛重、清空一次皮重委托信息
+                        MeterWorkCarActualFirst firstGross = meterWorkCarActualFirstMapper.selectByPrimaryKey(model.getActualFirst1No());
+                        MeterWorkCarActualFirst firstTare = meterWorkCarActualFirstMapper.selectAndRemove(model.getActualFirst2No());
+                        if(firstGross.getPredictionNo().equals(model.getPredictionNo())){
+                            meterWorkCarActualFirstMapper.deleteByPrimaryKey(model.getActualFirst1No());
+                        }
+                        if(firstTare != null){
+                            firstTare.setValueFlag(DbConstants.VALID);
+                            firstTare.setUpdateManName("system");
+                            firstTare.setUpdateManName("混装解除更新");
+                            firstTare.setNote(model.getNote());
+                            firstTare.setUpdateTime(new Date());
+                            firstTare.setIsPreScale("0");
+                            meterWorkCarActualFirstMapper.updateByPrimaryKey(firstTare);
+                        }
+                        // 删洁净
+                        meterWorkCarActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                    else {
+                        // 清空毛重数据中的委托信息
+                        MeterWorkCarActualFirst mwcafg = meterWorkCarActualFirstMapper.selectAndRemove(model.getActualFirst1No());
+                        if (mwcafg == null) {
+                            rm.setMessage("未查询到相应的毛重数据!!");
+                            return rm;
+                        }
+                        mwcafg.setValueFlag(DbConstants.VALID);
+                        mwcafg.setNote(model.getNote());
+                        mwcafg.setUpdateManName("system");
+                        mwcafg.setUpdateManName("混装解除更新");
+                        mwcafg.setUpdateTime(new Date());
+                        mwcafg.setIsPreScale("0");
+                        meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcafg);
+                        //皮重
+                        MeterWorkCarActualFirst mwcaft = meterWorkCarActualFirstMapper.selectAndRemove(model.getActualFirst2No());
+                        if (mwcaft == null) {
+                            rm.setMessage("未查询到相应的皮重数据!!");
+                            return rm;
+                        }
+                        mwcaft.setValueFlag(DbConstants.VALID);
+                        mwcaft.setUpdateManName("system");
+                        mwcaft.setUpdateManName("混装解除更新");
+                        mwcaft.setNote(model.getNote());
+                        mwcaft.setUpdateTime(new Date());
+                        mwcaft.setIsPreScale("0");
+                        meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaft);
+                        //修改预报
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreTrackScale scale = preTrackScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("混装解除操作");
+                            preTrackScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        meterWorkCarActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                }
+                rm.setSucceed();
+                rm.setMessage("操作成功!!");
+                rm.setCode("200");
+            }
+            break;
+        }
+        return rm;
+    }
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public int manualInput (MeterWorkCarActual model) {
@@ -518,67 +857,164 @@ public class MeterWorkCarActualServiceImpl extends BaseServiceImpl<MeterWorkCarA
     }
 
     @Override
-    @Transactional(rollbackFor = Exception.class)
-    public MeterWorkCarActual matchPrediction (String actualNo, String predictionNo, String note) throws MarkerMetException {
-        if (actualNo == null || "".equals(actualNo)) {
-            throw new MarkerMetException(500, "洁净数据主键不能为空");
-        }
-        if (predictionNo == null || "".equals(predictionNo)) {
-            throw new MarkerMetException(500, "预报编号不能为空");
-        }
-        MeterWorkCarActual queryrow = meterWorkCarActualMapper.selectByPrimaryKey(actualNo);
-        if (queryrow == null) {
-            throw new MarkerMetException(500, "不存在对应的洁净数据");
-        } else if (!queryrow.getValueFlag().equals("3") || queryrow.getPredictionNo() != null) {
-            throw new MarkerMetException(500, "只有未匹配的净重数据才能进行委托匹配操作");
+    public RESTfulResult firstAndEntrustById(String actualNo) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setMessage("查询失败!");
+        rm.setFailed();
+
+        List<String> actualNoList = new ArrayList<>();
+        MeterWorkCarActual carActual = meterWorkCarActualMapper.selectByPrimaryKey(actualNo);
+        if(carActual != null) {
+            actualNoList.add(0, carActual.getActualFirst1No());
+            actualNoList.add(1, carActual.getActualFirst2No());
+            String entrust = carActual.getPredictionNo() == null ? "" : carActual.getPredictionNo();
+            List<MeterWorkCarActualFirst> firstList = meterWorkCarActualFirstMapper.selectById(actualNoList);
+            PreTrackScale scale = preTrackScaleMapper.selectByPrimaryKey(entrust);
+            HashMap<String, Object> map = new HashMap<>();
+            map.put("firstList", firstList);
+            map.put("scale", scale);
+            rm.setData(map);
+            rm.setSucceed();
+            rm.setCode("200");
+            rm.setMessage("操作成功!!");
+            return rm;
         }
-        PreTrackScale prerow = preTrackScaleMapper.selectByPrimaryKey(predictionNo);
-        if (prerow == null) {
-            throw new MarkerMetException(500, "不存在对应的预报数据");
-        } else if (!prerow.getValueFlag().equals("1")) {
-            throw new MarkerMetException(500, "只有未使用的委托才能进行匹配委托操作");
+        return null;
+    }
+
+    @Override
+    public PageList<MeterWorkCarActual> likeByDesc(HashMap<String, Object> params, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<MeterWorkCarActual> rows = meterWorkCarActualMapper.likeByDesc(params);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
+
+    @Override
+    public RESTfulResult abolish(List<MeterWorkCarActual> models) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+
+        int sum = 0;
+        for(MeterWorkCarActual model: models){
+            model.setValueFlag("0");
+            int i = meterWorkCarActualMapper.updateByPrimaryKeySelective(model);
+            if(i >= 1){
+                sum++;
+            }else{
+                return rm;
+            }
         }
-        if (!queryrow.getCarNo().equals(prerow.getCarNo())) {
-            throw new MarkerMetException(500, "洁净数据中车号和预报中车号不一致,不允许进行匹配委托操作");
+        rm.setSucceed();
+        rm.setMessage("操作成功!!");
+        rm.setData(sum);
+        rm.setCode("200");
+        return rm;
+    }
+
+    @Override
+    public RESTfulResult selectByMap(HashMap<String, Object> params) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setSucceed();
+        rm.setData(null);
+        rm.setMessage("");
+        rm.setCode("200");
+        params.remove("createTime");
+        List<MeterWorkCarActual> models = meterWorkCarActualMapper.selectByMap(params);
+        if(models.size() >= 1) {
+            rm.setSucceed();
+            rm.setMessage("操作成功!!");
+            rm.setCode("200");
+            rm.setData(models);
         }
-        UserPayload payload = UserPayload.getCurrUser();
-        String userId = payload.getId();
-        String userName = payload.getUserName();
+        return rm;
+    }
 
-        // 处理一次计量数据
-        // 毛重
-        MeterWorkCarActualFirst grossrow = meterWorkCarActualFirstMapper.selectAndMatch(queryrow.getActualFirst1No(), predictionNo);
-        grossrow.setUpdateTime(new Date());
-        grossrow.setUpdateManName(userName + ": 洁净数据匹配委托操作");
-        grossrow.setUpdateManNo(userId);
-        meterWorkCarActualFirstMapper.updateByPrimaryKey(grossrow);
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public RESTfulResult matchPrediction (String actualNo, String predictionNo, String note){
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+        rm.setCode("500");
+        try{
+            if (com.steerinfo.util.StringUtils.isEmpty(actualNo)) {
+                rm.setMessage("洁净数据主键不能为空,请确认!!");
+                return rm;
+            }
+            if (com.steerinfo.util.StringUtils.isEmpty(predictionNo)) {
+                rm.setMessage("预报编号不能为空,请确认!!");
+                return rm;
+            }
 
-        // 皮重
-        MeterWorkCarActualFirst tarerow = meterWorkCarActualFirstMapper.selectAndMatch(queryrow.getActualFirst2No(), predictionNo);
-        tarerow.setUpdateTime(new Date());
-        tarerow.setUpdateManName(userName + ": 洁净数据匹配委托操作");
-        tarerow.setUpdateManNo(userId);
-        meterWorkCarActualFirstMapper.updateByPrimaryKey(tarerow);
+            MeterWorkCarActual model = meterWorkCarActualMapper.selectByPrimaryKey(actualNo);
+            PreTrackScale scale = preTrackScaleMapper.selectByPrimaryKey(predictionNo);
+            if(model == null) {
+                rm.setMessage("不存在对应的洁净数据,请确认!!");
+                return rm;
+            }else if(!model.getIsPreScale().equals("0")) {
+                rm.setMessage("只有未匹配的净重数据才能进行委托匹配操作");
+                return rm;
+            }
 
-        // 处理预报
-        if (StringUtils.isNotEmpty(predictionNo)) {
-            PreTrackScale scale = new PreTrackScale();
-            scale.setPredictionNo(predictionNo);
-            scale.setValueFlag("2");
-            scale.setUploadFlag("1");
-            scale.setUpdateTime(new Date());
-            scale.setUpdateManNo("system");
-            scale.setUpdateManName("计量洁净数据匹配委托操作");
-            preTrackScaleMapper.updateByPrimaryKeySelective(scale);
+            if(scale == null) {
+                rm.setMessage("不存在对应的预报数据,请确认!!");
+                return rm;
+            }else {
+                if(scale.getValueFlag().equals("2")) {
+                    rm.setMessage("只有未使用的委托才能进行匹配委托操作,请确认!!");
+                    return rm;
+                }
+                if (!model.getCarNo().equals(scale.getCarNo())) {
+                    rm.setMessage("洁净数据中车号和预报中车号不一致,请确认!!");
+                    return rm;
+                }
+                if (scale.getPredictionType().equals("1")) {
+                    rm.setMessage("委托信息不是普通委托不能进行匹配委托,请确认!!");
+                    return rm;
+                }
+            }
+            UserPayload payload = UserPayload.getCurrUser();
+            String userId = payload.getId();
+            String userName = payload.getUserName();
+            /*String userId = "systems";
+            String userName = "systems";*/
+
+            // 处理一次计量数据
+            // 毛重
+            MeterWorkCarActualFirst grossrow = meterWorkCarActualFirstMapper.selectAndMatch(model.getActualFirst1No(), predictionNo);
+            grossrow.setUpdateTime(new Date());
+            grossrow.setUpdateManName(userName + ": 洁净数据匹配委托操作");
+            grossrow.setUpdateManNo(userId);
+            meterWorkCarActualFirstMapper.updateByPrimaryKey(grossrow);
+            // 皮重
+            MeterWorkCarActualFirst tarerow = meterWorkCarActualFirstMapper.selectAndMatch(model.getActualFirst2No(), predictionNo);
+            tarerow.setUpdateTime(new Date());
+            tarerow.setUpdateManName(userName + ": 洁净数据匹配委托操作");
+            tarerow.setUpdateManNo(userId);
+            meterWorkCarActualFirstMapper.updateByPrimaryKey(tarerow);
+            // 处理预报
+            if (scale != null) {
+                scale.setValueFlag("2");
+                scale.setUploadFlag("1");
+                scale.setUpdateTime(new Date());
+                scale.setUpdateManNo("system");
+                scale.setUpdateManName("计量洁净数据匹配委托操作");
+                preTrackScaleMapper.updateByPrimaryKeySelective(scale);
+            }
+            MeterWorkCarActual mwca = meterWorkCarActualMapper.mathPredcition(actualNo, predictionNo);
+            mwca.setIsPreScale("1");
+            mwca.setUploadFlag("1");
+            mwca.setNote(note);
+            meterWorkCarActualMapper.updateByPrimaryKey(mwca);
+            rm.setSucceed();
+            rm.setCode("200");
+            rm.setData(mwca);
+            rm.setMessage("操作成功!!");
+        }catch(Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常!!");
         }
-
-        MeterWorkCarActual mwca = meterWorkCarActualMapper.mathPredcition(actualNo, predictionNo);
-        //mwca.setValueFlag("1");
-        mwca.setIsPreScale("1");
-        mwca.setUploadFlag("1");
-        mwca.setNote(note);
-        meterWorkCarActualMapper.updateByPrimaryKey(mwca);
-        return mwca;
+        return rm;
     }
 
     @Override
@@ -605,6 +1041,7 @@ public class MeterWorkCarActualServiceImpl extends BaseServiceImpl<MeterWorkCarA
         grossrow.setUpdateTime(new Date());
         grossrow.setUpdateManName(userName + ": 洁净数据解除委托操作");
         grossrow.setUpdateManNo(userId);
+        grossrow.setIsPreScale("0");
         meterWorkCarActualFirstMapper.updateByPrimaryKey(grossrow);
 
         // 皮重
@@ -1458,4 +1895,111 @@ public class MeterWorkCarActualServiceImpl extends BaseServiceImpl<MeterWorkCarA
             return -1;
         }
     }
+
+    @Override
+    public RESTfulResult supplementaryData(MeterWorkCarActual model) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+
+        try{
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String afl = sdf.format(new Date());
+            MeterWorkCarActualFirst mwcaf1 = new MeterWorkCarActualFirst();
+            MeterWorkCarActualFirst mwcaf2 = new MeterWorkCarActualFirst();
+            MeterWorkCarActual actualRow = new MeterWorkCarActual();
+            String predictionNo = model.getPredictionNo();
+
+            /*UserPayload payload = UserPayload.getCurrUser();
+            String userId = payload.getId();
+            String userName = payload.getUserName();*/
+
+            //毛重
+            String actualFirstNo = sdf.format(new Date()) + meterWorkCarActualFirstMapper.getNewID(afl);
+            mwcaf1.setActualFirstNo(actualFirstNo);
+            mwcaf1.setCarNo(model.getCarNo());
+            mwcaf1.setMeterWeight(model.getGrossWeight());
+            mwcaf1.setWeightType("0");
+            mwcaf1.setCreateManNo(model.getGrossManNo());
+            mwcaf1.setCreateManName(model.getGrossManName());
+            mwcaf1.setCreateTime(model.getGrossTime());
+            mwcaf1.setBaseSpotNo(model.getBaseSpot1No());
+            mwcaf1.setBaseSpotName(model.getBaseSpot1Name());
+            mwcaf1.setValueFlag("2");
+            mwcaf2.setCheckFlag("0");
+            mwcaf1.setDataSource("4");
+            mwcaf1.setMeterMode("3");
+            mwcaf1.setIsPreScale("0");
+            meterWorkCarActualFirstMapper.insertSelective(mwcaf1);
+            //皮重
+            String actualSecondNo = sdf.format(new Date()) + meterWorkCarActualFirstMapper.getNewID(afl);
+            mwcaf2.setActualFirstNo(actualSecondNo);
+            mwcaf2.setCarNo(model.getCarNo());
+            mwcaf2.setMeterWeight(model.getTareWeight());
+            mwcaf2.setWeightType("0");
+            mwcaf2.setCreateManNo(model.getGrossManNo());
+            mwcaf2.setCreateManName(model.getGrossManName());
+            mwcaf2.setCreateTime(model.getTareTime());
+            mwcaf2.setBaseSpotNo(model.getBaseSpot2No());
+            mwcaf2.setBaseSpotName(model.getBaseSpot2Name());
+            mwcaf2.setValueFlag("2");
+            mwcaf2.setCheckFlag("0");
+            mwcaf2.setDataSource("4");
+            mwcaf2.setMeterMode("3");
+            mwcaf2.setIsPreScale("0");
+            meterWorkCarActualFirstMapper.insertSelective(mwcaf2);
+            //净重
+            if(com.steerinfo.util.StringUtils.isNotEmpty(predictionNo)){
+                //将委托中的编号和收发货的等数据拷贝进一次数据中
+                MeterWorkCarActualFirst first1 = meterWorkCarActualFirstMapper.selectAndMatch(actualFirstNo, predictionNo);
+                BeanUtils.copyProperties(first1,mwcaf1);
+                mwcaf1.setIsPreScale("1");
+                meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf1);
+                MeterWorkCarActualFirst first2 = meterWorkCarActualFirstMapper.selectAndMatch(actualSecondNo, predictionNo);
+                mwcaf2.setIsPreScale("1");
+                BeanUtils.copyProperties(first2, mwcaf2);
+                meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf2);
+                //更新预报数据
+                PreTrackScale scale = new PreTrackScale();
+                scale.setPredictionNo(predictionNo);
+                scale.setValueFlag(DbConstants.NET);
+                scale.setUpdateTime(new Date());
+                scale.setUpdateManNo("system");
+                scale.setUpdateManName("手动录入");
+                scale.setUploadFlag("1");
+                scale.setValueFlag("2");
+                preTrackScaleMapper.updateByPrimaryKeySelective(scale);
+                //将委托中的编号和收发货单位和一次数据等数据拷贝进结净数据中
+                MeterWorkCarActual mwca1 = meterWorkCarActualMapper.manualAddPre(actualFirstNo, actualSecondNo, predictionNo);
+                BeanUtils.copyProperties(mwca1, actualRow);
+
+            }else {
+                //将委托中的编号和收发货单位和一次数据等数据拷贝进结净数据中
+                MeterWorkCarActual mwca1 = meterWorkCarActualMapper.manualAdd(actualFirstNo, actualSecondNo);
+                BeanUtils.copyProperties(mwca1, actualRow);
+            }
+            String no = meterWorkCarActualMapper.getNewID(sdf.format(new Date()));
+            actualRow.setActualNo(sdf.format(new Date()) + no);
+            actualRow.setNetTime(model.getNetTime());
+            actualRow.setNetMode(DbConstants.TYPE);
+            actualRow.setNote("手动录入");
+            actualRow.setUploadFlag("1");
+            actualRow.setIsPreScale("1");
+            actualRow.setValueFlag("1");
+            actualRow.setGrossMode("3");
+            actualRow.setTareMode("3");
+            actualRow.setCreateManName(model.getGrossManName());
+            actualRow.setCreateTime(new Date());
+            actualRow.setPredictionNo(predictionNo);
+            actualRow.setNetWeight(mwcaf1.getMeterWeight().subtract(mwcaf2.getMeterWeight()));
+            meterWorkCarActualMapper.insertSelective(actualRow);
+            rm.setSucceed();
+            rm.setMessage("操作成功!!!");
+            rm.setCode("200");
+            return rm;
+        }catch(Exception e){
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!!");
+            return rm;
+        }
+    }
 }

+ 121 - 22
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/controller/MeterWorkCarActualFirstController.java

@@ -1,5 +1,6 @@
 package com.steerinfo.meterwork.meterworkcaractualfirst.controller;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
@@ -17,6 +18,7 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import oracle.jdbc.proxy.annotation.Pre;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
@@ -99,6 +101,40 @@ public class MeterWorkCarActualFirstController extends BaseRESTfulController {
         }
     }
 
+    @ApiOperation(value = "获取列表", notes = "分页模糊查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterworkcaractualfirst:view")
+    @PostMapping(value = "/likeByDesc")
+    public RESTfulResult likeByDesc(@RequestBody HashMap parmas, Integer pageNum, Integer pageSize) {
+        try {
+            PageList<MeterWorkCarActualFirst> list = meterWorkCarActualFirstService.likeByDesc(parmas, pageNum, pageSize);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
+    @ApiOperation(value = "获取列表", notes = "分页模糊查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterworkcaractualfirst:view")
+    @PostMapping(value = "/likeByValueFlag/")
+    public RESTfulResult likeByValueFlag(@RequestBody HashMap parmas, Integer pageNum, Integer pageSize) {
+        try {
+            PageList<MeterWorkCarActualFirst> list = meterWorkCarActualFirstService.likeByDesc(parmas, pageNum, pageSize);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
 
     @ApiOperation(value = "创建", notes = "根据MeterWorkCarActualFirst对象创建")
     @ApiImplicitParam(name = "meterWorkCarActualFirst", value = "详细实体meterWorkCarActualFirst", required = true, dataType = "MeterWorkCarActualFirst")
@@ -651,6 +687,20 @@ public class MeterWorkCarActualFirstController extends BaseRESTfulController {
         }
     }
 
+    @ApiOperation(value = "内倒车辆洁净")
+    @Transactional
+    @PostMapping(value = "/doAddNetNewHZHX", produces = "application/json;charset=UTF-8")
+    public RESTfulResult doAddNetNewHZHX(@RequestBody CommonCombination<MeterWorkCarActualFirst, MeterWorkCarActualFirst, MeterWorkCarActual, MeterMonitorNote> com) {
+        try {
+            RESTfulResult rm = meterWorkCarActualFirstService.doAddNetNewHZHX(com.getOne(), com.getThree(),com.getTwo(), com.getSOne(), com.getFour());
+            return rm;
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+    }
+
     @ApiOperation(value = "非内倒车辆存储一次计量数据")
     @PostMapping(value = "/doAddWf", produces = "application/json;charset=UTF-8")
     public RESTfulResult doAddWf(@RequestBody CommonCombination<MeterWorkCarActualFirst, MeterWorkPreLink, MeterWorkCarActual, MeterMonitorNote> com) {
@@ -837,8 +887,14 @@ public class MeterWorkCarActualFirstController extends BaseRESTfulController {
             String carNo = param.get("carNo") == null ? "":param.get("carNo").toString();
             String startTime = param.get("startTime") == null ? "":param.get("startTime").toString();
             String endTime = param.get("endTime") == null ? "":param.get("endTime").toString();
-            String dataSource = param.get("dataSource") == null ? "":param.get("dataSource").toString();
-            List<String> rows = meterWorkCarActualFirstService.distinctCarNo(carNo, startTime, endTime, dataSource);
+            String baseSpotNo = param.get("baseSpotNo") == null ? "": param.get("baseSpotNo").toString();
+            String matterName = param.get("matterName") == null ? "": param.get("matterName").toString();
+            String predictionNo = param.get("predictionNo") == null ? "": param.get("predictionNo").toString();
+            String forwardingUnitName = param.get("forwardingUnitName") == null ? "": param.get("forwardingUnitName").toString();
+            String receivingUintName = param.get("receivingUintName") == null ? "": param.get("receivingUintName").toString();
+            String valueFlag = param.get("valueFlag") == null ? "":param.get("valueFlag").toString();
+
+            List<String> rows = meterWorkCarActualFirstService.distinctCarNo(carNo, startTime, endTime, baseSpotNo, matterName, predictionNo, forwardingUnitName,receivingUintName,valueFlag);
             return success(rows);
         } catch (MarkerMetException e) {
             e.printStackTrace();
@@ -852,7 +908,7 @@ public class MeterWorkCarActualFirstController extends BaseRESTfulController {
         return rm;
     }
 
-    @ApiOperation(value = "智能终端混装混卸")
+    @ApiOperation(value = "智能终端混装混卸--远程计量")
     @Transactional
     @PostMapping(value = "/doAddNetHZHX", produces = "application/json;charset=UTF-8")
     public RESTfulResult doAddNetHZHX(@RequestBody CommonCombination<MeterWorkCarActualFirst, MeterWorkCarActual,MeterWorkCarActualFirst, MeterMonitorNote> com) {
@@ -866,6 +922,20 @@ public class MeterWorkCarActualFirstController extends BaseRESTfulController {
         }
     }
 
+    @ApiOperation(value = "双委托洁净--远程计量")
+    @Transactional
+    @PostMapping(value = "/doNetAddTwo", produces = "application/json;charset=UTF-8")
+    public RESTfulResult doNetAddTwo(@RequestBody CommonCombination<MeterWorkCarActualFirst, MeterWorkCarActual, PreTrackScale, PreTrackScale> com) {
+        try {
+            RESTfulResult rm = meterWorkCarActualFirstService.doNetAddTwo(com.getOne(), com.getTwo(), com.getThree(), com.getFour());
+            return rm;
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+    }
+
     @ApiOperation(value = "混装", notes = "混装")
     //@RequiresPermissions("meterworkcaractual:view")
     @PostMapping(value = "/mixedLoading")
@@ -913,37 +983,21 @@ public class MeterWorkCarActualFirstController extends BaseRESTfulController {
     //@RequiresPermissions("meterworkcaractual:view")
     @PostMapping(value = "/doubleEntrustmentMatch")
     public RESTfulResult doubleEntrustmentMatch(@RequestBody HashMap parmas) {
+        RESTfulResult rm = failed();
         try {
             String actualNo1 = parmas.get("actualNo1").toString();
             String actualNo2 = parmas.get("actualNo2").toString();
             String predictionNo1 = parmas.get("predictionNo1").toString();
             String predictionNo2 = parmas.get("predictionNo2").toString();
 
-            String msg = meterWorkCarActualFirstService.doubleEntrustmentMatch(actualNo1, actualNo2,predictionNo1,predictionNo2);
-            if (msg != "" || !msg.equals("")){
-                return failed(null,msg);
-            }
-            return success();
+            rm = meterWorkCarActualFirstService.doubleEntrustmentMatch(actualNo1, actualNo2,predictionNo1,predictionNo2);
+            return rm;
         } catch (Exception ex) {
             ex.printStackTrace();
             throw new MarkerMetException(500, "操作异常!!");
         }
     }
 
-    @ApiOperation(value = "双委托洁净")
-    @Transactional
-    @PostMapping(value = "/doNetAddTwo", produces = "application/json;charset=UTF-8")
-    public RESTfulResult doNetAddTwo(@RequestBody CommonCombination<MeterWorkCarActualFirst, MeterWorkCarActual, PreTrackScale, PreTrackScale> com) {
-        try {
-            RESTfulResult rm = meterWorkCarActualFirstService.doNetAddTwo(com.getOne(), com.getTwo(), com.getThree(), com.getFour());
-            return rm;
-        } catch (Exception e) {
-            e.printStackTrace();
-            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-            return failed(null, "操作异常,请确认!");
-        }
-    }
-
     @ApiOperation(value = "期限皮重洁净")
     @Transactional
     @PostMapping(value = "/doNetTermTare", produces = "application/json;charset=UTF-8")
@@ -985,4 +1039,49 @@ public class MeterWorkCarActualFirstController extends BaseRESTfulController {
             return failed(null, "操作异常,请确认!");
         }
     }
+
+    @ApiOperation(value = "内倒车辆错误洁净")
+    @Transactional
+    @PostMapping(value = "/doAddNetInnerWfError", produces = "application/json;charset=UTF-8")
+    public RESTfulResult doAddNetInnerWfError(@RequestBody CommonCombination<MeterWorkCarActualFirst, MeterWorkCarActual, MeterWorkPreLink, MeterMonitorNote> com) {
+        try {
+            RESTfulResult rm = meterWorkCarActualFirstService.doAddNetInnerWfError(com.getOne(), com.getTwo(), com.getSOne(), com.getFour());
+            return rm;
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+    }
+
+    @ApiOperation(value = "期限皮洁净")
+    @Transactional
+    @PostMapping(value = "/doNetByFirst", produces = "application/json;charset=UTF-8")
+    public RESTfulResult doNetByFirst(@RequestBody CommonCombination<MeterWorkCarActualFirst, MeterWorkCarActualFirst,PreTrackScale, MeterMonitorNote> com) {
+        try {
+            MeterWorkCarActualFirst grossModel = com.getOne();
+            MeterWorkCarActualFirst tareModel = com.getTwo();
+            PreTrackScale scale = com.getThree();
+            RESTfulResult rm = meterWorkCarActualFirstService.doNetByFirst(grossModel, tareModel, scale);
+            return rm;
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+    }
+
+    @ApiOperation(value = "毛皮转换")
+    @Transactional
+    @PostMapping(value = "/furConversion")
+    public RESTfulResult furConversion(@RequestBody HashMap params) {
+        try {
+            RESTfulResult rm = meterWorkCarActualFirstService.furConversion(params);
+            return rm;
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+    }
 }

+ 5 - 0
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/mapper/MeterWorkCarActualFirstMapper.java

@@ -4,6 +4,7 @@ import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.meterwork.dto.*;
 import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
 import feign.Param;
+import io.micrometer.core.instrument.Meter;
 import org.apache.ibatis.annotations.Mapper;
 
 import java.util.*;
@@ -72,4 +73,8 @@ public interface MeterWorkCarActualFirstMapper extends IBaseMapper<MeterWorkCarA
     List<MeterWorkCarActualFirst> distinctCarNo(HashMap<String, Object> obj);
 
     void repairPre(Map<String, Object> map);
+
+    List<MeterWorkCarActualFirst> likeByDesc(Map<String, Object> params);
+
+    List<MeterWorkCarActualFirst> selectById(List<String> actualNoList);
 }

+ 32 - 3
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/mapper/MeterWorkCarActualFirstMapper.xml

@@ -1954,6 +1954,7 @@
     <include refid="select"/>
     <include refid="whereLike"/>
   </select>
+
   <insert id="batchInsert" parameterType="java.util.List">
     insert into METER_WORK_CAR_ACTUAL_FIRST 
       (ACTUAL_FIRST_NO, 
@@ -2801,19 +2802,47 @@
   <select id="distinctCarNo" parameterType="java.lang.String" resultMap="BaseResultMap">
     SELECT distinct car_No
     from METER_WORK_CAR_ACTUAL_FIRST
-    where VALUE_FLAG != '0'
+    where 1=1
     <if test="carNo != null and carNo != ''">
       and CAR_NO like '%${carNo}%'
     </if>
     <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
       and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
     </if>
-    <if test="dataSource != null and dataSource != ''">
-      and  data_source = '${dataSource}'
+    <if test="matterName != null and matterName != ''">
+      and  matter_name like  '%${matterName}%'
+    </if>
+    <if test="baseSpotNo != null and baseSpotNo != ''">
+      and  base_spot_no = #{baseSpotNo}
+    </if>
+    <if test="predictionNo != null and predictionNo != ''">
+      and  prediction_no =  #{predictionNo}
+    </if>
+    <if test="forwardingUnitName != null and forwardingUnitName != ''">
+      and  forwarding_Unit_Name like '%${forwardingUnitName}%'
+    </if>
+    <if test="receivingUintName != null and receivingUintName != ''">
+      and  receiving_uint_name like  '%${receivingUintName}%'
+    </if>
+    <if test="valueFlag != null and valueFlag != ''">
+      and  value_flag = #{valueFlag}
     </if>
   </select>
 
   <update id="repairPre" parameterType="java.util.HashMap">
     update METER_WORK_CAR_ACTUAL_FIRST set PREDICTION_NO = #{predictionNo} where ACTUAL_FIRST_NO = #{actualFirstNo}
   </update>
+
+  <select id="selectById" parameterType="java.util.List" resultMap="BaseResultMap">
+      <include refid="select"/>
+      where ACTUAL_FIRST_NO in
+        <foreach collection="list" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+  </select>
+  <select id="likeByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+    order by create_time desc
+  </select>
 </mapper>

+ 12 - 2
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/IMeterWorkCarActualFirstService.java

@@ -83,6 +83,10 @@ public interface IMeterWorkCarActualFirstService extends IBaseService<MeterWorkC
 
     RESTfulResult doAddNetInnerWf(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb, String saveTare,MeterMonitorNote note) throws Exception;
 
+    RESTfulResult doAddNetNewHZHX(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb,MeterWorkCarActualFirst once, String saveTare,MeterMonitorNote note) throws Exception;
+
+    RESTfulResult doAddNetInnerWfError(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb, String saveTare,MeterMonitorNote note) throws Exception;
+
     RESTfulResult doAddWf(MeterWorkCarActualFirst oci, MeterWorkPreLink link, String isLock, String saveTare, MeterMonitorNote note) throws Exception;
 
     RESTfulResult doAddNetWf(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb,  MeterMonitorNote note,MeterWorkPreLink link, String isLock, String saveTare) throws Exception;
@@ -111,13 +115,19 @@ public interface IMeterWorkCarActualFirstService extends IBaseService<MeterWorkC
     RESTfulResult doCraneNetDbWf(MeterWorkCarActualFirst one, MeterWorkCarActual two, MeterMonitorNote three) throws Exception;
 
     //根据传入时间和车号,查询给定时间段去重车号
-    List<String> distinctCarNo(String carNo, String startTime, String endTime, String dataSource);
+    List<String> distinctCarNo(String carNo, String startTime, String endTime,String baseSpotNo,String matterName,String predictionNo,String forwardingUnitName,String receivingUintName,String valueFlag);
 
     String mixedLoading(String actualNo1, String actualNo2,String actualNo3, String predictionNo1,String predictionNo2);
 
     String mixedDischarge(String actualNo1, String actualNo2,String actualNo3, String predictionNo1,String predictionNo2);
 
-    String doubleEntrustmentMatch(String actualNo1, String actualNo2, String predictionNo1, String predictionNo2);
+    RESTfulResult doubleEntrustmentMatch(String actualNo1, String actualNo2, String predictionNo1, String predictionNo2);
 
     RESTfulResult addEmergency(List<MeterWorkCarActualFirst> meterWorkCarActualFirsts)  throws Exception;
+
+    PageList<MeterWorkCarActualFirst> likeByDesc(Map<String, Object> var1, Integer pageNum, Integer pageSize);
+
+    RESTfulResult doNetByFirst(MeterWorkCarActualFirst grossModel, MeterWorkCarActualFirst tareModel, PreTrackScale scale);
+
+    RESTfulResult furConversion(HashMap<String, Object> params);
 }

Fichier diff supprimé car celui-ci est trop grand
+ 596 - 150
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/impl/MeterWorkCarActualFirstServiceImpl.java


+ 160 - 7
src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/mapper/MeterWorkHookActFirstMapper.xml

@@ -71,6 +71,12 @@
     <result column="ARRIVAL" jdbcType="VARCHAR" property="arrival" />
     <result column="STATION" jdbcType="VARCHAR" property="station" />
     <result column="SOURCE_AREA" jdbcType="VARCHAR" property="sourceArea" />
+    <result column="DATA_SOURCE" jdbcType="VARCHAR" property="dataSource" />
+    <result column="NOTE" jdbcType="VARCHAR" property="note" />
+    <result column="IS_PRE_SCALE" jdbcType="VARCHAR" property="isPreScale" />
+    <result column="CANCEL_TYPE" jdbcType="VARCHAR" property="cancelType" />
+    <result column="LC_NO" jdbcType="VARCHAR" property="lcNo" />
+    <result column="HC15" jdbcType="VARCHAR" property="hc15" />
   </resultMap>
   <sql id="columns">
     ACTUAL_FIRST_NO, PREDICTION_NO, NOTICE_NO, RAILWAY_NO, RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO, 
@@ -85,7 +91,7 @@
     UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, CHECK_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME, 
     CHECK_TIME, METER_MODE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, IS_CHEMICAL, LIMIT_WEIGHT, 
     RAILWAY_MODEL_NO, RAILWAY_MODEL_NAME, RAILWAY_FACTORY_WEIGHT, WATER_NUM, ARRIVAL, 
-    STATION, SOURCE_AREA
+    STATION, SOURCE_AREA, DATA_SOURCE, NOTE, IS_PRE_SCALE, CANCEL_TYPE, LC_NO, HC15
   </sql>
   <sql id="columns_alias">
     t.ACTUAL_FIRST_NO, t.PREDICTION_NO, t.NOTICE_NO, t.RAILWAY_NO, t.RAILWAY_CARRIAGE_NO, 
@@ -101,7 +107,8 @@
     t.VALUE_FLAG, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.CHECK_FLAG, t.CHECK_MAN_NO, 
     t.CHECK_MAN_NAME, t.CHECK_TIME, t.METER_MODE, t.RAILWAY_TYPE_NO, t.RAILWAY_TYPE_NAME, 
     t.IS_CHEMICAL, t.LIMIT_WEIGHT, t.RAILWAY_MODEL_NO, t.RAILWAY_MODEL_NAME, t.RAILWAY_FACTORY_WEIGHT, 
-    t.WATER_NUM, t.ARRIVAL, t.STATION, t.SOURCE_AREA
+    t.WATER_NUM, t.ARRIVAL, t.STATION, t.SOURCE_AREA, t.DATA_SOURCE, t.NOTE, t.IS_PRE_SCALE, 
+    t.CANCEL_TYPE, t.LC_NO, t.HC15
   </sql>
   <sql id="select">
     SELECT <include refid="columns"/> FROM METER_WORK_HOOK_ACT_FIRST
@@ -318,6 +325,24 @@
       <if test="sourceArea != null and sourceArea != ''">
         and SOURCE_AREA = #{sourceArea}
       </if>
+      <if test="dataSource != null and dataSource != ''">
+        and DATA_SOURCE = #{dataSource}
+      </if>
+      <if test="note != null and note != ''">
+        and NOTE = #{note}
+      </if>
+      <if test="isPreScale != null and isPreScale != ''">
+        and IS_PRE_SCALE = #{isPreScale}
+      </if>
+      <if test="cancelType != null and cancelType != ''">
+        and CANCEL_TYPE = #{cancelType}
+      </if>
+      <if test="lcNo != null and lcNo != ''">
+        and LC_NO = #{lcNo}
+      </if>
+      <if test="hc15 != null and hc15 != ''">
+        and HC15 = #{hc15}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -529,6 +554,24 @@
       <if test="sourceArea != null and sourceArea != ''">
         and SOURCE_AREA LIKE '%${sourceArea}%'
       </if>
+      <if test="dataSource != null and dataSource != ''">
+        and DATA_SOURCE LIKE '%${dataSource}%'
+      </if>
+      <if test="note != null and note != ''">
+        and NOTE LIKE '%${note}%'
+      </if>
+      <if test="isPreScale != null and isPreScale != ''">
+        and IS_PRE_SCALE LIKE '%${isPreScale}%'
+      </if>
+      <if test="cancelType != null and cancelType != ''">
+        and CANCEL_TYPE LIKE '%${cancelType}%'
+      </if>
+      <if test="lcNo != null and lcNo != ''">
+        and LC_NO LIKE '%${lcNo}%'
+      </if>
+      <if test="hc15 != null and hc15 != ''">
+        and HC15 LIKE '%${hc15}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -742,6 +785,24 @@
       <if test="sourceArea != null and sourceArea != ''">
         or SOURCE_AREA = #{sourceArea}
       </if>
+      <if test="dataSource != null and dataSource != ''">
+        or DATA_SOURCE = #{dataSource}
+      </if>
+      <if test="note != null and note != ''">
+        or NOTE = #{note}
+      </if>
+      <if test="isPreScale != null and isPreScale != ''">
+        or IS_PRE_SCALE = #{isPreScale}
+      </if>
+      <if test="cancelType != null and cancelType != ''">
+        or CANCEL_TYPE = #{cancelType}
+      </if>
+      <if test="lcNo != null and lcNo != ''">
+        or LC_NO = #{lcNo}
+      </if>
+      <if test="hc15 != null and hc15 != ''">
+        or HC15 = #{hc15}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst">
     insert into METER_WORK_HOOK_ACT_FIRST (ACTUAL_FIRST_NO, PREDICTION_NO, NOTICE_NO, 
@@ -767,7 +828,9 @@
       RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, IS_CHEMICAL, 
       LIMIT_WEIGHT, RAILWAY_MODEL_NO, RAILWAY_MODEL_NAME, 
       RAILWAY_FACTORY_WEIGHT, WATER_NUM, ARRIVAL, 
-      STATION, SOURCE_AREA)
+      STATION, SOURCE_AREA, DATA_SOURCE, 
+      NOTE, IS_PRE_SCALE, CANCEL_TYPE, 
+      LC_NO, HC15)
     values (#{actualFirstNo,jdbcType=VARCHAR}, #{predictionNo,jdbcType=VARCHAR}, #{noticeNo,jdbcType=VARCHAR}, 
       #{railwayNo,jdbcType=VARCHAR}, #{railwayCarriageNo,jdbcType=VARCHAR}, #{railwayWorkNo,jdbcType=VARCHAR}, 
       #{railwaySpeed,jdbcType=DECIMAL}, #{matterNo,jdbcType=VARCHAR}, #{matterName,jdbcType=VARCHAR}, 
@@ -791,7 +854,9 @@
       #{railwayTypeNo,jdbcType=VARCHAR}, #{railwayTypeName,jdbcType=VARCHAR}, #{isChemical,jdbcType=VARCHAR}, 
       #{limitWeight,jdbcType=DECIMAL}, #{railwayModelNo,jdbcType=VARCHAR}, #{railwayModelName,jdbcType=VARCHAR}, 
       #{railwayFactoryWeight,jdbcType=DECIMAL}, #{waterNum,jdbcType=DECIMAL}, #{arrival,jdbcType=VARCHAR}, 
-      #{station,jdbcType=VARCHAR}, #{sourceArea,jdbcType=VARCHAR})
+      #{station,jdbcType=VARCHAR}, #{sourceArea,jdbcType=VARCHAR}, #{dataSource,jdbcType=VARCHAR}, 
+      #{note,jdbcType=VARCHAR}, #{isPreScale,jdbcType=VARCHAR}, #{cancelType,jdbcType=VARCHAR}, 
+      #{lcNo,jdbcType=VARCHAR}, #{hc15,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst">
     insert into METER_WORK_HOOK_ACT_FIRST
@@ -1003,6 +1068,24 @@
       <if test="sourceArea != null">
         SOURCE_AREA,
       </if>
+      <if test="dataSource != null">
+        DATA_SOURCE,
+      </if>
+      <if test="note != null">
+        NOTE,
+      </if>
+      <if test="isPreScale != null">
+        IS_PRE_SCALE,
+      </if>
+      <if test="cancelType != null">
+        CANCEL_TYPE,
+      </if>
+      <if test="lcNo != null">
+        LC_NO,
+      </if>
+      <if test="hc15 != null">
+        HC15,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="actualFirstNo != null">
@@ -1212,6 +1295,24 @@
       <if test="sourceArea != null">
         #{sourceArea,jdbcType=VARCHAR},
       </if>
+      <if test="dataSource != null">
+        #{dataSource,jdbcType=VARCHAR},
+      </if>
+      <if test="note != null">
+        #{note,jdbcType=VARCHAR},
+      </if>
+      <if test="isPreScale != null">
+        #{isPreScale,jdbcType=VARCHAR},
+      </if>
+      <if test="cancelType != null">
+        #{cancelType,jdbcType=VARCHAR},
+      </if>
+      <if test="lcNo != null">
+        #{lcNo,jdbcType=VARCHAR},
+      </if>
+      <if test="hc15 != null">
+        #{hc15,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst">
@@ -1283,7 +1384,13 @@
       WATER_NUM = #{waterNum,jdbcType=DECIMAL},
       ARRIVAL = #{arrival,jdbcType=VARCHAR},
       STATION = #{station,jdbcType=VARCHAR},
-      SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR}
+      SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR},
+      DATA_SOURCE = #{dataSource,jdbcType=VARCHAR},
+      NOTE = #{note,jdbcType=VARCHAR},
+      IS_PRE_SCALE = #{isPreScale,jdbcType=VARCHAR},
+      CANCEL_TYPE = #{cancelType,jdbcType=VARCHAR},
+      LC_NO = #{lcNo,jdbcType=VARCHAR},
+      HC15 = #{hc15,jdbcType=VARCHAR}
     where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst">
@@ -1493,6 +1600,24 @@
       <if test="sourceArea != null">
         SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR},
       </if>
+      <if test="dataSource != null">
+        DATA_SOURCE = #{dataSource,jdbcType=VARCHAR},
+      </if>
+      <if test="note != null">
+        NOTE = #{note,jdbcType=VARCHAR},
+      </if>
+      <if test="isPreScale != null">
+        IS_PRE_SCALE = #{isPreScale,jdbcType=VARCHAR},
+      </if>
+      <if test="cancelType != null">
+        CANCEL_TYPE = #{cancelType,jdbcType=VARCHAR},
+      </if>
+      <if test="lcNo != null">
+        LC_NO = #{lcNo,jdbcType=VARCHAR},
+      </if>
+      <if test="hc15 != null">
+        HC15 = #{hc15,jdbcType=VARCHAR},
+      </if>
     </set>
     where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
   </update>
@@ -1538,7 +1663,9 @@
       LIMIT_WEIGHT, RAILWAY_MODEL_NO, 
       RAILWAY_MODEL_NAME, RAILWAY_FACTORY_WEIGHT, 
       WATER_NUM, ARRIVAL, STATION, 
-      SOURCE_AREA)
+      SOURCE_AREA, DATA_SOURCE, NOTE, 
+      IS_PRE_SCALE, CANCEL_TYPE, LC_NO, 
+      HC15)
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.actualFirstNo,jdbcType=VARCHAR}, 
@@ -1569,7 +1696,9 @@
       #{item.limitWeight,jdbcType=DECIMAL}, #{item.railwayModelNo,jdbcType=VARCHAR}, 
       #{item.railwayModelName,jdbcType=VARCHAR}, #{item.railwayFactoryWeight,jdbcType=DECIMAL}, 
       #{item.waterNum,jdbcType=DECIMAL}, #{item.arrival,jdbcType=VARCHAR}, #{item.station,jdbcType=VARCHAR}, 
-      #{item.sourceArea,jdbcType=VARCHAR} from dual  
+      #{item.sourceArea,jdbcType=VARCHAR}, #{item.dataSource,jdbcType=VARCHAR}, #{item.note,jdbcType=VARCHAR}, 
+      #{item.isPreScale,jdbcType=VARCHAR}, #{item.cancelType,jdbcType=VARCHAR}, #{item.lcNo,jdbcType=VARCHAR}, 
+      #{item.hc15,jdbcType=VARCHAR} from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
@@ -1851,6 +1980,30 @@
        <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
           when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.sourceArea,jdbcType=VARCHAR}
        </foreach>
+       ,DATA_SOURCE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.dataSource,jdbcType=VARCHAR}
+       </foreach>
+       ,NOTE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.note,jdbcType=VARCHAR}
+       </foreach>
+       ,IS_PRE_SCALE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.isPreScale,jdbcType=VARCHAR}
+       </foreach>
+       ,CANCEL_TYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.cancelType,jdbcType=VARCHAR}
+       </foreach>
+       ,LC_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.lcNo,jdbcType=VARCHAR}
+       </foreach>
+       ,HC15=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_FIRST_NO" close="end">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.hc15,jdbcType=VARCHAR}
+       </foreach>
      where ACTUAL_FIRST_NO in 
      <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
     #{item.actualFirstNo,jdbcType=VARCHAR}

+ 93 - 2
src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/model/MeterWorkHookActFirst.java

@@ -3,6 +3,7 @@ package com.steerinfo.meterwork.meterworkhookactfirst.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -303,9 +304,9 @@ public class MeterWorkHookActFirst implements IBasePO<String> {
     private String memo;
 
     /**
-     * 状态(1=有效,0=作废,2=结净)(VALUE_FLAG,VARCHAR,1)
+     * (0=作废,1=有效(已匹配),2=结净,3=未匹配)(VALUE_FLAG,VARCHAR,1)
      */
-    @ApiModelProperty(value="状态(1=有效,0=作废,2=结净)",required=false)
+    @ApiModelProperty(value="(0=作废,1=有效(已匹配),2=结净,3=未匹配)",required=false)
     private String valueFlag;
 
     /**
@@ -422,6 +423,42 @@ public class MeterWorkHookActFirst implements IBasePO<String> {
     @ApiModelProperty(value="原产地",required=false)
     private String sourceArea;
 
+    /**
+     * 数据来源(1=智能终端,2=本地计量,3=应急计量,4=手动录入(计量票据录入))(DATA_SOURCE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="数据来源(1=智能终端,2=本地计量,3=应急计量,4=手动录入(计量票据录入))",required=false)
+    private String dataSource;
+
+    /**
+     * 操作原因(NOTE,VARCHAR,100)
+     */
+    @ApiModelProperty(value="操作原因",required=false)
+    private String note;
+
+    /**
+     * 是否匹配委托(0:未匹配,1:已匹配)(IS_PRE_SCALE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否匹配委托(0:未匹配,1:已匹配)",required=false)
+    private String isPreScale;
+
+    /**
+     * 是否委托撤销(0:正常,1:已撤销)(CANCEL_TYPE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否委托撤销(0:正常,1:已撤销)",required=false)
+    private String cancelType;
+
+    /**
+     * 列次编号(LC_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="列次编号",required=false)
+    private String lcNo;
+
+    /**
+     * 是否集装箱超过1.5(0:未超过,1:已超过)(HC15,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否集装箱超过1.5(0:未超过,1:已超过)",required=false)
+    private String hc15;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -986,6 +1023,54 @@ public class MeterWorkHookActFirst implements IBasePO<String> {
         this.sourceArea = sourceArea == null ? null : sourceArea.trim();
     }
 
+    public String getDataSource() {
+        return dataSource;
+    }
+
+    public void setDataSource(String dataSource) {
+        this.dataSource = dataSource == null ? null : dataSource.trim();
+    }
+
+    public String getNote() {
+        return note;
+    }
+
+    public void setNote(String note) {
+        this.note = note == null ? null : note.trim();
+    }
+
+    public String getIsPreScale() {
+        return isPreScale;
+    }
+
+    public void setIsPreScale(String isPreScale) {
+        this.isPreScale = isPreScale == null ? null : isPreScale.trim();
+    }
+
+    public String getCancelType() {
+        return cancelType;
+    }
+
+    public void setCancelType(String cancelType) {
+        this.cancelType = cancelType == null ? null : cancelType.trim();
+    }
+
+    public String getLcNo() {
+        return lcNo;
+    }
+
+    public void setLcNo(String lcNo) {
+        this.lcNo = lcNo == null ? null : lcNo.trim();
+    }
+
+    public String getHc15() {
+        return hc15;
+    }
+
+    public void setHc15(String hc15) {
+        this.hc15 = hc15 == null ? null : hc15.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -1061,6 +1146,12 @@ public class MeterWorkHookActFirst implements IBasePO<String> {
         sb.append(", arrival=").append(arrival);
         sb.append(", station=").append(station);
         sb.append(", sourceArea=").append(sourceArea);
+        sb.append(", dataSource=").append(dataSource);
+        sb.append(", note=").append(note);
+        sb.append(", isPreScale=").append(isPreScale);
+        sb.append(", cancelType=").append(cancelType);
+        sb.append(", lcNo=").append(lcNo);
+        sb.append(", hc15=").append(hc15);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 1 - 1
src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/service/impl/MeterWorkHookActFirstServiceImpl.java

@@ -52,7 +52,7 @@ import java.util.stream.Collectors;
 @Service(value = "meterWorkHookActFirstService")
 public class MeterWorkHookActFirstServiceImpl extends BaseServiceImpl<MeterWorkHookActFirst, String> implements IMeterWorkHookActFirstService {
 
-    @Autowired
+    @Resource
     private MeterWorkHookActFirstMapper meterWorkHookActFirstMapper;
 
     @Resource

+ 46 - 4
src/main/java/com/steerinfo/meterwork/meterworkhookactual/controller/MeterWorkHookActualController.java

@@ -5,6 +5,7 @@ import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.framework.utils.collection.ListUtils;
 import com.steerinfo.meterwork.except.MarkerMetException;
+import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
 import com.steerinfo.meterwork.meterworkhookactual.model.MeterWorkHookActual;
 import com.steerinfo.meterwork.meterworkhookactual.service.IMeterWorkHookActualService;
 import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
@@ -16,10 +17,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
+import java.text.SimpleDateFormat;
+import java.util.*;
 import java.math.BigDecimal;
 
 /**
@@ -271,4 +270,47 @@ public class MeterWorkHookActualController extends BaseRESTfulController {
         }
         return rm;
     }
+
+    @ApiOperation(value = "吊钩秤净重数据补录", notes = "根据MeterWorkHookActual对象创建")
+    @PostMapping(value = "/supplementaryData")
+    public RESTfulResult supplementaryData(@RequestBody HashMap map) {
+        RESTfulResult rm = failed();
+        try {
+            SimpleDateFormat simpleFormat = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
+            String grossTimeTemp = map.get("grossTime").toString().replaceAll("-", "/");
+            String tareTimeTemp = map.get("tareTime").toString().replaceAll("-", "/");
+            String netTimeTemp = map.get("netTime").toString().replaceAll("-", "/");
+
+            Date grossTime = simpleFormat.parse(grossTimeTemp);
+            Date tareTime = simpleFormat.parse(tareTimeTemp);
+            Date netTime = simpleFormat.parse(netTimeTemp);
+
+            MeterWorkHookActual model = new MeterWorkHookActual();
+            model.setPredictionNo(map.get("predictionNo").toString());
+            model.setBaseSpot1No(map.get("baseSpot1No").toString());
+            model.setBaseSpot1Name(map.get("baseSpot1Name").toString());
+            model.setGrossManNo(map.get("grossManNo").toString());
+            model.setGrossManName(map.get("grossManName").toString());
+            model.setGrossTime(grossTime);
+            model.setTareTime(tareTime);
+            model.setNetTime(netTime);
+            model.setBaseSpot2No(map.get("baseSpot2No").toString());
+            model.setBaseSpot2Name(map.get("baseSpot2Name").toString());
+            model.setRailwayNo(map.get("railwayNo").toString());
+            model.setGrossWeight(new BigDecimal(map.get("grossWeight").toString()));
+            model.setTareWeight(new BigDecimal(map.get("tareWeight").toString()));
+            model.setRailwayTypeNo(map.get("railwayTypeNo").toString());
+            model.setRailwayTypeName(map.get("railwayTypeName").toString());
+            rm = meterWorkHookActualService.supplementaryData(model);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
 }

+ 190 - 9
src/main/java/com/steerinfo/meterwork/meterworkhookactual/mapper/MeterWorkHookActualMapper.xml

@@ -78,6 +78,13 @@
     <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
     <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="SOURCE_AREA" jdbcType="VARCHAR" property="sourceArea" />
+    <result column="BOUND_LIST_URL" jdbcType="VARCHAR" property="boundListUrl" />
+    <result column="IS_BOUND_LIST" jdbcType="VARCHAR" property="isBoundList" />
+    <result column="DATA_SOURCE" jdbcType="VARCHAR" property="dataSource" />
+    <result column="LC_NO" jdbcType="VARCHAR" property="lcNo" />
+    <result column="IS_PRE_SCALE" jdbcType="VARCHAR" property="isPreScale" />
+    <result column="PREDICTION_TYPE" jdbcType="VARCHAR" property="predictionType" />
+    <result column="PREDICTION_COMBINATION" jdbcType="VARCHAR" property="predictionCombination" />
   </resultMap>
   <sql id="columns">
     ACTUAL_NO, PREDICTION_NO, NOTICE_NO, RAILWAY_NO, RAILWAY_CARRIAGE_NO, MATTER_NO, 
@@ -92,7 +99,8 @@
     NET_TIME, NET_SPOT3_NO, NET_SPOT3_NAME, NET_CLASS, NET_GROUP, NET_MODE, VALUE_FLAG, 
     UPLOAD_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME, CHECK_TIME, UPLOAD_MAN_NO, UPLOAD_MAN_NAME, 
     UPLOAD_TIME, SAMPLE_NO, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, MEMO, WATER_NUM, ARRIVAL, 
-    STATION, UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, SOURCE_AREA
+    STATION, UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, SOURCE_AREA, BOUND_LIST_URL, 
+    IS_BOUND_LIST, DATA_SOURCE, LC_NO, IS_PRE_SCALE, PREDICTION_TYPE, PREDICTION_COMBINATION
   </sql>
   <sql id="columns_alias">
     t.ACTUAL_NO, t.PREDICTION_NO, t.NOTICE_NO, t.RAILWAY_NO, t.RAILWAY_CARRIAGE_NO, t.MATTER_NO, 
@@ -108,7 +116,9 @@
     t.NET_SPOT3_NAME, t.NET_CLASS, t.NET_GROUP, t.NET_MODE, t.VALUE_FLAG, t.UPLOAD_FLAG, 
     t.CHECK_MAN_NO, t.CHECK_MAN_NAME, t.CHECK_TIME, t.UPLOAD_MAN_NO, t.UPLOAD_MAN_NAME, 
     t.UPLOAD_TIME, t.SAMPLE_NO, t.RAILWAY_TYPE_NO, t.RAILWAY_TYPE_NAME, t.MEMO, t.WATER_NUM, 
-    t.ARRIVAL, t.STATION, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.SOURCE_AREA
+    t.ARRIVAL, t.STATION, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.SOURCE_AREA, 
+    t.BOUND_LIST_URL, t.IS_BOUND_LIST, t.DATA_SOURCE, t.LC_NO, t.IS_PRE_SCALE, t.PREDICTION_TYPE, 
+    t.PREDICTION_COMBINATION
   </sql>
   <sql id="select">
     SELECT <include refid="columns"/> FROM METER_WORK_HOOK_ACTUAL
@@ -346,6 +356,27 @@
       <if test="sourceArea != null and sourceArea != ''">
         and SOURCE_AREA = #{sourceArea}
       </if>
+      <if test="boundListUrl != null and boundListUrl != ''">
+        and BOUND_LIST_URL = #{boundListUrl}
+      </if>
+      <if test="isBoundList != null and isBoundList != ''">
+        and IS_BOUND_LIST = #{isBoundList}
+      </if>
+      <if test="dataSource != null and dataSource != ''">
+        and DATA_SOURCE = #{dataSource}
+      </if>
+      <if test="lcNo != null and lcNo != ''">
+        and LC_NO = #{lcNo}
+      </if>
+      <if test="isPreScale != null and isPreScale != ''">
+        and IS_PRE_SCALE = #{isPreScale}
+      </if>
+      <if test="predictionType != null and predictionType != ''">
+        and PREDICTION_TYPE = #{predictionType}
+      </if>
+      <if test="predictionCombination != null and predictionCombination != ''">
+        and PREDICTION_COMBINATION = #{predictionCombination}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -578,6 +609,27 @@
       <if test="sourceArea != null and sourceArea != ''">
         and SOURCE_AREA LIKE '%${sourceArea}%'
       </if>
+      <if test="boundListUrl != null and boundListUrl != ''">
+        and BOUND_LIST_URL LIKE '%${boundListUrl}%'
+      </if>
+      <if test="isBoundList != null and isBoundList != ''">
+        and IS_BOUND_LIST LIKE '%${isBoundList}%'
+      </if>
+      <if test="dataSource != null and dataSource != ''">
+        and DATA_SOURCE LIKE '%${dataSource}%'
+      </if>
+      <if test="lcNo != null and lcNo != ''">
+        and LC_NO LIKE '%${lcNo}%'
+      </if>
+      <if test="isPreScale != null and isPreScale != ''">
+        and IS_PRE_SCALE LIKE '%${isPreScale}%'
+      </if>
+      <if test="predictionType != null and predictionType != ''">
+        and PREDICTION_TYPE LIKE '%${predictionType}%'
+      </if>
+      <if test="predictionCombination != null and predictionCombination != ''">
+        and PREDICTION_COMBINATION LIKE '%${predictionCombination}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -812,6 +864,27 @@
       <if test="sourceArea != null and sourceArea != ''">
         or SOURCE_AREA = #{sourceArea}
       </if>
+      <if test="boundListUrl != null and boundListUrl != ''">
+        or BOUND_LIST_URL = #{boundListUrl}
+      </if>
+      <if test="isBoundList != null and isBoundList != ''">
+        or IS_BOUND_LIST = #{isBoundList}
+      </if>
+      <if test="dataSource != null and dataSource != ''">
+        or DATA_SOURCE = #{dataSource}
+      </if>
+      <if test="lcNo != null and lcNo != ''">
+        or LC_NO = #{lcNo}
+      </if>
+      <if test="isPreScale != null and isPreScale != ''">
+        or IS_PRE_SCALE = #{isPreScale}
+      </if>
+      <if test="predictionType != null and predictionType != ''">
+        or PREDICTION_TYPE = #{predictionType}
+      </if>
+      <if test="predictionCombination != null and predictionCombination != ''">
+        or PREDICTION_COMBINATION = #{predictionCombination}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkhookactual.model.MeterWorkHookActual">
     insert into METER_WORK_HOOK_ACTUAL (ACTUAL_NO, PREDICTION_NO, NOTICE_NO, 
@@ -839,8 +912,10 @@
       UPLOAD_TIME, SAMPLE_NO, RAILWAY_TYPE_NO, 
       RAILWAY_TYPE_NAME, MEMO, WATER_NUM, 
       ARRIVAL, STATION, UPDATE_MAN_NO, 
-      UPDATE_MAN_NAME, UPDATE_TIME, SOURCE_AREA
-      )
+      UPDATE_MAN_NAME, UPDATE_TIME, SOURCE_AREA, 
+      BOUND_LIST_URL, IS_BOUND_LIST, DATA_SOURCE, 
+      LC_NO, IS_PRE_SCALE, PREDICTION_TYPE, 
+      PREDICTION_COMBINATION)
     values (#{actualNo,jdbcType=VARCHAR}, #{predictionNo,jdbcType=VARCHAR}, #{noticeNo,jdbcType=VARCHAR}, 
       #{railwayNo,jdbcType=VARCHAR}, #{railwayCarriageNo,jdbcType=VARCHAR}, #{matterNo,jdbcType=VARCHAR}, 
       #{matterName,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR}, #{batchNo,jdbcType=VARCHAR}, 
@@ -866,8 +941,10 @@
       #{uploadTime,jdbcType=TIMESTAMP}, #{sampleNo,jdbcType=VARCHAR}, #{railwayTypeNo,jdbcType=VARCHAR}, 
       #{railwayTypeName,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR}, #{waterNum,jdbcType=DECIMAL}, 
       #{arrival,jdbcType=VARCHAR}, #{station,jdbcType=VARCHAR}, #{updateManNo,jdbcType=VARCHAR}, 
-      #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{sourceArea,jdbcType=VARCHAR}
-      )
+      #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{sourceArea,jdbcType=VARCHAR}, 
+      #{boundListUrl,jdbcType=VARCHAR}, #{isBoundList,jdbcType=VARCHAR}, #{dataSource,jdbcType=VARCHAR}, 
+      #{lcNo,jdbcType=VARCHAR}, #{isPreScale,jdbcType=VARCHAR}, #{predictionType,jdbcType=VARCHAR}, 
+      #{predictionCombination,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkhookactual.model.MeterWorkHookActual">
     insert into METER_WORK_HOOK_ACTUAL
@@ -1100,6 +1177,27 @@
       <if test="sourceArea != null">
         SOURCE_AREA,
       </if>
+      <if test="boundListUrl != null">
+        BOUND_LIST_URL,
+      </if>
+      <if test="isBoundList != null">
+        IS_BOUND_LIST,
+      </if>
+      <if test="dataSource != null">
+        DATA_SOURCE,
+      </if>
+      <if test="lcNo != null">
+        LC_NO,
+      </if>
+      <if test="isPreScale != null">
+        IS_PRE_SCALE,
+      </if>
+      <if test="predictionType != null">
+        PREDICTION_TYPE,
+      </if>
+      <if test="predictionCombination != null">
+        PREDICTION_COMBINATION,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="actualNo != null">
@@ -1330,6 +1428,27 @@
       <if test="sourceArea != null">
         #{sourceArea,jdbcType=VARCHAR},
       </if>
+      <if test="boundListUrl != null">
+        #{boundListUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="isBoundList != null">
+        #{isBoundList,jdbcType=VARCHAR},
+      </if>
+      <if test="dataSource != null">
+        #{dataSource,jdbcType=VARCHAR},
+      </if>
+      <if test="lcNo != null">
+        #{lcNo,jdbcType=VARCHAR},
+      </if>
+      <if test="isPreScale != null">
+        #{isPreScale,jdbcType=VARCHAR},
+      </if>
+      <if test="predictionType != null">
+        #{predictionType,jdbcType=VARCHAR},
+      </if>
+      <if test="predictionCombination != null">
+        #{predictionCombination,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkhookactual.model.MeterWorkHookActual">
@@ -1408,7 +1527,14 @@
       UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
       UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
       UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
-      SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR}
+      SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR},
+      BOUND_LIST_URL = #{boundListUrl,jdbcType=VARCHAR},
+      IS_BOUND_LIST = #{isBoundList,jdbcType=VARCHAR},
+      DATA_SOURCE = #{dataSource,jdbcType=VARCHAR},
+      LC_NO = #{lcNo,jdbcType=VARCHAR},
+      IS_PRE_SCALE = #{isPreScale,jdbcType=VARCHAR},
+      PREDICTION_TYPE = #{predictionType,jdbcType=VARCHAR},
+      PREDICTION_COMBINATION = #{predictionCombination,jdbcType=VARCHAR}
     where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkhookactual.model.MeterWorkHookActual">
@@ -1639,6 +1765,27 @@
       <if test="sourceArea != null">
         SOURCE_AREA = #{sourceArea,jdbcType=VARCHAR},
       </if>
+      <if test="boundListUrl != null">
+        BOUND_LIST_URL = #{boundListUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="isBoundList != null">
+        IS_BOUND_LIST = #{isBoundList,jdbcType=VARCHAR},
+      </if>
+      <if test="dataSource != null">
+        DATA_SOURCE = #{dataSource,jdbcType=VARCHAR},
+      </if>
+      <if test="lcNo != null">
+        LC_NO = #{lcNo,jdbcType=VARCHAR},
+      </if>
+      <if test="isPreScale != null">
+        IS_PRE_SCALE = #{isPreScale,jdbcType=VARCHAR},
+      </if>
+      <if test="predictionType != null">
+        PREDICTION_TYPE = #{predictionType,jdbcType=VARCHAR},
+      </if>
+      <if test="predictionCombination != null">
+        PREDICTION_COMBINATION = #{predictionCombination,jdbcType=VARCHAR},
+      </if>
     </set>
     where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
   </update>
@@ -1684,7 +1831,10 @@
       SAMPLE_NO, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, 
       MEMO, WATER_NUM, ARRIVAL, 
       STATION, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
-      UPDATE_TIME, SOURCE_AREA)
+      UPDATE_TIME, SOURCE_AREA, BOUND_LIST_URL, 
+      IS_BOUND_LIST, DATA_SOURCE, LC_NO, 
+      IS_PRE_SCALE, PREDICTION_TYPE, PREDICTION_COMBINATION
+      )
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.actualNo,jdbcType=VARCHAR}, 
@@ -1715,7 +1865,10 @@
       #{item.sampleNo,jdbcType=VARCHAR}, #{item.railwayTypeNo,jdbcType=VARCHAR}, #{item.railwayTypeName,jdbcType=VARCHAR}, 
       #{item.memo,jdbcType=VARCHAR}, #{item.waterNum,jdbcType=DECIMAL}, #{item.arrival,jdbcType=VARCHAR}, 
       #{item.station,jdbcType=VARCHAR}, #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, 
-      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.sourceArea,jdbcType=VARCHAR} from dual  
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.sourceArea,jdbcType=VARCHAR}, #{item.boundListUrl,jdbcType=VARCHAR}, 
+      #{item.isBoundList,jdbcType=VARCHAR}, #{item.dataSource,jdbcType=VARCHAR}, #{item.lcNo,jdbcType=VARCHAR}, 
+      #{item.isPreScale,jdbcType=VARCHAR}, #{item.predictionType,jdbcType=VARCHAR}, #{item.predictionCombination,jdbcType=VARCHAR}
+       from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
@@ -2025,6 +2178,34 @@
        <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.sourceArea,jdbcType=VARCHAR}
        </foreach>
+       ,BOUND_LIST_URL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.boundListUrl,jdbcType=VARCHAR}
+       </foreach>
+       ,IS_BOUND_LIST=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.isBoundList,jdbcType=VARCHAR}
+       </foreach>
+       ,DATA_SOURCE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.dataSource,jdbcType=VARCHAR}
+       </foreach>
+       ,LC_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.lcNo,jdbcType=VARCHAR}
+       </foreach>
+       ,IS_PRE_SCALE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.isPreScale,jdbcType=VARCHAR}
+       </foreach>
+       ,PREDICTION_TYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.predictionType,jdbcType=VARCHAR}
+       </foreach>
+       ,PREDICTION_COMBINATION=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.predictionCombination,jdbcType=VARCHAR}
+       </foreach>
      where ACTUAL_NO in 
      <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
     #{item.actualNo,jdbcType=VARCHAR}

+ 109 - 2
src/main/java/com/steerinfo/meterwork/meterworkhookactual/model/MeterWorkHookActual.java

@@ -3,6 +3,7 @@ package com.steerinfo.meterwork.meterworkhookactual.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -351,9 +352,9 @@ public class MeterWorkHookActual implements IBasePO<String> {
     private String netMode;
 
     /**
-     * 状态(0=有效,1=作废 )(VALUE_FLAG,VARCHAR,1)
+     * 状态(0=作废,1=有效-未发布,2=有效-已发布,3=未匹配委托 )(VALUE_FLAG,VARCHAR,1)
      */
-    @ApiModelProperty(value="状态(0=有效,1=作废 )",required=false)
+    @ApiModelProperty(value="状态(0=作废,1=有效-未发布,2=有效-已发布,3=未匹配委托 )",required=false)
     private String valueFlag;
 
     /**
@@ -464,6 +465,49 @@ public class MeterWorkHookActual implements IBasePO<String> {
     @ApiModelProperty(value="原产地",required=false)
     private String sourceArea;
 
+    /**
+     * 电子磅单地址(BOUND_LIST_URL,VARCHAR,100)
+     */
+    @ApiModelProperty(value="电子磅单地址",required=false)
+    private String boundListUrl;
+
+    /**
+     * 是否生成电子磅单地址(0:未生成, 1:已生成)(IS_BOUND_LIST,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否生成电子磅单地址(0:未生成, 1:已生成)",required=false)
+    private String isBoundList;
+
+    /**
+     * 数据来源(1=智能终端,2=本地计量,3=应急计量,4=手动录入(计量票据录入))(DATA_SOURCE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="数据来源(1=智能终端,2=本地计量,3=应急计量,4=手动录入(计量票据录入))",required=false)
+    private String dataSource;
+
+    /**
+     * 车次(LC_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="车次",required=false)
+    private String lcNo;
+
+    /**
+     * 是否匹配委托(0:未匹配,1:已匹配)(IS_PRE_SCALE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否匹配委托(0:未匹配,1:已匹配)",required=false)
+    private String isPreScale;
+
+    /**
+     * 委托类型(0:批次预报;1:单次预报;2:联运预报;3:分检预报、5:双委托、6:混卸、7:混装)
+(PREDICTION_TYPE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="委托类型(0:批次预报;1:单次预报;2:联运预报;3:分检预报、5:双委托、6:混卸、7:混装)",required=false)
+    private String predictionType;
+
+    /**
+     * 委托组合(PREDICTION_COMBINATION,VARCHAR,50)
+     */
+    @ApiModelProperty(value="委托组合",required=false)
+    private String predictionCombination;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -1084,6 +1128,62 @@ public class MeterWorkHookActual implements IBasePO<String> {
         this.sourceArea = sourceArea == null ? null : sourceArea.trim();
     }
 
+    public String getBoundListUrl() {
+        return boundListUrl;
+    }
+
+    public void setBoundListUrl(String boundListUrl) {
+        this.boundListUrl = boundListUrl == null ? null : boundListUrl.trim();
+    }
+
+    public String getIsBoundList() {
+        return isBoundList;
+    }
+
+    public void setIsBoundList(String isBoundList) {
+        this.isBoundList = isBoundList == null ? null : isBoundList.trim();
+    }
+
+    public String getDataSource() {
+        return dataSource;
+    }
+
+    public void setDataSource(String dataSource) {
+        this.dataSource = dataSource == null ? null : dataSource.trim();
+    }
+
+    public String getLcNo() {
+        return lcNo;
+    }
+
+    public void setLcNo(String lcNo) {
+        this.lcNo = lcNo == null ? null : lcNo.trim();
+    }
+
+    public String getIsPreScale() {
+        return isPreScale;
+    }
+
+    public void setIsPreScale(String isPreScale) {
+        this.isPreScale = isPreScale == null ? null : isPreScale.trim();
+    }
+
+    public String getPredictionType() {
+        return predictionType;
+    }
+
+    public void setPredictionType(String predictionType) {
+        this.predictionType = predictionType == null ? null : predictionType.trim();
+    }
+
+    public String getPredictionCombination() {
+        return predictionCombination;
+    }
+
+    public void setPredictionCombination(String predictionCombination) {
+        this.predictionCombination = predictionCombination == null ? null : predictionCombination.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -1166,6 +1266,13 @@ public class MeterWorkHookActual implements IBasePO<String> {
         sb.append(", updateManName=").append(updateManName);
         sb.append(", updateTime=").append(updateTime);
         sb.append(", sourceArea=").append(sourceArea);
+        sb.append(", boundListUrl=").append(boundListUrl);
+        sb.append(", isBoundList=").append(isBoundList);
+        sb.append(", dataSource=").append(dataSource);
+        sb.append(", lcNo=").append(lcNo);
+        sb.append(", isPreScale=").append(isPreScale);
+        sb.append(", predictionType=").append(predictionType);
+        sb.append(", predictionCombination=").append(predictionCombination);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 3 - 0
src/main/java/com/steerinfo/meterwork/meterworkhookactual/service/IMeterWorkHookActualService.java

@@ -1,5 +1,6 @@
 package com.steerinfo.meterwork.meterworkhookactual.service;
 
+import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.meterwork.meterworkhookactual.model.MeterWorkHookActual;
 import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
@@ -39,4 +40,6 @@ public interface IMeterWorkHookActualService extends IBaseService<MeterWorkHookA
     MeterWorkHookActual matchPrediction(String actualNo, String predictionNo, String note);
 
     MeterWorkHookActual cleanPrediction(MeterWorkHookActual model);
+
+    RESTfulResult supplementaryData(MeterWorkHookActual model);
 }

+ 127 - 1
src/main/java/com/steerinfo/meterwork/meterworkhookactual/service/impl/MeterWorkHookActualServiceImpl.java

@@ -1,5 +1,6 @@
 package com.steerinfo.meterwork.meterworkhookactual.service.impl;
 
+import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import com.steerinfo.framework.user.UserPayload;
@@ -10,8 +11,11 @@ import com.steerinfo.meterwork.meterworkhookactfirst.model.MeterWorkHookActFirst
 import com.steerinfo.meterwork.meterworkhookactual.model.MeterWorkHookActual;
 import com.steerinfo.meterwork.meterworkhookactual.mapper.MeterWorkHookActualMapper;
 import com.steerinfo.meterwork.meterworkhookactual.service.IMeterWorkHookActualService;
+import com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst;
+import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
 import com.steerinfo.pretrack.prehookscale.mapper.PreHookScaleMapper;
 import com.steerinfo.pretrack.prehookscale.model.PreHookScale;
+import com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale;
 import com.steerinfo.util.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -42,7 +46,7 @@ import java.util.stream.Collectors;
 @Service(value = "meterWorkHookActualService")
 public class MeterWorkHookActualServiceImpl extends BaseServiceImpl<MeterWorkHookActual, String> implements IMeterWorkHookActualService {
 
-    @Autowired
+    @Resource
     private MeterWorkHookActualMapper meterWorkHookActualMapper;
 
     @Resource
@@ -535,4 +539,126 @@ public class MeterWorkHookActualServiceImpl extends BaseServiceImpl<MeterWorkHoo
         meterWorkHookActualMapper.updateByPrimaryKey(mwca);
         return mwca;
     }
+
+    @Override
+    public RESTfulResult supplementaryData(MeterWorkHookActual model) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+
+        try{
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String afl = sdf.format(new Date());
+            //一次数据
+            MeterWorkHookActFirst mwcaf1 = new MeterWorkHookActFirst();
+            MeterWorkHookActFirst mwcaf2 = new MeterWorkHookActFirst();
+            MeterWorkHookActual actualRow = new MeterWorkHookActual();
+            String predictionNo = model.getPredictionNo();
+
+            PreHookScale scale = preHookScaleMapper.selectByPrimaryKey(predictionNo);
+            if(scale.getValueFlag().equals("2")) {
+                rm.setMessage("委托已匹配,请确认!!");
+                return rm;
+            }
+
+            /*UserPayload payload = UserPayload.getCurrUser();
+            String userId = payload.getId();
+            String userName = payload.getUserName();*/
+            //毛重
+            //毛重
+            String actualFirstNo = sdf.format(new Date()) + meterWorkHookActFirstMapper.getNewID(afl);
+            mwcaf1.setActualFirstNo(actualFirstNo);
+            mwcaf1.setRailwayNo(model.getRailwayNo());
+            mwcaf1.setMeterWeight(model.getGrossWeight());
+            mwcaf1.setRailwayTypeNo(model.getRailwayTypeNo());
+            mwcaf1.setRailwayTypeName(model.getRailwayTypeName());
+            mwcaf1.setWeightType("0");
+            mwcaf1.setCreateManNo(model.getGrossManNo());
+            mwcaf1.setCreateManName(model.getGrossManName());
+            mwcaf1.setCreateTime(model.getGrossTime());
+            mwcaf1.setBaseSpotNo(model.getBaseSpot1No());
+            mwcaf1.setBaseSpotName(model.getBaseSpot1Name());
+            mwcaf1.setValueFlag("2");
+            mwcaf1.setCheckFlag("0");
+            mwcaf1.setDataSource("4");
+            mwcaf1.setMeterMode("3");
+            mwcaf1.setIsPreScale("0");
+            meterWorkHookActFirstMapper.insertSelective(mwcaf1);
+            //皮重
+            String actualSecondNo = sdf.format(new Date()) + meterWorkHookActFirstMapper.getNewID(afl);
+            mwcaf2.setActualFirstNo(actualSecondNo);
+            mwcaf2.setRailwayNo(model.getRailwayNo());
+            mwcaf2.setMeterWeight(model.getTareWeight());
+            mwcaf2.setWeightType("1");
+            mwcaf2.setRailwayTypeNo(model.getRailwayTypeNo());
+            mwcaf2.setRailwayTypeName(model.getRailwayTypeName());
+            mwcaf2.setCreateManNo(model.getGrossManNo());
+            mwcaf2.setCreateManName(model.getGrossManName());
+            mwcaf2.setCreateTime(model.getGrossTime());
+            mwcaf2.setBaseSpotNo(model.getBaseSpot2No());
+            mwcaf2.setBaseSpotName(model.getBaseSpot2Name());
+            mwcaf2.setValueFlag("2");
+            mwcaf2.setCheckFlag("0");
+            mwcaf2.setDataSource("4");
+            mwcaf2.setMeterMode("3");
+            mwcaf2.setIsPreScale("0");
+            meterWorkHookActFirstMapper.insertSelective(mwcaf2);
+            //净重
+            if(com.steerinfo.util.StringUtils.isNotEmpty(predictionNo)){
+                //将委托中的编号和收发货的等数据拷贝进一次数据中
+                MeterWorkHookActFirst first1 = meterWorkHookActFirstMapper.selectAndMatch(actualFirstNo, predictionNo);
+                BeanUtils.copyProperties(first1,mwcaf1);
+                mwcaf1.setIsPreScale("1");
+                meterWorkHookActFirstMapper.updateByPrimaryKeySelective(mwcaf1);
+                MeterWorkHookActFirst first2 = meterWorkHookActFirstMapper.selectAndMatch(actualSecondNo, predictionNo);
+                BeanUtils.copyProperties(first2, mwcaf2);
+                mwcaf2.setIsPreScale("1");
+                meterWorkHookActFirstMapper.updateByPrimaryKeySelective(mwcaf2);
+                //更新预报数据
+
+                scale.setValueFlag(DbConstants.NET);
+                scale.setUpdateTime(new Date());
+                scale.setUpdateManNo("system");
+                scale.setUpdateManName("手动录入");
+                scale.setUploadFlag("1");
+                scale.setValueFlag("2");
+                preHookScaleMapper.updateByPrimaryKeySelective(scale);
+                //将委托中的编号和收发货单位和一次数据等数据拷贝进结净数据中
+                MeterWorkHookActual mwca1 = meterWorkHookActualMapper.manualAddPre(actualFirstNo, actualSecondNo, predictionNo);
+                BeanUtils.copyProperties(mwca1, actualRow);
+
+            }else {
+                //将委托中的编号和收发货单位和一次数据等数据拷贝进结净数据中
+                MeterWorkHookActual mwca1 = meterWorkHookActualMapper.manualAdd(actualFirstNo, actualSecondNo);
+                BeanUtils.copyProperties(mwca1, actualRow);
+            }
+            String no = meterWorkHookActualMapper.getNewID(sdf.format(new Date()));
+            actualRow.setActualNo(sdf.format(new Date()) + no);
+            actualRow.setRailwayTypeNo(model.getRailwayTypeNo());
+            actualRow.setRailwayTypeName(model.getRailwayTypeName());
+            actualRow.setNetTime(model.getNetTime());
+            actualRow.setNetMode(DbConstants.TYPE);
+            actualRow.setUploadFlag("1");
+            actualRow.setIsPreScale("1");
+            actualRow.setValueFlag("1");
+            actualRow.setGrossMode("3");
+            actualRow.setTareMode("3");
+            actualRow.setDataSource("4");
+            actualRow.setPredictionType("1");
+            actualRow.setUpdateManNo("system");
+            actualRow.setUpdateManName("手动录入");
+            actualRow.setUpdateTime(new Date());
+            actualRow.setPredictionNo(predictionNo);
+            actualRow.setNetWeight(mwcaf1.getMeterWeight().subtract(mwcaf2.getMeterWeight()));
+            meterWorkHookActualMapper.insertSelective(actualRow);
+            rm.setSucceed();
+            rm.setMessage("操作成功!!!");
+            rm.setCode("200");
+            return rm;
+        }catch(Exception e){
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!!");
+            return rm;
+        }
+    }
+
 }

+ 1 - 0
src/main/java/com/steerinfo/meterwork/meterworkimage/controller/MeterWorkImageController.java

@@ -147,6 +147,7 @@ public class MeterWorkImageController extends BaseRESTfulController {
             return success(urls);
         } catch (MarkerMetException e) {
             e.printStackTrace();
+            rm.setCode("200");
             rm.setMessage(e.getMessage());
         } catch (Exception e) {
             e.printStackTrace();

+ 13 - 13
src/main/java/com/steerinfo/meterwork/meterworkimage/service/impl/MeterWorkImageServiceImpl.java

@@ -10,6 +10,7 @@ import com.steerinfo.meterwork.meterworkimage.service.IMeterWorkImageService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.util.ArrayList;
 
 /**
@@ -28,7 +29,7 @@ import java.util.ArrayList;
 @Service(value = "meterWorkImageService")
 public class MeterWorkImageServiceImpl extends BaseServiceImpl<MeterWorkImage, String> implements IMeterWorkImageService {
 
-    @Autowired
+    @Resource
     private MeterWorkImageMapper meterWorkImageMapper;
 
     @Override
@@ -39,44 +40,43 @@ public class MeterWorkImageServiceImpl extends BaseServiceImpl<MeterWorkImage, S
     {
         try {
             if (actualFirstNo == null || "".equals(actualFirstNo)) {
-                throw  new MarkerMetException(500,"计量作业编号为空!!");
+                throw  new MarkerMetException(0,"计量作业编号为空!!");
             }
             MeterWorkImage mwi = meterWorkImageMapper.selectByPrimaryKey(actualFirstNo);
             if(mwi==null) {
-                throw  new MarkerMetException(500,"该计量作业编号不存在图片!!");
+                throw  new MarkerMetException(0,"该计量作业编号不存在图片!!");
             }
-            String dress = "iiotmanager/ftppicture";
             ArrayList<String> urls=new ArrayList<>();
             if (mwi.getImageFile1() != null && !mwi.getImageFile1().equals("")) {
-                String no = dress+mwi.getImageFile1();
+                String no = mwi.getImageFile1();
                 urls.add(no);
             }
             if (mwi.getImageFile2() != null && !mwi.getImageFile2().equals("")) {
-                String no = dress+mwi.getImageFile2();
+                String no = mwi.getImageFile2();
                 urls.add(no);
             }
             if (mwi.getImageFile3() != null && !mwi.getImageFile3().equals("")) {
-                String no = dress+mwi.getImageFile3();
+                String no = mwi.getImageFile3();
                 urls.add(no);
             }
             if (mwi.getImageFile4() != null && !mwi.getImageFile4().equals("")) {
-                String no = dress+mwi.getImageFile4();
+                String no = mwi.getImageFile4();
                 urls.add(no);
             }
             if (mwi.getImageFile5() != null && !mwi.getImageFile5().equals("")) {
-                String no = dress+mwi.getImageFile5();
+                String no = mwi.getImageFile5();
                 urls.add(no);
             }
             if (mwi.getImageFile6() != null && !mwi.getImageFile6().equals("")) {
-                String no = dress+mwi.getImageFile6();
+                String no = mwi.getImageFile6();
                 urls.add(no);
             }
             if (mwi.getImageFile7() != null && !mwi.getImageFile7().equals("")) {
-                String no = dress+mwi.getImageFile7();
+                String no = mwi.getImageFile7();
                 urls.add(no);
             }
             if (mwi.getImageFile8() != null && !mwi.getImageFile8().equals("")) {
-                String no = dress+mwi.getImageFile8();
+                String no = mwi.getImageFile8();
                 urls.add(no);
             }
             return urls;
@@ -95,7 +95,7 @@ public class MeterWorkImageServiceImpl extends BaseServiceImpl<MeterWorkImage, S
         RESTfulResult rm = new RESTfulResult();
         try{
             rm.setCode("200");
-            MeterWorkImage mw= meterWorkImageMapper.selectByPrimaryKey("C" + mwi.getActualFirstNo());
+            MeterWorkImage mw= meterWorkImageMapper.selectByPrimaryKey(mwi.getActualFirstNo());
             if(mw != null){
                 meterWorkImageMapper.updateByPrimaryKeySelective(mwi);
             }else{

+ 3 - 0
src/main/java/com/steerinfo/meterwork/meterworkmonitor/mapper/MeterWorkMonitorMapper.java

@@ -2,8 +2,10 @@ package com.steerinfo.meterwork.meterworkmonitor.mapper;
 
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor;
+import io.micrometer.core.instrument.Meter;
 import org.apache.ibatis.annotations.Mapper;
 
+import java.util.HashMap;
 import java.util.List;
 
 @Mapper
@@ -19,4 +21,5 @@ public interface MeterWorkMonitorMapper extends IBaseMapper<MeterWorkMonitor, St
     int batchUpdateSelective(List<MeterWorkMonitor> list);
 
     int UpdateUserNo(List<MeterWorkMonitor> list);
+
 }

Fichier diff supprimé car celui-ci est trop grand
+ 778 - 366
src/main/java/com/steerinfo/meterwork/meterworkmonitor/mapper/MeterWorkMonitorMapper.xml


+ 247 - 6
src/main/java/com/steerinfo/meterwork/meterworkmonitor/model/MeterWorkMonitor.java

@@ -3,9 +3,10 @@ package com.steerinfo.meterwork.meterworkmonitor.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.util.Date;
 
-@ApiModel(value="MeterWorkMonitor-计量监控表")
+@ApiModel(value="计量监控表")
 public class MeterWorkMonitor implements IBasePO<String> {
     /**
      * 计量点编号(POINT_NO,VARCHAR,20)
@@ -80,9 +81,9 @@ public class MeterWorkMonitor implements IBasePO<String> {
     private String carMonitor;
 
     /**
-     * 车号修正级别1-3(CAR_MONITOR_LVL,DECIMAL,0)
+     * 车号修正级别1-3(1=修正1位;2=修正连续的2位;3=修正连续的3位)(CAR_MONITOR_LVL,DECIMAL,0)
      */
-    @ApiModelProperty(value="车号修正级别1-3",required=false)
+    @ApiModelProperty(value="车号修正级别1-3(1=修正1位;2=修正连续的2位;3=修正连续的3位)",required=false)
     private Short carMonitorLvl;
 
     /**
@@ -98,7 +99,7 @@ public class MeterWorkMonitor implements IBasePO<String> {
     private String isTakeOver;
 
     /**
-     * 写入LED的值(LED_WRITER,OTHER,100)
+     * 写入LED的值(LED_WRITER,VARCHAR,200)
      */
     @ApiModelProperty(value="写入LED的值",required=false)
     private String ledWriter;
@@ -194,7 +195,7 @@ public class MeterWorkMonitor implements IBasePO<String> {
     private String stopOverTime;
 
     /**
-     * 现场终端提示信息(MSG_INFO,OTHER,200)
+     * 现场终端提示信息(MSG_INFO,VARCHAR,400)
      */
     @ApiModelProperty(value="现场终端提示信息",required=false)
     private String msgInfo;
@@ -241,6 +242,102 @@ public class MeterWorkMonitor implements IBasePO<String> {
     @ApiModelProperty(value="验证联达  0不验证  1验证",required=false)
     private String validLianda;
 
+    /**
+     * 现场扫码器是否正常连接(0=连接异常,1=连接正常)(IS_OPEN_SCANNING,VARCHAR,1)
+     */
+    @ApiModelProperty(value="现场扫码器是否正常连接(0=连接异常,1=连接正常)",required=false)
+    private String isOpenScanning;
+
+    /**
+     * 验证是否存在委托  0不验证  1验证(VALID_IS_PRE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="验证是否存在委托  0不验证  1验证",required=false)
+    private String validIsPre;
+
+    /**
+     * 接管用户IP(USER_IP,VARCHAR,30)
+     */
+    @ApiModelProperty(value="接管用户IP",required=false)
+    private String userIp;
+
+    /**
+     * 衡器电源状态(0正常 1异常)(POWER_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="衡器电源状态(0正常 1异常)",required=false)
+    private String powerState;
+
+    /**
+     * 硬盘录像机状态(0正常 1异常)(DVR_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="硬盘录像机状态(0正常 1异常)",required=false)
+    private String dvrState;
+
+    /**
+     * MOXA状态(0正常 1异常)(MOXA_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="MOXA状态(0正常 1异常)",required=false)
+    private String moxaState;
+
+    /**
+     * PLC状态(0正常 1异常)(PLC_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="PLC状态(0正常 1异常)",required=false)
+    private String plcState;
+
+    /**
+     * 红外对射状态(0正常 1异常)(LEFT_INFRARED_RAY_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="红外对射状态(0正常 1异常)",required=false)
+    private String leftInfraredRayState;
+
+    /**
+     * 红外对射状态(0正常 1异常)(RIGHT_INFRARED_RAY_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="红外对射状态(0正常 1异常)",required=false)
+    private String rightInfraredRayState;
+
+    /**
+     * 功放状态(0正常 1异常)(AMPLIFIER_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="功放状态(0正常 1异常)",required=false)
+    private String amplifierState;
+
+    /**
+     * 照明灯状态(0正常 1异常)(LAMP_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="照明灯状态(0正常 1异常)",required=false)
+    private String lampState;
+
+    /**
+     * 站点类型(SPOT_TYPE_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="站点类型",required=false)
+    private String spotTypeNo;
+
+    /**
+     * 红绿灯状态(RED_GREEN_LIGHT_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="红绿灯状态",required=false)
+    private String redGreenLightState;
+
+    /**
+     * 前红外光栅状态(0正常 1异常)(FRONT_INFRARED_RAY_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="前红外光栅状态(0正常 1异常)",required=false)
+    private String frontInfraredRayState;
+
+    /**
+     * 后红外光栅状态(0正常 1异常)(REAR_INFRARED_RAY_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="后红外光栅状态(0正常 1异常)",required=false)
+    private String rearInfraredRayState;
+
+    /**
+     * rfid状态(0正常 1异常)(RFID_STATE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="rfid状态(0正常 1异常)",required=false)
+    private String rfidState;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -378,7 +475,7 @@ public class MeterWorkMonitor implements IBasePO<String> {
     }
 
     public void setLedWriter(String ledWriter) {
-        this.ledWriter = ledWriter== null ? null : ledWriter.trim();
+        this.ledWriter = ledWriter == null ? null : ledWriter.trim();
     }
 
     public Short getPrintNum() {
@@ -565,6 +662,134 @@ public class MeterWorkMonitor implements IBasePO<String> {
         this.validLianda = validLianda == null ? null : validLianda.trim();
     }
 
+    public String getIsOpenScanning() {
+        return isOpenScanning;
+    }
+
+    public void setIsOpenScanning(String isOpenScanning) {
+        this.isOpenScanning = isOpenScanning == null ? null : isOpenScanning.trim();
+    }
+
+    public String getValidIsPre() {
+        return validIsPre;
+    }
+
+    public void setValidIsPre(String validIsPre) {
+        this.validIsPre = validIsPre == null ? null : validIsPre.trim();
+    }
+
+    public String getUserIp() {
+        return userIp;
+    }
+
+    public void setUserIp(String userIp) {
+        this.userIp = userIp == null ? null : userIp.trim();
+    }
+
+    public String getPowerState() {
+        return powerState;
+    }
+
+    public void setPowerState(String powerState) {
+        this.powerState = powerState == null ? null : powerState.trim();
+    }
+
+    public String getDvrState() {
+        return dvrState;
+    }
+
+    public void setDvrState(String dvrState) {
+        this.dvrState = dvrState == null ? null : dvrState.trim();
+    }
+
+    public String getMoxaState() {
+        return moxaState;
+    }
+
+    public void setMoxaState(String moxaState) {
+        this.moxaState = moxaState == null ? null : moxaState.trim();
+    }
+
+    public String getPlcState() {
+        return plcState;
+    }
+
+    public void setPlcState(String plcState) {
+        this.plcState = plcState == null ? null : plcState.trim();
+    }
+
+    public String getLeftInfraredRayState() {
+        return leftInfraredRayState;
+    }
+
+    public void setLeftInfraredRayState(String leftInfraredRayState) {
+        this.leftInfraredRayState = leftInfraredRayState == null ? null : leftInfraredRayState.trim();
+    }
+
+    public String getRightInfraredRayState() {
+        return rightInfraredRayState;
+    }
+
+    public void setRightInfraredRayState(String rightInfraredRayState) {
+        this.rightInfraredRayState = rightInfraredRayState == null ? null : rightInfraredRayState.trim();
+    }
+
+    public String getAmplifierState() {
+        return amplifierState;
+    }
+
+    public void setAmplifierState(String amplifierState) {
+        this.amplifierState = amplifierState == null ? null : amplifierState.trim();
+    }
+
+    public String getLampState() {
+        return lampState;
+    }
+
+    public void setLampState(String lampState) {
+        this.lampState = lampState == null ? null : lampState.trim();
+    }
+
+    public String getSpotTypeNo() {
+        return spotTypeNo;
+    }
+
+    public void setSpotTypeNo(String spotTypeNo) {
+        this.spotTypeNo = spotTypeNo == null ? null : spotTypeNo.trim();
+    }
+
+    public String getRedGreenLightState() {
+        return redGreenLightState;
+    }
+
+    public void setRedGreenLightState(String redGreenLightState) {
+        this.redGreenLightState = redGreenLightState == null ? null : redGreenLightState.trim();
+    }
+
+    public String getFrontInfraredRayState() {
+        return frontInfraredRayState;
+    }
+
+    public void setFrontInfraredRayState(String frontInfraredRayState) {
+        this.frontInfraredRayState = frontInfraredRayState == null ? null : frontInfraredRayState.trim();
+    }
+
+    public String getRearInfraredRayState() {
+        return rearInfraredRayState;
+    }
+
+    public void setRearInfraredRayState(String rearInfraredRayState) {
+        this.rearInfraredRayState = rearInfraredRayState == null ? null : rearInfraredRayState.trim();
+    }
+
+    public String getRfidState() {
+        return rfidState;
+    }
+
+    public void setRfidState(String rfidState) {
+        this.rfidState = rfidState == null ? null : rfidState.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -610,6 +835,22 @@ public class MeterWorkMonitor implements IBasePO<String> {
         sb.append(", moxaIp=").append(moxaIp);
         sb.append(", moxaPort=").append(moxaPort);
         sb.append(", validLianda=").append(validLianda);
+        sb.append(", isOpenScanning=").append(isOpenScanning);
+        sb.append(", validIsPre=").append(validIsPre);
+        sb.append(", userIp=").append(userIp);
+        sb.append(", powerState=").append(powerState);
+        sb.append(", dvrState=").append(dvrState);
+        sb.append(", moxaState=").append(moxaState);
+        sb.append(", plcState=").append(plcState);
+        sb.append(", leftInfraredRayState=").append(leftInfraredRayState);
+        sb.append(", rightInfraredRayState=").append(rightInfraredRayState);
+        sb.append(", amplifierState=").append(amplifierState);
+        sb.append(", lampState=").append(lampState);
+        sb.append(", spotTypeNo=").append(spotTypeNo);
+        sb.append(", redGreenLightState=").append(redGreenLightState);
+        sb.append(", frontInfraredRayState=").append(frontInfraredRayState);
+        sb.append(", rearInfraredRayState=").append(rearInfraredRayState);
+        sb.append(", rfidState=").append(rfidState);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 5 - 0
src/main/java/com/steerinfo/meterwork/meterworkmonitor/service/IMeterWorkMonitorService.java

@@ -4,6 +4,9 @@ import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.meterwork.meterworkmonitor.model.MeterWorkMonitor;
 
+import java.util.HashMap;
+import java.util.List;
+
 /**
  * MeterWorkMonitor服务接口:
  * @author generator
@@ -24,4 +27,6 @@ public interface IMeterWorkMonitorService extends IBaseService<MeterWorkMonitor,
     String doUpdateWf(MeterWorkMonitor model);
 
     void AutomaticAllocation();
+
+
 }

+ 2 - 0
src/main/java/com/steerinfo/meterwork/meterworkmonitor/service/impl/MeterWorkMonitorServiceImpl.java

@@ -109,6 +109,8 @@ public class MeterWorkMonitorServiceImpl extends BaseServiceImpl<MeterWorkMonito
         System.out.println("DATASOURCE = " + dataSource  );
     }
 
+
+
     private void RandomAssign() {
         List<MeterWorkMonitor> list2 = meterWorkMonitorMapper.selectForAss();
         if (list2.size() > 0) {

+ 72 - 27
src/main/java/com/steerinfo/meterwork/meterworkprewgttype/controller/MeterWorkPreWgttypeController.java

@@ -6,11 +6,14 @@ import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.framework.utils.collection.ListUtils;
 import com.steerinfo.meterwork.except.MarkerMetException;
 import com.steerinfo.meterwork.meterworkcarrecover.model.MeterWorkCarRecover;
+import com.steerinfo.meterwork.meterworkprewgttype.mapper.MeterWorkPreWgttypeMapper;
 import com.steerinfo.meterwork.meterworkprewgttype.model.MeterWorkPreWgttype;
 import com.steerinfo.meterwork.meterworkprewgttype.service.IMeterWorkPreWgttypeService;
+import com.steerinfo.pretrack.pretrackscale.mapper.PreTrackScaleMapper;
 import com.steerinfo.pretrack.pretrackscale.model.PreTrackScale;
 import com.steerinfo.pretrack.pretrackscale.service.IPreTrackScaleService;
 import com.steerinfo.pretrack.pretrackscale.service.impl.PreTrackScaleServiceImpl;
+import com.steerinfo.util.FieldsCollector;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -22,10 +25,8 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
+import javax.annotation.Resource;
+import java.util.*;
 import java.math.BigDecimal;
 
 /**
@@ -52,6 +53,9 @@ public class MeterWorkPreWgttypeController extends BaseRESTfulController {
     @Autowired
     IPreTrackScaleService preTrackScaleService;
 
+    @Resource
+    MeterWorkPreWgttypeMapper meterWorkPreWgttypeMapper;
+
     @ApiOperation(value="获取列表", notes="分页查询")
     @ApiImplicitParams({
         @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
@@ -77,11 +81,9 @@ public class MeterWorkPreWgttypeController extends BaseRESTfulController {
     }
     
     @ApiOperation(value="创建", notes="根据MeterWorkPreWgttype对象创建")
-    @ApiImplicitParam(name = "meterWorkPreWgttype", value = "详细实体meterWorkPreWgttype", required = true, dataType = "MeterWorkPreWgttype")
-    //@RequiresPermissions("meterworkprewgttype:create")
-    @Transactional
     @PostMapping(value = "/")
     public RESTfulResult add(@RequestBody HashMap model){
+        RESTfulResult rm = failed();
         try {
             MeterWorkPreWgttype meterWorkPreWgttype = new MeterWorkPreWgttype();
             meterWorkPreWgttype.setWeightTypeNo(model.get("weightTypeNo") == null?"":model.get("weightTypeNo").toString());
@@ -90,36 +92,23 @@ public class MeterWorkPreWgttypeController extends BaseRESTfulController {
             meterWorkPreWgttype.setCreateManName(model.get("createManName") == null?"":model.get("createManName").toString());
             meterWorkPreWgttype.setCreateManPhone(model.get("createManPhone") == null?"":model.get("createManPhone").toString());
             String preTrackScaleNo = model.get("preTrackScaleNo") == null?"":model.get("preTrackScaleNo").toString();
-            HashMap map = meterWorkPreWgttypeService.addOrAbolish(meterWorkPreWgttype);
+            rm = meterWorkPreWgttypeService.addOrAbolish(meterWorkPreWgttype);
             if (preTrackScaleNo == "" || preTrackScaleNo.equals("")){
-                if (map.get("code").equals("0")){
-                    return success();
-                }
-                else {
-                    return failed(map.get("msg"));
-                }
+                return rm;
             }else{
                 PreTrackScale preTrackScale = new PreTrackScale();
                 preTrackScale.setPredictionNo(preTrackScaleNo);
                 preTrackScale.setCarNo(meterWorkPreWgttype.getCarNo());
                 int scale = preTrackScaleService.setPreIndex(preTrackScale);
-                if (map.get("code").equals("0") && scale > 0){
-                    return success();
-                }
-                else if(scale == -1){
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return failed("已经存在已使用的委托,不可修改");
-                }
-                else {
-                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                    return failed(map.get("msg"));
+                if(scale < 1){
+                    rm.setMessage("已经存在已使用的委托,不可修改");
                 }
+                return rm;
             }
-
         } catch (Exception ex) {
             ex.printStackTrace();
-            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-            throw new MarkerMetException(500, "操作异常!!");
+            rm.setMessage("操作异常,请确认!!");
+            return rm;
         }
     }
 
@@ -158,4 +147,60 @@ public class MeterWorkPreWgttypeController extends BaseRESTfulController {
       return success();
     }
 
+    @ApiOperation(value="根据车号获取当前预约毛皮信息", notes="根据车号获取当前预约毛皮信息")
+    @PostMapping(value = "/getCarPreInfo")
+    public RESTfulResult getCarPreInfo(@RequestBody HashMap params){
+        RESTfulResult rm = failed();
+        try {
+            String carNo = params.get("carNo") == null?"":params.get("carNo").toString();
+            rm = meterWorkPreWgttypeService.getCarPreInfo(carNo);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        return rm;
+    }
+
+    @ApiOperation(value="根据车号取消皮重预约或者毛重委托", notes="根据车号取消皮重预约或者毛重委托")
+    @PostMapping(value = "/abolishPreWgtType")
+    public RESTfulResult abolishPreWgtType(@RequestBody HashMap params){
+        RESTfulResult rm = failed();
+        try {
+            String carNo = params.get("carNo") == null?"":params.get("carNo").toString();
+            rm = meterWorkPreWgttypeService.abolishPreWgtType(carNo);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        return rm;
+    }
+
+
+    @ApiOperation(value="不分页查询", notes="不分页查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterworkprewgttype:view")
+    @PostMapping(value = "/selectNoPage")
+    public RESTfulResult selectNoPage(@RequestBody MeterWorkPreWgttype parmas){
+
+        RESTfulResult rm = failed();
+        Map<String, Object> map = FieldsCollector.beanToMap(parmas);
+
+        try {
+            List<MeterWorkPreWgttype> rows = meterWorkPreWgttypeMapper.selectByParameters(map);
+            rm.setCode("200");
+            rm.setMessage("操作成功");
+            rm.setSucceed();
+            rm.setData(rows);
+            return rm;
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+        }
+        return rm;
+    }
 }

+ 4 - 1
src/main/java/com/steerinfo/meterwork/meterworkprewgttype/service/IMeterWorkPreWgttypeService.java

@@ -1,6 +1,7 @@
 package com.steerinfo.meterwork.meterworkprewgttype.service;
 
 import com.steerinfo.baseinfo.combaseinfo.model.ComBaseInfo;
+import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.meterwork.meterworkprewgttype.model.MeterWorkPreWgttype;
 import java.util.Date;
@@ -22,5 +23,7 @@ import java.util.HashMap;
  */
 public interface IMeterWorkPreWgttypeService extends IBaseService<MeterWorkPreWgttype, String>{
 
-    HashMap addOrAbolish(MeterWorkPreWgttype model)throws  Exception;
+    RESTfulResult addOrAbolish(MeterWorkPreWgttype model);
+    RESTfulResult getCarPreInfo(String carNo);
+    RESTfulResult abolishPreWgtType(String carNo);
 }

+ 131 - 56
src/main/java/com/steerinfo/meterwork/meterworkprewgttype/service/impl/MeterWorkPreWgttypeServiceImpl.java

@@ -1,16 +1,22 @@
 package com.steerinfo.meterwork.meterworkprewgttype.service.impl;
 
 import com.steerinfo.baseinfo.combaseinfo.model.ComBaseInfo;
+import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import com.steerinfo.meterwork.meterworkprewgttype.model.MeterWorkPreWgttype;
 import com.steerinfo.meterwork.meterworkprewgttype.mapper.MeterWorkPreWgttypeMapper;
 import com.steerinfo.meterwork.meterworkprewgttype.service.IMeterWorkPreWgttypeService;
+import com.steerinfo.pretrack.pretrackscale.mapper.PreTrackScaleMapper;
+import com.steerinfo.pretrack.pretrackscale.model.PreTrackScale;
 import com.steerinfo.util.StringUtils;
+import com.sun.net.httpserver.Authenticator;
+import org.apache.shiro.crypto.hash.Hash;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
@@ -34,8 +40,10 @@ import java.util.List;
 @Service(value = "meterWorkPreWgttypeService")
 public class MeterWorkPreWgttypeServiceImpl extends BaseServiceImpl<MeterWorkPreWgttype, String> implements IMeterWorkPreWgttypeService {
 
-    @Autowired
+    @Resource
     private MeterWorkPreWgttypeMapper meterWorkPreWgttypeMapper;
+    @Resource
+    private PreTrackScaleMapper preTrackScaleMapper;
 
     @Override
     protected IBaseMapper<MeterWorkPreWgttype, String> getMapper() {
@@ -44,75 +52,142 @@ public class MeterWorkPreWgttypeServiceImpl extends BaseServiceImpl<MeterWorkPre
 
     @Transactional
     @Override
-    public HashMap addOrAbolish(MeterWorkPreWgttype model) {
-        HashMap returnMap = new HashMap();
-
+    public RESTfulResult addOrAbolish(MeterWorkPreWgttype model) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+        rm.setMessage("操作异常!!");
         // 数据验证
         if (StringUtils.isEmpty(model.getCarNo())) {
-            returnMap.put("code", "1");
-            returnMap.put("msg", "车号不能为空");
+            rm.setMessage("车号不能为空,请确认!!");
         }
         else if (StringUtils.isEmpty(model.getWeightTypeNo()) || StringUtils.isEmpty(model.getWeightTypeName())) {
-            returnMap.put("code", "1");
-            returnMap.put("msg", "重量类型编号/名称不能为空");
+            rm.setMessage("重量类型编号/名称不能为空,请确认!!");
         }
         else if (StringUtils.isEmpty(model.getCreateManName())) {
-            returnMap.put("code", "1");
-            returnMap.put("msg", "创建人不能为空");
+            rm.setMessage("创建人不能为空,请确认!!");
         }
         else if (StringUtils.isEmpty(model.getCreateManPhone())) {
-            returnMap.put("code", "1");
-            returnMap.put("msg", "创建人手机号不能为空");
+            rm.setMessage("创建人手机号不能为空,请确认!!");
         }
+        try {
+            // 根据车号,日期,状态未使用,判断当天当车是否有预处理数据
+            HashMap query = new HashMap();
+            query.put("carNo", model.getCarNo());
+            // 日期转字符串
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            Calendar calendar = Calendar.getInstance();
+            Date date = calendar.getTime();
+            String dateStringParse = sdf.format(date);
+            query.put("createTime", dateStringParse);
+            query.put("valueFlag", "1");
+            List<MeterWorkPreWgttype> list = meterWorkPreWgttypeMapper.selectByParameters(query);
+
+            // 如果没有,新增记录,如果有,作废原纪录,再新建记录
+            if(list.size() >= 1) {
+                // 作废原纪录
+                MeterWorkPreWgttype tempModel = list.get(0);
+                tempModel.setValueFlag("0");
+                tempModel.setUpdateManName(model.getCreateManName());
+                tempModel.setUpdateManPhone(model.getCreateManPhone());
+                tempModel.setUpdateTime(new Date());
+                meterWorkPreWgttypeMapper.updateByPrimaryKey(tempModel);
+            }
+            String no = meterWorkPreWgttypeMapper.GetNewID();
+            model.setWgtTypeId(new SimpleDateFormat("yyyyMMdd").format(new Date()) + no);
+            model.setCreateTime(new Date());
+            model.setValueFlag("1");
+
+            meterWorkPreWgttypeMapper.insert(model);
+            rm.setSucceed();
+            rm.setMessage("操作成功!!");
+            rm.setData(model);
+
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        return rm;
+    }
 
-        if (returnMap.size() == 0) {
-            try {
-                // 根据车号,日期,状态未使用,判断当天当车是否有预处理数据
-                HashMap query = new HashMap();
-                query.put("carNo", model.getCarNo());
-                // 日期转字符串
-                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-                Calendar calendar = Calendar.getInstance();
-                Date date = calendar.getTime();
-                String dateStringParse = sdf.format(date);
-                query.put("createTime", dateStringParse);
-                query.put("valueFlag", "1");
-
-                List<MeterWorkPreWgttype> list = meterWorkPreWgttypeMapper.selectByParameters(query);
-
-                // 如果没有,新增记录
-                if (list.size() == 0) {
-
-                }
-                // 如果有,作废原纪录,再新建记录
-                else {
-                    // 作废原纪录
-                    MeterWorkPreWgttype tempModel = list.get(0);
+    @Override
+    public RESTfulResult getCarPreInfo(String carNo) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+        //存预约信息
+        HashMap<String, Object> preWgtType = new HashMap<>();
+        //查找车号的毛皮重预约信息
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("carNo", carNo);
+        map.put("valueFlag", "1");
+        List<MeterWorkPreWgttype> modelList01 = meterWorkPreWgttypeMapper.selectByParameters(map);
+        if(modelList01.size() >= 1) {
+            if (modelList01.get(0).getWeightTypeName().equals("毛重")) {
+                    HashMap<String, Object> model = new HashMap<>();
+                    model.put("carNo", carNo);
+                    model.put("valueFlag", "1");
+                    model.put("lineDesc", "1");
+                    List<PreTrackScale> scale = preTrackScaleMapper.selectByParameters(model);
+                    if (scale.size() >= 1) {
+                        preWgtType.put("grossWgt", scale);
+                        preWgtType.put("wgtType", modelList01);
+                        rm.setSucceed();
+                        rm.setData(preWgtType);
+                        rm.setCode("200");
+                        rm.setMessage("操作成功");
+                        return rm;
+                    } else if (scale.size() == 0) {
+                        rm.setMessage("根据车号未查询到相应的委托信息,请确认!!");
+                        return rm;
+                    }
+            } else if (modelList01.get(0).getWeightTypeName().equals("皮重")) {
+                preWgtType.put("wgtType", modelList01);
+                rm.setSucceed();
+                rm.setData(preWgtType);
+                rm.setCode("200");
+                rm.setMessage("操作成功");
+                return rm;
+            }
+        }else if(modelList01.size() == 0) {
+            map.remove("valueFlag");
+            map.put("valueFlag", "2");
+            rm.setMessage("未查询到相应车号的预约信息,请确认!!");
+            return rm;
+        }
+        return rm;
+    }
 
-                    tempModel.setValueFlag("0");
-                    tempModel.setUpdateManName(model.getCreateManName());
-                    tempModel.setUpdateManPhone(model.getCreateManPhone());
-                    tempModel.setUpdateTime(new Date());
-                    meterWorkPreWgttypeMapper.updateByPrimaryKey(tempModel);
+    @Override
+    public RESTfulResult abolishPreWgtType(String carNo) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("carNo", carNo);
+        map.put("value", 1);
+        List<MeterWorkPreWgttype> models = meterWorkPreWgttypeMapper.selectByParameters(map);
+        if(models.size() >= 1){
+            for(MeterWorkPreWgttype model: models) {
+                model.setValueFlag("0");
+                if(model.getWeightTypeName().equals("毛重")){
+                    HashMap<String, Object> preTrackMap = new HashMap<>();
+                    preTrackMap.put("carNo", carNo);
+                    preTrackMap.put("valueFlag", "1");
+                    preTrackMap.put("lineDesc", "1");
+                    List<PreTrackScale> scales = preTrackScaleMapper.selectByParameters(preTrackMap);
+                    if (scales.size() >= 1) {
+                        for(PreTrackScale scale: scales){
+                            scale.setLineDesc("0");
+                            preTrackScaleMapper.updateByPrimaryKey(scale);
+                        }
+                    }
                 }
-
-                String no = meterWorkPreWgttypeMapper.GetNewID();
-                model.setWgtTypeId(new SimpleDateFormat("yyyyMMdd").format(new Date()) + no);
-                model.setCreateTime(new Date());
-                model.setValueFlag("1");
-
-                meterWorkPreWgttypeMapper.insert(model);
-                returnMap.put("code", "0");
-
-
-            } catch (Exception ex) {
-                ex.printStackTrace();
-                returnMap.put("code", "1");
-                returnMap.put("msg", ex.toString());
+                meterWorkPreWgttypeMapper.updateByPrimaryKey(model);
             }
         }
-
-        return returnMap;
+        rm.setSucceed();
+        rm.setData(null);
+        rm.setCode("200");
+        rm.setMessage("操作成功!!");
+        return rm;
     }
 }
 

+ 82 - 21
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/controller/MeterWorkRailwayActFirstController.java

@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
@@ -92,6 +93,23 @@ throw new MarkerMetException(500, "操作异常!!");
         }
     }
 
+    @ApiOperation(value = "获取列表", notes = "分页模糊查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterworkrailwayactfirst:view")
+    @PostMapping(value = "/likeByDesc")
+    public RESTfulResult likeByDesc(@RequestBody HashMap parmas, Integer pageNum, Integer pageSize) {
+        try {
+            PageList<MeterWorkRailwayActFirst> list = meterWorkRailwayActFirstService.likeByDesc(parmas, pageNum, pageSize);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
     @ApiOperation(value = "获取列表", notes = "分页模糊查询")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
@@ -371,9 +389,9 @@ throw new MarkerMetException(500, "操作异常!!");
         return rm;
     }
 
-    @ApiOperation(value = "火车号汇总统计汇总-网页", notes = "根据传入时间和火车号,查询给定时间段去重车号")
-    @GetMapping(value = "/distinctCarNo")
-    public RESTfulResult distinctCarNo(@RequestParam HashMap param) {
+    @ApiOperation(value = "一次数据维护-网页", notes = "根据传入时间和火车号,查询给定时间段去重车号")
+    @GetMapping(value = "/distinctRailwayNo")
+    public RESTfulResult distinctRailwayNo(@RequestParam HashMap param) {
         RESTfulResult rm = failed();
         try {
             String railwayTypeNo = param.get("railwayTypeNo") == null ? "":param.get("railwayTypeNo").toString();
@@ -383,41 +401,50 @@ throw new MarkerMetException(500, "操作异常!!");
             String endTime = param.get("endTime") == null ? "":param.get("endTime").toString();
             String dataSource = param.get("dataSource") == null ? "":param.get("dataSource").toString();
             String valueFlag = param.get("valueFlag") == null ? "":param.get("valueFlag").toString();
-            List<String> rows = meterWorkRailwayActFirstService.distinctCarNo(railwayTypeNo, lcNo, railwayNo, startTime, endTime, dataSource,valueFlag);
+            List<String> rows = meterWorkRailwayActFirstService.distinctRailwayNo(railwayTypeNo, lcNo, railwayNo, startTime, endTime, dataSource,valueFlag);
             return success(rows);
-        } catch (MarkerMetException e) {
-            e.printStackTrace();
-            rm.setMessage(e.getMessage());
         } catch (Exception e) {
             e.printStackTrace();
-            rm.setMessage("操作异常,请确认!");
-        } finally {
-
+            rm.setMessage("操作异常,请确认!>>>" + e.getMessage());
         }
         return rm;
     }
 
     @ApiOperation(value = "一次数据维护-网页", notes = "根据传入时间查询去重列次编号")
-    @PostMapping(value = "/distinctRailwayNo")
-    public RESTfulResult distinctRailwayNo(@RequestBody HashMap param) {
+    @PostMapping(value = "/distinctLcNo")
+    public RESTfulResult distinctLcNo(@RequestBody HashMap param) {
         RESTfulResult rm = failed();
         try {
             String railwayTypeNo = param.get("railwayTypeNo") == null ? "":param.get("railwayTypeNo").toString();
-            String railwayNo = param.get("railwayNo") == null ? "": param.get("railwayNo").toString();
             String startTime = param.get("startTime") == null ? "":param.get("startTime").toString();
             String endTime = param.get("endTime") == null ? "":param.get("endTime").toString();
-            String dataSource = param.get("dataSource") == null ? "":param.get("dataSource").toString();
-            List<String> rows = meterWorkRailwayActFirstService.distinctRailwayNo(railwayTypeNo, railwayNo, startTime, endTime, dataSource);
+            List<String> rows = meterWorkRailwayActFirstService.distinctLcNo(railwayTypeNo, startTime, endTime);
             return success(rows);
-        } catch (MarkerMetException e) {
-            e.printStackTrace();
-            rm.setMessage(e.getMessage());
         } catch (Exception e) {
             e.printStackTrace();
-            //rm.setCode("200");
-            rm.setMessage("操作异常,请确认!");
-        } finally {
+            rm.setMessage("操作异常,请确认!>>>" + e.getMessage());
+        }
+        return rm;
+    }
 
+    @ApiOperation(value = "一次数据维护-查询车次车号", notes = "根据传入时间、火车号、计量站点、物料名称、委托号、数据状态、发货单位和收货单位查询去重车次车号")
+    @PostMapping(value = "/distinctLcNoAndRailwayNo")
+    public RESTfulResult distinctLcNoAndRailwayNo(@RequestBody HashMap param) {
+        RESTfulResult rm = failed();
+        try {
+            String railwayTypeNo = param.get("railwayTypeNo") == null ? "":param.get("railwayTypeNo").toString();
+            String startTime = param.get("startTime") == null ? "":param.get("startTime").toString();
+            String endTime = param.get("endTime") == null ? "":param.get("endTime").toString();
+            String railwayNo = param.get("railwayNo") == null ? "":param.get("railwayNo").toString();
+            String baseSpotName = param.get("baseSpotName") == null ? "": param.get("baseSpotName").toString();
+            String matterName = param.get("matterName") == null ? "": param.get("matterName").toString();
+            String predictionNo = param.get("predictionNo") == null ? "": param.get("predictionNo").toString();
+            String valueFlag = param.get("valueFlag") == null ? "":param.get("valueFlag").toString();
+            rm = meterWorkRailwayActFirstService.distinctLcNoAndRailwayNo(railwayTypeNo, startTime, endTime, railwayNo, baseSpotName, matterName,predictionNo, valueFlag);
+            return rm;
+        }catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!>>>" + e.getMessage());
         }
         return rm;
     }
@@ -884,4 +911,38 @@ throw new MarkerMetException(500, "操作异常!!");
             throw new MarkerMetException(500, "操作异常!!");
         }
     }
+
+    @ApiOperation(value = "轨道衡衡一次数据补录", notes = "根据MeterWorkRailwayActFirst对象创建")
+    @PostMapping(value = "/supplementaryData")
+    public RESTfulResult supplementaryData(@RequestBody HashMap map) {
+        RESTfulResult rm = failed();
+        try {
+            MeterWorkRailwayActFirst model = new MeterWorkRailwayActFirst();
+            //model.setPredictionNo(map.get("predictionNo").toString());
+            model.setBaseSpotNo(map.get("baseSpotNo").toString());
+            model.setBaseSpotName(map.get("baseSpotName").toString());
+            model.setCreateManNo(map.get("createManNo").toString());
+            model.setCreateManName(map.get("createManName").toString());
+            /*SimpleDateFormat sdf = new SimpleDateFormat( "yyyy/MM/dd HH24:mm:ss" );
+            Date date = sdf.parse(map.get("createTime").toString());*/
+            model.setMeterWeight(new BigDecimal(map.get("meterWeight").toString()));
+
+            model.setWeightType(map.get("weightType").toString());
+            model.setRailwayNo(map.get("railwayNo").toString());
+            model.setRailwayModelNo(map.get("railwayModelNo").toString());
+            model.setRailwayModelName(map.get("railwayModelName").toString());
+            model.setRailwayTypeNo(map.get("railwayTypeNo").toString());
+            model.setRailwayTypeName(map.get("railwayTypeName").toString());
+            rm = meterWorkRailwayActFirstService.supplementaryData(model);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
 }

+ 5 - 6
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/mapper/MeterWorkRailwayActFirstMapper.java

@@ -38,16 +38,15 @@ public interface MeterWorkRailwayActFirstMapper extends IBaseMapper<MeterWorkRai
     List<MeterWorkRailwayActFirst> selectTa(Map<String, Object> parmas);
 
     List<MeterWorkRailwayActFirst> selectSta(HashMap parmas);
-    /**
-     * 根据传入时间和车号,查询给定时间段去重车号
-     * @param obj
-     * @return
-     */
-    List<MeterWorkRailwayActFirst> distinctCarNo(HashMap<String, Object> obj);
+
+    List<MeterWorkRailwayActFirst> likeByDesc(HashMap parmas);
 
     List<MeterWorkRailwayActFirst> distinctRailwayNo(HashMap<String, Object> obj);
 
+    List<MeterWorkRailwayActFirst> distinctLcNo(HashMap<String, Object> obj);
+
     int getDataCount(Map<String, Object> mp);
 
     void repairPre(Map<String, Object> map);
+    List<MeterWorkRailwayActFirst> selectById(List<String> actualNoList);
 }

+ 27 - 10
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/mapper/MeterWorkRailwayActFirstMapper.xml

@@ -3213,8 +3213,13 @@
     select count(1) from METER_WORK_RAILWAY_ACT_FIRST where PREDICTION_NO=#{predictionNo}
   </select>
 
+  <select id="likeByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+    order by create_time desc
+  </select>
   <!-- 查询:根据传入时间和车号,查询给定时间段去重车号 -->
-  <select id="distinctCarNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+  <select id="distinctRailwayNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     SELECT distinct RAILWAY_NO
     from METER_WORK_RAILWAY_ACT_FIRST
     where 1=1
@@ -3239,28 +3244,40 @@
     </if>
   </select>
 
-  <select id="distinctRailwayNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    SELECT distinct LC_NO
+  <select id="distinctLcNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    SELECT distinct LC_NO, railway_no
     from METER_WORK_RAILWAY_ACT_FIRST
     where 1=1
-    <!--and RAILWAY_NO like '%${railwayNo}%'-->
     <if test="railwayTypeNo != null and railwayTypeNo != ''">
       and  RAILWAY_TYPE_NO = #{railwayTypeNo}
     </if>
-    <if test="railwayNo != null and railwayNo != ''">
-      and  RAILWAY_NO like '%${railwayNo}%'
-    </if>
     <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
       and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
     </if>
-    <if test="dataSource != null and dataSource != ''">
-      and  data_source = '${dataSource}'
+    <if test="railwayNo != null and railwayNo != ''">
+      and  railway_no like  '%${railwayNo}%'
+    </if>
+    <if test="baseSpotName != null and baseSpotName != ''">
+      and  base_spot_name = #{baseSpotName}
+    </if>
+    <if test="predictionNo != null and predictionNo != ''">
+      and  prediction_no =  #{predictionNo}
+    </if>
+    <if test="valueFlag != null and valueFlag != ''">
+      and  value_flag = #{valueFlag}
     </if>
     and lc_no is not null
   </select>
 
-
   <update id="repairPre" parameterType="java.util.HashMap">
     update METER_WORK_RAILWAY_ACT_FIRST set PREDICTION_NO = #{predictionNo} where ACTUAL_FIRST_NO = #{actualFirstNo}
   </update>
+
+  <select id="selectById" parameterType="java.util.List" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ACTUAL_FIRST_NO in
+    <foreach collection="list" item="item" separator="," open="(" close=")">
+      #{item}
+    </foreach>
+  </select>
 </mapper>

+ 8 - 2
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/IMeterWorkRailwayActFirstService.java

@@ -5,6 +5,7 @@ import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.meterwork.dto.StaffPerformanceAnalysis;
+import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
 import com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst;
 import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
 import com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale;
@@ -49,10 +50,13 @@ public interface IMeterWorkRailwayActFirstService extends IBaseService<MeterWork
     @Transactional(rollbackFor = Exception.class)
     PageList<MeterWorkRailwayActFirst> selectTa(Map<String, Object> parmas, Integer pageNum, Integer pageSize);
 
-    List<String> distinctCarNo(String railwayTypeNo, String lcNo, String railwayNo, String startTime, String endTime, String dataSource,String valueFlag);
+    PageList<MeterWorkRailwayActFirst> likeByDesc(HashMap<String, Object> parameters, Integer pageNum, Integer pageSize);
 
-    List<String> distinctRailwayNo(String railwayTypeNo, String railwayNo, String startTime, String endTime, String dataSource);
+    List<String> distinctRailwayNo(String railwayTypeNo, String lcNo, String railwayNo, String startTime, String endTime, String dataSource,String valueFlag);
 
+    List<String> distinctLcNo(String railwayTypeNo, String startTime, String endTime);
+
+    RESTfulResult distinctLcNoAndRailwayNo(String railwayTypeNo, String startTime, String endTime, String railwayNo, String baseSpotName, String matterName, String predictionNo,String valueFlag);
 
     List<MeterWorkRailwayActFirst> selectNet(String weightType, String railwayNo, String flag);
 
@@ -88,5 +92,7 @@ public interface IMeterWorkRailwayActFirstService extends IBaseService<MeterWork
     String mixedDischarge(String actualNo1, String actualNo2, String actualNo3, String predictionNo1, String predictionNo2);
     String fixedTare(String actualNo, String tareWeight, String predictionNo);
     RESTfulResult HistoricalTare(String actualNo, String predictionNo);
+
+    RESTfulResult supplementaryData(MeterWorkRailwayActFirst model);
 }
 

Fichier diff supprimé car celui-ci est trop grand
+ 447 - 148
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/impl/MeterWorkRailwayActFirstServiceImpl.java


+ 121 - 15
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/controller/MeterWorkRailwayActualController.java

@@ -17,7 +17,10 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.util.Arrays;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 
@@ -82,10 +85,10 @@ public class MeterWorkRailwayActualController extends BaseRESTfulController {
             @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
     })
     //@RequiresPermissions("meterworkrailwayactual:view")
-    @PostMapping(value = "/like/")
-    public RESTfulResult listLikePost(@RequestBody HashMap parmas, Integer pageNum, Integer pageSize) {
+    @PostMapping(value = "/likeByDesc")
+    public RESTfulResult likeByDesc(@RequestBody HashMap parmas, Integer pageNum, Integer pageSize) {
         try {
-            PageList<MeterWorkRailwayActual> list = meterWorkRailwayActualService.queryLikeForPage(parmas, pageNum, pageSize);
+            PageList<MeterWorkRailwayActual> list = meterWorkRailwayActualService.likeByDesc(parmas, pageNum, pageSize);
             return success(list);
         } catch (Exception ex) {
             ex.printStackTrace();
@@ -140,18 +143,20 @@ public class MeterWorkRailwayActualController extends BaseRESTfulController {
     }
 
     @ApiOperation(value = "火车号汇总统计汇总", notes = "根据传入时间和火车号,查询给定时间段去重车号")
-    @GetMapping(value = "/distinctCarNo")
-    public RESTfulResult distinctCarNo(@RequestParam HashMap param) {
+    @GetMapping(value = "/distinctRailwayNo")
+    public RESTfulResult distinctRailwayNo(@RequestParam HashMap param) {
         RESTfulResult rm = failed();
         try {
             String railwayTypeNo = param.get("railwayTypeNo") == null ? "":param.get("railwayTypeNo").toString();
             String lcNo = param.get("lcNo") == null ? "" : param.get("lcNo").toString();
             String railwayNo = param.get("railwayNo") == null ? "":param.get("railwayNo").toString();
             String startTime = param.get("startTime") == null ? "":param.get("startTime").toString();
-            String endTime = param.get("endTime") == null ? "":param.get("endTime").toString();
-            String dataSource = param.get("dataSource") == null ? "":param.get("dataSource").toString();
+            String endTime = param.get("endTime") == null ? "":param.get("endTime").toString();;
+            String baseSpotName = param.get("baseSpotName") == null ? "": param.get("baseSpotName").toString();
+            String matterName = param.get("matterName") == null ? "": param.get("matterName").toString();
+            String predictionNo = param.get("predictionNo") == null ? "": param.get("predictionNo").toString();
             String valueFlag = param.get("valueFlag") == null ? "":param.get("valueFlag").toString();
-            List<String> rows = meterWorkRailwayActualService.distinctCarNo(railwayTypeNo, lcNo, railwayNo, startTime, endTime, dataSource,valueFlag);
+            List<String> rows = meterWorkRailwayActualService.distinctRailwayNo(railwayTypeNo, lcNo, railwayNo, startTime, endTime, baseSpotName,matterName,predictionNo,valueFlag);
             return success(rows);
         } catch (MarkerMetException e) {
             e.printStackTrace();
@@ -165,17 +170,15 @@ public class MeterWorkRailwayActualController extends BaseRESTfulController {
         return rm;
     }
 
-    @ApiOperation(value = "一次数据维护-网页", notes = "根据传入时间查询去重列次编号")
-    @PostMapping(value = "/distinctRailwayNo")
-    public RESTfulResult distinctRailwayNo(@RequestBody HashMap param) {
+    @ApiOperation(value = "洁净数据维护-网页", notes = "根据传入时间查询去重列次编号")
+    @PostMapping(value = "/distinctLcNo")
+    public RESTfulResult distinctLcNo(@RequestBody HashMap param) {
         RESTfulResult rm = failed();
         try {
             String railwayTypeNo = param.get("railwayTypeNo") == null ? "":param.get("railwayTypeNo").toString();
-            String railwayNo = param.get("railwayNo") == null ? "": param.get("railwayNo").toString();
             String startTime = param.get("startTime") == null ? "":param.get("startTime").toString();
             String endTime = param.get("endTime") == null ? "":param.get("endTime").toString();
-            String dataSource = param.get("dataSource") == null ? "":param.get("dataSource").toString();
-            List<String> rows = meterWorkRailwayActualService.distinctRailwayNo(railwayTypeNo, railwayNo, startTime, endTime, dataSource);
+            List<String> rows = meterWorkRailwayActualService.distinctLcNo(railwayTypeNo, startTime, endTime);
             return success(rows);
         } catch (MarkerMetException e) {
             e.printStackTrace();
@@ -190,6 +193,28 @@ public class MeterWorkRailwayActualController extends BaseRESTfulController {
         return rm;
     }
 
+    @ApiOperation(value = "一次数据维护-查询车次车号", notes = "根据传入时间、火车号、计量站点、物料名称、委托号、数据状态、发货单位和收货单位查询去重车次车号")
+    @PostMapping(value = "/distinctLcNoAndRailwayNo")
+    public RESTfulResult distinctLcNoAndRailwayNo(@RequestBody HashMap param) {
+        RESTfulResult rm = failed();
+        try {
+            String railwayTypeNo = param.get("railwayTypeNo") == null ? "":param.get("railwayTypeNo").toString();
+            String startTime = param.get("startTime") == null ? "":param.get("startTime").toString();
+            String endTime = param.get("endTime") == null ? "":param.get("endTime").toString();
+            String railwayNo = param.get("railwayNo") == null ? "":param.get("railwayNo").toString();
+            String baseSpotName = param.get("baseSpotName") == null ? "": param.get("baseSpotName").toString();
+            String matterName = param.get("matterName") == null ? "": param.get("matterName").toString();
+            String predictionNo = param.get("predictionNo") == null ? "": param.get("predictionNo").toString();
+            String valueFlag = param.get("valueFlag") == null ? "":param.get("valueFlag").toString();
+            rm = meterWorkRailwayActualService.distinctLcNoAndRailwayNo(railwayTypeNo, startTime, endTime, railwayNo, baseSpotName, matterName,predictionNo, valueFlag);
+            return rm;
+        }catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!>>>" + e.getMessage());
+        }
+        return rm;
+    }
+
     @ApiOperation(value = "更新详细信息", notes = "根据url的id来指定更新对象,并根据传过来的meterWorkRailwayActual信息来更新详细信息")
     @ApiImplicitParams({
             @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
@@ -528,7 +553,7 @@ public class MeterWorkRailwayActualController extends BaseRESTfulController {
 
     @ApiOperation(value = "WF获取列表动轨")
     @GetMapping(value = "/doQueryActWf")
-    public RESTfulResult doQueryActWf(HashMap parmas, Integer pageNum, Integer pageSize) {
+    public RESTfulResult doQueryActWf(@RequestParam HashMap parmas, Integer pageNum, Integer pageSize) {
         try {
             PageList<MeterWorkRailwayActual> list = meterWorkRailwayActualService.doQueryActWf(parmas, pageNum, pageSize);
             return success(list);
@@ -691,4 +716,85 @@ public class MeterWorkRailwayActualController extends BaseRESTfulController {
         }
         return rm;
     }
+
+    @ApiOperation(value = "轨道衡衡净重数据补录", notes = "根据MeterWorkRailwayActual对象创建")
+    @PostMapping(value = "/supplementaryData")
+    public RESTfulResult supplementaryData(@RequestBody HashMap map) {
+        RESTfulResult rm = failed();
+        try {
+            SimpleDateFormat simpleFormat = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
+            String grossTimeTemp = map.get("grossTime").toString().replaceAll("-", "/");
+            String tareTimeTemp = map.get("tareTime").toString().replaceAll("-", "/");
+            String netTimeTemp = map.get("netTime").toString().replaceAll("-", "/");
+
+            Date grossTime = simpleFormat.parse(grossTimeTemp);
+            Date tareTime = simpleFormat.parse(tareTimeTemp);
+            Date netTime = simpleFormat.parse(netTimeTemp);
+
+            MeterWorkRailwayActual model = new MeterWorkRailwayActual();
+            model.setPredictionNo(map.get("predictionNo").toString());
+            model.setBaseSpot1No(map.get("baseSpot1No").toString());
+            model.setBaseSpot1Name(map.get("baseSpot1Name").toString());
+            model.setGrossManNo(map.get("grossManNo").toString());
+            model.setGrossManName(map.get("grossManName").toString());
+            model.setGrossTime(grossTime);
+            model.setTareTime(tareTime);
+            model.setNetTime(netTime);
+            model.setBaseSpot2No(map.get("baseSpot2No").toString());
+            model.setBaseSpot2Name(map.get("baseSpot2Name").toString());
+            model.setRailwayNo(map.get("railwayNo").toString());
+            model.setGrossWeight(new BigDecimal(map.get("grossWeight").toString()));
+            model.setTareWeight(new BigDecimal(map.get("tareWeight").toString()));
+            model.setRailwayTypeNo(map.get("railwayTypeNo").toString());
+            model.setRailwayTypeName(map.get("railwayTypeName").toString());
+            rm = meterWorkRailwayActualService.supplementaryData(model);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "根据实绩id获取一次计量信息和委托信息", notes = "根据实绩id获取一次计量信息和委托信息")
+    @PostMapping(value = "/firstAndEntrustById")
+    public RESTfulResult firstAndEntrustById(@RequestBody HashMap params) {
+        RESTfulResult rm = failed();
+        try {
+            String actualNo = params.get("actualNo") == null ? "" : params.get("actualNo").toString();
+            rm = meterWorkRailwayActualService.firstAndEntrustById(actualNo);
+            if (rm.getData() != null) {
+                return rm;
+            }
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value = "特殊委托解除洁净", notes = "将洁净后的数据进行还原")
+    @PostMapping(value = "/specialRemove")
+    public RESTfulResult specialRemove(@RequestBody HashMap params) {
+        RESTfulResult rm = failed();
+        try {
+            rm = meterWorkRailwayActualService.specialRemove(params);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        }
+        return rm;
+    }
 }

+ 6 - 7
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/mapper/MeterWorkRailwayActualMapper.java

@@ -39,16 +39,15 @@ public interface MeterWorkRailwayActualMapper extends IBaseMapper<MeterWorkRailw
      * */
     MeterWorkRailwayActual cleanPredcition(@feign.Param(value = "actualNo") String actualNo);
 
-    /**
-     * 根据传入时间和车号,查询给定时间段去重车号
-     * @param obj
-     * @return
-     */
-    List<MeterWorkRailwayActual> distinctCarNo(HashMap<String, Object> obj);
-
     List<MeterWorkRailwayActual> distinctRailwayNo(HashMap<String, Object> obj);
+    List<MeterWorkRailwayActual> distinctLcNo(HashMap<String, Object> obj);
 
     double getGrossAvg(HashMap actual);
 
     MeterWorkRailwayActual selectActual(String actualFirstNo);
+
+    List<MeterWorkRailwayActual> selectByParameter(Map<String, Object> params);
+    List<MeterWorkRailwayActual> likeByDesc(Map<String, Object> params);
+
+    List<MeterWorkRailwayActual> selectByAcatualFristNo(Map<String, Object> params);
 }

+ 159 - 22
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/mapper/MeterWorkRailwayActualMapper.xml

@@ -105,6 +105,10 @@
     <result column="NOTE" jdbcType="VARCHAR" property="note" />
     <result column="IS_PRE_SACALE" jdbcType="VARCHAR" property="isPreSacale" />
     <result column="LC_NO" jdbcType="VARCHAR" property="lcNo" />
+    <result column="PREDICTION_TYPE" jdbcType="VARCHAR" property="predictionType" />
+    <result column="PREDICTION_COMBINATION" jdbcType="VARCHAR" property="predictionCombination" />
+    <result column="BOUND_LIST_URL" jdbcType="VARCHAR" property="boundListUrl" />
+    <result column="IS_BOUND_LIST" jdbcType="VARCHAR" property="isBoundList" />
   </resultMap>
   <sql id="columns">
     ACTUAL_NO, PREDICTION_NO, NOTICE_NO, RAILWAY_NO, RAILWAY_CARRIAGE_NO, MATTER_NO, 
@@ -124,7 +128,8 @@
     GROUP_PACKAGE_AMOUNT, GROUP_PACKAGE_UNIT, PACKAGE_AMOUNT, PACKAGE_UNIT, THEORY_AMOUNT, 
     MEASURE_BATCH, MEASURE_BATCH_COUNT, SENDER_TYPE, SENDER_REMARK, RECEIVER_TYPE, RECEIVER_REMARK, 
     AMOUNT_UNIT, MEASURE_OBJECT_TYPE, MEASURE_TASK_NUM, BILL_TYPE, CREATE_MAN_NAME, CREATE_TIME, 
-    DATA_SOURCE, NOTE, IS_PRE_SACALE, LC_NO
+    DATA_SOURCE, NOTE, IS_PRE_SACALE, LC_NO, PREDICTION_TYPE, PREDICTION_COMBINATION, 
+    BOUND_LIST_URL, IS_BOUND_LIST
   </sql>
   <sql id="columns_alias">
     t.ACTUAL_NO, t.PREDICTION_NO, t.NOTICE_NO, t.RAILWAY_NO, t.RAILWAY_CARRIAGE_NO, t.MATTER_NO, 
@@ -146,7 +151,8 @@
     t.PACKAGE_UNIT, t.THEORY_AMOUNT, t.MEASURE_BATCH, t.MEASURE_BATCH_COUNT, t.SENDER_TYPE, 
     t.SENDER_REMARK, t.RECEIVER_TYPE, t.RECEIVER_REMARK, t.AMOUNT_UNIT, t.MEASURE_OBJECT_TYPE, 
     t.MEASURE_TASK_NUM, t.BILL_TYPE, t.CREATE_MAN_NAME, t.CREATE_TIME, t.DATA_SOURCE, 
-    t.NOTE, t.IS_PRE_SACALE, t.LC_NO
+    t.NOTE, t.IS_PRE_SACALE, t.LC_NO, t.PREDICTION_TYPE, t.PREDICTION_COMBINATION, t.BOUND_LIST_URL, 
+    t.IS_BOUND_LIST
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM METER_WORK_RAILWAY_ACTUAL
@@ -465,6 +471,18 @@
       <if test="lcNo != null and lcNo != ''">
         and LC_NO = #{lcNo}
       </if>
+      <if test="predictionType != null and predictionType != ''">
+        and PREDICTION_TYPE = #{predictionType}
+      </if>
+      <if test="predictionCombination != null and predictionCombination != ''">
+        and PREDICTION_COMBINATION = #{predictionCombination}
+      </if>
+      <if test="boundListUrl != null and boundListUrl != ''">
+        and BOUND_LIST_URL = #{boundListUrl}
+      </if>
+      <if test="isBoundList != null and isBoundList != ''">
+        and IS_BOUND_LIST = #{isBoundList}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -778,6 +796,18 @@
       <if test="lcNo != null and lcNo != ''">
         and LC_NO LIKE '%${lcNo}%'
       </if>
+      <if test="predictionType != null and predictionType != ''">
+        and PREDICTION_TYPE LIKE '%${predictionType}%'
+      </if>
+      <if test="predictionCombination != null and predictionCombination != ''">
+        and PREDICTION_COMBINATION LIKE '%${predictionCombination}%'
+      </if>
+      <if test="boundListUrl != null and boundListUrl != ''">
+        and BOUND_LIST_URL LIKE '%${boundListUrl}%'
+      </if>
+      <if test="isBoundList != null and isBoundList != ''">
+        and IS_BOUND_LIST LIKE '%${isBoundList}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -1093,6 +1123,18 @@
       <if test="lcNo != null and lcNo != ''">
         or LC_NO = #{lcNo}
       </if>
+      <if test="predictionType != null and predictionType != ''">
+        or PREDICTION_TYPE = #{predictionType}
+      </if>
+      <if test="predictionCombination != null and predictionCombination != ''">
+        or PREDICTION_COMBINATION = #{predictionCombination}
+      </if>
+      <if test="boundListUrl != null and boundListUrl != ''">
+        or BOUND_LIST_URL = #{boundListUrl}
+      </if>
+      <if test="isBoundList != null and isBoundList != ''">
+        or IS_BOUND_LIST = #{isBoundList}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual">
     insert into METER_WORK_RAILWAY_ACTUAL (ACTUAL_NO, PREDICTION_NO, NOTICE_NO, 
@@ -1129,8 +1171,9 @@
       RECEIVER_TYPE, RECEIVER_REMARK, AMOUNT_UNIT, 
       MEASURE_OBJECT_TYPE, MEASURE_TASK_NUM, BILL_TYPE, 
       CREATE_MAN_NAME, CREATE_TIME, DATA_SOURCE, 
-      NOTE, IS_PRE_SACALE, LC_NO
-      )
+      NOTE, IS_PRE_SACALE, LC_NO, 
+      PREDICTION_TYPE, PREDICTION_COMBINATION, 
+      BOUND_LIST_URL, IS_BOUND_LIST)
     values (#{actualNo,jdbcType=VARCHAR}, #{predictionNo,jdbcType=VARCHAR}, #{noticeNo,jdbcType=VARCHAR}, 
       #{railwayNo,jdbcType=VARCHAR}, #{railwayCarriageNo,jdbcType=VARCHAR}, #{matterNo,jdbcType=VARCHAR}, 
       #{matterName,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR}, #{batchNo,jdbcType=VARCHAR}, 
@@ -1165,8 +1208,9 @@
       #{receiverType,jdbcType=VARCHAR}, #{receiverRemark,jdbcType=VARCHAR}, #{amountUnit,jdbcType=VARCHAR}, 
       #{measureObjectType,jdbcType=VARCHAR}, #{measureTaskNum,jdbcType=VARCHAR}, #{billType,jdbcType=VARCHAR}, 
       #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{dataSource,jdbcType=VARCHAR}, 
-      #{note,jdbcType=VARCHAR}, #{isPreSacale,jdbcType=VARCHAR}, #{lcNo,jdbcType=VARCHAR}
-      )
+      #{note,jdbcType=VARCHAR}, #{isPreSacale,jdbcType=VARCHAR}, #{lcNo,jdbcType=VARCHAR}, 
+      #{predictionType,jdbcType=VARCHAR}, #{predictionCombination,jdbcType=VARCHAR}, 
+      #{boundListUrl,jdbcType=VARCHAR}, #{isBoundList,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual">
     insert into METER_WORK_RAILWAY_ACTUAL
@@ -1480,6 +1524,18 @@
       <if test="lcNo != null">
         LC_NO,
       </if>
+      <if test="predictionType != null">
+        PREDICTION_TYPE,
+      </if>
+      <if test="predictionCombination != null">
+        PREDICTION_COMBINATION,
+      </if>
+      <if test="boundListUrl != null">
+        BOUND_LIST_URL,
+      </if>
+      <if test="isBoundList != null">
+        IS_BOUND_LIST,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="actualNo != null">
@@ -1791,6 +1847,18 @@
       <if test="lcNo != null">
         #{lcNo,jdbcType=VARCHAR},
       </if>
+      <if test="predictionType != null">
+        #{predictionType,jdbcType=VARCHAR},
+      </if>
+      <if test="predictionCombination != null">
+        #{predictionCombination,jdbcType=VARCHAR},
+      </if>
+      <if test="boundListUrl != null">
+        #{boundListUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="isBoundList != null">
+        #{isBoundList,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual">
@@ -1896,7 +1964,11 @@
       DATA_SOURCE = #{dataSource,jdbcType=VARCHAR},
       NOTE = #{note,jdbcType=VARCHAR},
       IS_PRE_SACALE = #{isPreSacale,jdbcType=VARCHAR},
-      LC_NO = #{lcNo,jdbcType=VARCHAR}
+      LC_NO = #{lcNo,jdbcType=VARCHAR},
+      PREDICTION_TYPE = #{predictionType,jdbcType=VARCHAR},
+      PREDICTION_COMBINATION = #{predictionCombination,jdbcType=VARCHAR},
+      BOUND_LIST_URL = #{boundListUrl,jdbcType=VARCHAR},
+      IS_BOUND_LIST = #{isBoundList,jdbcType=VARCHAR}
     where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual">
@@ -2208,6 +2280,18 @@
       <if test="lcNo != null">
         LC_NO = #{lcNo,jdbcType=VARCHAR},
       </if>
+      <if test="predictionType != null">
+        PREDICTION_TYPE = #{predictionType,jdbcType=VARCHAR},
+      </if>
+      <if test="predictionCombination != null">
+        PREDICTION_COMBINATION = #{predictionCombination,jdbcType=VARCHAR},
+      </if>
+      <if test="boundListUrl != null">
+        BOUND_LIST_URL = #{boundListUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="isBoundList != null">
+        IS_BOUND_LIST = #{isBoundList,jdbcType=VARCHAR},
+      </if>
     </set>
     where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
   </update>
@@ -2263,7 +2347,9 @@
       RECEIVER_REMARK, AMOUNT_UNIT, MEASURE_OBJECT_TYPE, 
       MEASURE_TASK_NUM, BILL_TYPE, CREATE_MAN_NAME, 
       CREATE_TIME, DATA_SOURCE, NOTE, 
-      IS_PRE_SACALE, LC_NO)
+      IS_PRE_SACALE, LC_NO, PREDICTION_TYPE, 
+      PREDICTION_COMBINATION, BOUND_LIST_URL, 
+      IS_BOUND_LIST)
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.actualNo,jdbcType=VARCHAR}, 
@@ -2304,7 +2390,9 @@
       #{item.receiverRemark,jdbcType=VARCHAR}, #{item.amountUnit,jdbcType=VARCHAR}, #{item.measureObjectType,jdbcType=VARCHAR}, 
       #{item.measureTaskNum,jdbcType=VARCHAR}, #{item.billType,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, 
       #{item.createTime,jdbcType=TIMESTAMP}, #{item.dataSource,jdbcType=VARCHAR}, #{item.note,jdbcType=VARCHAR}, 
-      #{item.isPreSacale,jdbcType=VARCHAR}, #{item.lcNo,jdbcType=VARCHAR} from dual  
+      #{item.isPreSacale,jdbcType=VARCHAR}, #{item.lcNo,jdbcType=VARCHAR}, #{item.predictionType,jdbcType=VARCHAR}, 
+      #{item.predictionCombination,jdbcType=VARCHAR}, #{item.boundListUrl,jdbcType=VARCHAR}, 
+      #{item.isBoundList,jdbcType=VARCHAR} from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
@@ -2722,6 +2810,22 @@
        <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.lcNo,jdbcType=VARCHAR}
        </foreach>
+       ,PREDICTION_TYPE=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.predictionType,jdbcType=VARCHAR}
+       </foreach>
+       ,PREDICTION_COMBINATION=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.predictionCombination,jdbcType=VARCHAR}
+       </foreach>
+       ,BOUND_LIST_URL=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.boundListUrl,jdbcType=VARCHAR}
+       </foreach>
+       ,IS_BOUND_LIST=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.isBoundList,jdbcType=VARCHAR}
+       </foreach>
      where ACTUAL_NO in 
      <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.actualNo,jdbcType=VARCHAR}
@@ -3570,7 +3674,7 @@
   </select>
 
   <!-- 查询:根据传入时间和车号,查询给定时间段去重车号 -->
-  <select id="distinctCarNo" parameterType="java.lang.String" resultMap="BaseResultMap">
+  <select id="distinctRailwayNo" parameterType="java.lang.String" resultMap="BaseResultMap">
     SELECT distinct RAILWAY_NO
     from METER_WORK_RAILWAY_ACTUAL
     where 1=1
@@ -3585,34 +3689,49 @@
       and lc_No like '%${lcNo}%'
     </if>
     <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
-      and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+      and  net_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and net_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
+    <if test="baseSpotName != null and baseSpotName != ''">
+      and  base_spot_name = #{baseSpotName}
+    </if>
+    <if test="matterName != null and matterName != ''">
+      and  matter_name = #{matterName}
     </if>
-    <if test="dataSource != null and dataSource != ''">
-      and  data_source = '${dataSource}'
+    <if test="predictionNo != null and predictionNo != ''">
+      and  prediction_no =  #{predictionNo}
     </if>
     <if test="railwayNo != null and railwayNo != ''">
       and  RAILWAY_NO like '%${railwayNo}%'
     </if>
   </select>
 
-  <select id="distinctRailwayNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    SELECT distinct LC_NO
+
+  <select id="distinctLcNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    SELECT distinct LC_NO, railway_no
     from METER_WORK_RAILWAY_ACTUAL
     where 1=1
-    <!--and RAILWAY_NO like '%${railwayNo}%'-->
     <if test="railwayTypeNo != null and railwayTypeNo != ''">
       and  RAILWAY_TYPE_NO = #{railwayTypeNo}
     </if>
+    <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+      and  net_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and net_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
     <if test="railwayNo != null and railwayNo != ''">
-      and  RAILWAY_NO like '%${railwayNo}%'
+      and  railway_no like  '%${railwayNo}%'
     </if>
-    <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
-      and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    <if test="baseSpotName != null and baseSpotName != ''">
+      and  base_spot_name = #{baseSpotName}
     </if>
-    <if test="dataSource != null and dataSource != ''">
-      and  data_source = '${dataSource}'
+    <if test="matterName != null and matterName != ''">
+      and  matter_name = #{matterName}
     </if>
-    and lc_no is not null
+    <if test="predictionNo != null and predictionNo != ''">
+      and  prediction_no =  #{predictionNo}
+    </if>
+    <if test="valueFlag != null and valueFlag != ''">
+      and  value_flag = #{valueFlag}
+    </if>
+      and lc_no is not null
   </select>
 
   <select id="selectActual" parameterType="java.lang.String" resultMap="BaseResultMap">
@@ -3620,4 +3739,22 @@
     from METER_WORK_RAILWAY_ACTUAL
     where ACTUAL_FIRST1_NO = #{actualFirstNo} or ACTUAL_FIRST2_NO = #{actualFirstNo}
   </select>
+
+  <select id="selectByParameter" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="where" />
+    order by net_time desc
+  </select>
+
+  <select id="likeByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="whereLike" />
+    order by net_time desc
+  </select>
+  <select id="selectByAcatualFristNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    where
+      actual_first1_no = #{actualFirstNo} or
+      actual_first2_no = #{actualFirstNo}
+  </select>
 </mapper>

+ 61 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/model/MeterWorkRailwayActual.java

@@ -3,6 +3,7 @@ package com.steerinfo.meterwork.meterworkrailwayactual.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
@@ -626,6 +627,30 @@ public class MeterWorkRailwayActual implements IBasePO<String> {
     @ApiModelProperty(value="列次编号",required=false)
     private String lcNo;
 
+    /**
+     * 委托类型(0:批次预报;1:单次预报;2:联运预报;3:分检预报、5:双委托、6:混卸、7:混装)(PREDICTION_TYPE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="委托类型(0:批次预报;1:单次预报;2:联运预报;3:分检预报、5:双委托、6:混卸、7:混装)",required=false)
+    private String predictionType;
+
+    /**
+     * 委托组合(PREDICTION_COMBINATION,VARCHAR,40)
+     */
+    @ApiModelProperty(value="委托组合",required=false)
+    private String predictionCombination;
+
+    /**
+     * 电子磅单地址(BOUND_LIST_URL,VARCHAR,100)
+     */
+    @ApiModelProperty(value="电子磅单地址",required=false)
+    private String boundListUrl;
+
+    /**
+     * 是否生成电子磅单标识(0:未生成, 1:已生成)(IS_BOUND_LIST,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否生成电子磅单标识(0:未生成, 1:已生成)",required=false)
+    private String isBoundList;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -1462,6 +1487,38 @@ public class MeterWorkRailwayActual implements IBasePO<String> {
         this.lcNo = lcNo == null ? null : lcNo.trim();
     }
 
+    public String getPredictionType() {
+        return predictionType;
+    }
+
+    public void setPredictionType(String predictionType) {
+        this.predictionType = predictionType == null ? null : predictionType.trim();
+    }
+
+    public String getPredictionCombination() {
+        return predictionCombination;
+    }
+
+    public void setPredictionCombination(String predictionCombination) {
+        this.predictionCombination = predictionCombination == null ? null : predictionCombination.trim();
+    }
+
+    public String getBoundListUrl() {
+        return boundListUrl;
+    }
+
+    public void setBoundListUrl(String boundListUrl) {
+        this.boundListUrl = boundListUrl == null ? null : boundListUrl.trim();
+    }
+
+    public String getIsBoundList() {
+        return isBoundList;
+    }
+
+    public void setIsBoundList(String isBoundList) {
+        this.isBoundList = isBoundList == null ? null : isBoundList.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -1571,6 +1628,10 @@ public class MeterWorkRailwayActual implements IBasePO<String> {
         sb.append(", note=").append(note);
         sb.append(", isPreSacale=").append(isPreSacale);
         sb.append(", lcNo=").append(lcNo);
+        sb.append(", predictionType=").append(predictionType);
+        sb.append(", predictionCombination=").append(predictionCombination);
+        sb.append(", boundListUrl=").append(boundListUrl);
+        sb.append(", isBoundList=").append(isBoundList);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 12 - 4
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/IMeterWorkRailwayActualService.java

@@ -11,6 +11,7 @@ import com.steerinfo.util.CommonPage;
 
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * MeterWorkRailwayActual服务接口:
@@ -49,10 +50,9 @@ public interface IMeterWorkRailwayActualService extends IBaseService<MeterWorkRa
 
     int addData(MeterWorkRailwayActual model);
 
-    List<String> distinctCarNo(String railwayTypeNo, String lcNo, String railwayNo, String startTime, String endTime, String dataSource, String valueFlag);
-
-    List<String> distinctRailwayNo(String railwayTypeNo, String railwayNo, String startTime, String endTime, String dataSource);
-
+    List<String> distinctRailwayNo(String railwayTypeNo, String lcNo, String railwayNo, String startTime, String endTime,String baseSpotName,String matterName,String predictionNo, String valueFlag);
+    List<String> distinctLcNo(String railwayTypeNo, String startTime, String endTime);
+    RESTfulResult distinctLcNoAndRailwayNo(String railwayTypeNo, String startTime, String endTime, String railwayNo, String baseSpotName, String matterName, String predictionNo, String valueFlag);
 
     PageList<MeterWorkRailwayActual> selectView(HashMap parmas, Integer pageNum, Integer pageSize);
 
@@ -79,4 +79,12 @@ public interface IMeterWorkRailwayActualService extends IBaseService<MeterWorkRa
     double getGrossAvg(HashMap actual);
 
     int checkandadditional(MeterWorkRailwayActual model);
+
+    RESTfulResult supplementaryData(MeterWorkRailwayActual model);
+    //根据实绩id获取一次计量信息和委托信息
+    RESTfulResult firstAndEntrustById(String actualNo);
+
+    RESTfulResult specialRemove(HashMap map);
+
+    PageList<MeterWorkRailwayActual> likeByDesc(Map<String, Object> parameters, Integer pageNum, Integer pageSize);
 }

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

@@ -332,7 +332,6 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                 rm.setMessage("请选择有效的一次计量数据进行结净");
                 return rm;
             }else{
-
                 if(actFirst01.getMeterWeight().compareTo(actFirst02.getMeterWeight()) == -1){    //A小于B, 置换,始终保证A>B
                     MeterWorkRailwayActFirst tempModel = new MeterWorkRailwayActFirst();
                     BeanUtils.copyProperties(actFirst01, tempModel);
@@ -367,6 +366,7 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                 actualRow.setNetWeight(actFirst01.getMeterWeight().subtract(actFirst02.getMeterWeight()));
                 actualRow.setUploadFlag("1");
                 actualRow.setNote(Notes);
+                actualRow.setLcNo(actFirst01.getLcNo());
 
                 meterWorkRailwayActualMapper.insertSelective(actualRow);
                 rm.setSucceed();
@@ -387,9 +387,15 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
             throw new MarkerMetException(500, "委托编号不能为空");
         }
         MeterWorkRailwayActual queryrow = meterWorkRailwayActualMapper.selectByPrimaryKey(actualNo);
+        if (queryrow != null) {
+            if(com.steerinfo.util.StringUtils.isEmpty(queryrow.getIsPreSacale())){
+                queryrow.setIsPreSacale("0");
+            }
+        }
+
         if (queryrow == null) {
             throw new MarkerMetException(500, "不存在对应的洁净数据");
-        } else if (!queryrow.getValueFlag().equals("3") || queryrow.getPredictionNo() != null || "".equals(queryrow.getPredictionNo())) {
+        } else if (!queryrow.getIsPreSacale().equals("0") && queryrow.getPredictionNo() != null) {
             throw new MarkerMetException(500, "只有未匹配的净重数据才能进行委托匹配操作");
         }
         PreRailwayScale prerow = preRailwayScaleMapper.selectByPrimaryKey(predictionNo);
@@ -434,6 +440,8 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
 
         MeterWorkRailwayActual mwca = meterWorkRailwayActualMapper.mathPredcition(actualNo, predictionNo);
         mwca.setValueFlag("1");
+        mwca.setIsPreSacale("1");
+        mwca.setPredictionType("1");
         mwca.setUploadFlag("1");
 //        mwca.setNote(note); 添加修改原因记录
         meterWorkRailwayActualMapper.updateByPrimaryKey(mwca);
@@ -636,28 +644,28 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public List<String> distinctCarNo(String railwayTypeNo, String lcNo, String railwayNo, String startTime, String endTime, String dataSource, String valueFlag) {
+    public List<String> distinctRailwayNo(String railwayTypeNo, String lcNo, String railwayNo, String startTime, String endTime,String baseSpotName,String matterName,String predictionNo, String valueFlag) {
         HashMap<String, Object> obj = new HashMap<>();
         obj.put("railwayTypeNo", railwayTypeNo);
         obj.put("railwayNo", railwayNo);
         obj.put("lcNo", lcNo);
         obj.put("startTime", startTime);
         obj.put("endTime", endTime);
-        obj.put("dataSource", dataSource);
+        obj.put("baseSpotName", baseSpotName);
+        obj.put("matterName", matterName);
+        obj.put("predictionNo", predictionNo);
         obj.put("valueFlag", valueFlag);
-        List<String> list = meterWorkRailwayActualMapper.distinctCarNo(obj).stream().map(MeterWorkRailwayActual::getRailwayNo).collect(Collectors.toList());
+        List<String> list = meterWorkRailwayActualMapper.distinctRailwayNo(obj).stream().map(MeterWorkRailwayActual::getRailwayNo).collect(Collectors.toList());
         return list;
     }
 
     @Override
-    public List<String> distinctRailwayNo(String railwayTypeNo, String railwayNo, String startTime, String endTime, String dataSource) {
+    public List<String> distinctLcNo(String railwayTypeNo, String startTime, String endTime) {
         HashMap<String, Object> obj = new HashMap<>();
         obj.put("railwayTypeNo", railwayTypeNo);
-        obj.put("railwayNo", railwayNo);
         obj.put("startTime", startTime);
         obj.put("endTime", endTime);
-        obj.put("dataSource", dataSource);
-        List<MeterWorkRailwayActual> templist = meterWorkRailwayActualMapper.distinctRailwayNo(obj);
+        List<MeterWorkRailwayActual> templist = meterWorkRailwayActualMapper.distinctLcNo(obj);
         List<String> list = null;
         if(templist.size() != 0)
         {
@@ -666,6 +674,43 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
         return list;
     }
 
+    @Override
+    public RESTfulResult distinctLcNoAndRailwayNo(String railwayTypeNo, String startTime, String endTime, String railwayNo, String baseSpotName, String matterName, String predictionNo, String valueFlag) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+        try{
+            HashMap<String, Object> param = new HashMap<>();
+            HashMap<String, Object> obj = new HashMap<>();
+            obj.put("railwayTypeNo", railwayTypeNo);
+            obj.put("startTime", startTime);
+            obj.put("endTime", endTime);
+            obj.put("railwayNo", railwayNo);
+            obj.put("baseSpotName", baseSpotName);
+            obj.put("matterName", matterName);
+            obj.put("predictionNo", predictionNo);
+            obj.put("valueFlag", valueFlag);
+
+            List<MeterWorkRailwayActual> tempList = meterWorkRailwayActualMapper.distinctLcNo(obj);
+            List<String> list = null;
+            List<String> railwayNum = null;
+            if(tempList.size() != 0)
+            {
+                list = tempList.stream().map(MeterWorkRailwayActual::getLcNo).distinct().collect(Collectors.toList());
+                railwayNum = tempList.stream().map(MeterWorkRailwayActual::getRailwayNo).distinct().collect(Collectors.toList());
+            }
+            param.put("LcList", list);
+            param.put("railwayNoList", railwayNum);
+            rm.setSucceed();
+            rm.setCode("200");
+            rm.setMessage("操作成功!!");
+            rm.setData(param);
+        }catch(Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常!!>>" + e.getMessage());
+        }
+        return rm;
+    }
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public int removeDt(List<MeterWorkRailwayActual> models) throws MarkerMetException {
@@ -969,7 +1014,7 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
     //动轨获取数据(需要将kg转化为T)
     public PageList<MeterWorkRailwayActual> doQueryActWf(HashMap parmas, Integer pageNum, Integer pageSize) {
         PageHelper.startPage(pageNum, pageSize);
-        List<MeterWorkRailwayActual> rows = this.getMapper().selectByParameters(parmas);
+        List<MeterWorkRailwayActual> rows = meterWorkRailwayActualMapper.selectByParameter(parmas);
         for (MeterWorkRailwayActual row : rows) {
             if (row.getNetWeight() != null) {
                 row.setNetWeight(row.getNetWeight().divide(new BigDecimal(1000)));
@@ -1527,4 +1572,451 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
             return -1;
         }
     }
+
+    @Override
+    public RESTfulResult supplementaryData(MeterWorkRailwayActual model) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+
+        try{
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String afl = sdf.format(new Date());
+            MeterWorkRailwayActFirst mwcaf1 = new MeterWorkRailwayActFirst();
+            MeterWorkRailwayActFirst mwcaf2 = new MeterWorkRailwayActFirst();
+            MeterWorkRailwayActual actualRow = new MeterWorkRailwayActual();
+            String predictionNo = model.getPredictionNo();
+
+            PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(predictionNo);
+            if(scale.getValueFlag().equals("2")) {
+                rm.setMessage("委托已匹配,请确认!!");
+                return rm;
+            }
+
+            /*UserPayload payload = UserPayload.getCurrUser();
+            String userId = payload.getId();
+            String userName = payload.getUserName();*/
+
+            //毛重
+            String actualFirstNo = sdf.format(new Date()) + meterWorkRailwayActFirstMapper.getNewID(afl);
+            mwcaf1.setActualFirstNo(actualFirstNo);
+            mwcaf1.setRailwayNo(model.getRailwayNo());
+            mwcaf1.setMeterWeight(model.getGrossWeight());
+            mwcaf1.setRailwayTypeNo(model.getRailwayTypeNo());
+            mwcaf1.setRailwayTypeName(model.getRailwayTypeName());
+            mwcaf1.setWeightType("0");
+            mwcaf1.setCreateManNo(model.getGrossManNo());
+            mwcaf1.setCreateManName(model.getGrossManName());
+            mwcaf1.setCreateTime(model.getGrossTime());
+            mwcaf1.setBaseSpotNo(model.getBaseSpot1No());
+            mwcaf1.setBaseSpotName(model.getBaseSpot1Name());
+            mwcaf1.setValueFlag("2");
+            mwcaf1.setCheckFlag("0");
+            mwcaf1.setDataSource("4");
+            mwcaf1.setMeterMode("3");
+            mwcaf1.setIsPreSacale("0");
+            meterWorkRailwayActFirstMapper.insertSelective(mwcaf1);
+            //皮重
+            String actualSecondNo = sdf.format(new Date()) + meterWorkRailwayActFirstMapper.getNewID(afl);
+            mwcaf2.setActualFirstNo(actualSecondNo);
+            mwcaf2.setRailwayNo(model.getRailwayNo());
+            mwcaf2.setMeterWeight(model.getTareWeight());
+            mwcaf2.setWeightType("1");
+            mwcaf2.setRailwayTypeNo(model.getRailwayTypeNo());
+            mwcaf2.setRailwayTypeName(model.getRailwayTypeName());
+            mwcaf2.setCreateManNo(model.getGrossManNo());
+            mwcaf2.setCreateManName(model.getGrossManName());
+            mwcaf2.setCreateTime(model.getTareTime());
+            mwcaf2.setBaseSpotNo(model.getBaseSpot2No());
+            mwcaf2.setBaseSpotName(model.getBaseSpot2Name());
+            mwcaf2.setValueFlag("2");
+            mwcaf2.setCheckFlag("0");
+            mwcaf2.setDataSource("4");
+            mwcaf2.setMeterMode("3");
+            mwcaf2.setIsPreSacale("0");
+            meterWorkRailwayActFirstMapper.insertSelective(mwcaf2);
+            //净重
+            if(com.steerinfo.util.StringUtils.isNotEmpty(predictionNo)){
+                //将委托中的编号和收发货的等数据拷贝进一次数据中
+                MeterWorkRailwayActFirst first1 = meterWorkRailwayActFirstMapper.selectAndMatch(actualFirstNo, predictionNo);
+                BeanUtils.copyProperties(first1,mwcaf1);
+                mwcaf1.setIsPreSacale("1");
+                meterWorkRailwayActFirstMapper.updateByPrimaryKey(mwcaf1);
+                MeterWorkRailwayActFirst first2 = meterWorkRailwayActFirstMapper.selectAndMatch(actualSecondNo, predictionNo);
+                BeanUtils.copyProperties(first2, mwcaf2);
+                mwcaf2.setIsPreSacale("1");
+                meterWorkRailwayActFirstMapper.updateByPrimaryKey(mwcaf2);
+                //更新预报数据
+
+                scale.setValueFlag(DbConstants.NET);
+                scale.setUpdateTime(new Date());
+                scale.setUpdateManNo("system");
+                scale.setUpdateManName("手动录入");
+                scale.setUploadFlag("1");
+                scale.setValueFlag("2");
+                preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
+                //将委托中的编号和收发货单位和一次数据等数据拷贝进结净数据中
+                MeterWorkRailwayActual mwca1 = meterWorkRailwayActualMapper.manualAddPre(actualFirstNo, actualSecondNo, predictionNo);
+                BeanUtils.copyProperties(mwca1, actualRow);
+
+            }else {
+                //将委托中的编号和收发货单位和一次数据等数据拷贝进结净数据中
+                MeterWorkRailwayActual mwca1 = meterWorkRailwayActualMapper.manualAdd(actualFirstNo, actualSecondNo);
+                BeanUtils.copyProperties(mwca1, actualRow);
+            }
+            String no = meterWorkRailwayActualMapper.getNewID(sdf.format(new Date()));
+            actualRow.setActualNo(sdf.format(new Date()) + no);
+            actualRow.setRailwayTypeNo(model.getRailwayTypeNo());
+            actualRow.setRailwayTypeName(model.getRailwayTypeName());
+            actualRow.setNetTime(model.getNetTime());
+            actualRow.setNetMode(DbConstants.TYPE);
+            actualRow.setNote("手动录入");
+            actualRow.setUploadFlag("1");
+            actualRow.setIsPreSacale("1");
+            actualRow.setValueFlag("1");
+            actualRow.setGrossMode("3");
+            actualRow.setTareMode("3");
+            actualRow.setCreateManName(model.getGrossManName());
+            actualRow.setCreateTime(new Date());
+            actualRow.setNetTime(model.getNetTime());
+            actualRow.setDataSource("4");
+            actualRow.setPredictionType("1");
+            actualRow.setUpdateManNo("system");
+            actualRow.setUpdateManName("手动录入");
+            actualRow.setUpdateTime(new Date());
+            actualRow.setPredictionNo(predictionNo);
+            actualRow.setNetWeight(mwcaf1.getMeterWeight().subtract(mwcaf2.getMeterWeight()));
+            meterWorkRailwayActualMapper.insertSelective(actualRow);
+            rm.setSucceed();
+            rm.setMessage("操作成功!!!");
+            rm.setCode("200");
+            return rm;
+        }catch(Exception e){
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!!");
+            return rm;
+        }
+    }
+
+    @Override
+    public RESTfulResult firstAndEntrustById(String actualNo) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setMessage("查询失败!");
+        rm.setFailed();
+
+        List<String> actualNoList = new ArrayList<>();
+        MeterWorkRailwayActual carActual = meterWorkRailwayActualMapper.selectByPrimaryKey(actualNo);
+        if(carActual != null) {
+            actualNoList.add(0, carActual.getActualFirst1No());
+            actualNoList.add(1, carActual.getActualFirst2No());
+            String entrust = carActual.getPredictionNo() == null ? "" : carActual.getPredictionNo();
+            List<MeterWorkRailwayActFirst> firstList = meterWorkRailwayActFirstMapper.selectById(actualNoList);
+            PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(entrust);
+            HashMap<String, Object> map = new HashMap<>();
+            map.put("firstList", firstList);
+            map.put("scale", scale);
+            rm.setData(map);
+            rm.setSucceed();
+            rm.setCode("200");
+            rm.setMessage("操作成功!!");
+            return rm;
+        }
+        return null;
+    }
+
+    @Override
+    public RESTfulResult specialRemove(HashMap params) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+        rm.setData(null);
+        rm.setCode("500");
+        String type = params.get("type") == null ? "" : params.get("type").toString();
+        MeterWorkRailwayActual actualModel01 = meterWorkRailwayActualMapper.selectByPrimaryKey(params.get("actualNo01").toString());
+        MeterWorkRailwayActual actualModel02 = meterWorkRailwayActualMapper.selectByPrimaryKey(params.get("actualNo02").toString());
+        if(actualModel01 == null || actualModel02 == null){
+            rm.setMessage("未找到一次计量数据,请确认!!!");
+            return rm;
+        }
+        List<MeterWorkRailwayActual> models = new ArrayList<MeterWorkRailwayActual>();
+        models.add(actualModel01);
+        models.add(actualModel02);
+
+        if(models == null || models.size() == 0) {
+            rm.setMessage("参数为空,请确认!!!");
+            return rm;
+        }
+        //models必须是2个,而且他们的预报组合号一致
+        if(models.size() != 2 && models.get(0).getPredictionCombination().equals(models.get(1).getPredictionCombination())){
+            rm.setMessage("必须选择两个预报组合号一致的洁净数据!!!");
+            return rm;
+        }
+
+        switch(type){
+            case "5": {
+                //类型为双委托类型
+                for (MeterWorkRailwayActual model: models) {
+                    if(!model.getPredictionType().equals("5")) {
+                        rm.setMessage("选中的计量数据当中有一条或多条不是双委托洁净数据,请确认!!");
+                        return rm;
+                    }
+                }
+                for (MeterWorkRailwayActual model: models) {
+                    //循环每一个洁净记录
+                    //判断委托是否为双委托组合的第二个委托,是:删除一次数据和洁净记录、否:修改一次记录、
+                    String combination = model.getPredictionCombination();
+                    String[] param = combination.split(",");
+
+                    if(model.getPredictionNo().equals(param[1])){
+                        // 改委托
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("双委托解除操作");
+                            preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        // 删一次
+                        MeterWorkRailwayActFirst firstGross = meterWorkRailwayActFirstMapper.selectByPrimaryKey(model.getActualFirst1No());
+                        MeterWorkRailwayActFirst firstTare = meterWorkRailwayActFirstMapper.selectByPrimaryKey(model.getActualFirst2No());
+                        if(firstGross.getPredictionNo().equals(model.getPredictionNo())){
+                            meterWorkRailwayActFirstMapper.deleteByPrimaryKey(model.getActualFirst1No());
+                        }
+                        if(firstTare.getPredictionNo().equals(model.getPredictionNo())){
+                            meterWorkRailwayActFirstMapper.deleteByPrimaryKey(model.getActualFirst2No());
+                        }
+
+                        // 删洁净
+                        meterWorkRailwayActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                    else {
+                        // 清空毛重数据中的委托信息
+                        MeterWorkRailwayActFirst mwcafg = meterWorkRailwayActFirstMapper.selectAndRemove(model.getActualFirst1No());
+                        if (mwcafg == null) {
+                            rm.setMessage("未查询到相应的毛重数据!!");
+                            return rm;
+                        }
+                        mwcafg.setValueFlag(DbConstants.VALID);
+                        mwcafg.setNote(model.getNote());
+                        mwcafg.setUpdateManName("system");
+                        mwcafg.setUpdateManName("双委托解除更新");
+                        mwcafg.setUpdateTime(new Date());
+                        mwcafg.setIsPreSacale("0");
+                        meterWorkRailwayActFirstMapper.updateByPrimaryKey(mwcafg);
+                        //皮重
+                        MeterWorkRailwayActFirst mwcaft = meterWorkRailwayActFirstMapper.selectAndRemove(model.getActualFirst2No());
+                        if (mwcaft == null) {
+                            rm.setMessage("未查询到相应的皮重数据!!");
+                            return rm;
+                        }
+                        mwcaft.setValueFlag(DbConstants.VALID);
+                        mwcaft.setUpdateManName("system");
+                        mwcaft.setUpdateManName("双委托解除更新");
+                        mwcaft.setNote(model.getNote());
+                        mwcaft.setUpdateTime(new Date());
+                        mwcaft.setIsPreSacale("0");
+                        meterWorkRailwayActFirstMapper.updateByPrimaryKey(mwcaft);
+                        //修改预报
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("双委托解除操作");
+                            preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        meterWorkRailwayActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                }
+                rm.setSucceed();
+                rm.setMessage("操作成功!!");
+                rm.setCode("200");
+            }
+            break;
+            case "6": {         //类型为混卸类型
+                for (MeterWorkRailwayActual model: models) {
+                    if(!model.getPredictionType().equals("6")) {
+                        rm.setMessage("选中的计量数据当中有一条或多条不是混卸委托洁净数据,请确认!!");
+                    }
+                }
+                for (MeterWorkRailwayActual model: models) {
+                    //循环每一个洁净记录
+                    //判断委托是否为双委托组合的第二个委托,是:删除一次数据和洁净记录、否:修改一次记录、
+                    String combination = model.getPredictionCombination();
+                    String[] param = combination.split(",");
+
+                    if(model.getPredictionNo().equals(param[0])){
+
+                        // 改委托
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("混卸解除操作");
+                            preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        // 删一次毛重、清空一次皮重委托信息
+                        MeterWorkRailwayActFirst firstTare = meterWorkRailwayActFirstMapper.selectByPrimaryKey(model.getActualFirst2No());
+                        MeterWorkRailwayActFirst firstGross = meterWorkRailwayActFirstMapper.selectAndRemove(model.getActualFirst1No());
+                        if(firstTare.getPredictionNo().equals(model.getPredictionNo())){
+                            meterWorkRailwayActFirstMapper.deleteByPrimaryKey(model.getActualFirst2No());
+                        }
+                        if(firstGross != null){
+                            firstGross.setValueFlag(DbConstants.VALID);
+                            firstGross.setUpdateManName("system");
+                            firstGross.setUpdateManName("混卸解除更新");
+                            firstGross.setNote(model.getNote());
+                            firstGross.setUpdateTime(new Date());
+                            firstGross.setIsPreSacale("0");
+                            meterWorkRailwayActFirstMapper.updateByPrimaryKey(firstGross);
+                        }
+                        // 删洁净
+                        meterWorkRailwayActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                    else {
+                        // 清空毛重数据中的委托信息
+                        MeterWorkRailwayActFirst mwcafg = meterWorkRailwayActFirstMapper.selectAndRemove(model.getActualFirst1No());
+                        if (mwcafg == null) {
+                            rm.setMessage("未查询到相应的毛重数据!!");
+                            return rm;
+                        }
+                        mwcafg.setValueFlag(DbConstants.VALID);
+                        mwcafg.setNote(model.getNote());
+                        mwcafg.setUpdateManName("system");
+                        mwcafg.setUpdateManName("混卸解除更新");
+                        mwcafg.setUpdateTime(new Date());
+                        mwcafg.setIsPreSacale("0");
+                        meterWorkRailwayActFirstMapper.updateByPrimaryKey(mwcafg);
+                        //皮重
+                        MeterWorkRailwayActFirst mwcaft = meterWorkRailwayActFirstMapper.selectAndRemove(model.getActualFirst2No());
+                        if (mwcaft == null) {
+                            rm.setMessage("未查询到相应的皮重数据!!");
+                            return rm;
+                        }
+                        mwcaft.setValueFlag(DbConstants.VALID);
+                        mwcaft.setUpdateManName("system");
+                        mwcaft.setUpdateManName("混卸解除更新");
+                        mwcaft.setNote(model.getNote());
+                        mwcaft.setUpdateTime(new Date());
+                        mwcaft.setIsPreSacale("0");
+                        meterWorkRailwayActFirstMapper.updateByPrimaryKey(mwcaft);
+                        //修改预报
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("混卸解除操作");
+                            preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        meterWorkRailwayActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                }
+                rm.setSucceed();
+                rm.setMessage("操作成功!!");
+                rm.setCode("200");
+            }
+            break;
+            case "7": {         //类型为混装类型
+                for (MeterWorkRailwayActual model: models) {
+                    if(!model.getPredictionType().equals("7")) {
+                        rm.setMessage("选中的计量数据当中有一条或多条不是混装委托洁净数据,请确认!!");
+                    }
+                }
+                for (MeterWorkRailwayActual model: models) {
+                    //循环每一个洁净记录
+                    //判断委托是否为双委托组合的第二个委托,是:删除一次数据和洁净记录、否:修改一次记录、
+                    String combination = model.getPredictionCombination();
+                    String[] param = combination.split(",");
+
+                    if(model.getPredictionNo().equals(param[0])){
+
+                        // 改委托
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("混装解除操作");
+                            preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        // 删一次毛重、清空一次皮重委托信息
+                        MeterWorkRailwayActFirst firstGross = meterWorkRailwayActFirstMapper.selectByPrimaryKey(model.getActualFirst1No());
+                        MeterWorkRailwayActFirst firstTare = meterWorkRailwayActFirstMapper.selectAndRemove(model.getActualFirst2No());
+                        if(firstGross.getPredictionNo().equals(model.getPredictionNo())){
+                            meterWorkRailwayActFirstMapper.deleteByPrimaryKey(model.getActualFirst1No());
+                        }
+                        if(firstTare != null){
+                            firstTare.setValueFlag(DbConstants.VALID);
+                            firstTare.setUpdateManName("system");
+                            firstTare.setUpdateManName("混装解除更新");
+                            firstTare.setNote(model.getNote());
+                            firstTare.setUpdateTime(new Date());
+                            firstTare.setIsPreSacale("0");
+                            meterWorkRailwayActFirstMapper.updateByPrimaryKey(firstTare);
+                        }
+                        // 删洁净
+                        meterWorkRailwayActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                    else {
+                        // 清空毛重数据中的委托信息
+                        MeterWorkRailwayActFirst mwcafg = meterWorkRailwayActFirstMapper.selectAndRemove(model.getActualFirst1No());
+                        if (mwcafg == null) {
+                            rm.setMessage("未查询到相应的毛重数据!!");
+                            return rm;
+                        }
+                        mwcafg.setValueFlag(DbConstants.VALID);
+                        mwcafg.setNote(model.getNote());
+                        mwcafg.setUpdateManName("system");
+                        mwcafg.setUpdateManName("混装解除更新");
+                        mwcafg.setUpdateTime(new Date());
+                        mwcafg.setIsPreSacale("0");
+                        meterWorkRailwayActFirstMapper.updateByPrimaryKey(mwcafg);
+                        //皮重
+                        MeterWorkRailwayActFirst mwcaft = meterWorkRailwayActFirstMapper.selectAndRemove(model.getActualFirst2No());
+                        if (mwcaft == null) {
+                            rm.setMessage("未查询到相应的皮重数据!!");
+                            return rm;
+                        }
+                        mwcaft.setValueFlag(DbConstants.VALID);
+                        mwcaft.setUpdateManName("system");
+                        mwcaft.setUpdateManName("混装解除更新");
+                        mwcaft.setNote(model.getNote());
+                        mwcaft.setUpdateTime(new Date());
+                        mwcaft.setIsPreSacale("0");
+                        meterWorkRailwayActFirstMapper.updateByPrimaryKey(mwcaft);
+                        //修改预报
+                        if (StringUtils.isNotEmpty(model.getPredictionNo())) {
+                            PreRailwayScale scale = preRailwayScaleMapper.selectByPrimaryKey(model.getPredictionNo());
+                            scale.setValueFlag("1");
+                            scale.setUploadFlag("1");
+                            scale.setUpdateTime(new Date());
+                            scale.setUpdateManNo("system");
+                            scale.setUpdateManName("混装解除操作");
+                            preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
+                        }
+                        meterWorkRailwayActualMapper.deleteByPrimaryKey(model.getActualNo());
+                    }
+                }
+                rm.setSucceed();
+                rm.setMessage("操作成功!!");
+                rm.setCode("200");
+            }
+            break;
+        }
+        return rm;
+    }
+
+    @Override
+    public PageList<MeterWorkRailwayActual> likeByDesc(Map<String, Object> parameters, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<MeterWorkRailwayActual> rows = meterWorkRailwayActualMapper.likeByDesc(parameters);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
 }

+ 2 - 1
src/main/java/com/steerinfo/meterwork/meterworkzeroalarm/service/impl/MeterWorkZeroAlarmServiceImpl.java

@@ -10,6 +10,7 @@ import com.steerinfo.util.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.util.Date;
 
 /**
@@ -29,7 +30,7 @@ import java.util.Date;
 @Service(value = "meterWorkZeroAlarmService")
 public class MeterWorkZeroAlarmServiceImpl extends BaseServiceImpl<MeterWorkZeroAlarm, String> implements IMeterWorkZeroAlarmService {
 
-    @Autowired
+    @Resource
     private MeterWorkZeroAlarmMapper meterWorkZeroAlarmMapper;
 
     @Override

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff