Commit df5fda9b625b61a84925c3687b998fa005765889

Authored by liquanyu
1 parent 8b0d4b2bdd

update

Showing 15 changed files with 1002 additions and 13 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IAntenatalExaminationDao.java View file @ df5fda9
... ... @@ -74,5 +74,6 @@
74 74  
75 75 int queryWeekPointCount(int startWeek, int endWeek, String hospitalId, Date startTime, Date endTime,Integer pointType);
76 76  
  77 + int count(MongoQuery query);
77 78 }
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntenatalExaminationDaoImpl.java View file @ df5fda9
... ... @@ -135,6 +135,15 @@
135 135 this.mongoTemplate.updateFirst(new Query(Criteria.where("id").is(id)), Update.update("abortionZR", abortionZR).set("abortionRG",abortionRG), AntExChuModel.class);
136 136 }
137 137  
  138 + /**
  139 + * 查询条数
  140 + * @param query
  141 + * @return
  142 + */
  143 + public int count(MongoQuery query){
  144 + return (int)count(query.convertToMongoQuery());
  145 + }
  146 +
138 147 @Override
139 148 public int queryWeekPointCount(int startWeek, int endWeek, String hospitalId, Date startTime, Date endTime,Integer pointType) {
140 149 String map = "function(){ " +
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntenatalExaminationService.java View file @ df5fda9
... ... @@ -12,6 +12,7 @@
12 12 import com.lyms.platform.pojo.AntenatalExaminationModel;
13 13 import com.lyms.platform.pojo.Patients;
14 14 import com.lyms.platform.query.AntExChuQuery;
  15 +import com.lyms.platform.query.AntExQuery;
15 16 import com.lyms.platform.query.AntExRecordQuery;
16 17 import com.lyms.platform.query.PatientsQuery;
17 18 import org.apache.commons.collections.CollectionUtils;
... ... @@ -35,6 +36,8 @@
35 36 @Autowired
36 37 private IAntExChuDao iAntExChuDao;
37 38 @Autowired
  39 + private IAntenatalExaminationDao antExDao;
  40 + @Autowired
38 41 private AntExRecordService antExRecordService;
39 42  
40 43 @Autowired
... ... @@ -311,6 +314,11 @@
311 314 }
312 315  
313 316 public List<AntExChuModel> queryAntExChu(AntExChuQuery antExChuQuery) {
  317 + MongoQuery query = antExChuQuery.convertToQuery();
  318 + if (StringUtils.isNotEmpty(antExChuQuery.getNeed())) {
  319 + antExChuQuery.mysqlBuild(iAntExChuDao.count(query));
  320 + query.start(antExChuQuery.getOffset()).end(antExChuQuery.getLimit());
  321 + }
314 322 return iAntExChuDao.query(antExChuQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created"));
315 323 }
316 324  
... ... @@ -332,6 +340,16 @@
332 340  
333 341  
334 342 public List<AntenatalExaminationModel> queryLastAntenatalExamination(MongoQuery query) {
  343 + return iAntenatalExaminationDao.queryAntenatalExamination(query.addOrder(Sort.Direction.DESC, "created"));
  344 + }
  345 +
  346 +
  347 + public List<AntenatalExaminationModel> queryLastAntenx(AntExQuery antExQuery) {
  348 + MongoQuery query = antExQuery.convertToQuery();
  349 + if (StringUtils.isNotEmpty(antExQuery.getNeed())) {
  350 + antExQuery.mysqlBuild(antExDao.count(query));
  351 + query.start(antExQuery.getOffset()).end(antExQuery.getLimit());
  352 + }
335 353 return iAntenatalExaminationDao.queryAntenatalExamination(query.addOrder(Sort.Direction.DESC, "created"));
336 354 }
337 355  
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterMysqlAntexcMapper.java View file @ df5fda9
... ... @@ -52,5 +52,21 @@
52 52  
53 53 void saveMysqlBabyCheck(MysqlBabyCheck model);
54 54 void deleteMysqlBabyCheck(MysqlBabyCheck model);
  55 +
  56 + void deletePatientsToMysql(ReportPatients reportPatients);
  57 +
  58 + void savePatientsToMysql(ReportPatients reportPatients);
  59 +
  60 + void deleteAntExChuToMysql(ReportAntexchu reportAntexchu);
  61 +
  62 + void saveAntExChuToMysql(ReportAntexchu reportAntexchu);
  63 +
  64 + void deleteAntexToMysql(ReportAntex reportAntex);
  65 +
  66 + void saveAntexToMysql(ReportAntex reportAntex);
  67 +
  68 + void deleteMatdeliverToMysql(ReportMatdeliver reportMatdeliver);
  69 +
  70 + void saveMatdeliverToMysql(ReportMatdeliver reportMatdeliver);
55 71 }
platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportAntex.java View file @ df5fda9
  1 +package com.lyms.platform.permission.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * Created by Administrator on 2021-03-23.
  7 + */
  8 +public class ReportAntex {
  9 + private Integer id;
  10 + private String fid;
  11 + private String parentId;
  12 + private String pid;
  13 + private Date checkDate;
  14 + private Date nextCheckTime;
  15 + private String yn;
  16 + private Date created;
  17 +
  18 + public Integer getId() {
  19 + return id;
  20 + }
  21 +
  22 + public void setId(Integer id) {
  23 + this.id = id;
  24 + }
  25 +
  26 + public String getFid() {
  27 + return fid;
  28 + }
  29 +
  30 + public void setFid(String fid) {
  31 + this.fid = fid;
  32 + }
  33 +
  34 + public String getParentId() {
  35 + return parentId;
  36 + }
  37 +
  38 + public void setParentId(String parentId) {
  39 + this.parentId = parentId;
  40 + }
  41 +
  42 + public String getPid() {
  43 + return pid;
  44 + }
  45 +
  46 + public void setPid(String pid) {
  47 + this.pid = pid;
  48 + }
  49 +
  50 + public Date getCheckDate() {
  51 + return checkDate;
  52 + }
  53 +
  54 + public void setCheckDate(Date checkDate) {
  55 + this.checkDate = checkDate;
  56 + }
  57 +
  58 + public Date getNextCheckTime() {
  59 + return nextCheckTime;
  60 + }
  61 +
  62 + public void setNextCheckTime(Date nextCheckTime) {
  63 + this.nextCheckTime = nextCheckTime;
  64 + }
  65 +
  66 + public String getYn() {
  67 + return yn;
  68 + }
  69 +
  70 + public void setYn(String yn) {
  71 + this.yn = yn;
  72 + }
  73 +
  74 + public Date getCreated() {
  75 + return created;
  76 + }
  77 +
  78 + public void setCreated(Date created) {
  79 + this.created = created;
  80 + }
  81 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportAntexchu.java View file @ df5fda9
  1 +package com.lyms.platform.permission.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * Created by Administrator on 2021-03-23.
  7 + */
  8 +public class ReportAntexchu {
  9 + private Integer id;
  10 + private String cid;
  11 + private Date checkTime;
  12 + private Date nextCheckTime;
  13 + private String hospitalId;
  14 + private String pid;
  15 + private String parentId;
  16 + private Date created;
  17 +
  18 + public Date getCreated() {
  19 + return created;
  20 + }
  21 +
  22 + public void setCreated(Date created) {
  23 + this.created = created;
  24 + }
  25 +
  26 + public String getParentId() {
  27 + return parentId;
  28 + }
  29 +
  30 + public void setParentId(String parentId) {
  31 + this.parentId = parentId;
  32 + }
  33 +
  34 + public Integer getId() {
  35 + return id;
  36 + }
  37 +
  38 + public void setId(Integer id) {
  39 + this.id = id;
  40 + }
  41 +
  42 + public String getCid() {
  43 + return cid;
  44 + }
  45 +
  46 + public void setCid(String cid) {
  47 + this.cid = cid;
  48 + }
  49 +
  50 + public Date getCheckTime() {
  51 + return checkTime;
  52 + }
  53 +
  54 + public void setCheckTime(Date checkTime) {
  55 + this.checkTime = checkTime;
  56 + }
  57 +
  58 + public Date getNextCheckTime() {
  59 + return nextCheckTime;
  60 + }
  61 +
  62 + public void setNextCheckTime(Date nextCheckTime) {
  63 + this.nextCheckTime = nextCheckTime;
  64 + }
  65 +
  66 + public String getHospitalId() {
  67 + return hospitalId;
  68 + }
  69 +
  70 + public void setHospitalId(String hospitalId) {
  71 + this.hospitalId = hospitalId;
  72 + }
  73 +
  74 + public String getPid() {
  75 + return pid;
  76 + }
  77 +
  78 + public void setPid(String pid) {
  79 + this.pid = pid;
  80 + }
  81 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportMatdeliver.java View file @ df5fda9
  1 +package com.lyms.platform.permission.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * Created by Administrator on 2021-03-23.
  7 + */
  8 +public class ReportMatdeliver {
  9 + private Integer id;
  10 + private String mid;
  11 + private String parentId;
  12 + private String pid;
  13 + private Date dueDate1;
  14 + private Date created;
  15 + private String fmHospital;
  16 + private String hospitalId;
  17 +
  18 + public Integer getId() {
  19 + return id;
  20 + }
  21 +
  22 + public void setId(Integer id) {
  23 + this.id = id;
  24 + }
  25 +
  26 + public String getMid() {
  27 + return mid;
  28 + }
  29 +
  30 + public void setMid(String mid) {
  31 + this.mid = mid;
  32 + }
  33 +
  34 + public String getParentId() {
  35 + return parentId;
  36 + }
  37 +
  38 + public void setParentId(String parentId) {
  39 + this.parentId = parentId;
  40 + }
  41 +
  42 + public String getPid() {
  43 + return pid;
  44 + }
  45 +
  46 + public void setPid(String pid) {
  47 + this.pid = pid;
  48 + }
  49 +
  50 + public Date getDueDate1() {
  51 + return dueDate1;
  52 + }
  53 +
  54 + public void setDueDate1(Date dueDate1) {
  55 + this.dueDate1 = dueDate1;
  56 + }
  57 +
  58 + public Date getCreated() {
  59 + return created;
  60 + }
  61 +
  62 + public void setCreated(Date created) {
  63 + this.created = created;
  64 + }
  65 +
  66 + public String getFmHospital() {
  67 + return fmHospital;
  68 + }
  69 +
  70 + public void setFmHospital(String fmHospital) {
  71 + this.fmHospital = fmHospital;
  72 + }
  73 +
  74 + public String getHospitalId() {
  75 + return hospitalId;
  76 + }
  77 +
  78 + public void setHospitalId(String hospitalId) {
  79 + this.hospitalId = hospitalId;
  80 + }
  81 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportPatients.java View file @ df5fda9
  1 +package com.lyms.platform.permission.model;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * Created by Administrator on 2021-03-23.
  7 + */
  8 +public class ReportPatients {
  9 + private Integer id;
  10 + private String pid;
  11 + private String patientId;
  12 + private String cardNo;
  13 + private String type;
  14 + private Date lastMenses;
  15 + private String address;
  16 + private String provinceId;
  17 + private String cityId;
  18 + private String areaId;
  19 + private String streetId;
  20 + private String addressPostRest;
  21 + private String provincePostRestId;
  22 + private String cityPostRestId;
  23 + private String areaPostRestId;
  24 + private String streetPostRestId;
  25 + private String addressRegister;
  26 + private String provinceRegisterId;
  27 + private String cityRegisterId;
  28 + private String areaRegisterId;
  29 + private String streetRegisterId;
  30 + private String hospitalId;
  31 + private Date bookbuildingDate;
  32 + private String bookbuildingDoctor;
  33 + private Date created;
  34 + private Date modified;
  35 + private Date birth;
  36 + private String username;
  37 + private String yn;
  38 + private String phone;
  39 + private String pcensusTypeId;
  40 + private String pliveTypeId;
  41 + private String enable;
  42 + private String riskLevelId;
  43 + private Integer buildType;
  44 +
  45 + public Integer getId() {
  46 + return id;
  47 + }
  48 +
  49 + public void setId(Integer id) {
  50 + this.id = id;
  51 + }
  52 +
  53 + public String getPid() {
  54 + return pid;
  55 + }
  56 +
  57 + public void setPid(String pid) {
  58 + this.pid = pid;
  59 + }
  60 +
  61 + public String getPatientId() {
  62 + return patientId;
  63 + }
  64 +
  65 + public void setPatientId(String patientId) {
  66 + this.patientId = patientId;
  67 + }
  68 +
  69 + public String getCardNo() {
  70 + return cardNo;
  71 + }
  72 +
  73 + public void setCardNo(String cardNo) {
  74 + this.cardNo = cardNo;
  75 + }
  76 +
  77 + public String getType() {
  78 + return type;
  79 + }
  80 +
  81 + public void setType(String type) {
  82 + this.type = type;
  83 + }
  84 +
  85 + public Date getLastMenses() {
  86 + return lastMenses;
  87 + }
  88 +
  89 + public void setLastMenses(Date lastMenses) {
  90 + this.lastMenses = lastMenses;
  91 + }
  92 +
  93 + public String getAddress() {
  94 + return address;
  95 + }
  96 +
  97 + public void setAddress(String address) {
  98 + this.address = address;
  99 + }
  100 +
  101 + public String getProvinceId() {
  102 + return provinceId;
  103 + }
  104 +
  105 + public void setProvinceId(String provinceId) {
  106 + this.provinceId = provinceId;
  107 + }
  108 +
  109 + public String getCityId() {
  110 + return cityId;
  111 + }
  112 +
  113 + public void setCityId(String cityId) {
  114 + this.cityId = cityId;
  115 + }
  116 +
  117 + public String getAreaId() {
  118 + return areaId;
  119 + }
  120 +
  121 + public void setAreaId(String areaId) {
  122 + this.areaId = areaId;
  123 + }
  124 +
  125 + public String getStreetId() {
  126 + return streetId;
  127 + }
  128 +
  129 + public void setStreetId(String streetId) {
  130 + this.streetId = streetId;
  131 + }
  132 +
  133 + public String getAddressPostRest() {
  134 + return addressPostRest;
  135 + }
  136 +
  137 + public void setAddressPostRest(String addressPostRest) {
  138 + this.addressPostRest = addressPostRest;
  139 + }
  140 +
  141 + public String getProvincePostRestId() {
  142 + return provincePostRestId;
  143 + }
  144 +
  145 + public void setProvincePostRestId(String provincePostRestId) {
  146 + this.provincePostRestId = provincePostRestId;
  147 + }
  148 +
  149 + public String getCityPostRestId() {
  150 + return cityPostRestId;
  151 + }
  152 +
  153 + public void setCityPostRestId(String cityPostRestId) {
  154 + this.cityPostRestId = cityPostRestId;
  155 + }
  156 +
  157 + public String getAreaPostRestId() {
  158 + return areaPostRestId;
  159 + }
  160 +
  161 + public void setAreaPostRestId(String areaPostRestId) {
  162 + this.areaPostRestId = areaPostRestId;
  163 + }
  164 +
  165 + public String getStreetPostRestId() {
  166 + return streetPostRestId;
  167 + }
  168 +
  169 + public void setStreetPostRestId(String streetPostRestId) {
  170 + this.streetPostRestId = streetPostRestId;
  171 + }
  172 +
  173 + public String getAddressRegister() {
  174 + return addressRegister;
  175 + }
  176 +
  177 + public void setAddressRegister(String addressRegister) {
  178 + this.addressRegister = addressRegister;
  179 + }
  180 +
  181 + public String getProvinceRegisterId() {
  182 + return provinceRegisterId;
  183 + }
  184 +
  185 + public void setProvinceRegisterId(String provinceRegisterId) {
  186 + this.provinceRegisterId = provinceRegisterId;
  187 + }
  188 +
  189 + public String getCityRegisterId() {
  190 + return cityRegisterId;
  191 + }
  192 +
  193 + public void setCityRegisterId(String cityRegisterId) {
  194 + this.cityRegisterId = cityRegisterId;
  195 + }
  196 +
  197 + public String getAreaRegisterId() {
  198 + return areaRegisterId;
  199 + }
  200 +
  201 + public void setAreaRegisterId(String areaRegisterId) {
  202 + this.areaRegisterId = areaRegisterId;
  203 + }
  204 +
  205 + public String getStreetRegisterId() {
  206 + return streetRegisterId;
  207 + }
  208 +
  209 + public void setStreetRegisterId(String streetRegisterId) {
  210 + this.streetRegisterId = streetRegisterId;
  211 + }
  212 +
  213 + public String getHospitalId() {
  214 + return hospitalId;
  215 + }
  216 +
  217 + public void setHospitalId(String hospitalId) {
  218 + this.hospitalId = hospitalId;
  219 + }
  220 +
  221 + public Date getBookbuildingDate() {
  222 + return bookbuildingDate;
  223 + }
  224 +
  225 + public void setBookbuildingDate(Date bookbuildingDate) {
  226 + this.bookbuildingDate = bookbuildingDate;
  227 + }
  228 +
  229 + public String getBookbuildingDoctor() {
  230 + return bookbuildingDoctor;
  231 + }
  232 +
  233 + public void setBookbuildingDoctor(String bookbuildingDoctor) {
  234 + this.bookbuildingDoctor = bookbuildingDoctor;
  235 + }
  236 +
  237 + public Date getCreated() {
  238 + return created;
  239 + }
  240 +
  241 + public void setCreated(Date created) {
  242 + this.created = created;
  243 + }
  244 +
  245 + public Date getModified() {
  246 + return modified;
  247 + }
  248 +
  249 + public void setModified(Date modified) {
  250 + this.modified = modified;
  251 + }
  252 +
  253 + public Date getBirth() {
  254 + return birth;
  255 + }
  256 +
  257 + public void setBirth(Date birth) {
  258 + this.birth = birth;
  259 + }
  260 +
  261 + public String getUsername() {
  262 + return username;
  263 + }
  264 +
  265 + public void setUsername(String username) {
  266 + this.username = username;
  267 + }
  268 +
  269 + public String getYn() {
  270 + return yn;
  271 + }
  272 +
  273 + public void setYn(String yn) {
  274 + this.yn = yn;
  275 + }
  276 +
  277 + public String getPhone() {
  278 + return phone;
  279 + }
  280 +
  281 + public void setPhone(String phone) {
  282 + this.phone = phone;
  283 + }
  284 +
  285 + public String getPcensusTypeId() {
  286 + return pcensusTypeId;
  287 + }
  288 +
  289 + public void setPcensusTypeId(String pcensusTypeId) {
  290 + this.pcensusTypeId = pcensusTypeId;
  291 + }
  292 +
  293 + public String getPliveTypeId() {
  294 + return pliveTypeId;
  295 + }
  296 +
  297 + public void setPliveTypeId(String pliveTypeId) {
  298 + this.pliveTypeId = pliveTypeId;
  299 + }
  300 +
  301 + public String getEnable() {
  302 + return enable;
  303 + }
  304 +
  305 + public void setEnable(String enable) {
  306 + this.enable = enable;
  307 + }
  308 +
  309 + public String getRiskLevelId() {
  310 + return riskLevelId;
  311 + }
  312 +
  313 + public void setRiskLevelId(String riskLevelId) {
  314 + this.riskLevelId = riskLevelId;
  315 + }
  316 +
  317 + public Integer getBuildType() {
  318 + return buildType;
  319 + }
  320 +
  321 + public void setBuildType(Integer buildType) {
  322 + this.buildType = buildType;
  323 + }
  324 +}
platform-biz-service/src/main/java/com/lyms/platform/permission/service/MysqlAntexcService.java View file @ df5fda9
... ... @@ -48,5 +48,22 @@
48 48 void saveMysqlBabyCheck(MysqlBabyCheck mysqlBabyCheck);
49 49  
50 50 void deleteMysqlBabyCheck(MysqlBabyCheck mysqlBabyCheckdb);
  51 +
  52 + void deletePatientsToMysql(ReportPatients reportPatients);
  53 +
  54 + void savePatientsToMysql(ReportPatients reportPatients);
  55 +
  56 + void deleteAntExChuToMysql(ReportAntexchu reportAntexchu);
  57 +
  58 + void saveAntExChuToMysql(ReportAntexchu reportAntexchu);
  59 +
  60 + void deleteAntexToMysql(ReportAntex reportAntex);
  61 +
  62 + void saveAntexToMysql(ReportAntex reportAntex);
  63 +
  64 +
  65 + void deleteMatdeliverToMysql(ReportMatdeliver reportMatdeliver);
  66 +
  67 + void saveMatdeliverToMysql(ReportMatdeliver reportMatdeliver);
51 68 }
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/MysqlAntexcServiceImpl.java View file @ df5fda9
... ... @@ -7,7 +7,6 @@
7 7 import org.springframework.beans.factory.annotation.Autowired;
8 8 import org.springframework.stereotype.Service;
9 9  
10   -import java.util.List;
11 10  
12 11  
13 12 @Service("mysqlAntexcService")
14 13  
... ... @@ -109,7 +108,47 @@
109 108 masterMysqlAntexcMapper.deleteMysqlBabyCheck(model);
110 109 }
111 110  
  111 + @Override
  112 + public void deletePatientsToMysql(ReportPatients reportPatients) {
  113 + masterMysqlAntexcMapper.deletePatientsToMysql(reportPatients);
  114 + }
112 115  
  116 + @Override
  117 + public void savePatientsToMysql(ReportPatients reportPatients) {
  118 + masterMysqlAntexcMapper.savePatientsToMysql(reportPatients);
  119 + }
  120 +
  121 + @Override
  122 + public void deleteAntExChuToMysql(ReportAntexchu reportAntexchu) {
  123 + masterMysqlAntexcMapper.deleteAntExChuToMysql(reportAntexchu);
  124 + }
  125 +
  126 + @Override
  127 + public void saveAntExChuToMysql(ReportAntexchu reportAntexchu) {
  128 + masterMysqlAntexcMapper.saveAntExChuToMysql(reportAntexchu);
  129 + }
  130 +
  131 + @Override
  132 + public void deleteAntexToMysql(ReportAntex reportAntex) {
  133 + masterMysqlAntexcMapper.deleteAntexToMysql(reportAntex);
  134 + }
  135 +
  136 + @Override
  137 + public void saveAntexToMysql(ReportAntex reportAntex) {
  138 + masterMysqlAntexcMapper.saveAntexToMysql(reportAntex);
  139 + }
  140 +
  141 + @Override
  142 + public void deleteMatdeliverToMysql(ReportMatdeliver reportMatdeliver)
  143 + {
  144 + masterMysqlAntexcMapper.deleteMatdeliverToMysql(reportMatdeliver);
  145 + }
  146 +
  147 + @Override
  148 + public void saveMatdeliverToMysql(ReportMatdeliver reportMatdeliver)
  149 + {
  150 + masterMysqlAntexcMapper.saveMatdeliverToMysql(reportMatdeliver);
  151 + }
113 152  
114 153 @Override
115 154 public void addRisk(MysqlRisk model) {
platform-biz-service/src/main/resources/mainOrm/master/MasterMysqlAntexc.xml View file @ df5fda9
... ... @@ -1088,5 +1088,168 @@
1088 1088 )
1089 1089 </insert>
1090 1090  
  1091 +
  1092 +
  1093 + <insert id="savePatientsToMysql" parameterType="com.lyms.platform.permission.model.ReportPatients">
  1094 + INSERT INTO report_patients(
  1095 + pid,
  1096 + patientId,
  1097 + cardNo,
  1098 + type,
  1099 + lastMenses,
  1100 + address,
  1101 + provinceId,
  1102 + cityId,
  1103 + areaId,
  1104 + streetId,
  1105 + addressPostRest,
  1106 + provincePostRestId,
  1107 + cityPostRestId,
  1108 + areaPostRestId,
  1109 + streetPostRestId,
  1110 + addressRegister,
  1111 + provinceRegisterId,
  1112 + cityRegisterId,
  1113 + areaRegisterId,
  1114 + streetRegisterId,
  1115 + hospitalId,
  1116 + bookbuildingDate,
  1117 + bookbuildingDoctor,
  1118 + created,
  1119 + modified,
  1120 + birth,
  1121 + username,
  1122 + yn,
  1123 + phone,
  1124 + pcensusTypeId,
  1125 + pliveTypeId,
  1126 + enable,
  1127 + riskLevelId,
  1128 + buildType
  1129 + ) VALUES (
  1130 + #{pid},
  1131 + #{patientId},
  1132 + #{cardNo},
  1133 + #{type},
  1134 + #{lastMenses},
  1135 + #{address},
  1136 + #{provinceId},
  1137 + #{cityId},
  1138 + #{areaId},
  1139 + #{streetId},
  1140 + #{addressPostRest},
  1141 + #{provincePostRestId},
  1142 + #{cityPostRestId},
  1143 + #{areaPostRestId},
  1144 + #{streetPostRestId},
  1145 + #{addressRegister},
  1146 + #{provinceRegisterId},
  1147 + #{cityRegisterId},
  1148 + #{areaRegisterId},
  1149 + #{streetRegisterId},
  1150 + #{hospitalId},
  1151 + #{bookbuildingDate},
  1152 + #{bookbuildingDoctor},
  1153 + #{created},
  1154 + #{modified},
  1155 + #{birth},
  1156 + #{username},
  1157 + #{yn},
  1158 + #{phone},
  1159 + #{pcensusTypeId},
  1160 + #{pliveTypeId},
  1161 + #{enable},
  1162 + #{riskLevelId},
  1163 + #{buildType}
  1164 + )
  1165 +
  1166 + </insert>
  1167 +
  1168 +
  1169 + <delete id="deletePatientsToMysql" parameterType="com.lyms.platform.permission.model.ReportPatients">
  1170 + DELETE from report_patients WHERE patientId = #{patientId}
  1171 + </delete>
  1172 +
  1173 +
  1174 +
  1175 + <insert id="saveAntExChuToMysql" parameterType="com.lyms.platform.permission.model.ReportAntexchu">
  1176 + INSERT INTO report_antexchu(
  1177 + cid,
  1178 + checkTime,
  1179 + nextCheckTime,
  1180 + hospitalId,
  1181 + pid,
  1182 + parentId,
  1183 + created
  1184 + ) VALUES (
  1185 + #{cid},
  1186 + #{checkTime},
  1187 + #{nextCheckTime},
  1188 + #{hospitalId},
  1189 + #{pid},
  1190 + #{parentId},
  1191 + #{created}
  1192 + )
  1193 +
  1194 + </insert>
  1195 +
  1196 +
  1197 + <delete id="deleteAntExChuToMysql" parameterType="com.lyms.platform.permission.model.ReportAntexchu">
  1198 + DELETE from report_antexchu WHERE cid = #{cid}
  1199 + </delete>
  1200 +
  1201 +
  1202 + <insert id="saveAntexToMysql" parameterType="com.lyms.platform.permission.model.ReportAntex">
  1203 + INSERT INTO report_antex(
  1204 + fid,
  1205 + parentId,
  1206 + pid,
  1207 + checkDate,
  1208 + nextCheckTime,
  1209 + yn,
  1210 + created
  1211 + ) VALUES (
  1212 + #{fid},
  1213 + #{parentId},
  1214 + #{pid},
  1215 + #{checkDate},
  1216 + #{nextCheckTime},
  1217 + #{yn},
  1218 + #{created}
  1219 + )
  1220 +
  1221 + </insert>
  1222 +
  1223 +
  1224 + <delete id="deleteAntexToMysql" parameterType="com.lyms.platform.permission.model.ReportAntex">
  1225 + DELETE from report_antex WHERE fid = #{fid}
  1226 + </delete>
  1227 +
  1228 +
  1229 + <insert id="saveMatdeliverToMysql" parameterType="com.lyms.platform.permission.model.ReportMatdeliver">
  1230 + INSERT INTO report_matdeliver(
  1231 + mid,
  1232 + parentId,
  1233 + pid,
  1234 + dueDate1,
  1235 + created,
  1236 + fmHospital,
  1237 + hospitalId
  1238 + ) VALUES (
  1239 + #{mid},
  1240 + #{parentId},
  1241 + #{pid},
  1242 + #{dueDate1},
  1243 + #{created},
  1244 + #{fmHospital},
  1245 + #{hospitalId}
  1246 + )
  1247 +
  1248 + </insert>
  1249 +
  1250 +
  1251 + <delete id="deleteMatdeliverToMysql" parameterType="com.lyms.platform.permission.model.ReportMatdeliver">
  1252 + DELETE from report_matdeliver WHERE mid = #{mid}
  1253 + </delete>
1091 1254 </mapper>
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java View file @ df5fda9
... ... @@ -1261,5 +1261,161 @@
1261 1261 syncBabyCheck(startDate, endDate);
1262 1262 System.out.println("syncLpData end ........");
1263 1263 }
  1264 +
  1265 +
  1266 +
  1267 + public void syncPatientsToMysql(Date start,Date end)
  1268 + {
  1269 + PatientsQuery patientsQuery = new PatientsQuery();
  1270 + patientsQuery.setYn(YnEnums.YES.getId());
  1271 + patientsQuery.setCreatedTimeStart(start);
  1272 + patientsQuery.setCreatedTimeEnd(end);
  1273 + patientsQuery.setNeed("true");
  1274 + patientsQuery.setLimit(100);
  1275 + int page = 1;
  1276 + while (true)
  1277 + {
  1278 + patientsQuery.setPage(page);
  1279 + List<Patients> patientses = patientsService.queryPatient(patientsQuery);
  1280 + if (CollectionUtils.isNotEmpty(patientses))
  1281 + {
  1282 + System.out.println("同步完成syncPatientsToMysql");
  1283 + break;
  1284 + }
  1285 +
  1286 + for(Patients patients : patientses)
  1287 + {
  1288 + ReportPatients reportPatients = new ReportPatients();
  1289 +
  1290 + try {
  1291 + BeanUtils.copyProperties(reportPatients,patients);
  1292 + } catch (IllegalAccessException e) {
  1293 + e.printStackTrace();
  1294 + } catch (InvocationTargetException e) {
  1295 + e.printStackTrace();
  1296 + }
  1297 + mysqlAntexcService.deletePatientsToMysql(reportPatients);
  1298 + mysqlAntexcService.savePatientsToMysql(reportPatients);
  1299 + }
  1300 + page++;
  1301 + }
  1302 + }
  1303 +
  1304 +
  1305 + public void syncAntexchuToMysql(Date start,Date end)
  1306 + {
  1307 + AntExChuQuery antExChuQuery = new AntExChuQuery();
  1308 + antExChuQuery.setYn(YnEnums.YES.getId());
  1309 + antExChuQuery.setCheckTimeStart(start);
  1310 + antExChuQuery.setCheckTimeEnd(end);
  1311 + antExChuQuery.setNext(true);
  1312 +
  1313 + antExChuQuery.setLimit(100);
  1314 + int page = 1;
  1315 + while (true)
  1316 + {
  1317 + antExChuQuery.setPage(page);
  1318 + List <AntExChuModel> antExChus = antenatalExaminationService.queryAntExChu(antExChuQuery);
  1319 + if (CollectionUtils.isNotEmpty(antExChus))
  1320 + {
  1321 + System.out.println("同步完成syncAntexchuToMysql");
  1322 + break;
  1323 + }
  1324 +
  1325 + for(AntExChuModel antExChu : antExChus)
  1326 + {
  1327 + ReportAntexchu reportAntexchu = new ReportAntexchu();
  1328 +
  1329 + try {
  1330 + BeanUtils.copyProperties(reportAntexchu,antExChu);
  1331 + } catch (IllegalAccessException e) {
  1332 + e.printStackTrace();
  1333 + } catch (InvocationTargetException e) {
  1334 + e.printStackTrace();
  1335 + }
  1336 + mysqlAntexcService.deleteAntExChuToMysql(reportAntexchu);
  1337 + mysqlAntexcService.saveAntExChuToMysql(reportAntexchu);
  1338 + }
  1339 + page++;
  1340 + }
  1341 + }
  1342 +
  1343 +
  1344 + public void syncAntexToMysql(Date start,Date end)
  1345 + {
  1346 + AntExQuery antExQuery = new AntExQuery();
  1347 + antExQuery.setYn(YnEnums.YES.getId());
  1348 + antExQuery.setCreatedTimeStart(start);
  1349 + antExQuery.setCreatedTimeEnd(end);
  1350 + antExQuery.setNext(true);
  1351 +
  1352 + antExQuery.setLimit(100);
  1353 + int page = 1;
  1354 + while (true)
  1355 + {
  1356 + antExQuery.setPage(page);
  1357 + List <AntenatalExaminationModel> antexs = antenatalExaminationService.queryLastAntenx(antExQuery);
  1358 + if (CollectionUtils.isNotEmpty(antexs))
  1359 + {
  1360 + System.out.println("同步完成syncAntexToMysql");
  1361 + break;
  1362 + }
  1363 +
  1364 + for(AntenatalExaminationModel antex : antexs)
  1365 + {
  1366 + ReportAntex reportAntex = new ReportAntex();
  1367 +
  1368 + try {
  1369 + BeanUtils.copyProperties(reportAntex,antex);
  1370 + } catch (IllegalAccessException e) {
  1371 + e.printStackTrace();
  1372 + } catch (InvocationTargetException e) {
  1373 + e.printStackTrace();
  1374 + }
  1375 + mysqlAntexcService.deleteAntexToMysql(reportAntex);
  1376 + mysqlAntexcService.saveAntexToMysql(reportAntex);
  1377 + }
  1378 + page++;
  1379 + }
  1380 + }
  1381 +
  1382 +
  1383 + public void syncMatdeliverToMysql(Date start,Date end)
  1384 + {
  1385 + MatDeliverQuery matDeliverQuery = new MatDeliverQuery();
  1386 + matDeliverQuery.setYn(YnEnums.YES.getId());
  1387 + matDeliverQuery.setCreatedTimeStart(start);
  1388 + matDeliverQuery.setCreatedTimeEnd(end);
  1389 + matDeliverQuery.setNext(true);
  1390 +
  1391 + matDeliverQuery.setLimit(100);
  1392 + int page = 1;
  1393 + while (true)
  1394 + {
  1395 + matDeliverQuery.setPage(page);
  1396 + List <MaternalDeliverModel> maternalDeliverModels = matDeliverService.query(matDeliverQuery);
  1397 + if (CollectionUtils.isNotEmpty(maternalDeliverModels))
  1398 + {
  1399 + System.out.println("同步完成syncMatdeliverToMysql");
  1400 + break;
  1401 + }
  1402 +
  1403 + for(MaternalDeliverModel maternalDeliverModel : maternalDeliverModels)
  1404 + {
  1405 + ReportMatdeliver reportMatdeliver = new ReportMatdeliver();
  1406 +
  1407 + try {
  1408 + BeanUtils.copyProperties(reportMatdeliver,maternalDeliverModel);
  1409 + } catch (IllegalAccessException e) {
  1410 + e.printStackTrace();
  1411 + } catch (InvocationTargetException e) {
  1412 + e.printStackTrace();
  1413 + }
  1414 + mysqlAntexcService.deleteMatdeliverToMysql(reportMatdeliver);
  1415 + mysqlAntexcService.saveMatdeliverToMysql(reportMatdeliver);
  1416 + }
  1417 + page++;
  1418 + }
  1419 + }
