Преглед изворни кода

Merge branch 'master' of huangrui/CostAccount into dev

lijiaxi пре 4 година
родитељ
комит
564eb9adce

+ 5 - 5
pom.xml

@@ -72,11 +72,11 @@
             <artifactId>spring-boot-starter-aop</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-configuration-processor</artifactId>
-            <optional>true</optional>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.boot</groupId>-->
+<!--            <artifactId>spring-boot-configuration-processor</artifactId>-->
+<!--            <optional>true</optional>-->
+<!--        </dependency>-->
 
         <!--        <dependency>-->
         <!--            <groupId>org.springframework.boot</groupId>-->

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

@@ -664,11 +664,13 @@ public class AllocationServiceImpl extends ServiceImpl<AllocationMapper, Allocat
                     if (CollUtil.isNotEmpty(allocations1)) {
                         allocations1.forEach(m -> {
                             money.updateAndGet(v -> v.add(m.getAmount()));
+//                            System.out.println(m.getAmount());
                         });
                     } else {
                         // TODO 封装测试数据
                         shareMoney.add("0");
                     }
+//                    System.out.println("第"+j+"次"+money);
                     shareMoney.add(money.toString());
                 }
             }

+ 40 - 26
src/main/java/com/imed/costaccount/service/impl/CostDepartmentProfitServiceImpl.java

@@ -84,7 +84,8 @@ public class CostDepartmentProfitServiceImpl extends ServiceImpl<CostDepartmentP
                 .eq(CostDepartmentProfit::getHospId, hospId)
                 .eq(StrUtil.isNotBlank(responsibilityCode), CostDepartmentProfit::getResponsibilityCode, responsibilityCode)
                 .eq(StrUtil.isNotBlank(date), CostDepartmentProfit::getYear, year)
-                .eq(StrUtil.isNotBlank(date), CostDepartmentProfit::getMonth, month).ne(CostDepartmentProfit::getCalcType, NumberConstant.ZERO));
+                .eq(StrUtil.isNotBlank(date), CostDepartmentProfit::getMonth, month)
+                .ne(CostDepartmentProfit::getCalcType, NumberConstant.ZERO).orderByAsc(CostDepartmentProfit::getAmount));
         List<CostDepartmentProfit> records = pages.getRecords();
         List<CostDepartmentProfitVO> costDepartmentProfitVOList = BeanUtil.convertList(records, CostDepartmentProfitVO.class);
         PageUtils pageUtils = new PageUtils(pages);
