Преглед на файлове

修改简化版信息采集表接口

cgp преди 20 часа
родител
ревизия
a5926d13e5

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

@@ -134,7 +134,7 @@ public class FsUserInformationCollectionController extends BaseController
     }
 
     /**
-     * 信息采集终止
+     * 信息采集取消
      */
     @PreAuthorize("@ss.hasPermi('qw:collectionSchedule:stop')")
     @PutMapping("/stop")

+ 6 - 4
fs-service/src/main/java/com/fs/his/domain/FsUserInformationCollectionSchedule.java

@@ -56,12 +56,12 @@ public class FsUserInformationCollectionSchedule extends BaseEntity{
     @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date completedTime;
 
-    /** 中止时间 */
+    /** 取消时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "中止时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @Excel(name = "取消时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date terminatedTime;
 
-    /** 中止操作人id */
+    /** 取消操作人id */
     private Long terminatedBy;
 
     /** 订单号 */
@@ -83,5 +83,7 @@ public class FsUserInformationCollectionSchedule extends BaseEntity{
      */
     private String drugDoctorName;
 
-
+    /**填写时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date fillTime;
 }

+ 1 - 1
fs-service/src/main/java/com/fs/his/dto/PrescribeRejectDTO.java

@@ -10,6 +10,6 @@ public class PrescribeRejectDTO {
     //备注
     private String remark;
 
-    //终止
+    //取消
     private Long terminatedBy;
 }

+ 1 - 1
fs-service/src/main/java/com/fs/his/enums/FsStoreOrderLogEnum.java

@@ -34,7 +34,7 @@ public enum FsStoreOrderLogEnum {
     WAREHOUSE_REVIEW_SALES("WAREHOUSE_REVIEW_SALES","仓库已审核"),
     FINANCE_REVIEW_SALES("FINANCE_REVIEW_SALES","财务已审核"),
     PLATFORM_REVIEW_CANCEL("PLATFORM_REVIEW_CANCEL","平台已取消售后"),
-    CUSTOMER_SERVICE_STOP("CUSTOMER_SERVICE_STOP","销售终止信息采集退款"),
+    CUSTOMER_SERVICE_STOP("CUSTOMER_SERVICE_STOP","销售取消信息采集退款"),
     DOCTOR_STOP("DOCTOR_STOP","医生拒方退款"),
 
     SET_PUSH_MOBILE("SET_PUSH_MOBILE","设置推送手机号"),

+ 1 - 1
fs-service/src/main/java/com/fs/hisStore/domain/FsUserInformationCollection.java

@@ -111,5 +111,5 @@ public class FsUserInformationCollection extends BaseEntity{
     /**
      * 填表标识 0-未填写 1-已填写
      * */
-    private int fillFlag;
+    private Integer fillFlag;
 }

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsUserInformationCollectionParam.java

@@ -50,4 +50,6 @@ public class FsUserInformationCollectionParam {
     /** 公司id */
     private Long companyId;
 
+    /** 用户信息采集的填写标识 0:未填写,1:已填写*/
+    private Integer fillFlag;
 }

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

@@ -109,7 +109,7 @@ public interface IFsUserInformationCollectionService extends IService<FsUserInfo
      * */
     FsUserInformationCollectionVO getCollectionByInfoSourceAndThirdPartyUserId(Integer infoSource,Long thirdPartyUserId);
 
-    //1-终止 2-拒方
+    //1-取消 2-拒方
     R stopCollection(FsUserInformationCollectionSchedule param, Long operateId,Integer operateType);
 
     //销售帮助客户二次确认

+ 82 - 111
fs-service/src/main/java/com/fs/hisStore/service/impl/FsUserInformationCollectionServiceImpl.java

@@ -214,12 +214,11 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
      * @return 结果
      */
     @Override
-    public Long insertFsUserInformationCollection(FsUserInformationCollectionParam param)
-    {
-        FsUserInformationCollection fsUserInformationCollection = getFsUserInformationCollection(param);
-        if (param.getIsPackage() == 1) {
+    @Transactional(rollbackFor = Exception.class)
+    public Long insertFsUserInformationCollection(FsUserInformationCollectionParam param) {
+        if (param.getIsPackage() != null && param.getIsPackage() == 1) {
             FsPackage fsPackage = packageMapper.selectFsPackageByPackageId(param.getPackageId());
-            if (fsPackage != null && !(fsPackage.getProductType() == 1 || fsPackage.getProductType() == 2 || fsPackage.getProductType() ==3)) {
+            if (fsPackage != null && !(fsPackage.getProductType() == 1 || fsPackage.getProductType() == 2 || fsPackage.getProductType() == 3)) {
                 throw new CustomException("该套餐不支持用户信息采集");
             }
         }
@@ -227,25 +226,20 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         FsUserInformationCollection queryCondition = new FsUserInformationCollection();
         queryCondition.setUserId(param.getUserId());
         List<FsUserInformationCollection> fsUserInformationCollections = baseMapper.selectFsUserInformationCollectionList(queryCondition);
-        if (!CollectionUtils.isEmpty(fsUserInformationCollections)&&fsUserInformationCollections.size()>1){
-            log.info("用户已存在采集信息,用户id:{}",param.getUserId());
+        if (!CollectionUtils.isEmpty(fsUserInformationCollections) && fsUserInformationCollections.size() > 1) {
+            log.info("用户已存在采集信息,用户id:{}", param.getUserId());
             throw new CustomException("用户已存在采集信息");
         }
-        fsUserInformationCollection.setAge(param.getAge());
-        fsUserInformationCollection.setCreateTime(DateUtils.getNowDate());
-        baseMapper.insertFsUserInformationCollection(fsUserInformationCollection);
-        //新增用户信息采集表的同时记录用户信息采集进度
+        //构建用户信息采集信息
+        FsUserInformationCollection fsUserInformationCollection = buildUserInfoCollection(param);
         try {
-            fsUserInformationCollection.setPackageId(param.getPackageId());
-            fsUserInformationCollection.setCompanyUserId(param.getCompanyUserId());
-            fsUserInformationCollection.setCompanyId(param.getCompanyId());
+            baseMapper.insertFsUserInformationCollection(fsUserInformationCollection);
             //构建采集进度信息
-            FsUserInformationCollectionSchedule fsUserInformationCollectionSchedule = assembleCreateSchedule(fsUserInformationCollection);
-            fsUserInformationCollectionSchedule.setCompanyUserId(param.getCompanyUserId());
+            FsUserInformationCollectionSchedule fsUserInformationCollectionSchedule = buildUserInfoSchedule(fsUserInformationCollection);
             scheduleMapper.insertFsUserInformationCollectionSchedule(fsUserInformationCollectionSchedule);
-            log.info("新增用户信息采集进度数据,信息采集数据id:{}",fsUserInformationCollectionSchedule.getCollectionId());
-        }catch (Exception e){
-            logger.error("新增用户信息采集进度数据失败",e);
+        } catch (Exception e) {
+            logger.error("新增---用户id:{},新增用户信息采集进度失败", param.getUserId(), e);
+            throw new CustomException("用户信息采集进度新增失败");
         }
         return fsUserInformationCollection.getId();
     }
@@ -265,7 +259,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         }
         FsUserInformationCollection collection = fsUserInformationCollectionMapper.selectFsUserInformationCollectionById(param.getId());
         if (collection == null) {
-            throw new CustomException("没有用户采集信息");
+            throw new CustomException("用户:"+param.getUserId()+"没有用户采集信息");
         }
         if (collection.getUserConfirm() == 1 && collection.getUserConfirm2() == 0) {
             throw new CustomException("确认中,暂无法修改");
@@ -276,33 +270,26 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
                 throw new CustomException("该疗法不支持用户信息采集");
             }
         }
-        //编辑用户信息采集信息时,同时新增采集进度数据(先中止再新增)
-        //获取当前用户正在运行的信息采集进度
+        //编辑用户信息采集信息时,需要新增采集进度数据(先取消进度再新增进度)
         FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleRunningByCollectionId(collection.getId());
         if (schedule != null){
-            log.info("用户信息采集进度未终止,进度id:{}",schedule.getId());
-            throw new CustomException("请先终止此用户信息的采集进度");
+            log.info("用户信息采集进度未取消,进度id:{}",schedule.getId());
+            throw new CustomException("请先取消此用户信息的采集进度");
         }
+        FsUserInformationCollection fsUserInformationCollection = buildUserInfoCollection(param);
         try {
-            FsUserInformationCollection condition = getFsUserInformationCollection(param);
-            if (param.getIsPackage() != null&& param.getIsPackage() == 1){
-                condition.setPackageId(param.getPackageId());
-            }
-
-            FsUserInformationCollectionSchedule fsUserInformationCollectionSchedule = assembleCreateSchedule(condition);
-            fsUserInformationCollectionSchedule.setCompanyUserId(param.getCompanyUserId());
+            FsUserInformationCollectionSchedule fsUserInformationCollectionSchedule = buildUserInfoSchedule(fsUserInformationCollection);
             scheduleMapper.insertFsUserInformationCollectionSchedule(fsUserInformationCollectionSchedule);
-            log.info("编辑用户信息采集信息重新新增进度数据,信息采集数据id:{}",fsUserInformationCollectionSchedule.getCollectionId());
         }catch (Exception e){
-            logger.error("新增用户信息采集进度数据失败",e);
-            throw new CustomException("新增用户信息采集进度数据失败");
+            logger.error("编辑---用户id:{},新增用户信息采集进度失败",param.getUserId(),e);
+            throw new CustomException("用户信息采集进度新增失败");
         }
         //清空订单号
         fsUserInformationCollectionMapper.collectionOderCodeNULL(param.getId());
-        FsUserInformationCollection fsUserInformationCollection = getFsUserInformationCollection(param);
         fsUserInformationCollection.setUserConfirm2(0);
         fsUserInformationCollection.setUserConfirm(0);
         fsUserInformationCollection.setDoctorConfirm(0);
+        fsUserInformationCollection.setFillFlag(0);//填写标识 0:未填写
         fsUserInformationCollection.setStatus(1);
         fsUserInformationCollection.setUpdateTime(DateUtils.getNowDate());
         fsUserInformationCollection.setRemark(param.getRemark());
@@ -312,80 +299,42 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         if (param.getIsPackage() != null && param.getIsPackage() == 1){
             fsUserInformationCollection.setPackageId(param.getPackageId());
         }
-
         fsUserInformationCollection.setUserPhoneFour(param.getUserPhoneFour());
         fsUserInformationCollection.setAllergy(param.getAllergy());
         fsUserInformationCollection.setPayType(param.getPayType());
         fsUserInformationCollection.setQuestionId(param.getQuestionId());
         fsUserInformationCollection.setAmount(param.getAmount());
         fsUserInformationCollection.setAge(param.getAge());
+        //更新用户信息采集信息
         baseMapper.updateFsUserInformationCollection(fsUserInformationCollection);
         return fsUserInformationCollection.getId();
     }
 
 
+    //简化版信息采集创建时没有用户id
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public Long createSimpleUserInfo(FsUserInformationCollectionParam param) {
-        if (param.getId() == null || param.getId() < 1) {
-            throw new CustomException("参数错误");
-        }
-        FsUserInformationCollection collection = fsUserInformationCollectionMapper.selectFsUserInformationCollectionById(param.getId());
-        if (collection == null) {
-            throw new CustomException("没有用户采集信息");
-        }
-        if (collection.getUserConfirm() == 1 && collection.getUserConfirm2() == 0) {
-            throw new CustomException("确认中,暂无法修改");
-        }
-        if (param.getIsPackage() == 1) {
+        if (param.getIsPackage() != null && param.getIsPackage() == 1) {
             FsPackage fsPackage = packageMapper.selectFsPackageByPackageId(param.getPackageId());
-            if (fsPackage != null && !(fsPackage.getProductType() == 1 || fsPackage.getProductType() == 2 || fsPackage.getProductType() ==3)) {
-                throw new CustomException("该疗法不支持用户信息采集");
+            if (fsPackage != null && !(fsPackage.getProductType() == 1 || fsPackage.getProductType() == 2 || fsPackage.getProductType() == 3)) {
+                throw new CustomException("该套餐不支持用户信息采集");
             }
         }
-        //编辑用户信息采集信息时,同时新增采集进度数据(先中止再新增)
-        //获取当前用户正在运行的信息采集进度
-        FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleRunningByCollectionId(collection.getId());
-        if (schedule != null){
-            log.info("用户信息采集进度未终止,进度id:{}",schedule.getId());
-            throw new CustomException("请先终止此用户信息的采集进度");
-        }
-        try {
-            FsUserInformationCollection condition = getFsUserInformationCollection(param);
-            if (param.getIsPackage() != null&& param.getIsPackage() == 1){
-                condition.setPackageId(param.getPackageId());
-            }
 
-            FsUserInformationCollectionSchedule fsUserInformationCollectionSchedule = assembleCreateSchedule(condition);
-            fsUserInformationCollectionSchedule.setCompanyUserId(param.getCompanyUserId());
+        //构建用户信息采集对象
+        FsUserInformationCollection fsUserInformationCollection = buildUserInfoCollection(param);
+        try {
+            baseMapper.insertFsUserInformationCollection(fsUserInformationCollection);
+            //构建采集进度对象
+            FsUserInformationCollectionSchedule fsUserInformationCollectionSchedule = buildUserInfoSchedule(fsUserInformationCollection);
+            //新增用户信息采集进度
             scheduleMapper.insertFsUserInformationCollectionSchedule(fsUserInformationCollectionSchedule);
-            log.info("编辑用户信息采集信息重新新增进度数据,信息采集数据id:{}",fsUserInformationCollectionSchedule.getCollectionId());
-        }catch (Exception e){
-            logger.error("新增用户信息采集进度数据失败",e);
-            throw new CustomException("新增用户信息采集进度数据失败");
-        }
-        //清空订单号
-        fsUserInformationCollectionMapper.collectionOderCodeNULL(param.getId());
-        FsUserInformationCollection fsUserInformationCollection = getFsUserInformationCollection(param);
-        fsUserInformationCollection.setUserConfirm2(0);
-        fsUserInformationCollection.setUserConfirm(0);
-        fsUserInformationCollection.setDoctorConfirm(0);
-        fsUserInformationCollection.setStatus(1);
-        fsUserInformationCollection.setUpdateTime(DateUtils.getNowDate());
-        fsUserInformationCollection.setRemark(param.getRemark());
-        fsUserInformationCollection.setSex(param.getSex());
-        fsUserInformationCollection.setIsPackage(param.getIsPackage());
-        fsUserInformationCollection.setUserName(param.getUserName());
-        if (param.getIsPackage() != null && param.getIsPackage() == 1){
-            fsUserInformationCollection.setPackageId(param.getPackageId());
+            log.info("新增用户信息采集进度数据,信息采集数据id:{}", fsUserInformationCollectionSchedule.getCollectionId());
+        } catch (Exception e) {
+            logger.error("极速版-----用户信息采集进度创建失败", e);
+            throw new CustomException("信息采集进度创建失败");
         }
-
-        fsUserInformationCollection.setUserPhoneFour(param.getUserPhoneFour());
-        fsUserInformationCollection.setAllergy(param.getAllergy());
-        fsUserInformationCollection.setPayType(param.getPayType());
-        fsUserInformationCollection.setQuestionId(param.getQuestionId());
-        fsUserInformationCollection.setAmount(param.getAmount());
-        fsUserInformationCollection.setAge(param.getAge());
-        baseMapper.updateFsUserInformationCollection(fsUserInformationCollection);
         return fsUserInformationCollection.getId();
     }
 
@@ -1114,7 +1063,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
             return R.error("未找到采集信息");
         }
         if (collection.getStatus() == 2 && collection.getUserConfirm2() == 1) {
-            return R.error("用户信息采集已完成,无法终止");
+            return R.error("用户信息采集已完成,无法取消");
         }
         //清空订单号
         fsUserInformationCollectionMapper.collectionOderCodeNULL(param.getCollectionId());
@@ -1133,11 +1082,11 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
             }else {
                 schedule = scheduleMapper.selectCollectionScheduleByCollectionId(param.getCollectionId());
             }
-            // "用户采集进度"中止时间
+            // "用户采集进度"取消时间
             schedule.setTerminatedTime(DateUtils.getNowDate());
-            // "用户采集进度"中止标识
+            // "用户采集进度"取消标识
             schedule.setStatus(CollectionTaskStatusEnum.TERMINATED.getCode());
-            // "用户采集进度"中止原因
+            // "用户采集进度"取消原因
             schedule.setRemark(param.getRemark());
             // "用户采集进度"中止操作人员
             schedule.setTerminatedBy(operateId);
@@ -1146,7 +1095,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
                 //获取订单信息
                 FsStoreOrder fsStoreOrder = storeOrderService.selectFsStoreOrderByOrderCode(param.getOrderCode());
                 if (fsStoreOrder != null&&"0".equals(fsStoreOrder.getRefundStatus())&&( fsStoreOrder.getStatus()==2||fsStoreOrder.getStatus()==3)){
-                    //如果传入订单号不为空则在终止时需要执行退款操作
+                    //如果传入订单号不为空则在取消时需要执行退款操作
                     map.setPackageOrderCode(param.getOrderCode());
                     autoRefund(map,operateType);
                 }
@@ -1154,7 +1103,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
             }
             return R.ok();
         }
-        return R.error("终止失败");
+        return R.error("取消失败");
     }
 
     @Override
