ljx 4 år sedan
förälder
incheckning
2e93d23f1c

+ 2 - 0
src/main/java/com/imed/costaccount/model/vo/CostIncomeGroupBeforeVO.java

@@ -81,4 +81,6 @@ public class CostIncomeGroupBeforeVO {
 
     @ApiModelProperty(name = "dateMonth",value = "月")
     private Integer dateMonth;
+
+    private Long fileId;
 }

+ 1 - 1
src/main/java/com/imed/costaccount/service/impl/CostIncomeFileServiceImpl.java

@@ -125,7 +125,7 @@ public class CostIncomeFileServiceImpl extends ServiceImpl<CostIncomeFileMapper,
         List<CostIncomeGroup> costIncomeGroupList = costIncomeGroupMapper.selectList(new QueryWrapper<CostIncomeGroup>().lambda()
                 .eq(CostIncomeGroup::getHospId, hospId).eq(CostIncomeGroup::getFileId, id));
         if (CollectionUtils.isEmpty(costIncomeGroupList)){
-            throw new CostException(500,"数据已撤销");
+            throw new CostException(410,"数据已撤销");
         }
         List<Long> list = costIncomeGroupList.stream().map(CostIncomeGroup::getId).collect(Collectors.toList());
         costIncomeGroupMapper.deleteBatchIds(list);

+ 5 - 4
src/main/java/com/imed/costaccount/service/impl/CostIncomeGroupServiceImpl.java

@@ -335,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) {
-                // 要求这一行的数据必须全部填写
+            // TODO 为0的时候这一行是否可以输入空的
+            if (checkNull) {
+                // 不为空要求这一行全部输入
                 for (int j = 0; j < data.size(); j++) {
-                    if (Objects.isNull(data.get(j))) {
+                    if (StrUtil.isBlank(data.get(j).toString())) {
                         IncomeErrorMessage incomeErrorMessage = new IncomeErrorMessage();
                         incomeErrorMessage.setTotal(i);
                         int column = j + 1;