Commit f4ce305bf5f4e45487ce8c6d003a40c563b535e7

Authored by yuyuanhui
Exists in fengning2023-06-06

Merge remote-tracking branch 'origin/master' into fengning2023-06-06

Showing 23 changed files

platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ f4ce305
... ... @@ -1495,7 +1495,7 @@
1495 1495  
1496 1496 <select id="getCouponHospital" parameterType="string" resultType="string">
1497 1497 SELECT DISTINCT(o.name) as cname from coupon_info c LEFT JOIN organization o
1498   - on c.create_hospital_id=o.id where c.user_id=#{userId}
  1498 + on c.create_hospital_id=o.id where c.user_id=#{userId} and c.create_date > DATE_SUB(SYSDATE(), interval 2 year)
1499 1499 and c.create_date >= DATE_SUB(NOW(), interval 10 MONTH)
1500 1500 </select>
1501 1501  
platform-common/src/main/java/com/lyms/platform/common/Test.java View file @ f4ce305
... ... @@ -16,10 +16,8 @@
16 16 public class Test {
17 17  
18 18 public static void main(String[] args) throws UnsupportedEncodingException {
19   - IntBuffer ib = IntBuffer.allocate(2);
20   -
21   - ib.put(1);
22   - ib.put(3);
  19 + String a = "1.0";
  20 + System.out.println(Double.parseDouble(a));
23 21  
24 22 }
25 23  
platform-dal/src/main/java/com/lyms/platform/pojo/LhBabyEyeCheck.java View file @ f4ce305
... ... @@ -317,11 +317,11 @@
317 317 /**
318 318 * 视力检查(右) 手填
319 319 */
320   - private Double lhsljcstRight;
  320 + private String lhsljcstRight;
321 321 /**
322 322 * 视力检查(左) 手填
323 323 */
324   - private Double lhsljcstLeft;
  324 + private String lhsljcstLeft;
325 325 /**
326 326 * 视力低常(右) 1正常 、2异常
327 327 */
328 328  
329 329  
330 330  
... ... @@ -456,19 +456,19 @@
456 456 this.lhywjcqt = lhywjcqt;
457 457 }
458 458  
459   - public Double getLhsljcstRight() {
  459 + public String getLhsljcstRight() {
460 460 return lhsljcstRight;
461 461 }
462 462  
463   - public void setLhsljcstRight(Double lhsljcstRight) {
  463 + public void setLhsljcstRight(String lhsljcstRight) {
464 464 this.lhsljcstRight = lhsljcstRight;
465 465 }
466 466  
467   - public Double getLhsljcstLeft() {
  467 + public String getLhsljcstLeft() {
468 468 return lhsljcstLeft;
469 469 }
470 470  
471   - public void setLhsljcstLeft(Double lhsljcstLeft) {
  471 + public void setLhsljcstLeft(String lhsljcstLeft) {
472 472 this.lhsljcstLeft = lhsljcstLeft;
473 473 }
474 474  
platform-dal/src/main/java/com/lyms/platform/query/CancerScreeningQuery.java View file @ f4ce305
... ... @@ -41,6 +41,8 @@
41 41 private String uname;
42 42 //出生日期
43 43 private Date birthday;
  44 + private Date birthdayStart;
  45 + private Date birthdayEnd;
44 46 //民族Id
45 47 private String nationId;
46 48 //身份证件号
47 49  
... ... @@ -378,7 +380,15 @@
378 380 }
379 381 }
380 382  
  383 + if (null != birthdayStart && birthdayEnd != null) {
  384 + if (null != c) {
  385 + c = c.and("birthday").gte(birthdayStart).lte(birthdayEnd);
  386 + } else {
  387 + c = Criteria.where("birthday").gte(birthdayStart).lte(birthdayEnd);
  388 + }
  389 + }
381 390  
  391 +
382 392 if(null != isFollow){
383 393 condition=condition.and("isLast", 2, MongoOper.IS);
384 394 Date currentDate = DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date()));
385 395  
... ... @@ -431,7 +441,21 @@
431 441 return condition.toMongoQuery();
432 442 }
433 443  
  444 + public Date getBirthdayStart() {
  445 + return birthdayStart;
  446 + }
434 447  
  448 + public void setBirthdayStart(Date birthdayStart) {
  449 + this.birthdayStart = birthdayStart;
  450 + }
  451 +
  452 + public Date getBirthdayEnd() {
  453 + return birthdayEnd;
  454 + }
  455 +
  456 + public void setBirthdayEnd(Date birthdayEnd) {
  457 + this.birthdayEnd = birthdayEnd;
  458 + }
