Commit 3f6dd5df81eef2efa3af8db6d3990626d3328107
1 parent
2d84b68032
Exists in
master
and in
6 other branches
update code
Showing 3 changed files with 34 additions and 4 deletions
platform-biz-service/src/main/resources/mainOrm/master/MeasureInfoMapper.xml
View file @
3f6dd5d
| ... | ... | @@ -29,19 +29,19 @@ | 
| 29 | 29 | INSERT INTO measure_info(user_name,cert_type, | 
| 30 | 30 | cert_no,age,phone,sex,vc_card_no, | 
| 31 | 31 | value_one,value_two,value_type,record_time,wx_code | 
| 32 | - ,record_count,open_id,created,modified) | |
| 32 | + ,record_count,open_id,created,modified,hospital_id) | |
| 33 | 33 | VALUES (#{userName},#{certType}, | 
| 34 | 34 | #{certNo},#{age},#{phone},#{sex} | 
| 35 | 35 | ,#{vcCardNo},#{valueOne} | 
| 36 | 36 | ,#{valueTwo},#{valueType},#{recordTime}, | 
| 37 | - #{wxCode},#{recordCount},#{openId},#{created},#{modified}) | |
| 37 | + #{wxCode},#{recordCount},#{openId},#{created},#{modified},#{hospitalId}) | |
| 38 | 38 | </insert> | 
| 39 | 39 | |
| 40 | 40 | <select id="queryMeasureInfoList" parameterType="com.lyms.platform.query.MeasureInfoQuery" resultMap="measureInfoModelMap"> | 
| 41 | 41 | SELECT id,user_name,cert_type, | 
| 42 | 42 | cert_no,age,phone,sex,vc_card_no, | 
| 43 | 43 | value_one,value_two,value_type,record_time,wx_code | 
| 44 | - ,record_count,open_id,created,modified | |
| 44 | + ,record_count,open_id,created,modified,hospital_id | |
| 45 | 45 | FROM measure_info | 
| 46 | 46 | |
| 47 | 47 | <include refid="queryMeasureInfoCondition"/> | 
| ... | ... | @@ -102,6 +102,9 @@ | 
| 102 | 102 | </if> | 
| 103 | 103 | <if test="openId != null and openId != ''"> | 
| 104 | 104 | open_id = #{openId,jdbcType=VARCHAR}, | 
| 105 | + </if> | |
| 106 | + <if test="hospitalId != null and hospitalId != ''"> | |
| 107 | + hospital_id = #{hospitalId,jdbcType=VARCHAR}, | |
| 105 | 108 | </if> | 
| 106 | 109 | <if test="created != null"> | 
| 107 | 110 | created = #{created}, | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
View file @
3f6dd5d
| ... | ... | @@ -4,11 +4,14 @@ | 
| 4 | 4 | import com.lyms.platform.biz.service.DataPermissionService; | 
| 5 | 5 | import com.lyms.platform.common.constants.ErrorCodeConstants; | 
| 6 | 6 | import com.lyms.platform.common.enums.SexEnum; | 
| 7 | +import com.lyms.platform.common.enums.YnEnums; | |
| 7 | 8 | import com.lyms.platform.common.result.BaseListResponse; | 
| 8 | 9 | import com.lyms.platform.common.result.BaseResponse; | 
| 9 | 10 | import com.lyms.platform.common.utils.DateUtil; | 
| 10 | 11 | import com.lyms.platform.operate.web.request.MeasureInfoRequest; | 
| 11 | 12 | import com.lyms.platform.operate.web.result.MeasureInfoResult; | 
| 13 | +import com.lyms.platform.permission.model.Organization; | |
| 14 | +import com.lyms.platform.permission.service.OrganizationService; | |
| 12 | 15 | import com.lyms.platform.pojo.BasicConfig; | 
| 13 | 16 | import com.lyms.platform.pojo.DataPermissionsModel; | 
| 14 | 17 | import com.lyms.platform.pojo.MeasureInfoModel; | 
| ... | ... | @@ -33,6 +36,9 @@ | 
| 33 | 36 | private DataPermissionService dataPermissionService; | 
| 34 | 37 | |
| 35 | 38 | @Autowired | 
| 39 | + private OrganizationService organizationService; | |
| 40 | + | |
| 41 | + @Autowired | |
| 36 | 42 | private BasicConfigService basicConfigService; | 
| 37 | 43 | |
| 38 | 44 | public BaseListResponse queryMeasureInfoList(String queryNo, | 
| ... | ... | @@ -44,7 +50,6 @@ | 
| 44 | 50 | DataPermissionsModelQuery dataPermissionsModelQuery = new DataPermissionsModelQuery(); | 
| 45 | 51 | dataPermissionsModelQuery.setUserId(userId); | 
| 46 | 52 | |
| 47 | - | |
| 48 | 53 | List<String> hospitalList = new ArrayList<>(); | 
| 49 | 54 | |
| 50 | 55 | List<DataPermissionsModel> permissionsModels = dataPermissionService.queryPermission(dataPermissionsModelQuery); | 
| ... | ... | @@ -58,6 +63,7 @@ | 
| 58 | 63 | } | 
| 59 | 64 | } | 
| 60 | 65 | } | 
| 66 | + System.out.println(hospitalList); | |
| 61 | 67 | |
| 62 | 68 | List<MeasureInfoResult> results = new ArrayList<>(); | 
| 63 | 69 | MeasureInfoQuery query = new MeasureInfoQuery(); | 
| ... | ... | @@ -109,6 +115,15 @@ | 
| 109 | 115 | result.setVcCardNo(model.getVcCardNo() == null ? "--" : model.getVcCardNo()); | 
| 110 | 116 | result.setWxXode(model.getWxCode()); | 
| 111 | 117 | result.setPhone(model.getPhone()); | 
| 118 | + | |
| 119 | + String hospital = ""; | |
| 120 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(result.getHospitalId())) { | |
| 121 | + Organization organization = organizationService.getOrganization(Integer.parseInt(result.getHospitalId())); | |
| 122 | + if (organization != null && organization.getYn() == YnEnums.YES.getId()) { | |
| 123 | + hospital = organization.getName(); | |
| 124 | + } | |
| 125 | + } | |
| 126 | + result.setHospitalName(hospital); | |
| 112 | 127 | results.add(result); | 
| 113 | 128 | } | 
| 114 | 129 | } | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MeasureInfoResult.java
View file @
3f6dd5d
| ... | ... | @@ -36,6 +36,18 @@ | 
| 36 | 36 | //手机号码 | 
| 37 | 37 | private String phone; | 
| 38 | 38 | |
| 39 | + //医院名称 | |
| 40 | + private String hospitalName; | |
| 41 | + | |
| 42 | + | |
| 43 | + public String getHospitalName() { | |
| 44 | + return hospitalName; | |
| 45 | + } | |
| 46 | + | |
| 47 | + public void setHospitalName(String hospitalName) { | |
| 48 | + this.hospitalName = hospitalName; | |
| 49 | + } | |
| 50 | + | |
| 39 | 51 | public String getPhone() { | 
| 40 | 52 | return phone; | 
| 41 | 53 | } |