Commit bf301aee433d4a3dbe5b43236d8ec775a9ac67a7
1 parent
bbc2c94c56
Exists in
dev
增加调用孕产婴平台开通服务逻辑
Showing 6 changed files with 86 additions and 3 deletions
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/OrderController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsOrderRefund.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsOrderService.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/HisPatientsAutoUploadTask.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/util/Constant.java
- talkonlineweb/src/main/resources/mapper/LymsOrderRefundMapper.xml
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/OrderController.java
View file @
bf301ae
| ... | ... | @@ -70,6 +70,12 @@ |
| 70 | 70 | @Value("${notify.url}") |
| 71 | 71 | private String notifyUrl; |
| 72 | 72 | |
| 73 | + /** | |
| 74 | + * 孕产婴平台地址 | |
| 75 | + */ | |
| 76 | + @Value("${platform.url}") | |
| 77 | + private String platformUrl; | |
| 78 | + | |
| 73 | 79 | @GetMapping("/queryGoods") |
| 74 | 80 | public BaseResponse getGoods(String type){ |
| 75 | 81 | QueryWrapper<LymsGoods> queryWrapper = new QueryWrapper<>(); |
| 76 | 82 | |
| ... | ... | @@ -383,8 +389,30 @@ |
| 383 | 389 | //再次查询 |
| 384 | 390 | lymsOrders = lymsOrderService.getOne(lymsOrderWrapper); |
| 385 | 391 | boolean flag = lymsOrderService.handleOrder(lymsOrders,true); |
| 392 | + final Integer pid = lymsOrders.getPid(); | |
| 393 | + final Integer cnt = lymsOrders.getCnt(); | |
| 394 | + final Integer pcid = lymsOrders.getPcid(); | |
| 386 | 395 | if (flag) |
| 387 | 396 | { |
| 397 | + //调用开通孕产婴系统的服务 | |
| 398 | + new Thread(()->{ | |
| 399 | + try{ | |
| 400 | + LymsPatient patient = lymsPatientService.getById(pid); | |
| 401 | + Map<String,Object> map = new HashMap<>(); | |
| 402 | + map.put("idno",patient.getIdno()); | |
| 403 | + map.put("name",patient.getPname()); | |
| 404 | + map.put("weeks",cnt*4); | |
| 405 | + map.put("renew",pcid == null ? 0 : 1); | |
| 406 | + log.info("自动开通服务参数:{}",JsonUtil.obj2Str(map)); | |
| 407 | + String resposne = HttpUtil.doGetPost(platformUrl + Constant.PLATFORM_AUTO_OPEN_SERVICE_URL, "POST", map); | |
| 408 | + log.info("自动开通服务结果:{}",resposne); | |
| 409 | + | |
| 410 | + }catch (Exception e){ | |
| 411 | + log.error("自动开通服务异常",e); | |
| 412 | + } | |
| 413 | + | |
| 414 | + }).start(); | |
| 415 | + | |
| 388 | 416 | result.put("return_code","SUCCESS"); |
| 389 | 417 | result.put("return_msg","OK"); |
| 390 | 418 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsOrderRefund.java
View file @
bf301ae
| ... | ... | @@ -36,18 +36,33 @@ |
| 36 | 36 | @TableField(value = "orderno") |
| 37 | 37 | private String orderno; |
| 38 | 38 | |
| 39 | + /** | |
| 40 | + * 退费订单号 | |
| 41 | + */ | |
| 39 | 42 | @TableField(value = "out_fund_no") |
| 40 | 43 | private String outFundNo; |
| 41 | 44 | |
| 45 | + /** | |
| 46 | + * 退费原因 | |
| 47 | + */ | |
| 42 | 48 | @TableField(value = "reason") |
| 43 | 49 | private String reason; |
| 44 | 50 | |
| 51 | + /** | |
| 52 | + * 可退费金额 | |
| 53 | + */ | |
| 45 | 54 | @TableField(value = "can_return_money") |
| 46 | 55 | private Integer canReturnMoney; |
| 47 | 56 | |
| 57 | + /** | |
| 58 | + * 实际退费金额 | |
| 59 | + */ | |
| 48 | 60 | @TableField(value = "real_return_money") |
| 49 | 61 | private Integer realReturnMoney; |
| 50 | 62 | |
| 63 | + /** | |
| 64 | + * 备注 | |
| 65 | + */ | |
| 51 | 66 | @TableField(value = "remark") |
| 52 | 67 | private String remark; |
| 53 | 68 |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsOrderService.java
View file @
bf301ae
talkonlineweb/src/main/java/com/lyms/talkonlineweb/task/HisPatientsAutoUploadTask.java
View file @
bf301ae
talkonlineweb/src/main/java/com/lyms/talkonlineweb/util/Constant.java
View file @
bf301ae
| ... | ... | @@ -92,7 +92,14 @@ |
| 92 | 92 | public static final String GZ_SECRET_CS ="1c4b5543a54c74dd363a6655ca1cbffe"; |
| 93 | 93 | |
| 94 | 94 | |
| 95 | - | |
| 95 | + /** | |
| 96 | + * 获取孕产婴系统孕周或高危疾病名称接口地址 | |
| 97 | + */ | |
| 96 | 98 | public static String PLATFORM_QUERY_PREGNANT_URL = "/patientDueWeekAndRisk"; |
| 99 | + | |
| 100 | + /** | |
| 101 | + * 自动开通孕产婴精准医疗服务和围产小助理服务 | |
| 102 | + */ | |
| 103 | + public static String PLATFORM_AUTO_OPEN_SERVICE_URL = "/yxzh/patSer"; | |
| 97 | 104 | } |
talkonlineweb/src/main/resources/mapper/LymsOrderRefundMapper.xml
View file @
bf301ae
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper | |
| 3 | + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
| 4 | + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 5 | +<mapper namespace="com.lyms.talkonlineweb.mapper.LymsOrderMapper"> | |
| 6 | + | |
| 7 | + <resultMap id="BaseResultMap" type="com.lyms.talkonlineweb.domain.LymsOrderRefund"> | |
| 8 | + <id property="id" column="id" jdbcType="INTEGER"/> | |
| 9 | + <result property="orderno" column="orderno" jdbcType="VARCHAR"/> | |
| 10 | + <result property="pid" column="pid" jdbcType="INTEGER"/> | |
| 11 | + <result property="pcid" column="pcid" jdbcType="INTEGER"/> | |
| 12 | + <result property="gid" column="gid" jdbcType="INTEGER"/> | |
| 13 | + <result property="price" column="price" jdbcType="INTEGER"/> | |
| 14 | + <result property="cnt" column="cnt" jdbcType="INTEGER"/> | |
| 15 | + <result property="amount" column="amount" jdbcType="INTEGER"/> | |
| 16 | + <result property="status" column="status" jdbcType="INTEGER"/> | |
| 17 | + <result property="payorderid" column="payorderid" jdbcType="VARCHAR"/> | |
| 18 | + <result property="transactionId" column="transaction_id" jdbcType="VARCHAR"/> | |
| 19 | + <result property="openid" column="openid" jdbcType="VARCHAR"/> | |
| 20 | + <result property="serviceStartTime" column="service_start_time" jdbcType="TIMESTAMP"/> | |
| 21 | + <result property="serviceEndTime" column="service_end_time" jdbcType="TIMESTAMP"/> | |
| 22 | + <result property="refundStatus" column="refund_status" jdbcType="INTEGER"/> | |
| 23 | + <result property="payTime" column="pay_time" jdbcType="TIMESTAMP"/> | |
| 24 | + | |
| 25 | + <result property="createdby" column="createdby" jdbcType="INTEGER"/> | |
| 26 | + <result property="createdtime" column="createdtime" jdbcType="TIMESTAMP"/> | |
| 27 | + <result property="updatedby" column="updatedby" jdbcType="INTEGER"/> | |
| 28 | + <result property="updatedtime" column="updatedtime" jdbcType="TIMESTAMP"/> | |
| 29 | + | |
| 30 | + </resultMap> | |
| 31 | + | |
| 32 | + | |
| 33 | +</mapper> |