Commit 0fc6c4f34c5524bcc5ed2bee2536b51af21a6c17
1 parent
8619d9551e
Exists in
master
and in
6 other branches
孕妇追访管理是否建档条件查询
Showing 6 changed files with 155 additions and 93 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/ResidentsArchiveModel.java
- platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TrackDownController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/ITrackDownService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TrackDownServiceImpl.java
platform-dal/src/main/java/com/lyms/platform/pojo/ResidentsArchiveModel.java
View file @
0fc6c4f
... | ... | @@ -123,7 +123,10 @@ |
123 | 123 | //是否婚检 0 未婚检 1. 已婚检 |
124 | 124 | private String checkup; |
125 | 125 | |
126 | + //是否怀孕建档 0 否 1 是 | |
127 | + private String pregnantBuild; | |
126 | 128 | |
129 | + | |
127 | 130 | /***********荣成新增男性建档字段**********/ |
128 | 131 | private String isOrNotrdl;//是否进食肉、蛋类(0:否;1:是;默认为1) |
129 | 132 | private String isOrNotSc;//是否厌食蔬菜(0:否;1:是;默认为0) |
... | ... | @@ -168,6 +171,14 @@ |
168 | 171 | |
169 | 172 | public void setCheckup(String checkup) { |
170 | 173 | this.checkup = checkup; |
174 | + } | |
175 | + | |
176 | + public String getPregnantBuild() { | |
177 | + return pregnantBuild; | |
178 | + } | |
179 | + | |
180 | + public void setPregnantBuild(String pregnantBuild) { | |
181 | + this.pregnantBuild = pregnantBuild; | |
171 | 182 | } |
172 | 183 | |
173 | 184 | public String getIsOrNotrdl() { |
platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java
View file @
0fc6c4f
... | ... | @@ -118,6 +118,29 @@ |
118 | 118 | private String queryNo; |
119 | 119 | private String spouseName; |
120 | 120 | |
121 | + //是否婚检 0 未婚检 1婚检 | |
122 | + private String checkup; | |
123 | + | |
124 | + //是否怀孕建档 0 否 1 是 | |
125 | + private String pregnantBuild; | |
126 | + | |
127 | + | |
128 | + public String getPregnantBuild() { | |
129 | + return pregnantBuild; | |
130 | + } | |
131 | + | |
132 | + public void setPregnantBuild(String pregnantBuild) { | |
133 | + this.pregnantBuild = pregnantBuild; | |
134 | + } | |
135 | + | |
136 | + public String getCheckup() { | |
137 | + return checkup; | |
138 | + } | |
139 | + | |
140 | + public void setCheckup(String checkup) { | |
141 | + this.checkup = checkup; | |
142 | + } | |
143 | + | |
121 | 144 | public String getQueryNo() { |
122 | 145 | return queryNo; |
123 | 146 | } |
... | ... | @@ -133,6 +156,12 @@ |
133 | 156 | if (StringUtils.isNotBlank(id)) { |
134 | 157 | condition = condition.and("id", id, MongoOper.IS); |
135 | 158 | } |
159 | + if (StringUtils.isNotEmpty(checkup)) { | |
160 | + condition = condition.and("checkup", checkup, MongoOper.IS); | |
161 | + } | |
162 | + if (StringUtils.isNotEmpty(pregnantBuild)) { | |
163 | + condition = condition.and("pregnantBuild", pregnantBuild, MongoOper.IS); | |
164 | + } | |
136 | 165 | if (StringUtils.isNotBlank(username)) { |
137 | 166 | condition = condition.and("username", username, MongoOper.LIKE); |
138 | 167 | } |
139 | 168 | |
140 | 169 | |
... | ... | @@ -244,20 +273,19 @@ |
244 | 273 | } |
245 | 274 | |
246 | 275 | |
247 | - | |
248 | 276 | if (StringUtils.isNotBlank(queryNo)) { |
249 | 277 | MongoCondition c = MongoCondition.newInstance(); |
250 | - MongoCondition con1 = MongoCondition.newInstance("phone", queryNo, MongoOper.IS); | |
251 | - MongoCondition con2 = MongoCondition.newInstance("username", "^"+queryNo, MongoOper.LIKE); | |
278 | + MongoCondition con1 = MongoCondition.newInstance("phone", queryNo, MongoOper.IS); | |
279 | + MongoCondition con2 = MongoCondition.newInstance("username", "^" + queryNo, MongoOper.LIKE); | |
252 | 280 | MongoCondition con3 = MongoCondition.newInstance("vcCardNo", queryNo, MongoOper.IS); |
253 | 281 | MongoCondition con4 = MongoCondition.newInstance("certificateNum", queryNo, MongoOper.IS); |
254 | 282 | MongoCondition con5 = MongoCondition.newInstance("spouseCardNo", queryNo, MongoOper.IS); |
255 | 283 | MongoCondition con6 = MongoCondition.newInstance("spousePhone", queryNo, MongoOper.IS); |
256 | - MongoCondition con7 = MongoCondition.newInstance("spouseName", "^"+queryNo, MongoOper.LIKE); | |
257 | - if(c1!=null) { | |
258 | - c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con2, con3,con4,con5,con6,con7}).getCriteria()); | |
259 | - }else { | |
260 | - c1 = c.orCondition(new MongoCondition[]{con1, con2, con3,con4,con5,con6,con7}).getCriteria(); | |
284 | + MongoCondition con7 = MongoCondition.newInstance("spouseName", "^" + queryNo, MongoOper.LIKE); | |
285 | + if (c1 != null) { | |
286 | + c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con2, con3, con4, con5, con6, con7}).getCriteria()); | |
287 | + } else { | |
288 | + c1 = c.orCondition(new MongoCondition[]{con1, con2, con3, con4, con5, con6, con7}).getCriteria(); | |
261 | 289 | } |
262 | 290 | //condition = condition.and("id", id, MongoOper.IS).orCondition(); |
263 | 291 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TrackDownController.java
View file @
0fc6c4f
... | ... | @@ -84,8 +84,11 @@ |
84 | 84 | @ResponseBody |
85 | 85 | @TokenRequired |
86 | 86 | @RequestMapping(value = "/all", method = RequestMethod.GET) |
87 | - public BaseResponse all(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, Date fmEnd, String key, Integer type, @RequestParam Integer page, @RequestParam Integer limit, HttpServletRequest request, Integer check) { | |
88 | - return trackDownService.all(buildStart, buildEnd, checkStart, checkEnd, fmStart, fmEnd, key, page, limit, getUserId(request), type, check); | |
87 | + public BaseResponse all(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, Date fmEnd, String key, Integer type, | |
88 | + @RequestParam Integer page, @RequestParam Integer limit, HttpServletRequest request, | |
89 | + Integer check, String checkup, String pregnantBuild) { | |
90 | + return trackDownService.all(buildStart, buildEnd, checkStart, checkEnd, fmStart, fmEnd, key, | |
91 | + page, limit, getUserId(request), type, check, checkup, pregnantBuild); | |
89 | 92 | } |
90 | 93 | |
91 | 94 | @ResponseBody |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
0fc6c4f
... | ... | @@ -189,6 +189,9 @@ |
189 | 189 | private SaveByV2ThreadPoolFacade saveByV2ThreadPoolFacade; |
190 | 190 | |
191 | 191 | @Autowired |
192 | + private ResidentsArchiveService residentsArchiveService; | |
193 | + | |
194 | + @Autowired | |
192 | 195 | private IBasicConfigDao basicConfigDao; |
193 | 196 | |
194 | 197 | public static final String syncToV2Url = PropertiesUtils.getPropertyValue("sync_to_v2_url"); |
... | ... | @@ -226,7 +229,7 @@ |
226 | 229 | patientsQuery.setCardNo(yunRequest.getPregnantCertificateNum()); |
227 | 230 | //判断该身份证号码是否有孕妇建档 在该医院 |
228 | 231 | List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
229 | - if(yunRequest.getLastMenstrualPeriod() != null && !yunRequest.getLastMenstrualPeriod().equals("")){//todowtt | |
232 | + if (yunRequest.getLastMenstrualPeriod() != null && !yunRequest.getLastMenstrualPeriod().equals("")) {//todowtt | |
230 | 233 | if (CollectionUtils.isNotEmpty(patients) && patients.get(0).getLastMenses().getTime() < DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()).getTime()) { |
231 | 234 | br.setErrorcode(ErrorCodeConstants.DATA_EXIST); |
232 | 235 | br.setErrormsg("该身份证在医院已经建档"); |
... | ... | @@ -240,12 +243,12 @@ |
240 | 243 | patientsQuery.setPhone(yunRequest.getPregnantPhone()); |
241 | 244 | //判断该手机号码在 孕期内有没有建档 |
242 | 245 | List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
243 | - if(yunRequest.getLastMenstrualPeriod() != null && !yunRequest.getLastMenstrualPeriod().equals("")){//todowtt | |
244 | - if (CollectionUtils.isNotEmpty(patients) && patients.get(0).getLastMenses().getTime() < DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()).getTime()) { | |
245 | - br.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
246 | - br.setErrormsg("该手机号码已经建档"); | |
247 | - return br; | |
248 | - } | |
246 | + if (yunRequest.getLastMenstrualPeriod() != null && !yunRequest.getLastMenstrualPeriod().equals("")) {//todowtt | |
247 | + if (CollectionUtils.isNotEmpty(patients) && patients.get(0).getLastMenses().getTime() < DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()).getTime()) { | |
248 | + br.setErrorcode(ErrorCodeConstants.DATA_EXIST); | |
249 | + br.setErrormsg("该手机号码已经建档"); | |
250 | + return br; | |
251 | + } | |
249 | 252 | } |
250 | 253 | } |
251 | 254 | |
... | ... | @@ -256,7 +259,7 @@ |
256 | 259 | patientsQuery.setVcCardNo(yunRequest.getVcCardNo()); |
257 | 260 | patientsQuery.setHospitalId(yunRequest.getHospitalId()); |
258 | 261 | List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
259 | - if(yunRequest.getLastMenstrualPeriod() != null && !yunRequest.getLastMenstrualPeriod().equals("")) {//todowtt | |
262 | + if (yunRequest.getLastMenstrualPeriod() != null && !yunRequest.getLastMenstrualPeriod().equals("")) {//todowtt | |
260 | 263 | if (CollectionUtils.isNotEmpty(patients) && patients.get(0).getLastMenses().getTime() < DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()).getTime()) { |
261 | 264 | br.setErrorcode(ErrorCodeConstants.DATA_EXIST); |
262 | 265 | br.setErrormsg("该就诊卡号在该医院已经建档"); |
... | ... | @@ -269,7 +272,7 @@ |
269 | 272 | //建档类型 0 未分娩建档 1儿童建档时建档 2 自动分娩类型 3 转诊自动建档 |
270 | 273 | Integer buildType = 0; |
271 | 274 | Date date = null; |
272 | - if (yunRequest.getLastMenstrualPeriod() != null && !yunRequest.getLastMenstrualPeriod().equals("") ) { | |
275 | + if (yunRequest.getLastMenstrualPeriod() != null && !yunRequest.getLastMenstrualPeriod().equals("")) { | |
273 | 276 | date = DateUtil.addWeek(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()), 42); |
274 | 277 | Date currentDate = DateUtil.formatDate(new Date()); |
275 | 278 | if (date.getTime() <= currentDate.getTime()) { |
... | ... | @@ -313,7 +316,7 @@ |
313 | 316 | if ("2100001291".equals(patient.getHospitalId()) && StringUtils.isNotEmpty(yunRequest.getVcCardNo())) { |
314 | 317 | patient.setBlNum(cdfyHisService.getIdByVcCardNo(yunRequest.getVcCardNo())); |
315 | 318 | } |
316 | - if (yunRequest.getLastMenstrualPeriod() != null && !yunRequest.getLastMenstrualPeriod().equals("") ){ | |
319 | + if (yunRequest.getLastMenstrualPeriod() != null && !yunRequest.getLastMenstrualPeriod().equals("")) { | |
317 | 320 | patient.setBuildDays(DateUtil.getDays(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()), new Date())); |
318 | 321 | } |
319 | 322 | |
... | ... | @@ -428,6 +431,20 @@ |
428 | 431 | } |
429 | 432 | } |
430 | 433 | |
434 | + /** | |
435 | + * 冗余是否建档 | |
436 | + * */ | |
437 | + ResidentsArchiveQuery residentsArchiveQuery = new ResidentsArchiveQuery(); | |
438 | + residentsArchiveQuery.setYn(1); | |
439 | + residentsArchiveQuery.setHospitalId(yunRequest.getHospitalId()); | |
440 | + residentsArchiveQuery.setCertificateNum(yunRequest.getPregnantCertificateNum()); | |
441 | + List<ResidentsArchiveModel> residentsArchiveModelList = residentsArchiveService.queryResident(residentsArchiveQuery); | |
442 | + if (CollectionUtils.isNotEmpty(residentsArchiveModelList)) { | |
443 | + ResidentsArchiveModel residentsArchiveModel = new ResidentsArchiveModel(); | |
444 | + residentsArchiveModel.setPregnantBuild("1"); | |
445 | + ResidentsArchiveModel archiveModel = residentsArchiveModelList.get(0); | |
446 | + residentsArchiveService.updateResident(residentsArchiveModel, archiveModel.getId()); | |
447 | + } | |
431 | 448 | |
432 | 449 | final Patients tempP = p; |
433 | 450 | final FilePathModel filePath = yunRequest.getFilePath(); |
... | ... | @@ -744,7 +761,7 @@ |
744 | 761 | /* |
745 | 762 | 3.0同步2.0代码注释 |
746 | 763 | */ |
747 | - try { | |
764 | + try { | |
748 | 765 | Thread syncThread = new Thread(new Runnable() { |
749 | 766 | @Override |
750 | 767 | public void run() { |
... | ... | @@ -759,7 +776,7 @@ |
759 | 776 | // System.out.println(responseEntity); |
760 | 777 | |
761 | 778 | JSONObject jsonObject = getQueryParam(patients); |
762 | - String url=syncToV2Url +"/GetPatient.asmx/GetPatientInfo"; | |
779 | + String url = syncToV2Url + "/GetPatient.asmx/GetPatientInfo"; | |
763 | 780 | JSONObject postData = new JSONObject(); |
764 | 781 | postData.put("data", jsonObject.toJSONString()); |
765 | 782 | JSONObject json = restTemplate.postForEntity(url, postData, JSONObject.class).getBody(); |
766 | 783 | |
767 | 784 | |
768 | 785 | |
769 | 786 | |
770 | 787 | |
771 | 788 | |
... | ... | @@ -783,64 +800,64 @@ |
783 | 800 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
784 | 801 | JSONObject jsonObject = new JSONObject(64); |
785 | 802 | // TODO 2019/6/5 13:21 dongqing 数据组装 |
786 | - jsonObject.put("P_NAME", patients.getUsername()==null?"":patients.getUsername());//姓名 | |
787 | - jsonObject.put("P_CARDTYPE", patients.getPcerteTypeId()==null?"":patients.getPcerteTypeId());//证件类别 | |
788 | - jsonObject.put("P_CARDNO", patients.getCardNo()==null?"":patients.getCardNo());//证件号码 | |
789 | - jsonObject.put("P_BIRTHDAY", patients.getBirth()==null?"":sdf.format(patients.getBirth()));//出生日期 | |
790 | - jsonObject.put("P_COUNTRY", patients.getPcountryId()==null?"":pcountryIdSwitch(patients.getPcountryId()));//国籍 | |
791 | - jsonObject.put("P_NATION", patients.getPnationId()==null?"": queryParentConfigId(patients.getPnationId()));//民族 | |
803 | + jsonObject.put("P_NAME", patients.getUsername() == null ? "" : patients.getUsername());//姓名 | |
804 | + jsonObject.put("P_CARDTYPE", patients.getPcerteTypeId() == null ? "" : patients.getPcerteTypeId());//证件类别 | |
805 | + jsonObject.put("P_CARDNO", patients.getCardNo() == null ? "" : patients.getCardNo());//证件号码 | |
806 | + jsonObject.put("P_BIRTHDAY", patients.getBirth() == null ? "" : sdf.format(patients.getBirth()));//出生日期 | |
807 | + jsonObject.put("P_COUNTRY", patients.getPcountryId() == null ? "" : pcountryIdSwitch(patients.getPcountryId()));//国籍 | |
808 | + jsonObject.put("P_NATION", patients.getPnationId() == null ? "" : queryParentConfigId(patients.getPnationId()));//民族 | |
792 | 809 | jsonObject.put("P_EDUCATIONLEVEL", "");//文化程度 |
793 | 810 | jsonObject.put("P_OCCUPATIONID", "");//职业 |
794 | - jsonObject.put("P_MOBILEPHONE", patients.getPhone()==null?"":patients.getPhone());//联系电话 | |
795 | - jsonObject.put("P_UNITWORK", patients.getPworkUnit()==null?"":patients.getPworkUnit());//工作单位 | |
811 | + jsonObject.put("P_MOBILEPHONE", patients.getPhone() == null ? "" : patients.getPhone());//联系电话 | |
812 | + jsonObject.put("P_UNITWORK", patients.getPworkUnit() == null ? "" : patients.getPworkUnit());//工作单位 | |
796 | 813 | jsonObject.put("P_JIATINGNIANRENJUNSHOURU", "");//家庭年人均收入 |
797 | - jsonObject.put("P_RRPROVINCE", patients.getProvinceId()==null?"":patients.getProvinceId());//户口——省 | |
798 | - jsonObject.put("P_RRCITY", patients.getCityId()==null?"":patients.getCityId());//户口——市 | |
799 | - jsonObject.put("P_RRCOUNTY", patients.getAreaId()==null?"":patients.getAreaId());//户口——区县 | |
800 | - jsonObject.put("P_RRTOWNSHIP", patients.getStreetId()==null?"":patients.getStreetId());//户口——乡镇 | |
801 | - jsonObject.put("P_RRSTREET", patients.getAddress()==null?"":patients.getAddress());//户口——街道 | |
802 | - jsonObject.put("P_ADDRESSPROVINCE", patients.getProvinceRegisterId()==null?"": patients.getProvinceRegisterId());//省份 | |
803 | - jsonObject.put("P_ADDRESSCITY", patients.getCityRegisterId()==null?"":patients.getCityRegisterId());//城市 | |
804 | - jsonObject.put("P_ADDRESSCOUNTY", patients.getAreaRegisterId()==null?"":patients.getAreaRegisterId());//县 | |
805 | - jsonObject.put("P_ADDRESSSTREET", patients.getAddressRegister()==null?"":patients.getAddressRegister());//街道 | |
806 | - jsonObject.put("P_POSTPARTUMPROVINCE", patients.getProvincePostRestId()==null?"":patients.getProvincePostRestId());//产后——省 | |
807 | - jsonObject.put("P_POSTPARTUMCITY", patients.getCityPostRestId()==null?"":patients.getCityPostRestId());//产后——市 | |
808 | - jsonObject.put("P_POSTPARTUMCOUNTY", patients.getAreaPostRestId()==null?"":patients.getAreaPostRestId());//产后——区县 | |
809 | - jsonObject.put("P_POSTPARTUMTOWNSHIP", patients.getStreetPostRestId()==null?"":patients.getStreetPostRestId());//产后——乡镇 | |
810 | - jsonObject.put("P_POSTPARTUMSTREET", patients.getAddressPostRest()==null?"":patients.getAddressPostRest());//产后——街道 | |
814 | + jsonObject.put("P_RRPROVINCE", patients.getProvinceId() == null ? "" : patients.getProvinceId());//户口——省 | |
815 | + jsonObject.put("P_RRCITY", patients.getCityId() == null ? "" : patients.getCityId());//户口——市 | |
816 | + jsonObject.put("P_RRCOUNTY", patients.getAreaId() == null ? "" : patients.getAreaId());//户口——区县 | |
817 | + jsonObject.put("P_RRTOWNSHIP", patients.getStreetId() == null ? "" : patients.getStreetId());//户口——乡镇 | |
818 | + jsonObject.put("P_RRSTREET", patients.getAddress() == null ? "" : patients.getAddress());//户口——街道 | |
819 | + jsonObject.put("P_ADDRESSPROVINCE", patients.getProvinceRegisterId() == null ? "" : patients.getProvinceRegisterId());//省份 | |
820 | + jsonObject.put("P_ADDRESSCITY", patients.getCityRegisterId() == null ? "" : patients.getCityRegisterId());//城市 | |
821 | + jsonObject.put("P_ADDRESSCOUNTY", patients.getAreaRegisterId() == null ? "" : patients.getAreaRegisterId());//县 | |
822 | + jsonObject.put("P_ADDRESSSTREET", patients.getAddressRegister() == null ? "" : patients.getAddressRegister());//街道 | |
823 | + jsonObject.put("P_POSTPARTUMPROVINCE", patients.getProvincePostRestId() == null ? "" : patients.getProvincePostRestId());//产后——省 | |
824 | + jsonObject.put("P_POSTPARTUMCITY", patients.getCityPostRestId() == null ? "" : patients.getCityPostRestId());//产后——市 | |
825 | + jsonObject.put("P_POSTPARTUMCOUNTY", patients.getAreaPostRestId() == null ? "" : patients.getAreaPostRestId());//产后——区县 | |
826 | + jsonObject.put("P_POSTPARTUMTOWNSHIP", patients.getStreetPostRestId() == null ? "" : patients.getStreetPostRestId());//产后——乡镇 | |
827 | + jsonObject.put("P_POSTPARTUMSTREET", patients.getAddressPostRest() == null ? "" : patients.getAddressPostRest());//产后——街道 | |
811 | 828 | jsonObject.put("P_ADDRESSVILLAGE", ""); |
812 | - jsonObject.put("P_RRVILLAGE", ""); | |
829 | + jsonObject.put("P_RRVILLAGE", ""); | |
813 | 830 | jsonObject.put("P_POSTPARTUMVILLAGE", ""); |
814 | - jsonObject.put("P_RESIDETYPE", ""); | |
815 | - jsonObject.put("P_ACCOUNTTYPE", ""); | |
816 | - jsonObject.put("P_HUSBANDNAME", patients.getHusbandName()==null?"":patients.getHusbandName());//丈夫姓名 | |
817 | - jsonObject.put("P_HUSBANDCARDTYPE", patients.getHcertificateTypeId()==null?"":patients.getHcertificateTypeId());//丈夫证件类型 | |
818 | - jsonObject.put("P_HUSBANDCARDNO", patients.getHusbandBirth()==null?"":patients.getHusbandBirth());//丈夫证件号码 | |
819 | - jsonObject.put("P_HUSBANDBIRTHDAY", patients.getHusbandBirth()==null?"":sdf.format(patients.getHusbandBirth()));//丈夫出生日期 | |
820 | - jsonObject.put("P_HUSBANDEDUCATIONLEVEL",""); | |
831 | + jsonObject.put("P_RESIDETYPE", ""); | |
832 | + jsonObject.put("P_ACCOUNTTYPE", ""); | |
833 | + jsonObject.put("P_HUSBANDNAME", patients.getHusbandName() == null ? "" : patients.getHusbandName());//丈夫姓名 | |
834 | + jsonObject.put("P_HUSBANDCARDTYPE", patients.getHcertificateTypeId() == null ? "" : patients.getHcertificateTypeId());//丈夫证件类型 | |
835 | + jsonObject.put("P_HUSBANDCARDNO", patients.getHusbandBirth() == null ? "" : patients.getHusbandBirth());//丈夫证件号码 | |
836 | + jsonObject.put("P_HUSBANDBIRTHDAY", patients.getHusbandBirth() == null ? "" : sdf.format(patients.getHusbandBirth()));//丈夫出生日期 | |
837 | + jsonObject.put("P_HUSBANDEDUCATIONLEVEL", ""); | |
821 | 838 | //晓东20190629确定9b8bfd02-05be-4064-b2a9-e0cce6a3f2e3替换2100001981 |
822 | 839 | jsonObject.put("P_HOSPITALID", "9b8bfd02-05be-4064-b2a9-e0cce6a3f2e3"); |
823 | - jsonObject.put("P_HUSBANDOCCUPATIONID",""); | |
824 | - jsonObject.put("P_HUSBANDRRTOWNSHIP", patients.getHstreetRegisterId()==null?"":patients.getHstreetRegisterId());//丈夫户口所在地 街道 | |
825 | - jsonObject.put("P_HUSBANDRRVILLAGE",""); | |
826 | - jsonObject.put("P_LASTMENSTRUALPERIOD",patients.getLastMenses()==null?"":sdf.format(patients.getLastMenses()));//末次月经 | |
827 | - jsonObject.put("P_ISVIP",""); | |
828 | - jsonObject.put("P_SERVICETYPE",""); | |
829 | - jsonObject.put("P_HUSBANDCOUNTRY", patients.getHcountryId()==null?"":pcountryIdSwitch(patients.getHcountryId()));//丈夫国籍 | |
830 | - jsonObject.put("P_HUSBANDNATION", patients.getHnationId()==null?"":queryParentConfigId(patients.getHnationId()));//丈夫民族 | |
831 | - jsonObject.put("P_HUSBANDMOBILEPHONE", patients.getHusbandPhone()==null?"":patients.getHusbandPhone());//丈夫联系电话 | |
832 | - jsonObject.put("P_HUSBANDUNITWORK", patients.getHworkUnit()==null?"":patients.getHworkUnit());//丈夫工作单位 | |
833 | - jsonObject.put("P_HUSBANDRRPROVINCE", patients.getHprovinceRegisterId()==null?"":patients.getHprovinceRegisterId());//丈夫户口所在地 省 | |
834 | - jsonObject.put("P_HUSBANDRRCITY", patients.getHcityRegisterId()==null?"":patients.getHcityRegisterId());//丈夫户口所在地 市 | |
835 | - jsonObject.put("P_HUSBANDRRCOUNTY", patients.getHareaRegisterId()==null?"":patients.getHareaRegisterId());//丈夫户口所在地 县 | |
836 | - jsonObject.put("P_HUSBANDRRSTREET", patients.getHaddressRegister()==null?"":patients.getHaddressRegister()); | |
837 | - jsonObject.put("P_CLINICNO", patients.getVcCardNo()==null?"":patients.getVcCardNo());//条码号 | |
840 | + jsonObject.put("P_HUSBANDOCCUPATIONID", ""); | |
841 | + jsonObject.put("P_HUSBANDRRTOWNSHIP", patients.getHstreetRegisterId() == null ? "" : patients.getHstreetRegisterId());//丈夫户口所在地 街道 | |
842 | + jsonObject.put("P_HUSBANDRRVILLAGE", ""); | |
843 | + jsonObject.put("P_LASTMENSTRUALPERIOD", patients.getLastMenses() == null ? "" : sdf.format(patients.getLastMenses()));//末次月经 | |
844 | + jsonObject.put("P_ISVIP", ""); | |
845 | + jsonObject.put("P_SERVICETYPE", ""); | |
846 | + jsonObject.put("P_HUSBANDCOUNTRY", patients.getHcountryId() == null ? "" : pcountryIdSwitch(patients.getHcountryId()));//丈夫国籍 | |
847 | + jsonObject.put("P_HUSBANDNATION", patients.getHnationId() == null ? "" : queryParentConfigId(patients.getHnationId()));//丈夫民族 | |
848 | + jsonObject.put("P_HUSBANDMOBILEPHONE", patients.getHusbandPhone() == null ? "" : patients.getHusbandPhone());//丈夫联系电话 | |
849 | + jsonObject.put("P_HUSBANDUNITWORK", patients.getHworkUnit() == null ? "" : patients.getHworkUnit());//丈夫工作单位 | |
850 | + jsonObject.put("P_HUSBANDRRPROVINCE", patients.getHprovinceRegisterId() == null ? "" : patients.getHprovinceRegisterId());//丈夫户口所在地 省 | |
851 | + jsonObject.put("P_HUSBANDRRCITY", patients.getHcityRegisterId() == null ? "" : patients.getHcityRegisterId());//丈夫户口所在地 市 | |
852 | + jsonObject.put("P_HUSBANDRRCOUNTY", patients.getHareaRegisterId() == null ? "" : patients.getHareaRegisterId());//丈夫户口所在地 县 | |
853 | + jsonObject.put("P_HUSBANDRRSTREET", patients.getHaddressRegister() == null ? "" : patients.getHaddressRegister()); | |
854 | + jsonObject.put("P_CLINICNO", patients.getVcCardNo() == null ? "" : patients.getVcCardNo());//条码号 | |
838 | 855 | |
839 | 856 | //建档医生 |
840 | 857 | jsonObject.put("P_DOCID", getBookbuildingDoctor(patients.getBookbuildingDoctor())); |
841 | 858 | //让写死桃城区,董勤说最后定 |
842 | 859 | jsonObject.put("P_FILINGTIME", sdf.format(patients.getBookbuildingDate()));//建档时间 |
843 | - jsonObject.put("P_TOWNSHIP", patients.getStreetRegisterId()==null?"":patients.getStreetRegisterId());//现居住乡镇 | |
860 | + jsonObject.put("P_TOWNSHIP", patients.getStreetRegisterId() == null ? "" : patients.getStreetRegisterId());//现居住乡镇 | |
844 | 861 | |
845 | 862 | if (patients.getReqHusband() != null) {//丈夫信息是否必须 |
846 | 863 | if (patients.getReqHusband()) { |
... | ... | @@ -867,8 +884,8 @@ |
867 | 884 | return bookbuildingDoctorid; |
868 | 885 | } |
869 | 886 | |
870 | - public String pcountryIdSwitch(String pcountryId){ | |
871 | - if("57cead66231a18a1aaa12b96".equals(pcountryId)){ | |
887 | + public String pcountryIdSwitch(String pcountryId) { | |
888 | + if ("57cead66231a18a1aaa12b96".equals(pcountryId)) { | |
872 | 889 | pcountryId = "0da4334f-49e7-4180-b690-5cea668f75e9"; |
873 | 890 | return pcountryId; |
874 | 891 | } |
... | ... | @@ -877,6 +894,7 @@ |
877 | 894 | |
878 | 895 | /** |
879 | 896 | * 3.0建档实时同步2.0民族转换 |
897 | + * | |
880 | 898 | * @param id |
881 | 899 | * @return |
882 | 900 | */ |
883 | 901 | |
884 | 902 | |
885 | 903 | |
886 | 904 | |
... | ... | @@ -887,23 +905,25 @@ |
887 | 905 | and("yn", YnEnums.YES.getId(), MongoOper.IS). |
888 | 906 | and("id", id, MongoOper.IS).toMongoQuery() |
889 | 907 | ); |
890 | - if(basicConfigsid!=null && basicConfigsid.size()!=0){ | |
908 | + if (basicConfigsid != null && basicConfigsid.size() != 0) { | |
891 | 909 | String name = basicConfigsid.get(0).getName(); |
892 | 910 | List<BasicConfig> basicConfigs = basicConfigDao.queryBasicConfig( |
893 | 911 | MongoCondition.newInstance("parentId", "4bc86dd6-2217-4a33-95f4-dc22ee70f2e3", MongoOper.IS). |
894 | 912 | and("yn", YnEnums.NO.getId(), MongoOper.IS). |
895 | 913 | and("name", name, MongoOper.IS).toMongoQuery() |
896 | 914 | ); |
897 | - if(basicConfigs.size()==0 || basicConfigs==null){ | |
915 | + if (basicConfigs.size() == 0 || basicConfigs == null) { | |
898 | 916 | return ""; |
899 | 917 | } |
900 | 918 | return basicConfigs.get(0).getId(); |
901 | - }else { | |
919 | + } else { | |
902 | 920 | return ""; |
903 | 921 | } |
904 | 922 | } |
923 | + | |
905 | 924 | /** |
906 | 925 | * 2.0建档实时同步3.0民族转换 |
926 | + * | |
907 | 927 | * @param id |
908 | 928 | * @return |
909 | 929 | */ |
910 | 930 | |
911 | 931 | |
912 | 932 | |
... | ... | @@ -914,21 +934,22 @@ |
914 | 934 | and("yn", YnEnums.NO.getId(), MongoOper.IS). |
915 | 935 | and("id", id, MongoOper.IS).toMongoQuery() |
916 | 936 | ); |
917 | - if(basicConfigsid!=null && basicConfigsid.size()!=0){ | |
937 | + if (basicConfigsid != null && basicConfigsid.size() != 0) { | |
918 | 938 | String name = basicConfigsid.get(0).getName(); |
919 | 939 | List<BasicConfig> basicConfigs = basicConfigDao.queryBasicConfig( |
920 | 940 | MongoCondition.newInstance("parentId", "4bc86dd6-2217-4a33-95f4-dc22ee70f2e3", MongoOper.IS). |
921 | 941 | and("yn", YnEnums.YES.getId(), MongoOper.IS). |
922 | 942 | and("name", name, MongoOper.IS).toMongoQuery() |
923 | 943 | ); |
924 | - if(basicConfigs.size()==0 || basicConfigs==null){ | |
944 | + if (basicConfigs.size() == 0 || basicConfigs == null) { | |
925 | 945 | return id; |
926 | 946 | } |
927 | 947 | return basicConfigs.get(0).getId(); |
928 | - }else { | |
948 | + } else { | |
929 | 949 | return id; |
930 | 950 | } |
931 | 951 | } |
952 | + | |
932 | 953 | /** |
933 | 954 | * 创建孕妇建档推送消息 |
934 | 955 | */ |
... | ... | @@ -2483,12 +2504,12 @@ |
2483 | 2504 | UsersQuery uq = new UsersQuery(); |
2484 | 2505 | uq.setName(bookbuildingDoctor); |
2485 | 2506 | List<Users> users = usersService.queryUsers(uq); |
2486 | - if(users.size() != 0){ | |
2487 | - Users users1 = users.get(0); | |
2488 | - if (users1 != null && users1.getYn() == YnEnums.YES.getId()) { | |
2489 | - bookbuildingDoctorName = users1.getId().toString(); | |
2490 | - } | |
2491 | - } | |
2507 | + if (users.size() != 0) { | |
2508 | + Users users1 = users.get(0); | |
2509 | + if (users1 != null && users1.getYn() == YnEnums.YES.getId()) { | |
2510 | + bookbuildingDoctorName = users1.getId().toString(); | |
2511 | + } | |
2512 | + } | |
2492 | 2513 | return bookbuildingDoctorName; |
2493 | 2514 | } |
2494 | 2515 | return bookbuildingDoctorName; |
... | ... | @@ -2519,7 +2540,7 @@ |
2519 | 2540 | Integer updateSize = 0; |
2520 | 2541 | Integer errorSize = 0; |
2521 | 2542 | List<Organization> organizations = organizationService.queryHospitals(query); |
2522 | - for (Organization organization: organizations) { | |
2543 | + for (Organization organization : organizations) { | |
2523 | 2544 | String name = organization.getName(); |
2524 | 2545 | List<BasicConfig> basicConfigs = mongoTemplate.find(Query.query(Criteria.where("name").is(name)), BasicConfig.class); |
2525 | 2546 | if (CollectionUtils.isNotEmpty(basicConfigs)) { |
2526 | 2547 | |
2527 | 2548 | |
... | ... | @@ -2532,15 +2553,15 @@ |
2532 | 2553 | org.setId(organization.getId()); |
2533 | 2554 | org.setTownOrgId(basicConfigId); |
2534 | 2555 | organizationService.updateOrganization(org); |
2535 | - updateSize ++; | |
2556 | + updateSize++; | |
2536 | 2557 | } else { |
2537 | 2558 | System.out.println("暂无匹配数据, name===>" + name); |
2538 | - errorSize ++; | |
2559 | + errorSize++; | |
2539 | 2560 | } |
2540 | 2561 | } |
2541 | 2562 | BaseResponse baseResponse = new BaseResponse(); |
2542 | 2563 | HashMap<String, Object> objectObjectHashMap = new HashMap<>(); |
2543 | - objectObjectHashMap.put("updateSize",updateSize); | |
2564 | + objectObjectHashMap.put("updateSize", updateSize); | |
2544 | 2565 | objectObjectHashMap.put("errorSize", errorSize); |
2545 | 2566 | baseResponse.setObject(objectObjectHashMap); |
2546 | 2567 | return baseResponse; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/ITrackDownService.java
View file @
0fc6c4f
... | ... | @@ -16,7 +16,8 @@ |
16 | 16 | |
17 | 17 | BaseObjectResponse list(String provinceId, String cityId, String areaId, String streetId, String key, Integer trackType, Integer page, Integer limit, Integer userId); |
18 | 18 | |
19 | - BaseObjectResponse all(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, Date fmEnd, String key, Integer page, Integer limit, Integer userId, Integer type, Integer check); | |
19 | + BaseObjectResponse all(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, | |
20 | + Date fmEnd, String key, Integer page, Integer limit, Integer userId, Integer type, Integer check, String checkup, String pregnantBuild); | |
20 | 21 | |
21 | 22 | BaseObjectResponse info(String patientId, Integer trackType, Integer buildType); |
22 | 23 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TrackDownServiceImpl.java
View file @
0fc6c4f
... | ... | @@ -67,7 +67,8 @@ |
67 | 67 | * @return |
68 | 68 | */ |
69 | 69 | @Override |
70 | - public BaseObjectResponse all(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, Date fmEnd, String key, Integer page, Integer limit, Integer userId, Integer type, Integer check) { | |
70 | + public BaseObjectResponse all(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, Date fmEnd, String key, | |
71 | + Integer page, Integer limit, Integer userId, Integer type, Integer check, String checkup, String pregnantBuild) { | |
71 | 72 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
72 | 73 | List<Map<String, Object>> restList = new ArrayList<>(); |
73 | 74 | Integer archiveModelCount = 0; |
... | ... | @@ -84,6 +85,8 @@ |
84 | 85 | query.setSex(SystemConfig.WOMAN_ID); |
85 | 86 | query.setStartBuildDay(buildStart); |
86 | 87 | query.setEndBuildDay(buildEnd); |
88 | + query.setCheckup(checkup); | |
89 | + query.setPregnantBuild(pregnantBuild); | |
87 | 90 | //妇女建档主数据 |
88 | 91 | List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(query); |
89 | 92 | // StopWatch stopWatch = new StopWatch("妇女建档主数据"); |
... | ... | @@ -266,7 +269,6 @@ |
266 | 269 | patientsQuery.setYn(1); |
267 | 270 | patientsQuery.setTypeList(Arrays.asList(1, 3)); |
268 | 271 | |
269 | - | |
270 | 272 | //怀孕建档 |
271 | 273 | List<Patients> patientsList = patientsService.queryPatient(patientsQuery); |
272 | 274 | if (CollectionUtils.isNotEmpty(patientsList)) { |
... | ... | @@ -394,10 +396,6 @@ |
394 | 396 | temp.put("bookbuild", 1); // 孕期建档 1=勾勾 2=叉叉 |
395 | 397 | temp.put("check", 2); // 婚检 1=勾勾 2=叉叉 |
396 | 398 | temp.put("resident", 2); // 妇女建档 1=勾勾 2=叉叉 |
397 | - | |
398 | - | |
399 | - | |
400 | - | |
401 | 399 | |
402 | 400 | |
403 | 401 | temp.put("cqzd", 2); |