435 459  
436 460 public String getZhzd() {
437 461 return zhzd;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java View file @ f4ce305
... ... @@ -279,6 +279,11 @@
279 279 @RequestParam(value = "areaId", required = false) String aId) {
280 280 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
281 281 Users users = usersService.getUsers(loginState.getId());
  282 + //定制秦皇岛区域影响了承德区域
  283 + Organization org = organizationService.getOrganization(users.getOrgId());
  284 + if ("9".equals(org.getCityId())){
  285 + isMaternityManagement = null;
  286 + }
282 287  
283 288 List<Integer> areaId = autoMatchFacade.matchAreaOrgId(loginState.getId());
284 289 List<Object> data = new ArrayList<>();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java View file @ f4ce305
... ... @@ -433,7 +433,7 @@
433 433 {
434 434 Map<String,Object> data = new HashMap<>();
435 435 data.put("name",womanArchive.getData().get("username"));
436   - data.put("sex","1".equals(String.valueOf(womanArchive.getData().get("sex"))) ? "男" : "女" );
  436 + data.put("sex","5d0b782f-b61b-441b-b8c5-4bf55eece273".equals(String.valueOf(womanArchive.getData().get("sex"))) ? "男" : "女" );
437 437 data.put("age",DateUtil.getAge2(DateUtil.parseYMD(String.valueOf(womanArchive.getData().get("birthday"))),new Date()));
438 438 data.put("cardNo",womanArchive.getCardNo());
439 439 data.put("phone",womanArchive.getData().get("phone"));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ f4ce305
... ... @@ -1279,8 +1279,8 @@
1279 1279 lhBabyEyeCheck.setLhsldcLeft("1");
1280 1280 try
1281 1281 {
1282   - lhBabyEyeCheck.setLhsljcstRight(StringUtils.isNotEmpty(request.getEyeRight()) ? Double.parseDouble(request.getEyeRight()) : null );
1283   - lhBabyEyeCheck.setLhsljcstLeft(StringUtils.isNotEmpty(request.getEyeLeft()) ? Double.parseDouble(request.getEyeLeft()) : null );
  1282 + lhBabyEyeCheck.setLhsljcstRight(request.getEyeRight());
  1283 + lhBabyEyeCheck.setLhsljcstLeft(request.getEyeLeft());
1284 1284 }catch (Exception e)
1285 1285 {
1286 1286 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ f4ce305
... ... @@ -353,8 +353,7 @@
353 353  
354 354 patient.setNextCheckTime(DateUtil.parseYMD(yunRequest.getNextCheckTime()));
355 355 patient.setcDueWeek(yunRequest.getcDueWeek());//前端计算出来的孕周
356   - DoctorDTO doctorDTO = yunRequest.getBooksuifangDoctor();
357   - patient.setBooksuifangDoctor(doctorDTO != null ? String.valueOf(doctorDTO.getId()) : null);
  356 + patient.setBooksuifangDoctor(yunRequest.getBooksuifangDoctor());
358 357 //承德市妇幼通过就诊卡号查询到病人id保存下来
359 358 if ("2100001291".equals(patient.getHospitalId()) && StringUtils.isNotEmpty(yunRequest.getVcCardNo())) {
360 359 patient.setBlNum(cdfyHisService.getIdByVcCardNo(yunRequest.getVcCardNo()));
... ... @@ -1220,8 +1219,7 @@
1220 1219 patient.setYyzyfmHospitalId(yunRequest.getYyzyfmHospitalId());
1221 1220 patient.setNextCheckTime(DateUtil.parseYMD(yunRequest.getNextCheckTime()));
1222 1221 patient.setcDueWeek(yunRequest.getcDueWeek());//前端计算出来的孕周
1223   - DoctorDTO doctorDTO = yunRequest.getBooksuifangDoctor();
1224   - patient.setBooksuifangDoctor(doctorDTO != null ? String.valueOf(doctorDTO.getId()) : null);
  1222 + patient.setBooksuifangDoctor(yunRequest.getBooksuifangDoctor());
1225 1223 patient.setModified(new Date());
1226 1224 patient.setBuildDays(DateUtil.getDays(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()), DateUtil.parseYMD(yunRequest.getBookbuildingDate())));
1227 1225 // patient.setHospitalId(autoMatchFacade.getHospitalId(userId));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CancerScreeningFacade.java View file @ f4ce305
... ... @@ -89,6 +89,7 @@
89 89 //根据用户id获取医院ID
90 90 String hospitalId = autoMatchFacade.getHospitalId(id);
91 91 CancerScreeningQuery query = getCancerScreeningQuery(queryRequest, hospitalId);
  92 + System.out.println(query.convertToQuery().convertToMongoQuery().toString());
92 93 List list = new ArrayList();
93 94 List <CancerScreeningModel> modelList = cancerScreenService.queryCancerScreList(query);
94 95 if (CollectionUtils.isNotEmpty(modelList)) {
95 96  
96 97  
97 98  
... ... @@ -206,15 +207,22 @@
206 207 * @return
207 208 */
208 209 public void exportLasc(CancerScreeningRequest queryRequest, Integer id, HttpServletResponse response){
  210 + queryRequest.setPage(1);
  211 + queryRequest.setLimit(100000);
209 212 List <Map <String, Object>> datas = getLascList(queryRequest, id);
210 213 Map <String, String> cnames = new LinkedHashMap <>();
211   - // cnames.put("xz", "乡镇");
212   - cnames.put("created", "检查日期");
213 214 cnames.put("name", "姓名");
  215 + cnames.put("sex", "性別");
  216 + cnames.put("nation", "民族");
214 217 cnames.put("age", "年龄");
215 218 cnames.put("cardNum", "证件号");
216   - cnames.put("phone", "联系方式");
217   - cnames.put("liveAddress", "住址");
  219 + cnames.put("marriage", "婚否");
  220 + cnames.put("phone", "本人电话");
  221 + cnames.put("contactName", "联系人姓名");
  222 + cnames.put("contactPhone", "联系人电话");
  223 + cnames.put("levelType", "文化程度");
  224 + cnames.put("liveAddress", "家庭地址");
  225 + cnames.put("country", "乡镇");
218 226 ResponseUtil.responseExcel(cnames, datas, response);
219 227 }
220 228  
221 229  
222 230  
223 231  
... ... @@ -224,15 +232,36 @@
224 232 CancerScreeningQuery query = getCancerScreeningQuery(queryRequest, hospitalId);
225 233 List <CancerScreeningModel> modelList = cancerScreenService.queryCancerScreList(query);
226 234 if (CollectionUtils.isNotEmpty(modelList)) {
  235 + ResidentsArchiveQuery archiveQuery = new ResidentsArchiveQuery();
227 236 for (CancerScreeningModel model : modelList) {
228 237 Map <String, Object> map = new HashMap <>();
229   - map.put("created", DateUtil.getyyyy_MM_dd(model.getCreated()));//检查日期
  238 + if (StringUtils.isNotEmpty(model.getCertificateNum())){
  239 + archiveQuery.setCertificateNum(model.getCertificateNum());
  240 + List<ResidentsArchiveModel> archiveModelList = residentsArchiveService.queryResident(archiveQuery);
  241 + if (CollectionUtils.isNotEmpty(archiveModelList)){
  242 + ResidentsArchiveModel residentsArchiveModel = archiveModelList.get(0);
  243 + map.put("marriage", FunvCommonUtil.getBaseicConfigByid(residentsArchiveModel.getMarriageId(),
  244 + basicConfigService));
  245 + map.put("nation", FunvCommonUtil.getBaseicConfigByid(model.getNationId(), basicConfigService));
  246 + map.put("levelType", FunvCommonUtil.getBaseicConfigByid(residentsArchiveModel.getLevelTypeId(), basicConfigService));
  247 + } else{
  248 + map.put("marriage","");
  249 + map.put("nation","汉族");
  250 + map.put("levelType","");
  251 + }
  252 + }
  253 +
  254 + map.put("contactName", "");
  255 + map.put("contactPhone", "");
230 256 map.put("name", model.getUsername());//姓名
  257 + map.put("sex", "女");//姓名
231 258 map.put("age", DateUtil.getAge(model.getBirthday()));//年龄
232 259 map.put("cardNum", model.getCertificateNum());//证件号
233 260 map.put("phone", model.getPhone());//联系方式
234 261 map.put("liveAddress", CommonsHelper.getResidence(model.getProvinceId(), model.getCityId(),
235 262 model.getAreaId(), model.getStreetId(), model.getAddress(), basicConfigService));//住址
  263 + map.put("country", CommonsHelper.getResidence(null, null,
  264 + null, model.getStreetId(), null, basicConfigService));//住址
236 265 lascList.add(map);
237 266 }
238 267 }
... ... @@ -305,6 +334,8 @@
305 334 query.setOrgAreaId(queryRequest.getOrgAreaId());
306 335 }
307 336 }
  337 + }else{
  338 + query.setHospitalId(hospitalId);
308 339 }
309 340  
310 341 if (StringUtils.isNotEmpty(queryRequest.getExamineDate())) {
... ... @@ -319,6 +350,11 @@
319 350 String[] arrs = queryRequest.getCheckDate().split(" - ");
320 351 query.setCreatedStart(DateUtil.parseYMD(arrs[0]));
321 352 query.setCreatedEnd(DateUtil.getDayLastSecond(DateUtil.parseYMD(arrs[1])));
  353 + }
  354 +
  355 + if (queryRequest.getStartAge() != null && queryRequest.getEndAge() != null) {
  356 + query.setBirthdayEnd(DateUtil.addYear(new Date(),-queryRequest.getStartAge()));
  357 + query.setBirthdayStart(DateUtil.addYear(new Date(),-queryRequest.getEndAge()-1));
322 358 }
323 359  
324 360 query.setLeftRight(queryRequest.getLeftRight());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LhBabyEyeCheckFacade.java View file @ f4ce305
... ... @@ -71,10 +71,10 @@
71 71 "2".equals(babyCheck.getLhgzfyRight()) || "2".equals(babyCheck.getLhgzfyLeft()) || "2".equals(babyCheck.getLhhqsy()) ||
72 72 "2".equals(babyCheck.getLhhgfsRight()) || "2".equals(babyCheck.getLhhgfsLeft()) || "2".equals(babyCheck.getLhkyqgbzRight()) ||
73 73 "2".equals(babyCheck.getLhkyqgbzLeft()) || "2".equals(babyCheck.getLhdyyesyRight()) || "2".equals(babyCheck.getLhdyyesyLeft()) ||
74   - "2".equals(babyCheck.getLhywjc()) || ("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.6>babyCheck.getLhsljcstRight()) ||
75   - (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.8>babyCheck.getLhsljcstRight()) ||
76   - ("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.6>babyCheck.getLhsljcstLeft()) ||
77   - (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.8>babyCheck.getLhsljcstLeft()) ||
  74 + "2".equals(babyCheck.getLhywjc()) || ("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.6> Double.parseDouble(babyCheck.getLhsljcstRight())) ||
  75 + (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.8> Double.parseDouble(babyCheck.getLhsljcstRight())) ||
  76 + ("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.6> Double.parseDouble(babyCheck.getLhsljcstLeft())) ||
  77 + (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.8> Double.parseDouble(babyCheck.getLhsljcstLeft())) ||
78 78 "2".equals(babyCheck.getLhsldcRight()) || "2".equals(babyCheck.getLhsldcLeft()) || (Boolean) dioptricAnomalyState(babyCheck).get("state")
79 79  
80 80 ){
81 81  
... ... @@ -407,12 +407,12 @@
407 407 if("2".equals(babyCheck.getLhywjc())){
408 408 abnormal+="眼位检查;";
409 409 }
410   - if(("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.6 > babyCheck.getLhsljcstRight()) ||
411   - (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.8 > babyCheck.getLhsljcstRight())){
  410 + if(("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.6 > Double.parseDouble(babyCheck.getLhsljcstRight())) ||
  411 + (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.8 > Double.parseDouble(babyCheck.getLhsljcstRight()))){
412 412 abnormal+="视力检查(右);";
413 413 }
414   - if(("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.6 > babyCheck.getLhsljcstLeft()) ||
415   - (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.8 > babyCheck.getLhsljcstLeft())){
  414 + if(("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.6 > Double.parseDouble(babyCheck.getLhsljcstLeft())) ||
  415 + (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.8 > Double.parseDouble(babyCheck.getLhsljcstLeft()))){
416 416 abnormal+="视力检查(左);";
417 417 }
418 418 if("2".equals(babyCheck.getLhsldcRight())){
419 419  
... ... @@ -435,12 +435,12 @@
435 435 */
436 436 public String getAbnormalInfo(LhBabyEyeCheck babyCheck){
437 437 String abnormalInfo="";
438   - if(("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.6 > babyCheck.getLhsljcstRight()) ||
439   - (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.8 > babyCheck.getLhsljcstRight())){
  438 + if(("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.6 > Double.parseDouble(babyCheck.getLhsljcstRight())) ||
  439 + (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstRight() && 0.8 > Double.parseDouble(babyCheck.getLhsljcstRight()))){
440 440 abnormalInfo+="视力检查(右):"+babyCheck.getLhsljcstRight()+";";
441 441 }
442   - if(("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.6 > babyCheck.getLhsljcstLeft()) ||
443   - (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.8 > babyCheck.getLhsljcstLeft())){
  442 + if(("48".equals(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.6 > Double.parseDouble(babyCheck.getLhsljcstLeft())) ||
  443 + (Arrays.asList("60","72").contains(babyCheck.getCheckMonthId()) && null!=babyCheck.getLhsljcstLeft() && 0.8 > Double.parseDouble(babyCheck.getLhsljcstLeft()))){
444 444 abnormalInfo+="视力检查(左):"+babyCheck.getLhsljcstLeft()+";";
445 445 }
446 446 Map map=dioptricAnomalyState(babyCheck);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ f4ce305
... ... @@ -1681,7 +1681,10 @@
1681 1681 if (end > patientses.size()) {
1682 1682 end = patientses.size();
1683 1683 }
1684   - listFuture.add(commonThreadPool.submit(new QuanChanPatientWorker(patientses.subList(i, end), hospital, usersService, postReviewService, matDeliverService, patientsService, organizationService, basicConfigService, antExService, dischargeAbstractMotherService, matDeliverFollowService)));
  1684 + listFuture.add(commonThreadPool.submit(new QuanChanPatientWorker(patientses.subList(i, end),
  1685 + hospital, usersService, postReviewService, matDeliverService, patientsService,
  1686 + organizationService, basicConfigService, antExService, dischargeAbstractMotherService,
  1687 + matDeliverFollowService,couponService)));
1685 1688 }
1686 1689 for (Future f : listFuture) {
1687 1690 try {
... ... @@ -1910,7 +1913,7 @@
1910 1913 if (end > patientses.size()) {
1911 1914 end = patientses.size();
1912 1915 }
1913   - listFuture.add(commonThreadPool.submit(new WorkHR(patientses.subList(i, end), usersService, hospital, basicConfigService, antExService, patientsService, organizationService)));
  1916 + listFuture.add(commonThreadPool.submit(new WorkHR(patientses.subList(i, end), usersService, hospital, basicConfigService, antExService, patientsService, organizationService,couponService)));
1914 1917 }
1915 1918 for (Future f : listFuture) {
1916 1919 try {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExAddRequest.java View file @ f4ce305
... ... @@ -431,6 +431,15 @@
431 431 public Integer productionSieveType;
432 432  
433 433 private String height;
  434 + private String yqWeight;
  435 +
  436 + public String getYqWeight() {
  437 + return yqWeight;
  438 + }
  439 +
  440 + public void setYqWeight(String yqWeight) {
  441 + this.yqWeight = yqWeight;
  442 + }
434 443  
435 444 public String getHeight() {
436 445 return height;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/CancerScreeningRequest.java View file @ f4ce305
... ... @@ -103,6 +103,25 @@
103 103 private Integer yqDaysStart;
104 104 private Integer yqDaysEnd;
105 105  
  106 + private Integer startAge;
  107 + private Integer endAge;
  108 +
  109 + public Integer getStartAge() {
  110 + return startAge;
  111 + }
  112 +
  113 + public void setStartAge(Integer startAge) {
  114 + this.startAge = startAge;
  115 + }
  116 +
  117 + public Integer getEndAge() {
  118 + return endAge;
  119 + }
  120 +
  121 + public void setEndAge(Integer endAge) {
  122 + this.endAge = endAge;
  123 + }
  124 +
106 125 public Integer getYqDaysStart() {
107 126 return yqDaysStart;
108 127 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/CervicalCancerListRequest.java View file @ f4ce305
... ... @@ -68,6 +68,25 @@
68 68 private Integer yqDaysStart;
69 69 private Integer yqDaysEnd;
70 70  
  71 + private Integer startAge;
  72 + private Integer endAge;
  73 +
  74 + public Integer getStartAge() {
  75 + return startAge;
  76 + }
  77 +
  78 + public void setStartAge(Integer startAge) {
  79 + this.startAge = startAge;
  80 + }
  81 +
  82 + public Integer getEndAge() {
  83 + return endAge;
  84 + }
  85 +
  86 + public void setEndAge(Integer endAge) {
  87 + this.endAge = endAge;
  88 + }
  89 +
71 90 public Integer getYqDaysStart() {
72 91 return yqDaysStart;
73 92 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java View file @ f4ce305
... ... @@ -52,10 +52,10 @@
52 52 private FilePathModel filePath;
53 53  
54 54 //随访医生
55   - //private String booksuifangDoctor;
  55 + private String booksuifangDoctor;
56 56  
57   - //随访医生
58   - private DoctorDTO booksuifangDoctor;
  57 +// //随访医生
  58 +// private DoctorDTO booksuifangDoctor;
59 59  
60 60 //孕妇证件核验方式 1 自动核验 2人工核验
61 61 private String patientVerifType;
62 62  
... ... @@ -107,11 +107,11 @@
107 107 this.level = level;
108 108 }
109 109  
110   - public DoctorDTO getBooksuifangDoctor() {
  110 + public String getBooksuifangDoctor() {
111 111 return booksuifangDoctor;
112 112 }
113 113  
114   - public void setBooksuifangDoctor(DoctorDTO booksuifangDoctor) {
  114 + public void setBooksuifangDoctor(String booksuifangDoctor) {
115 115 this.booksuifangDoctor = booksuifangDoctor;
116 116 }
117 117  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanPatientsResult.java View file @ f4ce305
... ... @@ -119,6 +119,17 @@
119 119 //领劵社区
120 120 private String couponCommunity;
121 121  
  122 + //最后检查时间
  123 + private String lastCheckTime;
  124 +
  125 + public String getLastCheckTime() {
  126 + return lastCheckTime;
  127 + }
  128 +
  129 + public void setLastCheckTime(String lastCheckTime) {
  130 + this.lastCheckTime = lastCheckTime;
  131 + }
  132 +
122 133 public String getrFactor() {
123 134 return rFactor;
124 135 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/RiskPatientsResult.java View file @ f4ce305
... ... @@ -100,6 +100,17 @@
100 100 //初诊时间
101 101 private String firstCheckTime;
102 102  
  103 + //最后检查时间
  104 + private String lastCheckTime;
  105 +
  106 + public String getLastCheckTime() {
  107 + return lastCheckTime;
  108 + }
  109 +
  110 + public void setLastCheckTime(String lastCheckTime) {
  111 + this.lastCheckTime = lastCheckTime;
  112 + }
  113 +
103 114 public String getCouponCommunity() {
104 115 return couponCommunity;
105 116 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java View file @ f4ce305
... ... @@ -60,7 +60,7 @@
60 60 urls.put("area-rongcheng-api.healthbaby.com.cn:12356","荣成");
61 61 urls.put("area-zhucheng-api.healthbaby.com.cn:12356","诸城市妇幼保健院");
62 62 urls.put("area-weihai-api.healthbaby.com.cn:12356","威海市妇幼");
63   - //urls.put("area-chengde-api.healthbaby.com.cn:12356","承德");
  63 + urls.put("area-chengde-api.healthbaby.com.cn:12356","承德");
64 64 //urls.put("area-lingcheng-api.healthbaby.com.cn:12356","陵城");
65 65 }
66 66  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/CervicalCancerServiceImpl.java View file @ f4ce305
... ... @@ -17,6 +17,7 @@
17 17 import com.lyms.platform.operate.web.service.CervicalCancerService;
18 18 import com.lyms.platform.operate.web.utils.CollectionUtils;
19 19 import com.lyms.platform.operate.web.utils.CommonsHelper;
  20 +import com.lyms.platform.operate.web.utils.FunvCommonUtil;
20 21 import com.lyms.platform.operate.web.utils.ResponseUtil;
21 22 import com.lyms.platform.permission.model.Organization;
22 23 import com.lyms.platform.permission.model.Users;
... ... @@ -263,6 +264,10 @@
263 264 query.addCriteria(Criteria.where("checkPackage").is(checkPackage));
264 265 }
265 266  
  267 + if (null!=param.getStartAge() && param.getEndAge() != null) {
  268 + query.addCriteria(Criteria.where("age").gte(param.getStartAge()).lte(param.getEndAge()));
  269 + }
  270 +
266 271 /*20201021 wtt 陵城需求 start */
267 272 String fklcjczd = param.getFklcjczd();//妇科检查临床诊断异常项
268 273 if(StringUtils.isNotEmpty(hospitalId)&&"2100001605".equals(hospitalId)){//隆化需求(前端存的数据格式是数组true和false)
269 274  
270 275  
271 276  
... ... @@ -402,16 +407,24 @@
402 407 * @Date: 2020/10/19 16:59
403 408 */
404 409 public void exportGja(CervicalCancerListRequest param,Integer userId, HttpServletResponse response) {
  410 + param.setPage(1);
  411 + param.setLimit(100000);
405 412 List <Map <String, Object>> datas = getGjaList(param, userId);
406 413 Map <String, String> cnames = new LinkedHashMap <>();
407 414 //cnames.put("xz", "乡镇");
408 415 //cnames.put("checkPackage", "检查套餐");
409   - cnames.put("created", "检查日期");
410 416 cnames.put("name", "姓名");
  417 + cnames.put("sex", "性別");
  418 + cnames.put("nation", "民族");
411 419 cnames.put("age", "年龄");
412 420 cnames.put("cardNum", "证件号");
413   - cnames.put("phone", "联系方式");
414   - cnames.put("liveAddress", "住址");
  421 + cnames.put("marriage", "婚否");
  422 + cnames.put("phone", "本人电话");
  423 + cnames.put("contactName", "联系人姓名");
  424 + cnames.put("contactPhone", "联系人电话");
  425 + cnames.put("levelType", "文化程度");
  426 + cnames.put("liveAddress", "家庭地址");
  427 + cnames.put("country", "乡镇");
415 428 ResponseUtil.responseExcel(cnames, datas, response);
416 429 }
417 430  
418 431  
419 432  
420 433  
... ... @@ -421,19 +434,37 @@
421 434 String hospitalId = autoMatchFacade.getHospitalId(userId);
422 435 Query query = extracted(param, hospitalId);
423 436 List<CervicalCancerModel> cervicalCancerModels = mongoTemplate.find(query, CervicalCancerModel.class);
  437 + ResidentsArchiveQuery archiveQuery = new ResidentsArchiveQuery();
424 438 for (CervicalCancerModel model : cervicalCancerModels) {
425 439 Map <String, Object> map = new HashMap <>();
426   - //map.put("xz", item.getName());//乡镇
427   - //map.put("checkPackage", null!=model.getCheckPackage()?model.getCheckPackage()==1?"宫颈癌筛查":"宫颈+B超检查":"");//检查套餐
428   - map.put("created", DateUtil.getyyyy_MM_dd(model.getCreated()));//检查日期
  440 + if (org.apache.commons.lang.StringUtils.isNotEmpty(model.getIdCardNo())){
  441 + archiveQuery.setCertificateNum(model.getParentId());
  442 + List<ResidentsArchiveModel> archiveModelList = residentsArchiveService.queryResident(archiveQuery);
  443 + if (org.apache.commons.collections.CollectionUtils.isNotEmpty(archiveModelList)){
  444 + ResidentsArchiveModel residentsArchiveModel = archiveModelList.get(0);
  445 + map.put("marriage", FunvCommonUtil.getBaseicConfigByid(residentsArchiveModel.getMarriageId(),
  446 + basicConfigService));
  447 + map.put("nation", FunvCommonUtil.getBaseicConfigByid(model.getNationId(), basicConfigService));
  448 + map.put("levelType", FunvCommonUtil.getBaseicConfigByid(residentsArchiveModel.getLevelTypeId(),
  449 + basicConfigService));
  450 + } else{
  451 + map.put("marriage","");
  452 + map.put("nation","汉族");
  453 + map.put("levelType","");
  454 + }
  455 + }
  456 +
  457 + map.put("contactName", "");
  458 + map.put("contactPhone", "");
429 459 map.put("name", model.getName());//姓名
430   - map.put("age", model.getAge());//年龄
  460 + map.put("sex", "女");//姓名
  461 + map.put("age",model.getAge());//年龄
431 462 map.put("cardNum", model.getIdCardNo());//证件号
432 463 map.put("phone", model.getPhone());//联系方式
433   - map.put("liveAddress", CommonsHelper.getResidence(
434   - model.getProvinceId(),model.getCityId(),
435   - model.getAreaId(),model.getStreetId(),
436   - null,basicConfigService));//住址
  464 + map.put("liveAddress", CommonsHelper.getResidence(model.getProvinceId(), model.getCityId(),
  465 + model.getAreaId(), model.getStreetId(), model.getAddress(), basicConfigService));//住址
  466 + map.put("country", CommonsHelper.getResidence(null, null,
  467 + null, model.getStreetId(), null, basicConfigService));//住址
437 468 gjaList.add(map);
438 469 }
439 470 return gjaList;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ f4ce305
... ... @@ -867,8 +867,11 @@
867 867 result.put("vcCardNo", p.getVcCardNo());
868 868 result.put("username", p.getUsername());
869 869 result.put("birth", DateUtil.getyyyy_MM_dd(p.getBirth()));
870   - result.put("phone", com.lyms.platform.common.utils.StringUtils.encryPhone(p.getPhone()));
871   - result.put("cardNo", com.lyms.platform.common.utils.StringUtils.encryCardNo(p.getCardNo()));
  870 + result.put("phone",p.getPhone());
  871 + result.put("cardNo", p.getCardNo());
  872 +
  873 +// result.put("phone", com.lyms.platform.common.utils.StringUtils.encryPhone(p.getPhone()));
  874 +// result.put("cardNo", com.lyms.platform.common.utils.StringUtils.encryCardNo(p.getCardNo()));
872 875 result.put("age", DateUtil.getAge(p.getBirth()));
873 876 String residenceAddress = findName(p.getProvinceRegisterId()) + findName(p.getCityRegisterId()) + findName(p.getAreaRegisterId()) + findName(p.getStreetRegisterId()) + p.getAddressRegister();
874 877 result.put("juzhu", residenceAddress.replace("null", ""));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java View file @ f4ce305
... ... @@ -12,7 +12,9 @@
12 12 import com.lyms.platform.operate.web.result.HighScoreResult;
13 13 import com.lyms.platform.operate.web.result.QuanChanResult;
14 14 import com.lyms.platform.operate.web.utils.CommonsHelper;
  15 +import com.lyms.platform.permission.model.Organization;
15 16 import com.lyms.platform.permission.model.Users;
  17 +import com.lyms.platform.permission.service.CouponService;
16 18 import com.lyms.platform.permission.service.OrganizationService;
17 19 import com.lyms.platform.permission.service.UsersService;
18 20 import com.lyms.platform.pojo.*;
... ... @@ -54,6 +56,7 @@
54 56 private BasicConfigService basicConfigService;
55 57 private DischargeAbstractMotherService dischargeAbstractMotherService;
56 58 private MatDeliverFollowService matDeliverFollowService;
  59 + private CouponService couponService;
57 60  
58 61 public QuanChanPatientWorker(List <Patients> patientses,
59 62 String hospital,
... ... @@ -62,7 +65,9 @@
62 65 MatDeliverService matDeliverService, PatientsService patientsService,
63 66 OrganizationService organizationService, BasicConfigService basicConfigService,
64 67 AntenatalExaminationService antExService, DischargeAbstractMotherService dischargeAbstractMotherService,
65   - MatDeliverFollowService matDeliverFollowService) {
  68 + MatDeliverFollowService matDeliverFollowService,
  69 + CouponService couponService) {
  70 + this.couponService = couponService;
66 71 this.patientses = patientses;
67 72 this.matDeliverService = matDeliverService;
68 73 this.postReviewService = postReviewService;
... ... @@ -88,14 +93,7 @@
88 93 for (Patients patients : patientses) {
89 94 StopWatch stopWatch = new StopWatch("QuanChanPatientWorker -" + patients.getId());
90 95 QuanChanResult chanResult = new QuanChanResult();
91   - /*********************************************************/
92   - /**
93   - * 秦皇岛需求 在区域妇幼管理---全部孕妇管理---全部产妇管理、全部孕妇管理两个界面,首次建档医院后面加初诊日期一栏列表
94   - */
95   - if (patients.getFirstCheckTime() != null){
96   - chanResult.setFirstCheckTime(DateUtil.getyyyy_MM_dd(patients.getFirstCheckTime()));
97   - }
98   - /*********************************************************/
  96 +
99 97 chanResult.setVcCardNo(patients.getVcCardNo());
100 98 chanResult.setCardNo(patients.getCardNo());
101 99 chanResult.setRemark(patients.getMremark());
... ... @@ -125,6 +123,10 @@
125 123 List <AntenatalExaminationModel> ant = null;
126 124 int i = 0;
127 125 if (CollectionUtils.isNotEmpty(chu)) {
  126 + if (chu.get(0) != null){
  127 + chanResult.setFirstCheckTime(DateUtil.getyyyy_MM_dd(chu.get(0).getCheckTime()));
  128 + }
  129 +
128 130 for (AntExChuModel a : chu) {//唐山滦县导出判断初诊是否是本院
129 131 if (StringUtils.isNotEmpty(a.getHospitalId())) {
130 132 if (a.getHospitalId().equals(hospital)) {
... ... @@ -181,6 +183,21 @@
181 183 //系统初诊次数
182 184 int ichu = CollectionUtils.isEmpty(chu) ? 0 : chu.size();
183 185 chanResult.setCjTimes(ichu + i);
  186 +
  187 + try {
  188 + if (CollectionUtils.isNotEmpty(chu))
  189 + {
  190 + AntExChuModel antExChuModel = chu.get(0);
  191 + Organization org = organizationService.getOrganization(Integer.parseInt( antExChuModel.getHospitalId()));
  192 + chanResult.setFirstBH(org.getName());
  193 + }
  194 +
  195 + //优惠券发放医院
  196 + String coupHospital = couponService.getCouponHospital(patients.getPid());
  197 + chanResult.setCouponCommunity(coupHospital);
  198 + } catch (Exception e) {
  199 + chanResult.setCouponCommunity("");
  200 + }
184 201  
185 202 //出院小结
186 203 DischargeAbstractMotherQuery dischargeAbstractMotherQuery = new DischargeAbstractMotherQuery();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanPatientWorker.java View file @ f4ce305
... ... @@ -31,6 +31,7 @@
31 31 import org.apache.commons.lang.math.NumberUtils;
32 32 import org.slf4j.Logger;
33 33 import org.slf4j.LoggerFactory;
  34 +import org.springframework.data.domain.Sort;
34 35 import org.springframework.util.StopWatch;
35 36  
36 37 import java.util.*;
37 38  
... ... @@ -79,16 +80,8 @@
79 80 antExChuQuery1.setYn(YnEnums.YES.getId());
80 81 for (Patients patients : patientses) {
81 82 try {
82   - StopWatch stopWatch = new StopWatch("QuanPatientWorker -" + patients.getId());
83 83 QuanPatientsResult quanPatientsResult = new QuanPatientsResult();
84   - /*******************************开始**************************/
85   - /**
86   - * 秦皇岛需求 在区域妇幼管理---全部孕妇管理---全部产妇管理、全部孕妇管理两个界面,首次建档医院后面加初诊日期一栏列表
87   - */
88   - if (patients.getFirstCheckTime() != null){
89   - quanPatientsResult.setFirstCheckTime(DateUtil.getyyyy_MM_dd(patients.getFirstCheckTime()));
90   - }
91   - /****************************结束*****************************/
  84 +
92 85 quanPatientsResult.setVcCardNo(patients.getVcCardNo());
93 86 quanPatientsResult.setCardNo(patients.getCardNo());
94 87 quanPatientsResult.setRemark(patients.getMremark());
95 88  
96 89  
97 90  
98 91  
99 92  
... ... @@ -133,64 +126,31 @@
133 126 String screenStr = basicConfigService.getScreenResult(patients.getScreenResult());
134 127 quanPatientsResult.setScreenResult(screenStr);
135 128 quanPatientsResult.setbTime(DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate()));
136   - stopWatch.start("query ant count");
  129 +
  130 +
  131 + //查询当前记录的初诊
137 132 antExChuQuery1.setPid(patients.getPid());
138   - //antExChuQuery1.setParentId(patients.getId());
139   - //增加查询本次产程条数
140 133 antExChuQuery1.setStart(patients.getLastMenses());
141   - List<AntExChuModel> chu = antExService.queryAntExChu(antExChuQuery1.convertToQuery());
142   - //复诊次数
143   - List<AntenatalExaminationModel> ant = null;
144   - if (CollectionUtils.isNotEmpty(chu)) {
145   - for(AntExChuModel a : chu){//唐山滦县导出判断初诊是否是本院
146   - if(StringUtils.isNotEmpty(a.getHospitalId())){
147   - if(a.getHospitalId().equals(hospital)){
148   - quanPatientsResult.setYi("本院");
149   - }else{
150   - quanPatientsResult.setYi("外院");
151   - }
152   - break;
153   - }
  134 + List<AntExChuModel> chu = antExService.queryAntExChu(antExChuQuery1);
  135 +
  136 +
  137 + antExQuery.setStart(patients.getLastMenses());
  138 + antExQuery.setPid(patients.getPid());
  139 + //初诊为空就不用查复诊
  140 + List<AntenatalExaminationModel> ant =null;
  141 + if(CollectionUtils.isNotEmpty(chu)){
  142 + if (chu.get(0).getCheckTime() != null){
  143 + quanPatientsResult.setFirstCheckTime(DateUtil.getyyyy_MM_dd(chu.get(0).getCheckTime()));
154 144 }
155   - ant = antExService.queryAntenatalExamination(antExQuery.convertToQuery());
  145 + ant=antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created"));
156 146 }
157   - //唐山滦县判断复诊是否是本院
158   - if(CollectionUtils.isNotEmpty(ant)){
159   - for(int k = 0;k < ant.size();k++){
160   - if(k>=4){
161   - break;
162   - }
163   - if(0==k){
164   - if(ant.get(k) != null && ant.get(k).getHospitalId() != null && ant.get(k).getHospitalId().equals(hospital)){
165   - quanPatientsResult.setEr("本院");
166   - }else{
167   - quanPatientsResult.setEr("外院");
168   - }
169   - }else if(1==k){
170   - if(ant.get(k) != null && ant.get(k).getHospitalId() != null && ant.get(k).getHospitalId().equals(hospital)){
171   - quanPatientsResult.setSan("本院");
172   - }else{
173   - quanPatientsResult.setSan("外院");
174   - }
175   - }else if(2==k){
176   - if(ant.get(k) != null && ant.get(k).getHospitalId() != null && ant.get(k).getHospitalId().equals(hospital)){
177   - quanPatientsResult.setSi("本院");
178   - }else{
179   - quanPatientsResult.setSi("外院");
180   - }
181   - }else if(3==k){
182   - if(ant.get(k) != null && ant.get(k).getHospitalId() != null && ant.get(k).getHospitalId().equals(hospital)){
183   - quanPatientsResult.setWu("本院");
184   - }else{
185   - quanPatientsResult.setWu("外院");
186   - }
187   - }
188   - }
189   - }
190 147  
191 148 //系统复诊次数
192 149 int i = 0;
193 150 if (CollectionUtils.isNotEmpty(ant)) {
  151 + if (ant.get(0).getCheckDate() != null){
  152 + quanPatientsResult.setLastCheckTime(DateUtil.getyyyy_MM_dd(ant.get(0).getCheckDate()));
  153 + }
194 154 //复诊次数
195 155 i = ant.size();
196 156 sort(ant);
197 157  
198 158  
199 159  
200 160  
201 161  
... ... @@ -222,59 +182,18 @@
222 182 }
223 183 }
224 184 }
225   - //统计产检次数
226   - List <String> patientIds = new ArrayList <>();
227   - patientIds.add(patients.getId());
228   - PatientsQuery patientsQuery = new PatientsQuery();
229   - patientsQuery.setSource(patients.getId());
230   - patientsQuery.setBuildType(1);
231   - if (patients.getPliveTypeId()!=null){
232   - BasicConfigQuery basicConfigQuery = new BasicConfigQuery();
233   - basicConfigQuery.setId(patients.getPliveTypeId());
234 185  
235   - //所有数据
236   - List<BasicConfig> basicConfigList = basicConfigService.queryBasicConfig(basicConfigQuery);
237   - patientsQuery.setLiveType(basicConfigList.get(0).getName());
238   - }
239   - List <Patients> patients1 = patientsService.queryPatient(patientsQuery);
240   - if (CollectionUtils.isNotEmpty(patients1)) {
241   - for (Patients ps : patients1) {
242   - patientIds.add(ps.getPid());
243   - }
244   - }
245   - int chuzhen = 0;
246   - int fuzhen = 0;
247   - //初诊记录
248   - AntExChuQuery antExChuQuery = new AntExChuQuery();
249   - antExChuQuery.setYn(YnEnums.YES.getId());
250   - antExChuQuery.setParentIds(patientIds);
251   - List <AntExChuModel> antExChuModels = antExService.queryAntExChu(antExChuQuery);
252   - if (CollectionUtils.isNotEmpty(antExChuModels)) {
253   - chuzhen = antExChuModels.size();
254   - }
255   - //复诊记录
256   - AntExQuery antExQuery1 = new AntExQuery();
257   - antExQuery1.setYn(YnEnums.YES.getId());
258   - antExQuery1.setParentIds(patientIds);
259   - List <AntenatalExaminationModel> list1 = antExService.queryAntenatalExamination(antExQuery1.convertToQuery());
260   - if (CollectionUtils.isNotEmpty(list1)) {
261   - fuzhen = list1.size();
262   - }
263   - quanPatientsResult.setcTimes(chuzhen + fuzhen);
264   -
265   - antExQuery.setHospitalId(hospital);
266   - //本院初诊
  186 + //初诊次数
  187 + int b = CollectionUtils.isEmpty(chu)?0:chu.size();
  188 + //本院的初诊记录
267 189 int chi = countAntChu(chu, hospital);
268   -
269   - //本院复诊
  190 + //本院的复诊记录
270 191 int chb = capLocalHospital(hospital, ant);
  192 +
  193 + quanPatientsResult.setcTimes(i + b);
271 194 quanPatientsResult.setcHTimes(chi + chb);
272   - quanPatientsResult.setrFactor(patientsQuery.getrFactor());
273   - stopWatch.stop();
  195 + //下次时间
274 196 String nextCheckTime = "";
275   - stopWatch.start("query antex list");
276   -
277   -
278 197 if (null != patients.getNextCheckTime()) {
279 198 nextCheckTime = DateUtil.getyyyy_MM_dd(patients.getNextCheckTime());
280 199 }
... ... @@ -292,9 +211,6 @@
292 211 }
293 212 }
294 213  
295   -
296   - stopWatch.stop();
297   - stopWatch.start("query basicconfig");
298 214 //注册地址
299 215 quanPatientsResult.setRegisterAddr(CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService));
300 216 quanPatientsResult.setAddr(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService));
301 217  
... ... @@ -375,9 +291,7 @@
375 291  
376 292 quanPatientsResult.setrLevel(HighScoreResult.filter(level));
377 293 }
378   - stopWatch.stop();
379 294 data.add(quanPatientsResult);
380   - logger.debug(stopWatch.toString());
381 295 }catch (Exception e)
382 296 {
383 297  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java View file @ f4ce305
... ... @@ -15,6 +15,7 @@
15 15 import com.lyms.platform.operate.web.utils.CommonsHelper;
16 16 import com.lyms.platform.permission.model.Organization;
17 17 import com.lyms.platform.permission.model.Users;
  18 +import com.lyms.platform.permission.service.CouponService;
18 19 import com.lyms.platform.permission.service.OrganizationService;
19 20 import com.lyms.platform.permission.service.UsersService;
20 21 import com.lyms.platform.pojo.AntExChuModel;
21 22  
... ... @@ -51,12 +52,15 @@
51 52 private UsersService usersService;
52 53 private String hospital;
53 54 private PatientsService patientsService;
54   -
  55 + private CouponService couponService;
55 56 private OrganizationService organizationService;
56 57  
57 58 public WorkHR(List<Patients> patientses, UsersService usersService, String hospital,
58 59 BasicConfigService basicConfigService,
59   - AntenatalExaminationService antExService, PatientsService patientsService, OrganizationService organizationService) {
  60 + AntenatalExaminationService antExService, PatientsService patientsService,
  61 + OrganizationService organizationService,
  62 + CouponService couponService) {
  63 + this.couponService = couponService;
60 64 this.patientses = patientses;
61 65 this.usersService = usersService;
62 66 this.hospital = hospital;
... ... @@ -114,6 +118,7 @@
114 118 antExQuery.setStart(patients.getLastMenses());
115 119 antExQuery.setPid(patients.getPid());
116 120 antExQuery.setYn(YnEnums.YES.getId());
  121 +
117 122 antExChuQuery1.setStart(patients.getLastMenses());
118 123 antExChuQuery1.setPid(patients.getPid());
119 124 antExChuQuery1.setYn(YnEnums.YES.getId());
120 125  
... ... @@ -126,10 +131,16 @@
126 131 stopWatch.start("query antex list");
127 132 ant=antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created"));
128 133 stopWatch.stop();
  134 + if (chu.get(0).getCheckTime() != null){
  135 + riskPatientsResult.setFirstCheckTime(DateUtil.getyyyy_MM_dd(chu.get(0).getCheckTime()));
  136 + }
129 137 }
130 138  
131 139 int i = 0;
132 140 if (CollectionUtils.isNotEmpty(ant)) {
  141 + if (ant.get(0).getCheckDate() != null){
  142 + riskPatientsResult.setLastCheckTime(DateUtil.getyyyy_MM_dd(ant.get(0).getCheckDate()));
  143 + }
133 144 //复诊次数
134 145 i = ant.size();
135 146 for (AntenatalExaminationModel a : ant) {
136 147  
... ... @@ -192,13 +203,15 @@
192 203 riskPatientsResult.setRegisterAddr(CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService));
193 204 riskPatientsResult.setAddr(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService));
194 205 try {
195   - String hname = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())).getName();
196   - if ((hname.contains("医院")) || (hname.contains("秦皇岛市妇幼保健院"))) {
197   -// if (!(hname.contains("卫生服务站") || hname.contains("卫生服务中心") || hname.contains("卫生院"))) {
198   - riskPatientsResult.setFirstBH(hname);
199   - } else {
200   - riskPatientsResult.setCouponCommunity(hname);
  206 + if (CollectionUtils.isNotEmpty(chu))
  207 + {
  208 + AntExChuModel antExChuModel = chu.get(0);
  209 + Organization org = organizationService.getOrganization(Integer.parseInt( antExChuModel.getHospitalId()));
  210 + riskPatientsResult.setFirstBH(org.getName());
201 211 }
  212 + //优惠券发放医院
  213 + String coupHospital = couponService.getCouponHospital(patients.getPid());
  214 + riskPatientsResult.setCouponCommunity(coupHospital);
202 215 } catch (Exception e) {
203 216 riskPatientsResult.setFirstBH("");
204 217 riskPatientsResult.setCouponCommunity("");