Commit 7a198313cc97457ac5ed50999065500d7b8cf977
1 parent
bc2d17a75c
Exists in
master
and in
6 other branches
产筛优惠劵
Showing 2 changed files with 32 additions and 7 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
7a19831
| ... | ... | @@ -4,17 +4,13 @@ |
| 4 | 4 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 5 | 5 | import com.lyms.platform.common.enums.*; |
| 6 | 6 | import com.lyms.platform.common.exception.BusinessException; |
| 7 | -import com.lyms.platform.common.result.BaseListResponse; | |
| 8 | -import com.lyms.platform.common.result.BaseObjectResponse; | |
| 9 | -import com.lyms.platform.common.result.BaseResponse; | |
| 7 | +import com.lyms.platform.common.result.*; | |
| 10 | 8 | import com.lyms.platform.common.utils.*; |
| 11 | 9 | import com.lyms.platform.operate.web.request.*; |
| 12 | 10 | import com.lyms.platform.operate.web.result.*; |
| 13 | 11 | import com.lyms.platform.operate.web.utils.FunvCommonUtil; |
| 14 | -import com.lyms.platform.permission.model.Organization; | |
| 15 | -import com.lyms.platform.permission.model.OrganizationQuery; | |
| 16 | -import com.lyms.platform.permission.model.PatientService; | |
| 17 | -import com.lyms.platform.permission.model.Users; | |
| 12 | +import com.lyms.platform.permission.model.*; | |
| 13 | +import com.lyms.platform.permission.service.CouponService; | |
| 18 | 14 | import com.lyms.platform.permission.service.OrganizationService; |
| 19 | 15 | import com.lyms.platform.permission.service.UsersService; |
| 20 | 16 | import com.lyms.platform.pojo.*; |
| ... | ... | @@ -71,6 +67,9 @@ |
| 71 | 67 | @Autowired |
| 72 | 68 | private PatientServiceFacade patientServiceFacade; |
| 73 | 69 | |
| 70 | + @Autowired | |
| 71 | + private CouponService couponService; | |
| 72 | + | |
| 74 | 73 | //添加回执单 |
| 75 | 74 | public BaseResponse addReferralReceipt(ReferralReceiptRequest referralReceipt) { |
| 76 | 75 | ReferralApplyOrderModel referralApplyOrderModel = new ReferralApplyOrderModel(); |
| ... | ... | @@ -442,6 +441,12 @@ |
| 442 | 441 | sieveModel.setHospitalId(orderModel.getHospitalId()); |
| 443 | 442 | SieveService.handOrder(sieveModel); |
| 444 | 443 | sieveService.addChanQianSieve(sieveModel); |
| 444 | + | |
| 445 | + /** 改为已使用状态 */ | |
| 446 | + if (StringUtils.isNotBlank(sieveApplyOrderAddRequest.getCouponCode())) { | |
| 447 | + couponService.use(hospitalId, sieveApplyOrderAddRequest.getCouponCode(), userId, sieveModel.getId()); | |
| 448 | + } | |
| 449 | + | |
| 445 | 450 | operateLogFacade.addAddOptLog(userId, Integer.parseInt(hospitalId), sieveModel, OptActionEnums.ADD.getId(), "增加产筛申请单"); |
| 446 | 451 | } |
| 447 | 452 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveApplyOrderAddRequest.java
View file @
7a19831
| ... | ... | @@ -83,6 +83,11 @@ |
| 83 | 83 | //月经周期 |
| 84 | 84 | private Map<String,String> mensesWeek; |
| 85 | 85 | |
| 86 | + //优惠劵码 | |
| 87 | + private String couponCode; | |
| 88 | + | |
| 89 | + private Integer couponType; | |
| 90 | + | |
| 86 | 91 | @Override |
| 87 | 92 | public SieveApplyOrderModel convertToDataModel() { |
| 88 | 93 | SieveApplyOrderModel sieveApplyOrderModel = new SieveApplyOrderModel(); |
| ... | ... | @@ -114,6 +119,21 @@ |
| 114 | 119 | return sieveApplyOrderModel; |
| 115 | 120 | } |
| 116 | 121 | |
| 122 | + public Integer getCouponType() { | |
| 123 | + return couponType; | |
| 124 | + } | |
| 125 | + | |
| 126 | + public void setCouponType(Integer couponType) { | |
| 127 | + this.couponType = couponType; | |
| 128 | + } | |
| 129 | + | |
| 130 | + public String getCouponCode() { | |
| 131 | + return couponCode; | |
| 132 | + } | |
| 133 | + | |
| 134 | + public void setCouponCode(String couponCode) { | |
| 135 | + this.couponCode = couponCode; | |
| 136 | + } | |
| 117 | 137 | |
| 118 | 138 | public Map<String, String> getMensesDay() { |
| 119 | 139 | return mensesDay; |