Commit 58b888fc036a23a55b63946ad8b3febab246318a

Authored by liquanyu
1 parent a11fc08f4b

服务终止

Showing 6 changed files with 76 additions and 4 deletions

platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java View file @ 58b888f
... ... @@ -1564,8 +1564,8 @@
1564 1564  
1565 1565 System.out.println(start+"=="+end);
1566 1566  
1567   -// Date baby = parseDate("2018-07-15");
1568   -// System.out.println(baby.getTime());
  1567 + Date baby = parseDate("2018-12-28");
  1568 + System.out.println(baby.getTime());
1569 1569 }
1570 1570  
1571 1571 }
platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java View file @ 58b888f
... ... @@ -230,6 +230,8 @@
230 230 if (CollectionUtils.isNotEmpty(fmHospitalList)) {
231 231 if(fsHospital!=null){
232 232 condition.orCondition(MongoCondition.newInstance("fmHospital", fmHospitalList, MongoOper.IN),MongoCondition.newInstance("fsHospital", fsHospital, MongoOper.IS));
  233 +// condition = condition.and("fmHospital", fmHospitalList, MongoOper.IN);
  234 +// condition = condition.and("fsHospital", fsHospital, MongoOper.IN);
233 235 }else {
234 236 condition = condition.and("fmHospital", fmHospitalList, MongoOper.IN);
235 237 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SyncDataController.java View file @ 58b888f
... ... @@ -273,5 +273,24 @@
273 273 return "handleSieveStatus .....";
274 274 }
275 275  
  276 +
  277 + /**
  278 + * 终止服务
  279 + * @return
  280 + */
  281 + @ResponseBody
  282 + @RequestMapping(value = "/setStopService", method = RequestMethod.POST)
  283 + public BaseResponse setStopService(@RequestParam(required = false) String hospitalId,
  284 + @RequestParam(required = false) String patientId) {
  285 + try {
  286 + return patientServiceSysFacade.setStopService(patientId);
  287 + } catch (Exception e) {
  288 + BaseResponse baseResponse = new BaseResponse();
  289 + baseResponse.setObject(e.getMessage());
  290 + baseResponse.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR);
  291 + baseResponse.setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION);
  292 + return baseResponse;
  293 + }
  294 + }
276 295 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java View file @ 58b888f
... ... @@ -263,6 +263,7 @@
263 263 if ("2100001580".equals(hospitalId))
264 264 {
265 265 //通过就诊卡号和医院id查询到医院下面的lis记录
  266 + model.setHospitalId("2100001580");
266 267 lises = queryLisData(vcCardNo, phone, cardNo,perType, model);
267 268 }
268 269 else
269 270  
... ... @@ -430,8 +431,16 @@
430 431 // else if("2100001605".equals(model.getHospitalId())){
431 432 // model.setVcCardNo(cardNo); //TODO
432 433 // }
433   - else {
  434 + else if (StringUtils.isNotEmpty(vcCardNo)) {
434 435 model.setVcCardNo(vcCardNo);
  436 + }
  437 + else if (StringUtils.isNotEmpty(cardNo))
  438 + {
  439 + model.setVcCardNo(cardNo);
  440 + }
  441 + else
  442 + {
  443 + return reportModelList;
435 444 }
436 445  
437 446 List<LisReportModel> lises = lisService.queryLisDataByModel(model);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceSysFacade.java View file @ 58b888f
... ... @@ -237,5 +237,47 @@
237 237 return baseResponse;
238 238 }
239 239  
  240 + public BaseResponse setStopService(String patientId) {
  241 +
  242 + Patients patients = patientsService.findOnePatientById(patientId);
  243 + if (patients.getServiceType() != null && patients.getServiceType() == ServiceTypeEnums.STANDARD_SERVICE.getId())
  244 + {
  245 + patients.setServiceStatus( ServiceStatusEnums.NO_OPEN.getId());
  246 +
  247 + //先根据孕妇id和开通服务类型、开通医生进行查询,如果已经开通过则开通失败
  248 + PatientServiceQuery patientQuery = new PatientServiceQuery();
  249 + //根据孕妇主档案Id进行查询
  250 + patientQuery.setParentid(patientId);
  251 + patientQuery.setSerType(PatientSerEnums.SerTypeEnums.bzfw.getId());
  252 + List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery);
  253 + if (CollectionUtils.isNotEmpty(patientServices)) {//修改
  254 + PatientService patientService = patientServices.get(0);
  255 + patientService.setSerStatus(PatientSerEnums.SerStatusEnums.zt.getId());
  256 + patientServiceService.updatePatientService(patientService);
  257 + }
  258 +
  259 + }
  260 + else if (patients.getServiceType() != null && patients.getServiceType() == ServiceTypeEnums.ADD_SERVICE.getId())
  261 + {
  262 + patients.setServiceStatus(ServiceStatusEnums.SUSPEND.getId());
  263 +
  264 + //先根据孕妇id和开通服务类型、开通医生进行查询,如果已经开通过则开通失败
  265 + PatientServiceQuery patientQuery = new PatientServiceQuery();
  266 + //根据孕妇主档案Id进行查询
  267 + patientQuery.setParentid(patientId);
  268 + patientQuery.setSerType(PatientSerEnums.SerTypeEnums.yqjzzd.getId());
  269 + List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery);
  270 + if (CollectionUtils.isNotEmpty(patientServices)) {//修改
  271 + PatientService patientService = patientServices.get(0);
  272 + patientService.setSerStatus(PatientSerEnums.SerStatusEnums.zt.getId());
  273 + patientServiceService.updatePatientService(patientService);
  274 + }
  275 + }
  276 + patientsService.updatePatient(patients);
  277 + BaseResponse baseResponse = new BaseResponse();
  278 + baseResponse.setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION);
  279 + baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
  280 + return baseResponse;
  281 + }
240 282 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/session/strategy/LocalCacheSessionStrategy.java View file @ 58b888f
... ... @@ -97,7 +97,7 @@
97 97 }
98 98  
99 99 public static void main(String[] args) {
100   - System.out.print(MD5Utils.md5("789654").toUpperCase());
  100 + System.out.print(MD5Utils.md5("181818").toUpperCase());
101 101 }
102 102  
103 103 @Override