Bläddra i källkod

成本报表 发运明细增加分组

liuchaohui 2 år sedan
förälder
incheckning
543c0ae808

+ 3 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.java

@@ -251,7 +251,7 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
                 "  sh.iExchRate AS exchangeRate,  " +
                 "  sh.cSOCode AS orderNum,  " +
                 "  c.cInvName AS poStyleNum,  " +
-                "  shs.iTaxUnitPrice AS exportUnitPrice ,  " +
+                "  sum(shs.iTaxUnitPrice) AS exportUnitPrice ,  " +
                 "  so.supplierCode AS processUnit " +
                 "FROM  " +
                 "  SaleBillVouch sh  " +
@@ -270,7 +270,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
                 "          WHERE om.cState = 1 AND om.cCode LIKE '"+plannum+"%'   " +
                 "      ) o ON s.isosid = o.isosid AND s.cInvCode = o.cInvCode   " +
                 "  ) so ON so.iSOsID = rd.iorderdid "+
-                " WHERE sh.cSOCode = '"+syCostAllocation.getGarmentContractno()+"'";
+                " group by sh.cDefine10,sh.iExchRate,sh.cSOCode,c.cInvName,so.supplierCode";
+                //" WHERE sh.cSOCode = '"+syCostAllocation.getGarmentContractno()+"'";
         List<Map<String, Object>> listShipdetail  = senYuDataSourceOne.queryForList(sqlShipdetail);
         List<JSONObject> Shipdetail = JsonChangeUtils.toJSONObject(listShipdetail);
         List<SyCostAllocationShipdetail> Shipdetails = new ArrayList<>();