Selaa lähdekoodia

保存质控结果

gaodm 5 vuotta sitten
vanhempi
commit
ac02a3fcac

+ 5 - 5
src/main/java/com/diagbot/facade/AlgorithmFacade.java

@@ -88,32 +88,32 @@ public class AlgorithmFacade {
             }
 
         }
-        //修改
+        //删除
         if (algorithmVO.getType().equals(2)) {
             if (null == algorithmVO.getOptResultAlgVO()) {
-                throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "修改操作条目不能为空!");
+                throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "删除操作条目不能为空!");
             }
             //操作数据
             if (ListUtil.isNotEmpty(qcResultAlgVOList)) {
                 for (QcResultAlgVO qcResultAlgVO : qcResultAlgVOList) {
                     if (qcResultAlgVO.getId().equals(algorithmVO.getOptResultAlgVO().getId())) {
                         qcResultAlgVOList.remove(qcResultAlgVO);
-                        qcResultAlgVOList.add(algorithmVO.getOptResultAlgVO());
                         break;
                     }
                 }
             }
         }
-        //删除
+        //修改
         if (algorithmVO.getType().equals(3)) {
             if (null == algorithmVO.getOptResultAlgVO()) {
-                throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "删除操作条目不能为空!");
+                throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "修改操作条目不能为空!");
             }
             //操作数据
             if (ListUtil.isNotEmpty(qcResultAlgVOList)) {
                 for (QcResultAlgVO qcResultAlgVO : qcResultAlgVOList) {
                     if (qcResultAlgVO.getId().equals(algorithmVO.getOptResultAlgVO().getId())) {
                         qcResultAlgVOList.remove(qcResultAlgVO);
+                        qcResultAlgVOList.add(algorithmVO.getOptResultAlgVO());
                         break;
                     }
                 }

+ 33 - 0
src/main/java/com/diagbot/web/BehospitalInfoController.java

@@ -6,8 +6,11 @@ import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.BehospitalInfoDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.BehospitalInfoFacade;
+import com.diagbot.facade.QcresultDetailFacade;
+import com.diagbot.facade.QcresultInfoFacade;
 import com.diagbot.vo.AnalyzeVO;
 import com.diagbot.vo.BehospitalPageVO;
+import com.diagbot.vo.QcresultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -29,9 +32,12 @@ import java.util.Map;
 @RestController
 @RequestMapping("/qc/behospitalInfo")
 @Api(value = "病历API", tags = { "病历API" })
+@SuppressWarnings("unchecked")
 public class BehospitalInfoController {
     @Autowired
     BehospitalInfoFacade behospitalInfoFacade;
+    @Autowired
+    private QcresultInfoFacade qcresultInfoFacade;
 
     @ApiOperation(value = "病历分页列表[by:zhoutg]",
             notes = "")
@@ -51,4 +57,31 @@ public class BehospitalInfoController {
         Map<String, Object> data = behospitalInfoFacade.analyze(analyzeVO);
         return RespDTO.onSuc(data);
     }
+
+    @ApiOperation(value = "新增质控条目[by:zhoutg]",
+            notes = "")
+    @PostMapping("/addCase")
+    @SysLogger("addCase")
+    public RespDTO<Boolean> addCase(@RequestBody QcresultVO qcresultVO){
+        qcresultVO.setType(1);
+        return RespDTO.onSuc(qcresultInfoFacade.changeQcResult(qcresultVO));
+    }
+
+    @ApiOperation(value = "删除质控条目[by:zhoutg]",
+            notes = "")
+    @PostMapping("/delCase")
+    @SysLogger("delCase")
+    public RespDTO<Boolean> delCase(@RequestBody QcresultVO qcresultVO){
+        qcresultVO.setType(2);
+        return RespDTO.onSuc(qcresultInfoFacade.changeQcResult(qcresultVO));
+    }
+
+    @ApiOperation(value = "修改质控条目[by:zhoutg]",
+            notes = "")
+    @PostMapping("/updCase")
+    @SysLogger("updCase")
+    public RespDTO<Boolean> updCase(@RequestBody QcresultVO qcresultVO){
+        qcresultVO.setType(3);
+        return RespDTO.onSuc(qcresultInfoFacade.changeQcResult(qcresultVO));
+    }
 }

+ 1 - 0
src/main/java/com/diagbot/web/ConsoleController.java

@@ -20,6 +20,7 @@ import java.util.Map;
 @RequestMapping("/console")
 @RestController
 @Api(value = "控制台统计相关API", tags = { "控制台统计相关API" })
+@SuppressWarnings("unchecked")
 public class ConsoleController {
 
     @Autowired