Commit 701bb6d8fea4c90d9248a9e7c1c704405b2d604e
1 parent
7996478a68
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 42 additions and 7 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/LymsEncodeUtil.java
View file @
701bb6d
| ... | ... | @@ -17,7 +17,7 @@ | 
| 17 | 17 | public class LymsEncodeUtil { | 
| 18 | 18 | |
| 19 | 19 | public static void main(String[] args) throws Exception { | 
| 20 | - String key = "Lymsh@2016"; | |
| 20 | + String key = "Lymsh@2020"; | |
| 21 | 21 | /* | 
| 22 | 22 | * String content = "我爱你"; System.out.println("加密前:" + content); System.out.println("加密密钥和解密密钥:" + key); | 
| 23 | 23 | * | 
| 24 | 24 | |
| 25 | 25 | |
| ... | ... | @@ -26,12 +26,13 @@ | 
| 26 | 26 | |
| 27 | 27 | //String encrypt = aesEncrypt("com.lyms.platform.pojo.PatientWeight", key); System.out.println("加密后:" + encrypt); | 
| 28 | 28 | |
| 29 | - String json = aesDecrypt("26EB0301C4A2410E90985A3E55856E4B3C4D479C08144B1C305459866E333E5EA9DBC5ADCC909D6B56A15E9ACD7D84BB", key); | |
| 29 | +// String json = aesDecrypt("26EB0301C4A2410E90985A3E55856E4B3C4D479C08144B1C305459866E333E5EA9DBC5ADCC909D6B56A15E9ACD7D84BB", key); | |
| 30 | + String json = aesDecrypt("B9B53173ADF73A82548800F08358F4C3", key); | |
| 30 | 31 | System.out.println("解密后:" + json); | 
| 31 | 32 | |
| 32 | - String key1 = "Lymsh@2020"; | |
| 33 | +// String key1 = "Lymsh@2020"; | |
| 33 | 34 | |
| 34 | - String d = aesEncrypt("2020-06-30",key1); | |
| 35 | + String d = aesEncrypt("2020-11-30",key); | |
| 35 | 36 | System.out.println("加密:" + d); | 
| 36 | 37 | } | 
| 37 | 38 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/CommonParamRequest.java
View file @
701bb6d
| ... | ... | @@ -16,6 +16,8 @@ | 
| 16 | 16 | */ | 
| 17 | 17 | private String cardNo; | 
| 18 | 18 | |
| 19 | + private String vcCardNo; | |
| 20 | + | |
| 19 | 21 | /** | 
| 20 | 22 | * 住院号.. | 
| 21 | 23 | */ | 
| ... | ... | @@ -25,6 +27,14 @@ | 
| 25 | 27 | * 编号/ | 
| 26 | 28 | */ | 
| 27 | 29 | private String code; | 
| 30 | + | |
| 31 | + public String getVcCardNo() { | |
| 32 | + return vcCardNo; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public void setVcCardNo(String vcCardNo) { | |
| 36 | + this.vcCardNo = vcCardNo; | |
| 37 | + } | |
| 28 | 38 | |
| 29 | 39 | public String getCode() { | 
| 30 | 40 | return code; | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/CervicalCancerServiceImpl.java
View file @
701bb6d
| ... | ... | @@ -580,14 +580,38 @@ | 
| 580 | 580 | @Override | 
| 581 | 581 | public BaseResponse getPatientInfoByIdCard(CommonParamRequest param,Integer userId) { | 
| 582 | 582 | String cardNo = param.getCardNo(); | 
| 583 | - if (StringUtils.isEmpty(cardNo)) { | |
| 583 | + String vcCardNo = param.getVcCardNo(); | |
| 584 | + if (StringUtils.isEmpty(cardNo) && StringUtils.isEmpty(vcCardNo)) { | |
| 584 | 585 | return new BaseResponse("参数缺失",ErrorCodeConstants.PARAMETER_ERROR); | 
| 585 | 586 | } | 
| 586 | 587 | BaseResponse baseResponse = new BaseResponse(); | 
| 587 | - List<CervicalCancerModel> modelByIdCardNos = mongoTemplate.find(Query.query(Criteria.where("idCardNo").is(cardNo)), CervicalCancerModel.class); | |
| 588 | + List <CervicalCancerModel> modelByIdCardNos = null; | |
| 589 | + if(StringUtils.isNotEmpty(cardNo)){ | |
| 590 | + modelByIdCardNos = mongoTemplate.find(Query.query(Criteria.where("idCardNo").is(cardNo)), CervicalCancerModel.class); | |
| 591 | + } | |
| 592 | + //20201021处理宫颈癌检查没有存储就诊卡号问题 | |
| 593 | + if(StringUtils.isNotEmpty(vcCardNo)){ | |
| 594 | + List <ResidentsArchiveModel> residentsArchiveModels = mongoTemplate.find( | |
| 595 | + Query.query(Criteria.where("vcCardNo").is(vcCardNo).and("certificateNum").ne(null)) | |
| 596 | + .with(new Sort(Sort.Direction.DESC, "created")), ResidentsArchiveModel.class); | |
| 597 | + if(CollectionUtils.isNotEmpty(residentsArchiveModels)){ | |
| 598 | + ResidentsArchiveModel residentsArchiveModel = residentsArchiveModels.get(0); | |
| 599 | + if(StringUtils.isNotEmpty(residentsArchiveModel.getCertificateNum())){ | |
| 600 | + String certificateNum = residentsArchiveModel.getCertificateNum(); | |
| 601 | + modelByIdCardNos = mongoTemplate.find(Query.query(Criteria.where("idCardNo").is(certificateNum)), CervicalCancerModel.class); | |
| 602 | + } | |
| 603 | + } | |
| 604 | + } | |
| 588 | 605 | CervicalCancerModelResult result = new CervicalCancerModelResult(); | 
| 589 | 606 | if (CollectionUtils.isEmpty(modelByIdCardNos)) { | 
| 590 | - List<ResidentsArchiveModel> models = mongoTemplate.find(Query.query(Criteria.where("certificateNum").is(cardNo)).with(new Sort(Sort.Direction.DESC, "created")), ResidentsArchiveModel.class); | |
| 607 | + List <ResidentsArchiveModel> models = null; | |
| 608 | + if(StringUtils.isNotEmpty(cardNo)){ | |
| 609 | + models = mongoTemplate.find( | |
| 610 | + Query.query(Criteria.where("certificateNum").is(cardNo)).with(new Sort(Sort.Direction.DESC, "created")), ResidentsArchiveModel.class); | |
| 611 | + }else if(StringUtils.isNotEmpty(vcCardNo)){//宫颈癌检查增加就诊卡号查询 | |
| 612 | + models = mongoTemplate.find( | |
| 613 | + Query.query(Criteria.where("vcCardNo").is(vcCardNo)).with(new Sort(Sort.Direction.DESC, "created")), ResidentsArchiveModel.class); | |
| 614 | + } | |
| 591 | 615 | if (CollectionUtils.isEmpty(models)) { | 
| 592 | 616 | return new BaseResponse("查无数据,请先到妇女建档进行建档操作", ErrorCodeConstants.NO_DATA); | 
| 593 | 617 | } |