退料负责机具权限

This commit is contained in:
hongchao 2025-07-31 10:25:47 +08:00
parent 364a09f8ed
commit 80cb178f52
5 changed files with 15 additions and 0 deletions

View File

@ -1702,6 +1702,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
@Override
public AjaxResult getMachineByCode(BackApplyInfo dto) {
dto.setUserId(SecurityUtils.getLoginUser().getUserid());
return backApplyInfoMapper.getMachineByCode(dto);
}

View File

@ -45,4 +45,6 @@ public class SelectDto {
private String teamId;
private Long proId;
private Long userId;
}

View File

@ -379,6 +379,7 @@ public class SelectServiceImpl implements SelectService {
List<TypeTreeNode> listL21 = new ArrayList<>();
try {
// 先查第四层类型
dto.setUserId(SecurityUtils.getLoginUser().getUserid());
listL4 = mapper.getUseTypeTreeL4Back(dto);
if (CollectionUtils.isNotEmpty(listL4)) {
List<Long> list4ParentIds = listL4.stream().map(o -> o.getParentId()).collect(Collectors.toList());
@ -536,6 +537,7 @@ public class SelectServiceImpl implements SelectService {
@Override
public AjaxResult getUseType(BackApplyInfo bean) {
//四级类型只查询数量管理类型数据
bean.setUserId(SecurityUtils.getLoginUser().getUserid());
List<TypeTreeNode> listL4 = mapper.getUseTypeTreeApp(bean);
if (CollectionUtils.isEmpty(listL4)) {
return AjaxResult.success();

View File

@ -1125,7 +1125,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN bm_unit bu on bu.unit_id = ba.unit_id
LEFT JOIN sys_dict_data sd on sd.dict_value = mm.ma_status and sd.dict_type = "ma_machine_status"
AND bu.del_flag = '0'
LEFT JOIN ma_type_repair mtr ON mm.type_id = mtr.type_id
WHERE sai.`status`=0 and mm.ma_status = '2'
<if test="userId != null">
and mtr.user_id = #{userId}
</if>
and mm.ma_code = #{maCode}
GROUP BY mm.ma_id
</select>

View File

@ -400,9 +400,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ma_type mt
LEFT JOIN slt_agreement_info sai ON mt.type_id = sai.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0'
LEFT JOIN ma_type_repair mtr ON mt.type_id = mtr.type_id
WHERE
sai.agreement_id = #{agreementId} AND sai.STATUS = '0'
and mt.manage_type = '1'
<if test="userId != null">
and mtr.user_id = #{userId}
</if>
GROUP BY
mt.type_id
HAVING num> 0
@ -806,8 +810,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
AND mt1.del_flag = '0'
LEFT JOIN bm_agreement_info ba ON sai.agreement_id = ba.agreement_id
LEFT JOIN ma_type_repair mtr ON mm.type_id = mtr.type_id
WHERE
mm.ma_status = '2'
and mtr.user_id = #{userId}
AND ba.unit_id = #{unitId}
AND ba.project_id = #{proId}
GROUP BY mm.type_id