1264 1420 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/PatientWeightService.java View file @ df5fda9
... ... @@ -6,6 +6,7 @@
6 6 import com.lyms.platform.pojo.WeightConfigModel;
7 7 import com.lyms.platform.pojo.WeightReportModel;
8 8  
  9 +import java.util.Date;
9 10 import java.util.List;
10 11 import java.util.Map;
11 12 import java.util.Set;
... ... @@ -66,7 +67,7 @@
66 67 BaseResponse qhdHighRiskReport(String pid, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, String bregmatic, String bregmaticOther);
67 68  
68 69 public void setReport(Map<String, Object> restMap, Map<Integer, String> weights, String beforeWeight,
69   - String bmi, Map<String, String> dayWeights, String bregmatic);
  70 + String bmi, Map<String, String> dayWeights, String bregmatic,Date lastMeanss);
70 71  
71 72 public void getSerie(Map<String, Map<Integer, Double>> series, String bmiStr, String bregmatic);
72 73  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java View file @ df5fda9
... ... @@ -701,8 +701,9 @@
701 701 map.put("hasPrintInWeek", false);
702 702 }
703 703  
704   - setReport(map, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic());
705 704  
  705 + setReport(map, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic(),patients.getLastMenses());
  706 +
706 707 String bregmaticOther = patientWeight.getBregmaticOther();
707 708 if (StringUtils.isEmpty(bregmaticOther) || "null".equals(bregmaticOther)) {
708 709 bregmaticOther = "";
... ... @@ -1189,7 +1190,7 @@
1189 1190 weights.put(DateUtil.getWeek2(patients.getLastMenses(), DateUtil.parseYMD(entry.getKey())), entry.getValue());
1190 1191 }
1191 1192 }
1192   - setReport(map, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic());
  1193 + setReport(map, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic(),patients.getLastMenses());
