gaodm před 5 roky
rodič
revize
5486b4a95a

+ 1 - 1
icss-service/src/main/java/com/diagbot/vo/DoctorInfoVO.java

@@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
 @Getter
 @Setter
 public class DoctorInfoVO {
-    @NotNull(message = "请输入科室编码")
+//    @NotNull(message = "请输入科室编码")
     private String deptCode;
     @NotNull(message = "请输入医院编码")
     private String hosptialCode;

+ 1 - 1
tran-service/src/main/java/com/diagbot/vo/DoctorInfoVO.java

@@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
 @Getter
 @Setter
 public class DoctorInfoVO {
-    @NotNull(message = "请输入科室编码")
+//    @NotNull(message = "请输入科室编码")
     private String deptCode;
     @NotNull(message = "请输入医院编码")
     private String hosptialCode;

+ 5 - 1
tran-service/src/main/resources/mapper/DoctorInfoMapper.xml

@@ -26,6 +26,10 @@
         SELECT a.* FROM `tran_doctor_info` a
         LEFT JOIN tran_hospital_dept b ON a.hospital_dept_code = b.`code`
         WHERE a.is_deleted = 'N' AND b.is_deleted = 'N'
-        AND a.`code` = #{doctorCode} AND b.hospital_code = #{hospitalCode} AND b.`code` = #{deptCode}
+        AND a.`code` = #{doctorCode}
+        AND b.hospital_code = #{hospitalCode}
+        <if test="deptCode != null and deptCode != ''">
+            AND b.`code` = #{deptCode}
+        </if>
     </select>
 </mapper>