|
|
@@ -29,6 +29,7 @@ import com.fs.company.service.ICompanyService;
|
|
|
import com.fs.core.config.WxMaConfiguration;
|
|
|
import com.fs.core.config.WxPayProperties;
|
|
|
import com.fs.core.utils.OrderCodeUtils;
|
|
|
+import com.fs.course.param.CollectConfirmGeneratePrescribeParam;
|
|
|
import com.fs.course.param.CollectionBindUserParam;
|
|
|
import com.fs.course.param.CollectionInfoConfirmParam;
|
|
|
import com.fs.course.param.SubmitCollectionAnswerParam;
|
|
|
@@ -377,7 +378,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
//个微信息采集用户确认并生成医生待开处方
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public R generateFormalPrescription(CollectionInfoConfirmParam param) {
|
|
|
+ public R generateFormalPrescription(CollectConfirmGeneratePrescribeParam param) {
|
|
|
FsUserInformationCollection collection = fsUserInformationCollectionMapper.selectFsUserInformationCollectionById(param.getId());
|
|
|
if (collection == null) {
|
|
|
log.error("当前用户userId:{},信息采集表id:{}", param.getUserId(), param.getId());
|
|
|
@@ -404,12 +405,17 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
doctorConfirmService.insertFsDoctorConfirm(doctorConfirm);
|
|
|
//医生确认时间存入缓存 医生确认后删除
|
|
|
redisCache.setCacheObject("doctorConfirm:" + collection.getId(), doctorConfirm);
|
|
|
- return R.ok();
|
|
|
+ if (addPrescribeResult > 0){
|
|
|
+ R result=new R();
|
|
|
+ result.put("currentCode",collection.getPersonalCollectStatus());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
return R.error("用户确认失败");
|
|
|
}
|
|
|
|
|
|
- private FsPrescribe transformCollectionParamToFsPrescribe(CollectionInfoConfirmParam param, FsUserInformationCollection fsUserInformationCollection) {
|
|
|
+ private FsPrescribe transformCollectionParamToFsPrescribe(CollectConfirmGeneratePrescribeParam param, FsUserInformationCollection fsUserInformationCollection) {
|
|
|
//构建处方编号
|
|
|
String prescribeCode = IdUtil.getSnowflake(0, 0).nextIdStr();
|
|
|
FsPrescribe fsPrescribe = new FsPrescribe();
|
|
|
@@ -904,6 +910,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
}
|
|
|
}
|
|
|
vo.setQwTag(collection.getQwTag());
|
|
|
+ vo.setPersonalCollectStatus(collection.getPersonalCollectStatus());
|
|
|
vo.setIsPackage(collection.getIsPackage());
|
|
|
vo.setId(collection.getId());
|
|
|
vo.setAnswers(JSON.parseArray(collection.getJsonInfo(), AnswerVO.class));
|
|
|
@@ -1593,14 +1600,16 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
informationCollection.setCompleteStatus(0);
|
|
|
}
|
|
|
fsUserInformationCollectionMapper.updateFsUserInformationCollection(informationCollection);
|
|
|
-
|
|
|
- FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleRunningByCollectionId(informationCollection.getId());
|
|
|
- if (schedule == null) {
|
|
|
- throw new CustomException("用户采集信息已更新,请扫描最新二维码确认");
|
|
|
+ if (informationCollection.getQwTag()==0){//企业微信息采集需要记录填写时间
|
|
|
+ FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleRunningByCollectionId(informationCollection.getId());
|
|
|
+ if (schedule == null) {
|
|
|
+ throw new CustomException("用户采集信息已更新,请扫描最新二维码确认");
|
|
|
+ }
|
|
|
+ //设置填写时间
|
|
|
+ schedule.setFillTime(DateUtils.getNowDate());
|
|
|
+ result = scheduleMapper.updateFsUserInformationCollectionSchedule(schedule);
|
|
|
}
|
|
|
- //设置填写时间
|
|
|
- schedule.setFillTime(DateUtils.getNowDate());
|
|
|
- result = scheduleMapper.updateFsUserInformationCollectionSchedule(schedule);
|
|
|
+
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
@@ -1987,5 +1996,6 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
// System.out.println(JSON.toJSONString(collect));
|
|
|
// System.out.println(JSON.toJSONString(collect1));
|
|
|
boolean contains = "是否有糖尿病相关疾病?".contains("糖尿病");
|
|
|
+ System.out.println(calculateAge("1997-04-15"));
|
|
|
}
|
|
|
}
|