Commit fbe7105b0bac032d083cbf85582633d33c6556f4
1 parent
bf53f8aae2
Exists in
dev
1:调整检测档案号是否重复的返回对象内容
Showing 2 changed files with 30 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
fbe7105
... | ... | @@ -21,6 +21,7 @@ |
21 | 21 | import com.lyms.platform.operate.web.service.TeamService; |
22 | 22 | import com.lyms.platform.operate.web.utils.*; |
23 | 23 | import com.lyms.platform.operate.web.utils.UnitConstants; |
24 | +import com.lyms.platform.operate.web.vo.CheckFiledataNo; | |
24 | 25 | import com.lyms.platform.permission.model.*; |
25 | 26 | import com.lyms.platform.permission.service.CheckItemService; |
26 | 27 | import com.lyms.platform.pojo.*; |
27 | 28 | |
28 | 29 | |
... | ... | @@ -1784,14 +1785,18 @@ |
1784 | 1785 | */ |
1785 | 1786 | public BaseObjectResponse findFileDocIsDuplicate(String id) { |
1786 | 1787 | BaseObjectResponse br = new BaseObjectResponse(); |
1788 | + CheckFiledataNo checkFiledataNo = new CheckFiledataNo(); | |
1787 | 1789 | Patients data = patientsService.findOnePatientByFileDoc(id); |
1788 | 1790 | if (data == null || data.getYn() == YnEnums.NO.getId()) { |
1789 | 1791 | br.setErrorcode(201); |
1790 | 1792 | br.setErrormsg("该档案号可以使用"); |
1793 | + checkFiledataNo.setCode(201); | |
1794 | + br.setData(checkFiledataNo); | |
1791 | 1795 | return br; |
1792 | 1796 | } |
1793 | 1797 | |
1794 | 1798 | if(data !=null && data.getFileCode().length()>0){ |
1799 | + checkFiledataNo.setCode(200); | |
1795 | 1800 | br.setErrorcode(200); |
1796 | 1801 | br.setErrormsg("该档案号已经被使用过了,请重新输入"); |
1797 | 1802 | return br; |
1798 | 1803 | |
1799 | 1804 | |
... | ... | @@ -1804,14 +1809,17 @@ |
1804 | 1809 | */ |
1805 | 1810 | public BaseObjectResponse findHighRiskDocNoIsDuplicate(String id) { |
1806 | 1811 | BaseObjectResponse br = new BaseObjectResponse(); |
1812 | + CheckFiledataNo checkFiledataNo = new CheckFiledataNo(); | |
1807 | 1813 | Patients data = patientsService.findOnePatientByHighRiskDocNo(id); |
1808 | 1814 | if (data == null || data.getFileCode().length()>0) { |
1809 | 1815 | br.setErrorcode(201); |
1816 | + checkFiledataNo.setCode(201); | |
1810 | 1817 | br.setErrormsg("该高危档案号可以使用"); |
1811 | 1818 | return br; |
1812 | 1819 | } |
1813 | 1820 | |
1814 | 1821 | if(data !=null && data.getHighRiskFileCode().length()>0){ |
1822 | + checkFiledataNo.setCode(200); | |
1815 | 1823 | br.setErrorcode(200); |
1816 | 1824 | br.setErrormsg("该高危档案号已经被使用过了,请重新输入"); |
1817 | 1825 | return br; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/vo/CheckFiledataNo.java
View file @
fbe7105
1 | +package com.lyms.platform.operate.web.vo; | |
2 | + | |
3 | +public class CheckFiledataNo { | |
4 | + private int code; | |
5 | + private String message; | |
6 | + | |
7 | + public int getCode() { | |
8 | + return code; | |
9 | + } | |
10 | + | |
11 | + public void setCode(int code) { | |
12 | + this.code = code; | |
13 | + } | |
14 | + | |
15 | + public String getMessage() { | |
16 | + return message; | |
17 | + } | |
18 | + | |
19 | + public void setMessage(String message) { | |
20 | + this.message = message; | |
21 | + } | |
22 | +} |