diff --git a/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/SequenceConstant.java b/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/SequenceConstant.java index a04c2e1..ac96bd4 100644 --- a/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/SequenceConstant.java +++ b/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/SequenceConstant.java @@ -7,4 +7,8 @@ public class SequenceConstant { public static final String QUEUE = "SEQUENCE_QUEUE"; public static final String QUEUE_TYPE = "SEQUENCE_QUEUE"; public static final String QUEUE_REMARK = "SEQUENCE_QUEUE"; + + public static final String HOSPITAL_COUPON_CODE = "HOSPITAL_COUPON_CODE"; + public static final String HOSPITAL_COUPON_CODE_REMARK = "医院优惠券打印的时候显示编码"; + } diff --git a/platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java b/platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java index 5579e67..6a1a781 100644 --- a/platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java +++ b/platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java @@ -261,10 +261,6 @@ public class DateUtil { } } - public static void main(String[] args) { - System.out.println(getYyyyMmDd(new Date())); - } - public static Date parseYMD(String s) { if (s == null) { return null; @@ -1059,4 +1055,10 @@ public class DateUtil { return calendar.getTime(); } + public static Integer getCurrentYear() { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + return calendar.get(Calendar.YEAR); + } + } diff --git a/platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyePatient.java b/platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyePatient.java new file mode 100644 index 0000000..81793a7 --- /dev/null +++ b/platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyePatient.java @@ -0,0 +1,653 @@ +package com.lyms.platform.pojo; + +import org.springframework.data.mongodb.core.mapping.Document; + +import java.util.Date; +import java.util.List; + +/** + * 儿童眼保健检查建档 + * Created by lt on 2017/8/1 0001 + */ +@Document(collection="lyms_baby_eye_patient") +public class BabyEyePatient { + + private String id; + + private Date created; + + private String yn; + + // 操作人ID + private String operaterId; + + private String hospitalId; + + private String babyId; + + private String pid; + + /**================================= 儿童基本信息 ==================================*/ + private String name; + + private String sex; + + /** + * 身份证号 + */ + private String vaCard; + + private Date birth; + + /** + * 民族id + */ + private String nationId; + + private String provinceId; + + private String cityId; + + private String areaId; + + private String streetId; + + private String address; + + /** + * 邮编 + */ + private String zipCode; + + /**================================== 母亲基本信息 =============================*/ + private String mName; + + /** + * 证件类型Id + */ + private String mcCardTypeId; + + /** + * 证件号 + */ + private String mCardNo; + + private Date mBirth; + + /** + * 文化程度id + */ + private String mPlevelTypeId; + + /** + * 职业类别Id + */ + private String mHprofessionTypeId; + + /**===================== 父亲基本信息 ========================*/ + private String fName; + + private String fPhone; + + private Date fBirth; + + /** + * 文化程度id + */ + private String fPlevelTypeId; + + /** + * 职业类别Id + */ + private String fHprofessionTypeId; + + + /**=================== 分娩信息 ==================*/ + /** + * 预产期 + */ + private Date dueDate; + + /** + * 分娩方式 + */ + private String deliveryType; + + /** + * 第几胎 + */ + private Integer parityNum; + + /** + * 第几产 + */ + private Integer productNum; + + /** + * 体重 + */ + private String weight; + + /** + * 身长 + */ + private String length; + + /** + * 头围 + */ + private String head; + + /** + * aogar一分钟评分 + */ + private String apgarOneMin; + + /** + * aogar五分钟评分 + */ + private String apgaFiveMin; + + /** + * aogar十分钟评分 + */ + private String apgaTenMin; + + /** + * 是否畸形 + */ + private boolean malformation; + + /** + * 分娩医院 + */ + private String fmHospitalId; + + /**===================== 高危及诊断 ============================*/ + /** + * 母亲孕期高危因素 + */ + private List mHighRiskFactorIds; + + /** + * 是否是高危儿 + */ + private boolean gesell; + + /** + * 诊断 + */ + private List diagnosiIds; + + /** + * 住院号 + */ + private String hospitalizationNum; + + /** + * 新生儿出院诊断 + */ + private String ddIds; + + /**=========================== 院内信息 =======================*/ + /** + * 建档医生 + */ + private String doctor; + + /** + * 建档日期 + */ + private Date bookBuildingDate; + + /** + * 就诊卡号 + */ + private String visitCard; + + /** + * 条形码 + */ + private String barCode; + + /** + * 备注 + */ + private String remark; + + /** + * 服务类型 + */ + private String serviceType; + + /** + * 服务状态 + */ + private String serviceStatus; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public String getYn() { + return yn; + } + + public void setYn(String yn) { + this.yn = yn; + } + + public String getOperaterId() { + return operaterId; + } + + public void setOperaterId(String operaterId) { + this.operaterId = operaterId; + } + + public String getHospitalId() { + return hospitalId; + } + + public void setHospitalId(String hospitalId) { + this.hospitalId = hospitalId; + } + + public String getBabyId() { + return babyId; + } + + public void setBabyId(String babyId) { + this.babyId = babyId; + } + + public String getPid() { + return pid; + } + + public void setPid(String pid) { + this.pid = pid; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getVaCard() { + return vaCard; + } + + public void setVaCard(String vaCard) { + this.vaCard = vaCard; + } + + public Date getBirth() { + return birth; + } + + public void setBirth(Date birth) { + this.birth = birth; + } + + public String getNationId() { + return nationId; + } + + public void setNationId(String nationId) { + this.nationId = nationId; + } + + public String getProvinceId() { + return provinceId; + } + + public void setProvinceId(String provinceId) { + this.provinceId = provinceId; + } + + public String getCityId() { + return cityId; + } + + public void setCityId(String cityId) { + this.cityId = cityId; + } + + public String getAreaId() { + return areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getStreetId() { + return streetId; + } + + public void setStreetId(String streetId) { + this.streetId = streetId; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getZipCode() { + return zipCode; + } + + public void setZipCode(String zipCode) { + this.zipCode = zipCode; + } + + public String getmName() { + return mName; + } + + public void setmName(String mName) { + this.mName = mName; + } + + public String getMcCardTypeId() { + return mcCardTypeId; + } + + public void setMcCardTypeId(String mcCardTypeId) { + this.mcCardTypeId = mcCardTypeId; + } + + public String getmCardNo() { + return mCardNo; + } + + public void setmCardNo(String mCardNo) { + this.mCardNo = mCardNo; + } + + public Date getmBirth() { + return mBirth; + } + + public void setmBirth(Date mBirth) { + this.mBirth = mBirth; + } + + public String getmPlevelTypeId() { + return mPlevelTypeId; + } + + public void setmPlevelTypeId(String mPlevelTypeId) { + this.mPlevelTypeId = mPlevelTypeId; + } + + public String getmHprofessionTypeId() { + return mHprofessionTypeId; + } + + public void setmHprofessionTypeId(String mHprofessionTypeId) { + this.mHprofessionTypeId = mHprofessionTypeId; + } + + public String getfName() { + return fName; + } + + public void setfName(String fName) { + this.fName = fName; + } + + public String getfPhone() { + return fPhone; + } + + public void setfPhone(String fPhone) { + this.fPhone = fPhone; + } + + public Date getfBirth() { + return fBirth; + } + + public void setfBirth(Date fBirth) { + this.fBirth = fBirth; + } + + public String getfPlevelTypeId() { + return fPlevelTypeId; + } + + public void setfPlevelTypeId(String fPlevelTypeId) { + this.fPlevelTypeId = fPlevelTypeId; + } + + public String getfHprofessionTypeId() { + return fHprofessionTypeId; + } + + public void setfHprofessionTypeId(String fHprofessionTypeId) { + this.fHprofessionTypeId = fHprofessionTypeId; + } + + public Date getDueDate() { + return dueDate; + } + + public void setDueDate(Date dueDate) { + this.dueDate = dueDate; + } + + public String getDeliveryType() { + return deliveryType; + } + + public void setDeliveryType(String deliveryType) { + this.deliveryType = deliveryType; + } + + public Integer getParityNum() { + return parityNum; + } + + public void setParityNum(Integer parityNum) { + this.parityNum = parityNum; + } + + public Integer getProductNum() { + return productNum; + } + + public void setProductNum(Integer productNum) { + this.productNum = productNum; + } + + public String getWeight() { + return weight; + } + + public void setWeight(String weight) { + this.weight = weight; + } + + public String getLength() { + return length; + } + + public void setLength(String length) { + this.length = length; + } + + public String getHead() { + return head; + } + + public void setHead(String head) { + this.head = head; + } + + public String getApgarOneMin() { + return apgarOneMin; + } + + public void setApgarOneMin(String apgarOneMin) { + this.apgarOneMin = apgarOneMin; + } + + public String getApgaFiveMin() { + return apgaFiveMin; + } + + public void setApgaFiveMin(String apgaFiveMin) { + this.apgaFiveMin = apgaFiveMin; + } + + public String getApgaTenMin() { + return apgaTenMin; + } + + public void setApgaTenMin(String apgaTenMin) { + this.apgaTenMin = apgaTenMin; + } + + public boolean isMalformation() { + return malformation; + } + + public void setMalformation(boolean malformation) { + this.malformation = malformation; + } + + public String getFmHospitalId() { + return fmHospitalId; + } + + public void setFmHospitalId(String fmHospitalId) { + this.fmHospitalId = fmHospitalId; + } + + public List getmHighRiskFactorIds() { + return mHighRiskFactorIds; + } + + public void setmHighRiskFactorIds(List mHighRiskFactorIds) { + this.mHighRiskFactorIds = mHighRiskFactorIds; + } + + public boolean isGesell() { + return gesell; + } + + public void setGesell(boolean gesell) { + this.gesell = gesell; + } + + public List getDiagnosiIds() { + return diagnosiIds; + } + + public void setDiagnosiIds(List diagnosiIds) { + this.diagnosiIds = diagnosiIds; + } + + public String getHospitalizationNum() { + return hospitalizationNum; + } + + public void setHospitalizationNum(String hospitalizationNum) { + this.hospitalizationNum = hospitalizationNum; + } + + public String getDdIds() { + return ddIds; + } + + public void setDdIds(String ddIds) { + this.ddIds = ddIds; + } + + public String getDoctor() { + return doctor; + } + + public void setDoctor(String doctor) { + this.doctor = doctor; + } + + public Date getBookBuildingDate() { + return bookBuildingDate; + } + + public void setBookBuildingDate(Date bookBuildingDate) { + this.bookBuildingDate = bookBuildingDate; + } + + public String getVisitCard() { + return visitCard; + } + + public void setVisitCard(String visitCard) { + this.visitCard = visitCard; + } + + public String getBarCode() { + return barCode; + } + + public void setBarCode(String barCode) { + this.barCode = barCode; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getServiceType() { + return serviceType; + } + + public void setServiceType(String serviceType) { + this.serviceType = serviceType; + } + + public String getServiceStatus() { + return serviceStatus; + } + + public void setServiceStatus(String serviceStatus) { + this.serviceStatus = serviceStatus; + } +} + + diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CouponController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CouponController.java index a1041f8..118d7dc 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CouponController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CouponController.java @@ -1,5 +1,7 @@ package com.lyms.platform.operate.web.controller; +import com.alibaba.fastjson.JSON; +import com.lyms.platform.biz.SequenceConstant; import com.lyms.platform.biz.service.PatientsService; import com.lyms.platform.common.annotation.TokenRequired; import com.lyms.platform.common.base.BaseController; @@ -9,6 +11,7 @@ import com.lyms.platform.common.result.RespBuilder; import com.lyms.platform.common.utils.PropertiesUtil; import com.lyms.platform.operate.web.facade.AutoMatchFacade; import com.lyms.platform.permission.service.CouponService; +import com.lyms.platform.pojo.PlantformConfigModel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -21,6 +24,9 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; /** * @Author: litao @@ -132,8 +138,16 @@ public class CouponController extends BaseController { @RequestMapping(method = RequestMethod.GET, value = "/test") @ResponseBody public BaseObjectResponse testUse() { - System.err.println("xxxxxxxxxxxxxxxxx"); - patientsService.autoMatDeliver(); + PlantformConfigModel config = new PlantformConfigModel(); + config.setCreateDate(new Date()); + config.setKey("216"); + Map map = new HashMap<>(); + map.put(2017, 0); + map.put(2018, 0); + config.setValue(JSON.toJSONString(map)); + config.setRemark(SequenceConstant.HOSPITAL_COUPON_CODE_REMARK); + config.setType(SequenceConstant.HOSPITAL_COUPON_CODE); + mongoTemplate.save(config); return RespBuilder.buildSuccess(); } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/NewbornServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/NewbornServiceImpl.java index 06d1994..cb78829 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/NewbornServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/NewbornServiceImpl.java @@ -193,10 +193,10 @@ public class NewbornServiceImpl extends BaseServiceImpl implements INewbornVisit if(StringUtils.isNotBlank(pid)) { PersonModel person = mongoTemplate.findById(pid, PersonModel.class); if(person != null) { - temp.put("cardNo", person.getCardNo()); + temp.put("cardNo", com.lyms.platform.common.utils.StringUtils.encryCardNo(person.getCardNo())); temp.put("name", person.getName()); temp.put("age", DateUtil.getAge(person.getBirth())); - temp.put("phone", person.getPhone()); + temp.put("phone", com.lyms.platform.common.utils.StringUtils.encryPhone(person.getPhone())); } } BabyModel babyModel = mongoTemplate.findById(visit.getBabyId(), BabyModel.class);