Commit 26e24bb5eff084b75d237c62970e669e63f86349

Authored by zhangchao
1 parent 6b65eaaf9d
Exists in dev

#fix:优化大同一键跳转页面

Showing 4 changed files with 50 additions and 33 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java View file @ 26e24bb
... ... @@ -80,7 +80,7 @@
80 80 public BaseResponse getPatients(@RequestHeader("Authorization")String authorization, String idCard, String name, String phone){
81 81 BaseResponse baseResponse=new BaseResponse();
82 82  
83   - if (!Authorization.equals(authorization)){
  83 + if (!authorization.contains(Authorization)){
84 84 return baseResponse.setErrormsg("权限异常").setErrorcode(-1);
85 85 }
86 86  
... ... @@ -182,7 +182,7 @@
182 182 @RequestMapping(method = RequestMethod.GET, value = "/dt/antexmanage")
183 183 @ResponseBody
184 184 public BaseResponse queryAntenatalExamination(@RequestHeader("Authorization")String authorization,String idCard,String name,String phone,String vcCardNo){
185   - if (!Authorization.equals(authorization)){
  185 + if (!authorization.contains(Authorization)){
186 186 return new BaseResponse().setErrormsg("权限异常").setErrorcode(-1);
187 187 }
188 188 String cardNo=idCard;
... ... @@ -220,7 +220,7 @@
220 220 @RequestMapping(method = RequestMethod.GET, value = "/dt/getLastRisk")
221 221 @ResponseBody
222 222 public BaseResponse getLastRisk(@RequestHeader("Authorization")String authorization,String patientId) {
223   - if (!Authorization.equals(authorization)){
  223 + if (!authorization.contains(Authorization)){
224 224 return new BaseResponse().setErrormsg("权限异常").setErrorcode(-1);
225 225 }
226 226 return antenatalExaminationFacade.getLastRisk(patientId, null);
... ... @@ -235,7 +235,7 @@
235 235 @RequestMapping(value = "/dt/checkReport", method = RequestMethod.GET)
236 236 @ResponseBody
237 237 public BaseResponse checkReport(@RequestHeader("Authorization")String authorization,@RequestParam(required = false) List<String> antex, @RequestParam(required = false) String antexc) {
238   - if (!Authorization.equals(authorization)){
  238 + if (!authorization.contains(Authorization)){
239 239 return new BaseResponse().setErrormsg("权限异常").setErrorcode(-1);
240 240 }
241 241 return viewFacade.checkReport(antex, antexc, userId);
... ... @@ -250,7 +250,7 @@
250 250 @RequestMapping(value = "/dt/findAntenatalExaminationData", method = RequestMethod.GET)
251 251 @ResponseBody
252 252 public BaseObjectResponse findAntenatalExaminationData(@RequestHeader("Authorization")String authorization,@RequestParam("id") String id) {
253   - if (!Authorization.equals(authorization)){
  253 + if (!authorization.contains(Authorization)){
254 254 return new BaseObjectResponse().setErrormsg("权限异常").setErrorcode(-1);
255 255 }
256 256 return viewFacade.findAntenatalExamination(id);
... ... @@ -265,7 +265,7 @@
265 265 @RequestMapping(method = RequestMethod.GET, value = "/dt/queryInPerson")
266 266 @ResponseBody
267 267 public BaseResponse queryInPerson(@RequestHeader("Authorization")String authorization) {
268   - if (!Authorization.equals(authorization)){
  268 + if (!authorization.contains(Authorization)){
269 269 return new BaseResponse().setErrormsg("权限异常").setErrorcode(-1);
270 270 }
271 271 return stopPregnancyFacade.queryInPerson(userId);
... ... @@ -279,7 +279,7 @@
279 279 @RequestMapping(method = RequestMethod.GET, value = "/dt/queryInPerson2")
280 280 @ResponseBody
281 281 public BaseResponse queryInPerson2(@RequestHeader("Authorization")String authorization) {
282   - if (!Authorization.equals(authorization)){
  282 + if (!authorization.contains(Authorization)){
283 283 return new BaseResponse().setErrormsg("权限异常").setErrorcode(-1);
284 284 }
285 285 return stopPregnancyFacade.queryInPerson2(userId);
... ... @@ -303,7 +303,7 @@
303 303 @RequestParam(value = "phone", required = false) String phone,
304 304 @RequestParam(value = "name", required = false) String name)
305 305 {
306   - if (!Authorization.equals(authorization)){
  306 + if (!authorization.contains(Authorization)){
307 307 ResultUtils.buildParameterErrorResultAndWrite(response, "权限异常");
308 308 return ;
309 309 }
... ... @@ -382,7 +382,7 @@
382 382 @ResponseBody
383 383 public BaseResponse getPatent2(@Valid PatientQueryRequest request,
384 384 @RequestHeader("Authorization")String authorization) {
385   - if (!Authorization.equals(authorization)){
  385 + if (!authorization.contains(Authorization)){
386 386 return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常");
387 387 }
388 388 return patientFacade.findPatient2(request, userId);
... ... @@ -391,7 +391,7 @@
391 391 @RequestMapping(method = RequestMethod.GET, value = "/dt/getGongGaoCurve")
392 392 @ResponseBody
393 393 public BaseResponse getGongGaoLine(@RequestParam(required = true) String patientId,@RequestHeader("Authorization")String authorization) {
394   - if (!Authorization.equals(authorization)){
  394 + if (!authorization.contains(Authorization)){
395 395 return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常");
396 396 }
397 397 return antenatalExaminationFacade.getGongGaoLine(patientId, userId);
... ... @@ -400,7 +400,7 @@
400 400 @RequestMapping(method = RequestMethod.GET, value = "/dt/antex")
401 401 @ResponseBody
402 402 public BaseResponse findOneAntById(@RequestHeader("Authorization")String authorization,@Valid AntExQueryRequest antExQueryRequest) {
403   - if (!Authorization.equals(authorization)){
  403 + if (!authorization.contains(Authorization)){
404 404 return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常");
405 405 }
406 406 antExQueryRequest.setUserId(userId);
... ... @@ -410,7 +410,7 @@
410 410 @RequestMapping(method = RequestMethod.POST, value = "/dt/antexmanage")
411 411 @ResponseBody
412 412 public BaseResponse addOneAntenatalExamination(@RequestHeader("Authorization")String authorization,@Valid @RequestBody AntExAddRequest antExAddRequest) {
413   - if (!Authorization.equals(authorization)){
  413 + if (!authorization.contains(Authorization)){
414 414 return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常");
415 415 }
416 416 BaseResponse baseResponse = antenatalExaminationFacade.addOneAntEx(antExAddRequest, userId);
... ... @@ -428,7 +428,7 @@
428 428 @ResponseBody
429 429 public BaseObjectResponse findAntExChuData(@RequestParam("id") String id,
430 430 @RequestHeader("Authorization")String authorization) {
431   - if (!Authorization.equals(authorization)){
  431 + if (!authorization.contains(Authorization)){
432 432 return new BaseObjectResponse().setErrorcode(-1).setErrormsg("权限异常");
433 433 }
434 434 BaseObjectResponse br = viewFacade.findAntExChu(id);
... ... @@ -449,7 +449,7 @@
449 449 @RequestParam(required = false) String userName,
450 450 @RequestParam(defaultValue = "1") Integer perType//默认孕妇
451 451 ) {
452   - if (!Authorization.equals(authorization)){
  452 + if (!authorization.contains(Authorization)){
453 453 return new BaseObjectResponse().setErrorcode(-1).setErrormsg("权限异常");
454 454 }
455 455 return lisFacade.getLisAndRisData(vcCardNo,sINCard, phone,cardNo, sortType,perType, userName,userId);
... ... @@ -463,7 +463,7 @@
463 463 @RequestMapping(method = RequestMethod.POST, value = "/dt/addAntexHighRisk")
464 464 @ResponseBody
465 465 public BaseResponse addAntexHighRisk(@RequestHeader("Authorization")String authorization,@RequestBody AntExHighRiskModel antExHighRiskModel){
466   - if (!Authorization.equals(authorization)){
  466 + if (!authorization.contains(Authorization)){
467 467 return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常");
468 468 }
469 469 return antenatalExaminationFacade.addAntexHighRisk(antExHighRiskModel,userId);
... ... @@ -477,7 +477,7 @@
477 477 @RequestMapping(method = RequestMethod.GET, value = "/dt/queryAntexHighRisk")
478 478 @ResponseBody
479 479 public BaseResponse queryAntexHighRisk(@RequestHeader("Authorization")String authorization,@RequestParam String parentId){
480   - if (!Authorization.equals(authorization)){
  480 + if (!authorization.contains(Authorization)){
481 481 return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常");
482 482 }
483 483 return antenatalExaminationFacade.queryAntexHighRisk(parentId,userId);
... ... @@ -486,7 +486,7 @@
486 486 @RequestMapping(method = RequestMethod.POST, value = "/dt/addPatientNipt")
487 487 @ResponseBody
488 488 public BaseResponse addPatientNipt(@RequestHeader("Authorization")String authorization,@RequestBody PatientNiptDTO patientNiptDTO){
489   - if (!Authorization.equals(authorization)){
  489 + if (!authorization.contains(Authorization)){
490 490 return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常");
491 491 }
492 492 return antenatalExaminationFacade.addPatientNipt(patientNiptDTO,userId);
... ... @@ -511,7 +511,7 @@
511 511 @RequestParam(required = false) String doctorName
512 512  
513 513 ) {
514   - if (!Authorization.equals(authorization)){
  514 + if (!authorization.contains(Authorization)){
515 515 return new BaseObjectResponse().setErrorcode(-1).setErrormsg("权限异常");
516 516 }
517 517 BaseResponse baseResponse=new BaseResponse();
... ... @@ -574,7 +574,7 @@
574 574 public BaseResponse syncAppointmentList(@RequestHeader("Authorization")String authorization,
575 575 @RequestParam(required = true) String doctor,
576 576 @RequestParam(required = true) String date){
577   - if (!Authorization.equals(authorization)){
  577 + if (!authorization.contains(Authorization)){
578 578 return new BaseObjectResponse().setErrorcode(-1).setErrormsg("权限异常");
579 579 }
580 580 Map<String,String> params=new HashMap<>();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 26e24bb
... ... @@ -1452,15 +1452,15 @@
1452 1452 mr.setSmsStatus(SmsStatusEnums.WFS.getId());
1453 1453 mr.setServiceType(1); //判断发送类型
1454 1454  
1455   - mr.setFirst("大同市第一人民医院");
  1455 + mr.setFirst("孕期称重内容");
1456 1456 mr.setObjType(1);
1457   - mr.setKeyword1("产科(请点击此处录入数据,获取营养指导)");
  1457 + mr.setKeyword1("大同市第一人民医院");
1458 1458 mr.setSubTypeId(SmsServiceEnums.FWKT.getId());
1459 1459 //planTime 和 timeType为必填 否则推送中心会推送异常
1460 1460 mr.setTimeType(SmsTimeTypeEnums.ONTIME.getId());
1461 1461 mr.setPlanTime(DateUtil.getyyyy_MM_dd_hms(new Date()));
1462   - mr.setKeyword2("产科");
1463   - mr.setRemark(patient.getUsername());
  1462 + mr.setKeyword2("产科(请在体重和营养管理获取营养指导报告)");
  1463 + // mr.setRemark(patient.getUsername());
1464 1464 mr.setCreated(DateUtil.getyyyy_MM_dd_hms(new Date()));
1465 1465 mr.setWxTempId(WxTempleteIdEnums.YUX_XUE_KE_CHEN_FB.getId());
1466 1466 messages.add(mr);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java View file @ 26e24bb
... ... @@ -638,6 +638,8 @@
638 638 pmap.put("id", user.getId());
639 639 pmap.put("name", user.getName());
640 640 pmap.put("deptId", user.getDeptId());
  641 + pmap.put("account",user.getAccount());
  642 + pmap.put("x",user.getPwd());
641 643 list.add(pmap);
642 644 }
643 645 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/session/strategy/LocalCacheSessionStrategy.java View file @ 26e24bb
... ... @@ -87,17 +87,32 @@
87 87 LoginContext loginContext = new LoginContext();
88 88 if (CollectionUtils.isNotEmpty(membersList)) {
89 89 Integer userId = membersList.get(0).getId();
90   - if(MD5Utils.md5(password).toUpperCase().equals(membersList.get(0).getPwd())){
91   - loginContext.setId(userId);
92   - String token = preFix + TokenUtils.getToken(UUID.randomUUID().toString());
93   - loginContext.setToken(token);
94   - loginContext.setErrorcode(0);
95   - loginContext.setErrormsg("登录成功");
96   - cache.put(token, loginContext);
97   - }else{
98   - loginContext.setErrormsg("密码错误.");
99   - loginContext.setErrorcode(4003);
  90 + if (password.length()>20){
  91 + if (password.equals(membersList.get(0).getPwd())){
  92 + loginContext.setId(userId);
  93 + String token = preFix + TokenUtils.getToken(UUID.randomUUID().toString());
  94 + loginContext.setToken(token);
  95 + loginContext.setErrorcode(0);
  96 + loginContext.setErrormsg("登录成功");
  97 + cache.put(token, loginContext);
  98 + }else {
  99 + loginContext.setErrormsg("密码错误.");
  100 + loginContext.setErrorcode(4003);
  101 + }
  102 + }else {
  103 + if(MD5Utils.md5(password).toUpperCase().equals(membersList.get(0).getPwd())){
  104 + loginContext.setId(userId);
  105 + String token = preFix + TokenUtils.getToken(UUID.randomUUID().toString());
  106 + loginContext.setToken(token);
  107 + loginContext.setErrorcode(0);
  108 + loginContext.setErrormsg("登录成功");
  109 + cache.put(token, loginContext);
  110 + }else{
  111 + loginContext.setErrormsg("密码错误.");
  112 + loginContext.setErrorcode(4003);
  113 + }
100 114 }
  115 +
101 116 }else{
102 117 loginContext.setErrormsg("用户不存在.");
103 118 loginContext.setErrorcode(4003);