Selaa lähdekoodia

改版信息采集表

cgp 5 päivää sitten
vanhempi
commit
3f18306ef6

+ 8 - 0
fs-company/src/main/java/com/fs/hisStore/controller/FsUserInformationCollectionController.java

@@ -243,6 +243,14 @@ public class FsUserInformationCollectionController extends BaseController
         }
         return AjaxResult.error();
     }
+
+    /**
+     * 查询个微采集套餐包信息
+     * */
+    @GetMapping("/getCollectionPackageInfo")
+    public AjaxResult getCollectionPackageInfo(@RequestParam Long collectionId){
+        return AjaxResult.success(fsUserInformationCollectionService.getCollectionPackageInfo(collectionId));
+    }
     
     /**
      * 根据用户id最新审核通过处方信息

+ 9 - 0
fs-service/src/main/java/com/fs/hisStore/param/bindCollectionPackageParam.java

@@ -2,10 +2,19 @@ package com.fs.hisStore.param;
 
 import lombok.Data;
 
+import java.math.BigDecimal;
+
 @Data
 public class bindCollectionPackageParam {
     //信息采集主键id
     private Long id;
+
     //套餐包id
     private Long packageId;
+
+    //支付类型 0-全款 1-物流代收
+    private Integer payType;
+
+    //代收金额
+    private BigDecimal amount;
 }

+ 7 - 0
fs-service/src/main/java/com/fs/hisStore/service/IFsUserInformationCollectionService.java

@@ -194,4 +194,11 @@ public interface IFsUserInformationCollectionService extends IService<FsUserInfo
      * @return 是否绑定成功
      */
     Long bindCollectionPackage(bindCollectionPackageParam param);
+
+    /**
+     * 获取信息采集套餐包信息
+     * @param collectionId 信息采集id
+     * @return 信息采集套餐包信息
+     */
+    FsUserInformationCollection getCollectionPackageInfo(Long collectionId);
 }

+ 17 - 1
fs-service/src/main/java/com/fs/hisStore/service/impl/FsUserInformationCollectionServiceImpl.java

@@ -718,7 +718,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
                     scene,
                     "pages_order/confirmUserinfoNew",
                     true,
-                    "trial",//release trial
+                    "release",//release trial
                     430,
                     true,
                     null,
@@ -1646,6 +1646,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
     @Override
     public List<FsUserInformationCollectionOverviewVo> fullyCollectionInfoList(FsUserInformationCollectionOverviewDTO queryDto) {
         queryDto.setCompleteStatus(1);//已完善信息标识
+        queryDto.setQwTag(1);//个微采集表
         PageHelper.startPage(queryDto.getPageNum(), queryDto.getPageSize());
         List<FsUserInformationCollectionOverviewVo> resultList=fsUserInformationCollectionMapper.selectUserInformationCollectionOverviewByPage(queryDto);
         if (CollectionUtils.isEmpty(resultList)){
@@ -1656,6 +1657,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
 
     @Override
     public Long bindCollectionPackage(bindCollectionPackageParam param) {
+        //TODO 是否已有订单号
         //校验参数
         FsUserInformationCollection informationCollection = fsUserInformationCollectionMapper.selectFsUserInformationCollectionById(param.getId());
         if (informationCollection == null || informationCollection.getQwTag() == 0 || informationCollection.getCompleteStatus() == 0) {
@@ -1673,6 +1675,8 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         //套餐包必须是OTC、中药、处方药类型
         if (fsPackage.getProductType() == 1 || fsPackage.getProductType() == 2 || fsPackage.getProductType() == 3) {
             informationCollection.setPackageId(param.getPackageId());
+            informationCollection.setPayType(param.getPayType());
+            informationCollection.setAmount(param.getAmount());
             informationCollection.setPersonalCollectStatus(PostPayPrescStatusEnum.PACKAGE_BIND.getCode());
             int result = fsUserInformationCollectionMapper.updateFsUserInformationCollection(informationCollection);
             if (result > 0){
@@ -1682,6 +1686,18 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         return 0L;
     }
 
+    @Override
+    public FsUserInformationCollection getCollectionPackageInfo(Long collectionId) {
+        FsUserInformationCollection queryDto=new FsUserInformationCollection();
+        queryDto.setId(collectionId);
+        queryDto.setQwTag(1);
+        List<FsUserInformationCollection> fsUserInformationCollections = fsUserInformationCollectionMapper.selectFsUserInformationCollectionList(queryDto);
+        if (CollectionUtils.isEmpty(fsUserInformationCollections)){
+            throw new CustomException("用户信息采集不存在");
+        }
+        return fsUserInformationCollections.get(0);
+    }
+
     /**
      * 校验必填备注:对于 open=true 且被勾选的选项,必须填写备注文本
      *