瀏覽代碼

Merge branch 'master' of huangrui/CostAccount into dev

lijiaxi 4 年之前
父節點
當前提交
9f6f806942

+ 3 - 3
src/main/java/com/imed/costaccount/service/impl/AllocationServiceImpl.java

@@ -247,7 +247,7 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
             allocationQuery.setDateYear(i.getDateYear()).setDateMonth(i.getDateMonth())
                     .setHospId(hospId).setResponsibilityCode(i.getResponsibilityCode())
                     .setResponsibilityName(i.getResponsibilityName())
-                    .setOriginId(i.getId()).setOriginType(1L).setAmount(i.getAmount())
+                    .setOriginId(i.getId()).setOriginType(2L).setAmount(i.getAmount())
                     .setAccountingCode(accountingCodes).setAccountingName(accountingNames)
                     .setCreateTime(System.currentTimeMillis())
                     .setLevelSort(i.getLevelSort()).setLevelName(i.getLevelName())
@@ -255,7 +255,7 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
             saveList.add(allocationQuery);
         });
 
-        costingGroups = costCostingGroupService.getRealData(maxId, hospId, year, month);
+        costingGroups = costCostingGroupService.getRealData(CollUtil.newArrayList(maxId), hospId, year, month);
         costingGroups.forEach(i -> {
             AllocationQuery allocationQuery = new AllocationQuery();
             String responsibilityCode = i.getResponsibilityCode();
@@ -269,7 +269,7 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
             }
             allocationQuery.setDateYear(i.getDateYear()).setDateMonth(i.getDateMonth())
                     .setHospId(hospId).setResponsibilityCode(responsibilityCode).setResponsibilityName(i.getResponsibilityName())
-                    .setOriginId(i.getId()).setOriginType(2L).setAmount(i.getAmount())
+                    .setOriginId(i.getId()).setOriginType(1L).setAmount(i.getAmount())
                     .setAccountingCode(i.getAccountCode()).setAccountingName(i.getAccountName())
                     .setCreateTime(System.currentTimeMillis())
                     .setLevelSort(byId.getLeverSort()).setLevelName(byId.getShareName())

+ 3 - 0
src/main/java/com/imed/costaccount/service/impl/HospProfitAndLossServiceImpl.java

@@ -185,6 +185,9 @@ public class HospProfitAndLossServiceImpl extends ServiceImpl<HospProfitAndLossM
         total.set(BigDecimal.ZERO);
         for (int x = 0; x < mapList.size(); x++) {
             BigDecimal bigDecimal = map.get(x);
+            if (Objects.isNull(bigDecimal)) {
+                bigDecimal = BigDecimal.ZERO;
+            }
             if ("+".equals(expressionMap.get(x))) {
                 total.set(total.get().add(bigDecimal));
             } else {

+ 1 - 1
src/main/resources/mapper/CostCostingGroupMapper.xml

@@ -137,7 +137,7 @@
         and cr.hosp_id = #{hospId}
         and cr.delete_time = 0
         and share_id in
-        <foreach collection="maxId" index="item" separator="," open="(" close=")">
+        <foreach collection="maxId" item="item" index="index" separator="," open="(" close=")">
             #{item}
         </foreach>
     </select>

+ 1 - 1
src/main/resources/mapper/CostShareLevelMapper.xml

@@ -15,7 +15,7 @@
         <result property="deleteTime" column="delete_time"/>
     </resultMap>
     <select id="getMaxIds" resultType="java.lang.Long">
-        select *
+        select id
         from cost_share_level
         where hosp_id = #{hospId}
           and lever_sort = (select max(lever_sort) from cost_share_level where hosp_id = #{hospId} and delete_time = 0)