@@ -1327,8 +1276,13 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
                 .collect(Collectors.toList());
     }
 
-    private FsUserInformationCollection getFsUserInformationCollection(FsUserInformationCollectionParam param) {
+    /**
+     * 辅助方法:组装信息采集对象
+     * */
+    private FsUserInformationCollection buildUserInfoCollection(FsUserInformationCollectionParam param) {
         FsUserInformationCollection fsUserInformationCollection = new FsUserInformationCollection();
+
+        // 处理 answers 的 flag
         if (!CollectionUtils.isEmpty(param.getAnswers())) {
             param.getAnswers().forEach(answer -> {
                 if (answer.getFlag() == null) {
@@ -1336,12 +1290,18 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
                 }
             });
         }
+
+        // 所有基础属性赋值
+        Integer fillFlag = param.getFillFlag() == null ? 1 : param.getFillFlag();
+        fsUserInformationCollection.setFillFlag(fillFlag);
         fsUserInformationCollection.setJsonInfo(JSON.toJSONString(param.getAnswers()));
         fsUserInformationCollection.setUserId(param.getUserId());
         fsUserInformationCollection.setCompanyUserId(param.getCompanyUserId());
         fsUserInformationCollection.setQuestionId(param.getQuestionId());
         fsUserInformationCollection.setId(param.getId());
-        fsUserInformationCollection.setPackageId(param.getPackageId());
+        if (param.getIsPackage() != null&&param.getIsPackage() == 1){
+            fsUserInformationCollection.setPackageId(param.getPackageId());
+        }
         fsUserInformationCollection.setPayType(param.getPayType());
         fsUserInformationCollection.setAmount(param.getAmount());
         fsUserInformationCollection.setIsPackage(param.getIsPackage());
@@ -1350,7 +1310,11 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         fsUserInformationCollection.setSex(param.getSex());
         fsUserInformationCollection.setAllergy(param.getAllergy());
         fsUserInformationCollection.setRemark(param.getRemark());
-        //获取医生信息
+        fsUserInformationCollection.setAge(param.getAge());
+        fsUserInformationCollection.setCompanyId(param.getCompanyId());
+        fsUserInformationCollection.setCreateTime(DateUtils.getNowDate());
+
+        // 根据销售人员获取医生信息
         CompanyUser companyUser = companyUserMapper.selectCompanyUserById(param.getCompanyUserId());
         if (companyUser == null) {
             throw new CustomException("销售不存在");
@@ -1362,7 +1326,6 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
                 doctorId = doctor.getDoctorId();
             }
         } else {
-            //随机获取医生id
             doctorId = iFsDoctorService.selectFsDoctorDoctorByPackage();
         }
         fsUserInformationCollection.setDoctorId(doctorId);
@@ -1371,22 +1334,30 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
     }
 
     //辅助方法:组装用户信息采集进度对象
