领料申请通过流程
This commit is contained in:
parent
51d2ae84ca
commit
fc31e413c9
|
|
@ -124,7 +124,7 @@ public class TokenController {
|
||||||
@PostMapping("register")
|
@PostMapping("register")
|
||||||
public R<?> register(@RequestBody RegisterBody registerBody) {
|
public R<?> register(@RequestBody RegisterBody registerBody) {
|
||||||
// 用户注册
|
// 用户注册
|
||||||
sysLoginService.register(registerBody.getUsername(), registerBody.getPassword());
|
sysLoginService.register(registerBody);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.sgzb.auth.service;
|
package com.bonus.sgzb.auth.service;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.auth.form.RegisterBody;
|
||||||
import com.bonus.sgzb.common.core.constant.CacheConstants;
|
import com.bonus.sgzb.common.core.constant.CacheConstants;
|
||||||
import com.bonus.sgzb.common.core.constant.Constants;
|
import com.bonus.sgzb.common.core.constant.Constants;
|
||||||
import com.bonus.sgzb.common.core.constant.SecurityConstants;
|
import com.bonus.sgzb.common.core.constant.SecurityConstants;
|
||||||
|
|
@ -199,7 +200,10 @@ public class SysLoginService {
|
||||||
/**
|
/**
|
||||||
* 注册
|
* 注册
|
||||||
*/
|
*/
|
||||||
public void register(String username, String password) {
|
public void register(RegisterBody registerBody) {
|
||||||
|
String username = registerBody.getUsername();
|
||||||
|
String password = registerBody.getPassword();
|
||||||
|
String phone = registerBody.getPhone();
|
||||||
// 用户名或密码为空 错误
|
// 用户名或密码为空 错误
|
||||||
if (StringUtils.isAnyBlank(username, password)) {
|
if (StringUtils.isAnyBlank(username, password)) {
|
||||||
throw new ServiceException("用户/密码必须填写");
|
throw new ServiceException("用户/密码必须填写");
|
||||||
|
|
@ -218,6 +222,7 @@ public class SysLoginService {
|
||||||
sysUser.setUserName(username);
|
sysUser.setUserName(username);
|
||||||
sysUser.setNickName(username);
|
sysUser.setNickName(username);
|
||||||
sysUser.setPassword(SecurityUtils.encryptPassword(password));
|
sysUser.setPassword(SecurityUtils.encryptPassword(password));
|
||||||
|
sysUser.setPhonenumber(phone);
|
||||||
R<?> registerResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
|
R<?> registerResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
|
||||||
|
|
||||||
if (R.FAIL == registerResult.getCode()) {
|
if (R.FAIL == registerResult.getCode()) {
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,8 @@ public class TmTaskController extends BaseController {
|
||||||
util.exportExcel(response, leaseAuditList, "领料申请数据");
|
util.exportExcel(response, leaseAuditList, "领料申请数据");
|
||||||
} else {
|
} else {
|
||||||
//领料管理的数据
|
//领料管理的数据
|
||||||
List<TmTaskDto> tmTaskDtos = Convert.toList(TmTaskDto.class, leaseAuditList);
|
List<TmTask> leaseAuditManageList = tmTaskService.getLeaseAuditManageList(task);
|
||||||
|
List<TmTaskDto> tmTaskDtos = Convert.toList(TmTaskDto.class, leaseAuditManageList);
|
||||||
ExcelUtil<TmTaskDto> util = new ExcelUtil<TmTaskDto>(TmTaskDto.class);
|
ExcelUtil<TmTaskDto> util = new ExcelUtil<TmTaskDto>(TmTaskDto.class);
|
||||||
util.exportExcel(response, tmTaskDtos, "领料管理数据");
|
util.exportExcel(response, tmTaskDtos, "领料管理数据");
|
||||||
}
|
}
|
||||||
|
|
@ -356,7 +357,7 @@ public class TmTaskController extends BaseController {
|
||||||
if (StringUtils.isNotBlank(role)) {
|
if (StringUtils.isNotBlank(role)) {
|
||||||
if (role.contains("admin")) {
|
if (role.contains("admin")) {
|
||||||
//如果是管理员可以看到所有的审核列表
|
//如果是管理员可以看到所有的审核列表
|
||||||
List<TmTask> leaseAuditList = tmTaskService.getLeaseAuditList(task);
|
List<TmTask> leaseAuditList = tmTaskService.getLeaseAuditListByAdmin(task);
|
||||||
return AjaxResult.success(getDataTable(leaseAuditList));
|
return AjaxResult.success(getDataTable(leaseAuditList));
|
||||||
}
|
}
|
||||||
String[] split = role.split(",");
|
String[] split = role.split(",");
|
||||||
|
|
@ -416,7 +417,7 @@ public class TmTaskController extends BaseController {
|
||||||
return AjaxResult.error("参数错误");
|
return AjaxResult.error("参数错误");
|
||||||
}
|
}
|
||||||
startPage();
|
startPage();
|
||||||
List<TmTask> leaseAuditList = tmTaskService.getLeaseAuditList(task);
|
List<TmTask> leaseAuditList = tmTaskService.getLeaseAuditListByOne(task);
|
||||||
return AjaxResult.success(getDataTable(leaseAuditList));
|
return AjaxResult.success(getDataTable(leaseAuditList));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,8 @@ public interface TmTaskMapper {
|
||||||
/** 更新LeaseApplyInfo审批信息 */
|
/** 更新LeaseApplyInfo审批信息 */
|
||||||
int updateLeaseApplyInfoAuditInfo(@Param("record") LeaseApplyInfo record);
|
int updateLeaseApplyInfoAuditInfo(@Param("record") LeaseApplyInfo record);
|
||||||
|
|
||||||
|
List<LeaseApplyInfo> getLeaseApplyInfo(Integer taskId);
|
||||||
|
|
||||||
/** 更新LeaseApplyInfo驳回信息 */
|
/** 更新LeaseApplyInfo驳回信息 */
|
||||||
int updateLeaseApplyInfoRejectInfo(@Param("record") LeaseApplyInfo record);
|
int updateLeaseApplyInfoRejectInfo(@Param("record") LeaseApplyInfo record);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,9 @@ import java.util.List;
|
||||||
public interface TmTaskService{
|
public interface TmTaskService{
|
||||||
|
|
||||||
List<TmTask> getLeaseAuditList(TmTask record);
|
List<TmTask> getLeaseAuditList(TmTask record);
|
||||||
|
List<TmTask> getLeaseAuditListByOne(TmTask record);
|
||||||
|
|
||||||
|
List<TmTask> getLeaseAuditListByAdmin(TmTask record);
|
||||||
|
|
||||||
List<TmTask> getLeaseAuditManageList(TmTask record);
|
List<TmTask> getLeaseAuditManageList(TmTask record);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,10 @@ import com.bonus.sgzb.app.domain.LeaseApplyInfo;
|
||||||
import com.bonus.sgzb.app.domain.TmTask;
|
import com.bonus.sgzb.app.domain.TmTask;
|
||||||
import com.bonus.sgzb.app.mapper.TmTaskMapper;
|
import com.bonus.sgzb.app.mapper.TmTaskMapper;
|
||||||
import com.bonus.sgzb.app.service.TmTaskService;
|
import com.bonus.sgzb.app.service.TmTaskService;
|
||||||
import com.bonus.sgzb.base.domain.MaintenanceGang;
|
|
||||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
@ -21,6 +19,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -46,9 +45,9 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
@Transactional
|
@Transactional
|
||||||
public int updateLeaseTaskAuditInfo(TmTask record) {
|
public int updateLeaseTaskAuditInfo(TmTask record) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
int taskId = 0;
|
||||||
|
int num = 0;
|
||||||
if (StringUtils.isNotNull(record)) {
|
if (StringUtils.isNotNull(record)) {
|
||||||
// 先审核任务表
|
|
||||||
result += tmTaskMapper.updateTmTaskAuditStatus(record);
|
|
||||||
// 内部审核
|
// 内部审核
|
||||||
if (record.getTaskStatus() == 33) {
|
if (record.getTaskStatus() == 33) {
|
||||||
Integer companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId().intValue();
|
Integer companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId().intValue();
|
||||||
|
|
@ -58,12 +57,24 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
List<LeaseApplyInfo> applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(companyId)).collect(Collectors.toList());
|
List<LeaseApplyInfo> applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(companyId)).collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(applyInfoList)) {
|
if (CollUtil.isNotEmpty(applyInfoList)) {
|
||||||
for (LeaseApplyInfo leaseApplyInfo : applyInfoList) {
|
for (LeaseApplyInfo leaseApplyInfo : applyInfoList) {
|
||||||
|
taskId = leaseApplyInfo.getTaskId();
|
||||||
if (leaseApplyInfo != null) {
|
if (leaseApplyInfo != null) {
|
||||||
//leaseApplyInfo.setExamineStatusId(record.getExamineStatusId());
|
//leaseApplyInfo.setExamineStatusId(record.getExamineStatusId());
|
||||||
result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(leaseApplyInfo);
|
result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(leaseApplyInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
List<LeaseApplyInfo> leaseApplyInfo = tmTaskMapper.getLeaseApplyInfo(taskId);
|
||||||
|
for (LeaseApplyInfo applyInfo : leaseApplyInfo) {
|
||||||
|
if (applyInfo.getStatus().equals("1") || applyInfo.getStatus().equals("3")) {
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//说明全部审核完成
|
||||||
|
if (num == leaseApplyInfo.size()) {
|
||||||
|
// 再审核任务表
|
||||||
|
result += tmTaskMapper.updateTmTaskAuditStatus(record);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 再审核领料任务详情表
|
// 再审核领料任务详情表
|
||||||
List<LeaseApplyDetails> leaseApplyDetails = record.getLeaseApplyDetails();
|
List<LeaseApplyDetails> leaseApplyDetails = record.getLeaseApplyDetails();
|
||||||
|
|
@ -78,6 +89,8 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// 先审核任务表
|
||||||
|
result += tmTaskMapper.updateTmTaskAuditStatus(record);
|
||||||
// 分公司和分管审核
|
// 分公司和分管审核
|
||||||
// 再审核领料任务信息表
|
// 再审核领料任务信息表
|
||||||
List<LeaseApplyInfo> leaseApplyInfoList = record.getLeaseApplyInfoList();
|
List<LeaseApplyInfo> leaseApplyInfoList = record.getLeaseApplyInfoList();
|
||||||
|
|
@ -110,6 +123,46 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
* 获取领料申请列表
|
* 获取领料申请列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
public List<TmTask> getLeaseAuditListByOne(TmTask record) {
|
||||||
|
List<TmTask> tmTaskList = tmTaskMapper.getAuditListByLeaseTmTask(record);
|
||||||
|
for (TmTask tmTask : tmTaskList) {
|
||||||
|
int count = 0;
|
||||||
|
if (tmTask != null) {
|
||||||
|
// 去查询任务分单表
|
||||||
|
List<LeaseApplyInfo> auditListByLeaseInfo = tmTaskMapper.getAuditListByLeaseInfo(tmTask);
|
||||||
|
if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) {
|
||||||
|
// 对领料任务集合查询具体详情
|
||||||
|
for (LeaseApplyInfo leaseApplyInfo : auditListByLeaseInfo) {
|
||||||
|
if (leaseApplyInfo != null) {
|
||||||
|
// 去查询领料任务详情表
|
||||||
|
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo);
|
||||||
|
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||||
|
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||||
|
if (leaseApplyDetail != null) {
|
||||||
|
// 统计预领数量
|
||||||
|
count += leaseApplyDetail.getPreNum();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 塞入领料任务详情的集合中
|
||||||
|
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 存入领料任务实体集合
|
||||||
|
tmTask.setLeaseApplyInfoList(auditListByLeaseInfo);
|
||||||
|
}
|
||||||
|
// 塞入预领的合计数量
|
||||||
|
tmTask.setPreCountNum(count);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return tmTaskList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单个申请列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public List<TmTask> getLeaseAuditList(TmTask record) {
|
public List<TmTask> getLeaseAuditList(TmTask record) {
|
||||||
List<TmTask> collect = tmTaskMapper.getAuditListByLeaseTmTask(record);
|
List<TmTask> collect = tmTaskMapper.getAuditListByLeaseTmTask(record);
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
|
|
@ -148,6 +201,46 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
return tmTaskList;
|
return tmTaskList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取领料申请列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TmTask> getLeaseAuditListByAdmin(TmTask record) {
|
||||||
|
List<TmTask> tmTaskList = tmTaskMapper.getAuditListByLeaseTmTask(record);
|
||||||
|
for (TmTask tmTask : tmTaskList) {
|
||||||
|
int count = 0;
|
||||||
|
if (tmTask != null) {
|
||||||
|
// 去查询任务分单表
|
||||||
|
List<LeaseApplyInfo> auditListByLeaseInfo = tmTaskMapper.getAuditListByLeaseInfo(tmTask);
|
||||||
|
if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) {
|
||||||
|
// 对领料任务集合查询具体详情
|
||||||
|
for (LeaseApplyInfo leaseApplyInfo : auditListByLeaseInfo) {
|
||||||
|
if (leaseApplyInfo != null) {
|
||||||
|
// 去查询领料任务详情表
|
||||||
|
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo);
|
||||||
|
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||||
|
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||||
|
if (leaseApplyDetail != null) {
|
||||||
|
// 统计预领数量
|
||||||
|
count += leaseApplyDetail.getPreNum();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 塞入领料任务详情的集合中
|
||||||
|
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 存入领料任务实体集合
|
||||||
|
tmTask.setLeaseApplyInfoList(auditListByLeaseInfo);
|
||||||
|
}
|
||||||
|
// 塞入预领的合计数量
|
||||||
|
tmTask.setPreCountNum(count);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return tmTaskList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取领料管理列表
|
* 获取领料管理列表
|
||||||
*/
|
*/
|
||||||
|
|
@ -160,8 +253,30 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
if (tmTask != null) {
|
if (tmTask != null) {
|
||||||
// 去查询任务分单表
|
// 去查询任务分单表
|
||||||
List<LeaseApplyInfo> collect = tmTaskMapper.getAuditManageListByLeaseInfo(tmTask);
|
List<LeaseApplyInfo> collect = tmTaskMapper.getAuditManageListByLeaseInfo(tmTask);
|
||||||
|
//管理员可以看到所有数据
|
||||||
|
if (roles.contains("admin")) {
|
||||||
|
// 对领料任务集合查询具体详情
|
||||||
|
for (LeaseApplyInfo leaseApplyInfo : collect) {
|
||||||
|
if (leaseApplyInfo != null) {
|
||||||
|
// 去查询领料任务详情表
|
||||||
|
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyManageDetails(leaseApplyInfo);
|
||||||
|
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||||
|
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||||
|
if (leaseApplyDetail != null) {
|
||||||
|
// 统计预领数量
|
||||||
|
count += leaseApplyDetail.getPreNum();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 塞入领料任务详情的集合中
|
||||||
|
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 存入领料任务实体集合
|
||||||
|
tmTask.setLeaseApplyInfoList(collect);
|
||||||
|
}
|
||||||
//施管部只能看到机具分公司(101)的数据
|
//施管部只能看到机具分公司(101)的数据
|
||||||
if (roles.contains("sgb")){
|
if (roles.contains("sgb")) {
|
||||||
List<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() == 101).collect(Collectors.toList());
|
List<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() == 101).collect(Collectors.toList());
|
||||||
if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) {
|
if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) {
|
||||||
// 对领料任务集合查询具体详情
|
// 对领料任务集合查询具体详情
|
||||||
|
|
@ -186,7 +301,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//安监部只能看到设备分公司(102)的数据
|
//安监部只能看到设备分公司(102)的数据
|
||||||
if (roles.contains("ajb")){
|
if (roles.contains("ajb")) {
|
||||||
List<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() == 102).collect(Collectors.toList());
|
List<LeaseApplyInfo> auditListByLeaseInfo = collect.stream().filter(t -> t.getCompanyId() == 102).collect(Collectors.toList());
|
||||||
if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) {
|
if (auditListByLeaseInfo != null && !auditListByLeaseInfo.isEmpty()) {
|
||||||
// 对领料任务集合查询具体详情
|
// 对领料任务集合查询具体详情
|
||||||
|
|
@ -214,7 +329,8 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
tmTask.setPreCountNum(count);
|
tmTask.setPreCountNum(count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tmTaskList;
|
List<TmTask> tmTasks = tmTaskList.stream().filter(t -> t.getLeaseApplyInfoList() != null).collect(Collectors.toList());
|
||||||
|
return tmTasks;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -482,9 +598,9 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
List<LeaseApplyDetails> listLeaseDetails = new ArrayList<>();
|
List<LeaseApplyDetails> listLeaseDetails = new ArrayList<>();
|
||||||
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
|
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
|
||||||
if (leaseApplyInfo != null) {
|
if (leaseApplyInfo != null) {
|
||||||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
/* SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||||
//获取当前用户所属公司id
|
//获取当前用户所属公司id
|
||||||
Long companyId = sysUser.getCompanyId();
|
Long companyId = sysUser.getCompanyId();*/
|
||||||
//获取当前用户的角色
|
//获取当前用户的角色
|
||||||
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
@ -493,8 +609,12 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
}
|
}
|
||||||
String rolesStr = sb.toString();
|
String rolesStr = sb.toString();
|
||||||
//如果是内部人员,加上所属公司
|
//如果是内部人员,加上所属公司
|
||||||
if ((rolesStr.contains("jjfgs") && !rolesStr.contains("admin")) || (rolesStr.contains("tsfgs") && !rolesStr.contains("admin"))) {
|
if ((rolesStr.contains("jjfgs") && !rolesStr.contains("admin"))) {
|
||||||
leaseApplyInfo.setCompanyId(Integer.parseInt(companyId.toString()));
|
leaseApplyInfo.setCompanyId(101);
|
||||||
|
}
|
||||||
|
//如果是内部人员,加上所属公司
|
||||||
|
if ((rolesStr.contains("tsfgs") && !rolesStr.contains("admin"))) {
|
||||||
|
leaseApplyInfo.setCompanyId(102);
|
||||||
}
|
}
|
||||||
// 去查询领料任务详情表
|
// 去查询领料任务详情表
|
||||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo);
|
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo);
|
||||||
|
|
|
||||||
|
|
@ -643,7 +643,7 @@
|
||||||
LEFT JOIN sys_user su2 ON lai.company_audit_by = su2.user_id
|
LEFT JOIN sys_user su2 ON lai.company_audit_by = su2.user_id
|
||||||
LEFT JOIN sys_user su3 ON lai.dept_audit_by = su3.user_id
|
LEFT JOIN sys_user su3 ON lai.dept_audit_by = su3.user_id
|
||||||
LEFT JOIN sys_user su4 ON lai.direct_audit_by = su4.user_id
|
LEFT JOIN sys_user su4 ON lai.direct_audit_by = su4.user_id
|
||||||
WHERE tt.task_id = #{taskId}
|
WHERE tt.task_id = #{taskId} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLeaseListByLeaseInfo" resultType="com.bonus.sgzb.app.domain.LeaseApplyInfo">
|
<select id="getLeaseListByLeaseInfo" resultType="com.bonus.sgzb.app.domain.LeaseApplyInfo">
|
||||||
|
|
@ -695,7 +695,7 @@
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
WHERE
|
WHERE
|
||||||
task_id = #{record.taskId}
|
task_id = #{record.taskId} and company_id = #{record.companyId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateLeaseApplyInfoRejectInfo">
|
<update id="updateLeaseApplyInfoRejectInfo">
|
||||||
|
|
@ -795,5 +795,9 @@
|
||||||
from ma_type_keeper mtk
|
from ma_type_keeper mtk
|
||||||
where mtk.type_id = #{typeId}
|
where mtk.type_id = #{typeId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getLeaseApplyInfo" resultType="com.bonus.sgzb.app.domain.LeaseApplyInfo">
|
||||||
|
SELECT * FROM `lease_apply_info`
|
||||||
|
WHERE task_id = #{taskId} AND `status` ='1'
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,7 @@ public class SysUserController extends BaseController
|
||||||
* 根据用户编号获取详细信息
|
* 根据用户编号获取详细信息
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:user:query")
|
@RequiresPermissions("system:user:query")
|
||||||
@GetMapping(value = { "/", "/{userId}" })
|
@GetMapping(value = { "", "/{userId}" })
|
||||||
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
|
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
|
||||||
{
|
{
|
||||||
userService.checkUserDataScope(userId);
|
userService.checkUserDataScope(userId);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue