Commit 0fab1b66fee393262f0e2aedbcb100dc16b11dc3
1 parent
72ebed6492
Exists in
master
and in
6 other branches
1
Showing 5 changed files with 181 additions and 74 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/PatientServiceMapper.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/PatientServiceService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/PatientServiceServiceImpl.java
- platform-biz-service/src/main/resources/mainOrm/master/PatientService.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/PatientServiceMapper.java
View file @
0fab1b6
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | import com.lyms.platform.permission.model.PatientServiceQuery; |
5 | 5 | |
6 | 6 | import java.util.List; |
7 | +import java.util.Map; | |
7 | 8 | |
8 | 9 | public interface PatientServiceMapper { |
9 | 10 | public void addPatientService(PatientService obj); |
... | ... | @@ -17,6 +18,14 @@ |
17 | 18 | public int queryPatientServiceCount(PatientServiceQuery query); |
18 | 19 | |
19 | 20 | public List<PatientService> queryPatientService(PatientServiceQuery query); |
21 | + | |
22 | + /** | |
23 | + * 查询只开通了标准服务的 | |
24 | + * | |
25 | + * @param query | |
26 | + * @return | |
27 | + */ | |
28 | + List<Map> selectOnlyBzService(PatientServiceQuery query); | |
20 | 29 | |
21 | 30 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/PatientServiceService.java
View file @
0fab1b6
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | import com.lyms.platform.permission.model.PatientServiceQuery; |
5 | 5 | |
6 | 6 | import java.util.List; |
7 | +import java.util.Map; | |
7 | 8 | |
8 | 9 | public interface PatientServiceService { |
9 | 10 | public void addPatientService(PatientService obj); |
... | ... | @@ -18,5 +19,7 @@ |
18 | 19 | |
19 | 20 | public List<PatientService> queryPatientService(PatientServiceQuery query); |
20 | 21 | |
22 | + | |
23 | + List<Map> selectOnlyBzService(PatientServiceQuery query); | |
21 | 24 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/PatientServiceServiceImpl.java
View file @
0fab1b6
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | import org.springframework.stereotype.Service; |
9 | 9 | |
10 | 10 | import java.util.List; |
11 | +import java.util.Map; | |
11 | 12 | |
12 | 13 | @Service |
13 | 14 | public class PatientServiceServiceImpl implements PatientServiceService { |
... | ... | @@ -48,5 +49,9 @@ |
48 | 49 | return patientServiceMapper.queryPatientService(query); |
49 | 50 | } |
50 | 51 | |
52 | + @Override | |
53 | + public List<Map> selectOnlyBzService(PatientServiceQuery query) { | |
54 | + return patientServiceMapper.selectOnlyBzService(query); | |
55 | + } | |
51 | 56 | } |
platform-biz-service/src/main/resources/mainOrm/master/PatientService.xml
View file @
0fab1b6
... | ... | @@ -37,9 +37,17 @@ |
37 | 37 | <update id="updatePatientService" parameterType="com.lyms.platform.permission.model.PatientService"> |
38 | 38 | update patient_service |
39 | 39 | <set> |
40 | - ser_doct = #{serDoct,jdbcType=VARCHAR}, | |
41 | - create_user = #{createUser,jdbcType=VARCHAR}, | |
42 | - update_user = #{updateUser,jdbcType=VARCHAR}, | |
40 | + <if test="serDoct != null and serDoct != ''"> | |
41 | + ser_doct = #{serDoct,jdbcType=VARCHAR}, | |
42 | + </if> | |
43 | + | |
44 | + <if test="createUser != null and createUser != ''"> | |
45 | + create_user = #{createUser,jdbcType=VARCHAR}, | |
46 | + </if> | |
47 | + <if test="updateUser != null and updateUser != ''"> | |
48 | + update_user = #{updateUser,jdbcType=VARCHAR}, | |
49 | + </if> | |
50 | + | |
43 | 51 | <if test="parentid != null and parentid != ''"> |
44 | 52 | parentid = #{parentid,jdbcType=VARCHAR}, |
45 | 53 | </if> |
... | ... | @@ -227,6 +235,20 @@ |
227 | 235 | from patient_service |
228 | 236 | <include refid="PatientServiceCondition"/> |
229 | 237 | <include refid="orderAndLimit"/> |
238 | + </select> | |
239 | + | |
240 | + <!--查询只开通了标准服务的数据 --> | |
241 | + <select id="selectOnlyBzService" resultType="java.util.HashMap" parameterType="com.lyms.platform.permission.model.PatientServiceQuery"> | |
242 | + SELECT parentid,id from patient_service where ser_status=1 | |
243 | + <if test="perType != null and perType != ''"> | |
244 | + and per_type = #{perType,jdbcType=INTEGER} | |
245 | + </if> | |
246 | + | |
247 | + and ser_type in (1,6,10,11) | |
248 | + | |
249 | + GROUP BY parentid HAVING count(parentid)=1 | |
250 | + <include refid="orderAndLimit"/> | |
251 | + ORDER BY | |
230 | 252 | </select> |
231 | 253 | |
232 | 254 | <select id="queryPatientServiceCount" resultType="int" |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
0fab1b6
... | ... | @@ -34,6 +34,8 @@ |
34 | 34 | import com.lyms.platform.operate.web.worker.BuildSerToPatientSerWorker; |
35 | 35 | import com.lyms.platform.permission.model.Organization; |
36 | 36 | import com.lyms.platform.permission.model.OrganizationQuery; |
37 | +import com.lyms.platform.permission.model.PatientService; | |
38 | +import com.lyms.platform.permission.model.PatientServiceQuery; | |
37 | 39 | import com.lyms.platform.permission.service.OrganizationService; |
38 | 40 | import com.lyms.platform.permission.service.PatientServiceService; |
39 | 41 | import com.lyms.platform.pojo.*; |
... | ... | @@ -130,8 +132,6 @@ |
130 | 132 | @Qualifier("commonThreadPool") |
131 | 133 | private ThreadPoolTaskExecutor commonThreadPool; |
132 | 134 | @Autowired |
133 | - private PatientServiceService patientServiceService; | |
134 | - @Autowired | |
135 | 135 | private HosptialHighRiskService hosptialHighRiskService; |
136 | 136 | |
137 | 137 | @Autowired |
... | ... | @@ -1668,7 +1668,6 @@ |
1668 | 1668 | } |
1669 | 1669 | |
1670 | 1670 | |
1671 | - | |
1672 | 1671 | @RequestMapping(value = "/updateRecordOpinionFu", method = RequestMethod.GET) |
1673 | 1672 | @ResponseBody |
1674 | 1673 | public String updateRecordOpinionFu(@RequestParam(required = false) String hospitalId |
... | ... | @@ -1681,8 +1680,7 @@ |
1681 | 1680 | |
1682 | 1681 | antExQuery.setHospitalId(hospitalId); |
1683 | 1682 | } |
1684 | - if (StringUtils.isNotEmpty(id)) | |
1685 | - { | |
1683 | + if (StringUtils.isNotEmpty(id)) { | |
1686 | 1684 | antExQuery.setId(id); |
1687 | 1685 | } |
1688 | 1686 | |
1689 | 1687 | |
... | ... | @@ -1706,14 +1704,12 @@ |
1706 | 1704 | AntExRecordQuery pageAntExRecordsQuery = new AntExRecordQuery(); |
1707 | 1705 | pageAntExRecordsQuery.setfId(fuModel.getId()); |
1708 | 1706 | List<AntExRecordModel> recordModels = recordService.queryAntExRecords(pageAntExRecordsQuery); |
1709 | - if (CollectionUtils.isNotEmpty(recordModels)) | |
1710 | - { | |
1711 | - if (StringUtils.isNotEmpty(fuModel.getTreatmentOpinion())) | |
1712 | - { | |
1713 | - System.out.println("fId=" + fuModel.getId()+";"+fuModel.getTreatmentOpinion()); | |
1707 | + if (CollectionUtils.isNotEmpty(recordModels)) { | |
1708 | + if (StringUtils.isNotEmpty(fuModel.getTreatmentOpinion())) { | |
1709 | + System.out.println("fId=" + fuModel.getId() + ";" + fuModel.getTreatmentOpinion()); | |
1714 | 1710 | AntExRecordModel recordModel = recordModels.get(0); |
1715 | 1711 | recordModel.setTreatOpinion(fuModel.getTreatmentOpinion()); |
1716 | - recordService.updateOne(recordModel,recordModel.getId()); | |
1712 | + recordService.updateOne(recordModel, recordModel.getId()); | |
1717 | 1713 | } |
1718 | 1714 | } |
1719 | 1715 | } |
... | ... | @@ -1738,8 +1734,7 @@ |
1738 | 1734 | |
1739 | 1735 | antExChuQuery.setHospitalId(hospitalId); |
1740 | 1736 | } |
1741 | - if (StringUtils.isNotEmpty(id)) | |
1742 | - { | |
1737 | + if (StringUtils.isNotEmpty(id)) { | |
1743 | 1738 | antExChuQuery.setId(id); |
1744 | 1739 | } |
1745 | 1740 | |
1746 | 1741 | |
... | ... | @@ -1764,14 +1759,12 @@ |
1764 | 1759 | AntExRecordQuery pageAntExRecordsQuery = new AntExRecordQuery(); |
1765 | 1760 | pageAntExRecordsQuery.setfId(chuModel.getId()); |
1766 | 1761 | List<AntExRecordModel> recordModels = recordService.queryAntExRecords(pageAntExRecordsQuery); |
1767 | - if (CollectionUtils.isNotEmpty(recordModels)) | |
1768 | - { | |
1769 | - if (StringUtils.isNotEmpty(chuModel.getTreatOpinion())) | |
1770 | - { | |
1771 | - System.out.println("chuId=" + chuModel.getId()+";"+chuModel.getTreatOpinion()); | |
1762 | + if (CollectionUtils.isNotEmpty(recordModels)) { | |
1763 | + if (StringUtils.isNotEmpty(chuModel.getTreatOpinion())) { | |
1764 | + System.out.println("chuId=" + chuModel.getId() + ";" + chuModel.getTreatOpinion()); | |
1772 | 1765 | AntExRecordModel recordModel = recordModels.get(0); |
1773 | 1766 | recordModel.setTreatOpinion(chuModel.getTreatOpinion()); |
1774 | - recordService.updateOne(recordModel,recordModel.getId()); | |
1767 | + recordService.updateOne(recordModel, recordModel.getId()); | |
1775 | 1768 | } |
1776 | 1769 | } |
1777 | 1770 | } |
... | ... | @@ -1784,8 +1777,6 @@ |
1784 | 1777 | } |
1785 | 1778 | |
1786 | 1779 | |
1787 | - | |
1788 | - | |
1789 | 1780 | @Autowired |
1790 | 1781 | private CommonService commonService; |
1791 | 1782 | @Autowired |
1792 | 1783 | |
1793 | 1784 | |
1794 | 1785 | |
1795 | 1786 | |
... | ... | @@ -1812,29 +1803,29 @@ |
1812 | 1803 | @RequestMapping(method = RequestMethod.GET, value = "/antex/antexlist2") |
1813 | 1804 | @ResponseBody |
1814 | 1805 | @TokenRequired |
1815 | - public BaseResponse findAntExList(@Valid AntExListQueryRequest exListQueryRequest,HttpServletRequest request) { | |
1806 | + public BaseResponse findAntExList(@Valid AntExListQueryRequest exListQueryRequest, HttpServletRequest request) { | |
1816 | 1807 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
1817 | - return patientMedicalRecordFacade.findAntExListTwo(exListQueryRequest,loginState.getId()); | |
1808 | + return patientMedicalRecordFacade.findAntExListTwo(exListQueryRequest, loginState.getId()); | |
1818 | 1809 | } |
1819 | 1810 | |
1820 | 1811 | |
1821 | 1812 | @RequestMapping("/qhdfm") |
1822 | 1813 | @ResponseBody |
1823 | - public BaseObjectResponse qhdfm(String cardNo){ | |
1814 | + public BaseObjectResponse qhdfm(String cardNo) { | |
1824 | 1815 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(qhdfyFmService.queryFmPatient(cardNo)); |
1825 | 1816 | } |
1826 | 1817 | |
1827 | 1818 | |
1828 | 1819 | @RequestMapping("/test") |
1829 | 1820 | @ResponseBody |
1830 | - public String test(String code){ | |
1821 | + public String test(String code) { | |
1831 | 1822 | |
1832 | 1823 | return cdfyHisService.getIdByVcCardNo(code); |
1833 | 1824 | } |
1834 | 1825 | |
1835 | 1826 | @RequestMapping("/testLc") |
1836 | 1827 | @ResponseBody |
1837 | - public MaternalDeliverResult testLc(String bhnum){ | |
1828 | + public MaternalDeliverResult testLc(String bhnum) { | |
1838 | 1829 | |
1839 | 1830 | return lcdcfFmService.queryFmPatient(bhnum); |
1840 | 1831 | } |
... | ... | @@ -1842,7 +1833,7 @@ |
1842 | 1833 | @RequestMapping(value = "/handleSieveTime", method = RequestMethod.GET) |
1843 | 1834 | @ResponseBody |
1844 | 1835 | public String doSieveTime(@RequestParam(required = false) String hospitalId, |
1845 | - @RequestParam(required = false) String patientId) { | |
1836 | + @RequestParam(required = false) String patientId) { | |
1846 | 1837 | |
1847 | 1838 | SieveQuery sieveQuery = new SieveQuery(); |
1848 | 1839 | sieveQuery.setYn(YnEnums.YES.getId()); |
... | ... | @@ -1866,8 +1857,7 @@ |
1866 | 1857 | } |
1867 | 1858 | System.out.println("start:" + i + ",end:" + end); |
1868 | 1859 | final List<SieveModel> sieveModels = list.subList(i, end); |
1869 | - for (SieveModel model : sieveModels) | |
1870 | - { | |
1860 | + for (SieveModel model : sieveModels) { | |
1871 | 1861 | |
1872 | 1862 | System.out.println(model.getParentId()); |
1873 | 1863 | sieveApplyOrderQuery1.setParentId(model.getParentId()); |
1874 | 1864 | |
... | ... | @@ -1875,11 +1865,9 @@ |
1875 | 1865 | |
1876 | 1866 | List<SieveApplyOrderModel> list1 = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1); |
1877 | 1867 | |
1878 | - if (CollectionUtils.isNotEmpty(list1)) | |
1879 | - { | |
1868 | + if (CollectionUtils.isNotEmpty(list1)) { | |
1880 | 1869 | SieveApplyOrderModel applyOrderModel = list1.get(0); |
1881 | - if (applyOrderModel.getApplyTime() == null) | |
1882 | - { | |
1870 | + if (applyOrderModel.getApplyTime() == null) { | |
1883 | 1871 | applyOrderModel.setApplyTime(applyOrderModel.getCreated()); |
1884 | 1872 | applyOrderService.updateSieve(applyOrderModel); |
1885 | 1873 | model.setApplyTime(applyOrderModel.getCreated()); |
1886 | 1874 | |
... | ... | @@ -1890,11 +1878,9 @@ |
1890 | 1878 | sieveResultQuery.setParentId(model.getParentId()); |
1891 | 1879 | |
1892 | 1880 | List<SieveResultModel> sieveResultModels = sieveService.queryListSieveResult(sieveResultQuery); |
1893 | - if (CollectionUtils.isNotEmpty(sieveResultModels)) | |
1894 | - { | |
1881 | + if (CollectionUtils.isNotEmpty(sieveResultModels)) { | |
1895 | 1882 | SieveResultModel sieveResultModel = sieveResultModels.get(0); |
1896 | - if (sieveResultModel.getResultTime() == null) | |
1897 | - { | |
1883 | + if (sieveResultModel.getResultTime() == null) { | |
1898 | 1884 | sieveResultModel.setResultTime(sieveResultModel.getCreated()); |
1899 | 1885 | sieveService.updateSieveRsult(sieveResultModel); |
1900 | 1886 | model.setResultTime(sieveResultModel.getCreated()); |
... | ... | @@ -1902,8 +1888,7 @@ |
1902 | 1888 | } |
1903 | 1889 | } |
1904 | 1890 | |
1905 | - if (model.getStatus() == 3 && model.getDiagnosisTime() == null) | |
1906 | - { | |
1891 | + if (model.getStatus() == 3 && model.getDiagnosisTime() == null) { | |
1907 | 1892 | model.setDiagnosisTime(model.getModified()); |
1908 | 1893 | sieveService.updateOneChanQianDiaSieve(model); |
1909 | 1894 | } |
1910 | 1895 | |
... | ... | @@ -1933,9 +1918,9 @@ |
1933 | 1918 | // } |
1934 | 1919 | |
1935 | 1920 | |
1936 | - @RequestMapping(value="/his/getClFyIdByVcCardNo") | |
1921 | + @RequestMapping(value = "/his/getClFyIdByVcCardNo") | |
1937 | 1922 | @ResponseBody |
1938 | - public Map<String,Object> getLcdcfyByZyhHis(@RequestParam("vcCardNo")String vcCardNo){ | |
1923 | + public Map<String, Object> getLcdcfyByZyhHis(@RequestParam("vcCardNo") String vcCardNo) { | |
1939 | 1924 | Map<String, Object> map = new HashMap<String, Object>(); |
1940 | 1925 | map.put("id", "1236544"); |
1941 | 1926 | return map; |
1942 | 1927 | |
1943 | 1928 | |
... | ... | @@ -1943,12 +1928,13 @@ |
1943 | 1928 | |
1944 | 1929 | |
1945 | 1930 | /** |
1946 | - *诸城初诊测试 | |
1931 | + * 诸城初诊测试 | |
1932 | + * | |
1947 | 1933 | * @return |
1948 | 1934 | */ |
1949 | - @RequestMapping(value="/zc/cscz") | |
1935 | + @RequestMapping(value = "/zc/cscz") | |
1950 | 1936 | @ResponseBody |
1951 | - public BaseObjectResponse getCsCz(@RequestParam("id")String id,@RequestParam("parentId")String parentId){ | |
1937 | + public BaseObjectResponse getCsCz(@RequestParam("id") String id, @RequestParam("parentId") String parentId) { | |
1952 | 1938 | AntExChuModel antExChuModel = new AntExChuModel(); |
1953 | 1939 | antExChuModel.setId(id); |
1954 | 1940 | antExChuModel.setParentId(parentId); |
1955 | 1941 | |
1956 | 1942 | |
... | ... | @@ -1957,12 +1943,13 @@ |
1957 | 1943 | } |
1958 | 1944 | |
1959 | 1945 | /** |
1960 | - *诸城复诊测试 | |
1946 | + * 诸城复诊测试 | |
1947 | + * | |
1961 | 1948 | * @return |
1962 | 1949 | */ |
1963 | - @RequestMapping(value="/zc/csfz") | |
1950 | + @RequestMapping(value = "/zc/csfz") | |
1964 | 1951 | @ResponseBody |
1965 | - public BaseObjectResponse getCsFz(@RequestParam("id")String id,@RequestParam("parentId")String parentId){ | |
1952 | + public BaseObjectResponse getCsFz(@RequestParam("id") String id, @RequestParam("parentId") String parentId) { | |
1966 | 1953 | AntenatalExaminationModel antenatalExaminationModel = new AntenatalExaminationModel(); |
1967 | 1954 | antenatalExaminationModel.setId(id); |
1968 | 1955 | antenatalExaminationModel.setParentId(parentId); |
1969 | 1956 | |
1970 | 1957 | |
1971 | 1958 | |
... | ... | @@ -1970,16 +1957,16 @@ |
1970 | 1957 | return br; |
1971 | 1958 | } |
1972 | 1959 | |
1973 | - @RequestMapping(value="/zc/cz") | |
1960 | + @RequestMapping(value = "/zc/cz") | |
1974 | 1961 | @ResponseBody |
1975 | - public BaseObjectResponse saveChuZhen(@RequestParam("startDate")String startDate,@RequestParam("endDate")String endDate){ | |
1962 | + public BaseObjectResponse saveChuZhen(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate) { | |
1976 | 1963 | BaseObjectResponse br = zcPrenatalService.saveChuZhen(startDate, endDate); |
1977 | 1964 | return br; |
1978 | 1965 | } |
1979 | 1966 | |
1980 | - @RequestMapping(value="/zc/fz") | |
1967 | + @RequestMapping(value = "/zc/fz") | |
1981 | 1968 | @ResponseBody |
1982 | - public BaseObjectResponse saveFuZhen(@RequestParam("startDate")String startDate,@RequestParam("endDate")String endDate){ | |
1969 | + public BaseObjectResponse saveFuZhen(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate) { | |
1983 | 1970 | BaseObjectResponse br = zcPrenatalService.saveFuZhen(startDate, endDate); |
1984 | 1971 | return br; |
1985 | 1972 | } |
1986 | 1973 | |
1987 | 1974 | |
... | ... | @@ -1987,12 +1974,13 @@ |
1987 | 1974 | |
1988 | 1975 | /** |
1989 | 1976 | * 承德智业基本信息测试 |
1977 | + * | |
1990 | 1978 | * @param id |
1991 | 1979 | * @return |
1992 | 1980 | */ |
1993 | - @RequestMapping(value="/cd/cs") | |
1981 | + @RequestMapping(value = "/cd/cs") | |
1994 | 1982 | @ResponseBody |
1995 | - public BaseObjectResponse baseinfo(@RequestParam("id")String id){ | |
1983 | + public BaseObjectResponse baseinfo(@RequestParam("id") String id) { | |
1996 | 1984 | Patients patients = patientsService.findOnePatientById(id); |
1997 | 1985 | return cdGwInterface.saveBaseInfo(patients); |
1998 | 1986 | } |
1999 | 1987 | |
2000 | 1988 | |
... | ... | @@ -2000,12 +1988,13 @@ |
2000 | 1988 | |
2001 | 1989 | /** |
2002 | 1990 | * 承德智业初诊测试(第一次产前随访记录) |
1991 | + * | |
2003 | 1992 | * @param id |
2004 | 1993 | * @return |
2005 | 1994 | */ |
2006 | - @RequestMapping(value="/cd/cz") | |
1995 | + @RequestMapping(value = "/cd/cz") | |
2007 | 1996 | @ResponseBody |
2008 | - public BaseObjectResponse cz(@RequestParam("id")String id,@RequestParam("parentId")String parentId){ | |
1997 | + public BaseObjectResponse cz(@RequestParam("id") String id, @RequestParam("parentId") String parentId) { | |
2009 | 1998 | AntExChuModel antExChuModel = new AntExChuModel(); |
2010 | 1999 | antExChuModel.setId(id); |
2011 | 2000 | antExChuModel.setParentId(parentId); |
2012 | 2001 | |
2013 | 2002 | |
... | ... | @@ -2016,12 +2005,13 @@ |
2016 | 2005 | |
2017 | 2006 | /** |
2018 | 2007 | * 承德智业初诊测试(非第一次产前随访记录) |
2008 | + * | |
2019 | 2009 | * @param id |
2020 | 2010 | * @return |
2021 | 2011 | */ |
2022 | - @RequestMapping(value="/cd/fz") | |
2012 | + @RequestMapping(value = "/cd/fz") | |
2023 | 2013 | @ResponseBody |
2024 | - public BaseObjectResponse fz(@RequestParam("id")String id){ | |
2014 | + public BaseObjectResponse fz(@RequestParam("id") String id) { | |
2025 | 2015 | AntenatalExaminationModel antenatalExaminationModel = antExService.findOneById(id); |
2026 | 2016 | return cdGwInterface.saveWoman_Preothervisit(antenatalExaminationModel); |
2027 | 2017 | } |
2028 | 2018 | |
2029 | 2019 | |
... | ... | @@ -2029,12 +2019,13 @@ |
2029 | 2019 | |
2030 | 2020 | /** |
2031 | 2021 | * 承德智业分娩测试 |
2022 | + * | |
2032 | 2023 | * @param id |
2033 | 2024 | * @return |
2034 | 2025 | */ |
2035 | - @RequestMapping(value="/cd/fm") | |
2026 | + @RequestMapping(value = "/cd/fm") | |
2036 | 2027 | @ResponseBody |
2037 | - public BaseObjectResponse fm(@RequestParam("id")String id){ | |
2028 | + public BaseObjectResponse fm(@RequestParam("id") String id) { | |
2038 | 2029 | MaternalDeliverModel data = matDeliverService.getOneMatDeliver(id); |
2039 | 2030 | return cdGwInterface.saveWomen_Delivery(data); |
2040 | 2031 | } |
2041 | 2032 | |
2042 | 2033 | |
... | ... | @@ -2042,12 +2033,13 @@ |
2042 | 2033 | |
2043 | 2034 | /** |
2044 | 2035 | * 承德智业产后访视测试 |
2036 | + * | |
2045 | 2037 | * @param id |
2046 | 2038 | * @return |
2047 | 2039 | */ |
2048 | - @RequestMapping(value="/cd/chfs") | |
2040 | + @RequestMapping(value = "/cd/chfs") | |
2049 | 2041 | @ResponseBody |
2050 | - public BaseResponse chfs(@RequestParam("id")String id){ | |
2042 | + public BaseResponse chfs(@RequestParam("id") String id) { | |
2051 | 2043 | MatdeliverFollowModel matdeliverFollowModel = matDeliverFollowService.getOneMatDeliverFollow(id); |
2052 | 2044 | return cdGwInterface.saveWoman_Postvisit(matdeliverFollowModel); |
2053 | 2045 | |
2054 | 2046 | |
2055 | 2047 | |
2056 | 2048 | |
2057 | 2049 | |
2058 | 2050 | |
2059 | 2051 | |
... | ... | @@ -2056,27 +2048,28 @@ |
2056 | 2048 | |
2057 | 2049 | /** |
2058 | 2050 | * 承德智业产后42天复查测试 |
2051 | + * | |
2059 | 2052 | * @param id |
2060 | 2053 | * @return |
2061 | 2054 | */ |
2062 | - @RequestMapping(value="/cd/chfc") | |
2055 | + @RequestMapping(value = "/cd/chfc") | |
2063 | 2056 | @ResponseBody |
2064 | - public BaseResponse chfc(@RequestParam("id")String id){ | |
2057 | + public BaseResponse chfc(@RequestParam("id") String id) { | |
2065 | 2058 | PostReviewModel data = postReviewService.findOneById(id); |
2066 | 2059 | return cdGwInterface.saveWoman_Post42Exam(data); |
2067 | 2060 | |
2068 | 2061 | } |
2069 | 2062 | |
2070 | 2063 | |
2071 | - | |
2072 | 2064 | /** |
2073 | 2065 | * 承德智业儿童基本信息测试 |
2066 | + * | |
2074 | 2067 | * @param id |
2075 | 2068 | * @return |
2076 | 2069 | */ |
2077 | - @RequestMapping(value="/cd/child") | |
2070 | + @RequestMapping(value = "/cd/child") | |
2078 | 2071 | @ResponseBody |
2079 | - public BaseObjectResponse child_info(@RequestParam("id")String id){ | |
2072 | + public BaseObjectResponse child_info(@RequestParam("id") String id) { | |
2080 | 2073 | BabyModelQuery babyQuery = new BabyModelQuery(); |
2081 | 2074 | babyQuery.setId(id); |
2082 | 2075 | babyQuery.setYn(YnEnums.YES.getId()); |
2083 | 2076 | |
2084 | 2077 | |
... | ... | @@ -2091,12 +2084,13 @@ |
2091 | 2084 | |
2092 | 2085 | /** |
2093 | 2086 | * 承德智业新生儿访视测试 |
2087 | + * | |
2094 | 2088 | * @param id |
2095 | 2089 | * @return |
2096 | 2090 | */ |
2097 | - @RequestMapping(value="/cd/newfs") | |
2091 | + @RequestMapping(value = "/cd/newfs") | |
2098 | 2092 | @ResponseBody |
2099 | - public BaseObjectResponse newChildFs(@RequestParam("id")String id){ | |
2093 | + public BaseObjectResponse newChildFs(@RequestParam("id") String id) { | |
2100 | 2094 | NewbornVisit newbornVisit = mongoTemplate.findById(id, NewbornVisit.class); |
2101 | 2095 | return cdGwInterface.saveChild_HomeVisit_Memo(newbornVisit); |
2102 | 2096 | } |
2103 | 2097 | |
2104 | 2098 | |
2105 | 2099 | |
2106 | 2100 | |
2107 | 2101 | |
2108 | 2102 | |
... | ... | @@ -2104,23 +2098,97 @@ |
2104 | 2098 | |
2105 | 2099 | /** |
2106 | 2100 | * 承德智业儿保测试 |
2101 | + * | |
2107 | 2102 | * @param id |
2108 | 2103 | * @return |
2109 | 2104 | */ |
2110 | - @RequestMapping(value="/cd/childck") | |
2105 | + @RequestMapping(value = "/cd/childck") | |
2111 | 2106 | @ResponseBody |
2112 | - public BaseObjectResponse childCheck(@RequestParam("id")String id){ | |
2107 | + public BaseObjectResponse childCheck(@RequestParam("id") String id) { | |
2113 | 2108 | BabyCheckModelQuery query = new BabyCheckModelQuery(); |
2114 | 2109 | query.setYn(YnEnums.YES.getId()); |
2115 | 2110 | query.setId(id); |
2116 | 2111 | List<BabyCheckModel> checkModels = babyCheckService.queryBabyCheckRecord(query); |
2117 | - if(checkModels != null && checkModels.size() > 0){ | |
2112 | + if (checkModels != null && checkModels.size() > 0) { | |
2118 | 2113 | return cdGwInterface.saveChild_HealthExam(checkModels.get(0)); |
2119 | 2114 | } |
2120 | 2115 | return null; |
2121 | 2116 | } |
2122 | 2117 | |
2118 | + @RequestMapping(value = "/update/servicestatus") | |
2119 | + @ResponseBody | |
2120 | + public BaseObjectResponse updatePatientServiceStatus(@RequestParam(value = "t", defaultValue = "1") String type) { | |
2123 | 2121 | |
2122 | + int page = 1; | |
2123 | + List<Map> dataMap = null; | |
2124 | + do { | |
2125 | + PatientServiceQuery patientServiceQuery = new PatientServiceQuery(); | |
2126 | + patientServiceQuery.setSort(" create_date asc "); | |
2127 | + patientServiceQuery.setNeed("1"); | |
2128 | + patientServiceQuery.setPage(page); | |
2129 | + patientServiceQuery.setLimit(100); | |
2130 | + patientServiceQuery.setPerType(Integer.valueOf(type)); | |
2131 | + dataMap = patientServiceService.selectOnlyBzService(patientServiceQuery); | |
2132 | + if (null != dataMap) { | |
2133 | + for (Map map : dataMap) { | |
2134 | + commonThreadPool.execute(new Worker(map.get("parentid").toString(), map.get("id").toString(), Integer.valueOf(type))); | |
2135 | + } | |
2136 | + } | |
2137 | + page++; | |
2138 | + } while (null != dataMap && dataMap.size() == 100); | |
2139 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("xxx"); | |
2140 | + } | |
2124 | 2141 | |
2142 | + public class Worker extends Thread { | |
2143 | + private String parentId; | |
2144 | + private String id; | |
2145 | + private Integer type; | |
2146 | + | |
2147 | + public Worker(String parentId, String id, Integer type) { | |
2148 | + this.id = id; | |
2149 | + this.parentId = parentId; | |
2150 | + this.type = type; | |
2151 | + } | |
2152 | + | |
2153 | + @Override | |
2154 | + public void run() { | |
2155 | + try { | |
2156 | + System.out.println("do worker by id :" + id +"parentId:" + parentId); | |
2157 | + if (type == 1) { | |
2158 | + Patients patients = patientsService.findOnePatientById(parentId); | |
2159 | + if (null != patients) { | |
2160 | + //改成不开通 | |
2161 | + patients.setServiceStatus(1); | |
2162 | + patients.setModified(new Date()); | |
2163 | + patientsService.updatePatient(patients); | |
2164 | + } | |
2165 | + } else { | |
2166 | + BabyModelQuery babyModelQuery = new BabyModelQuery(); | |
2167 | + babyModelQuery.setYn(YnEnums.YES.getId()); | |
2168 | + babyModelQuery.setId(parentId); | |
2169 | + List<BabyModel> babyModel = babyBookbuildingService.queryBabyBuildByCond(babyModelQuery); | |
2170 | + if(CollectionUtils.isNotEmpty(babyModel)){ | |
2171 | + BabyModel baby = babyModel.get(0); | |
2172 | + baby.setServiceStatus(1); | |
2173 | + baby.setModified(new Date()); | |
2174 | + babyBookbuildingService.updateBabyBuild(baby,baby.getId()); | |
2175 | + } | |
2176 | + } | |
2177 | + | |
2178 | + | |
2179 | + PatientService patientServiceService1 = new PatientService(); | |
2180 | + patientServiceService1.setId(id); | |
2181 | + patientServiceService1.setSerStatus(2); | |
2182 | + patientServiceService1.setSynStatus(1); | |
2183 | + patientServiceService.updatePatientService(patientServiceService1); | |
2184 | + } catch (Exception e) { | |
2185 | + ExceptionUtils.catchException(e, "Worker error."); | |
2186 | + } | |
2187 | + } | |
2188 | + } | |
2189 | + | |
2190 | + | |
2191 | + @Autowired | |
2192 | + private PatientServiceService patientServiceService; | |
2125 | 2193 | } |