ljx 4 年之前
父节点
当前提交
ed9c0c2dcc

+ 9 - 11
src/main/java/com/imed/costaccount/service/impl/CostIncomeGroupServiceImpl.java

@@ -107,11 +107,12 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
             pageUtils.setTotalAmount(new BigDecimal(0.0000));
             return pageUtils;
         }
-        // 查询所有的责任中心 科室 会计科目  成本项目的数据  处理名字
-        setCodeName(costIncomeGroupBeforeVOList);
+
         // 进行金额合并
         List<Long> idList = costIncomeGroupBeforeVOList.stream().map(CostIncomeGroupBeforeVO::getId).collect(Collectors.toList());
         List<CostIncomeGroupAllAmountVO> costIncomeGroupAllAmountVoS = baseMapper.countMoney(idList);
+        // 查询所有的责任中心 科室 会计科目  成本项目的数据  处理名字
+        setCodeName(costIncomeGroupAllAmountVoS);
         //  对,的金额进行合并
         AtomicReference<BigDecimal> totalAmount = new AtomicReference<>(new BigDecimal("0.0000"));
         costIncomeGroupAllAmountVoS.forEach(i -> {
@@ -338,7 +339,7 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
             boolean checkOne = "0".equals(data.get(15).toString());
             if (checkNull || checkOne) {
                 // 要求这一行的数据必须全部填写
-                for (int j = 0; j < NumberConstant.FIVE; j++) {
+                for (int j = 0; j < data.size(); j++) {
                     if (Objects.isNull(data.get(j))) {
                         IncomeErrorMessage incomeErrorMessage = new IncomeErrorMessage();
                         incomeErrorMessage.setTotal(i);
@@ -450,10 +451,7 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
                     .setPatientId(Long.parseLong(data.get(8).toString())).setOutpatientId(Long.parseLong(data.get(9).toString()))
                     .setPatientName(data.get(10).toString()).setPatientFee(data.get(11).toString()).setReceiptFee(data.get(12).toString())
                     .setTotalNumber(Integer.parseInt(data.get(13).toString())).setUnit(data.get(14).toString())
-                    .setFeeDatetime(DateUtils.StringToDate(data.get(16).toString(), DateStyleEnum.YYYY_MM_DD_HH_MM_SS_EN));
-            if (StrUtil.isNotBlank(costIncomeGroup.getOpenResponsibilityCode())) {
-
-            }
+                    .setFeeDatetime(DateUtils.StringToDate(data.get(16).toString(), DateStyleEnum.YYYY_MM_DD_HH_MM_SS));
             costIncomeGroup.setHospId(hospId);
             costIncomeGroup.setCreateTime(System.currentTimeMillis());
             costIncomeGroup.setDateYear(year);
@@ -506,9 +504,9 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
     /**
      * 设置相关名称
      *
-     * @param costIncomeGroupBeforeVOList
+     * @param costIncomeGroupAllAmountVOList
      */
-    private void setCodeName(List<CostIncomeGroupBeforeVO> costIncomeGroupBeforeVOList) {
+    private void setCodeName(List<CostIncomeGroupAllAmountVO> costIncomeGroupAllAmountVOList) {
 //        List<Responsibility> responsibilityList = responsibilityService.list(new QueryWrapper<Responsibility>().lambda().eq(Responsibility::getHospId, hospId));
 //        Map<String, String> responsibilityMap = responsibilityList.stream().collect(Collectors.toMap(Responsibility::getResponsibilityCode, Responsibility::getResponsibilityName));
 //        List<Department> departmentList = departmentService.list(new QueryWrapper<Department>().lambda().eq(Department::getHospId, hospId));
@@ -517,13 +515,13 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
 //        Map<String, String> productMap = productList.stream().collect(Collectors.toMap(Product::getProductCode, Product::getProductName));
 //        List<Accounting> accountingList = accountingService.list(new QueryWrapper<Accounting>().lambda().eq(Accounting::getHospId, hospId));
 //        Map<String, String> accountMap = accountingList.stream().collect(Collectors.toMap(Accounting::getAccountingCode, Accounting::getAccountingName));
-        costIncomeGroupBeforeVOList.forEach(i -> {
+        costIncomeGroupAllAmountVOList.forEach(i -> {
             // 以为这里的数据导入的  在导入的时候进行数据校验
             // 设置开单科室名称 执行科室名称  开单责任中心名称  执行责任中心名称 成本项目的名称 会计科目名称
             i.setOpenDepartmentCodeName("[" + i.getOpenDepartmentCode() + "]" + i.getOpenDepartmentName());
             i.setOpenResponsibilityCodeName("[" + i.getOpenResponsibilityCode() + "]" + i.getOpenResponsibilityName());
             i.setStartDepartmentCodeName("[" + i.getStartDepartmentCode() + "]" + i.getStartDepartmentName());
-            i.setStartResponsibilityCodeName("[" + i.getStartResponsibilityCode() + "]" + i.getStartResponsibilityCode());
+            i.setStartResponsibilityCodeName("[" + i.getStartResponsibilityCode() + "]" + i.getStartResponsibilityName());
             i.setProductCodeName("[" + i.getProductCode() + "]" + i.getProductName());
             i.setAccountCodeName("[" + i.getAccountCode() + "]" + i.getAccountName());
         });

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

@@ -27,7 +27,7 @@ spring:
   redis:
     port: 6379
     host: 112.124.59.133
-    password: zjxy!@#2021
+    password: xywl!@#2021
     jedis:
       pool:
         max-active: 30