Commit f22b2aa4a9173f91aa7112e95801f01a8d6fab3c
1 parent
bc0039581c
Exists in
master
and in
6 other branches
update
Showing 5 changed files with 109 additions and 5 deletions
- platform-dal/src/main/java/com/lyms/platform/pojo/SieveApplyOrderModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult2.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/SieveWorker2.java
platform-dal/src/main/java/com/lyms/platform/pojo/SieveApplyOrderModel.java
View file @
f22b2aa
... | ... | @@ -256,7 +256,8 @@ |
256 | 256 | private boolean huaDaPushResult; |
257 | 257 | |
258 | 258 | //iAssistantl数据传输格式说明,导出excel自动不足添加在此处,让前端输入 |
259 | - | |
259 | + //导出状态 1导出 | |
260 | + private Integer ieStatus; | |
260 | 261 | //胎数 |
261 | 262 | private Integer noOfFetuses; |
262 | 263 | //孕妇编号 30个字符以内,只能包含字母,数字,下划线和短杠 |
... | ... | @@ -298,6 +299,14 @@ |
298 | 299 | private Integer monozygous; |
299 | 300 | //孕妇筛查类型 0:一般;1:早中联合筛查孕妇 |
300 | 301 | private Integer patientType; |
302 | + | |
303 | + public Integer getIeStatus() { | |
304 | + return ieStatus; | |
305 | + } | |
306 | + | |
307 | + public void setIeStatus(Integer ieStatus) { | |
308 | + this.ieStatus = ieStatus; | |
309 | + } | |
301 | 310 | |
302 | 311 | public Integer getNoOfFetuses() { |
303 | 312 | return noOfFetuses; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
f22b2aa
... | ... | @@ -348,6 +348,82 @@ |
348 | 348 | // ResultUtils.buildSuccessResultAndWrite(response, frontEndResult); |
349 | 349 | } |
350 | 350 | |
351 | + | |
352 | + /** | |
353 | + * 功能描述 根据机构id获取用户列表 | |
354 | + * @author 武涛涛 | |
355 | + * @date 2020/6/17 | |
356 | + */ | |
357 | + @RequestMapping(value = "/usersList", method = RequestMethod.GET) | |
358 | + @ResponseBody | |
359 | + public FrontEndResult getPermissions2(HttpServletResponse response, | |
360 | + HttpServletRequest request, | |
361 | + @RequestParam(value = "keyword", required = false) String keyword, | |
362 | + @RequestParam(value = "rolesId", required = false) Integer rolesId, | |
363 | + @RequestParam(value = "page", required = false) Integer page, | |
364 | + @RequestParam(value = "limit", required = false) Integer limit, | |
365 | + @RequestParam(value = "orgId", required = false) String orgId, | |
366 | + @RequestParam(value = "deptId", required = false) Integer deptId) { | |
367 | + List<Integer> ids = null; | |
368 | + if (null != orgId) { | |
369 | + try { | |
370 | + ids = new ArrayList<>(); | |
371 | + ids.add(Integer.parseInt(orgId)); | |
372 | + } catch (Exception e) { | |
373 | + FrontEndResult frontEndResult = new FrontEndResult(); | |
374 | + frontEndResult.setData(null); | |
375 | + frontEndResult.setErrorcode(ErrorCodeConstants.SUCCESS); | |
376 | + return frontEndResult; | |
377 | + } | |
378 | + | |
379 | + } | |
380 | + UsersQuery usersQuery = new UsersQuery(); | |
381 | + limit = limit == null ? 10 : limit; | |
382 | + page = page == null ? 1 : page; | |
383 | + | |
384 | + usersQuery.setNeed("true"); | |
385 | + usersQuery.setSort("modified desc"); | |
386 | + usersQuery.setYn(YnEnums.YES.getId()); | |
387 | + usersQuery.setDeptId(deptId); | |
388 | + usersQuery.setKeyword(keyword); | |
389 | + usersQuery.setType(1); | |
390 | + usersQuery.setOrgIds(ids); | |
391 | + usersQuery.setPage(page); | |
392 | + usersQuery.setLimit(limit); | |
393 | + usersQuery.setRoleId(rolesId); | |
394 | + | |
395 | + List<Users> users = usersService.queryUsers2(usersQuery); | |
396 | + List<Organization> organizations = null; | |
397 | + //设置用户角色信息 | |
398 | + for (Users user : users) { | |
399 | + organizations = new ArrayList<>(); | |
400 | + Organization organization = organizationService.getOrganization(user.getOrgId()); | |
401 | + user.setOrganization(organization); | |
402 | + organizations.add(organization); | |
403 | + user.setOrganizations(organizations); | |
404 | + | |
405 | + user.setRoles(this.getUserRoles(user.getId())); | |
406 | + user.setDepartmentses(departmentsService.getDepartments(user.getDeptId())); | |
407 | + if (null != user.getZhiChenId()) { | |
408 | + user.setZhiChen(ZhiChenEnums.getById(user.getZhiChenId())); | |
409 | + } | |
410 | + List<DataPermissionsModel> permissionsModelList = accessPermissionFacade.findAccessPerminssionByUserId(user.getId()); | |
411 | + user.setOrganizations(accessPermissionFacade.getOrganization(permissionsModelList)); | |
412 | + if (permissionsModelList != null && permissionsModelList.size() > 0) { | |
413 | + user.setAreaPermission(permissionsModelList.get(0).getAreaPermission()); | |
414 | + } | |
415 | +// user.setPwd(StringUtils.isEmpty(user.getPwd())?user.getPwd():user.getPwd().replaceAll(".","*")); | |
416 | + user.setPwd(replacePwd); | |
417 | + } | |
418 | + | |
419 | + FrontEndResult frontEndResult = new FrontEndResult(); | |
420 | + frontEndResult.setPageInfo(usersQuery.getPageInfo()); | |
421 | + frontEndResult.setData(users); | |
422 | + frontEndResult.setErrorcode(ErrorCodeConstants.SUCCESS); | |
423 | + return frontEndResult; | |
424 | + } | |
425 | + | |
426 | + | |
351 | 427 | //获取用户角色信息 |
352 | 428 | private List<Roles> getUserRoles(Integer userId) { |
353 | 429 | UserRoleMapsQuery query = new UserRoleMapsQuery(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java
View file @
f22b2aa
... | ... | @@ -2577,6 +2577,14 @@ |
2577 | 2577 | /* data.put("Ethnicity", sive.getEthnicity());//种族(名族) |
2578 | 2578 | data.put("IdCard", sive.getCardNo());//身份证号 |
2579 | 2579 | data.put("Monozygous", sive.getMonozygous());//单卵*/ |
2580 | + if(StringUtils.isEmpty(sive.getSieveApplyOrderModelId())){ | |
2581 | + continue; | |
2582 | + } | |
2583 | + SieveApplyOrderModel sieveApplyOrderModel = new SieveApplyOrderModel(); | |
2584 | + sieveApplyOrderModel.setId(sive.getSieveApplyOrderModelId()); | |
2585 | + sieveApplyOrderModel.setIeStatus(1);//1导出,没有该字段没有导出 | |
2586 | + applyOrderService.updateSieve(sieveApplyOrderModel); | |
2587 | + | |
2580 | 2588 | datas.add(data); |
2581 | 2589 | } |
2582 | 2590 | } |
2583 | 2591 | |
... | ... | @@ -2635,12 +2643,12 @@ |
2635 | 2643 | * @date 2020/6/15 |
2636 | 2644 | */ |
2637 | 2645 | public void importSerologySieve(MultipartFile file, Integer id, HttpServletResponse response) { |
2638 | - //把MultipartFile转化为File 第一种 | |
2639 | - CommonsMultipartFile cmf = (CommonsMultipartFile) file; | |
2640 | - DiskFileItem dfi = (DiskFileItem) cmf.getFileItem(); | |
2641 | - File fo = dfi.getStoreLocation(); | |
2642 | 2646 | Workbook wb = null; |
2643 | 2647 | try { |
2648 | + //把MultipartFile转化为File 第一种 | |
2649 | + CommonsMultipartFile cmf = (CommonsMultipartFile) file; | |
2650 | + DiskFileItem dfi = (DiskFileItem) cmf.getFileItem(); | |
2651 | + File fo = dfi.getStoreLocation(); | |
2644 | 2652 | wb = Workbook.getWorkbook(fo); |
2645 | 2653 | Sheet s = wb.getSheet(0); |
2646 | 2654 | System.out.println(s.getName() + " : "); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveListResult2.java
View file @
f22b2aa
... | ... | @@ -17,6 +17,7 @@ |
17 | 17 | public static final String SPIT = "-"; |
18 | 18 | |
19 | 19 | private String id; |
20 | + private String sieveApplyOrderModelId; | |
20 | 21 | //患者id |
21 | 22 | private String parentId; |
22 | 23 | //姓名 |
... | ... | @@ -199,6 +200,14 @@ |
199 | 200 | |
200 | 201 | //建档机构 |
201 | 202 | private String foundHospital; |
203 | + | |
204 | + public String getSieveApplyOrderModelId() { | |
205 | + return sieveApplyOrderModelId; | |
206 | + } | |
207 | + | |
208 | + public void setSieveApplyOrderModelId(String sieveApplyOrderModelId) { | |
209 | + this.sieveApplyOrderModelId = sieveApplyOrderModelId; | |
210 | + } | |
202 | 211 | |
203 | 212 | public Integer getNoOfFetuses() { |
204 | 213 | return noOfFetuses; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/SieveWorker2.java
View file @
f22b2aa
... | ... | @@ -116,6 +116,8 @@ |
116 | 116 | Date collectionDate = null; |
117 | 117 | if (CollectionUtils.isNotEmpty(applyOrderModels)) { |
118 | 118 | SieveApplyOrderModel sieveApplyOrderModel = applyOrderModels.get(0); |
119 | + //产筛申请单id | |
120 | + sieveListResult.setSieveApplyOrderModelId(sieveApplyOrderModel.getId()); | |
119 | 121 | //体重 |
120 | 122 | sieveListResult.setWeight(sieveApplyOrderModel.getWeight()); |
121 | 123 | //送检日期 |