|
|
|
@ -13,6 +13,8 @@ import com.foreverwin.mesnac.common.service.CommonService;
|
|
|
|
|
import com.foreverwin.mesnac.common.util.StringUtil;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.dto.NcCodeDto;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.dto.SfcDto;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.mapper.UserGroupMapper;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.model.UserGroup;
|
|
|
|
|
import com.foreverwin.mesnac.meapi.service.NcCodeService;
|
|
|
|
|
import com.foreverwin.mesnac.production.mapper.SfcCrossMapper;
|
|
|
|
|
import com.foreverwin.mesnac.quality.dto.SelfReportRequest;
|
|
|
|
@ -60,6 +62,8 @@ public class SelfReportServiceImpl extends ServiceImpl<SelfReportMapper, SelfRep
|
|
|
|
|
private CommonService commonService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private NcCodeService ncCodeService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private UserGroupMapper userGroupMapper;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public IPage<SelfReport> selectPage(FrontPage<SelfReport> frontPage, SelfReport selfReport) {
|
|
|
|
@ -76,7 +80,18 @@ public class SelfReportServiceImpl extends ServiceImpl<SelfReportMapper, SelfRep
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public List<SelfReport> selectList(QueryWrapper<SelfReport> queryWrapper, String locale, LocalDate startTime, LocalDate endTime) {
|
|
|
|
|
return selfReportMapper.selectListByCondition(queryWrapper,locale,startTime,endTime);
|
|
|
|
|
String site = CommonMethods.getSite();
|
|
|
|
|
String user = CommonMethods.getUser();
|
|
|
|
|
List<UserGroup> userGroupList = userGroupMapper.findUserGroupListByUser(site, user);
|
|
|
|
|
//ADMINISTRATORS,如果有的话就等于null
|
|
|
|
|
for (UserGroup userGroup : userGroupList){
|
|
|
|
|
if("ADMINISTRATORS".equals(userGroup.getUserGroup())){
|
|
|
|
|
userGroupList = null;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return selfReportMapper.selectListByCondition(queryWrapper,locale,startTime,endTime,userGroupList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|