Commit 8ff864d58bd252bbc375e3372a5b2226f88e9e74
1 parent
e0d9db37d3
Exists in
master
and in
6 other branches
update code
Showing 2 changed files with 7 additions and 7 deletions
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml
View file @
8ff864d
... | ... | @@ -502,7 +502,7 @@ |
502 | 502 | |
503 | 503 | |
504 | 504 | <select id="findCouponByCode" parameterType="Map" resultType="Map"> |
505 | - SELECT c.user_id as pId,t.coupon_order as couponOrder,m.type,date_format(c.create_date,'%Y-%m-%d') as createDate from coupon_info c | |
505 | + SELECT c.create_hospital_id as createHospitalId,c.user_id as pId,t.coupon_order as couponOrder,m.type,date_format(c.create_date,'%Y-%m-%d') as createDate from coupon_info c | |
506 | 506 | INNER JOIN coupon_template t on c.coupon_template_id = t.id |
507 | 507 | INNER JOIN coupon_type m on t.type_id = m.id |
508 | 508 | where c.sequence_id = #{code} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CouponPrintController.java
View file @
8ff864d
... | ... | @@ -152,13 +152,13 @@ |
152 | 152 | Patients patient = list.get(0); |
153 | 153 | result.put("couponCode",code); //优惠劵 |
154 | 154 | result.put("createDate",couponInfo.get("createDate"));//发放时间 |
155 | - result.put("hospitalName",CommonsHelper.getHospitalName(patient.getHospitalId(), organizationService));//医院名称 | |
155 | + result.put("hospitalName",CommonsHelper.getHospitalName(couponInfo.get("createHospitalId"), organizationService));//医院名称 | |
156 | 156 | result.put("userName",patient.getUsername()); //用户名 |
157 | 157 | result.put("couponType",type.toString()); //优惠劵类型 |
158 | 158 | |
159 | 159 | String areaName = ""; |
160 | - if (org.apache.commons.lang.StringUtils.isNotEmpty(patient.getHospitalId())) { | |
161 | - Organization organization = organizationService.getOrganization(Integer.parseInt(patient.getHospitalId())); | |
160 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(couponInfo.get("createHospitalId"))) { | |
161 | + Organization organization = organizationService.getOrganization(Integer.parseInt(couponInfo.get("createHospitalId"))); | |
162 | 162 | if (organization != null && organization.getYn() == YnEnums.YES.getId()) { |
163 | 163 | String areaId = organization.getAreaId(); |
164 | 164 | BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(areaId); |
... | ... | @@ -207,7 +207,7 @@ |
207 | 207 | |
208 | 208 | Object type = couponInfo.get("type"); |
209 | 209 | //验证优惠劵是否可以使用 |
210 | - BaseObjectResponse objectResponse = couponService.validateUse(code,Integer.parseInt(type.toString()),hospitalId); | |
210 | + BaseObjectResponse objectResponse = couponService.validateUse(code, Integer.parseInt(type.toString()),hospitalId); | |
211 | 211 | if (objectResponse.getErrorcode() != ResponseCode.SUCCESS.getCode()) |
212 | 212 | { |
213 | 213 | return objectResponse; |
... | ... | @@ -248,8 +248,8 @@ |
248 | 248 | model.setSerialNumber(order == null ? "0" : order.toString()); |
249 | 249 | |
250 | 250 | String hospital = ""; |
251 | - if (org.apache.commons.lang.StringUtils.isNotEmpty(patient.getHospitalId())) { | |
252 | - Organization organization = organizationService.getOrganization(Integer.parseInt(patient.getHospitalId())); | |
251 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(couponInfo.get("createHospitalId"))) { | |
252 | + Organization organization = organizationService.getOrganization(Integer.parseInt(couponInfo.get("createHospitalId"))); | |
253 | 253 | if (organization != null && organization.getYn() == YnEnums.YES.getId()) { |
254 | 254 | hospital = organization.getName(); |
255 | 255 | String areaId = organization.getAreaId(); |