|
@@ -320,6 +320,9 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ICompanyUserCacheService companyUserCacheService;
|
|
private ICompanyUserCacheService companyUserCacheService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private FsUserInformationCollectionScheduleMapper scheduleMapper;
|
|
|
|
|
+
|
|
|
//ERP 类型到服务的映射
|
|
//ERP 类型到服务的映射
|
|
|
private Map<Integer, IErpOrderService> erpServiceMap;
|
|
private Map<Integer, IErpOrderService> erpServiceMap;
|
|
|
@PostConstruct
|
|
@PostConstruct
|
|
@@ -924,10 +927,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
|
order.setStoreId(fsPackage.getStoreId());
|
|
order.setStoreId(fsPackage.getStoreId());
|
|
|
FsUserInformationCollection collection = userInformationCollectionMapper.selectByOrderCode(packageOrder.getOrderSn());
|
|
FsUserInformationCollection collection = userInformationCollectionMapper.selectByOrderCode(packageOrder.getOrderSn());
|
|
|
logger.info("用户采集信息{}:=================>",collection);
|
|
logger.info("用户采集信息{}:=================>",collection);
|
|
|
- if (collection != null
|
|
|
|
|
- && collection.getIsPackage() == 1
|
|
|
|
|
- && !Arrays.asList(1, 2, 3).contains(fsPackage.getProductType())
|
|
|
|
|
- ) {
|
|
|
|
|
|
|
+ if (collection != null) {
|
|
|
//是否确认(用户信息采集 为0的不推送到ERP)1推送
|
|
//是否确认(用户信息采集 为0的不推送到ERP)1推送
|
|
|
order.setIsConfirm(0);
|
|
order.setIsConfirm(0);
|
|
|
//存入用户信息采集信息 用于第一次医生确认处方修改医生确认状态
|
|
//存入用户信息采集信息 用于第一次医生确认处方修改医生确认状态
|
|
@@ -935,22 +935,25 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
|
|
|
if (prescribeId != null) {
|
|
if (prescribeId != null) {
|
|
|
redisCache.setCacheObject("collectionPrescribeId:" + prescribeId, collection);
|
|
redisCache.setCacheObject("collectionPrescribeId:" + prescribeId, collection);
|
|
|
}
|
|
}
|
|
|
- DoctorMsg msg = new DoctorMsg();
|
|
|
|
|
- String name = collection.getUserName() != null ? collection.getUserName() : "-";
|
|
|
|
|
- msg.setTitle("用户信息采集开方");
|
|
|
|
|
- msg.setType(1);
|
|
|
|
|
- String companyUserName = companyUserCacheService.selectCompanyUserNameUserById(collection.getCompanyUserId());
|
|
|
|
|
- msg.setContent("患者:" + name + "的信息采集,前往开方,来源客服:"+companyUserName);
|
|
|
|
|
- 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);
|
|
|
|
|
|
|
+ if (collection.getIsPackage() == 1 && Arrays.asList(1, 2, 3).contains(fsPackage.getProductType())) {
|
|
|
|
|
+ DoctorMsg msg = new DoctorMsg();
|
|
|
|
|
+ String name = collection.getUserName() != null ? collection.getUserName() : "-";
|
|
|
|
|
+ msg.setTitle("用户信息采集开方");
|
|
|
|
|
+ msg.setType(1);
|
|
|
|
|
+ String companyUserName = companyUserCacheService.selectCompanyUserNameUserById(collection.getCompanyUserId());
|
|
|
|
|
+ msg.setContent("患者:" + name + "的信息采集,前往开方,来源客服:"+companyUserName);
|
|
|
|
|
+ msg.setDoctorId(collection.getDoctorId());
|
|
|
|
|
+ msg.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
+ doctorMsgMapper.insertDoctorMsg(msg);
|
|
|
|
|
+ //更新任务订单号
|
|
|
|
|
+ FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleByCollectionId(collection.getId());
|
|
|
|
|
+ if (schedule != null) {
|
|
|
|
|
+ FsUserInformationCollectionSchedule map = new FsUserInformationCollectionSchedule();
|
|
|
|
|
+ map.setId(schedule.getId());
|
|
|
|
|
+ map.setOrderCode(packageOrder.getOrderSn());
|
|
|
|
|
+ map.setCurrentStep(PrescriptionTaskStepEnum.WAITING_PRESCRIBE.getCode());
|
|
|
|
|
+ informationCollectionScheduleMapper.updateFsUserInformationCollectionSchedule(map);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
order.setStatus(2);
|
|
order.setStatus(2);
|