liyg 2 years ago
parent
commit
a4a42d9b93

+ 4 - 1
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -494,7 +494,7 @@ public class TMSController extends BaseRESTfulController {
     }
 
 
-    @ApiOperation(value = "采购火运装货作业")
+    @ApiOperation(value = "采购火运计量作业")
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @PostMapping(value = "/purchaseTrainWeight")
 //    @LogAround(foreignKeys = {"resultId"},foreignKeyTypes = {"计量实绩"})
@@ -586,6 +586,7 @@ public class TMSController extends BaseRESTfulController {
             }
             //校验数据
             String requirementNumber = item.get("通知单号").toString();
+            BigDecimal weight = DataChange.dataToBigDecimal(item.get("净重"));
             if (map.get("requirementNumber") != null) {
                 if (map.get("requirementNumber").equals(requirementNumber)) {
                     String unloadTime = map.get("unloadTime").toString();
@@ -595,9 +596,11 @@ public class TMSController extends BaseRESTfulController {
                 } else {
                     throw new Exception("同一个Excel文件中只允许有一个通知单号!");
                 }
+                map.put("weight", weight.add(DataChange.dataToBigDecimal(map.get("weight"))));
             } else {
                 //不存在,新增
                 map.put("requirementNumber", requirementNumber);
+                map.put("weight", weight);
                 map.put("unloadTime",item.get("卸车日期").toString());
             }
             //车牌号去重

+ 0 - 1
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -95,7 +95,6 @@ public class UniversalController extends BaseRESTfulController {
     @ApiModelProperty(value = "边输边查作业点")
     @PostMapping("/getOperationPointByLike")
     public RESTfulResult getOperationPointByLike(@RequestBody(required = false) Map<String,Object> map) {
-        System.out.println(map.get("id"));
         List<Map<String, Object>> list = universalMapper.getOperationPointByLike(map);
         return success(list);
     }

+ 3 - 5
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -243,21 +243,19 @@
     </select>
     <select id="getOperationPointByLike" resultType="java.util.Map">
     SELECT * FROM (
-        select * from (
         select
         OPERATION_POINT_ID "id",
         OPERATION_POINT_ID "value",
         OPERATION_POINT_NAME "label",
         OPERATION_POINT_NAME "text"
         from RMS_OPERATION_POINT
-        where DELETED = 0
-        )
         <where>
+            DELETED = 0
             <if test="operationPointType!=null and operationPointType!=''">
-                AND REGEXP_LIKE("operationPointType", #{operationPointType})
+                AND REGEXP_LIKE(OPERATION_POINT_TYPE, #{operationPointType})
             </if>
             <if test="index!=null and index!=''">
-                AND REGEXP_LIKE("label", #{index})
+                AND REGEXP_LIKE(OPERATION_POINT_NAME, #{index})
             </if>
         </where>
         FETCH NEXT 10 ROWS ONLY