Просмотр исходного кода

订单回调添加任务订单号

wjj 1 месяц назад
Родитель
Сommit
e79526ff70

+ 13 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsStoreOrderServiceImpl.java

@@ -68,7 +68,9 @@ import com.fs.im.dto.*;
 import com.fs.im.service.IImService;
 import com.fs.qw.domain.QwExternalContact;
 import com.fs.qw.domain.QwUser;
+import com.fs.qw.mapper.FsUserInformationCollectionScheduleMapper;
 import com.fs.qw.mapper.QwExternalContactMapper;
+import com.fs.qw.service.IFsUserInformationCollectionScheduleService;
 import com.fs.qw.service.IQwExternalContactService;
 import com.fs.qw.service.impl.QwUserServiceImpl;
 import com.fs.system.domain.SysConfig;
@@ -139,6 +141,9 @@ import static com.fs.his.utils.PhoneUtil.*;
 @EnableAspectJAutoProxy(exposeProxy = true, proxyTargetClass = true)
 public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
     Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private FsUserInformationCollectionScheduleMapper informationCollectionScheduleMapper;
     @Autowired
     private WxPayService wxPayService;
     @Autowired
@@ -931,6 +936,14 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
             msg.setDoctorId(collection.getDoctorId());
             msg.setCreateTime(DateUtils.getNowDate());
             doctorMsgMapper.insertDoctorMsg(msg);
+            //更新任务订单号
+            FsUserInformationCollectionSchedule schedule = informationCollectionScheduleMapper.selectCollectionScheduleRunningByCollectionId(collection.getId());
+            if (schedule != null) {
+                FsUserInformationCollectionSchedule map = new FsUserInformationCollectionSchedule();
+                map.setId(schedule.getId());
+                map.setOrderCode(packageOrder.getOrderSn());
+                informationCollectionScheduleMapper.updateFsUserInformationCollectionSchedule(map);
+            }
         }
         order.setStatus(2);
         order.setPayDelivery(packageOrder.getPayDelivery());