wangyu 6 vuotta sitten
vanhempi
commit
7e9012daae

+ 2 - 3
icss-service/src/main/java/com/diagbot/facade/DoctorInfoFacade.java

@@ -1,7 +1,6 @@
 package com.diagbot.facade;
 
 import com.diagbot.dto.DoctorInfoDTO;
-import com.diagbot.dto.RespDTO;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.DoctorInfoServiceImpl;
@@ -24,12 +23,12 @@ public class DoctorInfoFacade extends DoctorInfoServiceImpl {
      * @param doctorInfoVo
      * @return
      */
-    public RespDTO<List<DoctorInfoDTO>> getDoctorInfo(@RequestBody DoctorInfoVO doctorInfoVo) {
+    public List<DoctorInfoDTO> getDoctorInfo(@RequestBody DoctorInfoVO doctorInfoVo) {
         List<DoctorInfoDTO> doctorInfoDTOList = this.getDoctorInfos(doctorInfoVo.getDoctorCode(),doctorInfoVo.getHosptialCode(),doctorInfoVo.getDeptCode());
         if(doctorInfoDTOList == null || doctorInfoDTOList.size() == 0){
             throw new CommonException(CommonErrorCode.NOT_EXISTS,
                     "获取医生信息失败");
         }
-        return RespDTO.onSuc(doctorInfoDTOList);
+        return doctorInfoDTOList;
     }
 }

+ 2 - 4
icss-service/src/main/java/com/diagbot/facade/HospitalInfoFacade.java

@@ -1,8 +1,6 @@
 package com.diagbot.facade;
 
 import com.diagbot.dto.HospitalInfoDTO;
-import com.diagbot.dto.IntroduceDTO;
-import com.diagbot.dto.RespDTO;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.HospitalInfoServiceImpl;
@@ -24,12 +22,12 @@ public class HospitalInfoFacade extends HospitalInfoServiceImpl {
      * @param hospitalInfoVO
      * @return
      */
-    public RespDTO<IntroduceDTO> getHospitalInfo(HospitalInfoVO hospitalInfoVO) {
+    public List<HospitalInfoDTO> getHospitalInfo(HospitalInfoVO hospitalInfoVO) {
         List<HospitalInfoDTO> hospitalInfoDTOList = this.getHospitalInfos(hospitalInfoVO);
         if(hospitalInfoDTOList == null || hospitalInfoDTOList.size() == 0){
             throw new CommonException(CommonErrorCode.NOT_EXISTS,
                     "获取医院信息失败");
         }
-        return RespDTO.onSuc( hospitalInfoDTOList);
+        return hospitalInfoDTOList;
     }
 }

+ 2 - 2
icss-service/src/main/java/com/diagbot/facade/PatientInfoFacade.java

@@ -27,13 +27,13 @@ public class PatientInfoFacade extends PatientInfoServiceImpl {
      * @param patientInfoVO
      * @return
      */
-    public RespDTO<List<PatientInfoDTO>> getPatientInfo(@RequestBody PatientInfoVO patientInfoVO) {
+    public List<PatientInfoDTO> getPatientInfo(@RequestBody PatientInfoVO patientInfoVO) {
         List<PatientInfoDTO> patientInfoDTOList = this.getPatientInfos(patientInfoVO.getPatientCode(),patientInfoVO.getHosptialCode());
         if(patientInfoDTOList == null || patientInfoDTOList.size() == 0){
             throw new CommonException(CommonErrorCode.NOT_EXISTS,
                     "获取患者信息失败");
         }
-        return RespDTO.onSuc(patientInfoDTOList);
+        return patientInfoDTOList;
     }
     
     /**

+ 2 - 3
icss-service/src/main/java/com/diagbot/facade/TranFieldInfoFacade.java

@@ -1,6 +1,5 @@
 package com.diagbot.facade;
 
-import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.TranFieldInfoDTO;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
@@ -24,12 +23,12 @@ public class TranFieldInfoFacade extends TranFieldInfoServiceImpl {
      * @param info
      * @return
      */
-    public RespDTO<List<TranFieldInfoDTO>> getInfoByUuid(TranFieldInfoVO info){
+    public List<TranFieldInfoDTO> getInfoByUuid(TranFieldInfoVO info){
         List<TranFieldInfoDTO> tranFieldInfoDTOList = this.getInfosByUuid(info);
         if(tranFieldInfoDTOList == null || tranFieldInfoDTOList.size() == 0){
             throw new CommonException(CommonErrorCode.NOT_EXISTS,
                     "获取信息失败");
         }
-        return RespDTO.onSuc(tranFieldInfoDTOList);
+        return tranFieldInfoDTOList;
     }
 }

+ 1 - 5
icss-service/src/main/java/com/diagbot/service/impl/HospitalInfoServiceImpl.java

@@ -1,12 +1,11 @@
 package com.diagbot.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.dto.HospitalInfoDTO;
 import com.diagbot.entity.HospitalInfo;
 import com.diagbot.mapper.HospitalInfoMapper;
 import com.diagbot.service.HospitalInfoService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.diagbot.vo.HospitalInfoVO;
-import org.apache.commons.lang.StringUtils;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -24,9 +23,6 @@ public class HospitalInfoServiceImpl extends ServiceImpl<HospitalInfoMapper, Hos
 
     @Override
     public List<HospitalInfoDTO> getHospitalInfos(HospitalInfoVO hospitalInfoVO) {
-        if(StringUtils.isNotEmpty(hospitalInfoVO.getNotIds())) {
-            hospitalInfoVO.setNotIdsArr(hospitalInfoVO.getNotIds().split(","));
-        }
         return baseMapper.getHospitalInfos(hospitalInfoVO);
     }
 }

+ 4 - 20
icss-service/src/main/java/com/diagbot/vo/HospitalInfoVO.java

@@ -3,6 +3,8 @@ package com.diagbot.vo;
 import lombok.Getter;
 import lombok.Setter;
 
+import javax.validation.constraints.NotNull;
+
 /**
  * @Description:
  * @author: wangyu
@@ -10,7 +12,7 @@ import lombok.Setter;
  */
 @Getter
 @Setter
-public class HospitalInfoVO{
+public class HospitalInfoVO {
 
     /**
      * 主键
@@ -20,24 +22,6 @@ public class HospitalInfoVO{
     /**
      * 医院编码
      */
+    @NotNull(message = "请输入医院编码")
     private String code;
-
-    /**
-     * 医院名称
-     */
-    private String name;
-
-    /**
-     * 医院名称拼音
-     */
-    private String spell;
-
-    /**
-     * 状态:0.禁用1.启用
-     */
-    private Integer status;
-
-    private String notIds;    				//过滤已选
-
-    private String[] notIdsArr; 			//过滤已选数组
 }

+ 2 - 2
icss-service/src/main/java/com/diagbot/web/DeptInfoController.java

@@ -36,8 +36,8 @@ public class DeptInfoController {
     @ApiOperation(value = "科室信息——查询[by:wangyu]",
             notes = "deptCode:科室编号,必填<br>" +
                     "hospitalCode:医院编号,必填<br>")
-    @PostMapping("/getPatientInfo")
-    @SysLogger("getPatientInfo")
+    @PostMapping("/getDeptInfo")
+    @SysLogger("getDeptInfo")
     public RespDTO<List<DeptInfoDTO>> getDeptInfo(@Valid @RequestBody DeptInfoVO deptInfoVO) {
         return deptInfoFacade.getDeptInfo(deptInfoVO);
     }

+ 4 - 3
icss-service/src/main/java/com/diagbot/web/DoctorInfoController.java

@@ -37,9 +37,10 @@ public class DoctorInfoController {
             notes = "deptCode:科室编号,必填<br>" +
                     "hospitalCode: 医院编号,必填<br>" +
                     "doctorCode: 医生编号,必填<br>")
-    @PostMapping("/getPatientInfo")
-    @SysLogger("getPatientInfo")
+    @PostMapping("/getDoctorInfo")
+    @SysLogger("getDoctorInfo")
     public RespDTO<List<DoctorInfoDTO>> getDoctorInfo(@Valid @RequestBody DoctorInfoVO doctorInfoVo) {
-        return doctorInfoFacade.getDoctorInfo(doctorInfoVo);
+        List<DoctorInfoDTO> data = doctorInfoFacade.getDoctorInfo(doctorInfoVo);
+        return RespDTO.onSuc(data);
     }
 }

+ 10 - 9
icss-service/src/main/java/com/diagbot/web/HospitalInfoController.java

@@ -1,6 +1,7 @@
 package com.diagbot.web;
 
-import com.diagbot.dto.IntroduceDTO;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.HospitalInfoDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.HospitalInfoFacade;
 import com.diagbot.vo.HospitalInfoVO;
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * @Description:
@@ -20,21 +22,20 @@ import javax.validation.Valid;
  * @time: 2018/11/22 13:41
  */
 @RestController
-@RequestMapping("/deptInfo")
+@RequestMapping("/hospitalInfo")
 @Api(value = "医院信息API", tags = { "医院信息API" })
 public class HospitalInfoController {
 
     @Autowired
     private HospitalInfoFacade hospitalInfoFacade;
 
-    @ApiOperation(value = "根据标签id获取提示信息[by:wangyu]",
+    @ApiOperation(value = "医院信息——根据医院编码获取医院信息[by:wangyu]",
             notes = "id: 医院id<br>" +
-                    "code:医院编码<br>" +
-                    "name:医院名称<br>" +
-                    "spell:医院拼音<br>" +
-                    "status:状态:0.禁用1.启用<br>")
+                    "code:医院编码<br>")
     @PostMapping("/getHospitalInfo")
-    public RespDTO<IntroduceDTO> getHospitalInfo(@RequestBody @Valid HospitalInfoVO hospitalInfoVO) {
-        return RespDTO.onSuc( hospitalInfoFacade.getHospitalInfo(hospitalInfoVO));
+    @SysLogger("getHospitalInfo")
+    public RespDTO<HospitalInfoDTO> getHospitalInfo(@RequestBody @Valid HospitalInfoVO hospitalInfoVO) {
+        List<HospitalInfoDTO> data = hospitalInfoFacade.getHospitalInfo(hospitalInfoVO);
+        return RespDTO.onSuc( data);
     }
 }

+ 2 - 1
icss-service/src/main/java/com/diagbot/web/PatientInfoController.java

@@ -40,7 +40,8 @@ public class PatientInfoController {
     @PostMapping("/getPatientInfo")
     @SysLogger("getPatientInfo")
     public RespDTO<List<PatientInfoDTO>> getPatientInfo(@Valid @RequestBody PatientInfoVO patientInfoVO) {
-        return patientInfoFacade.getPatientInfo(patientInfoVO);
+        List<PatientInfoDTO> data = patientInfoFacade.getPatientInfo(patientInfoVO);
+        return RespDTO.onSuc(data);
     }
     
     

+ 5 - 4
icss-service/src/main/java/com/diagbot/web/TranFieldInfoController.java

@@ -32,11 +32,12 @@ public class TranFieldInfoController {
     @Autowired
     TranFieldInfoFacade tranFieldInfoFacade;
 
-    @ApiOperation(value = "患者信息——查询[by:wangyu]",
+    @ApiOperation(value = "字段对应信息——查询[by:wangyu]",
             notes = "uuid:医院编号,必填<br>")
-    @PostMapping("/getPatientInfo")
-    @SysLogger("getPatientInfo")
+    @PostMapping("/getInfoByUuid")
+    @SysLogger("getInfoByUuid")
     public RespDTO<List<TranFieldInfoDTO>> getInfoByUuid(@Valid @RequestBody TranFieldInfoVO tranFieldInfoVO) {
-        return tranFieldInfoFacade.getInfoByUuid(tranFieldInfoVO);
+        List<TranFieldInfoDTO> data = tranFieldInfoFacade.getInfoByUuid(tranFieldInfoVO);
+        return RespDTO.onSuc(data);
     }
 }

+ 3 - 23
icss-service/src/main/resources/mapper/HospitalInfoMapper.xml

@@ -20,32 +20,12 @@
     </resultMap>
 
     <select id="getHospitalInfos"  resultType="com.diagbot.dto.HospitalInfoDTO">
-        select * from tran_hospital_info i where status = 1
+        select * from tran_hospital_info i where i.status = 1 and i.is_deleted = 'N'
         <if test="id != null and id != ''">
-            and id = #{id}
+            and i.id = #{id}
         </if>
         <if test="code != null and code != ''">
-            and code = #{code}
+            and i.code = #{code}
         </if>
-        <if test="name != null and name != ''">
-            and (name like concat('%',#{name},'%') or spell like concat('%',#{name},'%'))
-        </if>
-        <if test="notIdsArr != null and notIdsArr.length > 0">
-            and id not in
-            <foreach item="item" index="index" collection="notIdsArr"
-                     open="(" separator="," close=")">
-                #{item}
-            </foreach>
-        </if>
-        <!-- name必须放最后,有order_no-->
-        <choose>
-            <when test="name != null and name != ''">
-                and (name like concat('%',#{name},'%') or spell like concat('%',#{name},'%'))
-            </when>
-            <otherwise>
-                order by order_no
-            </otherwise>
-        </choose>
-
     </select>
 </mapper>

+ 1 - 1
icss-service/src/main/resources/mapper/TranFieldInfoMapper.xml

@@ -18,6 +18,6 @@
     </resultMap>
 
     <select id="getInfosByUuid" resultType="com.diagbot.dto.TranFieldInfoDTO">
-        SELECT * FROM `tran_field_info` t where t.status = '1' and FIND_IN_SET(#{uuid},uuid)
+        SELECT * FROM `tran_field_info` t where t.status = '1'and t.is_deleted = 'N' and FIND_IN_SET(#{uuid},uuid)
     </select>
 </mapper>