瀏覽代碼

查询错误记录

ljx 4 年之前
父節點
當前提交
6beb562634

+ 10 - 3
src/main/java/com/imed/costaccount/model/AfterIncomegroup.java

@@ -18,10 +18,12 @@ public class AfterIncomegroup {
      * 开单科室状态 1 收益中心 2 执行中心
      */
     private Integer openDepartmentStatus;
+
+    private String openDepartmentCode;
     /**
      * 开单科室比例
      */
-    private Integer openDepartmentProportion;
+    private String openDepartmentName;
     /**
      * 开单科室金额
      */
@@ -30,10 +32,11 @@ public class AfterIncomegroup {
      * 执行科室状态 1 收益中心 2 执行中心
      */
     private Integer startDepartmentStatus;
+    private String startDepartmentCode;
     /**
      * 执行科室比例
      */
-    private Integer startDepartmentProportion;
+    private String startDepartmentName;
     /**
      * 执行科室金额
      */
@@ -41,7 +44,11 @@ public class AfterIncomegroup {
     /**
      * 责任中心代码
      */
-    private String responsibilityCodes;
+    private String responsibilityCode;
+    /**
+     * 责任中心名称
+     */
+    private String responsibilityName;
     /**
      * 是直接还是间接 1直接 2 间接
      */

+ 9 - 1
src/main/java/com/imed/costaccount/service/CostIncomeFileService.java

@@ -45,6 +45,14 @@ public interface CostIncomeFileService extends IService<CostIncomeFile> {
      * @param id
      * @param hospId
      */
-    void deleteImport(Integer id, Long hospId);
+    void deleteImport(Long id, Long hospId);
+
+    /**
+     * 错误详情
+     * @param id
+     * @param hospId
+     * @return
+     */
+    List<IncomeErrorMessage> getErrorList(Long id, Long hospId);
 }
 

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

@@ -8,14 +8,18 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.imed.costaccount.common.exception.CostException;
 import com.imed.costaccount.common.util.BeanUtil;
+import com.imed.costaccount.common.util.JsonUtil;
 import com.imed.costaccount.common.util.PageUtils;
 import com.imed.costaccount.constants.NumberConstant;
 import com.imed.costaccount.mapper.CostIncomeFileMapper;
+import com.imed.costaccount.mapper.CostIncomeGroupMapper;
 import com.imed.costaccount.model.CostIncomeFile;
+import com.imed.costaccount.model.CostIncomeGroup;
 import com.imed.costaccount.model.User;
 import com.imed.costaccount.model.vo.CostIncomeFileVO;
 import com.imed.costaccount.model.vo.IncomeErrorMessage;
 import com.imed.costaccount.service.CostIncomeFileService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
@@ -24,16 +28,16 @@ import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
 import java.util.Objects;
+import java.util.stream.Collectors;
 
 
 @Service("costIncomeFileService")
 public class CostIncomeFileServiceImpl extends ServiceImpl<CostIncomeFileMapper, CostIncomeFile> implements CostIncomeFileService {
 
-//    private final CostIncomeGroupService costIncomeGroupService;
-//
-//    public CostIncomeFileServiceImpl(CostIncomeGroupService costIncomeGroupService) {
-//        this.costIncomeGroupService = costIncomeGroupService;
-//    }
+    @Autowired
+    private CostIncomeGroupMapper costIncomeGroupMapper;
+
+
 
     /**
      * 保存文件上传记录
@@ -89,7 +93,7 @@ public class CostIncomeFileServiceImpl extends ServiceImpl<CostIncomeFileMapper,
     public PageUtils queryList(Integer current, Integer pageSize, String name, Long hospId) {
         Page<CostIncomeFile> costIncomeFilePage = new Page<>(current, pageSize);
         Page<CostIncomeFile> page = this.page(costIncomeFilePage, new QueryWrapper<CostIncomeFile>().lambda()
-                .eq(CostIncomeFile::getHospId, hospId).like(StrUtil.isNotBlank(name), CostIncomeFile::getFileName, name));
+                .eq(CostIncomeFile::getHospId, hospId).like(StrUtil.isNotBlank(name), CostIncomeFile::getFileName, name).orderByDesc(CostIncomeFile::getCreateTime));
         List<CostIncomeFile> records = page.getRecords();
         List<CostIncomeFileVO> costIncomeFileVOList = BeanUtil.convertList(records, CostIncomeFileVO.class);
         costIncomeFileVOList.forEach(i->{
@@ -112,12 +116,40 @@ public class CostIncomeFileServiceImpl extends ServiceImpl<CostIncomeFileMapper,
      */
     @Override
     @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
-    public void deleteImport(Integer id, Long hospId) {
+    public void deleteImport(Long id, Long hospId) {
         CostIncomeFile costIncomeFile = this.getById(id);
         if (Objects.isNull(costIncomeFile)){
             throw new CostException(500,"文件记录不存在");
         }
         // 根据文件的Id 和 医院Id获取数据
+        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,"数据已撤销");
+        }
+        List<Long> list = costIncomeGroupList.stream().map(CostIncomeGroup::getId).collect(Collectors.toList());
+        costIncomeGroupMapper.deleteBatchIds(list);
+    }
 
+    /**
+     * 错误详情
+     *
+     * @param id
+     * @param hospId
+     * @return
+     */
+    @Override
+    public List<IncomeErrorMessage> getErrorList(Long id, Long hospId) {
+        CostIncomeFile costIncomeFile = this.getById(id);
+        if (Objects.isNull(costIncomeFile)){
+            throw new CostException(500,"文件记录不存在");
+        }
+        String errorList = costIncomeFile.getErrorList();
+        if (StrUtil.isBlank(errorList)){
+            return null;
+        }
+        List<IncomeErrorMessage> incomeErrorMessageList = JsonUtil.toList(errorList, IncomeErrorMessage.class);
+        return incomeErrorMessageList;
     }
+
 }

+ 65 - 42
src/main/java/com/imed/costaccount/service/impl/CostIncomeGroupServiceImpl.java

@@ -127,27 +127,27 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
     /**
      * 批量导入收入数据
      *
-     * @param list   输入的文件
+     * @param list 输入的文件
      * @param user 用户
      * @param file
      * @return
      */
     @Override
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
-    public Result importIncomeGroup(List<List<Object>> list, User user, MultipartFile file,String dateTime,Integer fileType) {
+    public Result importIncomeGroup(List<List<Object>> list, User user, MultipartFile file, String dateTime, Integer fileType) {
         // 先检验当前年月是否存在数据
         int year = 0;
         int month = 0;
         Date date = DateUtils.StringToDate(dateTime, DateStyleEnum.YYYY_MM_DD);
         if (StrUtil.isNotBlank(dateTime)) {
             year = DateUtil.year(date);
-            month =DateUtil.month(date)+1;
+            month = DateUtil.month(date) + 1;
         }
         Long hospId = user.getHospId();
         List<CostIncomeGroup> groups = this.list(new QueryWrapper<CostIncomeGroup>().lambda().eq(CostIncomeGroup::getHospId, hospId)
                 .eq(CostIncomeGroup::getDateYear, year).eq(CostIncomeGroup::getDateMonth, month));
-        if (!CollectionUtils.isEmpty(groups)){
-            throw new CostException(500,year+"年"+month+"月数据已存在");
+        if (!CollectionUtils.isEmpty(groups)) {
+            throw new CostException(500, year + "年" + month + "月数据已存在");
         }
         // 移除前几行的抬头内容  list的大小对应的就是行数的大小
         for (int i = list.size() - 1; i >= 0; i--) {
@@ -175,29 +175,32 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
         Map<Long, Long> accountProMap = getProductIdAccountIdMap(accountingProductList);
         List<CostIncomeGroup> costIncomeGroupArrayList = new ArrayList<>();
         // 检验数据
-        checkImportData(list, incomeErrorMessageList, costIncomeGroupArrayList, departmentMap, productMap, responsibilityMap, accountingMap, responsibilityDepMap, accountProMap,hospId,year,month);
+        checkImportData(list, incomeErrorMessageList, costIncomeGroupArrayList, departmentMap, productMap, responsibilityMap, accountingMap, responsibilityDepMap, accountProMap, hospId, year, month);
 
         // 文件上传
         String uploadFile = uploadFile(file, UserContext.getCurrentUser());
         // 上传记录保存
-        if (StrUtil.isBlank(uploadFile)){
-            throw new CostException(500,"文件上传异常");
+        if (StrUtil.isBlank(uploadFile)) {
+            throw new CostException(500, "文件上传异常");
         }
         // 记录文件上传记录
-        CostIncomeFile costIncomeFile =costIncomeFileService.saveCostIncomeFile(list, user, file, hospId, incomeErrorMessageList, uploadFile,fileType);
+        CostIncomeFile costIncomeFile = costIncomeFileService.saveCostIncomeFile(list, user, file, hospId, incomeErrorMessageList, uploadFile, fileType);
         Long id = costIncomeFile.getId();
-        costIncomeGroupArrayList.forEach(i->{
+        costIncomeGroupArrayList.forEach(i -> {
             // 设置文件Id
             i.setFileId(id);
         });
-        if (CollectionUtils.isEmpty(incomeErrorMessageList)){
+        if (CollectionUtils.isEmpty(incomeErrorMessageList)) {
             this.saveBatch(costIncomeGroupArrayList);
+            return Result.build(200,"数据导入成功",null);
+        }else {
+            return Result.build(500, "数据未成功导入", null);
         }
-        return Result.ok();
     }
 
     /**
      * 返回成本会计对照数据  Key 成本项目Id   Value 会计科目Id
+     *
      * @param accountingProductList
      * @return
      */
@@ -210,6 +213,7 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
      * Map类型
      * Key DepartmentId
      * Value ResponsibilityId
+     *
      * @param responsibilityDepartmentList
      * @return
      */
@@ -219,12 +223,13 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
 
     public List<ResponsibilityDepartment> getResponsibilityDepartments(Long hospId) {
         return responsibilityDepartmentService.list(new QueryWrapper<ResponsibilityDepartment>().lambda()
-                    .eq(ResponsibilityDepartment::getHospId, hospId));
+                .eq(ResponsibilityDepartment::getHospId, hospId));
     }
 
     /**
      * Key AccountId
      * Value Accounting对象
+     *
      * @param hospId
      * @return
      */
@@ -235,6 +240,7 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
     /**
      * Key responsibilityId 责任中心Id
      * Value Responsibility对象
+     *
      * @param hospId
      * @return
      */
@@ -245,15 +251,18 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
     /**
      * Key 成本项目Code+Name
      * Value 成本项目对象
+     *
      * @param hospId
      * @return
      */
     public Map<String, Product> getProductByCodeNameMap(Long hospId) {
         return productService.list(new QueryWrapper<Product>().lambda().eq(Product::getHospId, hospId)).stream().collect(Collectors.toMap(k -> k.getProductCode() + k.getProductName(), synOe -> synOe));
     }
+
     /**
      * Key 科室项目Code+Name
      * Value 科室对象
+     *
      * @param hospId
      * @return
      */
@@ -279,7 +288,8 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
 
     /**
      * 检验数据
-     *  @param list                     表单数据
+     *
+     * @param list                     表单数据
      * @param incomeErrorMessageList   存储错误信息的集合
      * @param costIncomeGroupArrayList
      * @param departmentMap            科室Map
@@ -290,7 +300,7 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
      * @param accountProMap            责任中心Map
      * @param hospId
      */
-    private void checkImportData(List<List<Object>> list, List<IncomeErrorMessage> incomeErrorMessageList, List<CostIncomeGroup> costIncomeGroupArrayList, Map<String, Department> departmentMap, Map<String, Product> productMap, Map<Long, Responsibility> responsibilityMap, Map<Long, Accounting> accountingMap, Map<Long, Long> responsibilityDepMap, Map<Long, Long> accountProMap, Long hospId,Integer year,Integer month) {
+    private void checkImportData(List<List<Object>> list, List<IncomeErrorMessage> incomeErrorMessageList, List<CostIncomeGroup> costIncomeGroupArrayList, Map<String, Department> departmentMap, Map<String, Product> productMap, Map<Long, Responsibility> responsibilityMap, Map<Long, Accounting> accountingMap, Map<Long, Long> responsibilityDepMap, Map<Long, Long> accountProMap, Long hospId, Integer year, Integer month) {
         for (int i = 0; i < list.size(); i++) {
             CostIncomeGroup costIncomeGroup = new CostIncomeGroup();
             AfterIncomegroup afterIncomegroup = new AfterIncomegroup();
@@ -325,8 +335,8 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
             Product product = productMap.get(productCode + productName);
             Department department = departmentMap.get(openDepartmentCode + openDepartmentName);
             Department department1 = departmentMap.get(startDepartmentCode + startDepartmentName);
-            if (!checkNull && !checkOne ){
-                if (StrUtil.isNotBlank(productCode) && StrUtil.isNotBlank(productName)){
+            if (!checkNull && !checkOne) {
+                if (StrUtil.isNotBlank(productCode) && StrUtil.isNotBlank(productName)) {
                     if (Objects.isNull(product)) {
                         incomeErrorMessage.setTotal(i);
                         incomeErrorMessage.setErrMessage("代码:" + productCode + " 名称:" + productName + "成本项目不存在");
@@ -346,16 +356,16 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
                             costIncomeGroup.setAccountName(accountingMap.get(accountId).getAccountingName());
                         }
                     }
-                }else{
+                } else {
                     costIncomeGroup.setProductCode(null);
                     costIncomeGroup.setProductName(null);
-                    costIncomeGroup.setAccountCode( null);
+                    costIncomeGroup.setAccountCode(null);
                     costIncomeGroup.setAccountName(null);
                 }
             }
             // 检验开单科室
-            if (!checkNull && !checkOne ){
-                if (StrUtil.isNotBlank(openDepartmentCode) && StrUtil.isNotBlank(openDepartmentName)){
+            if (!checkNull && !checkOne) {
+                if (StrUtil.isNotBlank(openDepartmentCode) && StrUtil.isNotBlank(openDepartmentName)) {
                     // 开单科室
                     if (Objects.isNull(department)) {
                         incomeErrorMessage.setTotal(i);
@@ -374,10 +384,12 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
                             costIncomeGroup.setOpenDepartmentName(openDepartmentName);
                             costIncomeGroup.setOpenResponsibilityCode(responsibility.getResponsibilityCode());
                             costIncomeGroup.setOpenResponsibilityName(responsibility.getResponsibilityName());
+                            afterIncomegroup.setOpenDepartmentCode(openDepartmentCode);
+                            afterIncomegroup.setOpenDepartmentName(openDepartmentName);
                             afterIncomegroup.setOpenDepartmentStatus(responsibility.getResponsibilityType());
                         }
                     }
-                }else {
+                } else {
                     costIncomeGroup.setOpenDepartmentCode(null);
                     costIncomeGroup.setOpenDepartmentName(null);
                     costIncomeGroup.setOpenResponsibilityCode(null);
@@ -385,8 +397,8 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
                 }
             }
             // 检验执行科室
-            if ( !checkNull && !checkOne ){
-                if (StrUtil.isNotBlank(startDepartmentCode) && StrUtil.isNotBlank(startDepartmentName)){
+            if (!checkNull && !checkOne) {
+                if (StrUtil.isNotBlank(startDepartmentCode) && StrUtil.isNotBlank(startDepartmentName)) {
                     //执行科室
                     if (Objects.isNull(department1)) {
                         incomeErrorMessage.setTotal(i);
@@ -405,10 +417,12 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
                             costIncomeGroup.setStartDepartmentName(startDepartmentName);
                             costIncomeGroup.setStartResponsibilityCode(responsibility.getResponsibilityCode());
                             costIncomeGroup.setStartResponsibilityName(responsibility.getResponsibilityName());
+                            afterIncomegroup.setStartDepartmentCode(startDepartmentCode);
+                            afterIncomegroup.setStartDepartmentName(startDepartmentName);
                             afterIncomegroup.setStartDepartmentStatus(responsibility.getResponsibilityType());
                         }
                     }
-                }else {
+                } else {
                     costIncomeGroup.setStartDepartmentCode(null);
                     costIncomeGroup.setStartDepartmentName(null);
                     costIncomeGroup.setStartResponsibilityCode(null);
@@ -420,7 +434,7 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
                     .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())){
+            if (StrUtil.isNotBlank(costIncomeGroup.getOpenResponsibilityCode())) {
 
             }
             costIncomeGroup.setHospId(hospId);
@@ -431,22 +445,31 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
             // 检验数据
             Integer openDepartmentStatus = afterIncomegroup.getOpenDepartmentStatus();
             Integer startDepartmentStatus = afterIncomegroup.getStartDepartmentStatus();
-            Map<String, CostIncomeGroupSet> incomeGroupSetMap = costIncomeGroupSetService.list(new QueryWrapper<CostIncomeGroupSet>().lambda().eq(CostIncomeGroupSet::getHospId, hospId)).stream().collect(Collectors.toMap(k -> k.getOpenDepartmentStatus().toString() + k.getStartDepartmentStatus().toString(), synOe -> synOe));
-            CostIncomeGroupSet costIncomeGroupSet = incomeGroupSetMap.get(openDepartmentStatus.toString() + startDepartmentStatus.toString());
-            if (Objects.nonNull(costIncomeGroupSet)){
-                afterIncomegroup.setOpenDepartmentStatus(costIncomeGroupSet.getOpenDepartmentStatus());
-                afterIncomegroup.setOpenDepartmentProportion(costIncomeGroupSet.getOpenDepartmentProportion());
-                // TODO 金额
-//                afterIncomegroup.setOpenDepartmentDecimal(beforeMoney.multiply();
-                afterIncomegroup.setStartDepartmentStatus(costIncomeGroupSet.getStartDepartmentStatus());
-                afterIncomegroup.setStartDepartmentProportion(costIncomeGroupSet.getStartDepartmentProportion());
-                // TODO 金额
-//                afterIncomegroup.setOpenDepartmentDecimal(beforeMoney.multiply();
-                if (NumberConstant.ZERO.equals(costIncomeGroupSet.getOpenDepartmentProportion()) && NumberConstant.ZERO.equals(costIncomeGroupSet.getStartDepartmentProportion())){
-                    afterIncomegroup.setResponsibilityCodes(costIncomeGroupSet.getResponsibilityCodes());
-                    afterIncomegroup.setDirectStatus(NumberConstant.TWO);
+            if (Objects.nonNull(openDepartmentStatus) && Objects.nonNull(startDepartmentStatus)) {
+                Map<String, CostIncomeGroupSet> incomeGroupSetMap = costIncomeGroupSetService.list(new QueryWrapper<CostIncomeGroupSet>().lambda().eq(CostIncomeGroupSet::getHospId, hospId)).stream().collect(Collectors.toMap(k -> k.getOpenDepartmentStatus().toString() + k.getStartDepartmentStatus().toString(), synOe -> synOe));
+                CostIncomeGroupSet costIncomeGroupSet = incomeGroupSetMap.get(openDepartmentStatus.toString() + startDepartmentStatus.toString());
+                if (Objects.nonNull(costIncomeGroupSet)) {
+                    Map<String, Responsibility> map = responsibilityService.list(new QueryWrapper<Responsibility>().lambda().eq(Responsibility::getHospId, hospId)).stream().collect(Collectors.toMap(Responsibility::getResponsibilityCode, synOe -> synOe));
+                    // 开单科室比例
+                    BigDecimal openDepartmentProportion = new BigDecimal(costIncomeGroupSet.getOpenDepartmentProportion().toString());
+                    // 执行科室比例
+                    BigDecimal startDepartmentProportion = new BigDecimal(costIncomeGroupSet.getStartDepartmentProportion().toString());
+                    // beforeMoney
+                    afterIncomegroup.setOpenDepartmentDecimal(beforeMoney.multiply(openDepartmentProportion).divide(new BigDecimal(100), 4, BigDecimal.ROUND_HALF_UP));
+                    afterIncomegroup.setStartDepartmentDecimal(beforeMoney.multiply(startDepartmentProportion).divide(new BigDecimal(100), 4, BigDecimal.ROUND_HALF_UP));
+                    String responsibilityCodes = costIncomeGroupSet.getResponsibilityCodes();
+                    if (NumberConstant.TWO.equals(costIncomeGroupSet.getOpenDepartmentStatus()) && NumberConstant.TWO.equals(costIncomeGroupSet.getStartDepartmentStatus()) && StrUtil.isNotBlank(responsibilityCodes)) {
+                        // /拼接的
+                        afterIncomegroup.setDirectStatus(NumberConstant.TWO);
+                        String responsibilityCode = responsibilityCodes.split(StrUtil.SLASH)[responsibilityCodes.split(StrUtil.SLASH).length - 1];
+                        Responsibility responsibility = map.get(responsibilityCode);
+                        if (Objects.nonNull(responsibility)) {
+                            afterIncomegroup.setResponsibilityCode(responsibility.getResponsibilityCode());
+                            afterIncomegroup.setResponsibilityName(responsibility.getResponsibilityName());
+                        }
+                        costIncomeGroup.setAfterIncomeGroup(JSON.toJSONString(afterIncomegroup));
+                    }
                 }
-                costIncomeGroup.setAfterIncomeGroup(JSON.toJSONString(afterIncomegroup));
             }
 
             costIncomeGroupArrayList.add(costIncomeGroup);
@@ -485,7 +508,7 @@ public class CostIncomeGroupServiceImpl extends ServiceImpl<CostIncomeGroupMappe
      */
     public String uploadFile(MultipartFile file, User user) {
         Long hospId = user.getHospId();
-        String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf("."))+System.currentTimeMillis()+".xsl";
+        String fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf(".")) + System.currentTimeMillis() + ".xsl";
         String localFilePath = fileTempPath + StrUtil.SLASH + hospId + StrUtil.SLASH;
         File tempFile = new File(localFilePath);
         if (!tempFile.exists()) {

+ 10 - 1
src/main/java/com/imed/costaccount/web/CostIncomeFileController.java

@@ -4,6 +4,7 @@ import com.imed.costaccount.common.util.PageUtils;
 import com.imed.costaccount.common.util.Result;
 import com.imed.costaccount.common.util.UserContext;
 import com.imed.costaccount.model.CostIncomeFile;
+import com.imed.costaccount.model.vo.IncomeErrorMessage;
 import com.imed.costaccount.service.CostIncomeFileService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -11,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
+import java.util.List;
 
 
 /**
@@ -46,11 +48,18 @@ public class CostIncomeFileController {
      */
     @PostMapping("/deleteImport")
     @ApiOperation("撤销导入")
-    public Result deleteImport(Integer id){
+    public Result deleteImport(Long id){
         Long hospId = UserContext.getHospId();
         costIncomeFileService.deleteImport(id,hospId);
         return Result.ok();
     }
+    @GetMapping("/getErrorList")
+    @ApiOperation("查看错误详情")
+    public Result getErrorList(Long id){
+        Long hospId = UserContext.getHospId();
+        List<IncomeErrorMessage> incomeErrorMessageList = costIncomeFileService.getErrorList(id,hospId);
+        return Result.ok(incomeErrorMessageList);
+    }
     /**
      * 信息
      */