Commit 20102e3187abafb6966b602da4b88a778f245643

Authored by liquanyu
1 parent e44d79ec1f

功能修改

Showing 12 changed files with 240 additions and 23 deletions

platform-common/src/main/java/com/lyms/platform/common/Test.java View file @ 20102e3
... ... @@ -4,6 +4,7 @@
4 4  
5 5  
6 6 import java.io.*;
  7 +import java.nio.IntBuffer;
7 8 import java.util.ArrayList;
8 9 import java.util.HashMap;
9 10 import java.util.Hashtable;
10 11  
... ... @@ -15,18 +16,10 @@
15 16 public class Test {
16 17  
17 18 public static void main(String[] args) throws UnsupportedEncodingException {
18   - List<String> list = new ArrayList<>();
19   - list.add("");
20   - System.out.println(list.size());
  19 + IntBuffer ib = IntBuffer.allocate(2);
21 20  
22   -
23   - LinkedBlockingQueue map = new LinkedBlockingQueue<>();
24   - try {
25   - map.put(1);
26   - System.out.println(map.take());
27   - } catch (InterruptedException e) {
28   - e.printStackTrace();
29   - }
  21 + ib.put(1);
  22 + ib.put(3);
30 23  
31 24 }
32 25  
platform-dal/src/main/java/com/lyms/platform/pojo/MatdeliverFollowModel.java View file @ 20102e3
... ... @@ -201,6 +201,38 @@
201 201 //本人姓名
202 202 private String name;
203 203  
  204 +
  205 + //体重
  206 + private String weight;
  207 + //孕妇姓名
  208 + private String userName;
  209 + //孕妇电话
  210 + private String phone;
  211 +
  212 + public String getWeight() {
  213 + return weight;
  214 + }
  215 +
  216 + public void setWeight(String weight) {
  217 + this.weight = weight;
  218 + }
  219 +
  220 + public String getUserName() {
  221 + return userName;
  222 + }
  223 +
  224 + public void setUserName(String userName) {
  225 + this.userName = userName;
  226 + }
  227 +
  228 + public String getPhone() {
  229 + return phone;
  230 + }
  231 +
  232 + public void setPhone(String phone) {
  233 + this.phone = phone;
  234 + }
  235 +
204 236 public String getStandard() {
205 237 return standard;
206 238 }
platform-dal/src/main/java/com/lyms/platform/pojo/MaternalDeliverModel.java View file @ 20102e3
... ... @@ -205,7 +205,7 @@
205 205 private String provincePostRestId;
206 206 private String cityPostRestId;
207 207 private String areaPostRestId;
208   - private String streetRegisterId;
  208 + private String streetPostRestId;
209 209 /**
210 210 * 产妇住院病案号
211 211 */
212 212  
... ... @@ -317,12 +317,12 @@
317 317 this.gcdfDoctorId = gcdfDoctorId;
318 318 }
319 319  
320   - public String getStreetRegisterId() {
321   - return streetRegisterId;
  320 + public String getStreetPostRestId() {
  321 + return streetPostRestId;
322 322 }
323 323  
324   - public void setStreetRegisterId(String streetRegisterId) {
325   - this.streetRegisterId = streetRegisterId;
  324 + public void setStreetPostRestId(String streetPostRestId) {
  325 + this.streetPostRestId = streetPostRestId;
326 326 }
327 327  
328 328 public String getCityPostRestId() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java View file @ 20102e3
... ... @@ -264,6 +264,7 @@
264 264 public Map getOrganization(HttpServletRequest request, @RequestParam(value = "page", required = false) Integer page,
265 265 @RequestParam(value = "limit", required = false) Integer limit,
266 266 @RequestParam(value = "keyword", required = false) String keyword,
  267 + @RequestParam(value = "isHospital", required = false) String isHospital,
267 268 @RequestParam(value = "areaId", required = false) String aId) {
268 269 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
269 270 Users users = usersService.getUsers(loginState.getId());
... ... @@ -319,6 +320,21 @@
319 320 // organizationQuery.setYn(YnEnums.YES.getId());
320 321 // organizationQuery.setTypeList(list);
321 322 organizations = organizationService.queryOrganization(organizationQuery);
  323 +
  324 + if (StringUtils.isNotEmpty(isHospital))
  325 + {
  326 + List<Organization> list = new ArrayList<>();
  327 + for (Organization organization : organizations)
  328 + {
  329 + String hname = organization.getName();
  330 + if (!(hname.contains("卫生服务站") || hname.contains("卫生服务中心")))
  331 + {
  332 + list.add(organization);
  333 + }
  334 + }
  335 + organizations = list;
  336 + }
  337 +
322 338 pageInfo = organizationQuery.getPageInfo();
323 339  
324 340 } else if (null == areaId && UserTypeEnum.SUPPER_ADMIN.getId().equals(users.getType())) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java View file @ 20102e3
... ... @@ -2,6 +2,7 @@
2 2  
3 3 import com.fasterxml.jackson.annotation.JsonAlias;
4 4 import com.lyms.platform.biz.service.ArchiveDataServicer;
  5 +import com.lyms.platform.biz.service.BasicConfigService;
5 6 import com.lyms.platform.biz.service.PatientsService;
6 7 import com.lyms.platform.common.annotation.TokenRequired;
7 8 import com.lyms.platform.common.base.BaseController;
8 9  
9 10  
... ... @@ -15,13 +16,12 @@
15 16 import com.lyms.platform.common.utils.*;
16 17 import com.lyms.platform.operate.web.facade.AutoMatchFacade;
17 18 import com.lyms.platform.operate.web.facade.RemoteFacade;
18   -import com.lyms.platform.operate.web.request.PreEugenicsBaseListRequest;
19 19 import com.lyms.platform.operate.web.request.WomanBookArchiveRequest;
  20 +import com.lyms.platform.operate.web.utils.CommonsHelper;
20 21 import com.lyms.platform.permission.service.AssistBuildService;
21 22 import com.lyms.platform.pojo.*;
22 23 import com.lyms.platform.query.ArchiveDataQuery;
23 24 import com.lyms.platform.query.PatientsQuery;
24   -import net.sf.json.JSONObject;
25 25 import org.apache.commons.collections.CollectionUtils;
26 26 import org.apache.commons.httpclient.HttpClient;
27 27 import org.springframework.beans.factory.annotation.Autowired;
28 28  
... ... @@ -55,8 +55,9 @@
55 55 private MongoTemplate mongoTemplate;
56 56 @Autowired
57 57 private AssistBuildService assistBuildService;
58   -
59 58 @Autowired
  59 + private BasicConfigService basicConfigService;
  60 + @Autowired
60 61 private AutoMatchFacade autoMatchFacade;
61 62  
62 63 @Autowired
63 64  
64 65  
65 66  
... ... @@ -332,14 +333,56 @@
332 333 if(param.getCardNo() != null)
333 334 {
334 335 query.addCriteria(Criteria.where("cardNo").is(param.getCardNo()));
  336 + }
335 337  
  338 + if(param.getProvinceId() != null)
  339 + {
  340 + query.addCriteria(Criteria.where("data.provinceId").is(param.getProvinceId()));
336 341 }
  342 + if(param.getCityId() != null)
  343 + {
  344 + query.addCriteria(Criteria.where("data.cityId").is(param.getCityId()));
  345 + }
  346 + if(param.getAreaId() != null)
  347 + {
  348 + query.addCriteria(Criteria.where("data.areaId").is(param.getAreaId()));
  349 + }
  350 + if(param.getStreetId() != null)
  351 + {
  352 + query.addCriteria(Criteria.where("data.streetId").is(param.getStreetId()));
  353 + }
  354 +
337 355 query.addCriteria(Criteria.where("hospitalId").is(hospitalId));
338 356 query.with(new Sort(Sort.Direction.DESC, "created"));
339 357 long count = mongoTemplate.count(query, WomanArchive.class);
340 358 param.mysqlBuild((int) count);
341 359 query.skip(param.getOffset()).limit(param.getLimit());
342 360 List<WomanArchive> list = mongoTemplate.find(query,WomanArchive.class);
  361 + if (CollectionUtils.isNotEmpty(list))
  362 + {
  363 + for (WomanArchive womanArchive : list)
  364 + {
  365 + try
  366 + {
  367 + Map<String,Object> data = womanArchive.getData();
  368 + String provinceId = String.valueOf(data.get("provinceId"));
  369 + String cityId = String.valueOf(data.get("cityId"));
  370 + String areaId = String.valueOf(data.get("areaId"));
  371 + String streetId = String.valueOf(data.get("streetId"));
  372 + String address = String.valueOf(data.get("address"));
  373 + String liveAddress = "";
  374 + if (StringUtils.isNotEmpty(provinceId) && StringUtils.isNotEmpty(streetId))
  375 + {
  376 + liveAddress = CommonsHelper.getResidence(provinceId,cityId,areaId,streetId,address,basicConfigService);
  377 + }
  378 + data.put("liveAddress",liveAddress);
  379 + }catch (Exception e)
  380 + {
  381 +
  382 + }
  383 +
  384 + }
  385 + }
343 386 return new BaseListResponse().setData(list).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(param.getPageInfo());
344 387 }
345 388  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java View file @ 20102e3
... ... @@ -4010,7 +4010,7 @@
4010 4010 maternalDeliverModel.setProvincePostRestId(patients2.getProvincePostRestId() != null ? patients2.getProvincePostRestId() : patients2.getProvinceRegisterId());
4011 4011 maternalDeliverModel.setCityPostRestId(patients2.getCityPostRestId() != null ? patients2.getCityPostRestId() : patients2.getCityRegisterId());
4012 4012 maternalDeliverModel.setAreaPostRestId(patients2.getAreaPostRestId() != null ? patients2.getAreaPostRestId() : patients2.getAreaRegisterId());
4013   - maternalDeliverModel.setStreetRegisterId(patients2.getStreetPostRestId() != null ? patients2.getStreetPostRestId() : patients2.getStreetRegisterId());
  4013 + maternalDeliverModel.setStreetPostRestId(patients2.getStreetPostRestId() != null ? patients2.getStreetPostRestId() : patients2.getStreetRegisterId());
4014 4014 maternalDeliverModel.setAddressPostRest(patients2.getAddressPostRest() != null ? patients2.getAddressPostRest() : patients2.getAddressRegister());
4015 4015 if (maternalDeliverModel.getVisitStatus() == null) {
4016 4016 maternalDeliverModel.setVisitStatus(1);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 20102e3
... ... @@ -86,8 +86,9 @@
86 86  
87 87 @Autowired
88 88 private YunBookbuildingService yunBookbuildingService;
89   -
90 89 @Autowired
  90 + private MatDeliverService matDeliverService;
  91 + @Autowired
91 92 private BasicConfigFacade basicConfigFacade;
92 93  
93 94 @Autowired
... ... @@ -1381,6 +1382,26 @@
1381 1382 }
1382 1383 }
1383 1384 }
  1385 +
  1386 + if (patient != null)
  1387 + {
  1388 + //更新分娩记录中的产后修供养地址
  1389 + MatDeliverQuery deliverQuery = new MatDeliverQuery();
  1390 + deliverQuery.setYn(YnEnums.YES.getId());
  1391 + deliverQuery.setPid(patient.getPid());
  1392 + List<MaternalDeliverModel> maternalDeliverModels = matDeliverService.query(deliverQuery);
  1393 + if (CollectionUtils.isNotEmpty(maternalDeliverModels))
  1394 + {
  1395 + MaternalDeliverModel model = maternalDeliverModels.get(0);
  1396 + model.setProvincePostRestId(patient.getProvincePostRestId());
  1397 + model.setCityPostRestId(patient.getCityPostRestId());
  1398 + model.setAreaPostRestId(patient.getStreetPostRestId());
  1399 + model.setStreetPostRestId(patient.getProvincePostRestId());
  1400 + model.setAddressPostRest(patient.getAddressPostRest());
  1401 + matDeliverService.updateOne(model,model.getId());
  1402 + }
  1403 + }
  1404 +
