Przeglądaj źródła

设置批量删除事务护理

ljx 3 lat temu
rodzic
commit
440da9e6f8
21 zmienionych plików z 128 dodań i 7 usunięć
  1. 6 0
      src/main/java/com/imed/costaccount/service/CostNumberBedSetService.java
  2. 6 0
      src/main/java/com/imed/costaccount/service/CostOtherPaymentsDataService.java
  3. 6 0
      src/main/java/com/imed/costaccount/service/CostOtherPaymentsService.java
  4. 6 0
      src/main/java/com/imed/costaccount/service/CostResponsibilityDepartmentService.java
  5. 5 0
      src/main/java/com/imed/costaccount/service/CostShareLevelService.java
  6. 6 0
      src/main/java/com/imed/costaccount/service/CostShareParamService.java
  7. 6 0
      src/main/java/com/imed/costaccount/service/DepartmentService.java
  8. 11 0
      src/main/java/com/imed/costaccount/service/impl/CostNumberBedSetServiceImpl.java
  9. 11 0
      src/main/java/com/imed/costaccount/service/impl/CostOtherPaymentsDataServiceImpl.java
  10. 11 0
      src/main/java/com/imed/costaccount/service/impl/CostOtherPaymentsServiceImpl.java
  11. 13 0
      src/main/java/com/imed/costaccount/service/impl/CostResponsibilityDepartmentServiceImpl.java
  12. 11 0
      src/main/java/com/imed/costaccount/service/impl/CostShareLevelServiceImpl.java
  13. 11 0
      src/main/java/com/imed/costaccount/service/impl/CostShareParamServiceImpl.java
  14. 12 0
      src/main/java/com/imed/costaccount/service/impl/DepartmentServiceImpl.java
  15. 1 1
      src/main/java/com/imed/costaccount/web/CostNumberBedSetController.java
  16. 1 1
      src/main/java/com/imed/costaccount/web/CostOtherPaymentsController.java
  17. 1 1
      src/main/java/com/imed/costaccount/web/CostOtherPaymentsDataController.java
  18. 1 1
      src/main/java/com/imed/costaccount/web/CostResponsibilityDepartmentController.java
  19. 1 1
      src/main/java/com/imed/costaccount/web/CostShareLevelController.java
  20. 1 1
      src/main/java/com/imed/costaccount/web/CostShareParamController.java
  21. 1 1
      src/main/java/com/imed/costaccount/web/DepartmentController.java

+ 6 - 0
src/main/java/com/imed/costaccount/service/CostNumberBedSetService.java

@@ -66,5 +66,11 @@ public interface CostNumberBedSetService extends IService<CostNumberBedSet> {
      * @return
      */
     List<ReportFormVO> getReportNumberBedStatus(Integer reportType, Long hospId, Integer id);
+
+    /**
+     * 删除诊次/床日成本设置
+     * @param idList idList
+     */
+    void deleteByIds(List<Long> idList);
 }
 

+ 6 - 0
src/main/java/com/imed/costaccount/service/CostOtherPaymentsDataService.java

@@ -48,5 +48,11 @@ public interface CostOtherPaymentsDataService extends IService<CostOtherPayments
      * @return
      */
     List<CostOtherPaymentsData> getByMonth(int year, int month, Long hospId);
+
+    /**
+     * 批量删除全院其他收支设置数据
+     * @param idList
+     */
+    void deleteByIds(List<Long> idList);
 }
 

+ 6 - 0
src/main/java/com/imed/costaccount/service/CostOtherPaymentsService.java

@@ -52,5 +52,11 @@ public interface CostOtherPaymentsService extends IService<CostOtherPayments> {
      * @return
      */
     List<CostOtherPaymentsVO> getAll(Long hospId);
+
+    /**
+     *  删除全院其他收支设置数据
+     * @param asList
+     */
+    void deleteByIds(List<Long> asList);
 }
 

+ 6 - 0
src/main/java/com/imed/costaccount/service/CostResponsibilityDepartmentService.java

@@ -21,5 +21,11 @@ public interface CostResponsibilityDepartmentService extends IService<CostRespon
      * @return
      */
     List<CostDepartmentVO> getByResponsibilityId(Integer responsibilityId);
+
+    /**
+     * 批量删除责任中心科室损益信息
+     * @param idList 责任中心科室对应的Id集合
+     */
+    void deleteByIds(List<Integer> idList);
 }
 

