瀏覽代碼

fix:580医院对接 部分bug

zhangqin 4 周之前
父節點
當前提交
c4161a5dd2

+ 5 - 4
fs-service/src/main/java/com/fs/hospital580/dto/DiseaseDto.java

@@ -1,17 +1,18 @@
 package com.fs.hospital580.dto;
 
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.io.Serializable;
-import java.util.List;
 
+@EqualsAndHashCode(callSuper = true)
 @Data
 public class DiseaseDto extends CommonDto implements Serializable {
 
-    private String type;                // 诊断类型(0为西医诊断,1为中医诊断)
+    private Integer type;                // 诊断类型(0为西医诊断,1为中医诊断)
     private String diagnosisName;                // 诊断名称
-    private String pageNum;                // 分页参数起始页1开始
-    private String pageSiz;                // 分页参数每页条数
+    private Integer pageNum;                // 分页参数起始页1开始
+    private Integer pageSize;                // 分页参数每页条数
 
 
 }

+ 2 - 2
fs-service/src/main/java/com/fs/hospital580/dto/Medicine.java

@@ -7,7 +7,7 @@ import java.math.BigDecimal;
 
 @Data
 public class Medicine implements Serializable {
-    private Integer categoryId;         // 药品分类:0为西药,1为中成药,3为其他
+    private Integer categoryId = 0;         // 药品分类:0为西药,1为中成药,3为其他
     private String commonName;          // 通用名
     private String name;                // 商品名
     private String dosage;              // 剂型
@@ -19,7 +19,7 @@ public class Medicine implements Serializable {
     private String medicineId;          // 第三方药品编码(唯一)
     private String barCode;             // 商品条形码值
     private Integer isPrescription;     // 是否处方药(0为是,1为否)
-    private BigDecimal price;               // 价格
+    private String price;               // 价格
     private Long stock;              // 库存
     private String specialCommonName;   // 特殊通用名
     private String specialSpec;         // 特殊规格

+ 2 - 2
fs-service/src/main/java/com/fs/hospital580/dto/PreDemandDto.java

@@ -1,16 +1,16 @@
 package com.fs.hospital580.dto;
 
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.io.Serializable;
 import java.util.List;
 
+@EqualsAndHashCode(callSuper = true)
 @Data
 public class PreDemandDto extends CommonDto implements Serializable {
 
     private String memberId;                // 第三方系统问诊人唯一标识(一般为患者手机号)
-    private String openid;                  // 用户对应小程序或者公众号的openid
-    private String headimgurl;              // 第三方系统问诊人头像
     private Integer storeId;                // 门店ID(由580提供,每个三方对应值不一样)
     private Integer serviceType;            // 服务类型,0为图文,1为视频
     private Integer isExamine;              // 是否需要审方(0为不需要,1为需要)

+ 0 - 8
fs-service/src/main/java/com/fs/hospital580/entity/FsStoreHospital580OrderScrmEntity.java

@@ -37,14 +37,6 @@ public class FsStoreHospital580OrderScrmEntity extends Model<FsStoreHospital580O
     @TableField("member_id")
     private String memberId;
 
-    @ApiModelProperty("用户对应小程序或公众号的openid")
-    @TableField("openid")
-    private String openid;
-
-    @ApiModelProperty("第三方系统问诊人头像")
-    @TableField("headimgurl")
-    private String headimgurl;
-
     @ApiModelProperty("用户id")
     @TableField("user_id")
     private Long userId;

+ 8 - 1
fs-service/src/main/java/com/fs/hospital580/mapper/MedicineMapper.java

@@ -7,6 +7,8 @@ import org.mapstruct.Mapping;
 import org.mapstruct.Named;
 import org.mapstruct.factory.Mappers;
 
+import java.math.BigDecimal;
+
 @Mapper
 public interface MedicineMapper {
 
@@ -24,7 +26,7 @@ public interface MedicineMapper {
     @Mapping(source = "productId", target = "medicineId", qualifiedByName = "longToString")
     @Mapping(source = "barCode", target = "barCode")
     @Mapping(source = "productType", target = "isPrescription")
-    @Mapping(source = "price", target = "price")
+    @Mapping(source = "price", target = "price",qualifiedByName = "bigDecimalToString")
     @Mapping(source = "stock", target = "stock")
     Medicine toMedicine(FsStoreProductScrm product);
 
@@ -35,4 +37,9 @@ public interface MedicineMapper {
     default String longToString(Long value) {
         return value != null ? String.valueOf(value) : null;
     }
+
+    @Named("bigDecimalToString")
+    default String bigDecimalToString(BigDecimal value) {
+        return value != null ? value.toString() : null;
+    }
 }

+ 6 - 0
fs-service/src/main/java/com/fs/hospital580/service/impl/Hospital580ServiceImpl.java

@@ -10,6 +10,8 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import java.time.LocalDateTime;
+
 @Service
 @Slf4j
 public class Hospital580ServiceImpl implements Hospital580Service {
@@ -19,6 +21,8 @@ public class Hospital580ServiceImpl implements Hospital580Service {
     private String CLIENTID;
     @Value("${hospital580.secretKey:''}")
     private String SECRETKEY;
+    @Value("${hospital580.storeId:''}")
+    private Integer storeId;
     /**
      * 4.7 同步药品信息接口-580提供
      */
@@ -41,6 +45,7 @@ public class Hospital580ServiceImpl implements Hospital580Service {
 
     @Override
     public Result580 initPreDemand(PreDemandDto dto) {
+        dto.setStoreId(storeId);
         return requestResult580(dto, PREDEMAND_PATH);
     }
 
@@ -78,6 +83,7 @@ public class Hospital580ServiceImpl implements Hospital580Service {
                 .requestParm(body)
                 .response(result)
                 .requestStatus(requestStatus)
+                .createTime(LocalDateTime.now())
                 .build();
         build.insert();
         result580.setRequestId(build.getId());

+ 12 - 0
fs-service/src/main/java/com/fs/hospital580/vo/CommonVo.java

@@ -0,0 +1,12 @@
+package com.fs.hospital580.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class CommonVo implements Serializable {
+    private String clientId ;
+    private String sign ;
+    private Long timeStamp ;
+}

+ 3 - 3
fs-service/src/main/java/com/fs/hospital580/vo/DiseaseVo.java

@@ -7,10 +7,10 @@ import java.io.Serializable;
 @Data
 public class DiseaseVo implements Serializable {
 
-    private String type;                // 诊断类型(0为西医诊断,1为中医诊断)
+    private Integer type;                // 诊断类型(0为西医诊断,1为中医诊断)
     private String diagnosisName;                // 诊断名称
-    private String pageNum;                // 分页参数起始页1开始
-    private String pageSiz;                // 分页参数每页条数
+    private Integer pageNum;                // 分页参数起始页1开始
+    private Integer pageSize;                // 分页参数每页条数
 
 
 }

+ 0 - 16
fs-service/src/main/java/com/fs/hospital580/vo/FsStoreHospital580OrderScrmVo.java

@@ -1,6 +1,5 @@
 package com.fs.hospital580.vo;
 
-import com.fs.hospital580.dto.BeforeAiData;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
@@ -20,18 +19,9 @@ public class FsStoreHospital580OrderScrmVo implements Serializable {
     @ApiModelProperty("第三方系统问诊人唯一标识(患者手机号)")
     private String memberId;
 
-    @ApiModelProperty("用户对应小程序或公众号的openid")
-    private String openid;
-
-    @ApiModelProperty("第三方系统问诊人头像")
-    private String headimgurl;
-
     @ApiModelProperty("用户id")
     private Long userId;
 
-    @ApiModelProperty("门店ID")
-    private Integer storeId;
-
     @ApiModelProperty("服务类型:0-图文,1-视频")
     private Byte serviceType;
 
@@ -73,12 +63,6 @@ public class FsStoreHospital580OrderScrmVo implements Serializable {
 
     @ApiModelProperty("结束问诊后跳回三方的地址")
     private String thirdReturnUrl;
-
-    @ApiModelProperty("创建时间")
-    private LocalDateTime createTime;
-
-    @ApiModelProperty("更新时间")
-    private LocalDateTime updateTime;
     @ApiModelProperty("问诊题目")
     private List<BeforeAiDataVo> beforeAiDataList; // 问诊前面的题目,传固定的五道题
 }

+ 3 - 1
fs-service/src/main/java/com/fs/hospital580/vo/FsStoreHospital580PrescriptionScrmVo.java

@@ -1,6 +1,7 @@
 package com.fs.hospital580.vo;
 
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -9,8 +10,9 @@ import java.util.List;
 /**
  * 处方信息实体类
  */
+@EqualsAndHashCode(callSuper = true)
 @Data
-public class FsStoreHospital580PrescriptionScrmVo implements Serializable {
+public class FsStoreHospital580PrescriptionScrmVo extends CommonVo implements Serializable {
     /**
      * 处方ID
      */

+ 4 - 4
fs-service/src/main/java/com/fs/hospital580/vo/MedicineSyncVo.java

@@ -1,14 +1,14 @@
 package com.fs.hospital580.vo;
 
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.io.Serializable;
-import java.util.List;
 
+@EqualsAndHashCode(callSuper = true)
 @Data
-public class MedicineSyncVo implements Serializable {
-    private List<String> medicineIds;
+public class MedicineSyncVo extends CommonVo implements Serializable {
+    private String medicineIds;
     private String errCode;
     private String errMsg;
-
 }

+ 3 - 1
fs-service/src/main/java/com/fs/hospital580/vo/RefusePrescriptionVo.java

@@ -1,11 +1,13 @@
 package com.fs.hospital580.vo;
 
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.io.Serializable;
 
+@EqualsAndHashCode(callSuper = true)
 @Data
-public class RefusePrescriptionVo implements Serializable {
+public class RefusePrescriptionVo extends CommonVo implements Serializable {
     // 580问诊单id
     private Integer diagnosisId;
     // 第三方唯一订单号

+ 3 - 1
fs-service/src/main/java/com/fs/hospital580/vo/ReviewPrescriptionVo.java

@@ -1,11 +1,13 @@
 package com.fs.hospital580.vo;
 
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.io.Serializable;
 
+@EqualsAndHashCode(callSuper = true)
 @Data
-public class ReviewPrescriptionVo implements Serializable {
+public class ReviewPrescriptionVo extends CommonVo implements Serializable {
     // 580处方id
     private Long pid;
     // 处方审核状态:1为待审核,2为审核通过,3为审核不通过

+ 1 - 3
fs-service/src/main/resources/mapper/hospital580/FsStoreHospital580OrderScrmMapper.xml

@@ -6,8 +6,6 @@
     <resultMap id="BaseResultMap" type="com.fs.hospital580.entity.FsStoreHospital580OrderScrmEntity">
         <id column="order_id" property="orderId" />
         <result column="member_id" property="memberId" />
-        <result column="openid" property="openid" />
-        <result column="headimgurl" property="headimgurl" />
         <result column="user_id" property="userId" />
         <result column="store_id" property="storeId" />
         <result column="service_type" property="serviceType" />
@@ -33,7 +31,7 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        order_id, member_id, openid, headimgurl, user_id, store_id, service_type, is_examine
+        order_id, member_id, user_id, store_id, service_type, is_examine
                 , is_pregnant_woman, is_lactation, souce_from, user_family_name, user_family_id_card
                 , user_family_age, user_family_gender, user_family_phone, relationship, user_family_addr
                 , img_list, third_return_url, create_time, update_time,jump_url

+ 17 - 14
fs-user-app/src/main/java/com/fs/app/controller/Hospital580CallbackController.java

@@ -1,15 +1,17 @@
 package com.fs.app.controller;
 
 import com.fs.app.facade.Hospital580FacadeService;
+import com.fs.hospital580.vo.FsStoreHospital580PrescriptionScrmVo;
+import com.fs.hospital580.vo.MedicineSyncVo;
+import com.fs.hospital580.vo.RefusePrescriptionVo;
+import com.fs.hospital580.vo.ReviewPrescriptionVo;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.Map;
-
 /**
  * 580医院回调接口
  */
@@ -20,35 +22,36 @@ public class Hospital580CallbackController {
 
     @Autowired
     private Hospital580FacadeService hospital580FacadeService;
+
     /**
      * 同步药品信息接口回调
      */
-    @GetMapping("/medicine")
-    public void medicineSync(@RequestBody Map<String, Object> map) {
+    @PostMapping("/medicine")
+    public void medicineSync(@RequestBody MedicineSyncVo map) {
         hospital580FacadeService.medicineSync(map);
     }
 
     /**
      * 处方推送接口
      */
-    @GetMapping("/prescription")
-    public void prescription(@RequestBody Map<String, Object> map) {
-        hospital580FacadeService.prescription(map);
+    @PostMapping("/prescription")
+    public void prescription(@RequestBody FsStoreHospital580PrescriptionScrmVo vo) {
+        hospital580FacadeService.prescription(vo);
     }
 
     /**
      * 医生拒绝开方推送接口
      */
-    @GetMapping("/refusePrescription")
-    public void refusePrescription(@RequestBody Map<String, Object> map) {
-        hospital580FacadeService.refusePrescription(map);
+    @PostMapping("/refusePrescription")
+    public void refusePrescription(@RequestBody RefusePrescriptionVo vo) {
+        hospital580FacadeService.refusePrescription(vo);
     }
 
     /**
      * 处方药师审核
      */
-    @GetMapping("/reviewPrescription")
-    public void reviewPrescription(@RequestBody Map<String, Object> map) {
-        hospital580FacadeService.reviewPrescription(map);
+    @PostMapping("/reviewPrescription")
+    public void reviewPrescription(@RequestBody ReviewPrescriptionVo vo) {
+        hospital580FacadeService.reviewPrescription(vo);
     }
 }

+ 5 - 8
fs-user-app/src/main/java/com/fs/app/facade/Hospital580FacadeService.java

@@ -1,21 +1,18 @@
 package com.fs.app.facade;
 
 import com.fs.common.core.domain.R;
-import com.fs.hospital580.vo.DiseaseVo;
-import com.fs.hospital580.vo.FsStoreHospital580OrderScrmVo;
-
-import java.util.Map;
+import com.fs.hospital580.vo.*;
 
 public interface Hospital580FacadeService {
     R initPreDemand(FsStoreHospital580OrderScrmVo vo);
 
     R diseaseQuery(DiseaseVo vo);
 
-    void prescription(Map<String, Object> map);
+    void prescription(FsStoreHospital580PrescriptionScrmVo vo);
 
-    void refusePrescription(Map<String, Object> map);
+    void refusePrescription(RefusePrescriptionVo vo);
 
-    void reviewPrescription(Map<String, Object> map);
+    void reviewPrescription(ReviewPrescriptionVo vo);
 
-    void medicineSync(Map<String, Object> map);
+    void medicineSync(MedicineSyncVo vo);
 }

+ 52 - 32
fs-user-app/src/main/java/com/fs/app/facade/impl/Hospital580FacadeServiceImpl.java

@@ -2,41 +2,59 @@ package com.fs.app.facade.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fs.app.facade.Hospital580FacadeService;
 import com.fs.common.core.domain.R;
 import com.fs.hospital580.dto.DiseaseDto;
 import com.fs.hospital580.dto.PreDemandDto;
 import com.fs.hospital580.dto.Result580;
-import com.fs.hospital580.entity.FsStoreHospital580OrderScrmEntity;
-import com.fs.hospital580.entity.FsStoreHospital580PrescriptionMedicineScrmEntity;
-import com.fs.hospital580.entity.FsStoreHospital580PrescriptionScrmEntity;
-import com.fs.hospital580.entity.FsStoreHospital580ProductPushScrmEntity;
+import com.fs.hospital580.entity.*;
+import com.fs.hospital580.service.FsStoreHospital580AnswerScrmService;
 import com.fs.hospital580.service.Hospital580Service;
 import com.fs.hospital580.vo.*;
+import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.time.LocalDateTime;
 import java.util.List;
-import java.util.Map;
+import java.util.stream.Collectors;
 
 @Service
 public class Hospital580FacadeServiceImpl implements Hospital580FacadeService {
+
     @Autowired
     private Hospital580Service hospital580Service;
     @Autowired
-    private FsStoreHospital580ProductPushScrmEntity productPushScrm;
+    private FsStoreHospital580AnswerScrmService answerScrmService;
+
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public R initPreDemand(FsStoreHospital580OrderScrmVo vo) {
+        // 保存问诊信息
         FsStoreHospital580OrderScrmEntity order = new FsStoreHospital580OrderScrmEntity();
         BeanUtil.copyProperties(vo, order);
         order.insert();
+        List<FsStoreHospital580AnswerScrmEntity> answerScrmEntities = vo.getBeforeAiDataList().stream().map(item -> {
+            FsStoreHospital580AnswerScrmEntity answerScrmEntity = new FsStoreHospital580AnswerScrmEntity();
+            BeanUtil.copyProperties(item, answerScrmEntity);
+            answerScrmEntity.setOrderId(order.getOrderId());
+            return answerScrmEntity;
+        }).collect(Collectors.toList());
+        answerScrmService.saveBatch(answerScrmEntities);
+
+        // 获取问诊链接
         PreDemandDto dto = new PreDemandDto();
         BeanUtil.copyProperties(vo, dto);
         dto.setBizOrderId(order.getOrderId().toString());
-        return processResult(hospital580Service.initPreDemand(dto));
+        // 解析返回值
+        Result580 result580 = hospital580Service.initPreDemand(dto);
+        order.setJumpUrl(result580.getData());
+        order.updateById();
+        return processResult(result580);
     }
 
     @Override
@@ -46,15 +64,14 @@ public class Hospital580FacadeServiceImpl implements Hospital580FacadeService {
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void prescription(Map<String, Object> map) {
-        FsStoreHospital580PrescriptionScrmVo properties = BeanUtil.copyProperties(map, FsStoreHospital580PrescriptionScrmVo.class);
+    public void prescription(FsStoreHospital580PrescriptionScrmVo vo) {
         FsStoreHospital580PrescriptionScrmEntity prescription = new FsStoreHospital580PrescriptionScrmEntity();
-        BeanUtil.copyProperties(properties, prescription);
-        prescription.setOrderId(properties.getBizOrderId());
+        BeanUtil.copyProperties(vo, prescription);
+        prescription.setOrderId(vo.getBizOrderId());
         // 插入处方记录
         prescription.insert();
 
-        List<FsStoreHospital580PrescriptionMedicineScrmVo> drugRspList = properties.getDrugRspList();
+        List<FsStoreHospital580PrescriptionMedicineScrmVo> drugRspList = vo.getDrugRspList();
         drugRspList.forEach(item -> {
             FsStoreHospital580PrescriptionMedicineScrmEntity entity = new FsStoreHospital580PrescriptionMedicineScrmEntity();
             BeanUtil.copyProperties(item, entity);
@@ -63,53 +80,56 @@ public class Hospital580FacadeServiceImpl implements Hospital580FacadeService {
         });
         // 修改问诊单处方状态
         FsStoreHospital580OrderScrmEntity order = new FsStoreHospital580OrderScrmEntity();
-        order.setOrderId(Long.valueOf(properties.getBizOrderId()));
+        order.setOrderId(Long.valueOf(vo.getBizOrderId()));
         order.setPrescriptionStatus((byte) 1);
         order.updateById();
     }
 
     @Override
-    public void refusePrescription(Map<String, Object> map) {
+    public void refusePrescription(RefusePrescriptionVo vo) {
         // 修改处方信息
-        RefusePrescriptionVo prescriptionVo = BeanUtil.copyProperties(map, RefusePrescriptionVo.class);
         FsStoreHospital580OrderScrmEntity order = new FsStoreHospital580OrderScrmEntity();
-        order.setOrderId(Long.valueOf(prescriptionVo.getBizOrderId()));
+        order.setOrderId(Long.valueOf(vo.getBizOrderId()));
         order.setPrescriptionStatus((byte) 2);
-        order.setReason(prescriptionVo.getReason());
+        order.setReason(vo.getReason());
         order.updateById();
     }
 
     @Override
-    public void reviewPrescription(Map<String, Object> map) {
-        ReviewPrescriptionVo prescriptionVo = BeanUtil.copyProperties(map, ReviewPrescriptionVo.class);
-        if (ObjectUtil.isEmpty(prescriptionVo) || ObjectUtil.isEmpty(prescriptionVo.getPid())) {
+    public void reviewPrescription(ReviewPrescriptionVo vo) {
+        if (ObjectUtil.isEmpty(vo) || ObjectUtil.isEmpty(vo.getPid())) {
             return;
         }
         // 修改处方信息
         FsStoreHospital580PrescriptionScrmEntity prescription = new FsStoreHospital580PrescriptionScrmEntity();
         prescription.update(new LambdaUpdateWrapper<FsStoreHospital580PrescriptionScrmEntity>()
-                .eq(FsStoreHospital580PrescriptionScrmEntity::getPid, prescriptionVo.getPid())
-                .set(FsStoreHospital580PrescriptionScrmEntity::getAuditStatus, prescriptionVo.getAuditStatus())
-                .set(FsStoreHospital580PrescriptionScrmEntity::getAudiTime, prescriptionVo.getAuditTime())
-                .set(FsStoreHospital580PrescriptionScrmEntity::getAuditApothecaryName, prescriptionVo.getAuditApothecaryName())
-                .set(FsStoreHospital580PrescriptionScrmEntity::getReason, prescriptionVo.getReason())
-                .set(FsStoreHospital580PrescriptionScrmEntity::getDstFilePath, prescriptionVo.getDstFilePath()));
+                .eq(FsStoreHospital580PrescriptionScrmEntity::getPId, vo.getPid())
+                .set(FsStoreHospital580PrescriptionScrmEntity::getAuditStatus, vo.getAuditStatus())
+                .set(FsStoreHospital580PrescriptionScrmEntity::getAudiTime, vo.getAuditTime())
+                .set(FsStoreHospital580PrescriptionScrmEntity::getAuditApothecaryName, vo.getAuditApothecaryName())
+                .set(FsStoreHospital580PrescriptionScrmEntity::getReason, vo.getReason())
+                .set(FsStoreHospital580PrescriptionScrmEntity::getDstFilePath, vo.getDstFilePath()));
     }
 
     @Override
-    public void medicineSync(Map<String, Object> map) {
-        MedicineSyncVo medicineSyncVo = BeanUtil.copyProperties(map, MedicineSyncVo.class);
+    public void medicineSync(MedicineSyncVo vo) {
+        FsStoreHospital580ProductPushScrmEntity productPushScrm = new FsStoreHospital580ProductPushScrmEntity();
+        List<String> medicineIdList = JSONUtil.toList(JSONUtil.parseArray(vo.getMedicineIds()), String.class);
+        List<Long> medicineIds = medicineIdList.stream()
+                .map(Long::valueOf)
+                .collect(Collectors.toList());
         productPushScrm.update(new LambdaUpdateWrapper<FsStoreHospital580ProductPushScrmEntity>()
-                .in(FsStoreHospital580ProductPushScrmEntity::getProductId, medicineSyncVo.getMedicineIds())
-                .set(FsStoreHospital580ProductPushScrmEntity::getPushStatus, medicineSyncVo.getErrCode().equals("0") ? 1 : 2)
-                .set(FsStoreHospital580ProductPushScrmEntity::getErrMsg, medicineSyncVo.getErrMsg()));
+                .in(FsStoreHospital580ProductPushScrmEntity::getProductId, medicineIds)
+                .set(FsStoreHospital580ProductPushScrmEntity::getPushStatus, vo.getErrCode().equals("0") ? 1 : 2)
+                .set(FsStoreHospital580ProductPushScrmEntity::getErrMsg, vo.getErrMsg())
+                .set(FsStoreHospital580ProductPushScrmEntity::getUpdateTime, LocalDateTime.now()));
     }
 
     private R processResult(Result580 result580) {
         if (0 == result580.getErr()) {
             return R.ok().put("data", result580.getData());
         }
-        return R.error(result580.getErrmsg());
+        throw new RuntimeException(result580.getErrmsg());
     }
 
 }