Jelajahi Sumber

代码调整

songxinlu 3 tahun lalu
induk
melakukan
e9fef87d9b

+ 2 - 0
daqe-center/src/main/java/com/lantone/daqe/facade/BlockLossManagementFacade.java

@@ -86,6 +86,8 @@ public class BlockLossManagementFacade {
     public Boolean upBlockLossById(UpBlockLossByIdVO upBlockLossByIdVO) {
         BlocklossResult blocklossResult = new BlocklossResult();
         BeanUtils.copyProperties(upBlockLossByIdVO, blocklossResult);
+        blocklossResult.setModifier(SysUserUtils.getCurrentPrinciple());
+        blocklossResult.setGmtModified(DateUtil.now());
         return blocklossResultFacade.updateById(blocklossResult);
     }
 

+ 18 - 1
daqe-center/src/main/java/com/lantone/daqe/facade/RegularManagementFacade.java

@@ -8,7 +8,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.lantone.common.enums.IsDeleteEnum;
 import com.lantone.common.exception.Asserts;
 import com.lantone.common.util.BeanUtil;
+import com.lantone.common.util.DateUtil;
 import com.lantone.common.util.StringUtil;
+import com.lantone.common.util.SysUserUtils;
 import com.lantone.daqe.dto.GetRegularPageDTO;
 import com.lantone.daqe.entity.RegularInfo;
 import com.lantone.daqe.entity.RegularMapping;
@@ -76,6 +78,8 @@ public class RegularManagementFacade {
         if (regularInfoFacade.isExist(regularInfo)) {
             Asserts.fail("该正则式已存在!");
         }
+        regularInfo.setCreator(SysUserUtils.getCurrentPrinciple());
+        regularInfo.setGmtCreate(DateUtil.now());
         return regularInfoFacade.save(regularInfo);
     }
 
@@ -92,6 +96,8 @@ public class RegularManagementFacade {
         //修改正则式
         RegularInfo regularInfo = new RegularInfo();
         BeanUtil.copyProperties(upRegularByIdVO, regularInfo);
+        regularInfo.setModifier(SysUserUtils.getCurrentPrinciple());
+        regularInfo.setGmtModified(DateUtil.now());
         //修改表字段的正则式校验结果表中的正则式
         if (regularInfoFacade.updateById(regularInfo)) {
             return regularResultFacade.update(new UpdateWrapper<RegularResult>()
@@ -100,6 +106,8 @@ public class RegularManagementFacade {
                     .eq("is_deleted", IsDeleteEnum.N.getKey())
                     .set("regular_name", upRegularByIdVO.getName())
                     .set("regular_val", upRegularByIdVO.getVal())
+                    .set("modifier", SysUserUtils.getCurrentPrinciple())
+                    .set("gmt_modified", DateUtil.now())
                     .set("regular_des", upRegularByIdVO.getDescription()));
         }
         return false;
@@ -131,17 +139,26 @@ public class RegularManagementFacade {
         if (regularInfoFacade.getById(id) == null) {
             Asserts.fail("该正则式不存在!");
         }
-        if (regularInfoFacade.removeById(id)) {
+        RegularInfo regularInfo = new RegularInfo();
+        regularInfo.setId(id);
+        regularInfo.setModifier(SysUserUtils.getCurrentPrinciple());
+        regularInfo.setGmtModified(DateUtil.now());
+        regularInfo.setIsDeleted(IsDeleteEnum.Y.getKey());
+        if (regularInfoFacade.updateById(regularInfo)) {
             //删除表字段的实际值与正则式关联关系
             if (regularMappingFacade.update(new UpdateWrapper<RegularMapping>()
                     .eq("regular_id", id)
                     .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .set("modifier", SysUserUtils.getCurrentPrinciple())
+                    .set("gmt_modified", DateUtil.now())
                     .set("is_deleted", IsDeleteEnum.Y.getKey()))) {
                 //删除表字段的正则式校验结果表中的正则式
                 return regularResultFacade.update(new UpdateWrapper<RegularResult>()
                         .eq(hospitalId != null, "hospital_id", hospitalId)
                         .eq("regular_id", id)
                         .eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .set("modifier", SysUserUtils.getCurrentPrinciple())
+                        .set("gmt_modified", DateUtil.now())
                         .set("is_deleted", IsDeleteEnum.Y.getKey()));
             }
 

+ 0 - 4
daqe-center/src/main/java/com/lantone/daqe/task/BlockLossDataCompareTask.java

@@ -1,11 +1,8 @@
 package com.lantone.daqe.task;
 
-import com.lantone.common.enums.IsDeleteEnum;
 import com.lantone.common.util.DateUtil;
-import com.lantone.common.util.StringUtil;
 import com.lantone.common.vo.DataCompareVO;
 import com.lantone.daqe.facade.BlockLossManagementFacade;
-import com.lantone.daqe.facade.base.BlocklossResultFacade;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -17,7 +14,6 @@ import org.springframework.scheduling.annotation.SchedulingConfigurer;
 import org.springframework.scheduling.config.ScheduledTaskRegistrar;
 import org.springframework.scheduling.support.CronTrigger;
 
-import java.time.LocalDateTime;
 import java.util.Date;
 
 @Configuration      //1.主要用于标记配置类,兼备Component的效果。

+ 1 - 1
daqe-center/src/main/java/com/lantone/daqe/web/BlockLossManagementController.java

@@ -41,6 +41,7 @@ public class BlockLossManagementController {
 
     @ApiOperation(value = "通过id修改病历数据块丢失明细 [by:songxl]", notes = "通过id修改病历数据块丢失明细")
     @PostMapping("/upBlockLossById")
+    @Transactional
     public CommonResult<Boolean> upBlockLossById(@RequestBody @Valid UpBlockLossByIdVO upBlockLossByIdVO) {
         return CommonResult.success(blockLossManagementFacade.upBlockLossById(upBlockLossByIdVO));
     }
@@ -55,7 +56,6 @@ public class BlockLossManagementController {
 
     @ApiOperation(value = "丢失量分类汇总 [by:songxl]", notes = "丢失量分类汇总")
     @PostMapping("/blockLossTypeGather")
-    @Transactional
     public CommonResult<BlockLossTypeGatherDTO> blockLossTypeGather(@RequestBody @Valid BlockLossTypeGatherVO blockLossTypeGatherVO) {
         return CommonResult.success(blockLossManagementFacade.blockLossTypeGather(blockLossTypeGatherVO));
     }

+ 2 - 0
daqe-center/src/main/java/com/lantone/daqe/web/DiseaseManagementController.java

@@ -16,6 +16,7 @@ import com.lantone.daqe.vo.UpDiseaseByIdVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -77,6 +78,7 @@ public class DiseaseManagementController {
 
     @ApiOperation(value = "医院诊断标准词匹配信息导入 [by:songxl]", notes = "医院诊断标准词匹配信息导入")
     @PostMapping("/importDisease")
+    @Transactional
     public void importDisease(HttpServletResponse response, @RequestParam("file") MultipartFile file) {
         diseaseManagementFacade.importDisease(response, file);
     }

+ 2 - 0
daqe-center/src/main/java/com/lantone/daqe/web/DrugManagementController.java

@@ -16,6 +16,7 @@ import com.lantone.daqe.vo.UpDrugByIdVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -71,6 +72,7 @@ public class DrugManagementController {
 
     @ApiOperation(value = "药品匹配信息导入 [by:songxl]", notes = "药品匹配信息导入")
     @PostMapping("/importDrug")
+    @Transactional
     public void importDrug(HttpServletResponse response, @RequestParam("file") MultipartFile file) {
         drugManagementFacade.importDrug(response, file);
     }

+ 2 - 0
daqe-center/src/main/java/com/lantone/daqe/web/OperationManagementController.java

@@ -16,6 +16,7 @@ import com.lantone.daqe.vo.UpOperationByIdVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -71,6 +72,7 @@ public class OperationManagementController {
 
     @ApiOperation(value = "医院手术标准词匹配信息导入 [by:songxl]", notes = "医院手术标准词匹配信息导入")
     @PostMapping("/importOperation")
+    @Transactional
     public void importOperation(HttpServletResponse response, @RequestParam("file") MultipartFile file) {
         operationManagementFacade.importOperation(response, file);
     }

+ 4 - 0
daqe-center/src/main/java/com/lantone/daqe/web/RegularManagementController.java

@@ -12,6 +12,7 @@ import com.lantone.daqe.vo.UpRegularByIdVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -40,18 +41,21 @@ public class RegularManagementController {
 
     @ApiOperation(value = "新增正则式 [by:songxl]", notes = "新增正则式")
     @PostMapping("/addRegular")
+    @Transactional
     public CommonResult<Boolean> addRegular(@RequestBody @Valid AddRegularVO addRegularVO) {
         return CommonResult.success(regularManagementFacade.addRegular(addRegularVO));
     }
 
     @ApiOperation(value = "通过id修改正则式 [by:songxl]", notes = "通过id修改正则式")
     @PostMapping("/upRegularById")
+    @Transactional
     public CommonResult<Boolean> upRegularById(@RequestBody @Valid UpRegularByIdVO upRegularByIdVO) {
         return CommonResult.success(regularManagementFacade.upRegularById(upRegularByIdVO));
     }
 
     @ApiOperation(value = "通过id删除正则式 [by:songxl]", notes = "通过id删除正则式")
     @PostMapping("/delRegularById")
+    @Transactional
     public CommonResult<Boolean> delRegularById(@RequestBody @Valid DelRegularByIdVO delRegularByIdVO) {
         return CommonResult.success(regularManagementFacade.delRegularById(delRegularByIdVO));
     }