|
@@ -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 -> {
|
|
@@ -334,12 +335,13 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
|
|
|
String startDepartmentName = data.get(4).toString();
|
|
|
String startDepartmentCode = data.get(5).toString();
|
|
|
BigDecimal beforeMoney = BigDecimal.valueOf(Double.parseDouble(("0".equals(data.get(15).toString()) || StrUtil.isBlank(data.get(15).toString())) ?"0.00":data.get(15).toString()));
|
|
|
- boolean checkNull = StrUtil.isBlank(data.get(15).toString());
|
|
|
+ boolean checkNull = StrUtil.isNotBlank(data.get(15).toString());
|
|
|
boolean checkOne = "0".equals(data.get(15).toString());
|
|
|
- if (checkNull || checkOne) {
|
|
|
- // 要求这一行的数据必须全部填写
|
|
|
- for (int j = 0; j < NumberConstant.FIVE; j++) {
|
|
|
- if (Objects.isNull(data.get(j))) {
|
|
|
+ // TODO 为0的时候这一行是否可以输入空的
|
|
|
+ if (checkNull) {
|
|
|
+ // 不为空要求这一行全部输入
|
|
|
+ for (int j = 0; j < data.size(); j++) {
|
|
|
+ if (StrUtil.isBlank(data.get(j).toString())) {
|
|
|
IncomeErrorMessage incomeErrorMessage = new IncomeErrorMessage();
|
|
|
incomeErrorMessage.setTotal(i);
|
|
|
int column = j + 1;
|
|
@@ -450,10 +452,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 +505,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 +516,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());
|
|
|
});
|