@@ -181,32 +182,44 @@ public class CostDepartmentProfitServiceImpl extends ServiceImpl<CostDepartmentP
         Map<Long, List<CostDepartmentProfitVO>> listMap = list.stream().collect(Collectors.groupingBy(CostDepartmentProfitVO::getReportId));
         // 记录每一次计算的钱
         list.forEach(i -> {
-            Integer calcType = i.getCostType();
-            switch (calcType) {
-                case 1:
-                    // TODO 按照会计科目进行计算
-                    i.setAmount(setAccountReportData(i, incomeList, allocationQueryReportVOList, reportRelationMap));
-                    break;
-                case 2:
-                    // TODO 按照分摊层级进行计算
-                    i.setAmount(setShareLevelReportData(i, costShareLevelList, reportRelationMap, allocationList));
-                    break;
-                case 3:
-                    // TODO 按照小计进行计算
-                    i.setAmount(setSubtotal(i, costShareLevelList, listMap, list, incomeList, allocationQueryReportVOList, reportRelationMap, allocationList));
-                    break;
-                case 4:
-                    // TODO 按照计算公式进行计算
-                    i.setAmount(setCalculation(i, list, costShareLevelList, listMap, incomeList, allocationQueryReportVOList, reportRelationMap, allocationList));
-                    break;
-                case 5:
-                    // TODO  按照责任中心进行计算
-                    i.setAmount(setResponsibilityCode(i, reportRelationMap, allocationList));
-                    break;
-                default:
-                    i.setAmount(new BigDecimal("0.0000"));
-                    break;
+            Integer calcType = i.getCalcType();
+            if (NumberConstant.ONE.equals(calcType)){
+                // TODO 按照会计科目进行计算
+                i.setAmount(setAccountReportData(i, incomeList, allocationQueryReportVOList, reportRelationMap));
+            }else if (NumberConstant.TWO.equals(calcType)){
+                // TODO 按照分摊层级进行计算
+                i.setAmount(setShareLevelReportData(i, costShareLevelList, reportRelationMap, allocationList));
+            }else if (NumberConstant.THREE.equals(calcType)){
+                // TODO 按照小计进行计算
+                i.setAmount(setSubtotal(i, costShareLevelList, listMap, list, incomeList, allocationQueryReportVOList, reportRelationMap, allocationList));
+            }else if (NumberConstant.FOUR.equals(calcType)){
+                // TODO 按照计算公式进行计算
+                i.setAmount(setCalculation(i, list, costShareLevelList, listMap, incomeList, allocationQueryReportVOList, reportRelationMap, allocationList));
+            }else if (NumberConstant.FIVE.equals(calcType)){
+                // TODO  按照责任中心进行计算
+                i.setAmount(setResponsibilityCode(i, reportRelationMap, allocationList));
+            }else {
+                i.setAmount(new BigDecimal("0.0000"));
             }
+//            switch (calcType) {
+//                case 1:
+//
+//                    break;
+//                case 2:
+//
+//                    break;
+//                case 3:
+//
+//                    break;
+//                case 4:
+//
+//                    break;
+//                case 5:
+//
+//                    break;
+//                default:
+//                    break;
+//            }
         });
         // 删除这个年月的数据
         this.remove(new QueryWrapper<CostDepartmentProfit>().lambda().eq(CostDepartmentProfit::getHospId, hospId)
@@ -256,6 +269,7 @@ public class CostDepartmentProfitServiceImpl extends ServiceImpl<CostDepartmentP
      */
     private BigDecimal setAccountReportData(CostDepartmentProfitVO i, List<IncomeCollection> list, List<AllocationQueryReportVO> allocationQueryReportVOList, Map<Long, List<ReportRelation>> reportRelationMap) {
         // 在报表关联里面查询当前报表关联的
+        Long reportId = i.getReportId();
         List<ReportRelation> reportRelationList = reportRelationMap.get(i.getReportId());
         AtomicReference<BigDecimal> sum = new AtomicReference<>(new BigDecimal("0.000"));
         if (CollUtil.isNotEmpty(reportRelationList)) {

+ 1 - 1
src/main/resources/application-dev.yml

@@ -19,7 +19,7 @@ spring:
       max-pool-prepared-statement-per-connection-size: 20
       time-between-eviction-runs-millis: 60000
       min-evictable-idle-time-millis: 300000
-      type: com.alibaba.druid.pool.DruidDataSource
+    type: com.alibaba.druid.pool.DruidDataSource
   jackson:
     date-format: yyyy-MM-dd hh:mm:ss
     time-zone: GMT+8

+ 0 - 21
src/main/resources/mapper/AccountingMapper.xml

@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.AccountingMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.Accounting" id="accountingMap">
-        <result property="id" column="id"/>
-        <result property="accountingName" column="accounting_name"/>
-        <result property="accountingCode" column="accounting_code"/>
-        <result property="accountingType" column="accounting_type"/>
-        <result property="isBaseCost" column="is_base_cost"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="parentId" column="parent_id"/>
-        <result property="allParentIds" column="all_parent_ids"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 17
src/main/resources/mapper/AccountingProductMapper.xml

@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.AccountingProductMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.AccountingProduct" id="accountingProductMap">
-        <result property="id" column="id"/>
-        <result property="accountingId" column="accounting_id"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="productId" column="product_id"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 28
src/main/resources/mapper/CostDepartmentProfitMapper.xml

@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.CostDepartmentProfitMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.CostDepartmentProfit" id="costDepartmentProfitMap">
-        <result property="id" column="id"/>
-        <result property="year" column="year"/>
-        <result property="month" column="month"/>
-        <result property="reportParentId" column="report_parent_id"/>
-        <result property="reportId" column="report_id"/>
-        <result property="reportNum" column="report_num"/>
-        <result property="reportName" column="report_name"/>
-        <result property="calcFormula" column="calc_formula"/>
-        <result property="calcType" column="calc_type"/>
-        <result property="responsibilityCode" column="responsibility_code"/>
-        <result property="responsibilityName" column="responsibility_name"/>
-        <result property="costType" column="cost_type"/>
-        <result property="incomeType" column="income_type"/>
-        <result property="amount" column="amount"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 26
src/main/resources/mapper/CostIncomeFileMapper.xml

@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.CostIncomeFileMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.CostIncomeFile" id="costIncomeFileMap">
-        <result property="id" column="id"/>
-        <result property="fileType" column="file_type"/>
-        <result property="fileName" column="file_name"/>
-        <result property="fileUrl" column="file_url"/>
-        <result property="successAmount" column="success_amount"/>
-        <result property="totalAmount" column="total_amount"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="userId" column="user_id"/>
-        <result property="userName" column="user_name"/>
-        <result property="errorList" column="error_list"/>
-        <result property="rollbackStatus" column="rollback_status"/>
-        <result property="dateYear" column="date_year"/>
-        <result property="dateMonth" column="date_month"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 21
src/main/resources/mapper/CostIncomeGroupSetMapper.xml

@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.CostIncomeGroupSetMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.CostIncomeGroupSet" id="costIncomeGroupSetMap">
-        <result property="id" column="id"/>
-        <result property="openDepartmentStatus" column="open_department_status"/>
-        <result property="openDepartmentProportion" column="open_department_proportion"/>
-        <result property="startDepartmentStatus" column="start_department_status"/>
-        <result property="startDepartmentProportion" column="start_department_proportion"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="responsibilityCodes" column="responsibility_codes"/>
-        <result property="accountCode" column="account_code"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 25
src/main/resources/mapper/CostNumberBedSetMapper.xml

@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.CostNumberBedSetMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.CostNumberBedSet" id="costNumberBedSetMap">
-        <result property="id" column="id"/>
-        <result property="allocation" column="allocation"/>
-        <result property="incomeType" column="income_type"/>
-        <result property="shareParamCode" column="share_param_code"/>
-        <result property="shareParamName" column="share_param_name"/>
-        <result property="incomeFieldNum" column="income_field_num"/>
-        <result property="incomeFileName" column="income_file_name"/>
-        <result property="incomeFileType" column="income_file_type"/>
-        <result property="costCorresponding" column="cost_corresponding"/>
-        <result property="costCorrespondingName" column="cost_corresponding_name"/>
-        <result property="costFileType" column="cost_file_type"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 20
src/main/resources/mapper/CostOtherPaymentsDataMapper.xml

@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.CostOtherPaymentsDataMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.CostOtherPaymentsData" id="costOtherPaymentsDataMap">
-        <result property="id" column="id"/>
-        <result property="dateYear" column="date_year"/>
-        <result property="dateMonth" column="date_month"/>
-        <result property="paymentsType" column="payments_type"/>
-        <result property="paymentsName" column="payments_name"/>
-        <result property="totalAmount" column="total_amount"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 17
src/main/resources/mapper/CostOtherPaymentsMapper.xml

@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.CostOtherPaymentsMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.CostOtherPayments" id="costOtherPaymentsMap">
-        <result property="id" column="id"/>
-        <result property="paymentsType" column="payments_type"/>
-        <result property="paymentsName" column="payments_name"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 20
src/main/resources/mapper/CostShareParamMapper.xml

@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.CostShareParamMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.CostShareParam" id="costShareParamMap">
-        <result property="id" column="id"/>
-        <result property="shareParamName" column="share_param_name"/>
-        <result property="shareParamCode" column="share_param_code"/>
-        <result property="accountingId" column="accounting_id"/>
-        <result property="accountingCodes" column="accounting_codes"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="calcType" column="calc_type"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 17
src/main/resources/mapper/DepartmentMapper.xml

@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.DepartmentMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.Department" id="departmentMap">
-        <result property="id" column="id"/>
-        <result property="departmentName" column="department_name"/>
-        <result property="departmentCode" column="department_code"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 23
src/main/resources/mapper/HospProfitAndLossMapper.xml

@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.HospProfitAndLossMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.HospProfitAndLoss" id="hospProfitAndLossMap">
-        <result property="id" column="id"/>
-        <result property="dateYear" column="date_year"/>
-        <result property="dateMonth" column="date_month"/>
-        <result property="reportNum" column="report_num"/>
-        <result property="reportName" column="report_name"/>
-        <result property="costType" column="cost_type"/>
-        <result property="incomeType" column="income_type"/>
-        <result property="amount" column="amount"/>
-        <result property="originType" column="origin_type"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-        <result property="hospId" column="hosp_id"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 19
src/main/resources/mapper/HospitalMapper.xml

@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.HospitalMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.Hospital" id="hosptailMap">
-        <result property="id" column="id"/>
-        <result property="name" column="name"/>
-        <result property="isHospital" column="is_hospital"/>
-        <result property="parentId" column="parent_id"/>
-        <result property="parentName" column="parent_name"/>
-        <result property="sign" column="sign"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 17
src/main/resources/mapper/ProductMapper.xml

@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.ProductMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.Product" id="productMap">
-        <result property="id" column="id"/>
-        <result property="productName" column="product_name"/>
-        <result property="productCode" column="product_code"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 24
src/main/resources/mapper/ReportFormMapper.xml

@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.ReportFormMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.ReportForm" id="reportFormMap">
-        <result property="id" column="id"/>
-        <result property="num" column="num"/>
-        <result property="reportName" column="report_name"/>
-        <result property="parentId" column="parent_id"/>
-        <result property="calcType" column="calc_type"/>
-        <result property="reportType" column="report_type"/>
-        <result property="calcFormula" column="calc_formula"/>
-        <result property="sort" column="sort"/>
-        <result property="ratioBase" column="ratio_base"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="oldId" column="old_id" />
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 24
src/main/resources/mapper/ResponsibilityMapper.xml

@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.ResponsibilityMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.Responsibility" id="responsibilityMap">
-        <result property="id" column="id"/>
-        <result property="responsibilityName" column="responsibility_name"/>
-        <result property="responsibilityCode" column="responsibility_code"/>
-        <result property="parentId" column="parent_id"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="isGatherCenter" column="is_gather_center"/>
-        <result property="responsibilityType" column="responsibility_type"/>
-        <result property="shareId" column="share_id"/>
-        <result property="isDefault" column="is_default" />
-        <result property="shareLevel" column="share_level"/>
-        <result property="shareName" column="share_name"/>
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 17
src/main/resources/mapper/RoleMapper.xml

@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.RoleMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.Role" id="roleMap">
-        <result property="roleId" column="role_id"/>
-        <result property="roleName" column="role_name"/>
-        <result property="remark" column="remark"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="createUserId" column="create_user_id"/>
-        <result property="createTime" column="create_time"/>
-    </resultMap>
-
-
-</mapper>

+ 0 - 20
src/main/resources/mapper/UserMapper.xml

@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.imed.costaccount.mapper.UserMapper">
-
-	<!-- 可根据自己的需求,是否要使用 -->
-    <resultMap type="com.imed.costaccount.model.User" id="userMap">
-        <result property="id" column="id"/>
-        <result property="name" column="name"/>
-        <result property="account" column="account"/>
-        <result property="mobilePhoneNum" column="mobile_phone_num"/>
-        <result property="password" column="password"/>
-        <result property="hospId" column="hosp_id"/>
-        <result property="hospitalStatus" column="hospital" />
-        <result property="createTime" column="create_time"/>
-        <result property="deleteTime" column="delete_time"/>
-    </resultMap>
-
-
-</mapper>

+ 64 - 64
src/test/java/com/imed/costaccount/service/impl/AllocationServiceImplTest.java

@@ -1,65 +1,65 @@
-package com.imed.costaccount.service.impl;
-
-import com.imed.costaccount.common.util.PageUtils;
-import com.imed.costaccount.model.Allocation;
-import com.imed.costaccount.service.AccountingService;
-import com.imed.costaccount.service.AllocationService;
-import lombok.extern.slf4j.Slf4j;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.transaction.annotation.Transactional;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest
-@Slf4j
-public class AllocationServiceImplTest {
-
-    @Autowired
-    private AllocationService allocationService;
-
-    @Test
-    public void testShareAfterQueryTest() {
-        String year = "2021-01-01";
-        String responsibilityCode = "";
-        int current = 1;
-        int pageSize = 10;
-        long hospId = 11L;
-        PageUtils pageUtils = allocationService.queryAfterAllocation(year, responsibilityCode, current, pageSize, hospId);
-        Assert.assertNotNull(pageUtils);
-        log.info("pageUtils={}", pageUtils);
-    }
-
-    @Test
-    @Transactional
-    public void testTransaction1() {
-        Allocation before = allocationService.getById(40);
+//package com.imed.costaccount.service.impl;
+//
+//import com.imed.costaccount.common.util.PageUtils;
+//import com.imed.costaccount.model.Allocation;
+//import com.imed.costaccount.service.AccountingService;
+//import com.imed.costaccount.service.AllocationService;
+//import lombok.extern.slf4j.Slf4j;
+//import org.junit.Assert;
+//import org.junit.Test;
+//import org.junit.runner.RunWith;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.boot.test.context.SpringBootTest;
+//import org.springframework.test.context.junit4.SpringRunner;
+//import org.springframework.transaction.annotation.Transactional;
+//
+//@RunWith(SpringRunner.class)
+//@SpringBootTest
+//@Slf4j
+//public class AllocationServiceImplTest {
+//
+//    @Autowired
+//    private AllocationService allocationService;
+//
+//    @Test
+//    public void testShareAfterQueryTest() {
+//        String year = "2021-01-01";
+//        String responsibilityCode = "";
+//        int current = 1;
+//        int pageSize = 10;
+//        long hospId = 11L;
+//        PageUtils pageUtils = allocationService.queryAfterAllocation(year, responsibilityCode, current, pageSize, hospId);
+//        Assert.assertNotNull(pageUtils);
+//        log.info("pageUtils={}", pageUtils);
+//    }
+//
+//    @Test
+//    @Transactional
+//    public void testTransaction1() {
+//        Allocation before = allocationService.getById(40);
+////        allocationService.removeById(40);
+//        try {
+//            Thread.sleep(1000);
+//        } catch (InterruptedException e) {
+//            throw new RuntimeException("111");
+//        }
+//
+//        Allocation after = allocationService.getById(40);
+//        Assert.assertEquals(before, after);
+//    }
+//
+//
+//
+//    @Test
+//    public void test() {
+//        new Thread(this::testTransaction1).start();
+//        new Thread(this::testDel).start();
+//    }
+//
+//    @Test
+//    @Transactional
+//    public void testDel() {
 //        allocationService.removeById(40);
-        try {
-            Thread.sleep(1000);
-        } catch (InterruptedException e) {
-            throw new RuntimeException("111");
-        }
-
-        Allocation after = allocationService.getById(40);
-        Assert.assertEquals(before, after);
-    }
-
-
-
-    @Test
-    public void test() {
-        new Thread(this::testTransaction1).start();
-        new Thread(this::testDel).start();
-    }
-
-    @Test
-    @Transactional
-    public void testDel() {
-        allocationService.removeById(40);
-    }
-
-}
+//    }
+//
+//}