材料站功能优化
This commit is contained in:
parent
16573aedc9
commit
4bc97b87ac
|
|
@ -73,6 +73,9 @@ public class MaterialConstants {
|
||||||
/** 材料站退料单号的开头字母 */
|
/** 材料站退料单号的开头字母 */
|
||||||
public static final String BACK_MATERIAL_TASK_TYPE_LABEL = "MT";
|
public static final String BACK_MATERIAL_TASK_TYPE_LABEL = "MT";
|
||||||
|
|
||||||
|
/** 材料站预约退料单号的开头字母 */
|
||||||
|
public static final String BACK_MATERIAL_APPOINT_TASK_TYPE_LABEL = "YT";
|
||||||
|
|
||||||
/** 维修单号的开头字母 */
|
/** 维修单号的开头字母 */
|
||||||
public static final String REPAIR_TASK_TYPE_LABEL = "WX";
|
public static final String REPAIR_TASK_TYPE_LABEL = "WX";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,10 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
String username = SecurityUtils.getLoginUser().getUsername();
|
String username = SecurityUtils.getLoginUser().getUsername();
|
||||||
// 根据用户名判断用户是否为班组长
|
// 根据用户名判断用户是否为班组长
|
||||||
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
BmTeam teamData = materialMachineMapper.getTeamData(username);
|
||||||
|
Set<String> userRoles = SecurityUtils.getLoginUser().getRoles();
|
||||||
|
// 检查用户是否具有特殊角色
|
||||||
|
boolean hasSpecialRole = hasSpecialRole(userRoles);
|
||||||
|
if (!hasSpecialRole) {
|
||||||
if (teamData == null) {
|
if (teamData == null) {
|
||||||
// 根据用户名查询项目部信息
|
// 根据用户名查询项目部信息
|
||||||
List<String> departId = mapper.getDepartId(username);
|
List<String> departId = mapper.getDepartId(username);
|
||||||
|
|
@ -158,6 +162,7 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
if (deptId != null) {
|
if (deptId != null) {
|
||||||
bean.setImpUnit(deptId.toString());
|
bean.setImpUnit(deptId.toString());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// 查询目前在用的设备信息
|
// 查询目前在用的设备信息
|
||||||
List<MaterialRetainedEquipmentInfo> usList = materialMachineMapper.getUsInfoList(bean);
|
List<MaterialRetainedEquipmentInfo> usList = materialMachineMapper.getUsInfoList(bean);
|
||||||
//查询目前还有库存的设备
|
//查询目前还有库存的设备
|
||||||
|
|
|
||||||
|
|
@ -1022,6 +1022,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="departName != null and departName != ''">
|
<if test="departName != null and departName != ''">
|
||||||
AND bp.pro_center = #{departName}
|
AND bp.pro_center = #{departName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="impUnit != null and impUnit != ''">
|
||||||
|
and bp.imp_unit = #{impUnit}
|
||||||
|
</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>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTeamNum" resultType="java.lang.Integer">
|
<select id="selectTeamNum" resultType="java.lang.Integer">
|
||||||
|
|
@ -1038,6 +1047,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="proName != null and proName != ''">
|
<if test="proName != null and proName != ''">
|
||||||
AND bz.project_name = #{proName}
|
AND bz.project_name = #{proName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
|
and bz.project_id in
|
||||||
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="teamName != null and teamName != ''">
|
<if test="teamName != null and teamName != ''">
|
||||||
AND bz.bzmc = #{teamName}
|
AND bz.bzmc = #{teamName}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue