Commit d13c0df0f6f9d18a93ad9ce9d0f7a61e00d1047c
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 6 changed files
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/Test2.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/ThreadPoolTest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AssistBuildController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AssistBuildFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java
View file @
d13c0df
| ... | ... | @@ -539,7 +539,7 @@ | 
| 539 | 539 | restMap.put("pcerteTypeId", "57e1dd12f0f02e7ca519d6c7"); /** 其他*/ | 
| 540 | 540 | } | 
| 541 | 541 | } else { | 
| 542 | - Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)), Patients.class); | |
| 542 | + Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId).and("yn").is(1)), Patients.class); | |
| 543 | 543 | if (patients != null) { | 
| 544 | 544 | restMap.put("vcCardNo", patients.getVcCardNo()); /** 就诊卡号 */ | 
| 545 | 545 | restMap.put("cardNo", patients.getCardNo()); /** 证件号 */ | 
platform-operate-api/src/main/java/com/lyms/Test2.java
View file @
d13c0df
| 1 | -package com.lyms; | |
| 2 | - | |
| 3 | -import java.util.HashMap; | |
| 4 | -import java.util.Map; | |
| 5 | - | |
| 6 | -/** | |
| 7 | - * @auther yangfei | |
| 8 | - * @createTime 2018年07月25日 16时56分 | |
| 9 | - * @discription | |
| 10 | - */ | |
| 11 | -public class Test2 { | |
| 12 | - | |
| 13 | - | |
| 14 | - public static void main(String[] args) { | |
| 15 | - Map<String, String> testLMap = testLMap(); | |
| 16 | - System.out.println("第二次:"+testLMap.toString()); | |
| 17 | - } | |
| 18 | - private static Map<String,String> testLMap() { | |
| 19 | - Map<String,String> dd=new HashMap<String, String>(); | |
| 20 | - try { | |
| 21 | - dd.put("1", "1"); | |
| 22 | - return dd; | |
| 23 | - } catch (Exception e) { | |
| 24 | - // TODO: handle exception | |
| 25 | - }finally{ | |
| 26 | - dd.put("4", "4"); | |
| 27 | - dd=null; | |
| 28 | - System.out.println("第一次:"+dd); | |
| 29 | - } | |
| 30 | - return dd; | |
| 31 | - } | |
| 32 | - | |
| 33 | -} | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/ThreadPoolTest.java
View file @
d13c0df
| 1 | -package com.lyms.platform.operate.web; | |
| 2 | - | |
| 3 | -import java.util.concurrent.ExecutorService; | |
| 4 | -import java.util.concurrent.Executors; | |
| 5 | -import java.util.concurrent.TimeUnit; | |
| 6 | - | |
| 7 | -/** | |
| 8 | - * @auther yangfei | |
| 9 | - * @createTime 2017年10月25日 18时00分 | |
| 10 | - * @discription | |
| 11 | - */ | |
| 12 | -public class ThreadPoolTest { | |
| 13 | - public static void main(String[] args) { | |
| 14 | - //固定线程数量的线程池 | |
| 15 | - ExecutorService threadPool = Executors.newFixedThreadPool(3); //线程池的大小依赖于操作系统(或者说JVM) | |
| 16 | - // ExecutorService threadPool = Executors.newCachedThreadPool(); //单个线程的线程池:只有一个线程在工作,如果这个线程异常结束,则会立刻有一个新线程替代它 | |
| 17 | - // ExecutorService threadPool = Executors.newSingleThreadExecutor(); | |
| 18 | - for (int i = 1; i <= 10; i++) { | |
| 19 | - final int task = i; | |
| 20 | - threadPool.execute(new Runnable() { | |
| 21 | - @Override | |
| 22 | - public void run() { | |
| 23 | - for (int j = 1; j <= 10; j++) { | |
| 24 | - try { | |
| 25 | - Thread.sleep(20); | |
| 26 | - } catch (InterruptedException e) { // TODO Auto-generated catch block | |
| 27 | - | |
| 28 | - e.printStackTrace(); | |
| 29 | - } | |
| 30 | - System.out.println(Thread.currentThread().getName() + " is looping of " + j + " for task of " + task); | |
| 31 | - } | |
| 32 | - } | |
| 33 | - }); | |
| 34 | - } | |
| 35 | - threadPool.shutdown(); | |
| 36 | - //结束线程池 | |
| 37 | - // 附带一个定时任务,O(∩_∩)O哈哈~ | |
| 38 | - Executors.newScheduledThreadPool(3).scheduleAtFixedRate(new Runnable() { | |
| 39 | - @Override | |
| 40 | - public void run() { | |
| 41 | - System.out.println("bombing!"); | |
| 42 | - } | |
| 43 | - }, 6, 2, TimeUnit.SECONDS); | |
| 44 | - | |
| 45 | - } | |
| 46 | -} | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AssistBuildController.java
View file @
d13c0df
| ... | ... | @@ -54,16 +54,16 @@ | 
| 54 | 54 | /** | 
| 55 | 55 | * 更新密码 | 
| 56 | 56 | * @param newPwd | 
| 57 | - * @param userId | |
| 57 | + * @param phone | |
| 58 | 58 | * @param httpServletRequest | 
| 59 | 59 | */ | 
| 60 | 60 | @RequestMapping(value = "/updatePwd", method = RequestMethod.GET) | 
| 61 | 61 | @ResponseBody | 
| 62 | 62 | public BaseResponse updatePwd( | 
| 63 | 63 | @RequestParam("newPwd") String newPwd, | 
| 64 | - @RequestParam("userId") Integer userId, | |
| 64 | + @RequestParam("phone") String phone, | |
| 65 | 65 | HttpServletRequest httpServletRequest) { | 
| 66 | - return assistBuildFacade.updatePwd(userId, newPwd); | |
| 66 | + return assistBuildFacade.updatePwd(phone, newPwd); | |
| 67 | 67 | |
| 68 | 68 | } | 
| 69 | 69 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
d13c0df
| ... | ... | @@ -2187,6 +2187,40 @@ | 
| 2187 | 2187 | } | 
| 2188 | 2188 | } | 
| 2189 | 2189 | |
| 2190 | + @RequestMapping(value="/lis/lpcs") | |
| 2191 | + @ResponseBody | |
| 2192 | + public Map<String,String> getLpLis(@RequestParam("vcCardNo")String vcCardNo){ | |
| 2193 | + Map<String,String> map = new HashMap<String,String>(); | |
| 2194 | + map.put("xhdb","1");//血红蛋白 | |
| 2195 | + map.put("bxbjs","2");//白细胞计数 | |
| 2196 | + map.put("xxbjs","3");//血小板计数 | |
| 2197 | + map.put("ndb","4");//尿蛋白 | |
| 2198 | + map.put("nt","5");//尿糖 | |
| 2199 | + map.put("ntt","6");//尿酮体 | |
| 2200 | + map.put("nqx","7");//尿潜血 | |
| 2201 | + map.put("xx","8");//血型 | |
| 2202 | + map.put("rhxx","yin");//RH血型 | |
| 2203 | + map.put("xt","1");//血糖 | |
| 2204 | + map.put("xqgbzam","1");//血清谷丙转氨酶 | |
| 2205 | + map.put("xqgczam","1");//血清谷草转氨酶 | |
| 2206 | + map.put("bdb","1");//白蛋白 | |
| 2207 | + map.put("zdhs","1");//总胆红素 | |
| 2208 | + map.put("bg","yin");//丙肝 | |
| 2209 | + map.put("ygbmky","yin");//乙肝表面抗原 | |
| 2210 | + map.put("ygbmkt","yin");//乙肝表面抗体 | |
| 2211 | + map.put("ygeky","yin");//乙肝E抗原 | |
| 2212 | + map.put("ygekt","yang");//乙肝E抗体 | |
| 2213 | + map.put("yghxkt","yang");//乙肝核心抗体 | |
| 2214 | + map.put("xqjg","1");//血清肌酐 | |
| 2215 | + map.put("xnsd","1");//血尿素氮 | |
| 2216 | + map.put("md","yin");//梅毒 | |
| 2217 | + map.put("hivkt","yin");//HIV抗体 | |
| 2218 | + map.put("ydqjd","5769ef930cf2d37f03479387");//阴道清洁度 | |
| 2219 | + map.put("xt1","1");//血糖1 | |
| 2220 | + map.put("xt2","2");//血糖2 | |
| 2221 | + map.put("xt3","3");//血糖3 | |
| 2222 | + return map; | |
| 2223 | + } | |
| 2190 | 2224 | |
| 2191 | 2225 | @Autowired | 
| 2192 | 2226 | private PatientServiceService patientServiceService; | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AssistBuildFacade.java
View file @
d13c0df
| ... | ... | @@ -55,21 +55,35 @@ | 
| 55 | 55 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(userModels); | 
| 56 | 56 | } | 
| 57 | 57 | |
| 58 | - public BaseResponse updatePwd(Integer userId, String newPwd) { | |
| 58 | + public BaseResponse updatePwd(String phone, String newPwd) { | |
| 59 | 59 | |
| 60 | - Map param = new HashMap<>(); | |
| 61 | - param.put("id", userId); | |
| 60 | + try { | |
| 61 | + Map map = new HashMap<>(); | |
| 62 | + map.put("phone",phone); | |
| 62 | 63 | |
| 63 | - List<AssistBuildUserModel> userModels = assistBuildService.queryAssistBuildUsers(param); | |
| 64 | - if (CollectionUtils.isNotEmpty(userModels)) | |
| 65 | - { | |
| 66 | - AssistBuildUserModel model = userModels.get(0); | |
| 64 | + List<AssistBuildUserModel> dbUsers = assistBuildService.queryAssistBuildUsers(map); | |
| 65 | + if (CollectionUtils.isNotEmpty(dbUsers)) | |
| 66 | + { | |
| 67 | + Map param = new HashMap<>(); | |
| 68 | + param.put("id", dbUsers.get(0).getId()); | |
| 67 | 69 | |
| 68 | - AssistBuildUserModel updateModel = new AssistBuildUserModel(); | |
| 69 | - updateModel.setId(model.getId()); | |
| 70 | - updateModel.setPassword(newPwd); | |
| 71 | - assistBuildService.updateAssistBuildUser(updateModel); | |
| 70 | + List<AssistBuildUserModel> userModels = assistBuildService.queryAssistBuildUsers(param); | |
| 71 | + if (CollectionUtils.isNotEmpty(userModels)) | |
| 72 | + { | |
| 73 | + AssistBuildUserModel model = userModels.get(0); | |
| 74 | + | |
| 75 | + AssistBuildUserModel updateModel = new AssistBuildUserModel(); | |
| 76 | + updateModel.setId(model.getId()); | |
| 77 | + updateModel.setPassword(newPwd); | |
| 78 | + assistBuildService.updateAssistBuildUser(updateModel); | |
| 79 | + } | |
| 80 | + } | |
| 72 | 81 | } | 
| 82 | + catch (Exception e) | |
| 83 | + { | |
| 84 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SYSTEM_ERROR).setErrormsg("失败"); | |
| 85 | + } | |
| 86 | + | |
| 73 | 87 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | 
| 74 | 88 | } | 
| 75 | 89 |