Commit e95d5f4ced16b9e57b01fed79481bce3e15c1488
1 parent
8d4983ac94
Exists in
master
and in
6 other branches
update code
Showing 3 changed files with 125 additions and 27 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
View file @
e95d5f4
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | import com.lyms.platform.permission.service.UsersService; |
| 8 | 8 | import com.lyms.platform.pojo.Patients; |
| 9 | 9 | import com.lyms.platform.query.*; |
| 10 | +import org.apache.commons.lang.*; | |
| 10 | 11 | import org.apache.commons.lang.math.*; |
| 11 | 12 | import org.springframework.context.ApplicationContext; |
| 12 | 13 | import org.springframework.context.support.ClassPathXmlApplicationContext; |
| ... | ... | @@ -14,10 +15,7 @@ |
| 14 | 15 | import org.springframework.data.mongodb.core.aggregation.AggregationOperation; |
| 15 | 16 | import org.springframework.data.mongodb.core.query.Update; |
| 16 | 17 | |
| 17 | -import java.util.ArrayList; | |
| 18 | -import java.util.Calendar; | |
| 19 | -import java.util.Date; | |
| 20 | -import java.util.List; | |
| 18 | +import java.util.*; | |
| 21 | 19 | |
| 22 | 20 | /** |
| 23 | 21 | * Created by Administrator on 2016/8/22 0022. |
| 24 | 22 | |
| 25 | 23 | |
| 26 | 24 | |
| ... | ... | @@ -28,19 +26,53 @@ |
| 28 | 26 | // String id="1"; |
| 29 | 27 | // System.out.print(String.format("%07d", id)); |
| 30 | 28 | |
| 31 | - String addr="四川省华蓥市双河街道办事处民太村"; | |
| 29 | +// String addr="四川省华蓥市双河街道办事处民太村"; | |
| 30 | +// | |
| 31 | +// PatientsQuery patientsQuery = new PatientsQuery(); | |
| 32 | +// patientsQuery.setYn(YnEnums.YES.getId()); | |
| 33 | +// patientsQuery.setBuildType(1); | |
| 34 | +// //查询主档案 | |
| 35 | +// patientsQuery.setExtEnable(false); | |
| 36 | +// patientsQuery.setCardNo("aaaa"); | |
| 37 | +// patientsQuery.setPid("aaaa"); | |
| 38 | +// System.out.println(patientsQuery.convertToQuery().convertToMongoQuery()); | |
| 39 | +// | |
| 40 | +// | |
| 41 | +// System.out.print("5878388d0cf235c11f845399".length()); | |
| 32 | 42 | |
| 33 | - PatientsQuery patientsQuery = new PatientsQuery(); | |
| 34 | - patientsQuery.setYn(YnEnums.YES.getId()); | |
| 35 | - patientsQuery.setBuildType(1); | |
| 36 | - //查询主档案 | |
| 37 | - patientsQuery.setExtEnable(false); | |
| 38 | - patientsQuery.setCardNo("aaaa"); | |
| 39 | - patientsQuery.setPid("aaaa"); | |
| 40 | - System.out.println(patientsQuery.convertToQuery().convertToMongoQuery()); | |
| 41 | 43 | |
| 44 | + String str = "{\"yesOrNo\":\"yes\",\"26cac65c-a040-4898-b7da-8deed3ba0ec3\":{\"checkBox\":true,\"proName\":\"循环系统类\",\"selected\":[\"6c46f0c0-97f1-4b72-a11c-98eacfff9a8f\",\"3beb4592-0fda-4041-b148-97d315fccb94\",\"87f35a26-379d-4a05-8ab8-01e634835474\",\"17e9c0ff-92e6-4f48-9f02-264711a8689d\",\"fd51e86b-d3ef-4b38-9dc3-174cf5431855\",\"f14e3084-2ad5-4e25-a634-196e96949ef3\",\"f9acf716-50b0-4b45-bebc-9d21983c616f\",\"31f9dcd6-d7f0-42b5-bd7d-72dd7fe3b01a\",\"322ad477-8130-46d0-a67c-de1b4dc9c640\",\"e7582017-b94c-46ed-b7fd-e36c747da13a\",\"04f8bb8b-f074-41bc-8f41-d3bedb65874b\"]},\"57e4bedbf0f0baa1bee496cd\":{\"checkBox\":true,\"proName\":\"其他\",\"selected\":\"其他既往史\"}}"; | |
| 42 | 45 | |
| 43 | - System.out.print("5878388d0cf235c11f845399".length()); | |
| 46 | + //既往史 | |
| 47 | + String pastHistory = ""; | |
| 48 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(str)) | |
| 49 | + { | |
| 50 | + Map map = JsonUtil.str2Obj(str, Map.class); | |
| 51 | + String yesOrNo = map.get("yesOrNo") == null ? "" : map.get("yesOrNo").toString(); | |
| 52 | + if ("no".equals(yesOrNo)) | |
| 53 | + { | |
| 54 | + pastHistory = "无"; | |
| 55 | + } | |
| 56 | + else if ("yes".equals(yesOrNo)) | |
| 57 | + { | |
| 58 | + | |
| 59 | + for(Object key : map.keySet()) | |
| 60 | + { | |
| 61 | + Object obj = map.get(key); | |
| 62 | + if (obj != null && !"yes".equals(obj.toString())) | |
| 63 | + { | |
| 64 | + System.out.println(obj.toString()); | |
| 65 | +// Map itemMap = JsonUtil.str2Obj(obj.toString(), Map.class); | |
| 66 | +// if (itemMap != null && itemMap.size() > 0) | |
| 67 | +// { | |
| 68 | +// String proName = itemMap.get("proName") == null ? "" : itemMap.get("proName").toString(); | |
| 69 | +// String selected = itemMap.get("selected") == null ? "" : itemMap.get("selected").toString(); | |
| 70 | +// } | |
| 71 | + } | |
| 72 | + } | |
| 73 | + } | |
| 74 | + } | |
| 75 | + System.out.println(pastHistory); | |
| 44 | 76 | } |
| 45 | 77 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PredictedStatisticsFacade.java
View file @
e95d5f4
| ... | ... | @@ -70,7 +70,7 @@ |
| 70 | 70 | patientsQuery.setDueDateEnd(endDate); |
| 71 | 71 | patientsQuery.setNeed(YnEnums.YES.name()); |
| 72 | 72 | patientsQuery.setYn(YnEnums.YES.getId()); |
| 73 | - patientsQuery.setNotEnable("2"); | |
| 73 | + //patientsQuery.setNotEnable("2"); 王平说的 | |
| 74 | 74 | patientsQuery.setHospitalId(autoMatchFacade.getHospitalId(predictedStatisticsRequest.getOperatorId())); |
| 75 | 75 | List<Integer> typeList = new ArrayList<>(); |
| 76 | 76 | typeList.add(1); |
| ... | ... | @@ -135,7 +135,7 @@ |
| 135 | 135 | Date endDate = DateUtil.getMonthEndTime(temp); |
| 136 | 136 | patientsQuery.setDueDateStart(startDate); |
| 137 | 137 | patientsQuery.setDueDateEnd(endDate); |
| 138 | - patientsQuery.setNotEnable("2"); | |
| 138 | + //patientsQuery.setNotEnable("2"); 王平说的 | |
| 139 | 139 | int count = patientsService.queryPatientCount(patientsQuery); |
| 140 | 140 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM"); |
| 141 | 141 | String dateStr = simpleDateFormat.format(new Date()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
e95d5f4
| ... | ... | @@ -1766,7 +1766,7 @@ |
| 1766 | 1766 | if (StringUtils.isNotEmpty(checkModel.getBregma())) |
| 1767 | 1767 | { |
| 1768 | 1768 | Map map = JsonUtil.str2Obj(checkModel.getBregma(), Map.class); |
| 1769 | - String yesOrNo = map.get("yeaOrNo") == null ? "" : map.get("yeaOrNo").toString(); | |
| 1769 | + String yesOrNo = map.get("yesOrNo") == null ? "" : map.get("yesOrNo").toString(); | |
| 1770 | 1770 | if ("yes".equals(yesOrNo)) |
| 1771 | 1771 | { |
| 1772 | 1772 | bregma = "闭合"; |
| 1773 | 1773 | |
| 1774 | 1774 | |
| ... | ... | @@ -1960,17 +1960,83 @@ |
| 1960 | 1960 | result.setLevelType(FunvCommonUtil.getBaseicConfigByid(model.getLiveTypeId(), basicConfigService)); |
| 1961 | 1961 | result.setLevelType(FunvCommonUtil.getBaseicConfigByid(model.getLevelTypeId(), basicConfigService)); |
| 1962 | 1962 | result.setProfessionType(FunvCommonUtil.getBaseicConfigByid(model.getProfessionTypeId(), basicConfigService)); |
| 1963 | - result.setAge(DateUtil.getAge(model.getBirthday(),new Date())); | |
| 1963 | + result.setAge(DateUtil.getAge(model.getBirthday(), new Date())); | |
| 1964 | 1964 | |
| 1965 | + result.setPhone(model.getPhone()); | |
| 1966 | + result.setWorkUnit(model.getWorkUnit()); | |
| 1967 | + //居住地 | |
| 1968 | + String liveAddress = CommonsHelper.getResidence(model.getProvinceId(), model.getCityId(), | |
| 1969 | + model.getAreaId(), model.getStreetId(), model.getAddress(), basicConfigService); | |
| 1965 | 1970 | |
| 1966 | -// //手机号 | |
| 1967 | -// private String phone; | |
| 1968 | -// //工作单位 | |
| 1969 | -// private String workUnit; | |
| 1970 | -// //居住地 | |
| 1971 | -// private String liveAddress; | |
| 1972 | -// //户籍地址 | |
| 1973 | -// private String addressRegister; | |
| 1971 | + //户籍地址 | |
| 1972 | + String addressRegister = CommonsHelper.getResidence(model.getProvinceRegisterId(), model.getCityRegisterId(), | |
| 1973 | + model.getAreaRegisterId(), model.getStreetRegisterId(), model.getAddressRegister(), basicConfigService); | |
| 1974 | + | |
| 1975 | + result.setAddressRegister(addressRegister); | |
| 1976 | + result.setLiveAddress(liveAddress); | |
| 1977 | + //既往史 | |
| 1978 | + String pastHistory = ""; | |
| 1979 | + if (StringUtils.isNotEmpty(model.getPastHistory())) | |
| 1980 | + { | |
| 1981 | + Map map = JsonUtil.str2Obj(model.getPastHistory(), Map.class); | |
| 1982 | + String yesOrNo = map.get("yesOrNo") == null ? "" : map.get("yesOrNo").toString(); | |
| 1983 | + if ("no".equals(yesOrNo)) | |
| 1984 | + { | |
| 1985 | + pastHistory = "无"; | |
| 1986 | + } | |
| 1987 | + else if ("yes".equals(yesOrNo)) | |
| 1988 | + { | |
| 1989 | + | |
| 1990 | + for(Object key : map.keySet()) | |
| 1991 | + { | |
| 1992 | + Object obj = map.get(key); | |
| 1993 | + if (obj != null && !"yesOrNo".equals(obj.toString())) | |
| 1994 | + { | |
| 1995 | + Map itemMap = JsonUtil.str2Obj(obj.toString(), Map.class); | |
| 1996 | + if (itemMap != null && itemMap.size() > 0) | |
| 1997 | + { | |
| 1998 | + String proName = itemMap.get("proName") == null ? "" : itemMap.get("proName").toString(); | |
| 1999 | + String selected = itemMap.get("selected") == null ? "" : itemMap.get("selected").toString(); | |
| 2000 | + } | |
| 2001 | + } | |
| 2002 | + } | |
| 2003 | + } | |
| 2004 | + } | |
| 2005 | + | |
| 2006 | + result.setPastHistory(pastHistory); | |
| 2007 | + | |
| 2008 | + | |
| 2009 | +// //既往史 | |
| 2010 | +// private String pastHistory; | |
| 2011 | +// //家族史 | |
| 2012 | +// private String familyHistory; | |
| 2013 | +// //个人史 | |
| 2014 | +// private String personalHistory; | |
| 2015 | +// //药物过敏史 | |
| 2016 | +// private String ywgmHistory; | |
| 2017 | +// //现病史 | |
| 2018 | +// private String presentHistory; | |
| 2019 | + | |
| 2020 | + result.setVcCardNo(model.getVcCardNo()); | |
| 2021 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(model.getBuildDoctor())) { | |
| 2022 | + if ("a9e5507f-e7da-4ec6-b8db-9a1e4d1b7c29".equals(model.getBuildDoctor())) { | |
| 2023 | + result.setBuildDoctor("产科病房"); | |
| 2024 | + } | |
| 2025 | + else | |
| 2026 | + { | |
| 2027 | + Users users = usersService.getUsers(Integer.parseInt(model.getBuildDoctor())); | |
| 2028 | + if (users!=null && users.getYn()==YnEnums.YES.getId()){ | |
| 2029 | + String name = users.getName(); | |
| 2030 | + result.setBuildDoctor(name); | |
| 2031 | + } | |
| 2032 | + } | |
| 2033 | + } | |
| 2034 | + | |
| 2035 | + result.setBuildDate(DateUtil.getyyyy_MM_dd(model.getBuildDay())); | |
| 2036 | + result.setId(model.getId()); | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 1974 | 2040 | |
| 1975 | 2041 | return null; |
| 1976 | 2042 | } |