Commit 6d6c8540d9cf15ae3548560d19bbbbc919b3bb47
1 parent
b54ac83aa3
Exists in
master
and in
6 other branches
辅助建档
Showing 6 changed files with 111 additions and 13 deletions
- platform-biz-service/src/main/resources/mainOrm/master/AssistBuildMapper.xml
- platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
platform-biz-service/src/main/resources/mainOrm/master/AssistBuildMapper.xml
View file @
6d6c854
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
6d6c854
| ... | ... | @@ -292,6 +292,17 @@ |
| 292 | 292 | //面部信息 |
| 293 | 293 | private String face; |
| 294 | 294 | |
| 295 | + //辅助建档医生id | |
| 296 | + private String assistUserId; | |
| 297 | + | |
| 298 | + public String getAssistUserId() { | |
| 299 | + return assistUserId; | |
| 300 | + } | |
| 301 | + | |
| 302 | + public void setAssistUserId(String assistUserId) { | |
| 303 | + this.assistUserId = assistUserId; | |
| 304 | + } | |
| 305 | + | |
| 295 | 306 | public List<String> getChildExtAddrs() { |
| 296 | 307 | return childExtAddrs; |
| 297 | 308 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java
View file @
6d6c854
| ... | ... | @@ -5,22 +5,25 @@ |
| 5 | 5 | import com.lyms.platform.common.annotation.TokenRequired; |
| 6 | 6 | import com.lyms.platform.common.base.BaseController; |
| 7 | 7 | import com.lyms.platform.common.base.LoginContext; |
| 8 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 8 | 9 | import com.lyms.platform.common.enums.YnEnums; |
| 10 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
| 9 | 11 | import com.lyms.platform.common.result.BaseResponse; |
| 10 | 12 | import com.lyms.platform.common.result.RespBuilder; |
| 11 | -import com.lyms.platform.common.utils.JsonUtil; | |
| 12 | -import com.lyms.platform.common.utils.MessageUtil; | |
| 13 | -import com.lyms.platform.common.utils.PropertiesUtils; | |
| 14 | -import com.lyms.platform.common.utils.StringUtils; | |
| 13 | +import com.lyms.platform.common.utils.*; | |
| 15 | 14 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
| 16 | 15 | import com.lyms.platform.operate.web.facade.RemoteFacade; |
| 16 | +import com.lyms.platform.permission.service.AssistBuildService; | |
| 17 | 17 | import com.lyms.platform.pojo.ArchiveData; |
| 18 | +import com.lyms.platform.pojo.AssistBuildUserModel; | |
| 18 | 19 | import com.lyms.platform.pojo.Patients; |
| 19 | 20 | import com.lyms.platform.query.ArchiveDataQuery; |
| 20 | 21 | import com.lyms.platform.query.PatientsQuery; |
| 22 | +import net.sf.json.JSONObject; | |
| 21 | 23 | import org.apache.commons.collections.CollectionUtils; |
| 22 | 24 | import org.apache.commons.httpclient.HttpClient; |
| 23 | 25 | import org.springframework.beans.factory.annotation.Autowired; |
| 26 | +import org.springframework.data.domain.Sort; | |
| 24 | 27 | import org.springframework.stereotype.Controller; |
| 25 | 28 | import org.springframework.web.bind.annotation.*; |
| 26 | 29 | |
| ... | ... | @@ -29,10 +32,7 @@ |
| 29 | 32 | import java.io.IOException; |
| 30 | 33 | import java.io.UnsupportedEncodingException; |
| 31 | 34 | import java.net.URLEncoder; |
| 32 | -import java.util.Date; | |
| 33 | -import java.util.HashMap; | |
| 34 | -import java.util.List; | |
| 35 | -import java.util.Map; | |
| 35 | +import java.util.*; | |
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * Created by riecard on 2016/10/18. |
| ... | ... | @@ -47,6 +47,9 @@ |
| 47 | 47 | private ArchiveDataServicer archiveDataServicer; |
| 48 | 48 | |
| 49 | 49 | @Autowired |
| 50 | + private AssistBuildService assistBuildService; | |
| 51 | + | |
| 52 | + @Autowired | |
| 50 | 53 | private AutoMatchFacade autoMatchFacade; |
| 51 | 54 | |
| 52 | 55 | @Autowired |
| ... | ... | @@ -132,6 +135,50 @@ |
| 132 | 135 | } else { |
| 133 | 136 | writeJson(response,"{\"errormsg\": \"没有查询到数据\",\"errorcode\": 4097}"); |
| 134 | 137 | } |
| 138 | + } | |
| 139 | + | |
| 140 | + | |
| 141 | + @RequestMapping(value = "/queryTodayArchiveList", method = RequestMethod.GET) | |
| 142 | + @ResponseBody | |
| 143 | + @TokenRequired | |
| 144 | + public BaseObjectResponse queryTodayArchiveList(HttpServletRequest request, | |
| 145 | + @RequestParam(required = false) Integer assistUserId){ | |
| 146 | + Integer userId = getUserId(request); | |
| 147 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 148 | + ArchiveDataQuery query = new ArchiveDataQuery(); | |
| 149 | + query.setHospitalId(hospitalId); | |
| 150 | + if (assistUserId != null) | |
| 151 | + { | |
| 152 | + query.setAssistUserId(String.valueOf(assistUserId)); | |
| 153 | + } | |
| 154 | + | |
| 155 | + query.setCreatedStart(DateUtil.formatDate(new Date())); | |
| 156 | + query.setCreatedEnd(DateUtil.addDay(DateUtil.formatDate(new Date()), 1)); | |
| 157 | + | |
| 158 | + List<Map> dataList = new ArrayList<>(); | |
| 159 | + | |
| 160 | + List<ArchiveData> list = archiveDataServicer.query(query, Sort.Direction.DESC,"created"); | |
| 161 | + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(list)) | |
| 162 | + { | |
| 163 | + Map param = new HashMap<>(); | |
| 164 | + for (ArchiveData archiveData : list) | |
| 165 | + { | |
| 166 | + Map map = new HashMap(); | |
| 167 | + | |
| 168 | + map.put("userName",archiveData.getName()); | |
| 169 | + map.put("cardNo",archiveData.getIdCard()); | |
| 170 | + map.put("phone",archiveData.getPhone()); | |
| 171 | + map.put("created", DateUtil.getyyyy_MM_dd_hms(archiveData.getCreated())); | |
| 172 | + | |
| 173 | + param.put("id", archiveData.getAssistUserId()); | |
| 174 | + List<AssistBuildUserModel> userModels = assistBuildService.queryAssistBuildUsers(param); | |
| 175 | + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(userModels)) { | |
| 176 | + map.put("assistUser", userModels.get(0).getUserName()); | |
| 177 | + } | |
| 178 | + dataList.add(map); | |
| 179 | + } | |
| 180 | + } | |
| 181 | + return new BaseObjectResponse().setData(dataList).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 135 | 182 | } |
| 136 | 183 | |
| 137 | 184 | @RequestMapping(value = "/bookArchive",method = RequestMethod.POST) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
6d6c854
| ... | ... | @@ -1485,11 +1485,11 @@ |
| 1485 | 1485 | ADD_SERVICE(1,"增值服务");*/ |
| 1486 | 1486 | List<Object> list = new ArrayList<>(); |
| 1487 | 1487 | Map<String, Object> resultMap = new HashMap<>(); |
| 1488 | - resultMap.put("id", 0); | |
| 1488 | + resultMap.put("id", "0"); | |
| 1489 | 1489 | resultMap.put("name", "儿保小助理"); |
| 1490 | 1490 | list.add(resultMap); |
| 1491 | 1491 | Map<String, Object> resultMap2 = new HashMap<>(); |
| 1492 | - resultMap2.put("id", 1); | |
| 1492 | + resultMap2.put("id", "1"); | |
| 1493 | 1493 | resultMap2.put("name", "精准医疗指导"); |
| 1494 | 1494 | list.add(resultMap2); |
| 1495 | 1495 | return list; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
6d6c854
| ... | ... | @@ -275,7 +275,7 @@ |
| 275 | 275 | } |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | - Patients patient = getPatientsData(yunRequest); | |
| 278 | + final Patients patient = getPatientsData(yunRequest); | |
| 279 | 279 | |
| 280 | 280 | |
| 281 | 281 | //承德市妇幼通过就诊卡号查询到病人id保存下来 |
| 282 | 282 | |
| 283 | 283 | |
| ... | ... | @@ -418,12 +418,25 @@ |
| 418 | 418 | yunBookbuildingService.addFilePath(filePath); |
| 419 | 419 | } |
| 420 | 420 | |
| 421 | + ArchiveDataQuery query = new ArchiveDataQuery(); | |
| 422 | + query.setIdCard(tempP.getCardNo()); | |
| 423 | + | |
| 424 | + List<ArchiveData> list = archiveDataServicer.query(query, Sort.Direction.DESC,"created"); | |
| 425 | + | |
| 421 | 426 | ArchiveData archiveData = new ArchiveData(); |
| 422 | 427 | archiveData.setBuildDate(new Date()); |
| 423 | - archiveData.setId(tempP.getHospitalId() +":"+tempP.getCardNo()); | |
| 428 | + archiveData.setId(tempP.getHospitalId() + ":" + tempP.getCardNo()); | |
| 424 | 429 | archiveDataServicer.update(archiveData); |
| 425 | 430 | |
| 426 | - | |
| 431 | + if (CollectionUtils.isNotEmpty(list)) | |
| 432 | + { | |
| 433 | + Patients patients = new Patients(); | |
| 434 | + if (list.get(0).getAssistUserId() != null && tempP.getId() != null) | |
| 435 | + { | |
| 436 | + patients.setAssistUserId(list.get(0).getAssistUserId()); | |
| 437 | + yunBookbuildingService.updatePregnant(patients,tempP.getId()); | |
| 438 | + } | |
| 439 | + } | |
| 427 | 440 | } |
| 428 | 441 | }); |
| 429 | 442 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
6d6c854
| ... | ... | @@ -16,6 +16,7 @@ |
| 16 | 16 | import com.lyms.platform.operate.web.result.PatientSerResult; |
| 17 | 17 | import com.lyms.platform.permission.model.*; |
| 18 | 18 | import com.lyms.platform.permission.service.*; |
| 19 | +import com.lyms.platform.pojo.AssistBuildUserModel; | |
| 19 | 20 | import com.lyms.platform.pojo.BabyModel; |
| 20 | 21 | import com.lyms.platform.pojo.BasicConfig; |
| 21 | 22 | import com.lyms.platform.pojo.Patients; |
| ... | ... | @@ -69,6 +70,9 @@ |
| 69 | 70 | |
| 70 | 71 | private static List<BasicConfig> tiRuoBasicConfigList; |
| 71 | 72 | |
| 73 | + @Autowired | |
| 74 | + private AssistBuildService assistBuildService; | |
| 75 | + | |
| 72 | 76 | public BaseResponse babyServiceInit(Integer userId) { |
| 73 | 77 | Map map = new HashMap(); |
| 74 | 78 | //服务类型 |
| ... | ... | @@ -150,6 +154,26 @@ |
| 150 | 154 | } |
| 151 | 155 | |
| 152 | 156 | map.put("hospSer", hospitalServiceContents); |
| 157 | + | |
| 158 | + | |
| 159 | + Map param = new HashMap<>(); | |
| 160 | + param.put("hospitalId", hospitalId); | |
| 161 | + | |
| 162 | + List<Map> list = new ArrayList<>(); | |
| 163 | + List<AssistBuildUserModel> userModels = assistBuildService.queryAssistBuildUsers(param); | |
| 164 | + if (CollectionUtils.isNotEmpty(userModels)) | |
| 165 | + { | |
| 166 | + for (AssistBuildUserModel model : userModels) | |
| 167 | + { | |
| 168 | + Map data = new HashMap(); | |
| 169 | + data.put("id",model.getId()); | |
| 170 | + data.put("assistUserName",model.getUserName()); | |
| 171 | + list.add(data); | |
| 172 | + } | |
| 173 | + } | |
| 174 | + | |
| 175 | + map.put("assistBuildUsers", list); | |
| 176 | + | |
| 153 | 177 | |
| 154 | 178 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(map); |
| 155 | 179 | } |