+ 5 - 0
src/main/java/com/imed/costaccount/service/CostShareLevelService.java

@@ -57,5 +57,10 @@ public interface CostShareLevelService extends IService<CostShareLevel> {
 
     List<Long> getMaxId(Long hospId);
 
+    /**
+     * 删除分摊等级的数据
+     * @param idList 分摊层级的id
+     */
+    void deleteByIds(List<Integer> idList);
 }
 

+ 6 - 0
src/main/java/com/imed/costaccount/service/CostShareParamService.java

@@ -77,5 +77,11 @@ public interface CostShareParamService extends IService<CostShareParam> {
      * @return
      */
     String getByCode(String shareParamCode, Long hospId);
+
+    /**
+     * 批量删除分摊参数
+     * @param asList
+     */
+    void deleteByIds(List<Integer> asList);
 }
 

+ 6 - 0
src/main/java/com/imed/costaccount/service/DepartmentService.java

@@ -55,5 +55,11 @@ public interface DepartmentService extends IService<Department> {
      * @return
      */
     Result importDepartment(List<List<Object>> read, Long hospId);
+
+    /**
+     * 批量删除科室信息
+     * @param idList 科室Id集合
+     */
+    void deleteByIds(List<Integer> idList);
 }
 

+ 11 - 0
src/main/java/com/imed/costaccount/service/impl/CostNumberBedSetServiceImpl.java

@@ -279,5 +279,16 @@ public class CostNumberBedSetServiceImpl extends ServiceImpl<CostNumberBedSetMap
         return roots;
     }
 
+    /**
+     * 删除诊次/床日成本设置
+     *
+     * @param idList idList
+     */
+    @Override
+    @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
+    public void deleteByIds(List<Long> idList) {
+        this.removeByIds(idList);
+    }
+
 
 }

+ 11 - 0
src/main/java/com/imed/costaccount/service/impl/CostOtherPaymentsDataServiceImpl.java

@@ -162,4 +162,15 @@ public class CostOtherPaymentsDataServiceImpl extends ServiceImpl<CostOtherPayme
                         .eq(CostOtherPaymentsData::getHospId, hospId)
         );
     }
+
+    /**
+     * 批量删除全院其他收支设置数据
+     *
+     * @param idList 全院其他收支设置数据的集合
+     */
+    @Override
+    @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
+    public void deleteByIds(List<Long> idList) {
+        this.removeByIds(idList);
+    }
 }

+ 11 - 0
src/main/java/com/imed/costaccount/service/impl/CostOtherPaymentsServiceImpl.java

@@ -121,4 +121,15 @@ public class CostOtherPaymentsServiceImpl extends ServiceImpl<CostOtherPaymentsM
         List<CostOtherPayments> costOtherPaymentsList = this.list(new QueryWrapper<CostOtherPayments>().lambda().eq(CostOtherPayments::getHospId, hospId));
         return BeanUtil.convertList(costOtherPaymentsList, CostOtherPaymentsVO.class);
     }
+
+    /**
+     * 删除全院其他收支设置数据
+     *
+     * @param idList 收支设置的Id集合
+     */
+    @Override
+    @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
+    public void deleteByIds(List<Long> idList) {
+        this.removeByIds(idList);
+    }
 }

+ 13 - 0
src/main/java/com/imed/costaccount/service/impl/CostResponsibilityDepartmentServiceImpl.java

@@ -14,6 +14,8 @@ import com.imed.costaccount.common.util.BeanUtil;
 import org.apache.shiro.SecurityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
 import java.util.List;
@@ -53,4 +55,15 @@ public class CostResponsibilityDepartmentServiceImpl extends ServiceImpl<CostRes
         });
         return departVOList;
     }
+
+    /**
+     * 批量删除责任中心科室损益信息
+     *
+     * @param idList 责任中心科室对应的Id集合
+     */
+    @Override
+    @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
+    public void deleteByIds(List<Integer> idList) {
+        this.removeByIds(idList);
+    }
 }

+ 11 - 0
src/main/java/com/imed/costaccount/service/impl/CostShareLevelServiceImpl.java

@@ -157,4 +157,15 @@ public class CostShareLevelServiceImpl extends ServiceImpl<CostShareLevelMapper,
         List<Long> ids = baseMapper.getMaxIds(hospId);
         return ids;
     }