-    private FsUserInformationCollectionSchedule assembleCreateSchedule(FsUserInformationCollection fsUserInformationCollection){
+    private FsUserInformationCollectionSchedule buildUserInfoSchedule(FsUserInformationCollection param){
         FsUserInformationCollectionSchedule shedule = new FsUserInformationCollectionSchedule();
-        shedule.setCollectionId(fsUserInformationCollection.getId());
-        shedule.setUserId(fsUserInformationCollection.getUserId());
-        shedule.setDoctorId(fsUserInformationCollection.getDoctorId());
-        shedule.setPackageId(fsUserInformationCollection.getPackageId());
-        shedule.setCreateTime(DateUtils.getNowDate());
-        shedule.setCompanyUserId(fsUserInformationCollection.getCompanyUserId());
-        shedule.setCompanyId(fsUserInformationCollection.getCompanyId());
+        shedule.setCollectionId(param.getId());
+        shedule.setUserId(param.getUserId());
+        shedule.setDoctorId(param.getDoctorId());
+        shedule.setCompanyUserId(param.getCompanyUserId());
+        shedule.setCompanyId(param.getCompanyId());
         //任务状态:"进行中"
         shedule.setStatus(CollectionTaskStatusEnum.PROCESSING.getCode());
         //当前流程节点:"待用户第一次确认"
         shedule.setCurrentStep(PrescriptionTaskStepEnum.WAITING_FIRST_CONFIRM.getCode());
-        FsPackage fsPackage = packageService.selectFsPackageByPackageId(fsUserInformationCollection.getPackageId());
-        if (fsPackage != null){
-            shedule.setPackageName(fsPackage.getPackageName());
+        Date currentTime = DateUtils.getNowDate();
+        shedule.setCreateTime(currentTime);
+        if (param.getFillFlag() == 1){
+            //如果填写了就记录填写时间
+            shedule.setFillTime(currentTime);
+        }
+        Long packageId = param.getPackageId();
+        if (packageId != null&&param.getIsPackage() == 1){
+            shedule.setPackageId(packageId);
+            FsPackage fsPackage = packageService.selectFsPackageByPackageId(param.getPackageId());
+            if (fsPackage != null){
+                shedule.setPackageName(fsPackage.getPackageName());
+            }
         }
         return shedule;
     }

+ 1 - 1
fs-service/src/main/java/com/fs/qw/service/IFsUserInformationCollectionScheduleService.java

@@ -68,7 +68,7 @@ public interface IFsUserInformationCollectionScheduleService extends IService<Fs
     int deleteFsUserInformationCollectionScheduleById(Long id);
 
     /**
-     * 终止用户信息采集进度
+     * 取消用户信息采集进度
      *
      * @param fsUserInformationCollectionSchedule 用户信息采集进度
      * @return 结果

+ 2 - 2
fs-service/src/main/java/com/fs/qw/service/impl/FsUserInformationCollectionScheduleServiceImpl.java

@@ -115,9 +115,9 @@ public class FsUserInformationCollectionScheduleServiceImpl extends ServiceImpl<
     public int stopCollectionSchedule(FsUserInformationCollectionSchedule fsUserInformationCollectionSchedule) {
         // "用户信息采集表"状态清空
         //fsUserInformationCollectionService.stopCollection(fsUserInformationCollectionSchedule.getCollectionId(),fsUserInformationCollectionSchedule.getTerminatedBy());
-        // "用户采集进度"中止时间
+        // "用户采集进度"取消时间
         fsUserInformationCollectionSchedule.setTerminatedTime(DateUtils.getNowDate());
-        // "用户采集进度"中止标识
+        // "用户采集进度"取消标识
         fsUserInformationCollectionSchedule.setStatus(CollectionTaskStatusEnum.TERMINATED.getCode());
         return baseMapper.updateFsUserInformationCollectionSchedule(fsUserInformationCollectionSchedule);
     }

+ 2 - 1
fs-service/src/main/java/com/fs/qw/service/impl/QwAcquisitionLinkInfoServiceImpl.java

@@ -333,7 +333,8 @@ public class QwAcquisitionLinkInfoServiceImpl implements IQwAcquisitionLinkInfoS
     }
 
     @Override
-    @Transactional(rollbackFor = Exception.class)
+    //TODO 多数据批量操作时,当前事务还未提交,在短时间内可能会导致第三方回调的时候查不到需要更新的数据,后续优化
+    //@Transactional(rollbackFor = Exception.class)
     public int batchCreateMessageLink(BatchAddAcquisitionLinkDTO batchAddAcquisitionLinkDTO) {
         Long qwAcquisitionId = batchAddAcquisitionLinkDTO.getQwAcquisitionAssistantId();
         List<String> phoneList = batchAddAcquisitionLinkDTO.getPhoneList();

+ 20 - 7
fs-service/src/main/resources/mapper/qw/FsUserInformationCollectionScheduleMapper.xml

@@ -21,10 +21,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="orderCode"    column="order_code"    />
         <result property="companyId"    column="company_id"    />
         <result property="companyUserId"    column="company_user_id"    />
+        <result property="drugDoctorId" column="drug_doctor_id"/>
+        <result property="drugDoctorName" column="drug_doctor_name"/>
+        <result property="fillTime"    column="fill_time"    />
     </resultMap>
 
     <sql id="selectFsUserInformationCollectionScheduleVo">
-        select id, collection_id, user_id, doctor_id, package_id, package_name, current_step, status, create_time, completed_time, terminated_time, terminated_by, remark,order_code,company_id, company_user_id from fs_user_information_collection_schedule
+        select id, collection_id, user_id, doctor_id, package_id, package_name, current_step, status, create_time, completed_time, terminated_time, terminated_by, remark,order_code,company_id, company_user_id, fill_time from fs_user_information_collection_schedule
     </sql>
 
     <select id="selectFsUserInformationCollectionScheduleList" parameterType="FsUserInformationCollectionSchedule" resultMap="FsUserInformationCollectionScheduleResult">
@@ -46,7 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         s.remark,
         s.order_code,
         s.company_id,
-        s.company_user_id
+        s.company_user_id,
+        s.fill_time
         FROM
         fs_user_information_collection_schedule s
         LEFT JOIN fs_user_information_collection c ON s.collection_id = c.id
@@ -67,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderCode != null and orderCode != ''"> AND s.order_code = #{orderCode}</if>
             <if test="companyId != null and companyId != ''"> AND s.company_id = #{companyId}</if>
             <if test="companyUserId != null and companyUserId != ''"> AND s.company_user_id = #{companyUserId}</if>
+            <if test="fillTime != null "> and s.fill_time = #{fillTime}</if>
         </where>
     </select>
 
@@ -78,7 +83,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         s.collection_id,
         s.user_id,
         c.user_name,
-        s.doctor_id,
         dd.doctor_id as drugDoctorId,
         d.doctor_name,
         dd.doctor_name as drugDoctorName,
@@ -91,7 +95,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         s.terminated_time,
         s.terminated_by,
         s.remark,
-        s.order_code
+        s.order_code,
+        s.fill_time
         FROM
         fs_user_information_collection_schedule s
         LEFT JOIN fs_user_information_collection c ON s.collection_id = c.id
@@ -114,6 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderCode != null and orderCode != ''"> AND s.order_code = #{orderCode}</if>
             <if test="companyId != null and companyId != ''"> AND s.company_id = #{companyId}</if>
             <if test="companyUserId != null and companyUserId != ''"> AND s.company_user_id = #{companyUserId}</if>
+            <if test="fillTime != null "> and s.fill_time = #{fillTime}</if>
             AND s.id = (
             SELECT MAX(s2.id)
             FROM fs_user_information_collection_schedule s2
@@ -133,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderCode != null and orderCode != ''"> AND s2.order_code = #{orderCode}</if>
             <if test="companyId != null and companyId != ''"> AND s2.company_id = #{companyId}</if>
             <if test="companyUserId != null and companyUserId != ''"> AND s2.company_user_id = #{companyUserId}</if>
+            <if test="fillTime != null "> and s.fill_time = #{fillTime}</if>
             )
         </where>
         ORDER BY s.create_time desc
@@ -147,7 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SELECT
             id, collection_id, user_id, doctor_id,
             package_id, package_name, current_step, status, create_time,
-            completed_time, terminated_time, terminated_by, remark,order_code,company_id,company_user_id
+            completed_time, terminated_time, terminated_by, remark,order_code,company_id,company_user_id,drug_doctor_id,fill_time
         FROM fs_user_information_collection_schedule
         WHERE collection_id = #{collectionId}
         ORDER BY id DESC
@@ -162,7 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SELECT
             id, collection_id, user_id, doctor_id,
             package_id, package_name, current_step, status, create_time,
-            completed_time, terminated_time, terminated_by, remark,order_code,company_id,company_user_id,drug_doctor_id
+            completed_time, terminated_time, terminated_by, remark,order_code,company_id,company_user_id,drug_doctor_id,fill_time
         FROM fs_user_information_collection_schedule
         WHERE collection_id = #{collectionId}
         AND status = 1
@@ -186,7 +193,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         remark,
         order_code,
         company_id,
-        company_user_id
+        company_user_id,
+        fill_time
         FROM fs_user_information_collection_schedule
         WHERE order_code IN
         <foreach collection="orderCodes" item="code" open="(" separator="," close=")">
@@ -213,6 +221,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderCode != null">order_code,</if>
             <if test="companyId != null">company_id,</if>
             <if test="companyUserId != null">company_user_id,</if>
+            <if test="drugDoctorId != null">drug_doctor_id,</if>
+            <if test="fillTime != null">fill_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="collectionId != null">#{collectionId},</if>
@@ -230,6 +240,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderCode != null">#{orderCode},</if>
             <if test="companyId != null">#{companyId},</if>
             <if test="companyUserId != null">#{companyUserId},</if>
+            <if test="drugDoctorId != null">#{drugDoctorId},</if>
+            <if test="fillTime != null">#{fillTime},</if>
          </trim>
     </insert>
 
@@ -252,6 +264,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderCode != null">order_code = #{orderCode},</if>
             <if test="companyId != null">company_id = #{companyId},</if>
             <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
+            <if test="fillTime != null">fill_time = #{fillTime},</if>
         </trim>
         where id = #{id}
     </update>