Commit a304661c by lijingjing

霍煤 - 修改任务分配- 任务调度 样品不显示问题;

parent 5b797fdb
...@@ -19,6 +19,7 @@ import com.patzn.cloud.service.hmhj.vo.AlGradeStatsVO; ...@@ -19,6 +19,7 @@ import com.patzn.cloud.service.hmhj.vo.AlGradeStatsVO;
import com.patzn.cloud.service.hmhj.vo.ElectrolyteRatioStatsVO; import com.patzn.cloud.service.hmhj.vo.ElectrolyteRatioStatsVO;
import com.patzn.cloud.service.hmhj.vo.EntrustSampleVO; import com.patzn.cloud.service.hmhj.vo.EntrustSampleVO;
import com.patzn.cloud.service.lims.hmhj.service.IEntrustSampleService; import com.patzn.cloud.service.lims.hmhj.service.IEntrustSampleService;
import com.patzn.cloud.service.lims.hmhj.service.impl.UserInfoServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
...@@ -43,6 +44,9 @@ public class EntrustSampleController extends ServiceController { ...@@ -43,6 +44,9 @@ public class EntrustSampleController extends ServiceController {
@Autowired @Autowired
private IEntrustSampleService entrustSampleService; private IEntrustSampleService entrustSampleService;
@Autowired
private UserInfoServiceImpl userInfoService;
@ApiOperation("分页列表") @ApiOperation("分页列表")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = RestConstants.PAGE_PAGE, value = "请求数据的页码", required = true, paramType = "query", dataTypeClass = Integer.class), @ApiImplicitParam(name = RestConstants.PAGE_PAGE, value = "请求数据的页码", required = true, paramType = "query", dataTypeClass = Integer.class),
...@@ -477,10 +481,18 @@ public class EntrustSampleController extends ServiceController { ...@@ -477,10 +481,18 @@ public class EntrustSampleController extends ServiceController {
@PostMapping("/page_input_by_sample_left") @PostMapping("/page_input_by_sample_left")
public RestResult<Page<EntrustSampleVO>> getPageInputByItemLeft(EntrustSampleVO sampleVO) { public RestResult<Page<EntrustSampleVO>> getPageInputByItemLeft(EntrustSampleVO sampleVO) {
sampleVO.setItemStatus(EntrustSampleItemStatusEnum.TEST); sampleVO.setItemStatus(EntrustSampleItemStatusEnum.TEST);
sampleVO.setTesterId(getAccount().getUserId()); handlerData(sampleVO);
return success(entrustSampleService.pageBySampleLeft(getPage(), sampleVO)); return success(entrustSampleService.pageBySampleLeft(getPage(), sampleVO));
} }
private void handlerData(EntrustSampleVO vo) {
// 数据来源
// 若为数据录入节点且不为分组管理员,那么需要过滤数据
boolean isLeader = userInfoService.isGroupLeader(vo.getEntrustId(),getAccount());
if("TEST".equalsIgnoreCase(vo.getSource()) && !isLeader){
vo.setTesterId(getAccount().getUserId());
}
}
@ApiOperation("数据录入历史按照样品录入左侧分页列表") @ApiOperation("数据录入历史按照样品录入左侧分页列表")
@ApiImplicitParams({ @ApiImplicitParams({
......
...@@ -328,9 +328,9 @@ public class EntrustSampleItemController extends ServiceController { ...@@ -328,9 +328,9 @@ public class EntrustSampleItemController extends ServiceController {
private void handlerData(EntrustSampleItemVO vo) { private void handlerData(EntrustSampleItemVO vo) {
// 数据来源 // 数据来源
// 若为数据录入节点或者不为分组管理员,那么需要过滤数据 // 若为数据录入节点不为分组管理员,那么需要过滤数据
if ("TEST".equalsIgnoreCase(vo.getSource()) || boolean isLeader = userInfoService.isGroupLeader(vo.getEntrustId(),getAccount());
!userInfoService.isGroupLeader(vo.getEntrustId(), getAccount())) { if("TEST".equalsIgnoreCase(vo.getSource()) && !isLeader){
vo.setTesterId(getAccount().getUserId()); vo.setTesterId(getAccount().getUserId());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment