This commit is contained in:
mashuai 2024-05-08 18:23:47 +08:00
parent f31c01c045
commit 99761fb49c
6 changed files with 22 additions and 14 deletions

View File

@ -661,7 +661,7 @@ public class TmTaskServiceImpl implements TmTaskService {
}
}
//施管部只能看到机具分公司101的数据
if ((roles.contains("jjfgs") || roles.contains("sgb")) && companyId != null) {
if ((companyId != null && companyId == 101) || ((roles.contains("jjfgs") || roles.contains("sgb")) && companyId != null)) {
List<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() == companyId.intValue()).collect(Collectors.toList());
if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) {
// 对领料任务集合查询具体详情

View File

@ -28,6 +28,8 @@ public class TreeSelect implements Serializable
private Long parentId;
private String companyId;
/** 子节点 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<TreeSelect> children;
@ -51,6 +53,7 @@ public class TreeSelect implements Serializable
this.level = Integer.valueOf(maType.getLevel());
this.id = maType.getTypeId();
this.label = maType.getTypeName();
this.companyId = maType.getCompanyId();
this.children = maType.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
public TreeSelect(SysDept dept)
@ -98,6 +101,14 @@ public class TreeSelect implements Serializable
this.label = label;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public List<TreeSelect> getChildren()
{
return children;

View File

@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT su.user_id as userId, su.nick_name as userName FROM `sys_user` su
LEFT JOIN sys_user_role sur ON su.user_id = sur.user_id
LEFT JOIN sys_role sr ON sr.role_id = sur.role_id
WHERE sr.role_id = '101' AND su.del_flag = '0'
WHERE sr.role_id = '132' AND su.del_flag = '0'
<if test="userName != null and userName != ''">
AND su.nick_name like concat('%', #{userName}, '%')
</if>

View File

@ -170,7 +170,6 @@ public class BackApplyController extends BaseController {
bean.setCode(code);
bean.setTaskType(36);
bean.setTaskStatus("37");
bean.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
// 创建任务
boolean addTaskResult = backApplyService.insertSelective(bean) > 0;
if (addTaskResult && bean.getTaskId() != null) {

View File

@ -48,14 +48,16 @@ public class PurchaseCheckInfoController extends BaseController {
//判断该组织是否开启综合服务中心审核
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
int re = purchaseCheckServiceCenterService.selectExamineType(companyId);
if (re > 0) {
startPage();
list = purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo);
/*if (re > 0) {
//若依框架多个查询会导致分页失效需分批处理
startPage();
list = purchaseCheckInfoService.selectPutInListExamine(purchaseCheckInfo);
} else {
startPage();
list = purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo);
}
}*/
return getDataTable(list);
}

View File

@ -10,17 +10,13 @@ import com.bonus.sgzb.material.domain.*;
import com.bonus.sgzb.material.mapper.BackApplyMapper;
import com.bonus.sgzb.material.mapper.TaskMapper;
import com.bonus.sgzb.material.service.BackApplyService;
import com.bonus.sgzb.material.vo.GlobalContants;
import com.bonus.sgzb.material.vo.TypeTreeBuild;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.*;
/**
* @author hay
@ -60,7 +56,7 @@ public class BackApplyServiceImpl implements BackApplyService {
List<BackApplyInfo> backApplyListByAdmin = backApplyMapper.getBackApplyListByAdmin(bean);
//机具分公司只能看到机具公司的退料
if (CollUtil.isNotEmpty(backApplyListByAdmin)) {
if (roles.contains("jjfgs")) {
if (roles.contains("jjfgs") || Objects.equals(companyId, 101L)) {
for (BackApplyInfo backApplyInfo : backApplyListByAdmin) {
if (StringUtils.hasText(backApplyInfo.getCompanyId()) && backApplyInfo.getCompanyId().contains(String.valueOf(companyId))) {
backApplyInfos.add(backApplyInfo);
@ -70,7 +66,7 @@ public class BackApplyServiceImpl implements BackApplyService {
}
//调试分公司只能看到调试公司的退料
if (CollUtil.isNotEmpty(backApplyListByAdmin)) {
if (roles.contains("tsfgs")) {
if (roles.contains("tsfgs") || Objects.equals(companyId, 102L)) {
for (BackApplyInfo backApplyInfo : backApplyListByAdmin) {
if (StringUtils.hasText(backApplyInfo.getCompanyId()) && backApplyInfo.getCompanyId().contains(String.valueOf(companyId))) {
backApplyInfos.add(backApplyInfo);
@ -249,7 +245,7 @@ public class BackApplyServiceImpl implements BackApplyService {
return AjaxResult.error("审核失败");
}
}
if (roles != null && roles.contains("jjfgs")) {
if ((roles != null && roles.contains("jjfgs")) || (companyId != null && companyId.equals(101L))) {
if (companyId != null) {
bean.setCompanyId(companyId.toString());
}
@ -262,7 +258,7 @@ public class BackApplyServiceImpl implements BackApplyService {
return AjaxResult.error("审核失败");
}
}
if (roles != null && roles.contains("tsfgs")) {
if ((roles != null && roles.contains("tsfgs")) || (companyId != null && companyId.equals(102L))) {
if (companyId != null) {
bean.setCompanyId(companyId.toString());
}