|
|
@@ -10,12 +10,11 @@ import com.fs.his.domain.*;
|
|
|
import com.fs.his.mapper.FsStoreOrderMapper;
|
|
|
import com.fs.his.param.CollectionInfoConfirmParam;
|
|
|
import com.fs.his.param.FsUserInformationCollectionParam;
|
|
|
-import com.fs.his.service.IFsPackageOrderService;
|
|
|
-import com.fs.his.service.IFsPatientService;
|
|
|
-import com.fs.his.service.IFsStoreOrderService;
|
|
|
-import com.fs.his.service.IFsUserInformationCollectionService;
|
|
|
+import com.fs.his.service.*;
|
|
|
import com.fs.his.service.impl.FsStoreOrderServiceImpl;
|
|
|
+import com.fs.his.service.impl.FsUserServiceImpl;
|
|
|
import com.fs.his.vo.FsUserInformationCollectionAndPatientVO;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -35,6 +34,8 @@ public class FsUserInformationCollectionController extends AppBaseController
|
|
|
{
|
|
|
@Autowired
|
|
|
private IFsUserInformationCollectionService fsUserInformationCollectionService;
|
|
|
+ @Autowired
|
|
|
+ private IFsUserService fsUserService;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -50,7 +51,7 @@ public class FsUserInformationCollectionController extends AppBaseController
|
|
|
return R.error("未查询到信息!");
|
|
|
}
|
|
|
String userId = getUserId();
|
|
|
- if (vo.getUserId() != Long.parseLong(userId)){
|
|
|
+ if (vo.getUserId()!=null && vo.getUserId() != Long.parseLong(userId)){
|
|
|
return R.error("未查询您的采集信息!");
|
|
|
}
|
|
|
if (vo.getDoctorConfirm() == 0){
|
|
|
@@ -76,12 +77,24 @@ public class FsUserInformationCollectionController extends AppBaseController
|
|
|
return R.error("未查询到信息!");
|
|
|
}
|
|
|
String userId = getUserId();
|
|
|
- if (info.getUserId() != Long.parseLong(userId)){
|
|
|
- return R.error("您没有修改信息的权限");
|
|
|
- }
|
|
|
- if (!info.getUserId().equals(fsUserInformationCollection.getUserId())){
|
|
|
- return R.error("用户id不能修改");
|
|
|
+ long nowUserId = Long.parseLong(userId);
|
|
|
+ if (info.getUserId()!=null){
|
|
|
+ if (info.getUserId() != nowUserId){
|
|
|
+ return R.error("您没有修改信息的权限");
|
|
|
+ }
|
|
|
+ if (!info.getUserId().equals(fsUserInformationCollection.getUserId())){
|
|
|
+ return R.error("用户id不能修改");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ FsUser fsUser = fsUserService.selectFsUserById(nowUserId);
|
|
|
+ String nickname = fsUser.getNickname();
|
|
|
+ if (StringUtils.isNotBlank(nickname)){
|
|
|
+ nickname = fsUser.getNickName();
|
|
|
+ }
|
|
|
+ fsUserInformationCollection.setUserId(nowUserId);
|
|
|
+ fsUserInformationCollection.setUserName(nickname);
|
|
|
}
|
|
|
+
|
|
|
fsUserInformationCollectionService.update(fsUserInformationCollection);
|
|
|
return R.ok();
|
|
|
}
|