liyg 2 éve
szülő
commit
56b45d7277

+ 13 - 11
src/main/java/com/steerinfo/dil/controller/ShipDynamicsController.java

@@ -167,7 +167,7 @@ public class ShipDynamicsController extends BaseRESTfulController {
                 materialTonnageSum=0.0;
                 materialNumberAllSum=0.0;
             }
-            if(i==0 || !list.get(i).get("batchInfacoryId").equals(list.get(i-1).get("batchInfacoryId"))){
+            if(i==0 || !list.get(i).get("batchId").equals(list.get(i-1).get("batchId")) || !list.get(i).get("portName").equals(list.get(i-1).get("portName"))){
                 //物资大类的下游港口总和
                 materialTonnageSum=new BigDecimal(materialTonnageSum+Double.valueOf(list.get(i).get("tonnage").toString())).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
             }
@@ -366,11 +366,12 @@ public class ShipDynamicsController extends BaseRESTfulController {
         Map<String,Object> map3=new HashMap<>();
         map3.put("batchInfacoryId",Integer.parseInt(list.get(list.size() -1).get("batchInfacoryId").toString()) + 1);
         map3.put("batchId",Integer.parseInt(list.get(list.size()-1).get("batchId").toString())+1);
-        if (list.get(list.size()-1).get("instructionStatus")!=null) {
-            map3.put("tonnage1",new BigDecimal(tonnageSum).setScale(2,BigDecimal.ROUND_HALF_UP));
-        }else {
-            map3.put("tonnage",new BigDecimal(tonnageSum).setScale(2,BigDecimal.ROUND_HALF_UP));
-        }
+        //下游吨位总合计
+//        if (list.get(list.size()-1).get("instructionStatus")!=null) {
+//            map3.put("tonnage1",new BigDecimal(tonnageSum).setScale(2,BigDecimal.ROUND_HALF_UP));
+//        }else {
+//            map3.put("tonnage",new BigDecimal(tonnageSum).setScale(2,BigDecimal.ROUND_HALF_UP));
+//        }
         map3.put("pm","合计");
         map3.put("capacityNumber1",capacityNumberAllSum1);
         map3.put("capacityNumber2",capacityNumberAllSum2);
@@ -382,11 +383,12 @@ public class ShipDynamicsController extends BaseRESTfulController {
         Map<String,Object> map4=new HashMap<>();
         map3.put("batchInfacoryId",Integer.parseInt(list.get(list.size() -1).get("batchInfacoryId").toString()) + 1);
         map4.put("batchId",Integer.parseInt(list.get(list.size()-1).get("batchId").toString())+1);
-        if (list.get(list.size()-1).get("instructionStatus")!=null) {
-            map4.put("tonnage1",new BigDecimal(tonnageSum).setScale(2,BigDecimal.ROUND_HALF_UP));
-        }else {
-            map4.put("tonnage",new BigDecimal(tonnageSum).setScale(2,BigDecimal.ROUND_HALF_UP));
-        }
+        //下游吨位总合计
+//        if (list.get(list.size()-1).get("instructionStatus")!=null) {
+//            map4.put("tonnage1",new BigDecimal(tonnageSum).setScale(2,BigDecimal.ROUND_HALF_UP));
+//        }else {
+//            map4.put("tonnage",new BigDecimal(tonnageSum).setScale(2,BigDecimal.ROUND_HALF_UP));
+//        }
         map4.put("pm","合计");
         map4.put("capacity1",new BigDecimal(capacityNumberAllSum1+capacityNumberAllSum2+capacityNumberAllSum3+capacityNumberAllSum4).setScale(2,BigDecimal.ROUND_HALF_UP));
         map4.put("type",1);

+ 1 - 1
src/main/resources/com/steerinfo/dil/mapper/ShipDynamicsMapper.xml

@@ -165,7 +165,7 @@
                                 and (tusr.RESULT_ID is null or tusr.RESULT_START_TIME > to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss'))
                           )
                       )
-        ORDER BY DECODE("materialTypeName",'低富粉',1,'中富粉',2,'高富粉',3,'机精粉',4 ,'进口块矿',5,6),"batchId","batchInfacoryId" DESC
+        ORDER BY DECODE("materialTypeName",'低富粉',1,'中富粉',2,'高富粉',3,'机精粉',4 ,'进口块矿',5,6),"batchInfacoryId","batchId","portName" DESC
     </select>
     <select id="selectByshipName" resultType="java.util.Map" parameterType="java.util.Map">
         select sd.GM_TONNAGE as "tonnage",