1384 1405 }
1385 1406  
1386 1407  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 20102e3
... ... @@ -348,7 +348,7 @@
348 348 maternalDeliverModel.setProvincePostRestId(patients2.getProvincePostRestId() != null ? patients2.getProvincePostRestId() : patients2.getProvinceRegisterId());
349 349 maternalDeliverModel.setCityPostRestId(patients2.getCityPostRestId() != null ? patients2.getCityPostRestId() : patients2.getCityRegisterId());
350 350 maternalDeliverModel.setAreaPostRestId(patients2.getAreaPostRestId() != null ? patients2.getAreaPostRestId() : patients2.getAreaRegisterId());
351   - maternalDeliverModel.setStreetRegisterId(patients2.getStreetPostRestId() != null ? patients2.getStreetPostRestId() : patients2.getStreetRegisterId());
  351 + maternalDeliverModel.setStreetPostRestId(patients2.getStreetPostRestId() != null ? patients2.getStreetPostRestId() : patients2.getStreetRegisterId());
352 352 maternalDeliverModel.setAddressPostRest(patients2.getAddressPostRest() != null ? patients2.getAddressPostRest() : patients2.getAddressRegister());
353 353 maternalDeliverModel.setVisitStatus(PostpartumFollowMakeEnums.StatusEnum.DFS.getId());
354 354  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 20102e3
... ... @@ -7554,6 +7554,13 @@
7554 7554 babycity = getBasicConfig(organization.getCityId());
7555 7555 babydistrict = getBasicConfig(organization.getAreaId());
7556 7556 }
  7557 + if("2100001291".equals(String.valueOf(organization.getId())))
  7558 + {
  7559 + if ("高新区".equals(babydistrict))
  7560 + {
  7561 + babydistrict = "双桥区";
  7562 + }
  7563 + }
