Przeglądaj źródła

成本报表 费用支出

liuchaohui 2 lat temu
rodzic
commit
20391b0496

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationCostpay.java

@@ -59,9 +59,9 @@ public class SyCostAllocationCostpay implements Serializable {
     @Excel(name = "删除状态", width = 15)
     @ApiModelProperty(value = "删除状态")
     private String delFlag;
-    /**号*/
-    @Excel(name = "号", width = 15)
-    @ApiModelProperty(value = "号")
+    /**账套号*/
+    @Excel(name = "账套号", width = 15)
+    @ApiModelProperty(value = "账套号")
     private String setNo;
     /**支出单号*/
     @Excel(name = "支出单号", width = 15)

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

@@ -244,6 +244,27 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
             list4.add(Ingredient);
         }
 
+        //费用支出
+        String sqlCostpay = "SELECT " +
+                "  sp.cSPVCode as disbursementSlipNo, " +
+                "  sp.cSBVCode as invoicenum, " +
+                "  sp.cMaker as preparedBy, " +
+                "  sps.cExpCode as expenseItem, " +
+                "  sps.iMoney as disbursedLocalmoney, " +
+                "  sps.INatMoney as disbursedOriginalmoney  " +
+                "FROM " +
+                "  SalePayVouch sp " +
+                "  INNER JOIN SalePayVouchs sps ON sp.id = sps.id " +
+                "  where sp.cSOCode = '"+syCostAllocation.getGarmentContractno()+"'";
+        List<Map<String, Object>> costpayList  = senYuDataSourceOne.queryForList(sqlCostpay);
+        List<JSONObject> costpay = JsonChangeUtils.toJSONObject(costpayList);
+        List<SyCostAllocationCostpay> syCostAllocationCostpays = new ArrayList<>();
+        for (int i=0;i<costpay.size();i++) {
+            SyCostAllocationCostpay syCostAllocationCostpay = JSONObject.toJavaObject(costpay.get(i), SyCostAllocationCostpay.class);
+            syCostAllocationCostpays.add(syCostAllocationCostpay);
+        }
+        syCostAllocation.setSyCostAllocationCostpayList(syCostAllocationCostpays);
+
         //数据整合
         List<JSONObject> processUnitList=new ArrayList<>();//子表数据_加工单位集合
         //获取主表加工单位,拆分获取对应数据