From 7adadbea51c53e4a2f9cde765cf606ea47d57b60 Mon Sep 17 00:00:00 2001 From: litao Date: Thu, 25 May 2017 11:36:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8A=BD=E5=8F=96=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../permission/service/impl/CouponServiceImpl.java | 41 +- .../src/main/resources/config.properties | 1 + .../src/main/resources/database.properties | 2 + .../main/java/com/lyms/etl/ApplicationRunner.java | 4 +- .../main/java/com/lyms/etl/dao/ICouponInfoDao.java | 4 + .../src/main/java/com/lyms/etl/model/AntExChu.java | 1005 ----------------- .../src/main/java/com/lyms/etl/model/Antex.java | 372 +++++++ .../main/java/com/lyms/etl/model/AntexOnline.java | 373 +++++++ .../src/main/java/com/lyms/etl/model/Antexc.java | 1005 +++++++++++++++++ .../main/java/com/lyms/etl/model/AntexcOnline.java | 1006 +++++++++++++++++ .../main/java/com/lyms/etl/model/CouponInfo.java | 30 + .../src/main/java/com/lyms/etl/model/Patients.java | 1172 ++++++++++++++++++++ .../lyms/etl/repository/AntExChuRepository.java | 13 - .../lyms/etl/repository/AntexOnLineRepository.java | 13 + .../etl/repository/AntexcOnLineRepository.java | 13 + .../com/lyms/etl/repository/AntexcRepository.java | 13 + .../lyms/etl/repository/PatientsRepository.java | 12 + .../com/lyms/etl/service/ICouponInfoService.java | 4 +- .../java/com/lyms/etl/service/IInvokeHandler.java | 4 +- .../lyms/etl/service/impl/CouponServiceImpl.java | 169 ++- .../java/com/lyms/etl/util/CollectionUtil.java | 86 ++ .../src/main/java/com/lyms/etl/util/DateUtil.java | 9 + .../src/main/resources/application-local.yml | 14 + .../src/main/resources/application-prod.yml | 6 +- .../src/main/resources/application-qhd.yml | 14 + .../src/main/resources/application.properties | 3 +- regional-etl/src/main/resources/application.yml | 60 +- .../main/resources/mappers/CouponInfoMapper.xml | 20 +- 28 files changed, 4370 insertions(+), 1098 deletions(-) delete mode 100644 regional-etl/src/main/java/com/lyms/etl/model/AntExChu.java create mode 100644 regional-etl/src/main/java/com/lyms/etl/model/Antex.java create mode 100644 regional-etl/src/main/java/com/lyms/etl/model/AntexOnline.java create mode 100644 regional-etl/src/main/java/com/lyms/etl/model/Antexc.java create mode 100644 regional-etl/src/main/java/com/lyms/etl/model/AntexcOnline.java create mode 100644 regional-etl/src/main/java/com/lyms/etl/model/Patients.java delete mode 100644 regional-etl/src/main/java/com/lyms/etl/repository/AntExChuRepository.java create mode 100644 regional-etl/src/main/java/com/lyms/etl/repository/AntexOnLineRepository.java create mode 100644 regional-etl/src/main/java/com/lyms/etl/repository/AntexcOnLineRepository.java create mode 100644 regional-etl/src/main/java/com/lyms/etl/repository/AntexcRepository.java create mode 100644 regional-etl/src/main/java/com/lyms/etl/repository/PatientsRepository.java create mode 100644 regional-etl/src/main/java/com/lyms/etl/util/CollectionUtil.java create mode 100644 regional-etl/src/main/java/com/lyms/etl/util/DateUtil.java create mode 100644 regional-etl/src/main/resources/application-local.yml create mode 100644 regional-etl/src/main/resources/application-qhd.yml diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java index b6c3fa1..c158ada 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java @@ -10,8 +10,11 @@ import com.lyms.platform.common.utils.PropertiesUtil; import com.lyms.platform.permission.dao.master.CouponMapper; import com.lyms.platform.permission.model.CouponInfo; import com.lyms.platform.permission.model.Organization; +import com.lyms.platform.permission.model.WeixinQrcodeConfig; +import com.lyms.platform.permission.model.WeixinQrcodeConfigQuery; import com.lyms.platform.permission.service.CouponService; import com.lyms.platform.permission.service.OrganizationService; +import com.lyms.platform.permission.service.WeixinQrcodeConfigService; import com.lyms.platform.pojo.*; import net.sf.json.JSONObject; import org.apache.commons.collections.CollectionUtils; @@ -21,6 +24,7 @@ import org.apache.commons.lang3.time.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Sort; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.query.Criteria; @@ -56,7 +60,11 @@ public class CouponServiceImpl implements CouponService { /** 建档 */ private static final String PUT_ON_RECORD = "4"; + @Autowired + private WeixinQrcodeConfigService weixinQrcodeConfigService; + @Value("${or.code.create.type}") + private Integer type; @Autowired private CouponMapper couponMapper; @@ -213,9 +221,6 @@ public class CouponServiceImpl implements CouponService { continue; } - - - Object actualStart = temp.get("actual_start"); Object actualEnd = temp.get("actual_end"); Object unitType = temp.get("unit_type"); @@ -384,7 +389,7 @@ public class CouponServiceImpl implements CouponService { @Override public String findUrl(String code) { - try { + Map map = couponMapper.findUrl(code); String hId = map.get("create_hospital_id").toString(); String userId = map.get("user_id").toString(); @@ -393,18 +398,30 @@ public class CouponServiceImpl implements CouponService { Map params = new HashMap<>(); params.put("hId", hId); -// params.put("dpId", person.getType() == 2 ? "1" : "2"); params.put("dpId", person.getType() == 2 ? "2" : "1"); - String s = HttpClientUtil.doGet(PropertiesUtil.getInstance().getDefault("or.code.create.url"), params, "utf-8", null); - JSONObject jsonObject = JSONObject.fromObject(s); - return jsonObject.get("url").toString(); - } catch (Exception e) { - e.printStackTrace(); - return "http://weixin.qq.com/r/Fi9bQyLEgH--rWYg93oE"; - } + if(type == 1) { + WeixinQrcodeConfigQuery query = new WeixinQrcodeConfigQuery(); + query.setDpId(person.getType() == 2 ? 2 : 1); + query.setHospitalId(hId); + + + List weixinQrcodeConfigs = weixinQrcodeConfigService.queryWeixinShowqrcodeConfig(query); + if(CollectionUtils.isNotEmpty(weixinQrcodeConfigs)) { + String url = weixinQrcodeConfigs.get(0).getWxUrl(); + return url; + } + } + try {String s = HttpClientUtil.doGet(PropertiesUtil.getInstance().getDefault("or.code.create.url"), params, "utf-8", null); + JSONObject jsonObject = JSONObject.fromObject(s); + return jsonObject.get("url").toString(); + } catch (Exception e) { + e.printStackTrace(); + return "http://weixin.qq.com/r/Fi9bQyLEgH--rWYg93oE"; + } } + @Override public void invalid(String personId, String couponTypes) { Map param = new HashMap<>(); diff --git a/platform-operate-api/src/main/resources/config.properties b/platform-operate-api/src/main/resources/config.properties index 589b67c..4089c82 100644 --- a/platform-operate-api/src/main/resources/config.properties +++ b/platform-operate-api/src/main/resources/config.properties @@ -78,5 +78,6 @@ jdbc.7.url=jdbc:oracle:thin:@119.90.57.26:1522:orcl jdbc.7.username=LYMS_ODS jdbc.7.password=Welcome1 + platform.operate.api.validate.url=http://localhost:8080/ diff --git a/platform-operate-api/src/main/resources/database.properties b/platform-operate-api/src/main/resources/database.properties index dff2a1c..1ea0dc1 100644 --- a/platform-operate-api/src/main/resources/database.properties +++ b/platform-operate-api/src/main/resources/database.properties @@ -87,3 +87,5 @@ sequence.schedule.expression=0 */1 * * * ? # 二维码地址 or.code.url=https://rp-api.healthbaby.com.cn/scan?code={0} or.code.create.url=http://ams.api.healthbaby.com.cn/v1/create/qrcode +# 二维码地址生成方式 1=本地 2=线上 +or.code.create.type=2 diff --git a/regional-etl/src/main/java/com/lyms/etl/ApplicationRunner.java b/regional-etl/src/main/java/com/lyms/etl/ApplicationRunner.java index 760339e..b62d6f7 100644 --- a/regional-etl/src/main/java/com/lyms/etl/ApplicationRunner.java +++ b/regional-etl/src/main/java/com/lyms/etl/ApplicationRunner.java @@ -1,6 +1,5 @@ package com.lyms.etl; -import com.lyms.etl.datasource.DynamicDataSourceRegister; import com.lyms.etl.service.IInvokeHandler; import com.lyms.etl.util.AopTargetUtil; import org.mybatis.spring.annotation.MapperScan; @@ -10,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Import; import org.springframework.transaction.annotation.EnableTransactionManagement; import java.util.Date; @@ -23,7 +21,7 @@ import java.util.Set; */ @SpringBootApplication @EnableTransactionManagement -@Import({ DynamicDataSourceRegister.class }) +//@Import({ DynamicDataSourceRegister.class }) @MapperScan("com.lyms.etl.dao") public class ApplicationRunner implements CommandLineRunner{ diff --git a/regional-etl/src/main/java/com/lyms/etl/dao/ICouponInfoDao.java b/regional-etl/src/main/java/com/lyms/etl/dao/ICouponInfoDao.java index 66bb2d3..afc6eb3 100644 --- a/regional-etl/src/main/java/com/lyms/etl/dao/ICouponInfoDao.java +++ b/regional-etl/src/main/java/com/lyms/etl/dao/ICouponInfoDao.java @@ -24,4 +24,8 @@ public interface ICouponInfoDao { void saveHospitalGroup(HospitalCouponTemplateGroup hospitalCouponTemplateGroup); void batchSave(List commitList); + + List findByCondition(Map param); + + int update(CouponInfo couponInfo); } diff --git a/regional-etl/src/main/java/com/lyms/etl/model/AntExChu.java b/regional-etl/src/main/java/com/lyms/etl/model/AntExChu.java deleted file mode 100644 index f7c9581..0000000 --- a/regional-etl/src/main/java/com/lyms/etl/model/AntExChu.java +++ /dev/null @@ -1,1005 +0,0 @@ -package com.lyms.etl.model; - -import org.springframework.data.mongodb.core.mapping.Document; - -import java.util.Date; -import java.util.List; - -/** - * 产前检查初诊模型 - * - * Created by Administrator on 2016/6/21 0021. - */ -@Document(collection = "lyms_antexc") -public class AntExChu { - - //条码 - private String barCode; - private String id; - private String parentId; - private String pid; - //预产期 - private Date dueDate; - //末次月经 - private Date lastMenses; - private String cDueWeek; - private String bg; - // 既往史 - private String pastHistory ; - // 家族史 - private String familyHistory ; - //个人史 - private String personalHistory; - //疫苗接种史 - private String ymjzHistory ; - //药物过敏史 - private String ywgmHistory ; - //妇科手术史 - private String fksxHistory ; - // 叶酸服用 - private String ysfyHistory ; - //孕次 - private Integer pregnancyTimes; - // 产次 - private Integer prodTime; - // 顺产 - private Integer delivery; - //刨宫产 - private Integer planedProd; - //流产 - private Integer abortion; - //死胎 - private Integer stillbirth; - //死产 - private Integer stillChan ; - //新生儿死亡 - private Integer neoDeath; - //出生缺陷 - private Integer birthDefect; - // 身高 - private String height; - //体重 - private String weight ; - //孕前体重 - private String yqWeight ; - //体重指数 - private String baricIndex; - //本次妊娠情况 - private String cestationInfo; - // 宫高 - private String gonggao; - //腹围 - private String fuwei; - //胎数 - private String tireNumber1; - private String syjg; - private List placentas; - //心脏 - private String heart; - //肺部 - private String lungs; - //外阴 - private String vulva; - //阴道 - private String vagina; - // 宫颈 - private String cervical; - //子宫 - private String uterus; - //附件 - private String fujian; - private Date created; - private String hospitalId; - private String bp; - //丈夫健康情况 - private String hHealthInfo; - - //自然流产 - private Integer abortionZR; - //人工流产 - private Integer abortionRG; - - public String getBarCode() { - return barCode; - } - - public void setBarCode(String barCode) { - this.barCode = barCode; - } - - public Integer getAbortionZR() { - return abortionZR; - } - - public void setAbortionZR(Integer abortionZR) { - this.abortionZR = abortionZR; - } - - public Integer getAbortionRG() { - return abortionRG; - } - - public void setAbortionRG(Integer abortionRG) { - this.abortionRG = abortionRG; - } - - public String getPid() { - return pid; - } - - public void setPid(String pid) { - this.pid = pid; - } - - public String getBp() { - return bp; - } - - public void setBp(String bp) { - this.bp = bp; - } - - public String getcDueWeek() { - return cDueWeek; - } - - public void setcDueWeek(String cDueWeek) { - this.cDueWeek = cDueWeek; - } - - public String getHospitalId() { - return hospitalId; - } - - public void setHospitalId(String hospitalId) { - this.hospitalId = hospitalId; - } - - public String getCervical() { - return cervical; - } - - public String getBg() { - return bg; - } - - public void setBg(String bg) { - this.bg = bg; - } - - public void setCervical(String cervical) { - this.cervical = cervical; - } - - public String getFujian() { - return fujian; - } - - public void setFujian(String fujian) { - this.fujian = fujian; - } - - public String getHeart() { - return heart; - } - - public void setHeart(String heart) { - this.heart = heart; - } - - public String getLungs() { - return lungs; - } - - public void setLungs(String lungs) { - this.lungs = lungs; - } - - public String getUterus() { - return uterus; - } - - public void setUterus(String uterus) { - this.uterus = uterus; - } - - public String getVagina() { - return vagina; - } - - public void setVagina(String vagina) { - this.vagina = vagina; - } - - public String getVulva() { - return vulva; - } - - public void setVulva(String vulva) { - this.vulva = vulva; - } - - public Date getCreated() { - return created; - } - - public void setCreated(Date created) { - this.created = created; - } - - public String getSyjg() { - return syjg; - } - - public void setSyjg(String syjg) { - this.syjg = syjg; - } - - public String gethHealthInfo() { - return hHealthInfo; - } - - public void sethHealthInfo(String hHealthInfo) { - this.hHealthInfo = hHealthInfo; - } - - /*//心率 - private double heartRate; - //胎方位 - private String fetalPosition; - //胎先露 - private String fetalPresentation; - // 衔接 - private String join;*/ - //高危因素 - private String highrisk ; - //高危评分 - private String highriskSocre; - // 其他高危 - private String otherHighRisk; - // 诊断 - private String diagnosis; - //处理意见 - private String treatOpinion; - //指导意见 - private String dirOpinion; - //产检 医生 - private String prodDoctor; - //产检日期 - private Date checkTime; - //下次产检时间 - private Date nextCheckTime; - private Integer yn; - //血红蛋白值 - private String xhdb ; - //白细胞计数值 - private String bxbjs ; - //血小板 - private String platelet; - // 血常规其他 - private String chgOther ; - // 尿蛋白 - private String ndb; - //尿糖 - private String nt; - //尿同体 - private String urineKetone ; - // 尿潜血 - private String bld ; - //尿常规其他 - private String ncgOther; - //ABO - private String abo ; - // rh - private String rh ; - // 血糖 - private String bloodSugar; - //B超 - private String bChao ; - //胎数 - private String tireNumber ; - //血清谷丙转氨酶 - private String xqgbzam ; - //血清谷草转氨酶 - private String xqgczam ; - //白蛋白 - private String albumin ; - //总胆红素 - private String totalBilirubin; - // 结合胆红素 - private String jhBilirubin ; - - public Date getModified() { - return modified; - } - - public void setModified(Date modified) { - this.modified = modified; - } - - //乙肝表面抗原 - private String ygbmky; - //乙肝表面抗体 - private String ygbmkt; - //乙肝e抗原 - private String ygeky; - //乙肝e抗体 - private String ygekt; - // 乙肝核心抗体 - private String yghxkt; - // 血清肌 - private String xqjq; - // 血尿素氮 - private String xnsd; - // 梅毒血清实验 -// private String mdxqsy; - // hit抗体检测 - private String hivkt; - // 阴道分泌物 - private String ydfmw; - // 阴道清洁度 - private String ydqjd; - - private Date modified; - //操作人 - private Integer operator; - - public Integer getOperator() { - return operator; - } - - public void setOperator(Integer operator) { - this.operator = operator; - } - - public String getCestationInfo() { - return cestationInfo; - } - - public void setCestationInfo(String cestationInfo) { - this.cestationInfo = cestationInfo; - } - - - - - public String getDiagnosis() { - return diagnosis; - } - - public void setDiagnosis(String diagnosis) { - this.diagnosis = diagnosis; - } - - public String getDirOpinion() { - return dirOpinion; - } - - public void setDirOpinion(String dirOpinion) { - this.dirOpinion = dirOpinion; - } - - public String getFamilyHistory() { - return familyHistory; - } - - public void setFamilyHistory(String familyHistory) { - this.familyHistory = familyHistory; - } - - public String getFksxHistory() { - return fksxHistory; - } - - public void setFksxHistory(String fksxHistory) { - this.fksxHistory = fksxHistory; - } - - public String getFuwei() { - return fuwei; - } - - public void setFuwei(String fuwei) { - this.fuwei = fuwei; - } - - public String getGonggao() { - return gonggao; - } - - public void setGonggao(String gonggao) { - this.gonggao = gonggao; - } - - public String getHeight() { - return height; - } - - public void setHeight(String height) { - this.height = height; - } - - public String getHighrisk() { - return highrisk; - } - - public void setHighrisk(String highrisk) { - this.highrisk = highrisk; - } - - public String getHighriskSocre() { - return highriskSocre; - } - - public void setHighriskSocre(String highriskSocre) { - this.highriskSocre = highriskSocre; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public Date getCheckTime() { - return checkTime; - } - - public void setCheckTime(Date checkTime) { - this.checkTime = checkTime; - } - - public Date getNextCheckTime() { - return nextCheckTime; - } - - public void setNextCheckTime(Date nextCheckTime) { - this.nextCheckTime = nextCheckTime; - } - - public String getOtherHighRisk() { - return otherHighRisk; - } - - public void setOtherHighRisk(String otherHighRisk) { - this.otherHighRisk = otherHighRisk; - } - - public String getParentId() { - return parentId; - } - - public void setParentId(String parentId) { - this.parentId = parentId; - } - - public String getPastHistory() { - return pastHistory; - } - - public void setPastHistory(String pastHistory) { - this.pastHistory = pastHistory; - } - - public String getPersonalHistory() { - return personalHistory; - } - - public void setPersonalHistory(String personalHistory) { - this.personalHistory = personalHistory; - } - - public List getPlacentas() { - return placentas; - } - - public void setPlacentas(List placentas) { - this.placentas = placentas; - } - - - public String getTireNumber1() { - return tireNumber1; - } - - public void setTireNumber1(String tireNumber1) { - this.tireNumber1 = tireNumber1; - } - - public String getTreatOpinion() { - return treatOpinion; - } - - public void setTreatOpinion(String treatOpinion) { - this.treatOpinion = treatOpinion; - } - - public String getWeight() { - return weight; - } - - public void setWeight(String weight) { - this.weight = weight; - } - - public String getYmjzHistory() { - return ymjzHistory; - } - - public void setYmjzHistory(String ymjzHistory) { - this.ymjzHistory = ymjzHistory; - } - - public Integer getYn() { - return yn; - } - - public void setYn(Integer yn) { - this.yn = yn; - } - - public String getYqWeight() { - return yqWeight; - } - - public void setYqWeight(String yqWeight) { - this.yqWeight = yqWeight; - } - - public String getYsfyHistory() { - return ysfyHistory; - } - - public void setYsfyHistory(String ysfyHistory) { - this.ysfyHistory = ysfyHistory; - } - - public String getYwgmHistory() { - return ywgmHistory; - } - - public void setYwgmHistory(String ywgmHistory) { - this.ywgmHistory = ywgmHistory; - } - - public String getAbo() { - return abo; - } - - public void setAbo(String abo) { - this.abo = abo; - } - - public String getAlbumin() { - return albumin; - } - - public void setAlbumin(String albumin) { - this.albumin = albumin; - } - - public String getbChao() { - return bChao; - } - - public void setbChao(String bChao) { - this.bChao = bChao; - } - - public String getBld() { - return bld; - } - - public void setBld(String bld) { - this.bld = bld; - } - - public String getBloodSugar() { - return bloodSugar; - } - - public void setBloodSugar(String bloodSugar) { - this.bloodSugar = bloodSugar; - } - - public String getBxbjs() { - return bxbjs; - } - - public void setBxbjs(String bxbjs) { - this.bxbjs = bxbjs; - } - - public String getChgOther() { - return chgOther; - } - - public void setChgOther(String chgOther) { - this.chgOther = chgOther; - } - - public String getHivkt() { - return hivkt; - } - - public void setHivkt(String hivkt) { - this.hivkt = hivkt; - } - - public String getJhBilirubin() { - return jhBilirubin; - } - - public void setJhBilirubin(String jhBilirubin) { - this.jhBilirubin = jhBilirubin; - } - -/* public String getMdxqsy() { - return mdxqsy; - } - - public void setMdxqsy(String mdxqsy) { - this.mdxqsy = mdxqsy; - }*/ - - public Integer getAbortion() { - return abortion; - } - - public void setAbortion(Integer abortion) { - this.abortion = abortion; - } - - public String getBaricIndex() { - return baricIndex; - } - - public void setBaricIndex(String baricIndex) { - this.baricIndex = baricIndex; - } - - public Integer getBirthDefect() { - return birthDefect; - } - - public void setBirthDefect(Integer birthDefect) { - this.birthDefect = birthDefect; - } - - public Integer getDelivery() { - return delivery; - } - - public void setDelivery(Integer delivery) { - this.delivery = delivery; - } - - public Integer getNeoDeath() { - return neoDeath; - } - - public void setNeoDeath(Integer neoDeath) { - this.neoDeath = neoDeath; - } - - public Integer getPlanedProd() { - return planedProd; - } - - public void setPlanedProd(Integer planedProd) { - this.planedProd = planedProd; - } - - public Integer getPregnancyTimes() { - return pregnancyTimes; - } - - public void setPregnancyTimes(Integer pregnancyTimes) { - this.pregnancyTimes = pregnancyTimes; - } - - public String getProdDoctor() { - return prodDoctor; - } - - public void setProdDoctor(String prodDoctor) { - this.prodDoctor = prodDoctor; - } - - public Integer getProdTime() { - return prodTime; - } - - public void setProdTime(Integer prodTime) { - this.prodTime = prodTime; - } - - public Integer getStillbirth() { - return stillbirth; - } - - public void setStillbirth(Integer stillbirth) { - this.stillbirth = stillbirth; - } - - public Integer getStillChan() { - return stillChan; - } - - public void setStillChan(Integer stillChan) { - this.stillChan = stillChan; - } - - public String getNcgOther() { - return ncgOther; - } - - public void setNcgOther(String ncgOther) { - this.ncgOther = ncgOther; - } - - public String getNdb() { - return ndb; - } - - public void setNdb(String ndb) { - this.ndb = ndb; - } - - public String getNt() { - return nt; - } - - public void setNt(String nt) { - this.nt = nt; - } - - public String getPlatelet() { - return platelet; - } - - public void setPlatelet(String platelet) { - this.platelet = platelet; - } - - public String getRh() { - return rh; - } - - public void setRh(String rh) { - this.rh = rh; - } - - public String getTireNumber() { - return tireNumber; - } - - public void setTireNumber(String tireNumber) { - this.tireNumber = tireNumber; - } - - public String getTotalBilirubin() { - return totalBilirubin; - } - - public void setTotalBilirubin(String totalBilirubin) { - this.totalBilirubin = totalBilirubin; - } - - public String getUrineKetone() { - return urineKetone; - } - - public void setUrineKetone(String urineKetone) { - this.urineKetone = urineKetone; - } - - public String getXhdb() { - return xhdb; - } - - public void setXhdb(String xhdb) { - this.xhdb = xhdb; - } - - public String getXnsd() { - return xnsd; - } - - public void setXnsd(String xnsd) { - this.xnsd = xnsd; - } - - public String getXqgbzam() { - return xqgbzam; - } - - public void setXqgbzam(String xqgbzam) { - this.xqgbzam = xqgbzam; - } - - public String getXqgczam() { - return xqgczam; - } - - public void setXqgczam(String xqgczam) { - this.xqgczam = xqgczam; - } - - public String getXqjq() { - return xqjq; - } - - public void setXqjq(String xqjq) { - this.xqjq = xqjq; - } - - public String getYdfmw() { - return ydfmw; - } - - public void setYdfmw(String ydfmw) { - this.ydfmw = ydfmw; - } - - public String getYdqjd() { - return ydqjd; - } - - public void setYdqjd(String ydqjd) { - this.ydqjd = ydqjd; - } - - public String getYgbmkt() { - return ygbmkt; - } - - public void setYgbmkt(String ygbmkt) { - this.ygbmkt = ygbmkt; - } - - public String getYgbmky() { - return ygbmky; - } - - public void setYgbmky(String ygbmky) { - this.ygbmky = ygbmky; - } - - public String getYgekt() { - return ygekt; - } - - public void setYgekt(String ygekt) { - this.ygekt = ygekt; - } - - public String getYgeky() { - return ygeky; - } - - public void setYgeky(String ygeky) { - this.ygeky = ygeky; - } - - public String getYghxkt() { - return yghxkt; - } - - public void setYghxkt(String yghxkt) { - this.yghxkt = yghxkt; - } - - public Date getDueDate() { - return dueDate; - } - - public void setDueDate(Date dueDate) { - this.dueDate = dueDate; - } - - public Date getLastMenses() { - return lastMenses; - } - - public void setLastMenses(Date lastMenses) { - this.lastMenses = lastMenses; - } - - @Override - public String toString() { - return "AntExChu{" + - "barCode='" + barCode + '\'' + - ", id='" + id + '\'' + - ", parentId='" + parentId + '\'' + - ", pid='" + pid + '\'' + - ", dueDate=" + dueDate + - ", lastMenses=" + lastMenses + - ", cDueWeek='" + cDueWeek + '\'' + - ", bg='" + bg + '\'' + - ", pastHistory='" + pastHistory + '\'' + - ", familyHistory='" + familyHistory + '\'' + - ", personalHistory='" + personalHistory + '\'' + - ", ymjzHistory='" + ymjzHistory + '\'' + - ", ywgmHistory='" + ywgmHistory + '\'' + - ", fksxHistory='" + fksxHistory + '\'' + - ", ysfyHistory='" + ysfyHistory + '\'' + - ", pregnancyTimes=" + pregnancyTimes + - ", prodTime=" + prodTime + - ", delivery=" + delivery + - ", planedProd=" + planedProd + - ", abortion=" + abortion + - ", stillbirth=" + stillbirth + - ", stillChan=" + stillChan + - ", neoDeath=" + neoDeath + - ", birthDefect=" + birthDefect + - ", height='" + height + '\'' + - ", weight='" + weight + '\'' + - ", yqWeight='" + yqWeight + '\'' + - ", baricIndex='" + baricIndex + '\'' + - ", cestationInfo='" + cestationInfo + '\'' + - ", gonggao='" + gonggao + '\'' + - ", fuwei='" + fuwei + '\'' + - ", tireNumber1='" + tireNumber1 + '\'' + - ", syjg='" + syjg + '\'' + - ", placentas=" + placentas + - ", heart='" + heart + '\'' + - ", lungs='" + lungs + '\'' + - ", vulva='" + vulva + '\'' + - ", vagina='" + vagina + '\'' + - ", cervical='" + cervical + '\'' + - ", uterus='" + uterus + '\'' + - ", fujian='" + fujian + '\'' + - ", created=" + created + - ", hospitalId='" + hospitalId + '\'' + - ", bp='" + bp + '\'' + - ", hHealthInfo='" + hHealthInfo + '\'' + - ", abortionZR=" + abortionZR + - ", abortionRG=" + abortionRG + - ", highrisk='" + highrisk + '\'' + - ", highriskSocre='" + highriskSocre + '\'' + - ", otherHighRisk='" + otherHighRisk + '\'' + - ", diagnosis='" + diagnosis + '\'' + - ", treatOpinion='" + treatOpinion + '\'' + - ", dirOpinion='" + dirOpinion + '\'' + - ", prodDoctor='" + prodDoctor + '\'' + - ", checkTime=" + checkTime + - ", nextCheckTime=" + nextCheckTime + - ", yn=" + yn + - ", xhdb='" + xhdb + '\'' + - ", bxbjs='" + bxbjs + '\'' + - ", platelet='" + platelet + '\'' + - ", chgOther='" + chgOther + '\'' + - ", ndb='" + ndb + '\'' + - ", nt='" + nt + '\'' + - ", urineKetone='" + urineKetone + '\'' + - ", bld='" + bld + '\'' + - ", ncgOther='" + ncgOther + '\'' + - ", abo='" + abo + '\'' + - ", rh='" + rh + '\'' + - ", bloodSugar='" + bloodSugar + '\'' + - ", bChao='" + bChao + '\'' + - ", tireNumber='" + tireNumber + '\'' + - ", xqgbzam='" + xqgbzam + '\'' + - ", xqgczam='" + xqgczam + '\'' + - ", albumin='" + albumin + '\'' + - ", totalBilirubin='" + totalBilirubin + '\'' + - ", jhBilirubin='" + jhBilirubin + '\'' + - ", ygbmky='" + ygbmky + '\'' + - ", ygbmkt='" + ygbmkt + '\'' + - ", ygeky='" + ygeky + '\'' + - ", ygekt='" + ygekt + '\'' + - ", yghxkt='" + yghxkt + '\'' + - ", xqjq='" + xqjq + '\'' + - ", xnsd='" + xnsd + '\'' + - ", hivkt='" + hivkt + '\'' + - ", ydfmw='" + ydfmw + '\'' + - ", ydqjd='" + ydqjd + '\'' + - ", modified=" + modified + - ", operator=" + operator + - '}'; - } -} diff --git a/regional-etl/src/main/java/com/lyms/etl/model/Antex.java b/regional-etl/src/main/java/com/lyms/etl/model/Antex.java new file mode 100644 index 0000000..284e9ac --- /dev/null +++ b/regional-etl/src/main/java/com/lyms/etl/model/Antex.java @@ -0,0 +1,372 @@ +package com.lyms.etl.model; + +import org.springframework.data.mongodb.core.mapping.Document; + +import java.util.Date; +import java.util.List; + +/** + * 产前检查 + * + * Created by Administrator on 2016/6/16 0016. + */ +@Document(collection = "lyms_antex") +public class Antex { + + private String id; + private String barCode; + private String pid; + private String parentId; + /* //名字 + private String name; + //年龄 + private String age; + //孕周 + private String dueWeek; + //预产期 + private String yChanQi; + //手机号 + private String phone; + //高危因素 + private String riskFactor; + //高危评分 + private String riskScore; + //备注 + private String remarks;*/ + // + //检查报告列表 +// private List reportList; + //当前孕周 + private String currentDueDate; + //主诉 + private String chiefComplaint; + //重量 + private Double weight; + //血压 + private String bp; + //宫高 + private String gongGao; + //腹围 + private String abdominalCircumference; + //浮肿 + private String edema; + //胎数 + private String tireNumber; + //胎数据 + /* Double heartRate; + FetalPosition 胎方位 + FetalPresentation 胎先露 + join 衔接*/ + private List tireData; + //血红蛋白 + private String hemoglobin; + //尿蛋白 + private String urineProtein; + // B 炒 + private String bChao; + //血糖 + private String bloodSugar; + //高危因素 + private String riskFactor; + // 高危评分 + private String riskScore; + //其他高危 + private String otherRisk; + //诊断 + private String diagnosis; + //分类 + private String type; + private String typeYc; + //处理意见 + private String treatmentOpinion; + //指导 + private String guide; + //产检医生 + private String checkDoctor; + //产检日期 + private Date checkDate; + //下次产检日期 + private Date nextCheckTime; + private Integer yn; + private Date created; + private Date modified; + private String hospitalId; + private String cDueWeek; + //操作人 + private Integer operator; + + public String getBarCode() { + return barCode; + } + + public void setBarCode(String barCode) { + this.barCode = barCode; + } + + public Integer getOperator() { + return operator; + } + + public void setOperator(Integer operator) { + this.operator = operator; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public String getcDueWeek() { + return cDueWeek; + } + + public void setcDueWeek(String cDueWeek) { + this.cDueWeek = cDueWeek; + } + + public Date getModified() { + return modified; + } + + public void setModified(Date modified) { + this.modified = modified; + } + + public String getHospitalId() { + return hospitalId; + } + + public void setHospitalId(String hospitalId) { + this.hospitalId = hospitalId; + } + + public String getTypeYc() { + return typeYc; + } + + public void setTypeYc(String typeYc) { + this.typeYc = typeYc; + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public Integer getYn() { + return yn; + } + + public void setYn(Integer yn) { + this.yn = yn; + } + + public String getAbdominalCircumference() { + return abdominalCircumference; + } + + public void setAbdominalCircumference(String abdominalCircumference) { + this.abdominalCircumference = abdominalCircumference; + } + + public String getbChao() { + return bChao; + } + + public void setbChao(String bChao) { + this.bChao = bChao; + } + + public String getBloodSugar() { + return bloodSugar; + } + + public void setBloodSugar(String bloodSugar) { + this.bloodSugar = bloodSugar; + } + + public String getBp() { + return bp; + } + + public void setBp(String bp) { + this.bp = bp; + } + + + + public String getCheckDoctor() { + return checkDoctor; + } + + public void setCheckDoctor(String checkDoctor) { + this.checkDoctor = checkDoctor; + } + + public String getChiefComplaint() { + return chiefComplaint; + } + + public void setChiefComplaint(String chiefComplaint) { + this.chiefComplaint = chiefComplaint; + } + + public String getCurrentDueDate() { + return currentDueDate; + } + + public void setCurrentDueDate(String currentDueDate) { + this.currentDueDate = currentDueDate; + } + + public String getDiagnosis() { + return diagnosis; + } + + public void setDiagnosis(String diagnosis) { + this.diagnosis = diagnosis; + } + + public String getEdema() { + return edema; + } + + public void setEdema(String edema) { + this.edema = edema; + } + + public String getGongGao() { + return gongGao; + } + + public void setGongGao(String gongGao) { + this.gongGao = gongGao; + } + + public String getGuide() { + return guide; + } + + public void setGuide(String guide) { + this.guide = guide; + } + + public String getHemoglobin() { + return hemoglobin; + } + + public void setHemoglobin(String hemoglobin) { + this.hemoglobin = hemoglobin; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCheckDate() { + return checkDate; + } + + public void setCheckDate(Date checkDate) { + this.checkDate = checkDate; + } + + public Date getNextCheckTime() { + return nextCheckTime; + } + + public void setNextCheckTime(Date nextCheckTime) { + this.nextCheckTime = nextCheckTime; + } + + public String getOtherRisk() { + return otherRisk; + } + + public void setOtherRisk(String otherRisk) { + this.otherRisk = otherRisk; + } + + public String getRiskFactor() { + return riskFactor; + } + + public void setRiskFactor(String riskFactor) { + this.riskFactor = riskFactor; + } + + public String getRiskScore() { + return riskScore; + } + + public void setRiskScore(String riskScore) { + this.riskScore = riskScore; + } + + public List getTireData() { + return tireData; + } + + + public void setTireData(List tireData) { + this.tireData = tireData; + } + + public String getTireNumber() { + return tireNumber; + } + + public void setTireNumber(String tireNumber) { + this.tireNumber = tireNumber; + } + + public String getTreatmentOpinion() { + return treatmentOpinion; + } + + public void setTreatmentOpinion(String treatmentOpinion) { + this.treatmentOpinion = treatmentOpinion; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getUrineProtein() { + return urineProtein; + } + + public void setUrineProtein(String urineProtein) { + this.urineProtein = urineProtein; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } +} diff --git a/regional-etl/src/main/java/com/lyms/etl/model/AntexOnline.java b/regional-etl/src/main/java/com/lyms/etl/model/AntexOnline.java new file mode 100644 index 0000000..a50e00b --- /dev/null +++ b/regional-etl/src/main/java/com/lyms/etl/model/AntexOnline.java @@ -0,0 +1,373 @@ +package com.lyms.etl.model; + +import org.springframework.data.mongodb.core.mapping.Document; + +import java.util.Date; +import java.util.List; + +/** + * 产前检查 + * + * Created by Administrator on 2016/6/16 0016. + */ +//@Document(collection = "lyms_antex_online") +@Document(collection = "lyms_antex") +public class AntexOnline { + + private String id; + private String barCode; + private String pid; + private String parentId; + /* //名字 + private String name; + //年龄 + private String age; + //孕周 + private String dueWeek; + //预产期 + private String yChanQi; + //手机号 + private String phone; + //高危因素 + private String riskFactor; + //高危评分 + private String riskScore; + //备注 + private String remarks;*/ + // + //检查报告列表 +// private List reportList; + //当前孕周 + private String currentDueDate; + //主诉 + private String chiefComplaint; + //重量 + private Double weight; + //血压 + private String bp; + //宫高 + private String gongGao; + //腹围 + private String abdominalCircumference; + //浮肿 + private String edema; + //胎数 + private String tireNumber; + //胎数据 + /* Double heartRate; + FetalPosition 胎方位 + FetalPresentation 胎先露 + join 衔接*/ + private List tireData; + //血红蛋白 + private String hemoglobin; + //尿蛋白 + private String urineProtein; + // B 炒 + private String bChao; + //血糖 + private String bloodSugar; + //高危因素 + private String riskFactor; + // 高危评分 + private String riskScore; + //其他高危 + private String otherRisk; + //诊断 + private String diagnosis; + //分类 + private String type; + private String typeYc; + //处理意见 + private String treatmentOpinion; + //指导 + private String guide; + //产检医生 + private String checkDoctor; + //产检日期 + private Date checkDate; + //下次产检日期 + private Date nextCheckTime; + private Integer yn; + private Date created; + private Date modified; + private String hospitalId; + private String cDueWeek; + //操作人 + private Integer operator; + + public String getBarCode() { + return barCode; + } + + public void setBarCode(String barCode) { + this.barCode = barCode; + } + + public Integer getOperator() { + return operator; + } + + public void setOperator(Integer operator) { + this.operator = operator; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public String getcDueWeek() { + return cDueWeek; + } + + public void setcDueWeek(String cDueWeek) { + this.cDueWeek = cDueWeek; + } + + public Date getModified() { + return modified; + } + + public void setModified(Date modified) { + this.modified = modified; + } + + public String getHospitalId() { + return hospitalId; + } + + public void setHospitalId(String hospitalId) { + this.hospitalId = hospitalId; + } + + public String getTypeYc() { + return typeYc; + } + + public void setTypeYc(String typeYc) { + this.typeYc = typeYc; + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public Integer getYn() { + return yn; + } + + public void setYn(Integer yn) { + this.yn = yn; + } + + public String getAbdominalCircumference() { + return abdominalCircumference; + } + + public void setAbdominalCircumference(String abdominalCircumference) { + this.abdominalCircumference = abdominalCircumference; + } + + public String getbChao() { + return bChao; + } + + public void setbChao(String bChao) { + this.bChao = bChao; + } + + public String getBloodSugar() { + return bloodSugar; + } + + public void setBloodSugar(String bloodSugar) { + this.bloodSugar = bloodSugar; + } + + public String getBp() { + return bp; + } + + public void setBp(String bp) { + this.bp = bp; + } + + + + public String getCheckDoctor() { + return checkDoctor; + } + + public void setCheckDoctor(String checkDoctor) { + this.checkDoctor = checkDoctor; + } + + public String getChiefComplaint() { + return chiefComplaint; + } + + public void setChiefComplaint(String chiefComplaint) { + this.chiefComplaint = chiefComplaint; + } + + public String getCurrentDueDate() { + return currentDueDate; + } + + public void setCurrentDueDate(String currentDueDate) { + this.currentDueDate = currentDueDate; + } + + public String getDiagnosis() { + return diagnosis; + } + + public void setDiagnosis(String diagnosis) { + this.diagnosis = diagnosis; + } + + public String getEdema() { + return edema; + } + + public void setEdema(String edema) { + this.edema = edema; + } + + public String getGongGao() { + return gongGao; + } + + public void setGongGao(String gongGao) { + this.gongGao = gongGao; + } + + public String getGuide() { + return guide; + } + + public void setGuide(String guide) { + this.guide = guide; + } + + public String getHemoglobin() { + return hemoglobin; + } + + public void setHemoglobin(String hemoglobin) { + this.hemoglobin = hemoglobin; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCheckDate() { + return checkDate; + } + + public void setCheckDate(Date checkDate) { + this.checkDate = checkDate; + } + + public Date getNextCheckTime() { + return nextCheckTime; + } + + public void setNextCheckTime(Date nextCheckTime) { + this.nextCheckTime = nextCheckTime; + } + + public String getOtherRisk() { + return otherRisk; + } + + public void setOtherRisk(String otherRisk) { + this.otherRisk = otherRisk; + } + + public String getRiskFactor() { + return riskFactor; + } + + public void setRiskFactor(String riskFactor) { + this.riskFactor = riskFactor; + } + + public String getRiskScore() { + return riskScore; + } + + public void setRiskScore(String riskScore) { + this.riskScore = riskScore; + } + + public List getTireData() { + return tireData; + } + + + public void setTireData(List tireData) { + this.tireData = tireData; + } + + public String getTireNumber() { + return tireNumber; + } + + public void setTireNumber(String tireNumber) { + this.tireNumber = tireNumber; + } + + public String getTreatmentOpinion() { + return treatmentOpinion; + } + + public void setTreatmentOpinion(String treatmentOpinion) { + this.treatmentOpinion = treatmentOpinion; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getUrineProtein() { + return urineProtein; + } + + public void setUrineProtein(String urineProtein) { + this.urineProtein = urineProtein; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } +} diff --git a/regional-etl/src/main/java/com/lyms/etl/model/Antexc.java b/regional-etl/src/main/java/com/lyms/etl/model/Antexc.java new file mode 100644 index 0000000..bb1332c --- /dev/null +++ b/regional-etl/src/main/java/com/lyms/etl/model/Antexc.java @@ -0,0 +1,1005 @@ +package com.lyms.etl.model; + +import org.springframework.data.mongodb.core.mapping.Document; + +import java.util.Date; +import java.util.List; + +/** + * 产前检查初诊模型 + * + * Created by Administrator on 2016/6/21 0021. + */ +@Document(collection = "lyms_antexc") +public class Antexc { + + //条码 + private String barCode; + private String id; + private String parentId; + private String pid; + //预产期 + private Date dueDate; + //末次月经 + private Date lastMenses; + private String cDueWeek; + private String bg; + // 既往史 + private String pastHistory ; + // 家族史 + private String familyHistory ; + //个人史 + private String personalHistory; + //疫苗接种史 + private String ymjzHistory ; + //药物过敏史 + private String ywgmHistory ; + //妇科手术史 + private String fksxHistory ; + // 叶酸服用 + private String ysfyHistory ; + //孕次 + private Integer pregnancyTimes; + // 产次 + private Integer prodTime; + // 顺产 + private Integer delivery; + //刨宫产 + private Integer planedProd; + //流产 + private Integer abortion; + //死胎 + private Integer stillbirth; + //死产 + private Integer stillChan ; + //新生儿死亡 + private Integer neoDeath; + //出生缺陷 + private Integer birthDefect; + // 身高 + private String height; + //体重 + private String weight ; + //孕前体重 + private String yqWeight ; + //体重指数 + private String baricIndex; + //本次妊娠情况 + private String cestationInfo; + // 宫高 + private String gonggao; + //腹围 + private String fuwei; + //胎数 + private String tireNumber1; + private String syjg; + private List placentas; + //心脏 + private String heart; + //肺部 + private String lungs; + //外阴 + private String vulva; + //阴道 + private String vagina; + // 宫颈 + private String cervical; + //子宫 + private String uterus; + //附件 + private String fujian; + private Date created; + private String hospitalId; + private String bp; + //丈夫健康情况 + private String hHealthInfo; + + //自然流产 + private Integer abortionZR; + //人工流产 + private Integer abortionRG; + + public String getBarCode() { + return barCode; + } + + public void setBarCode(String barCode) { + this.barCode = barCode; + } + + public Integer getAbortionZR() { + return abortionZR; + } + + public void setAbortionZR(Integer abortionZR) { + this.abortionZR = abortionZR; + } + + public Integer getAbortionRG() { + return abortionRG; + } + + public void setAbortionRG(Integer abortionRG) { + this.abortionRG = abortionRG; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public String getBp() { + return bp; + } + + public void setBp(String bp) { + this.bp = bp; + } + + public String getcDueWeek() { + return cDueWeek; + } + + public void setcDueWeek(String cDueWeek) { + this.cDueWeek = cDueWeek; + } + + public String getHospitalId() { + return hospitalId; + } + + public void setHospitalId(String hospitalId) { + this.hospitalId = hospitalId; + } + + public String getCervical() { + return cervical; + } + + public String getBg() { + return bg; + } + + public void setBg(String bg) { + this.bg = bg; + } + + public void setCervical(String cervical) { + this.cervical = cervical; + } + + public String getFujian() { + return fujian; + } + + public void setFujian(String fujian) { + this.fujian = fujian; + } + + public String getHeart() { + return heart; + } + + public void setHeart(String heart) { + this.heart = heart; + } + + public String getLungs() { + return lungs; + } + + public void setLungs(String lungs) { + this.lungs = lungs; + } + + public String getUterus() { + return uterus; + } + + public void setUterus(String uterus) { + this.uterus = uterus; + } + + public String getVagina() { + return vagina; + } + + public void setVagina(String vagina) { + this.vagina = vagina; + } + + public String getVulva() { + return vulva; + } + + public void setVulva(String vulva) { + this.vulva = vulva; + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public String getSyjg() { + return syjg; + } + + public void setSyjg(String syjg) { + this.syjg = syjg; + } + + public String gethHealthInfo() { + return hHealthInfo; + } + + public void sethHealthInfo(String hHealthInfo) { + this.hHealthInfo = hHealthInfo; + } + + /*//心率 + private double heartRate; + //胎方位 + private String fetalPosition; + //胎先露 + private String fetalPresentation; + // 衔接 + private String join;*/ + //高危因素 + private String highrisk ; + //高危评分 + private String highriskSocre; + // 其他高危 + private String otherHighRisk; + // 诊断 + private String diagnosis; + //处理意见 + private String treatOpinion; + //指导意见 + private String dirOpinion; + //产检 医生 + private String prodDoctor; + //产检日期 + private Date checkTime; + //下次产检时间 + private Date nextCheckTime; + private Integer yn; + //血红蛋白值 + private String xhdb ; + //白细胞计数值 + private String bxbjs ; + //血小板 + private String platelet; + // 血常规其他 + private String chgOther ; + // 尿蛋白 + private String ndb; + //尿糖 + private String nt; + //尿同体 + private String urineKetone ; + // 尿潜血 + private String bld ; + //尿常规其他 + private String ncgOther; + //ABO + private String abo ; + // rh + private String rh ; + // 血糖 + private String bloodSugar; + //B超 + private String bChao ; + //胎数 + private String tireNumber ; + //血清谷丙转氨酶 + private String xqgbzam ; + //血清谷草转氨酶 + private String xqgczam ; + //白蛋白 + private String albumin ; + //总胆红素 + private String totalBilirubin; + // 结合胆红素 + private String jhBilirubin ; + + public Date getModified() { + return modified; + } + + public void setModified(Date modified) { + this.modified = modified; + } + + //乙肝表面抗原 + private String ygbmky; + //乙肝表面抗体 + private String ygbmkt; + //乙肝e抗原 + private String ygeky; + //乙肝e抗体 + private String ygekt; + // 乙肝核心抗体 + private String yghxkt; + // 血清肌 + private String xqjq; + // 血尿素氮 + private String xnsd; + // 梅毒血清实验 +// private String mdxqsy; + // hit抗体检测 + private String hivkt; + // 阴道分泌物 + private String ydfmw; + // 阴道清洁度 + private String ydqjd; + + private Date modified; + //操作人 + private Integer operator; + + public Integer getOperator() { + return operator; + } + + public void setOperator(Integer operator) { + this.operator = operator; + } + + public String getCestationInfo() { + return cestationInfo; + } + + public void setCestationInfo(String cestationInfo) { + this.cestationInfo = cestationInfo; + } + + + + + public String getDiagnosis() { + return diagnosis; + } + + public void setDiagnosis(String diagnosis) { + this.diagnosis = diagnosis; + } + + public String getDirOpinion() { + return dirOpinion; + } + + public void setDirOpinion(String dirOpinion) { + this.dirOpinion = dirOpinion; + } + + public String getFamilyHistory() { + return familyHistory; + } + + public void setFamilyHistory(String familyHistory) { + this.familyHistory = familyHistory; + } + + public String getFksxHistory() { + return fksxHistory; + } + + public void setFksxHistory(String fksxHistory) { + this.fksxHistory = fksxHistory; + } + + public String getFuwei() { + return fuwei; + } + + public void setFuwei(String fuwei) { + this.fuwei = fuwei; + } + + public String getGonggao() { + return gonggao; + } + + public void setGonggao(String gonggao) { + this.gonggao = gonggao; + } + + public String getHeight() { + return height; + } + + public void setHeight(String height) { + this.height = height; + } + + public String getHighrisk() { + return highrisk; + } + + public void setHighrisk(String highrisk) { + this.highrisk = highrisk; + } + + public String getHighriskSocre() { + return highriskSocre; + } + + public void setHighriskSocre(String highriskSocre) { + this.highriskSocre = highriskSocre; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public Date getCheckTime() { + return checkTime; + } + + public void setCheckTime(Date checkTime) { + this.checkTime = checkTime; + } + + public Date getNextCheckTime() { + return nextCheckTime; + } + + public void setNextCheckTime(Date nextCheckTime) { + this.nextCheckTime = nextCheckTime; + } + + public String getOtherHighRisk() { + return otherHighRisk; + } + + public void setOtherHighRisk(String otherHighRisk) { + this.otherHighRisk = otherHighRisk; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getPastHistory() { + return pastHistory; + } + + public void setPastHistory(String pastHistory) { + this.pastHistory = pastHistory; + } + + public String getPersonalHistory() { + return personalHistory; + } + + public void setPersonalHistory(String personalHistory) { + this.personalHistory = personalHistory; + } + + public List getPlacentas() { + return placentas; + } + + public void setPlacentas(List placentas) { + this.placentas = placentas; + } + + + public String getTireNumber1() { + return tireNumber1; + } + + public void setTireNumber1(String tireNumber1) { + this.tireNumber1 = tireNumber1; + } + + public String getTreatOpinion() { + return treatOpinion; + } + + public void setTreatOpinion(String treatOpinion) { + this.treatOpinion = treatOpinion; + } + + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + + public String getYmjzHistory() { + return ymjzHistory; + } + + public void setYmjzHistory(String ymjzHistory) { + this.ymjzHistory = ymjzHistory; + } + + public Integer getYn() { + return yn; + } + + public void setYn(Integer yn) { + this.yn = yn; + } + + public String getYqWeight() { + return yqWeight; + } + + public void setYqWeight(String yqWeight) { + this.yqWeight = yqWeight; + } + + public String getYsfyHistory() { + return ysfyHistory; + } + + public void setYsfyHistory(String ysfyHistory) { + this.ysfyHistory = ysfyHistory; + } + + public String getYwgmHistory() { + return ywgmHistory; + } + + public void setYwgmHistory(String ywgmHistory) { + this.ywgmHistory = ywgmHistory; + } + + public String getAbo() { + return abo; + } + + public void setAbo(String abo) { + this.abo = abo; + } + + public String getAlbumin() { + return albumin; + } + + public void setAlbumin(String albumin) { + this.albumin = albumin; + } + + public String getbChao() { + return bChao; + } + + public void setbChao(String bChao) { + this.bChao = bChao; + } + + public String getBld() { + return bld; + } + + public void setBld(String bld) { + this.bld = bld; + } + + public String getBloodSugar() { + return bloodSugar; + } + + public void setBloodSugar(String bloodSugar) { + this.bloodSugar = bloodSugar; + } + + public String getBxbjs() { + return bxbjs; + } + + public void setBxbjs(String bxbjs) { + this.bxbjs = bxbjs; + } + + public String getChgOther() { + return chgOther; + } + + public void setChgOther(String chgOther) { + this.chgOther = chgOther; + } + + public String getHivkt() { + return hivkt; + } + + public void setHivkt(String hivkt) { + this.hivkt = hivkt; + } + + public String getJhBilirubin() { + return jhBilirubin; + } + + public void setJhBilirubin(String jhBilirubin) { + this.jhBilirubin = jhBilirubin; + } + +/* public String getMdxqsy() { + return mdxqsy; + } + + public void setMdxqsy(String mdxqsy) { + this.mdxqsy = mdxqsy; + }*/ + + public Integer getAbortion() { + return abortion; + } + + public void setAbortion(Integer abortion) { + this.abortion = abortion; + } + + public String getBaricIndex() { + return baricIndex; + } + + public void setBaricIndex(String baricIndex) { + this.baricIndex = baricIndex; + } + + public Integer getBirthDefect() { + return birthDefect; + } + + public void setBirthDefect(Integer birthDefect) { + this.birthDefect = birthDefect; + } + + public Integer getDelivery() { + return delivery; + } + + public void setDelivery(Integer delivery) { + this.delivery = delivery; + } + + public Integer getNeoDeath() { + return neoDeath; + } + + public void setNeoDeath(Integer neoDeath) { + this.neoDeath = neoDeath; + } + + public Integer getPlanedProd() { + return planedProd; + } + + public void setPlanedProd(Integer planedProd) { + this.planedProd = planedProd; + } + + public Integer getPregnancyTimes() { + return pregnancyTimes; + } + + public void setPregnancyTimes(Integer pregnancyTimes) { + this.pregnancyTimes = pregnancyTimes; + } + + public String getProdDoctor() { + return prodDoctor; + } + + public void setProdDoctor(String prodDoctor) { + this.prodDoctor = prodDoctor; + } + + public Integer getProdTime() { + return prodTime; + } + + public void setProdTime(Integer prodTime) { + this.prodTime = prodTime; + } + + public Integer getStillbirth() { + return stillbirth; + } + + public void setStillbirth(Integer stillbirth) { + this.stillbirth = stillbirth; + } + + public Integer getStillChan() { + return stillChan; + } + + public void setStillChan(Integer stillChan) { + this.stillChan = stillChan; + } + + public String getNcgOther() { + return ncgOther; + } + + public void setNcgOther(String ncgOther) { + this.ncgOther = ncgOther; + } + + public String getNdb() { + return ndb; + } + + public void setNdb(String ndb) { + this.ndb = ndb; + } + + public String getNt() { + return nt; + } + + public void setNt(String nt) { + this.nt = nt; + } + + public String getPlatelet() { + return platelet; + } + + public void setPlatelet(String platelet) { + this.platelet = platelet; + } + + public String getRh() { + return rh; + } + + public void setRh(String rh) { + this.rh = rh; + } + + public String getTireNumber() { + return tireNumber; + } + + public void setTireNumber(String tireNumber) { + this.tireNumber = tireNumber; + } + + public String getTotalBilirubin() { + return totalBilirubin; + } + + public void setTotalBilirubin(String totalBilirubin) { + this.totalBilirubin = totalBilirubin; + } + + public String getUrineKetone() { + return urineKetone; + } + + public void setUrineKetone(String urineKetone) { + this.urineKetone = urineKetone; + } + + public String getXhdb() { + return xhdb; + } + + public void setXhdb(String xhdb) { + this.xhdb = xhdb; + } + + public String getXnsd() { + return xnsd; + } + + public void setXnsd(String xnsd) { + this.xnsd = xnsd; + } + + public String getXqgbzam() { + return xqgbzam; + } + + public void setXqgbzam(String xqgbzam) { + this.xqgbzam = xqgbzam; + } + + public String getXqgczam() { + return xqgczam; + } + + public void setXqgczam(String xqgczam) { + this.xqgczam = xqgczam; + } + + public String getXqjq() { + return xqjq; + } + + public void setXqjq(String xqjq) { + this.xqjq = xqjq; + } + + public String getYdfmw() { + return ydfmw; + } + + public void setYdfmw(String ydfmw) { + this.ydfmw = ydfmw; + } + + public String getYdqjd() { + return ydqjd; + } + + public void setYdqjd(String ydqjd) { + this.ydqjd = ydqjd; + } + + public String getYgbmkt() { + return ygbmkt; + } + + public void setYgbmkt(String ygbmkt) { + this.ygbmkt = ygbmkt; + } + + public String getYgbmky() { + return ygbmky; + } + + public void setYgbmky(String ygbmky) { + this.ygbmky = ygbmky; + } + + public String getYgekt() { + return ygekt; + } + + public void setYgekt(String ygekt) { + this.ygekt = ygekt; + } + + public String getYgeky() { + return ygeky; + } + + public void setYgeky(String ygeky) { + this.ygeky = ygeky; + } + + public String getYghxkt() { + return yghxkt; + } + + public void setYghxkt(String yghxkt) { + this.yghxkt = yghxkt; + } + + public Date getDueDate() { + return dueDate; + } + + public void setDueDate(Date dueDate) { + this.dueDate = dueDate; + } + + public Date getLastMenses() { + return lastMenses; + } + + public void setLastMenses(Date lastMenses) { + this.lastMenses = lastMenses; + } + + @Override + public String toString() { + return "Antexc{" + + "barCode='" + barCode + '\'' + + ", id='" + id + '\'' + + ", parentId='" + parentId + '\'' + + ", pid='" + pid + '\'' + + ", dueDate=" + dueDate + + ", lastMenses=" + lastMenses + + ", cDueWeek='" + cDueWeek + '\'' + + ", bg='" + bg + '\'' + + ", pastHistory='" + pastHistory + '\'' + + ", familyHistory='" + familyHistory + '\'' + + ", personalHistory='" + personalHistory + '\'' + + ", ymjzHistory='" + ymjzHistory + '\'' + + ", ywgmHistory='" + ywgmHistory + '\'' + + ", fksxHistory='" + fksxHistory + '\'' + + ", ysfyHistory='" + ysfyHistory + '\'' + + ", pregnancyTimes=" + pregnancyTimes + + ", prodTime=" + prodTime + + ", delivery=" + delivery + + ", planedProd=" + planedProd + + ", abortion=" + abortion + + ", stillbirth=" + stillbirth + + ", stillChan=" + stillChan + + ", neoDeath=" + neoDeath + + ", birthDefect=" + birthDefect + + ", height='" + height + '\'' + + ", weight='" + weight + '\'' + + ", yqWeight='" + yqWeight + '\'' + + ", baricIndex='" + baricIndex + '\'' + + ", cestationInfo='" + cestationInfo + '\'' + + ", gonggao='" + gonggao + '\'' + + ", fuwei='" + fuwei + '\'' + + ", tireNumber1='" + tireNumber1 + '\'' + + ", syjg='" + syjg + '\'' + + ", placentas=" + placentas + + ", heart='" + heart + '\'' + + ", lungs='" + lungs + '\'' + + ", vulva='" + vulva + '\'' + + ", vagina='" + vagina + '\'' + + ", cervical='" + cervical + '\'' + + ", uterus='" + uterus + '\'' + + ", fujian='" + fujian + '\'' + + ", created=" + created + + ", hospitalId='" + hospitalId + '\'' + + ", bp='" + bp + '\'' + + ", hHealthInfo='" + hHealthInfo + '\'' + + ", abortionZR=" + abortionZR + + ", abortionRG=" + abortionRG + + ", highrisk='" + highrisk + '\'' + + ", highriskSocre='" + highriskSocre + '\'' + + ", otherHighRisk='" + otherHighRisk + '\'' + + ", diagnosis='" + diagnosis + '\'' + + ", treatOpinion='" + treatOpinion + '\'' + + ", dirOpinion='" + dirOpinion + '\'' + + ", prodDoctor='" + prodDoctor + '\'' + + ", checkTime=" + checkTime + + ", nextCheckTime=" + nextCheckTime + + ", yn=" + yn + + ", xhdb='" + xhdb + '\'' + + ", bxbjs='" + bxbjs + '\'' + + ", platelet='" + platelet + '\'' + + ", chgOther='" + chgOther + '\'' + + ", ndb='" + ndb + '\'' + + ", nt='" + nt + '\'' + + ", urineKetone='" + urineKetone + '\'' + + ", bld='" + bld + '\'' + + ", ncgOther='" + ncgOther + '\'' + + ", abo='" + abo + '\'' + + ", rh='" + rh + '\'' + + ", bloodSugar='" + bloodSugar + '\'' + + ", bChao='" + bChao + '\'' + + ", tireNumber='" + tireNumber + '\'' + + ", xqgbzam='" + xqgbzam + '\'' + + ", xqgczam='" + xqgczam + '\'' + + ", albumin='" + albumin + '\'' + + ", totalBilirubin='" + totalBilirubin + '\'' + + ", jhBilirubin='" + jhBilirubin + '\'' + + ", ygbmky='" + ygbmky + '\'' + + ", ygbmkt='" + ygbmkt + '\'' + + ", ygeky='" + ygeky + '\'' + + ", ygekt='" + ygekt + '\'' + + ", yghxkt='" + yghxkt + '\'' + + ", xqjq='" + xqjq + '\'' + + ", xnsd='" + xnsd + '\'' + + ", hivkt='" + hivkt + '\'' + + ", ydfmw='" + ydfmw + '\'' + + ", ydqjd='" + ydqjd + '\'' + + ", modified=" + modified + + ", operator=" + operator + + '}'; + } +} diff --git a/regional-etl/src/main/java/com/lyms/etl/model/AntexcOnline.java b/regional-etl/src/main/java/com/lyms/etl/model/AntexcOnline.java new file mode 100644 index 0000000..881f38c --- /dev/null +++ b/regional-etl/src/main/java/com/lyms/etl/model/AntexcOnline.java @@ -0,0 +1,1006 @@ +package com.lyms.etl.model; + +import org.springframework.data.mongodb.core.mapping.Document; + +import java.util.Date; +import java.util.List; + +/** + * 产前检查初诊模型 + * + * Created by Administrator on 2016/6/21 0021. + */ +//@Document(collection = "lyms_antexc_online") +@Document(collection = "lyms_antexc") +public class AntexcOnline { + + //条码 + private String barCode; + private String id; + private String parentId; + private String pid; + //预产期 + private Date dueDate; + //末次月经 + private Date lastMenses; + private String cDueWeek; + private String bg; + // 既往史 + private String pastHistory ; + // 家族史 + private String familyHistory ; + //个人史 + private String personalHistory; + //疫苗接种史 + private String ymjzHistory ; + //药物过敏史 + private String ywgmHistory ; + //妇科手术史 + private String fksxHistory ; + // 叶酸服用 + private String ysfyHistory ; + //孕次 + private Integer pregnancyTimes; + // 产次 + private Integer prodTime; + // 顺产 + private Integer delivery; + //刨宫产 + private Integer planedProd; + //流产 + private Integer abortion; + //死胎 + private Integer stillbirth; + //死产 + private Integer stillChan ; + //新生儿死亡 + private Integer neoDeath; + //出生缺陷 + private Integer birthDefect; + // 身高 + private String height; + //体重 + private String weight ; + //孕前体重 + private String yqWeight ; + //体重指数 + private String baricIndex; + //本次妊娠情况 + private String cestationInfo; + // 宫高 + private String gonggao; + //腹围 + private String fuwei; + //胎数 + private String tireNumber1; + private String syjg; + private List placentas; + //心脏 + private String heart; + //肺部 + private String lungs; + //外阴 + private String vulva; + //阴道 + private String vagina; + // 宫颈 + private String cervical; + //子宫 + private String uterus; + //附件 + private String fujian; + private Date created; + private String hospitalId; + private String bp; + //丈夫健康情况 + private String hHealthInfo; + + //自然流产 + private Integer abortionZR; + //人工流产 + private Integer abortionRG; + + public String getBarCode() { + return barCode; + } + + public void setBarCode(String barCode) { + this.barCode = barCode; + } + + public Integer getAbortionZR() { + return abortionZR; + } + + public void setAbortionZR(Integer abortionZR) { + this.abortionZR = abortionZR; + } + + public Integer getAbortionRG() { + return abortionRG; + } + + public void setAbortionRG(Integer abortionRG) { + this.abortionRG = abortionRG; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public String getBp() { + return bp; + } + + public void setBp(String bp) { + this.bp = bp; + } + + public String getcDueWeek() { + return cDueWeek; + } + + public void setcDueWeek(String cDueWeek) { + this.cDueWeek = cDueWeek; + } + + public String getHospitalId() { + return hospitalId; + } + + public void setHospitalId(String hospitalId) { + this.hospitalId = hospitalId; + } + + public String getCervical() { + return cervical; + } + + public String getBg() { + return bg; + } + + public void setBg(String bg) { + this.bg = bg; + } + + public void setCervical(String cervical) { + this.cervical = cervical; + } + + public String getFujian() { + return fujian; + } + + public void setFujian(String fujian) { + this.fujian = fujian; + } + + public String getHeart() { + return heart; + } + + public void setHeart(String heart) { + this.heart = heart; + } + + public String getLungs() { + return lungs; + } + + public void setLungs(String lungs) { + this.lungs = lungs; + } + + public String getUterus() { + return uterus; + } + + public void setUterus(String uterus) { + this.uterus = uterus; + } + + public String getVagina() { + return vagina; + } + + public void setVagina(String vagina) { + this.vagina = vagina; + } + + public String getVulva() { + return vulva; + } + + public void setVulva(String vulva) { + this.vulva = vulva; + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public String getSyjg() { + return syjg; + } + + public void setSyjg(String syjg) { + this.syjg = syjg; + } + + public String gethHealthInfo() { + return hHealthInfo; + } + + public void sethHealthInfo(String hHealthInfo) { + this.hHealthInfo = hHealthInfo; + } + + /*//心率 + private double heartRate; + //胎方位 + private String fetalPosition; + //胎先露 + private String fetalPresentation; + // 衔接 + private String join;*/ + //高危因素 + private String highrisk ; + //高危评分 + private String highriskSocre; + // 其他高危 + private String otherHighRisk; + // 诊断 + private String diagnosis; + //处理意见 + private String treatOpinion; + //指导意见 + private String dirOpinion; + //产检 医生 + private String prodDoctor; + //产检日期 + private Date checkTime; + //下次产检时间 + private Date nextCheckTime; + private Integer yn; + //血红蛋白值 + private String xhdb ; + //白细胞计数值 + private String bxbjs ; + //血小板 + private String platelet; + // 血常规其他 + private String chgOther ; + // 尿蛋白 + private String ndb; + //尿糖 + private String nt; + //尿同体 + private String urineKetone ; + // 尿潜血 + private String bld ; + //尿常规其他 + private String ncgOther; + //ABO + private String abo ; + // rh + private String rh ; + // 血糖 + private String bloodSugar; + //B超 + private String bChao ; + //胎数 + private String tireNumber ; + //血清谷丙转氨酶 + private String xqgbzam ; + //血清谷草转氨酶 + private String xqgczam ; + //白蛋白 + private String albumin ; + //总胆红素 + private String totalBilirubin; + // 结合胆红素 + private String jhBilirubin ; + + public Date getModified() { + return modified; + } + + public void setModified(Date modified) { + this.modified = modified; + } + + //乙肝表面抗原 + private String ygbmky; + //乙肝表面抗体 + private String ygbmkt; + //乙肝e抗原 + private String ygeky; + //乙肝e抗体 + private String ygekt; + // 乙肝核心抗体 + private String yghxkt; + // 血清肌 + private String xqjq; + // 血尿素氮 + private String xnsd; + // 梅毒血清实验 +// private String mdxqsy; + // hit抗体检测 + private String hivkt; + // 阴道分泌物 + private String ydfmw; + // 阴道清洁度 + private String ydqjd; + + private Date modified; + //操作人 + private Integer operator; + + public Integer getOperator() { + return operator; + } + + public void setOperator(Integer operator) { + this.operator = operator; + } + + public String getCestationInfo() { + return cestationInfo; + } + + public void setCestationInfo(String cestationInfo) { + this.cestationInfo = cestationInfo; + } + + + + + public String getDiagnosis() { + return diagnosis; + } + + public void setDiagnosis(String diagnosis) { + this.diagnosis = diagnosis; + } + + public String getDirOpinion() { + return dirOpinion; + } + + public void setDirOpinion(String dirOpinion) { + this.dirOpinion = dirOpinion; + } + + public String getFamilyHistory() { + return familyHistory; + } + + public void setFamilyHistory(String familyHistory) { + this.familyHistory = familyHistory; + } + + public String getFksxHistory() { + return fksxHistory; + } + + public void setFksxHistory(String fksxHistory) { + this.fksxHistory = fksxHistory; + } + + public String getFuwei() { + return fuwei; + } + + public void setFuwei(String fuwei) { + this.fuwei = fuwei; + } + + public String getGonggao() { + return gonggao; + } + + public void setGonggao(String gonggao) { + this.gonggao = gonggao; + } + + public String getHeight() { + return height; + } + + public void setHeight(String height) { + this.height = height; + } + + public String getHighrisk() { + return highrisk; + } + + public void setHighrisk(String highrisk) { + this.highrisk = highrisk; + } + + public String getHighriskSocre() { + return highriskSocre; + } + + public void setHighriskSocre(String highriskSocre) { + this.highriskSocre = highriskSocre; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public Date getCheckTime() { + return checkTime; + } + + public void setCheckTime(Date checkTime) { + this.checkTime = checkTime; + } + + public Date getNextCheckTime() { + return nextCheckTime; + } + + public void setNextCheckTime(Date nextCheckTime) { + this.nextCheckTime = nextCheckTime; + } + + public String getOtherHighRisk() { + return otherHighRisk; + } + + public void setOtherHighRisk(String otherHighRisk) { + this.otherHighRisk = otherHighRisk; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public String getPastHistory() { + return pastHistory; + } + + public void setPastHistory(String pastHistory) { + this.pastHistory = pastHistory; + } + + public String getPersonalHistory() { + return personalHistory; + } + + public void setPersonalHistory(String personalHistory) { + this.personalHistory = personalHistory; + } + + public List getPlacentas() { + return placentas; + } + + public void setPlacentas(List placentas) { + this.placentas = placentas; + } + + + public String getTireNumber1() { + return tireNumber1; + } + + public void setTireNumber1(String tireNumber1) { + this.tireNumber1 = tireNumber1; + } + + public String getTreatOpinion() { + return treatOpinion; + } + + public void setTreatOpinion(String treatOpinion) { + this.treatOpinion = treatOpinion; + } + + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + + public String getYmjzHistory() { + return ymjzHistory; + } + + public void setYmjzHistory(String ymjzHistory) { + this.ymjzHistory = ymjzHistory; + } + + public Integer getYn() { + return yn; + } + + public void setYn(Integer yn) { + this.yn = yn; + } + + public String getYqWeight() { + return yqWeight; + } + + public void setYqWeight(String yqWeight) { + this.yqWeight = yqWeight; + } + + public String getYsfyHistory() { + return ysfyHistory; + } + + public void setYsfyHistory(String ysfyHistory) { + this.ysfyHistory = ysfyHistory; + } + + public String getYwgmHistory() { + return ywgmHistory; + } + + public void setYwgmHistory(String ywgmHistory) { + this.ywgmHistory = ywgmHistory; + } + + public String getAbo() { + return abo; + } + + public void setAbo(String abo) { + this.abo = abo; + } + + public String getAlbumin() { + return albumin; + } + + public void setAlbumin(String albumin) { + this.albumin = albumin; + } + + public String getbChao() { + return bChao; + } + + public void setbChao(String bChao) { + this.bChao = bChao; + } + + public String getBld() { + return bld; + } + + public void setBld(String bld) { + this.bld = bld; + } + + public String getBloodSugar() { + return bloodSugar; + } + + public void setBloodSugar(String bloodSugar) { + this.bloodSugar = bloodSugar; + } + + public String getBxbjs() { + return bxbjs; + } + + public void setBxbjs(String bxbjs) { + this.bxbjs = bxbjs; + } + + public String getChgOther() { + return chgOther; + } + + public void setChgOther(String chgOther) { + this.chgOther = chgOther; + } + + public String getHivkt() { + return hivkt; + } + + public void setHivkt(String hivkt) { + this.hivkt = hivkt; + } + + public String getJhBilirubin() { + return jhBilirubin; + } + + public void setJhBilirubin(String jhBilirubin) { + this.jhBilirubin = jhBilirubin; + } + +/* public String getMdxqsy() { + return mdxqsy; + } + + public void setMdxqsy(String mdxqsy) { + this.mdxqsy = mdxqsy; + }*/ + + public Integer getAbortion() { + return abortion; + } + + public void setAbortion(Integer abortion) { + this.abortion = abortion; + } + + public String getBaricIndex() { + return baricIndex; + } + + public void setBaricIndex(String baricIndex) { + this.baricIndex = baricIndex; + } + + public Integer getBirthDefect() { + return birthDefect; + } + + public void setBirthDefect(Integer birthDefect) { + this.birthDefect = birthDefect; + } + + public Integer getDelivery() { + return delivery; + } + + public void setDelivery(Integer delivery) { + this.delivery = delivery; + } + + public Integer getNeoDeath() { + return neoDeath; + } + + public void setNeoDeath(Integer neoDeath) { + this.neoDeath = neoDeath; + } + + public Integer getPlanedProd() { + return planedProd; + } + + public void setPlanedProd(Integer planedProd) { + this.planedProd = planedProd; + } + + public Integer getPregnancyTimes() { + return pregnancyTimes; + } + + public void setPregnancyTimes(Integer pregnancyTimes) { + this.pregnancyTimes = pregnancyTimes; + } + + public String getProdDoctor() { + return prodDoctor; + } + + public void setProdDoctor(String prodDoctor) { + this.prodDoctor = prodDoctor; + } + + public Integer getProdTime() { + return prodTime; + } + + public void setProdTime(Integer prodTime) { + this.prodTime = prodTime; + } + + public Integer getStillbirth() { + return stillbirth; + } + + public void setStillbirth(Integer stillbirth) { + this.stillbirth = stillbirth; + } + + public Integer getStillChan() { + return stillChan; + } + + public void setStillChan(Integer stillChan) { + this.stillChan = stillChan; + } + + public String getNcgOther() { + return ncgOther; + } + + public void setNcgOther(String ncgOther) { + this.ncgOther = ncgOther; + } + + public String getNdb() { + return ndb; + } + + public void setNdb(String ndb) { + this.ndb = ndb; + } + + public String getNt() { + return nt; + } + + public void setNt(String nt) { + this.nt = nt; + } + + public String getPlatelet() { + return platelet; + } + + public void setPlatelet(String platelet) { + this.platelet = platelet; + } + + public String getRh() { + return rh; + } + + public void setRh(String rh) { + this.rh = rh; + } + + public String getTireNumber() { + return tireNumber; + } + + public void setTireNumber(String tireNumber) { + this.tireNumber = tireNumber; + } + + public String getTotalBilirubin() { + return totalBilirubin; + } + + public void setTotalBilirubin(String totalBilirubin) { + this.totalBilirubin = totalBilirubin; + } + + public String getUrineKetone() { + return urineKetone; + } + + public void setUrineKetone(String urineKetone) { + this.urineKetone = urineKetone; + } + + public String getXhdb() { + return xhdb; + } + + public void setXhdb(String xhdb) { + this.xhdb = xhdb; + } + + public String getXnsd() { + return xnsd; + } + + public void setXnsd(String xnsd) { + this.xnsd = xnsd; + } + + public String getXqgbzam() { + return xqgbzam; + } + + public void setXqgbzam(String xqgbzam) { + this.xqgbzam = xqgbzam; + } + + public String getXqgczam() { + return xqgczam; + } + + public void setXqgczam(String xqgczam) { + this.xqgczam = xqgczam; + } + + public String getXqjq() { + return xqjq; + } + + public void setXqjq(String xqjq) { + this.xqjq = xqjq; + } + + public String getYdfmw() { + return ydfmw; + } + + public void setYdfmw(String ydfmw) { + this.ydfmw = ydfmw; + } + + public String getYdqjd() { + return ydqjd; + } + + public void setYdqjd(String ydqjd) { + this.ydqjd = ydqjd; + } + + public String getYgbmkt() { + return ygbmkt; + } + + public void setYgbmkt(String ygbmkt) { + this.ygbmkt = ygbmkt; + } + + public String getYgbmky() { + return ygbmky; + } + + public void setYgbmky(String ygbmky) { + this.ygbmky = ygbmky; + } + + public String getYgekt() { + return ygekt; + } + + public void setYgekt(String ygekt) { + this.ygekt = ygekt; + } + + public String getYgeky() { + return ygeky; + } + + public void setYgeky(String ygeky) { + this.ygeky = ygeky; + } + + public String getYghxkt() { + return yghxkt; + } + + public void setYghxkt(String yghxkt) { + this.yghxkt = yghxkt; + } + + public Date getDueDate() { + return dueDate; + } + + public void setDueDate(Date dueDate) { + this.dueDate = dueDate; + } + + public Date getLastMenses() { + return lastMenses; + } + + public void setLastMenses(Date lastMenses) { + this.lastMenses = lastMenses; + } + + @Override + public String toString() { + return "Antexc{" + + "barCode='" + barCode + '\'' + + ", id='" + id + '\'' + + ", parentId='" + parentId + '\'' + + ", pid='" + pid + '\'' + + ", dueDate=" + dueDate + + ", lastMenses=" + lastMenses + + ", cDueWeek='" + cDueWeek + '\'' + + ", bg='" + bg + '\'' + + ", pastHistory='" + pastHistory + '\'' + + ", familyHistory='" + familyHistory + '\'' + + ", personalHistory='" + personalHistory + '\'' + + ", ymjzHistory='" + ymjzHistory + '\'' + + ", ywgmHistory='" + ywgmHistory + '\'' + + ", fksxHistory='" + fksxHistory + '\'' + + ", ysfyHistory='" + ysfyHistory + '\'' + + ", pregnancyTimes=" + pregnancyTimes + + ", prodTime=" + prodTime + + ", delivery=" + delivery + + ", planedProd=" + planedProd + + ", abortion=" + abortion + + ", stillbirth=" + stillbirth + + ", stillChan=" + stillChan + + ", neoDeath=" + neoDeath + + ", birthDefect=" + birthDefect + + ", height='" + height + '\'' + + ", weight='" + weight + '\'' + + ", yqWeight='" + yqWeight + '\'' + + ", baricIndex='" + baricIndex + '\'' + + ", cestationInfo='" + cestationInfo + '\'' + + ", gonggao='" + gonggao + '\'' + + ", fuwei='" + fuwei + '\'' + + ", tireNumber1='" + tireNumber1 + '\'' + + ", syjg='" + syjg + '\'' + + ", placentas=" + placentas + + ", heart='" + heart + '\'' + + ", lungs='" + lungs + '\'' + + ", vulva='" + vulva + '\'' + + ", vagina='" + vagina + '\'' + + ", cervical='" + cervical + '\'' + + ", uterus='" + uterus + '\'' + + ", fujian='" + fujian + '\'' + + ", created=" + created + + ", hospitalId='" + hospitalId + '\'' + + ", bp='" + bp + '\'' + + ", hHealthInfo='" + hHealthInfo + '\'' + + ", abortionZR=" + abortionZR + + ", abortionRG=" + abortionRG + + ", highrisk='" + highrisk + '\'' + + ", highriskSocre='" + highriskSocre + '\'' + + ", otherHighRisk='" + otherHighRisk + '\'' + + ", diagnosis='" + diagnosis + '\'' + + ", treatOpinion='" + treatOpinion + '\'' + + ", dirOpinion='" + dirOpinion + '\'' + + ", prodDoctor='" + prodDoctor + '\'' + + ", checkTime=" + checkTime + + ", nextCheckTime=" + nextCheckTime + + ", yn=" + yn + + ", xhdb='" + xhdb + '\'' + + ", bxbjs='" + bxbjs + '\'' + + ", platelet='" + platelet + '\'' + + ", chgOther='" + chgOther + '\'' + + ", ndb='" + ndb + '\'' + + ", nt='" + nt + '\'' + + ", urineKetone='" + urineKetone + '\'' + + ", bld='" + bld + '\'' + + ", ncgOther='" + ncgOther + '\'' + + ", abo='" + abo + '\'' + + ", rh='" + rh + '\'' + + ", bloodSugar='" + bloodSugar + '\'' + + ", bChao='" + bChao + '\'' + + ", tireNumber='" + tireNumber + '\'' + + ", xqgbzam='" + xqgbzam + '\'' + + ", xqgczam='" + xqgczam + '\'' + + ", albumin='" + albumin + '\'' + + ", totalBilirubin='" + totalBilirubin + '\'' + + ", jhBilirubin='" + jhBilirubin + '\'' + + ", ygbmky='" + ygbmky + '\'' + + ", ygbmkt='" + ygbmkt + '\'' + + ", ygeky='" + ygeky + '\'' + + ", ygekt='" + ygekt + '\'' + + ", yghxkt='" + yghxkt + '\'' + + ", xqjq='" + xqjq + '\'' + + ", xnsd='" + xnsd + '\'' + + ", hivkt='" + hivkt + '\'' + + ", ydfmw='" + ydfmw + '\'' + + ", ydqjd='" + ydqjd + '\'' + + ", modified=" + modified + + ", operator=" + operator + + '}'; + } +} diff --git a/regional-etl/src/main/java/com/lyms/etl/model/CouponInfo.java b/regional-etl/src/main/java/com/lyms/etl/model/CouponInfo.java index 5e0e662..b724592 100644 --- a/regional-etl/src/main/java/com/lyms/etl/model/CouponInfo.java +++ b/regional-etl/src/main/java/com/lyms/etl/model/CouponInfo.java @@ -59,6 +59,11 @@ public class CouponInfo { */ private String operatorUseId; + /** + * 使用时的id,比如建档id、儿保id,通过type判断是什么id + */ + private String usedId; + public CouponInfo() { } @@ -142,4 +147,29 @@ public class CouponInfo { public void setOperatorUseId(String operatorUseId) { this.operatorUseId = operatorUseId; } + + @Override + public String toString() { + return "CouponInfo{" + + "id='" + id + '\'' + + ", sequenceId='" + sequenceId + '\'' + + ", createDate=" + createDate + + ", useDate=" + useDate + + ", userId='" + userId + '\'' + + ", createUserId='" + createUserId + '\'' + + ", couponTemplateId='" + couponTemplateId + '\'' + + ", createHospitalId='" + createHospitalId + '\'' + + ", usedHospitalId='" + usedHospitalId + '\'' + + ", status=" + status + + ", operatorUseId='" + operatorUseId + '\'' + + '}'; + } + + public String getUsedId() { + return usedId; + } + + public void setUsedId(String usedId) { + this.usedId = usedId; + } } diff --git a/regional-etl/src/main/java/com/lyms/etl/model/Patients.java b/regional-etl/src/main/java/com/lyms/etl/model/Patients.java new file mode 100644 index 0000000..3e05a6d --- /dev/null +++ b/regional-etl/src/main/java/com/lyms/etl/model/Patients.java @@ -0,0 +1,1172 @@ +package com.lyms.etl.model; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; +import org.springframework.data.mongodb.core.mapping.Field; + +import java.util.Date; +import java.util.List; +import java.util.Objects; + +@Document(collection="lyms_patient") +public class Patients { + + /** + * 身份证号码 + */ + private String cardNo; + /** + * 助产机构 + */ + @Field("deliverorg") + private String deliverOrg; + /** + * 分娩方式 + */ + @Field("duetype") + private String dueType; + + /******add by lqy begin*******/ + //孕妇国籍Id + private String pcountryId; + + //孕妇民族Id + private String pnationId; + + //孕妇职业类别Id + private String pprofessionTypeId; + + //户籍类型Id + private String pcensusTypeId; + + //孕妇文化程度Id + private String plevelTypeId; + + //工作单位 + private String pworkUnit; + + //居住类别Id + private String pliveTypeId; + + //证件类型Id + private String pcerteTypeId; + + //建档号 + private String fileCode; + //建档医生 + private String bookbuildingDoctor; + + //建档日期 + private Date bookbuildingDate; + + //医院ID + private String hospitalId; + + + /***********丈夫信息***********/ + + //证件号 + private String hcertificateNum; + //证件类型Id + private String hcertificateTypeId; + //国籍Id + private String hcountryId; + //民族Id + private String hnationId; + //工作单位 + private String hworkUnit; + //职业类别Id + private String hprofessionTypeId; + + //户籍地址 + private String haddressRegister; + private String hprovinceRegisterId; + private String hcityRegisterId; + private String hareaRegisterId; + private String hstreetRegisterId; + /******add by lqy end *********/ + /** + *孕妇户籍地址 + */ + private String address; + private String provinceId; + private String cityId; + private String areaId; + private String streetId; + + //服务状态 + private Integer serviceStatus; + + //体验会员 0非会员 1会员 + private Integer expVip; + + //会员截止时间 + private Date vipEndTime; + + //备注 + private String mremark; + + //分娩状态 0未终止妊娠 1终止妊娠 + private Integer dueStatus; + + //建档类型 0 未分娩建档 1儿童建档时建档 2 自动分娩类型 3 转诊自动建档 + private Integer buildType; + + /** + * 产后休养地 + */ + private String addressPostRest; + private String provincePostRestId; + private String cityPostRestId; + private String areaPostRestId; + private String streetPostRestId; + + + /** + * 孕妇居住地 + */ + private String addressRegister; + private String provinceRegisterId; + private String cityRegisterId; + private String areaRegisterId; + private String streetRegisterId; + + /** + * 社区id + */ + private String communityId; + /** + * 是否访视 + */ + private Integer isVisit; + + @Id + private String id; + + private String username; + + private Integer crisis; + + private String avatar; + //预产期 + private Date dueDate; + //末次月经 + private Date lastMenses; + //分娩日期 + private Date fmDate; + + @SuppressWarnings("unused") + private Integer age; + + private String phone; + + private String foreignId; + + private String publishId; + + private String publishName; + //数据来源id,用于区域隐藏建档 + private String source; + + private Integer yn; + + private Date modified; + + private Date created; + + private Integer gender; + + private Date birth; + //1孕妇 3 产妇 + private Integer type; + + private String foreignSubId; + + private String triageOrderNo; + + private Date nextCheckTime; + + private Integer patientLevel; + //最后一次产检医生职工ID + private String lastCheckEmployeeId; + //最后一次检查id + private Integer lastReportId; + //高危风险id + private List riskFactorId; + //建档时高危风险id + private List firstRiskFactorId; + //自定义的高危因素 + private String oRiskFactor; + //风险等级颜色 + private String riskLevelId; + //高危评分值 + private Integer riskScore; + private Integer serviceType; + private Integer vip; + //最后一次检查医生名称 + private String lastReportDoctorName; + private String mommyPatientId; + private String husbandName; + private String husbandPhone; + //丈夫生日 + private Date husbandBirth; + private String vcCardNo; + + //丈夫文化程度Id + private String hlevelTypeId; + + //体验类型 + private Integer expType; + + //person表主键 + private String pid; + //是否隐藏 0 隐藏 1 显示 + private String enable; + //最后一次高危时间 + private Date lastRhTime; + //本院最后一次产检时间 + private Date lastCTime; + //本院产后复查次数 + private Integer postViewTimes; + //操作人 + private Integer operator; + + // 分娩相关信息 + // 分娩医院 + private String fmHospital; + // 分娩年龄 + private Integer fmAge; + // 分娩孕周 + private Integer fmWeek; + // 分娩方式 + private String fmType; + + private Integer isAutoFm; + + + public Integer getIsAutoFm() { + return isAutoFm; + } + + public void setIsAutoFm(Integer isAutoFm) { + this.isAutoFm = isAutoFm; + } + + public String getFmHospital() { + return fmHospital; + } + + public void setFmHospital(String fmHospital) { + this.fmHospital = fmHospital; + } + + public Integer getFmAge() { + return fmAge; + } + + public void setFmAge(Integer fmAge) { + this.fmAge = fmAge; + } + + public Integer getFmWeek() { + return fmWeek; + } + + public void setFmWeek(Integer fmWeek) { + this.fmWeek = fmWeek; + } + + public String getFmType() { + return fmType; + } + + public void setFmType(String fmType) { + this.fmType = fmType; + } + + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public String getoRiskFactor() { + return oRiskFactor; + } + + public void setoRiskFactor(String oRiskFactor) { + this.oRiskFactor = oRiskFactor; + } + + public Date getLastCTime() { + return lastCTime; + } + + public void setLastCTime(Date lastCTime) { + this.lastCTime = lastCTime; + } + + public Integer getPostViewTimes() { + return postViewTimes; + } + + public void setPostViewTimes(Integer postViewTimes) { + this.postViewTimes = postViewTimes; + } + + public Integer getOperator() { + return operator; + } + + public void setOperator(Integer operator) { + this.operator = operator; + } + + public Date getLastRhTime() { + return lastRhTime; + } + + public void setLastRhTime(Date lastRhTime) { + this.lastRhTime = lastRhTime; + } + + public String getEnable() { + return enable; + } + + public void setEnable(String enable) { + this.enable = enable; + } + + public Date getHusbandBirth() { + return husbandBirth; + } + + public void setHusbandBirth(Date husbandBirth) { + this.husbandBirth = husbandBirth; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public Integer getExpType() { + return expType; + } + + public void setExpType(Integer expType) { + this.expType = expType; + } + + public String getPlevelTypeId() { + return plevelTypeId; + } + + public void setPlevelTypeId(String plevelTypeId) { + this.plevelTypeId = plevelTypeId; + } + + public String getHlevelTypeId() { + return hlevelTypeId; + } + + public void setHlevelTypeId(String hlevelTypeId) { + this.hlevelTypeId = hlevelTypeId; + } + + public Date getFmDate() { + return fmDate; + } + + public void setFmDate(Date fmDate) { + this.fmDate = fmDate; + } + + public List getFirstRiskFactorId() { + return firstRiskFactorId; + } + + public void setFirstRiskFactorId(List firstRiskFactorId) { + this.firstRiskFactorId = firstRiskFactorId; + } + + public List getRiskFactorId() { + return riskFactorId; + } + + public void setRiskFactorId(List riskFactorId) { + this.riskFactorId = riskFactorId; + } + + public String getRiskLevelId() { + return riskLevelId; + } + + public void setRiskLevelId(String riskLevelId) { + this.riskLevelId = riskLevelId; + } + public String getAddressPostRest() { + return addressPostRest; + } + + public void setAddressPostRest(String addressPostRest) { + this.addressPostRest = addressPostRest; + } + + public String getProvincePostRestId() { + return provincePostRestId; + } + + public void setProvincePostRestId(String provincePostRestId) { + this.provincePostRestId = provincePostRestId; + } + + public String getCityPostRestId() { + return cityPostRestId; + } + + public void setCityPostRestId(String cityPostRestId) { + this.cityPostRestId = cityPostRestId; + } + + public String getAreaPostRestId() { + return areaPostRestId; + } + + public void setAreaPostRestId(String areaPostRestId) { + this.areaPostRestId = areaPostRestId; + } + public Integer getRiskScore() { + return riskScore; + } + + public void setRiskScore(Integer riskScore) { + this.riskScore = riskScore; + } + + public String getVcCardNo() { + return vcCardNo; + } + + public void setVcCardNo(String vcCardNo) { + this.vcCardNo = vcCardNo; + } + + public String getHusbandName() { + return husbandName; + } + + public void setHusbandName(String husbandName) { + this.husbandName = husbandName; + } + + public String getHusbandPhone() { + return husbandPhone; + } + + public Integer getBuildType() { + return buildType; + } + + public void setBuildType(Integer buildType) { + this.buildType = buildType; + } + + public void setHusbandPhone(String husbandPhone) { + this.husbandPhone = husbandPhone; + } + + public String getMommyPatientId() { + return mommyPatientId; + } + + public void setMommyPatientId(String mommyPatientId) { + this.mommyPatientId = mommyPatientId; + } + + public String getLastCheckEmployeeId() { + return lastCheckEmployeeId; + } + + public void setLastCheckEmployeeId(String lastCheckEmployeeId) { + this.lastCheckEmployeeId = lastCheckEmployeeId; + } + + public String getLastReportDoctorName() { + return lastReportDoctorName; + } + + public void setLastReportDoctorName(String lastReportDoctorName) { + this.lastReportDoctorName = lastReportDoctorName; + } + + public String getAddressRegister() { + return addressRegister; + } + + public void setAddressRegister(String addressRegister) { + this.addressRegister = addressRegister; + } + + public String getProvinceRegisterId() { + return provinceRegisterId; + } + + public void setProvinceRegisterId(String provinceRegisterId) { + this.provinceRegisterId = provinceRegisterId; + } + + public String getCityRegisterId() { + return cityRegisterId; + } + + public void setCityRegisterId(String cityRegisterId) { + this.cityRegisterId = cityRegisterId; + } + + public String getAreaRegisterId() { + return areaRegisterId; + } + + public void setAreaRegisterId(String areaRegisterId) { + this.areaRegisterId = areaRegisterId; + } + public Integer getLastReportId() { + return lastReportId; + } + + public void setLastReportId(Integer lastReportId) { + this.lastReportId = lastReportId; + } + + public Integer getDueStatus() { + return dueStatus; + } + + public void setDueStatus(Integer dueStatus) { + this.dueStatus = dueStatus; + } + + public String getMremark() { + return mremark; + } + + public void setMremark(String mremark) { + this.mremark = mremark; + } + + public Integer getServiceStatus() { + return serviceStatus; + } + + public void setServiceStatus(Integer serviceStatus) { + this.serviceStatus = serviceStatus; + } + + public Integer getExpVip() { + return expVip; + } + + public void setExpVip(Integer expVip) { + this.expVip = expVip; + } + + public Date getVipEndTime() { + return vipEndTime; + } + + public void setVipEndTime(Date vipEndTime) { + this.vipEndTime = vipEndTime; + } + + public String getAreaId() { + return areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getCityId() { + return cityId; + } + + public void setCityId(String cityId) { + this.cityId = cityId; + } + + public String getProvinceId() { + return provinceId; + } + + public void setProvinceId(String provinceId) { + this.provinceId = provinceId; + } + + public Integer getServiceType() { + return serviceType; + } + + public void setServiceType(Integer serviceType) { + this.serviceType = serviceType; + } + + public Integer getVip() { + return vip; + } + + public void setVip(Integer vip) { + this.vip = vip; + } + + public Integer getPatientLevel() { + return patientLevel; + } + + public void setPatientLevel(Integer patientLevel) { + this.patientLevel = patientLevel; + } + + public Date getNextCheckTime() { + return nextCheckTime; + } + + public void setNextCheckTime(Date nextCheckTime) { + this.nextCheckTime = nextCheckTime; + } + + public String getForeignSubId() { + return foreignSubId; + } + + public void setForeignSubId(String foreignSubId) { + this.foreignSubId = foreignSubId; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getTriageOrderNo() { + return triageOrderNo; + } + + public void setTriageOrderNo(String triageOrderNo) { + this.triageOrderNo = triageOrderNo; + } + + public Integer getGender() { + return gender; + } + + public void setGender(Integer gender) { + this.gender = gender; + } + + public Date getBirth() { + return birth; + } + + public void setBirth(Date birth) { + this.birth = birth; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + + } + + public Integer getCrisis() { + return crisis; + } + + public void setCrisis(Integer crisis) { + this.crisis = crisis; + + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + public Date getDueDate() { + return dueDate; + } + + public void setDueDate(Date dueDate) { + this.dueDate = dueDate; + + } + + public Date getLastMenses() { + return lastMenses; + } + + public void setLastMenses(Date lastMenses) { + this.lastMenses = lastMenses; + + } + + public Integer getAge() { + return 1; + } + + public void setAge(Integer age) { + this.age = age; + + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + + } + + public String getForeignId() { + return foreignId; + } + + public void setForeignId(String foreignId) { + this.foreignId = foreignId; + + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPublishId() { + return publishId; + } + + public void setPublishId(String publishId) { + this.publishId = publishId; + } + + public String getPublishName() { + return publishName; + } + + public void setPublishName(String publishName) { + this.publishName = publishName; + + } + + public Integer getYn() { + return yn; + } + + public void setYn(Integer yn) { + this.yn = yn; + + } + + public Date getModified() { + return modified; + } + + public void setModified(Date modified) { + this.modified = modified; + + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getCardNo() { + return cardNo; + } + + public void setCardNo(String cardNo) { + this.cardNo = cardNo; + } + + public String getCommunityId() { + return communityId; + } + + public void setCommunityId(String communityId) { + this.communityId = communityId; + } + + public String getDeliverOrg() { + return deliverOrg; + } + + public void setDeliverOrg(String deliverOrg) { + this.deliverOrg = deliverOrg; + } + + public String getDueType() { + return dueType; + } + + public void setDueType(String dueType) { + this.dueType = dueType; + } + + public Integer getIsVisit() { + return isVisit; + } + + public void setIsVisit(Integer isVisit) { + this.isVisit = isVisit; + } + + public String getPcountryId() { + return pcountryId; + } + + public void setPcountryId(String pcountryId) { + this.pcountryId = pcountryId; + } + + public String getPnationId() { + return pnationId; + } + + public void setPnationId(String pnationId) { + this.pnationId = pnationId; + } + + public String getPprofessionTypeId() { + return pprofessionTypeId; + } + + public void setPprofessionTypeId(String pprofessionTypeId) { + this.pprofessionTypeId = pprofessionTypeId; + } + + public String getPcensusTypeId() { + return pcensusTypeId; + } + + public void setPcensusTypeId(String pcensusTypeId) { + this.pcensusTypeId = pcensusTypeId; + } + + public String getPworkUnit() { + return pworkUnit; + } + + public void setPworkUnit(String pworkUnit) { + this.pworkUnit = pworkUnit; + } + + public String getPliveTypeId() { + return pliveTypeId; + } + + public void setPliveTypeId(String pliveTypeId) { + this.pliveTypeId = pliveTypeId; + } + + public String getPcerteTypeId() { + return pcerteTypeId; + } + + public void setPcerteTypeId(String pcerteTypeId) { + this.pcerteTypeId = pcerteTypeId; + } + + public String getFileCode() { + return fileCode; + } + + public void setFileCode(String fileCode) { + this.fileCode = fileCode; + } + + public String getBookbuildingDoctor() { + return bookbuildingDoctor; + } + + public void setBookbuildingDoctor(String bookbuildingDoctor) { + this.bookbuildingDoctor = bookbuildingDoctor; + } + + public Date getBookbuildingDate() { + return bookbuildingDate; + } + + public void setBookbuildingDate(Date bookbuildingDate) { + this.bookbuildingDate = bookbuildingDate; + } + + public String getHcertificateNum() { + return hcertificateNum; + } + + public void setHcertificateNum(String hcertificateNum) { + this.hcertificateNum = hcertificateNum; + } + + public String getHcertificateTypeId() { + return hcertificateTypeId; + } + + public void setHcertificateTypeId(String hcertificateTypeId) { + this.hcertificateTypeId = hcertificateTypeId; + } + + public String getHcountryId() { + return hcountryId; + } + + public void setHcountryId(String hcountryId) { + this.hcountryId = hcountryId; + } + + public String getHnationId() { + return hnationId; + } + + public void setHnationId(String hnationId) { + this.hnationId = hnationId; + } + + public String getHworkUnit() { + return hworkUnit; + } + + public void setHworkUnit(String hworkUnit) { + this.hworkUnit = hworkUnit; + } + + public String getHprofessionTypeId() { + return hprofessionTypeId; + } + + public void setHprofessionTypeId(String hprofessionTypeId) { + this.hprofessionTypeId = hprofessionTypeId; + } + + public String getHaddressRegister() { + return haddressRegister; + } + + public void setHaddressRegister(String haddressRegister) { + this.haddressRegister = haddressRegister; + } + + public String getHprovinceRegisterId() { + return hprovinceRegisterId; + } + + public void setHprovinceRegisterId(String hprovinceRegisterId) { + this.hprovinceRegisterId = hprovinceRegisterId; + } + + public String getHcityRegisterId() { + return hcityRegisterId; + } + + public void setHcityRegisterId(String hcityRegisterId) { + this.hcityRegisterId = hcityRegisterId; + } + + public String getHareaRegisterId() { + return hareaRegisterId; + } + + public void setHareaRegisterId(String hareaRegisterId) { + this.hareaRegisterId = hareaRegisterId; + } + + public String getHospitalId() { + return hospitalId; + } + + public void setHospitalId(String hospitalId) { + this.hospitalId = hospitalId; + } + + public String getHstreetRegisterId() { + return hstreetRegisterId; + } + + public void setHstreetRegisterId(String hstreetRegisterId) { + this.hstreetRegisterId = hstreetRegisterId; + } + + public String getStreetId() { + return streetId; + } + + public void setStreetId(String streetId) { + this.streetId = streetId; + } + + public String getStreetPostRestId() { + return streetPostRestId; + } + + public void setStreetPostRestId(String streetPostRestId) { + this.streetPostRestId = streetPostRestId; + } + + public String getStreetRegisterId() { + return streetRegisterId; + } + + public void setStreetRegisterId(String streetRegisterId) { + this.streetRegisterId = streetRegisterId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Patients patients = (Patients) o; + return Objects.equals(id, patients.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + return "Patients{" + + "cardNo='" + cardNo + '\'' + + ", deliverOrg='" + deliverOrg + '\'' + + ", dueType='" + dueType + '\'' + + ", pcountryId='" + pcountryId + '\'' + + ", pnationId='" + pnationId + '\'' + + ", pprofessionTypeId='" + pprofessionTypeId + '\'' + + ", pcensusTypeId='" + pcensusTypeId + '\'' + + ", plevelTypeId='" + plevelTypeId + '\'' + + ", pworkUnit='" + pworkUnit + '\'' + + ", pliveTypeId='" + pliveTypeId + '\'' + + ", pcerteTypeId='" + pcerteTypeId + '\'' + + ", fileCode='" + fileCode + '\'' + + ", bookbuildingDoctor='" + bookbuildingDoctor + '\'' + + ", bookbuildingDate=" + bookbuildingDate + + ", hospitalId='" + hospitalId + '\'' + + ", hcertificateNum='" + hcertificateNum + '\'' + + ", hcertificateTypeId='" + hcertificateTypeId + '\'' + + ", hcountryId='" + hcountryId + '\'' + + ", hnationId='" + hnationId + '\'' + + ", hworkUnit='" + hworkUnit + '\'' + + ", hprofessionTypeId='" + hprofessionTypeId + '\'' + + ", haddressRegister='" + haddressRegister + '\'' + + ", hprovinceRegisterId='" + hprovinceRegisterId + '\'' + + ", hcityRegisterId='" + hcityRegisterId + '\'' + + ", hareaRegisterId='" + hareaRegisterId + '\'' + + ", hstreetRegisterId='" + hstreetRegisterId + '\'' + + ", address='" + address + '\'' + + ", provinceId='" + provinceId + '\'' + + ", cityId='" + cityId + '\'' + + ", areaId='" + areaId + '\'' + + ", streetId='" + streetId + '\'' + + ", serviceStatus=" + serviceStatus + + ", expVip=" + expVip + + ", vipEndTime=" + vipEndTime + + ", mremark='" + mremark + '\'' + + ", dueStatus=" + dueStatus + + ", buildType=" + buildType + + ", addressPostRest='" + addressPostRest + '\'' + + ", provincePostRestId='" + provincePostRestId + '\'' + + ", cityPostRestId='" + cityPostRestId + '\'' + + ", areaPostRestId='" + areaPostRestId + '\'' + + ", streetPostRestId='" + streetPostRestId + '\'' + + ", addressRegister='" + addressRegister + '\'' + + ", provinceRegisterId='" + provinceRegisterId + '\'' + + ", cityRegisterId='" + cityRegisterId + '\'' + + ", areaRegisterId='" + areaRegisterId + '\'' + + ", streetRegisterId='" + streetRegisterId + '\'' + + ", communityId='" + communityId + '\'' + + ", isVisit=" + isVisit + + ", id='" + id + '\'' + + ", username='" + username + '\'' + + ", crisis=" + crisis + + ", avatar='" + avatar + '\'' + + ", dueDate=" + dueDate + + ", lastMenses=" + lastMenses + + ", fmDate=" + fmDate + + ", age=" + age + + ", phone='" + phone + '\'' + + ", foreignId='" + foreignId + '\'' + + ", publishId='" + publishId + '\'' + + ", publishName='" + publishName + '\'' + + ", source='" + source + '\'' + + ", yn=" + yn + + ", modified=" + modified + + ", created=" + created + + ", gender=" + gender + + ", birth=" + birth + + ", type=" + type + + ", foreignSubId='" + foreignSubId + '\'' + + ", triageOrderNo='" + triageOrderNo + '\'' + + ", nextCheckTime=" + nextCheckTime + + ", patientLevel=" + patientLevel + + ", lastCheckEmployeeId='" + lastCheckEmployeeId + '\'' + + ", lastReportId=" + lastReportId + + ", riskFactorId=" + riskFactorId + + ", firstRiskFactorId=" + firstRiskFactorId + + ", oRiskFactor='" + oRiskFactor + '\'' + + ", riskLevelId='" + riskLevelId + '\'' + + ", riskScore=" + riskScore + + ", serviceType=" + serviceType + + ", vip=" + vip + + ", lastReportDoctorName='" + lastReportDoctorName + '\'' + + ", mommyPatientId='" + mommyPatientId + '\'' + + ", husbandName='" + husbandName + '\'' + + ", husbandPhone='" + husbandPhone + '\'' + + ", husbandBirth=" + husbandBirth + + ", vcCardNo='" + vcCardNo + '\'' + + ", hlevelTypeId='" + hlevelTypeId + '\'' + + ", expType=" + expType + + ", pid='" + pid + '\'' + + ", enable='" + enable + '\'' + + ", lastRhTime=" + lastRhTime + + ", lastCTime=" + lastCTime + + ", postViewTimes=" + postViewTimes + + ", operator=" + operator + + ", fmHospital='" + fmHospital + '\'' + + ", fmAge=" + fmAge + + ", fmWeek=" + fmWeek + + ", fmType='" + fmType + '\'' + + ", isAutoFm=" + isAutoFm + + '}'; + } +} \ No newline at end of file diff --git a/regional-etl/src/main/java/com/lyms/etl/repository/AntExChuRepository.java b/regional-etl/src/main/java/com/lyms/etl/repository/AntExChuRepository.java deleted file mode 100644 index e776424..0000000 --- a/regional-etl/src/main/java/com/lyms/etl/repository/AntExChuRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.lyms.etl.repository; - -import com.lyms.etl.model.AntExChu; -import org.springframework.data.mongodb.repository.MongoRepository; - -/** - * @Author: litao - * @Date: 2017/5/4 0004 17:15 - * @Version: V1.0 - */ -public interface AntExChuRepository extends MongoRepository { - AntExChu findByBarCode(String barCode); -} diff --git a/regional-etl/src/main/java/com/lyms/etl/repository/AntexOnLineRepository.java b/regional-etl/src/main/java/com/lyms/etl/repository/AntexOnLineRepository.java new file mode 100644 index 0000000..3ed2b1f --- /dev/null +++ b/regional-etl/src/main/java/com/lyms/etl/repository/AntexOnLineRepository.java @@ -0,0 +1,13 @@ +package com.lyms.etl.repository; + +import com.lyms.etl.model.AntexOnline; +import org.springframework.data.mongodb.repository.MongoRepository; + +/** + * @Author: litao + * @Date: 2017/5/4 0004 17:15 + * @Version: V1.0 + */ +public interface AntexOnLineRepository extends MongoRepository { + AntexOnline findByBarCode(String barCode); +} diff --git a/regional-etl/src/main/java/com/lyms/etl/repository/AntexcOnLineRepository.java b/regional-etl/src/main/java/com/lyms/etl/repository/AntexcOnLineRepository.java new file mode 100644 index 0000000..f9853b0 --- /dev/null +++ b/regional-etl/src/main/java/com/lyms/etl/repository/AntexcOnLineRepository.java @@ -0,0 +1,13 @@ +package com.lyms.etl.repository; + +import com.lyms.etl.model.AntexcOnline; +import org.springframework.data.mongodb.repository.MongoRepository; + +/** + * @Author: litao + * @Date: 2017/5/4 0004 17:15 + * @Version: V1.0 + */ +public interface AntexcOnLineRepository extends MongoRepository { + AntexcOnline findByBarCode(String barCode); +} diff --git a/regional-etl/src/main/java/com/lyms/etl/repository/AntexcRepository.java b/regional-etl/src/main/java/com/lyms/etl/repository/AntexcRepository.java new file mode 100644 index 0000000..201b3c9 --- /dev/null +++ b/regional-etl/src/main/java/com/lyms/etl/repository/AntexcRepository.java @@ -0,0 +1,13 @@ +package com.lyms.etl.repository; + +import com.lyms.etl.model.Antexc; +import org.springframework.data.mongodb.repository.MongoRepository; + +/** + * @Author: litao + * @Date: 2017/5/4 0004 17:15 + * @Version: V1.0 + */ +public interface AntexcRepository extends MongoRepository { + Antexc findByBarCode(String barCode); +} diff --git a/regional-etl/src/main/java/com/lyms/etl/repository/PatientsRepository.java b/regional-etl/src/main/java/com/lyms/etl/repository/PatientsRepository.java new file mode 100644 index 0000000..7b5f5ca --- /dev/null +++ b/regional-etl/src/main/java/com/lyms/etl/repository/PatientsRepository.java @@ -0,0 +1,12 @@ +package com.lyms.etl.repository; + +import com.lyms.etl.model.Patients; +import org.springframework.data.mongodb.repository.MongoRepository; + +/** + * @Author: litao + * @Date: 2017/5/24 0024 15:01 + * @Version: V1.0 + */ +public interface PatientsRepository extends MongoRepository { +} diff --git a/regional-etl/src/main/java/com/lyms/etl/service/ICouponInfoService.java b/regional-etl/src/main/java/com/lyms/etl/service/ICouponInfoService.java index 42bd741..ed420a8 100644 --- a/regional-etl/src/main/java/com/lyms/etl/service/ICouponInfoService.java +++ b/regional-etl/src/main/java/com/lyms/etl/service/ICouponInfoService.java @@ -1,10 +1,12 @@ package com.lyms.etl.service; +import java.text.ParseException; + /** * @Author: litao * @Date: 2017/5/3 0003 11:43 * @Version: V1.0 */ public interface ICouponInfoService extends IInvokeHandler { - void transferCoupon(); + void transferCoupon() throws ParseException; } diff --git a/regional-etl/src/main/java/com/lyms/etl/service/IInvokeHandler.java b/regional-etl/src/main/java/com/lyms/etl/service/IInvokeHandler.java index 8267235..1b28991 100644 --- a/regional-etl/src/main/java/com/lyms/etl/service/IInvokeHandler.java +++ b/regional-etl/src/main/java/com/lyms/etl/service/IInvokeHandler.java @@ -1,10 +1,12 @@ package com.lyms.etl.service; +import java.text.ParseException; + /** * @Author: litao * @Date: 2017/5/5 0005 20:21 * @Version: V1.0 */ public interface IInvokeHandler { - void invoke(); + void invoke() throws ParseException; } diff --git a/regional-etl/src/main/java/com/lyms/etl/service/impl/CouponServiceImpl.java b/regional-etl/src/main/java/com/lyms/etl/service/impl/CouponServiceImpl.java index 9d5b52a..bea4345 100644 --- a/regional-etl/src/main/java/com/lyms/etl/service/impl/CouponServiceImpl.java +++ b/regional-etl/src/main/java/com/lyms/etl/service/impl/CouponServiceImpl.java @@ -1,23 +1,28 @@ package com.lyms.etl.service.impl; import com.lyms.etl.dao.ICouponInfoDao; -import com.lyms.etl.model.AntExChu; -import com.lyms.etl.model.CouponInfo; -import com.lyms.etl.model.HospitalCouponTemplateGroup; -import com.lyms.etl.model.PatientCheckTicket; -import com.lyms.etl.repository.AntExChuRepository; -import com.lyms.etl.repository.PatientCheckTicketRepository; +import com.lyms.etl.model.*; +import com.lyms.etl.repository.*; import com.lyms.etl.service.ICouponInfoService; +import com.lyms.etl.util.CollectionUtil; import com.lyms.etl.util.UUIDUtil; +import com.mongodb.BasicDBObject; +import com.mongodb.DBObject; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.time.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Profile; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.BasicQuery; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.text.ParseException; import java.util.*; /** @@ -37,25 +42,48 @@ public class CouponServiceImpl implements ICouponInfoService { @Autowired private PatientCheckTicketRepository patientCheckTicketRepository; @Autowired - private AntExChuRepository antExChuRepository; + private AntexcRepository antExChuRepository; + + @Autowired + private AntexcOnLineRepository antexcOnLineRepository; + + @Autowired + private AntexOnLineRepository antexOnLineRepository; + + @Autowired + private PatientsRepository patientsRepository; + + @Autowired + private MongoTemplate mongoTemplate; + + private Map tempCacheMap = new HashMap<>(); + + private Map sequenceIdCacheMap = new HashMap<>(); + + private Set cachePids = new HashSet<>(); @Override @Transactional - public void transferCoupon() { + public void transferCoupon() throws ParseException { + initCache(); + List couponInfos = new ArrayList<>(); Set hospitalIds = new HashSet<>(); - List patientCheckTickets = patientCheckTicketRepository.findAll(); +// List patientCheckTickets = patientCheckTicketRepository.findAll(); + Date date = DateUtils.parseDate("2017-05-24", "yyyy-MM-dd"); + List patientCheckTickets = mongoTemplate.find(Query.query(Criteria.where("created").gte(date)), PatientCheckTicket.class); LOG.info("本次共需要导入 [{}] 条数据", patientCheckTickets.size()); for (PatientCheckTicket checkTicket : patientCheckTickets) { - CouponInfo couponInfo = createCouponInfo(checkTicket, hospitalIds); - if(couponInfo != null) { - couponInfos.add(couponInfo); - LOG.info("正在创建第 [{}] 个优惠券", couponInfos.size()); + if(cachePids.contains(checkTicket.getPid()) && !checkTicket.getId().endsWith("0")) { + CouponInfo couponInfo = createCouponInfo(checkTicket, hospitalIds); + if(couponInfo != null) { + couponInfos.add(couponInfo); + LOG.info("正在创建第 [{}] 个优惠券", couponInfos.size()); + } } } - batchInsert(couponInfos, 100); - -// setnx(hospitalIds); + batchInsert(couponInfos, 1000); +// setnx(hospitalIds); } /** @@ -65,29 +93,77 @@ public class CouponServiceImpl implements ICouponInfoService { * @return */ private CouponInfo createCouponInfo(PatientCheckTicket checkTicket, Set hospitalIds) { + String tempId = parseSuffix(checkTicket.getId(), checkTicket.getHospitalId()); + if(StringUtils.isBlank(tempId)) { + LOG.info("找不到对应的模板: checkTicketId = {}, hospitalId = {}", checkTicket.getId(), checkTicket.getHospitalId()); + return null; + } + CouponInfo couponInfo = new CouponInfo(); couponInfo.setId(UUIDUtil.createId()); couponInfo.setSequenceId(checkTicket.getId()); couponInfo.setCreateDate(checkTicket.getCreated()); couponInfo.setUseDate(checkTicket.getConsumeDate()); couponInfo.setUserId(checkTicket.getPid()); - couponInfo.setCouponTemplateId(parseSuffix(checkTicket.getId(), checkTicket.getHospitalId())); + couponInfo.setCouponTemplateId(tempId); couponInfo.setCreateHospitalId(checkTicket.getHospitalId()); couponInfo.setUsedHospitalId(checkTicket.getConsumeHospitalId()); couponInfo.setStatus(checkTicket.getStatus()); couponInfo.setCreateUserId(null); - AntExChu antExChu = antExChuRepository.findByBarCode(checkTicket.getId()); - if(antExChu != null) { - couponInfo.setOperatorUseId(antExChu.getProdDoctor()); - } + setCouponInfo(couponInfo); hospitalIds.add(checkTicket.getHospitalId()); - if(StringUtils.isBlank(couponInfo.getCouponTemplateId())) { - return null; - } return couponInfo; } + private void initCache() { + initPatient(); /** 查询所有patient数据 把id缓存起来,方便后面对比 */ +// initSequenceId(); /** 初始化初始化 初诊复诊信息 方便根据优惠券编码获取信息 */ + } + + /** + * 查询所有patient数据 把id缓存起来,方便后面对比 + */ + private void initPatient() { + if(CollectionUtils.isEmpty(cachePids)) { + Date start = new Date(); + DBObject dbObject = new BasicDBObject(); + BasicDBObject fieldsObject=new BasicDBObject(); + fieldsObject.put("pid", true); + Query query = new BasicQuery(dbObject, fieldsObject); + List patients = mongoTemplate.find(query, Patients.class); + + for (Patients patient : patients) { + cachePids.add(patient.getPid()); + } + LOG.info("初始化patientid 成功, 共 [{}] 条, 耗时: {}ms", cachePids.size(), System.currentTimeMillis() - start.getTime()); + } + + } + + /** + * 初始化 初诊复诊信息 + */ + private void initSequenceId() { + DBObject dbObject = new BasicDBObject(); + BasicDBObject fieldsObject=new BasicDBObject(); + fieldsObject.put("id", true); + Query query = new BasicQuery(dbObject, fieldsObject); + List patients = mongoTemplate.find(query, Patients.class); + + /*AntexcOnline antexc = antexcOnLineRepository.findByBarCode(couponInfo.getSequenceId()); + if(antexc != null) { + couponInfo.setOperatorUseId(antexc.getOperator() + ""); + couponInfo.setUsedId(antexc.getId()); + } else { + AntexOnline antexOnline = antexOnLineRepository.findByBarCode(couponInfo.getSequenceId()); + if(antexOnline != null) { + couponInfo.setOperatorUseId(antexOnline.getOperator() + ""); + couponInfo.setUsedId(antexOnline.getId()); + } + }*/ + } + /** * 批量插入 * @param couponInfos @@ -121,10 +197,20 @@ public class CouponServiceImpl implements ICouponInfoService { } private String parseSuffix(String id, String hospitalId) { - Integer number = Integer.parseInt(id.substring(id.length() - 1, id.length())); + String suffix = id.substring(id.length() - 1, id.length()); + String cacheTempId = tempCacheMap.get(suffix + hospitalId); + if(StringUtils.isNotBlank(cacheTempId)) { + LOG.info("命中缓存直接返回 [{}]", cacheTempId); + return cacheTempId; + } + + Integer number = Integer.parseInt(suffix); Map map = new HashMap<>(); map.put("number", number); map.put("hospitalId", hospitalId); + String tempId = couponInfoDao.findTempId(map); + tempCacheMap.put(suffix + hospitalId, tempId); + LOG.info("放入缓存: id = {}, hospitalId = {}, tempId = {}", id, hospitalId, tempId); return couponInfoDao.findTempId(map); } @@ -147,8 +233,39 @@ public class CouponServiceImpl implements ICouponInfoService { } } + /** + * 设置已使用优惠券的操作人id + */ + @Transactional + public void setCouponOperId() { + Map param = CollectionUtil.createMap("status", 2); + List couponInfos = couponInfoDao.findByCondition(param); + for (CouponInfo couponInfo : couponInfos) { + setCouponInfo(couponInfo); + if(StringUtils.isNotBlank(couponInfo.getOperatorUseId())) { + couponInfoDao.update(couponInfo); + } + } + } + @Override - public void invoke() { + public void invoke() throws ParseException { transferCoupon(); } + + public void setCouponInfo(CouponInfo couponInfo) { + AntexcOnline antexc = antexcOnLineRepository.findByBarCode(couponInfo.getSequenceId()); + if(antexc != null) { + couponInfo.setOperatorUseId(antexc.getOperator() + ""); + couponInfo.setUsedId(antexc.getId()); + } else { + AntexOnline antexOnline = antexOnLineRepository.findByBarCode(couponInfo.getSequenceId()); + if(antexOnline != null) { + couponInfo.setOperatorUseId(antexOnline.getOperator() + ""); + couponInfo.setUsedId(antexOnline.getId()); + } + } + } + + } diff --git a/regional-etl/src/main/java/com/lyms/etl/util/CollectionUtil.java b/regional-etl/src/main/java/com/lyms/etl/util/CollectionUtil.java new file mode 100644 index 0000000..86c97a5 --- /dev/null +++ b/regional-etl/src/main/java/com/lyms/etl/util/CollectionUtil.java @@ -0,0 +1,86 @@ +package com.lyms.etl.util; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.util.Assert; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @Author: litao + * @Date: 2017/5/22 0022 10:44 + * @Version: V1.0 + */ +public class CollectionUtil { + private CollectionUtil(){} + + public static Map createMap(Object ... args){ + Assert.notNull(args, "参数不能为null"); + Assert.isTrue(args.length % 2 == 0, "length必须为偶数"); + + Map map = new HashMap<>(); + for (int i = 0; i < args.length; i++) { + String key = args[i++].toString(); + Object value = args[i]; + if(value != null && StringUtils.isNotBlank(value.toString())) { + map.put(key, value); + } + } + return map; + } + + /** + * 合并两个集合中 key 相同的数据 为一行 + * 以第一个集合为主 + * @param listOne + * @param listTwo + * @param oneKey + * @param twoKey + * @return 是否修改了 + */ + public static boolean putAll(List> listOne, List> listTwo, String oneKey, String twoKey) { + Assert.notNull(listOne); + Assert.notNull(listTwo); + Assert.notNull(oneKey); + Assert.notNull(twoKey); + return getIntersect(listOne, listTwo, oneKey, twoKey); + } + + private static boolean getIntersect(List> listOne, List> listTwo, String oneKey, String twoKey) { + boolean modified = false; + for (Map mapOne : listOne) { + for (Map mapTwo : listTwo) { + if(mapOne.get(oneKey).toString().equals(mapTwo.get(twoKey).toString())) { + putCouponInfo(mapOne, mapTwo); + modified = true; + } + } + } + return modified; + } + + private static void putCouponInfo(Map couponMap, Map couponInfoMap) { + /** key命名为 type + "_" + coupon_order */ + couponMap.put(couponInfoMap.get("type") + "_" + couponInfoMap.get("coupon_order"), couponInfoMap.get("type_used_count")); + } + + + public static List asList(String ids) { + return (List) asList(ids, String.class); + } + + public static List asList(String ids, Class clazz) { + Assert.notNull(ids); + Assert.notNull(clazz); + + List list = new ArrayList<>(); + String[] id = ids.split(","); + for (String s : id) { + list.add((T) s); + } + return list; + } + +} diff --git a/regional-etl/src/main/java/com/lyms/etl/util/DateUtil.java b/regional-etl/src/main/java/com/lyms/etl/util/DateUtil.java new file mode 100644 index 0000000..8073951 --- /dev/null +++ b/regional-etl/src/main/java/com/lyms/etl/util/DateUtil.java @@ -0,0 +1,9 @@ +package com.lyms.etl.util; + +/** + * @Author: litao + * @Date: 2017/5/25 0025 11:14 + * @Version: V1.0 + */ +public class DateUtil { +} diff --git a/regional-etl/src/main/resources/application-local.yml b/regional-etl/src/main/resources/application-local.yml new file mode 100644 index 0000000..dfee059 --- /dev/null +++ b/regional-etl/src/main/resources/application-local.yml @@ -0,0 +1,14 @@ +spring: + datasource: + url: jdbc:mysql://127.0.0.1:3306/coupon?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8 + username: root + password: admin + driver-class-name: com.mysql.jdbc.Driver + + data: + mongodb: + host: 127.0.0.1 + port: 27017 + database: local + #username: + # password: diff --git a/regional-etl/src/main/resources/application-prod.yml b/regional-etl/src/main/resources/application-prod.yml index eb17fbb..c8c46f6 100644 --- a/regional-etl/src/main/resources/application-prod.yml +++ b/regional-etl/src/main/resources/application-prod.yml @@ -1,14 +1,14 @@ spring: datasource: - url: jdbc:mysql://192.168.200.119:3306/platform + url: jdbc:mysql://119.90.43.68:3307/platform username: platform password: platform123 driver-class-name: com.mysql.jdbc.Driver data: mongodb: - host: 192.168.200.119 - port: 27017 + host: 119.90.57.26 + port: 10001 database: platform username: platform password: platform123 diff --git a/regional-etl/src/main/resources/application-qhd.yml b/regional-etl/src/main/resources/application-qhd.yml new file mode 100644 index 0000000..69a6ccf --- /dev/null +++ b/regional-etl/src/main/resources/application-qhd.yml @@ -0,0 +1,14 @@ +spring: + datasource: + url: jdbc:mysql://127.0.0.1:3306/platform_dev?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8 + username: root + password: + driver-class-name: com.mysql.jdbc.Driver + + data: + mongodb: + host: 127.0.0.1 + port: 27017 + database: platform + username: platform + password: platform123 diff --git a/regional-etl/src/main/resources/application.properties b/regional-etl/src/main/resources/application.properties index a7e87f7..09cef41 100644 --- a/regional-etl/src/main/resources/application.properties +++ b/regional-etl/src/main/resources/application.properties @@ -22,4 +22,5 @@ mybatis.typeAliasesPackage=com.lyms.etl.model mybatis.mapperLocations=classpath:mappers/*.xml #spring.profiles.active=prod, etl -spring.profiles.active=coupon \ No newline at end of file +spring.profiles.active=qhd, coupon +#spring.profiles.active=coupon \ No newline at end of file diff --git a/regional-etl/src/main/resources/application.yml b/regional-etl/src/main/resources/application.yml index c632bd3..dc2f79c 100644 --- a/regional-etl/src/main/resources/application.yml +++ b/regional-etl/src/main/resources/application.yml @@ -1,30 +1,30 @@ -spring: - datasource: - url: jdbc:mysql://119.90.57.26:3306/platform - username: platform - password: platform123 - driver-class-name: com.mysql.jdbc.Driver - # 必须配置为字符类型 @see com.alibaba.druid.pool.DruidDataSourceFactory > value = (String)properties.get("init"); - init: "true" - - default: - url: jdbc:mysql://119.90.57.26:3306/platform - username: platform - password: platform123 - driver-class-name: com.mysql.jdbc.Driver - # 必须配置为字符类型 @see com.alibaba.druid.pool.DruidDataSourceFactory > value = (String)properties.get("init"); - init: "true" - - customs: - - ds1 - - ds2 - - data: - mongodb: - host: 119.90.57.26 - port: 10001 - database: platform - username: platform - password: platform123 -server: - port: 8888 \ No newline at end of file +#spring: +# datasource: +# url: jdbc:mysql://119.90.57.26:3306/platform +# username: platform +# password: platform123 +# driver-class-name: com.mysql.jdbc.Driver +# # 必须配置为字符类型 @see com.alibaba.druid.pool.DruidDataSourceFactory > value = (String)properties.get("init"); +# init: "true" +# +# default: +# url: jdbc:mysql://119.90.57.26:3306/platform +# username: platform +# password: platform123 +# driver-class-name: com.mysql.jdbc.Driver +# # 必须配置为字符类型 @see com.alibaba.druid.pool.DruidDataSourceFactory > value = (String)properties.get("init"); +# init: "true" +# +# customs: +# - ds1 +# - ds2 +# +# data: +# mongodb: +# host: 119.90.57.26 +# port: 10001 +# database: platform +# username: platform +# password: platform123 +#server: +# port: 8888 \ No newline at end of file diff --git a/regional-etl/src/main/resources/mappers/CouponInfoMapper.xml b/regional-etl/src/main/resources/mappers/CouponInfoMapper.xml index 659dacc..65619a9 100644 --- a/regional-etl/src/main/resources/mappers/CouponInfoMapper.xml +++ b/regional-etl/src/main/resources/mappers/CouponInfoMapper.xml @@ -14,6 +14,7 @@ + @@ -25,7 +26,7 @@ - sequence_id,create_date,use_date,user_id,create_user_id,coupon_template_id,create_hospital_id,used_hospital_id,status + sequence_id,create_date,use_date,user_id,create_user_id,coupon_template_id,create_hospital_id,used_hospital_id,status,used_id,operator_use_id - insert into coupon_info(id, ) values(#{id},#{sequenceId},#{createDate},#{useDate},#{userId},#{createUserId},#{couponTemplateId},#{createHospitalId},#{usedHospitalId},#{status}) + insert into coupon_info(id, ) values(#{id},#{sequenceId},#{createDate},#{useDate},#{userId},#{createUserId},#{couponTemplateId},#{createHospitalId},#{usedHospitalId},#{status},#{usedId},#{operatorUseId}) + select id, from coupon_info + + + and status = #{status} + + + + + + update coupon_info set operator_use_id = #{operatorUseId}, used_id = #{usedId} where id = #{id} + \ No newline at end of file -- 1.8.3.1