Merge remote-tracking branch 'origin/master'

This commit is contained in:
itcast 2026-01-09 10:19:56 +08:00
commit 000de8eafc
5 changed files with 9 additions and 5 deletions

View File

@ -180,7 +180,8 @@ public class TypeController extends BaseController {
@ApiOperation(value = "获取物资类型连动式下拉框") @ApiOperation(value = "获取物资类型连动式下拉框")
@GetMapping("/equipmentType") @GetMapping("/equipmentType")
public AjaxResult equipmentType(@RequestParam(required = false) Long typeId, @RequestParam(required = false) String typeName) { public AjaxResult equipmentType(@RequestParam(required = false) Long typeId, @RequestParam(required = false) String typeName) {
List<Type> listByMaType = typeService.getEquipmentType(typeId, typeName); Long deptId = typeService.getUserDeptId();
List<Type> listByMaType = typeService.getEquipmentType(typeId, typeName, deptId);
return success(listByMaType); return success(listByMaType);
} }

View File

@ -25,7 +25,7 @@ public interface TypeMapper {
// 查询物资类型的内部租赁价 // 查询物资类型的内部租赁价
BigDecimal selectLeasePriceByTypeId(Long typeId); BigDecimal selectLeasePriceByTypeId(Long typeId);
List<Type> selectMaTypeList(@Param("typeId") Long typeId,@Param("typeName") String typeName); List<Type> selectMaTypeList(@Param("typeId") Long typeId, @Param("typeName") String typeName, @Param("companyId") Long companyId);
/** /**
* 查询物资类型3级--前端联动式下拉框 * 查询物资类型3级--前端联动式下拉框

View File

@ -27,7 +27,7 @@ public interface ITypeService {
List<Integer> selectParentId(MaTypeVo type); List<Integer> selectParentId(MaTypeVo type);
List<Type> getEquipmentType(Long typeId, String typeName); List<Type> getEquipmentType(Long typeId, String typeName, Long deptId);
/** /**
* 查询物资类型3级--前端联动式下拉框 * 查询物资类型3级--前端联动式下拉框

View File

@ -93,8 +93,8 @@ public class TypeServiceImpl implements ITypeService {
* @param typeName 类型名称 * @param typeName 类型名称
*/ */
@Override @Override
public List<Type> getEquipmentType(Long typeId, String typeName) { public List<Type> getEquipmentType(Long typeId, String typeName, Long deptId) {
List<Type> maTypes = typeMapper.selectMaTypeList(typeId, typeName); List<Type> maTypes = typeMapper.selectMaTypeList(typeId, typeName, deptId);
List<Type> roots = maTypes.stream() List<Type> roots = maTypes.stream()
.filter(t -> t.getParentId() == 0) .filter(t -> t.getParentId() == 0)
.collect(Collectors.toList()); .collect(Collectors.toList());

View File

@ -599,6 +599,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeId != null and typeId !=''"> <if test="typeId != null and typeId !=''">
AND m.type_id = #{typeId} AND m.type_id = #{typeId}
</if> </if>
<if test="companyId != null">
AND m.company_id = #{companyId}
</if>
</where> </where>
</select> </select>