1193 1194 CollectionUtils.removeNullValue(map);
1194 1195  
1195 1196 healthChargeFacade.addHealthCharge(hospitalId, 1, patientWeight.getPatientId(), 1, 1, userId, doctorId, false);
1196 1197  
... ... @@ -2003,13 +2004,14 @@
2003 2004  
2004 2005 @Override
2005 2006 public void setReport(Map<String, Object> restMap, Map<Integer, String> weights, String beforeWeight,
2006   - String bmi, Map<String, String> dayWeights, String bregmatic) {
  2007 + String bmi, Map<String, String> dayWeights, String bregmatic,Date lastMeanss) {
2007 2008 List<Map<String, Object>> restList = new ArrayList<>();
2008 2009 if (MapUtils.isNotEmpty(dayWeights)) {
2009 2010 for (String key : dayWeights.keySet()) {
2010 2011 Map<String, Object> temp = new LinkedHashMap<>();
2011 2012 temp.put("nowWeight", dayWeights.get(key));
2012 2013 temp.put("recordTime", key);
  2014 + temp.put("dueWeek", lastMeanss != null ? DateUtil.getWeekDesc(lastMeanss,DateUtil.parseYMD(key)) : "");
2013 2015 restList.add(temp);
2014 2016 }
2015 2017 }
... ... @@ -2931,7 +2933,7 @@
2931 2933 {
2932 2934  
2933 2935 Map data = new HashMap();
2934   - setReport(data,weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic());
  2936 + setReport(data,weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic(),patients.getLastMenses());
2935 2937  
2936 2938 Map<String, String> kmap = computeKulServiceManager.getComputeKulByRisk(rid).getComputeKul(Double.parseDouble(patientWeight.getBeforeWeight()),
2937 2939 Double.parseDouble(patientWeight.getNowWeight()), week, bmiD, patientWeight.getBregmatic(), patientWeight.getBeforeHeight(), version);
... ... @@ -3222,7 +3224,7 @@
3222 3224 }
3223 3225  
3224 3226 public Map getInfo(Map<Integer, String> weights, Map<String, Object> data, WeightReportModel weightReportModel, PatientWeight patientWeight, Patients patients, double bmi, int week, String kcal) {
3225   - setReport(data, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic());
  3227 + setReport(data, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic(),patients.getLastMenses());
3226 3228 Map userMap = new HashMap();
3227 3229 userMap.put("userName", patients.getUsername());
3228 3230 userMap.put("age", patients.getAge() + "岁");
... ... @@ -3287,7 +3289,7 @@
3287 3289  
3288 3290  
3289 3291 public Map getDiabetestInfo(Map<Integer, String> weights, Map<String, Object> data, WeightReportModel weightReportModel, PatientWeight patientWeight, Patients patients, double bmi, int week, String kcal) {
3290   - setReport(data, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic());
  3292 + setReport(data, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic(),patients.getLastMenses());
3291 3293 Map userMap = new HashMap();
3292 3294 userMap.put("userName", patients.getUsername());
3293 3295 userMap.put("age", patients.getAge() + "岁");
... ... @@ -3350,7 +3352,7 @@
3350 3352 public Map getQhdInfo(Map<Integer, String> weights, Map<String, Object> data,
3351 3353 List<QhdWeightConfigModel> weightReportModel, PatientWeight patientWeight,
3352 3354 Patients patients, double bmi, int week, QhdWeightConfigModel qhdWeightConfigModel) {
3353   - setReport(data, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic());
  3355 + setReport(data, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(), patientWeight.getBregmatic(),patients.getLastMenses());
3354 3356 Map userMap = new HashMap();
3355 3357  
3356 3358 userMap.put("userName", patients.getUsername());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TemporaryWeightServiceImpl.java View file @ df5fda9
... ... @@ -381,7 +381,7 @@
381 381 map.put("hasPrintInWeek", false);
382 382 }
383 383  
384   - patientWeightService.setReport(map, weights, temporaryUser.getBeforeWeight(), template.getBmi(), template.getDayWeights(), temporaryUser.getBregmatic());
  384 + patientWeightService.setReport(map, weights, temporaryUser.getBeforeWeight(), template.getBmi(), template.getDayWeights(), temporaryUser.getBregmatic(),temporaryUser.getLastMenses());
385 385  
386 386 //高危报告权限判断
387 387 List<String> healthy = new ArrayList();
... ... @@ -500,7 +500,7 @@
500 500 weights.put(DateUtil.getWeek2(temporaryUser.getLastMenses(), DateUtil.parseYMD(entry.getKey())), entry.getValue());
501 501 }
502 502 }
503   - patientWeightService.setReport(map, weights, temporaryUser.getBeforeWeight(), temporaryWeight.getBmi(), temporaryWeight.getDayWeights(), temporaryUser.getBregmatic());
  503 + patientWeightService.setReport(map, weights, temporaryUser.getBeforeWeight(), temporaryWeight.getBmi(), temporaryWeight.getDayWeights(), temporaryUser.getBregmatic(),temporaryUser.getLastMenses());
504 504 CollectionUtils.removeNullValue(map);
505 505 List<Map<String, Object>> dayWeights2 = temporaryWeight.getDayWeights2();
506 506 //String doctorId = patientWeightService.getDoctorId(dayWeights2);
... ... @@ -874,7 +874,7 @@
874 874  
875 875  
876 876 public Map getInfo(Map<Integer, String> weights, Map<String, Object> data, WeightReportModel weightReportModel, TemporaryWeightModel model, TemporaryUserModel temporaryUser, double bmi, int week, String kcal) {
877   - patientWeightService.setReport(data, weights, temporaryUser.getBeforeWeight(), model.getBmi(), model.getDayWeights(), temporaryUser.getBregmatic());
  877 + patientWeightService.setReport(data, weights, temporaryUser.getBeforeWeight(), model.getBmi(), model.getDayWeights(), temporaryUser.getBregmatic(),temporaryUser.getLastMenses());
878 878 Map userMap = new HashMap();
879 879 userMap.put("userName", temporaryUser.getUserName());
880 880 userMap.put("age", DateUtil.getAge(temporaryUser.getBirth()) + "岁");
... ... @@ -940,7 +940,7 @@
940 940  
941 941  
942 942 public Map getDiabetestInfo(Map<Integer, String> weights, Map<String, Object> data, WeightReportModel weightReportModel, TemporaryWeightModel model, TemporaryUserModel temporaryUser, double bmi, int week, String kcal) {
943   - patientWeightService.setReport(data, weights, temporaryUser.getBeforeWeight(), model.getBmi(), model.getDayWeights(), temporaryUser.getBregmatic());
  943 + patientWeightService.setReport(data, weights, temporaryUser.getBeforeWeight(), model.getBmi(), model.getDayWeights(), temporaryUser.getBregmatic(),temporaryUser.getLastMenses());
944 944 Map userMap = new HashMap();
945 945 userMap.put("userName", temporaryUser.getUserName());
946 946 userMap.put("age", DateUtil.getAge(temporaryUser.getBirth()) + "岁");