+
+    /**
+     * 删除分摊等级的数据
+     *
+     * @param idList 分摊层级的id
+     */
+    @Override
+    @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
+    public void deleteByIds(List<Integer> idList) {
+        this.removeByIds(idList);
+    }
 }

+ 11 - 0
src/main/java/com/imed/costaccount/service/impl/CostShareParamServiceImpl.java

@@ -248,4 +248,15 @@ public class CostShareParamServiceImpl extends ServiceImpl<CostShareParamMapper,
         }
         return one.getShareParamName();
     }
+
+    /**
+     * 批量删除分摊参数
+     *
+     * @param asList 分摊参数的Id集合
+     */
+    @Override
+    @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
+    public void deleteByIds(List<Integer> asList) {
+        this.removeByIds(asList);
+    }
 }

+ 12 - 0
src/main/java/com/imed/costaccount/service/impl/DepartmentServiceImpl.java

@@ -112,6 +112,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
         department.setId(null);
         department.setCreateTime(System.currentTimeMillis());
         baseMapper.insert(department);
+        int a=10/0;
     }
 
     /**
@@ -223,4 +224,15 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             return Result.build(200, "有" + realDepartments.size() + "条数据已存在,未被导入", null);
         }
     }
+
+    /**
+     * 批量删除科室信息
+     *
+     * @param idList 科室Id集合
+     */
+    @Override
+    @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
+    public void deleteByIds(List<Integer> idList) {
+        this.removeByIds(idList);
+    }
 }

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

@@ -85,7 +85,7 @@ public class CostNumberBedSetController {
     @PostMapping("/delete")
     @ApiOperation("根据Id的集合删除")
     public Result delete(@RequestBody Long[] ids){
-		costNumberBedSetService.removeByIds(Arrays.asList(ids));
+        costNumberBedSetService.deleteByIds(Arrays.asList(ids));
         return Result.ok();
     }
     /**

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

@@ -90,7 +90,7 @@ public class CostOtherPaymentsController {
     @PostMapping("/delete")
     @ApiOperation("删除全院其他收支设置数据")
     public Result delete(@RequestBody Long[] ids){
-		costOtherPaymentsService.removeByIds(Arrays.asList(ids));
+        costOtherPaymentsService.deleteByIds(Arrays.asList(ids));
         return Result.ok();
     }
 

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

@@ -81,7 +81,7 @@ public class CostOtherPaymentsDataController {
     @PostMapping("/delete")
     @ApiOperation("批量删除全院其他收支数据")
     public Result delete(@RequestBody Long[] ids){
-		costOtherPaymentsDataService.removeByIds(Arrays.asList(ids));
+        costOtherPaymentsDataService.deleteByIds(Arrays.asList(ids));
         return Result.ok();
     }
 

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

@@ -79,7 +79,7 @@ public class CostResponsibilityDepartmentController {
      */
     @PostMapping("/delete")
     public Result delete(@RequestBody Integer[] ids){
-		costResponsibilityDepartmentService.removeByIds(Arrays.asList(ids));
+        costResponsibilityDepartmentService.deleteByIds(Arrays.asList(ids));
         return Result.ok();
     }
 

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

@@ -90,7 +90,7 @@ public class CostShareLevelController {
     @PostMapping("/delete")
     @ApiOperation("删除分摊层级数据")
     public Result delete(@RequestBody Integer[] ids){
-		costShareLevelService.removeByIds(Arrays.asList(ids));
+        costShareLevelService.deleteByIds(Arrays.asList(ids));
         return Result.ok();
     }
 

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

@@ -113,7 +113,7 @@ public class CostShareParamController {
     @PostMapping("/delete")
     @ApiOperation("删除分摊参数信息")
     public Result delete(@RequestBody Integer[] ids){
-		costShareParamService.removeByIds(Arrays.asList(ids));
+        costShareParamService.deleteByIds(Arrays.asList(ids));
         return Result.ok();
     }
 

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

@@ -85,7 +85,7 @@ public class DepartmentController {
     @PostMapping("/delete")
     @ApiOperation("删除科室信息")
     public Result delete(@RequestBody Integer[] ids){
-		departmentService.removeByIds(Arrays.asList(ids));
+        departmentService.deleteByIds(Arrays.asList(ids));
         return Result.ok();
     }