|
@@ -468,8 +468,9 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
queryWrapper.eq("cw_prs1.status", projectReportData.getStatus1());
|
|
|
}
|
|
|
String isBmzr = "0";
|
|
|
- String officeIds = "";
|
|
|
+ StringBuilder officeIds = new StringBuilder();
|
|
|
UserDTO userDTO = UserUtils.getCurrentUserDTO();
|
|
|
+ List<String> manageOfficeIdList= Lists.newArrayList();
|
|
|
if (CommonUtils.haveRoleCwBmzr()) {
|
|
|
if (CommonUtils.haveRoleZkbzr()) {
|
|
|
// 质控部主任展示全部报告
|
|
@@ -486,16 +487,32 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
// 财务_员工展示自己所属项目、自己创建的报告
|
|
|
isBmzr = "0";
|
|
|
}
|
|
|
+ } else if (CommonUtils.haveRoleZjzcy()) {
|
|
|
+ // 专家组成员展示自己审核过的报告
|
|
|
+ isBmzr = "3";
|
|
|
} else {
|
|
|
//判定是否为会计所长
|
|
|
if(CommonUtils.haveRoleKjsz()){
|
|
|
- if("兴光审计一部".equals(userDTO.getOfficeDTO().getName())){ //兴光审计一部
|
|
|
+ isBmzr = "one";
|
|
|
+ //获取当前人管理的部门id
|
|
|
+ if(StringUtils.isNotBlank(userDTO.getManageOfficeIds())){
|
|
|
+ manageOfficeIdList = Arrays.asList(userDTO.getManageOfficeIds().split(","));
|
|
|
+ }else{
|
|
|
+ manageOfficeIdList.add(userDTO.getOfficeDTO().getId());
|
|
|
+ }
|
|
|
+ for (int i = 0; i <manageOfficeIdList.size(); i++){
|
|
|
+ officeIds.append("'").append(manageOfficeIdList.get(i)).append("'");
|
|
|
+ if(i < manageOfficeIdList.size()-1){
|
|
|
+ officeIds.append(",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /*if("兴光审计一部".equals(userDTO.getOfficeDTO().getName())){ //兴光审计一部
|
|
|
isBmzr = "one";
|
|
|
officeIds = "'" + userDTO.getOfficeDTO().getId() + "','1602840212125847554'"; //添加驻外分部部门id信息
|
|
|
}else if("兴光审计二部".equals(userDTO.getOfficeDTO().getName())){ //兴光审计二部
|
|
|
isBmzr = "one";
|
|
|
officeIds = "'" + userDTO.getOfficeDTO().getId() + "'";
|
|
|
- }
|
|
|
+ }*/
|
|
|
}else{
|
|
|
// 其他人默认展示全部数据
|
|
|
isBmzr = "2";
|
|
@@ -503,7 +520,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
}
|
|
|
|
|
|
|
|
|
- IPage<CwProjectReportData> list = reportMapper.findList(page,userDTO,isBmzr, officeIds, queryWrapper);
|
|
|
+ IPage<CwProjectReportData> list = reportMapper.findList(page,userDTO,isBmzr, officeIds.toString(), queryWrapper);
|
|
|
return list;
|
|
|
|
|
|
}
|
|
@@ -813,12 +830,19 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
List<ReviewUser> stringList = new ArrayList<>();
|
|
|
//如果是苏州分部,这里写死
|
|
|
String officeId = reportMapper.getOfficeId("苏州分部");
|
|
|
- if (reportData.getOfficeId().equals(officeId)){
|
|
|
+ /*if (reportData.getOfficeId().equals(officeId)){
|
|
|
stringList = reportMapper.getReviewByS("13");
|
|
|
}else if (reportData.getReportType().equals("1")) {
|
|
|
stringList = reportMapper.getReviewByS("1");
|
|
|
} else {
|
|
|
- stringList = reportMapper.getReviewByS("2");
|
|
|
+ stringList = reportMapper.getReviewByS("非苏兴会基字");
|
|
|
+ }*/
|
|
|
+ if (reportData.getOfficeId().equals(officeId)){
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-苏州分布");
|
|
|
+ }else if (reportData.getReportType().equals("1")) {
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-财务-苏兴会基字");
|
|
|
+ } else {
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-财务-非苏兴会基字");
|
|
|
}
|
|
|
reportData.setReviewBys(stringList);
|
|
|
//将新增行数据查询出来放入到cwProjectInfoList中
|
|
@@ -990,12 +1014,19 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
List<ReviewUser> stringList = new ArrayList<>();
|
|
|
//如果是苏州分部,这里写死
|
|
|
String officeId = reportMapper.getOfficeId("苏州分部");
|
|
|
- if (reportData.getOfficeId().equals(officeId)){
|
|
|
+ /*if (reportData.getOfficeId().equals(officeId)){
|
|
|
stringList = reportMapper.getReviewByS("13");
|
|
|
}else if (reportData.getReportType().equals("1")) {
|
|
|
stringList = reportMapper.getReviewByS("1");
|
|
|
} else {
|
|
|
stringList = reportMapper.getReviewByS("2");
|
|
|
+ }*/
|
|
|
+ if (reportData.getOfficeId().equals(officeId)){
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-苏州分布");
|
|
|
+ }else if (reportData.getReportType().equals("1")) {
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-财务-苏兴会基字");
|
|
|
+ } else {
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-财务-非苏兴会基字");
|
|
|
}
|
|
|
reportData.setReviewBys(stringList);
|
|
|
} else {
|
|
@@ -1133,12 +1164,19 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
|
|
|
List<ReviewUser> stringList = new ArrayList<>();
|
|
|
//如果是苏州分部,这里写死
|
|
|
String officeId = reportMapper.getOfficeId("苏州分部");
|
|
|
- if (reportData.getOfficeId().equals(officeId)){
|
|
|
+ /*if (reportData.getOfficeId().equals(officeId)){
|
|
|
stringList = reportMapper.getReviewByS("13");
|
|
|
}else if (reportData.getReportType().equals("1")) {
|
|
|
stringList = reportMapper.getReviewByS("1");
|
|
|
} else {
|
|
|
stringList = reportMapper.getReviewByS("2");
|
|
|
+ }*/
|
|
|
+ if (reportData.getOfficeId().equals(officeId)){
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-苏州分布");
|
|
|
+ }else if (reportData.getReportType().equals("1")) {
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-财务-苏兴会基字");
|
|
|
+ } else {
|
|
|
+ stringList = reportMapper.getReviewByPost("质控-财务-非苏兴会基字");
|
|
|
}
|
|
|
reportData.setReviewBys(stringList);
|
|
|
//将新增行数据查询出来放入到cwProjectInfoList中
|