材料站
This commit is contained in:
parent
802001f039
commit
d70a67e46f
|
|
@ -11,6 +11,7 @@ import javax.validation.constraints.Size;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退料任务对象 back_apply_info
|
* 退料任务对象 back_apply_info
|
||||||
|
|
@ -190,4 +191,9 @@ public class MaterialBackApplyInfo implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty(value = "实施单位id")
|
@ApiModelProperty(value = "实施单位id")
|
||||||
private String impUnit;
|
private String impUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* i8工程id集合
|
||||||
|
*/
|
||||||
|
private List<String> projectIdList;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退料任务对象 back_apply_info
|
* 退料任务对象 back_apply_info
|
||||||
|
|
@ -156,4 +157,9 @@ public class MaterialBackApplyTotalInfo implements Serializable {
|
||||||
@ApiModelProperty(value = "实施单位id")
|
@ApiModelProperty(value = "实施单位id")
|
||||||
private String impUnit;
|
private String impUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* i8工程id集合
|
||||||
|
*/
|
||||||
|
private List<String> projectIdList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import lombok.Data;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领料任务详细对象 lease_apply_details
|
* 领料任务详细对象 lease_apply_details
|
||||||
|
|
@ -158,4 +159,9 @@ public class LeaseApplyDetailsInfo extends BaseEntity {
|
||||||
|
|
||||||
@ApiModelProperty(value = "实施单位id")
|
@ApiModelProperty(value = "实施单位id")
|
||||||
private String impUnit;
|
private String impUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* i8工程id集合
|
||||||
|
*/
|
||||||
|
private List<String> projectIdList;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -305,4 +305,9 @@ public class MaterialLeaseApplyInfo extends BaseEntity {
|
||||||
* 班组长身份证号
|
* 班组长身份证号
|
||||||
*/
|
*/
|
||||||
private String teamLeaderIdCard;
|
private String teamLeaderIdCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* i8工程id集合
|
||||||
|
*/
|
||||||
|
private List<String> projectIdList;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -214,4 +214,9 @@ public class MaterialRetainedEquipmentInfo {
|
||||||
|
|
||||||
@ApiModelProperty(value = "实施单位id")
|
@ApiModelProperty(value = "实施单位id")
|
||||||
private String impUnit;
|
private String impUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* i8工程id集合
|
||||||
|
*/
|
||||||
|
private List<String> projectIdList;
|
||||||
}
|
}
|
||||||
|
|
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工器具领料记录详情
|
* 工器具领料记录详情
|
||||||
|
|
@ -96,4 +97,9 @@ public class LeaseTotalInfo {
|
||||||
|
|
||||||
@ApiModelProperty(value = "身份证号码")
|
@ApiModelProperty(value = "身份证号码")
|
||||||
private String idCard;
|
private String idCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* i8工程id集合
|
||||||
|
*/
|
||||||
|
private List<String> projectIdList;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,19 +81,28 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<MaterialBackApplyInfo> selectBackApplyInfoList(MaterialBackApplyInfo backApplyInfo) {
|
public List<MaterialBackApplyInfo> selectBackApplyInfoList(MaterialBackApplyInfo backApplyInfo) {
|
||||||
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
|
// 根据用户名判断用户是否为班组长
|
||||||
|
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
||||||
|
if (teamData == null) {
|
||||||
|
// 根据用户名查询项目部信息
|
||||||
|
String departId = mapper.getDepartId(username);
|
||||||
|
// 根据项目部id查询工程信息
|
||||||
|
List<String> projectIdList = mapper.getProjectId(departId);
|
||||||
|
if (!org.springframework.util.CollectionUtils.isEmpty(projectIdList)) {
|
||||||
|
backApplyInfo.setProjectIdList(projectIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
List<MaterialBackApplyInfo> list = materialBackInfoMapper.selectBackApplyInfoList(backApplyInfo);
|
List<MaterialBackApplyInfo> list = materialBackInfoMapper.selectBackApplyInfoList(backApplyInfo);
|
||||||
// 如果列表为空,直接返回空列表
|
// 如果列表为空,直接返回空列表
|
||||||
if (CollectionUtils.isEmpty(list)) {
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
|
||||||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||||
if (!org.springframework.util.CollectionUtils.isEmpty(list) && deptId != null) {
|
if (!org.springframework.util.CollectionUtils.isEmpty(list) && deptId != null) {
|
||||||
// 删除元素
|
// 删除元素
|
||||||
list.removeIf(info -> !deptId.toString().equals(info.getImpUnit()));
|
list.removeIf(info -> !deptId.toString().equals(info.getImpUnit()));
|
||||||
}
|
}
|
||||||
// 根据用户名判断用户是否为班组长
|
|
||||||
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
|
||||||
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
||||||
// 班组长权限
|
// 班组长权限
|
||||||
if (teamData != null) {
|
if (teamData != null) {
|
||||||
|
|
@ -101,10 +110,10 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} /*else {
|
||||||
// 材料员权限
|
// 材料员权限
|
||||||
list = filterList(list, username);
|
list = filterList(list, username);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
// 提取关键字
|
// 提取关键字
|
||||||
|
|
@ -177,14 +186,23 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
||||||
@Override
|
@Override
|
||||||
public List<MaterialBackApplyInfo> getTotalList(MaterialBackApplyInfo backApplyInfo) {
|
public List<MaterialBackApplyInfo> getTotalList(MaterialBackApplyInfo backApplyInfo) {
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
|
// 根据用户名判断用户是否为班组长
|
||||||
|
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
||||||
|
if (teamData == null) {
|
||||||
|
// 根据用户名查询项目部信息
|
||||||
|
String departId = mapper.getDepartId(username);
|
||||||
|
// 根据项目部id查询工程信息
|
||||||
|
List<String> projectIdList = mapper.getProjectId(departId);
|
||||||
|
if (!org.springframework.util.CollectionUtils.isEmpty(projectIdList)) {
|
||||||
|
backApplyInfo.setProjectIdList(projectIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
List<MaterialBackApplyInfo> list = materialBackInfoMapper.getTotalList(backApplyInfo);
|
List<MaterialBackApplyInfo> list = materialBackInfoMapper.getTotalList(backApplyInfo);
|
||||||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||||
if (!org.springframework.util.CollectionUtils.isEmpty(list) && deptId != null) {
|
if (!org.springframework.util.CollectionUtils.isEmpty(list) && deptId != null) {
|
||||||
// 删除元素
|
// 删除元素
|
||||||
list.removeIf(info -> !deptId.toString().equals(info.getImpUnit()));
|
list.removeIf(info -> !deptId.toString().equals(info.getImpUnit()));
|
||||||
}
|
}
|
||||||
// 根据用户名判断用户是否为班组长
|
|
||||||
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
|
||||||
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
||||||
// 班组长权限
|
// 班组长权限
|
||||||
if (teamData != null) {
|
if (teamData != null) {
|
||||||
|
|
@ -192,10 +210,10 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} /*else {
|
||||||
// 材料员权限
|
// 材料员权限
|
||||||
list = filterList(list, username);
|
list = filterList(list, username);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
// 如果关键字不为空,进行过滤
|
// 如果关键字不为空,进行过滤
|
||||||
|
|
@ -519,6 +537,17 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
||||||
@Override
|
@Override
|
||||||
public List<MaterialBackApplyTotalInfo> getBackInfoDetails(MaterialBackApplyTotalInfo info) {
|
public List<MaterialBackApplyTotalInfo> getBackInfoDetails(MaterialBackApplyTotalInfo info) {
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
|
// 根据用户名判断用户是否为班组长
|
||||||
|
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
||||||
|
if (teamData == null) {
|
||||||
|
// 根据用户名查询项目部信息
|
||||||
|
String departId = mapper.getDepartId(username);
|
||||||
|
// 根据项目部id查询工程信息
|
||||||
|
List<String> projectIdList = mapper.getProjectId(departId);
|
||||||
|
if (!org.springframework.util.CollectionUtils.isEmpty(projectIdList)) {
|
||||||
|
info.setProjectIdList(projectIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
BigDecimal backNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
BigDecimal backNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||||
List<MaterialBackApplyTotalInfo> list = materialBackInfoMapper.getBackInfoDetails(info);
|
List<MaterialBackApplyTotalInfo> list = materialBackInfoMapper.getBackInfoDetails(info);
|
||||||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||||
|
|
@ -526,8 +555,6 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
||||||
// 删除元素
|
// 删除元素
|
||||||
list.removeIf(m -> !deptId.toString().equals(m.getImpUnit()));
|
list.removeIf(m -> !deptId.toString().equals(m.getImpUnit()));
|
||||||
}
|
}
|
||||||
// 根据用户名判断用户是否为班组长
|
|
||||||
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
|
||||||
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
||||||
// 班组长权限
|
// 班组长权限
|
||||||
if (teamData != null) {
|
if (teamData != null) {
|
||||||
|
|
@ -535,10 +562,10 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} /*else {
|
||||||
// 材料员权限
|
// 材料员权限
|
||||||
list = filterInfo(list, username);
|
list = filterInfo(list, username);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
for (MaterialBackApplyTotalInfo backApplyTotalInfo : list) {
|
for (MaterialBackApplyTotalInfo backApplyTotalInfo : list) {
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,17 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
||||||
@Override
|
@Override
|
||||||
public List<MaterialLeaseApplyInfo> selectLeaseApplyInfoList(MaterialLeaseApplyInfo leaseApplyInfo) {
|
public List<MaterialLeaseApplyInfo> selectLeaseApplyInfoList(MaterialLeaseApplyInfo leaseApplyInfo) {
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
|
// 根据用户名判断用户是否为班组长
|
||||||
|
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
||||||
|
if (teamData == null) {
|
||||||
|
// 根据用户名查询项目部信息
|
||||||
|
String departId = mapper.getDepartId(username);
|
||||||
|
// 根据项目部id查询工程信息
|
||||||
|
List<String> projectIdList = mapper.getProjectId(departId);
|
||||||
|
if (!CollectionUtils.isEmpty(projectIdList)) {
|
||||||
|
leaseApplyInfo.setProjectIdList(projectIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
List<MaterialLeaseApplyInfo> list = materialLeaseInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo);
|
List<MaterialLeaseApplyInfo> list = materialLeaseInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo);
|
||||||
// 利用Stream API进行降序排序
|
// 利用Stream API进行降序排序
|
||||||
List<MaterialLeaseApplyInfo> sortedList = list.stream()
|
List<MaterialLeaseApplyInfo> sortedList = list.stream()
|
||||||
|
|
@ -111,17 +122,15 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
||||||
// 删除元素
|
// 删除元素
|
||||||
sortedList.removeIf(info -> !deptId.toString().equals(info.getImpUnit()));
|
sortedList.removeIf(info -> !deptId.toString().equals(info.getImpUnit()));
|
||||||
}
|
}
|
||||||
// 根据用户名判断用户是否为班组长
|
|
||||||
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
|
||||||
if (!CollectionUtils.isEmpty(sortedList)) {
|
if (!CollectionUtils.isEmpty(sortedList)) {
|
||||||
if (teamData != null) {
|
if (teamData != null) {
|
||||||
// 将sortedList中班组身份证号与username相同的元素过滤处理
|
// 将sortedList中班组身份证号与username相同的元素过滤处理
|
||||||
sortedList = sortedList.stream()
|
sortedList = sortedList.stream()
|
||||||
.filter(item -> StringUtils.isBlank(item.getTeamLeaderIdCard()) || username.equals(item.getTeamLeaderIdCard()))
|
.filter(item -> StringUtils.isBlank(item.getTeamLeaderIdCard()) || username.equals(item.getTeamLeaderIdCard()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} /*else {
|
||||||
sortedList = filterByDataPermission(sortedList);
|
sortedList = filterByDataPermission(sortedList);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
// 处理剩余数据
|
// 处理剩余数据
|
||||||
if (!CollectionUtils.isEmpty(sortedList)) {
|
if (!CollectionUtils.isEmpty(sortedList)) {
|
||||||
|
|
@ -226,6 +235,17 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
||||||
@Override
|
@Override
|
||||||
public List<MaterialLeaseApplyInfo> getTotalList(MaterialLeaseApplyInfo leaseApplyInfo) {
|
public List<MaterialLeaseApplyInfo> getTotalList(MaterialLeaseApplyInfo leaseApplyInfo) {
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
|
// 根据用户名判断用户是否为班组长
|
||||||
|
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
||||||
|
if (teamData == null) {
|
||||||
|
// 根据用户名查询项目部信息
|
||||||
|
String departId = mapper.getDepartId(username);
|
||||||
|
// 根据项目部id查询工程信息
|
||||||
|
List<String> projectIdList = mapper.getProjectId(departId);
|
||||||
|
if (!CollectionUtils.isEmpty(projectIdList)) {
|
||||||
|
leaseApplyInfo.setProjectIdList(projectIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
// 领料数据
|
// 领料数据
|
||||||
List<MaterialLeaseApplyInfo> list = materialLeaseInfoMapper.getTotalList(leaseApplyInfo);
|
List<MaterialLeaseApplyInfo> list = materialLeaseInfoMapper.getTotalList(leaseApplyInfo);
|
||||||
// 查询领用数据
|
// 查询领用数据
|
||||||
|
|
@ -252,8 +272,6 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
||||||
// 删除元素
|
// 删除元素
|
||||||
sortedList.removeIf(info -> !deptId.toString().equals(info.getImpUnit()));
|
sortedList.removeIf(info -> !deptId.toString().equals(info.getImpUnit()));
|
||||||
}
|
}
|
||||||
// 根据用户名判断用户是否为班组长
|
|
||||||
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
|
||||||
if (!CollectionUtils.isEmpty(sortedList)) {
|
if (!CollectionUtils.isEmpty(sortedList)) {
|
||||||
// 班组数据权限
|
// 班组数据权限
|
||||||
if (teamData != null) {
|
if (teamData != null) {
|
||||||
|
|
@ -261,9 +279,6 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
||||||
sortedList = sortedList.stream()
|
sortedList = sortedList.stream()
|
||||||
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
|
||||||
// 材料员数据权限
|
|
||||||
sortedList = filterByDataPermission(sortedList);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(sortedList)) {
|
if (!CollectionUtils.isEmpty(sortedList)) {
|
||||||
|
|
@ -691,6 +706,17 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
||||||
@Override
|
@Override
|
||||||
public List<LeaseApplyDetailsInfo> getLeaseInfo(LeaseApplyDetailsInfo dto) {
|
public List<LeaseApplyDetailsInfo> getLeaseInfo(LeaseApplyDetailsInfo dto) {
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
|
// 根据用户名判断用户是否为班组长
|
||||||
|
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
||||||
|
if (teamData == null) {
|
||||||
|
// 根据用户名查询项目部信息
|
||||||
|
String departId = mapper.getDepartId(username);
|
||||||
|
// 根据项目部id查询工程信息
|
||||||
|
List<String> projectIdList = mapper.getProjectId(departId);
|
||||||
|
if (!CollectionUtils.isEmpty(projectIdList)) {
|
||||||
|
dto.setProjectIdList(projectIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
BigDecimal preNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
BigDecimal preNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||||
BigDecimal alNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
BigDecimal alNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||||
BigDecimal outNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
BigDecimal outNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||||
|
|
@ -700,18 +726,16 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
||||||
// 删除元素
|
// 删除元素
|
||||||
list.removeIf(info -> !deptId.toString().equals(info.getImpUnit()));
|
list.removeIf(info -> !deptId.toString().equals(info.getImpUnit()));
|
||||||
}
|
}
|
||||||
// 根据用户名判断用户是否为班组长
|
|
||||||
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
if (teamData != null) {
|
if (teamData != null) {
|
||||||
// 将list中班组身份证号与username相同的元素过滤处理
|
// 将list中班组身份证号与username相同的元素过滤处理
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} /*else {
|
||||||
// 材料员权限
|
// 材料员权限
|
||||||
list = filterList(list, username);
|
list = filterList(list, username);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
String keyWord = dto.getKeyWord();
|
String keyWord = dto.getKeyWord();
|
||||||
|
|
@ -1105,6 +1129,17 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
||||||
@Override
|
@Override
|
||||||
public List<LeaseTotalInfo> getLeaseInfoDetails(LeaseTotalInfo info) {
|
public List<LeaseTotalInfo> getLeaseInfoDetails(LeaseTotalInfo info) {
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
|
// 根据用户名判断用户是否为班组长
|
||||||
|
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
||||||
|
if (teamData == null) {
|
||||||
|
// 根据用户名查询项目部信息
|
||||||
|
String departId = mapper.getDepartId(username);
|
||||||
|
// 根据项目部id查询工程信息
|
||||||
|
List<String> projectIdList = mapper.getProjectId(departId);
|
||||||
|
if (!org.springframework.util.CollectionUtils.isEmpty(projectIdList)) {
|
||||||
|
info.setProjectIdList(projectIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
BigDecimal preNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
BigDecimal preNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||||
BigDecimal outNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
BigDecimal outNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||||
BigDecimal pendingNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
BigDecimal pendingNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
|
||||||
|
|
@ -1114,8 +1149,6 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
||||||
// 删除元素
|
// 删除元素
|
||||||
list.removeIf(m -> !deptId.toString().equals(m.getImpUnit()));
|
list.removeIf(m -> !deptId.toString().equals(m.getImpUnit()));
|
||||||
}
|
}
|
||||||
// 根据用户名判断用户是否为班组长
|
|
||||||
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
// 班组长权限
|
// 班组长权限
|
||||||
if (teamData != null) {
|
if (teamData != null) {
|
||||||
|
|
@ -1123,10 +1156,10 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} /*else {
|
||||||
// 材料员权限
|
// 材料员权限
|
||||||
list = filterListInfo(list, username);
|
list = filterListInfo(list, username);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
// 处理数据并计算总和
|
// 处理数据并计算总和
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,17 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
@Override
|
@Override
|
||||||
public List<Machine> getMachineInfo(Machine machine) {
|
public List<Machine> getMachineInfo(Machine machine) {
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
|
// 根据用户名判断用户是否为班组长
|
||||||
|
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
||||||
|
if (teamData == null) {
|
||||||
|
// 根据用户名查询项目部信息
|
||||||
|
String departId = mapper.getDepartId(username);
|
||||||
|
// 根据项目部id查询工程信息
|
||||||
|
List<String> projectIdList = mapper.getProjectId(departId);
|
||||||
|
if (!org.springframework.util.CollectionUtils.isEmpty(projectIdList)) {
|
||||||
|
machine.setProjectIdList(projectIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
// 查询slt_agreement_info数据
|
// 查询slt_agreement_info数据
|
||||||
List<Machine> primaryList = materialMachineMapper.getMachineInfo(machine);
|
List<Machine> primaryList = materialMachineMapper.getMachineInfo(machine);
|
||||||
|
|
||||||
|
|
@ -79,8 +90,6 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
// 删除元素
|
// 删除元素
|
||||||
mergedList.removeIf(m -> !deptId.toString().equals(m.getImpUnit()));
|
mergedList.removeIf(m -> !deptId.toString().equals(m.getImpUnit()));
|
||||||
}
|
}
|
||||||
// 根据用户名判断用户是否为班组长
|
|
||||||
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
|
||||||
if (!org.springframework.util.CollectionUtils.isEmpty(mergedList)) {
|
if (!org.springframework.util.CollectionUtils.isEmpty(mergedList)) {
|
||||||
// 班组权限
|
// 班组权限
|
||||||
if (teamData != null) {
|
if (teamData != null) {
|
||||||
|
|
@ -141,7 +150,7 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
}
|
}
|
||||||
List<Machine> newList = new ArrayList<>();
|
List<Machine> newList = new ArrayList<>();
|
||||||
for (Machine info : list) {
|
for (Machine info : list) {
|
||||||
if (com.bonus.common.core.utils.StringUtils.isBlank(info.getExternalId())) {
|
if (StringUtils.isBlank(info.getExternalId())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 根据i8工程id查询项目部id
|
// 根据i8工程id查询项目部id
|
||||||
|
|
@ -311,23 +320,32 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
@Override
|
@Override
|
||||||
public List<MaterialRetainedEquipmentInfo> getTeamUseNumList(MaterialRetainedEquipmentInfo bean) {
|
public List<MaterialRetainedEquipmentInfo> getTeamUseNumList(MaterialRetainedEquipmentInfo bean) {
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
|
// 根据用户名判断用户是否为班组长
|
||||||
|
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
||||||
|
if (teamData == null) {
|
||||||
|
// 根据用户名查询项目部信息
|
||||||
|
String departId = mapper.getDepartId(username);
|
||||||
|
// 根据项目部id查询工程信息
|
||||||
|
List<String> projectIdList = mapper.getProjectId(departId);
|
||||||
|
if (!org.springframework.util.CollectionUtils.isEmpty(projectIdList)) {
|
||||||
|
bean.setProjectIdList(projectIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
List<MaterialRetainedEquipmentInfo> list = materialMachineMapper.getTeamUseNumList(bean);
|
List<MaterialRetainedEquipmentInfo> list = materialMachineMapper.getTeamUseNumList(bean);
|
||||||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||||
if (!CollectionUtils.isEmpty(list) && deptId != null) {
|
if (!CollectionUtils.isEmpty(list) && deptId != null) {
|
||||||
// 删除元素
|
// 删除元素
|
||||||
list.removeIf(m -> !deptId.toString().equals(m.getImpUnit()));
|
list.removeIf(m -> !deptId.toString().equals(m.getImpUnit()));
|
||||||
}
|
}
|
||||||
// 根据用户名判断用户是否为班组长
|
|
||||||
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
|
||||||
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
||||||
if (teamData != null) {
|
if (teamData != null) {
|
||||||
// 将sortedList中班组身份证号与username相同的元素过滤处理
|
// 将sortedList中班组身份证号与username相同的元素过滤处理
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
.filter(item -> StringUtils.isBlank(item.getIdCard()) || username.equals(item.getIdCard()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} /*else {
|
||||||
list = filterInfo(list, username);
|
list = filterInfo(list, username);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
for (MaterialRetainedEquipmentInfo retainedEquipmentInfo : list) {
|
for (MaterialRetainedEquipmentInfo retainedEquipmentInfo : list) {
|
||||||
|
|
@ -510,12 +528,23 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public MaterialRetainedEquipmentInfo getToolsLedgerDetailsList(MaterialRetainedEquipmentInfo bean) {
|
public MaterialRetainedEquipmentInfo getToolsLedgerDetailsList(MaterialRetainedEquipmentInfo bean) {
|
||||||
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
try {
|
try {
|
||||||
|
// 根据用户名判断用户是否为班组长
|
||||||
|
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
||||||
|
if (teamData == null) {
|
||||||
|
// 根据用户名查询项目部信息
|
||||||
|
String departId = mapper.getDepartId(username);
|
||||||
|
// 根据项目部id查询工程信息
|
||||||
|
List<String> projectIdList = mapper.getProjectId(departId);
|
||||||
|
if (!org.springframework.util.CollectionUtils.isEmpty(projectIdList)) {
|
||||||
|
bean.setProjectIdList(projectIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
// 查询slt_agreement_info数据
|
// 查询slt_agreement_info数据
|
||||||
List<MaterialRetainedEquipmentInfo> primaryList = materialMachineMapper.getToolsLedgerDetailsList(bean);
|
List<MaterialRetainedEquipmentInfo> primaryList = materialMachineMapper.getToolsLedgerDetailsList(bean);
|
||||||
// 查询clz_slt_agreement_info数据
|
// 查询clz_slt_agreement_info数据
|
||||||
List<MaterialRetainedEquipmentInfo> list = materialMachineMapper.getTeamUseNumDetailsList(bean);
|
List<MaterialRetainedEquipmentInfo> list = materialMachineMapper.getTeamUseNumDetailsList(bean);
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
|
||||||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||||
if (!CollectionUtils.isEmpty(primaryList) && deptId != null) {
|
if (!CollectionUtils.isEmpty(primaryList) && deptId != null) {
|
||||||
// 删除元素
|
// 删除元素
|
||||||
|
|
@ -524,8 +553,6 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
if (CollectionUtils.isEmpty(primaryList)) {
|
if (CollectionUtils.isEmpty(primaryList)) {
|
||||||
return new MaterialRetainedEquipmentInfo();
|
return new MaterialRetainedEquipmentInfo();
|
||||||
}
|
}
|
||||||
// 根据用户名判断用户是否为班组长
|
|
||||||
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
|
||||||
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
|
||||||
if (teamData != null) {
|
if (teamData != null) {
|
||||||
// 将sortedList中班组身份证号与username相同的元素过滤处理
|
// 将sortedList中班组身份证号与username相同的元素过滤处理
|
||||||
|
|
|
||||||
|
|
@ -258,4 +258,9 @@ public class Machine extends BaseEntity
|
||||||
|
|
||||||
@ApiModelProperty(value = "i8工程id")
|
@ApiModelProperty(value = "i8工程id")
|
||||||
private String externalId;
|
private String externalId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* i8工程id集合
|
||||||
|
*/
|
||||||
|
private List<String> projectIdList;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -260,6 +260,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="idCard != null and idCard != ''">
|
<if test="idCard != null and idCard != ''">
|
||||||
and bt.bzz_idcard = #{idCard}
|
and bt.bzz_idcard = #{idCard}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bp.external_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY bai.`code`
|
GROUP BY bai.`code`
|
||||||
ORDER BY bai.create_time desc
|
ORDER BY bai.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -321,6 +327,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
and tt.task_status = #{status}
|
and tt.task_status = #{status}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bp.external_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY bai.`code`
|
GROUP BY bai.`code`
|
||||||
ORDER BY bai.create_time desc
|
ORDER BY bai.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -581,6 +593,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
<![CDATA[and DATE_FORMAT( bcd.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
<![CDATA[and DATE_FORMAT( bcd.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bp.external_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and (
|
and (
|
||||||
mt2.type_name like concat('%', #{keyWord}, '%') or
|
mt2.type_name like concat('%', #{keyWord}, '%') or
|
||||||
|
|
|
||||||
|
|
@ -376,6 +376,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="idCard != null and idCard != ''">
|
<if test="idCard != null and idCard != ''">
|
||||||
AND bt.bzz_idcard = #{idCard}
|
AND bt.bzz_idcard = #{idCard}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bp.external_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
GROUP BY lai.id
|
GROUP BY lai.id
|
||||||
ORDER BY tt.task_status,tt.create_time desc
|
ORDER BY tt.task_status,tt.create_time desc
|
||||||
|
|
@ -427,6 +433,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bp.external_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
<![CDATA[ AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
<![CDATA[ AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -666,6 +678,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
<![CDATA[and DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
<![CDATA[and DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bp.external_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
lai.`code`,mt.type_id
|
lai.`code`,mt.type_id
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -743,6 +761,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
<![CDATA[and DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
<![CDATA[and DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bp.external_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and (
|
and (
|
||||||
mt2.type_name like concat('%', #{keyWord}, '%') or
|
mt2.type_name like concat('%', #{keyWord}, '%') or
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="maModel != null and maModel != ''">
|
<if test="maModel != null and maModel != ''">
|
||||||
and mt.type_name like concat('%', #{maModel}, '%')
|
and mt.type_name like concat('%', #{maModel}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bp.external_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
mm.ma_id
|
mm.ma_id
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -248,6 +254,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
OR bt.unit_name LIKE concat('%',#{keyWord},'%')
|
OR bt.unit_name LIKE concat('%',#{keyWord},'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bp.external_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
bt.unit_name,
|
bt.unit_name,
|
||||||
mt2.type_name;
|
mt2.type_name;
|
||||||
|
|
@ -441,6 +453,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="maCode != null and maCode != ''">
|
<if test="maCode != null and maCode != ''">
|
||||||
AND mm.ma_code like concat('%',#{maCode},'%')
|
AND mm.ma_code like concat('%',#{maCode},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bp.external_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
mt.type_name,
|
mt.type_name,
|
||||||
mt1.type_name,
|
mt1.type_name,
|
||||||
|
|
@ -578,6 +596,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="maModel != null and maModel != ''">
|
<if test="maModel != null and maModel != ''">
|
||||||
and mt.type_name like concat('%', #{maModel}, '%')
|
and mt.type_name like concat('%', #{maModel}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bp.external_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
mm.ma_id
|
mm.ma_id
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue