Commit c30b271af11a4d3e1a6ec7910d3e5eb0d1d2d605

Authored by zhangchao
1 parent 926a52e9a7
Exists in dev

#fix:优化五色专案管理页面新增五色、服务到期等字段

Showing 3 changed files with 61 additions and 10 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/AppointmentModel.java View file @ c30b271
... ... @@ -5,6 +5,8 @@
5 5 import org.springframework.data.annotation.Transient;
6 6  
7 7 import java.util.Date;
  8 +import java.util.List;
  9 +import java.util.Map;
8 10  
9 11 public class AppointmentModel {
10 12 private static final long serialVersionUID = 1L;
11 13  
... ... @@ -24,8 +26,29 @@
24 26 private Integer isBuild;
25 27 @Transient
26 28 private Date serEndTime;
  29 + //服务是否到期 1为是 0为否
  30 + @Transient
  31 + private Integer expire;
27 32 private String pinyin;
28 33 private Date created;
  34 + @Transient
  35 + private List<Map> rlevel;//高危风险颜色
  36 +
  37 + public List<Map> getrlevel() {
  38 + return rlevel;
  39 + }
  40 +
  41 + public void setrlevel(List<Map> rlevel) {
  42 + this.rlevel = rlevel;
  43 + }
  44 +
  45 + public Integer getExpire() {
  46 + return expire;
  47 + }
  48 +
  49 + public void setExpire(Integer expire) {
  50 + this.expire = expire;
  51 + }
29 52  
30 53 public String getPinyin() {
31 54 return pinyin;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java View file @ c30b271
... ... @@ -12,6 +12,7 @@
12 12 import com.lyms.platform.operate.web.request.AntExQueryRequest;
13 13 import com.lyms.platform.operate.web.request.AntenatalExaminationQueryRequest;
14 14 import com.lyms.platform.operate.web.request.PatientQueryRequest;
  15 +import com.lyms.platform.operate.web.result.HighScoreResult;
15 16 import com.lyms.platform.operate.web.utils.CollectionUtils;
16 17 import com.lyms.platform.operate.web.utils.FunvCommonUtil;
17 18 import com.lyms.platform.operate.web.vo.PatientNiptDTO;
... ... @@ -520,7 +521,7 @@
520 521 startTime=startTime+" 00:00:00";
521 522 endTime=endTime+" 23:59:59";
522 523 List<AppointmentModel> modelList= appointmentService.queryAppointment(doctor,startTime,endTime,name,doctorName);
523   -
  524 + Date date=new Date();
524 525 if (CollectionUtils.isNotEmpty(modelList)){
525 526 PatientsQuery patientsQuery =new PatientsQuery();
526 527 patientsQuery.setYn(1);
527 528  
528 529  
529 530  
... ... @@ -544,15 +545,40 @@
544 545 List<Patients> patientsList= patientsService.queryPatient(patientsQuery);
545 546 if (CollectionUtils.isNotEmpty(patientsList)){
546 547 appointmentModel.setIsBuild(1);
547   -
  548 + Patients patients= patientsList.get(0);
548 549 PatientServiceQuery patientQuery = new PatientServiceQuery();
549   - patientQuery.setParentid(patientsList.get(0).getId());
  550 + patientQuery.setParentid(patients.getId());
550 551 patientQuery.setSerType(1);
551 552  
552 553 List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery);
553 554 if (CollectionUtils.isNotEmpty(patientServices)){
554   - appointmentModel.setSerEndTime(patientServices.get(0).getSerEndTime());
  555 + Date serEndTime= patientServices.get(0).getSerEndTime();
  556 + appointmentModel.setSerEndTime(serEndTime);
  557 + if (serEndTime.compareTo(date)>0){
  558 + appointmentModel.setExpire(0);
  559 + }else {
  560 + appointmentModel.setExpire(1);
  561 + }
555 562 }
  563 +
  564 +
  565 + if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getRiskLevelId()) && !"[]".equals(patients.getRiskLevelId())) {
  566 + List level = new ArrayList();
  567 + try {
  568 + List<String> list = JsonUtil.patientRiskLevelIdToList(patients.getRiskLevelId());
  569 + for (String str : list) {
  570 + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(str);
  571 + if (null != basicConfig) {
  572 + Map map = new HashMap();
  573 + basicConfig.replenRisk(map);
  574 + level.add(map);
  575 + }
  576 + }
  577 + } catch (Exception e) {
  578 + ExceptionUtils.catchException(e, "patients.getRiskLevelId error.");
  579 + }
  580 + appointmentModel.setrlevel(HighScoreResult.filter(level));
  581 + }
556 582 }else {
557 583 appointmentModel.setIsBuild(0);
558 584 }
... ... @@ -609,7 +635,7 @@
609 635 }else {
610 636 params.put("categoryId",categoryId);
611 637 params.put("type",type);
612   - str= HttpClientUtil.doGet(MEMBER_BABY_URL+"/wx/pc/articles/precise" ,params,"utf-8",null);
  638 + str= HttpClientUtil.doGet(MEMBER_BABY_URL+"/wx/pc/articles/precise" ,params,"utf-8",null);
613 639 }
614 640 //System.out.println(str);
615 641 return str;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java View file @ c30b271
... ... @@ -683,10 +683,10 @@
683 683 PatientsQuery patientsQuery = new PatientsQuery();
684 684 patientsQuery.setYn(YnEnums.YES.getId());
685 685 patientsQuery.setHospitalId(hospitalId);
  686 + if ("2100002419".equals(hospitalId)){
  687 + patientsQuery.setDtFm(true);
  688 + }
686 689 if (StringUtils.isNotEmpty(riskPatientsQueryRequest.getType())) {
687   - if ("2100002419".equals(hospitalId)){
688   - patientsQuery.setDtFm(true);
689   - }
690 690 if ("2".equals(riskPatientsQueryRequest.getType())) {
691 691 //1孕妇
692 692 patientsQuery.setType(1);
693 693  
694 694  
... ... @@ -802,10 +802,11 @@
802 802 private MongoQuery getQuery(PatientsQuery patientsQuery){
803 803 Criteria c1 = Criteria.where("hospitalId").is(patientsQuery.getHospitalId()).and("yn").is(1);
804 804 String rLevel=patientsQuery.getrLevel();
  805 +
805 806 if (patientsQuery.getType()!=null &&patientsQuery.getType()!=-1){
806   - if (patientsQuery.getType()==1){
  807 + /* if (patientsQuery.getType()==1){
807 808 c1=c1.and("dtFm").ne(0);
808   - }
  809 + }*/
809 810 c1=c1.and("type").is(patientsQuery.getType());
810 811 }
811 812 if (StringUtils.isNotEmpty(patientsQuery.getLastCheckEmployeeId())){
... ... @@ -817,6 +818,7 @@
817 818 if (null != patientsQuery.getLastCTimeEnd()) {
818 819 c1 = c1.lte(patientsQuery.getLastCTimeEnd());
819 820 }
  821 + c1=c1.and("dtFm").ne(0);
820 822 List buildTypes = new ArrayList();
821 823 buildTypes.add(0);
822 824 buildTypes.add(2);