|
|
@@ -9,6 +9,7 @@ import com.github.zuihou.authority.entity.common.DictionaryItem;
|
|
|
import com.github.zuihou.base.R;
|
|
|
import com.github.zuihou.base.controller.SuperController;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourceBizMapper;
|
|
|
+import com.github.zuihou.business.productionResourceCenter.dao.StationUserMapper;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dto.StationUserPageDTO;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dto.StationUserSaveDTO;
|
|
|
import com.github.zuihou.business.productionResourceCenter.dto.StationUserUpdateDTO;
|
|
|
@@ -53,6 +54,8 @@ public class StationUserController extends SuperController<StationUserService, L
|
|
|
@Autowired
|
|
|
private StationUserLoginInfoMapper stationUserLoginInfoMapper;
|
|
|
@Autowired
|
|
|
+ private StationUserMapper stationUserMapper;
|
|
|
+ @Autowired
|
|
|
private ProductionresourceBizMapper productionresourceBizMapper;
|
|
|
|
|
|
|
|
|
@@ -137,15 +140,23 @@ public class StationUserController extends SuperController<StationUserService, L
|
|
|
@ApiOperation(value = "查询上下料用户", notes = "查询上下料用户")
|
|
|
@GetMapping("/getStation")
|
|
|
public R getStationByUser(@RequestParam(value="userId",required = false) String userId) {
|
|
|
- LbqWrapper<StationUserLoginInfo> wrapper = Wraps.<StationUserLoginInfo>lbQ();
|
|
|
+ /*LbqWrapper<StationUserLoginInfo> wrapper = Wraps.<StationUserLoginInfo>lbQ();
|
|
|
if(userId!= null){
|
|
|
wrapper.eq(StationUserLoginInfo::getUserId, userId);
|
|
|
}
|
|
|
StationUserLoginInfo stationUserLoginInfo = stationUserLoginInfoMapper.selectOne(wrapper);
|
|
|
if(BeanUtil.isEmpty(stationUserLoginInfo)){
|
|
|
return fail("当前登录用户非上下料用户");
|
|
|
+ }*/
|
|
|
+ LbqWrapper<StationUser> wrapper = Wraps.<StationUser>lbQ();
|
|
|
+ if(userId!= null){
|
|
|
+ wrapper.eq(StationUser::getUserId, userId);
|
|
|
+ }
|
|
|
+ StationUser stationUser = stationUserMapper.selectOne(wrapper);
|
|
|
+ if(BeanUtil.isEmpty(stationUser)){
|
|
|
+ return fail("当前登录用户非上下料用户");
|
|
|
}
|
|
|
- com.github.zuihou.business.productionResourceCenter.entity.Productionresource productionresource = productionresourceBizMapper.selectById(stationUserLoginInfo.getStationId());
|
|
|
+ com.github.zuihou.business.productionResourceCenter.entity.Productionresource productionresource = productionresourceBizMapper.selectById(stationUser.getStationId());
|
|
|
List<Productionresource> productionresources = new ArrayList<>();
|
|
|
productionresources.add(productionresource);
|
|
|
return success(productionresources);
|