7557 7564  
7558 7565 //新生儿出生地(省)
7559 7566 map.put("babyprovince", babyprovince);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/MatDeliverFollowAddRequest.java View file @ 20102e3
... ... @@ -26,6 +26,10 @@
26 26 * 分娩日期
27 27 */
28 28 private Date deliveryDateStr;
  29 + //孕妇姓名
  30 + private String userName;
  31 + //孕妇电话
  32 + private String phone;
29 33 /**
30 34 * 分娩记录id
31 35 */
... ... @@ -155,6 +159,8 @@
155 159 * 伤口
156 160 */
157 161 private Integer wound;
  162 + //体重
  163 + private String weight;
158 164 /**
159 165 * 其他
160 166 */
... ... @@ -210,6 +216,7 @@
210 216 //本人姓名
211 217 private String name;
212 218  
  219 +
213 220 /**
214 221 * 具体转换实现
215 222 *
... ... @@ -236,6 +243,30 @@
236 243 matdeliverFollowModel.setStandard(standard);
237 244 matdeliverFollowModel.setName(name);
238 245 return matdeliverFollowModel;
  246 + }
  247 +
  248 + public String getUserName() {
  249 + return userName;
  250 + }
  251 +
  252 + public void setUserName(String userName) {
  253 + this.userName = userName;
  254 + }
  255 +
  256 + public String getPhone() {
  257 + return phone;
  258 + }
  259 +
  260 + public void setPhone(String phone) {
  261 + this.phone = phone;
  262 + }
  263 +
  264 + public String getWeight() {
  265 + return weight;
  266 + }
  267 +
  268 + public void setWeight(String weight) {
  269 + this.weight = weight;
239 270 }
240 271  
241 272 public String getStandard() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/WomanBookArchiveRequest.java View file @ 20102e3
... ... @@ -6,6 +6,42 @@
6 6 private String createTime;//预约时间
7 7 private String cardNo;//身份证号
8 8 private String type;//检查类型
  9 + private String provinceId;
  10 + private String cityId;
  11 + private String areaId;
  12 + private String streetId;
  13 +
  14 + public String getProvinceId() {
  15 + return provinceId;
  16 + }
  17 +
  18 + public void setProvinceId(String provinceId) {
  19 + this.provinceId = provinceId;
  20 + }
  21 +
  22 + public String getCityId() {
  23 + return cityId;
  24 + }
  25 +
  26 + public void setCityId(String cityId) {
  27 + this.cityId = cityId;
  28 + }
  29 +
  30 + public String getAreaId() {
  31 + return areaId;
  32 + }
  33 +
  34 + public void setAreaId(String areaId) {
  35 + this.areaId = areaId;
  36 + }
  37 +
  38 + public String getStreetId() {
  39 + return streetId;
  40 + }
  41 +
  42 + public void setStreetId(String streetId) {
  43 + this.streetId = streetId;
  44 + }
9 45  
10 46 public String getCreateTime() {
11 47 return createTime;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MatdeliverFollowResult.java View file @ 20102e3
... ... @@ -140,6 +140,13 @@
140 140 */
141 141 private String updateUserStr;
142 142  
  143 + //体重
  144 + private String weight;
  145 + //孕妇姓名
  146 + private String userName;
  147 + //孕妇电话
  148 + private String phone;
  149 +
143 150 public MatdeliverFollowResult convertToResult(MatdeliverFollowModel matdeliverFollowModel) {
144 151 BeanUtils.copy(matdeliverFollowModel, this);
145 152 if (matdeliverFollowModel.getMakeCreateDate() != null) {
... ... @@ -292,6 +299,37 @@
292 299 }
293 300  
294 301 return this;
  302 + }
  303 +
  304 +
  305 + @Override
  306 + public String getWeight() {
  307 + return weight;
  308 + }
  309 +
  310 + @Override
  311 + public void setWeight(String weight) {
  312 + this.weight = weight;
  313 + }
  314 +
  315 + @Override
  316 + public String getUserName() {
  317 + return userName;
  318 + }
  319 +
  320 + @Override
  321 + public void setUserName(String userName) {
  322 + this.userName = userName;
  323 + }
  324 +
  325 + @Override
  326 + public String getPhone() {
  327 + return phone;
  328 + }
  329 +
  330 + @Override
  331 + public void setPhone(String phone) {
  332 + this.phone = phone;
295 333 }
296 334  
297 335 @Override