Commit 8da9119f5e749cc28c94f617375fdd9cb35cef4c
1 parent
50bac61d5d
Exists in
master
and in
6 other branches
3.0、2.0建档代码
Showing 2 changed files with 45 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java
View file @
8da9119
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 | import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade; |
14 | 14 | import com.lyms.platform.operate.web.facade.BookbuildingFacade; |
15 | 15 | import com.lyms.platform.operate.web.request.*; |
16 | +import net.sf.json.JSONObject; | |
16 | 17 | import org.apache.commons.httpclient.HttpClient; |
17 | 18 | import org.springframework.beans.factory.annotation.Autowired; |
18 | 19 | import org.springframework.stereotype.Controller; |
... | ... | @@ -124,7 +125,15 @@ |
124 | 125 | if (param != null && !StringUtils.isEmpty(param.getId()) ) { |
125 | 126 | return bookbuildingFacade.updatePregnantByIdV2(param.getId(), param, param.getUserId(), false); |
126 | 127 | } |
127 | - return bookbuildingFacade.createOrUpdateYunBuildV2(param, param.getUserId(), false); | |
128 | + | |
129 | + return bookbuildingFacade.addPregnantBookbuilding(param, Integer.parseInt(param.getBookbuildingDoctor()), false); | |
130 | + } | |
131 | + //测试 | |
132 | + @RequestMapping(method = RequestMethod.POST, value = "/testv2url") | |
133 | + @ResponseBody | |
134 | + public BaseResponse sync_to_v2_url( @RequestBody JSONObject param) { | |
135 | + System.out.println(param); | |
136 | + return new BaseResponse(param.toString(), 666); | |
128 | 137 | } |
129 | 138 | |
130 | 139 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
8da9119
... | ... | @@ -724,7 +724,7 @@ |
724 | 724 | HttpHeaders headers = new HttpHeaders(); |
725 | 725 | headers.setContentType(MediaType.APPLICATION_JSON); |
726 | 726 | JSONObject jsonObject = getQueryParam(patients); |
727 | - String result = restTemplate.postForObject(syncToV2Url + "/李晓东提供", jsonObject, String.class); | |
727 | + String result = restTemplate.postForObject(syncToV2Url + "/testv2url", jsonObject, String.class); | |
728 | 728 | logger.info("建档数据同步到2.0系统,返回结果: {}", result); |
729 | 729 | } |
730 | 730 | }); |
731 | 731 | |
732 | 732 | |
... | ... | @@ -744,13 +744,44 @@ |
744 | 744 | */ |
745 | 745 | private JSONObject getQueryParam(Patients patients) { |
746 | 746 | JSONObject jsonObject = new JSONObject(64); |
747 | - | |
748 | 747 | // TODO 2019/6/5 13:21 dongqing 数据组装 |
749 | 748 | jsonObject.put("id", patients.getId()); |
750 | - | |
749 | + jsonObject.put("P_NAME", patients.getUsername());//姓名 | |
750 | + jsonObject.put("P_CARDTYPE", patients.getPcerteTypeId());//证件类别 | |
751 | + jsonObject.put("P_CARDNO", patients.getCardNo());//证件号码 | |
752 | + jsonObject.put("P_BIRTHDAY", patients.getBirth());//出生日期 | |
753 | + jsonObject.put("P_COUNTRY", patients.getPcountryId());//国籍 | |
754 | + jsonObject.put("P_NATION", patients.getPnationId());//民族 | |
755 | + jsonObject.put("P_MOBILEPHONE", patients.getPhone());//联系电话 | |
756 | + jsonObject.put("P_UNITWORK", patients.getPworkUnit());//工作单位 | |
757 | + jsonObject.put("P_RRPROVINCE", patients.getProvinceId());//户口——省 | |
758 | + jsonObject.put("P_RRCITY", patients.getCityId());//户口——市 | |
759 | + jsonObject.put("P_RRCOUNTY", patients.getAreaId());//户口——区县 | |
760 | + jsonObject.put("P_RRSTREET", patients.getStreetId());//户口——街道 | |
761 | + jsonObject.put("P_ADDRESSPROVINCE", patients.getProvinceRegisterId());//省份 | |
762 | + jsonObject.put("P_ADDRESSCITY", patients.getCityRegisterId());//城市 | |
763 | + jsonObject.put("P_ADDRESSCOUNTY", patients.getAreaRegisterId());//县 | |
764 | + jsonObject.put("P_ADDRESSSTREET", patients.getStreetRegisterId());//街道 | |
765 | + jsonObject.put("P_POSTPARTUMPROVINCE", patients.getProvincePostRestId());//产后——省 | |
766 | + jsonObject.put("P_POSTPARTUMCITY", patients.getCityPostRestId());//产后——市 | |
767 | + jsonObject.put("P_POSTPARTUMCOUNTY", patients.getAreaPostRestId());//产后——区县 | |
768 | + jsonObject.put("P_POSTPARTUMSTREET", patients.getStreetPostRestId());//产后——街道 | |
769 | +// jsonObject.put("P_RESIDETYPE", patients.getId());//居住类别(0:本地 1:非本地居住一年以下 2:非本地居住一年以上) | |
770 | +// jsonObject.put("P_ACCOUNTTYPE", patients.getId());//户口类别(0:非农业户口 1:农业户口) | |
771 | + jsonObject.put("P_HUSBANDNAME", patients.getHusbandName());//丈夫姓名 | |
772 | + jsonObject.put("P_HUSBANDCARDTYPE", patients.getHcertificateTypeId());//丈夫证件类型 | |
773 | + jsonObject.put("P_HUSBANDCARDNO", patients.getHusbandBirth());//丈夫证件号码 | |
774 | + jsonObject.put("P_HUSBANDBIRTHDAY", patients.getHusbandBirth());//丈夫出生日期 | |
775 | + jsonObject.put("P_HUSBANDCOUNTRY", patients.getHcountryId());//丈夫国籍 | |
776 | + jsonObject.put("P_HUSBANDNATION", patients.getHnationId());//丈夫民族 | |
777 | + jsonObject.put("P_HUSBANDMOBILEPHONE", patients.getHusbandPhone());//丈夫联系电话 | |
778 | + jsonObject.put("P_HUSBANDUNITWORK", patients.getHworkUnit());//丈夫工作单位 | |
779 | + jsonObject.put("P_HUSBANDRRPROVINCE", patients.getHprovinceRegisterId());//丈夫户口所在地 省 | |
780 | + jsonObject.put("P_HUSBANDRRCITY", patients.getHcityRegisterId());//丈夫户口所在地 市 | |
781 | + jsonObject.put("P_HUSBANDRRCOUNTY", patients.getHareaRegisterId());//丈夫户口所在地 县 | |
782 | + jsonObject.put("P_HUSBANDRRSTREET", patients.getHstreetRegisterId());//丈夫户口所在地 街道 | |
751 | 783 | return jsonObject; |
752 | 784 | } |
753 | - | |
754 | 785 | /** |
755 | 786 | * 创建孕妇建档推送消息 |
756 | 787 | */ |