宏源权限

This commit is contained in:
hongchao 2026-01-09 09:57:24 +08:00
parent aaaa60c517
commit da537f966a
31 changed files with 212 additions and 40 deletions

View File

@ -139,6 +139,8 @@ public class BmStorageLog extends BaseEntity
@ApiModelProperty(value = "操作人")
private String creator;
private Long companyId;
// Getters and Setters
public BigDecimal getPreStoreNum() {
return preStoreNum == null ? BigDecimal.ZERO : preStoreNum;

View File

@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType;
import com.bonus.common.security.annotation.InnerAuth;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import com.bonus.material.ma.service.ITypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@ -38,6 +39,9 @@ public class BmStorageLogController extends BaseController
@Autowired
private IBmStorageLogService bmStorageLogService;
@Autowired
private ITypeService typeService;
/**
* 查询库存日志列表
*/
@ -46,6 +50,8 @@ public class BmStorageLogController extends BaseController
@GetMapping("/list")
public TableDataInfo list(BmStorageLog bmStorageLog)
{
Long deptId = typeService.getUserDeptId();
bmStorageLog.setCompanyId(deptId);
startPage();
List<BmStorageLog> list = bmStorageLogService.selectBmStorageLogList(bmStorageLog);
return getDataTable(list);

View File

@ -5,6 +5,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.log.enums.OperaType;
import com.bonus.material.basic.domain.BmUnit;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import com.bonus.material.ma.service.ITypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@ -16,6 +17,7 @@ import com.bonus.material.basic.service.IBmUnitPersonService;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import javax.annotation.Resource;
import java.util.List;
/**
@ -32,6 +34,7 @@ public class BmUnitPersonController extends BaseController
@Autowired
private IBmUnitPersonService bmUnitPersonService;
/**
* 查询往来单位绑定管理列表
*/

View File

@ -14,6 +14,7 @@ import com.bonus.material.basic.domain.BmUnit;
import com.bonus.material.basic.domain.BmUnitType;
import com.bonus.material.basic.service.IBmUnitTypeService;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import com.bonus.material.ma.service.ITypeService;
import com.bonus.system.api.domain.SysDictData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -41,6 +42,9 @@ public class BmUnitTypeController extends BaseController
@Autowired
private IBmUnitTypeService bmUnitTypeService;
@Autowired
private ITypeService typeService;
@RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("system:dict:list"))
@GetMapping("/list")
@SysLog(title = "字典管理", businessType = OperaType.QUERY,logType = 0,module = "系统管理->字典管理")
@ -66,6 +70,8 @@ public class BmUnitTypeController extends BaseController
@PostMapping("/export")
public void export(HttpServletResponse response, BmUnitType bmUnitType)
{
Long deptId = typeService.getUserDeptId();
bmUnitType.setCompanyId(deptId);
List<BmUnitType> list = bmUnitTypeService.selectBmUnitTypeDataList(bmUnitType);
ExcelUtil<BmUnitType> util = new ExcelUtil<BmUnitType>(BmUnitType.class);
util.exportExcel(response, list, "单位类型管理数据");

View File

@ -194,4 +194,6 @@ public class BmProject extends BaseEntity
@Excel(name = "是否结算",readConverterExp = "0=未结算,1=已结算")
@ApiModelProperty(value = "是否结算工程")
private Integer isSlt;
private Long companyId;
}

View File

@ -113,4 +113,6 @@ public class BmUnit extends BaseEntity
@ApiModelProperty(value = "工程名称")
private String projectName;
private Long companyId;
}

View File

@ -63,4 +63,6 @@ public class BmUnitType
@Excel(name = "创建时间")
private String createTime;
private Long companyId;
}

View File

@ -9,6 +9,7 @@ import com.bonus.material.basic.mapper.BmUnitMapper;
import com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo;
import com.bonus.material.common.domain.dto.SelectDto;
import com.bonus.material.common.service.SelectService;
import com.bonus.material.ma.service.ITypeService;
import com.bonus.material.materialStation.domain.ProAuthorizeInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -31,6 +32,11 @@ public class SelectController {
@Resource(name = "SelectService")
private SelectService service;
@Resource
private ITypeService typeService;
/**
* 获取分公司下拉选
* @param bean
@ -83,6 +89,8 @@ public class SelectController {
@ApiOperation(value = "往来单位下拉选,过滤掉班组类型")
@PostMapping("getUnitListFilterTeam")
public AjaxResult getUnitListFilterTeam(@RequestBody BmUnit bmUnit) {
Long deptId = typeService.getUserDeptId();
bmUnit.setCompanyId(deptId);
bmUnit.setEnableFilterTeam(true);
return service.getUnitList(bmUnit);
}
@ -222,12 +230,16 @@ public class SelectController {
@ApiOperation(value = "设备类型树")
@PostMapping("getDeviceTypeTree")
public AjaxResult getDeviceTypeTree(@RequestBody SelectDto dto){
Long deptId = typeService.getUserDeptId();
dto.setCompanyId(deptId);
return service.getDeviceTypeTree(dto);
}
@ApiOperation(value = "设备类型树")
@PostMapping("getDeviceTypeTreeTwo")
public AjaxResult getDeviceTypeTreeTwo(@RequestBody SelectDto dto){
Long deptId = typeService.getUserDeptId();
dto.setCompanyId(deptId);
return service.getDeviceTypeTreeTwo(dto);
}
@ -341,6 +353,8 @@ public class SelectController {
@PostMapping("getLintTypeList")
public AjaxResult getLintTypeList(@RequestBody BmProject bmProject) {
try {
Long deptId = typeService.getUserDeptId();
bmProject.setCompanyId(deptId);
return service.getLintTypeList(bmProject);
} catch (Exception e) {
log.error("获取施工类型信息异常", e);
@ -352,6 +366,8 @@ public class SelectController {
@PostMapping("getMaterialTypeList")
public AjaxResult getMaterialTypeList(@RequestBody BmProject bmProject) {
try {
Long deptId = typeService.getUserDeptId();
bmProject.setCompanyId(deptId);
return service.getMaterialTypeList(bmProject);
} catch (Exception e) {
log.error("获取物资类型信息异常", e);

View File

@ -49,4 +49,6 @@ public class SelectDto {
private Long proId;
private Long userId;
private Long companyId;
}

View File

@ -18,6 +18,7 @@ import com.bonus.material.common.domain.vo.SelectVo;
import com.bonus.material.common.mapper.SelectMapper;
import com.bonus.material.common.service.SelectService;
import com.bonus.material.ma.domain.Type;
import com.bonus.material.ma.service.ITypeService;
import com.bonus.material.materialStation.domain.ProAuthorizeInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@ -38,6 +39,9 @@ public class SelectServiceImpl implements SelectService {
@Resource(name = "SelectMapper")
private SelectMapper mapper;
@Resource
private ITypeService typeService;
/**
* 单位下拉类型树
* @param bmUnit
@ -65,9 +69,9 @@ public class SelectServiceImpl implements SelectService {
// 步骤2: 判断是否开启过滤
long step2Start = System.currentTimeMillis();
if (Objects.nonNull(bmUnit) && Objects.nonNull(bmUnit.getEnableFilter()) && bmUnit.getEnableFilter()) {
bmUnit.setDeptId(thisLoginUserDeptId);
}
// if (Objects.nonNull(bmUnit) && Objects.nonNull(bmUnit.getEnableFilter()) && bmUnit.getEnableFilter()) {
// bmUnit.setDeptId(thisLoginUserDeptId);
// }
if (CollectionUtils.isNotEmpty(userRoles)) {
// 技术员只查询项目部类型的单位,固定传值36项目部类型
if (userRoles.contains("jsy")) {
@ -156,15 +160,17 @@ public class SelectServiceImpl implements SelectService {
return AjaxResult.success(bmProjects);
}
// 获取登陆用户的组织ID
Long thisLoginUserDeptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
if (null == thisLoginUserDeptId || 0 == thisLoginUserDeptId) {
return AjaxResult.success(Collections.emptyList());
}
// 判断是否开启过滤
if (Objects.nonNull(bmProject) && Objects.nonNull(bmProject.getEnableFilter()) && bmProject.getEnableFilter()) {
bmProject.setDeptId(thisLoginUserDeptId);
}
Long deptId = typeService.getUserDeptId();
bmProject.setDeptId(deptId);
// // 获取登陆用户的组织ID
// Long thisLoginUserDeptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
// if (null == thisLoginUserDeptId || 0 == thisLoginUserDeptId) {
// return AjaxResult.success(Collections.emptyList());
// }
// // 判断是否开启过滤
// if (Objects.nonNull(bmProject) && Objects.nonNull(bmProject.getEnableFilter()) && bmProject.getEnableFilter()) {
// bmProject.setDeptId(thisLoginUserDeptId);
// }
List<ProjectTreeNode> groupList = new ArrayList<>();
List<ProjectTreeNode> list = new ArrayList<>();

View File

@ -14,6 +14,8 @@ import com.bonus.material.ma.domain.Type;
import com.bonus.material.ma.domain.vo.MachineExportVo;
import com.bonus.material.ma.domain.vo.MachineVo;
import com.bonus.material.ma.domain.vo.SampleSync;
import com.bonus.material.ma.service.ITypeKeeperService;
import com.bonus.material.ma.service.ITypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
@ -47,6 +49,11 @@ public class MachineController extends BaseController {
@Autowired
private IMachineService machineService;
@Autowired
private ITypeService typeService;
/**
* 查询机具设备管理列表
*/
@ -54,6 +61,8 @@ public class MachineController extends BaseController {
//@RequiresPermissions("ma:machine:list")
@GetMapping("/list")
public TableDataInfo list(Machine machine) {
Long deptId = typeService.getUserDeptId();
machine.setCompanyId(String.valueOf(deptId));
if (machine.getPrefix() == null) {
startPage();
}
@ -78,6 +87,8 @@ public class MachineController extends BaseController {
//@RequiresPermissions("ma:machine:typeList")
@GetMapping("/getTypeList")
public AjaxResult list(Type type) {
Long deptId = typeService.getUserDeptId();
type.setCompanyId(deptId);
return machineService.selectByTypeList(type);
}
@ -90,6 +101,8 @@ public class MachineController extends BaseController {
@SysLog(title = "机具设备管理", businessType = OperaType.EXPORT, logType = 1, module = "仓储管理->导出机具设备管理")
@PostMapping("/export")
public void export(HttpServletResponse response, Machine machine) {
Long deptId = typeService.getUserDeptId();
machine.setCompanyId(String.valueOf(deptId));
List<MachineVo> list = machineService.selectMachineList(machine);
List<MachineExportVo> exportVos = list.stream()
.map(machineVo -> {
@ -319,6 +332,8 @@ public class MachineController extends BaseController {
@PreventRepeatSubmit
@PostMapping("/synchReport")
public AjaxResult synchReport(@RequestBody Machine machine) {
Long deptId = typeService.getUserDeptId();
machine.setCompanyId(String.valueOf(deptId));
return machineService.synchReport(machine);
}
@ -330,7 +345,9 @@ public class MachineController extends BaseController {
//@RequiresPermissions("ma:machine:list")
@GetMapping("/getSynchList")
public TableDataInfo getSynchList(MachineSynch machine) {
startPage();
Long deptId = typeService.getUserDeptId();
machine.setCompanyId(deptId);
startPage();
List<MachineSynch> list = machineService.selectSynchList(machine);
return getDataTable(list);
}

View File

@ -5,6 +5,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import com.bonus.material.ma.service.ITypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
@ -36,6 +37,9 @@ public class SupplierInfoController extends BaseController {
@Resource
private ISupplierInfoService supplierInfoService;
@Resource
private ITypeService typeService;
/**
* 查询物资厂家管理列表
*/
@ -43,6 +47,8 @@ public class SupplierInfoController extends BaseController {
//@RequiresPermissions("ma:info:list")
@GetMapping("/list")
public TableDataInfo list(SupplierInfo supplierInfo) {
Long deptId = typeService.getUserDeptId();
supplierInfo.setCompanyId(String.valueOf(deptId));
startPage();
List<SupplierInfo> list = supplierInfoService.selectSupplierInfoList(supplierInfo);
return getDataTable(list);
@ -68,6 +74,8 @@ public class SupplierInfoController extends BaseController {
@SysLog(title = "物资厂家管理", businessType = OperaType.EXPORT, logType = 1,module = "物资管理->导出物资厂家管理")
@PostMapping("/export")
public void export(HttpServletResponse response, SupplierInfo supplierInfo) {
Long deptId = typeService.getUserDeptId();
supplierInfo.setCompanyId(String.valueOf(deptId));
List<SupplierInfo> list = supplierInfoService.selectSupplierInfoList(supplierInfo);
ExcelUtil<SupplierInfo> util = new ExcelUtil<>(SupplierInfo.class);
util.exportExcel(response, list, "物资厂家管理数据");
@ -93,6 +101,8 @@ public class SupplierInfoController extends BaseController {
@PostMapping
public AjaxResult add(@RequestBody SupplierInfo supplierInfo) {
try {
Long deptId = typeService.getUserDeptId();
supplierInfo.setCompanyId(String.valueOf(deptId));
return supplierInfoService.insertSupplierInfo(supplierInfo);
} catch (Exception e) {
return error("系统错误, " + e.getMessage());

View File

@ -86,6 +86,8 @@ public class TypeController extends BaseController {
@SysLog(title = "物资类型管理", businessType = OperaType.EXPORT, module = "仓储管理->导出物资类型")
@PostMapping("/export")
public void export(HttpServletResponse response, MaTypeVo maTypeVo) {
Long deptId = typeService.getUserDeptId();
maTypeVo.setCompanyId(deptId);
List<Integer> parentIds = typeService.selectParentId(maTypeVo);
ExcelUtil<MaTypeVo> util = new ExcelUtil<>(MaTypeVo.class);
/*for (Integer parentId : parentIds) {
@ -114,6 +116,8 @@ public class TypeController extends BaseController {
@ApiOperation(value = "根据左列表类型id查询右表格")
@GetMapping("/getListByMaType")
public AjaxResult getListByMaType(MaTypeVo maTypeVo) {
Long deptId = typeService.getUserDeptId();
maTypeVo.setCompanyId(deptId);
List<Integer> parentIds = typeService.selectParentId(maTypeVo);
if (CollectionUtils.isEmpty(parentIds)) {
return AjaxResult.success(new ArrayList<>());
@ -225,7 +229,8 @@ public class TypeController extends BaseController {
@GetMapping("/getMaTypeTreeSelect")
public AjaxResult getMaTypeTreeSelect(@RequestParam(required = false, defaultValue = "", value = "typeName") String typeName,
@RequestParam(required = false, defaultValue = "", value = "parentId") String parentId) {
return typeService.getMaTypeTreeSelect(typeName, parentId);
Long deptId = typeService.getUserDeptId();
return typeService.getMaTypeTreeSelect(typeName, parentId,deptId);
}
@ -277,6 +282,8 @@ public class TypeController extends BaseController {
@SysLog(title = "物资类型管理", businessType = OperaType.INSERT, module = "仓储管理->新增物资类型")
@PostMapping
public AjaxResult add(@RequestBody Type type) {
Long deptId = typeService.getUserDeptId();
type.setCompanyId(deptId);
return toAjax(typeService.insertType(type));
}

View File

@ -163,4 +163,6 @@ public class MachineSynch extends BaseEntity {
private String result;
private int parentId;
private Long companyId;
}

View File

@ -67,7 +67,7 @@ public interface TypeMapper {
* 物资类型树形结构
*/
List<Type> selectMaTypeTree();
List<Type> selectMaTypeTree(Long deptId);
/**
* 查询物资类型列表

View File

@ -108,9 +108,9 @@ public interface ITypeService {
*/
AjaxResult deleteTypeByTypeId(Long typeId);
List<TreeSelect> getMaTypeTree(String typeName, String parentId);
List<TreeSelect> getMaTypeTree(String typeName, String parentId,Long deptId);
AjaxResult getMaTypeTreeSelect(String typeName,String parentId);
AjaxResult getMaTypeTreeSelect(String typeName,String parentId,Long deptId);
/**
* 构建前端所需要树结构

View File

@ -567,6 +567,7 @@ public class TypeServiceImpl implements ITypeService {
WhHouseSet whHouseSet = new WhHouseSet();
whHouseSet.setHouseId(type.getHouseId());
whHouseSet.setTypeId(newTypeId);
whHouseSet.setCompanyId(type.getCompanyId());
houseSetService.insertWhHouseSet(whHouseSet);
}
// 根据patentId查询库管及维修员id集合
@ -747,8 +748,8 @@ public class TypeServiceImpl implements ITypeService {
@Override
public List<TreeSelect> getMaTypeTree(String typeName, String parentId) {
List<Type> maTypes = typeMapper.selectMaTypeTree();
public List<TreeSelect> getMaTypeTree(String typeName, String parentId,Long deptId) {
List<Type> maTypes = typeMapper.selectMaTypeTree(deptId);
if (CollectionUtils.isNotEmpty(maTypes)) {
// 根据typeId查询子集数量
for (Type type : maTypes) {
@ -769,11 +770,11 @@ public class TypeServiceImpl implements ITypeService {
}
@Override
public AjaxResult getMaTypeTreeSelect(String typeName, String parentId) {
public AjaxResult getMaTypeTreeSelect(String typeName, String parentId,Long deptId) {
// 1.顶级节点及子节点数据全部查询完毕
List<TreeSelect> maTypeList = this.getMaTypeTree(typeName, parentId);
List<TreeSelect> maTypeList = this.getMaTypeTree(typeName, parentId,deptId);
// 2.查询所有的仓库配置
List<WhHouseSet> whHouseSets = houseSetService.selectListByMaType(null);
List<WhHouseSet> whHouseSets = houseSetService.selectListByMaType(null,deptId);
// 2.1 定义最终接口返回集合
List<TreeSelect> treeSelectResultList = new ArrayList<>();

View File

@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.log.enums.OperaType;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import com.bonus.material.ma.service.ITypeService;
import com.bonus.material.scrap.domain.ScrapReason;
import com.bonus.material.scrap.service.IScrapReasonService;
import io.swagger.annotations.Api;
@ -42,6 +43,9 @@ public class ScrapReasonController extends BaseController {
@Autowired
private IScrapReasonService scrapReasonService;
@Autowired
private ITypeService typeService;
/**
* 查询二级类型下拉框列表
*/
@ -49,6 +53,8 @@ public class ScrapReasonController extends BaseController {
@RequiresPermissions("scrap:reason:list")
@GetMapping("/levelTwolist")
public AjaxResult levelTwolist(ScrapReason scrapReason) {
Long deptId = typeService.getUserDeptId();
scrapReason.setCompanyId(deptId);
List<ScrapReason> list = scrapReasonService.levelTwolist(scrapReason);
return success(list);
}
@ -60,6 +66,8 @@ public class ScrapReasonController extends BaseController {
@RequiresPermissions("scrap:reason:list")
@GetMapping("/levelThreelist")
public AjaxResult levelThreelist(ScrapReason scrapReason) {
Long deptId = typeService.getUserDeptId();
scrapReason.setCompanyId(deptId);
List<ScrapReason> list = scrapReasonService.levelThreelist(scrapReason);
return success(list);
}
@ -88,6 +96,8 @@ public class ScrapReasonController extends BaseController {
@RequiresPermissions("scrap:reason:list")
@GetMapping("/list")
public TableDataInfo list(ScrapReason scrapReason) {
Long deptId = typeService.getUserDeptId();
scrapReason.setCompanyId(deptId);
startPage();
List<ScrapReason> list = scrapReasonService.selectScrapReasonList(scrapReason);
return getDataTable(list);
@ -103,6 +113,8 @@ public class ScrapReasonController extends BaseController {
@SysLog(title = "报废原因管理", businessType = OperaType.EXPORT, module = "报废原因管理->导出报废原因管理列表")
@PostMapping("/export")
public void export(HttpServletResponse response, ScrapReason scrapReason) {
Long deptId = typeService.getUserDeptId();
scrapReason.setCompanyId(deptId);
List<ScrapReason> list = scrapReasonService.selectScrapReasonList(scrapReason);
ExcelUtil<ScrapReason> util = new ExcelUtil<ScrapReason>(ScrapReason.class);
util.exportExcel(response, list, "报废原因数据");

View File

@ -77,4 +77,6 @@ public class ScrapReason extends BaseEntity {
@ApiModelProperty(value = "备注")
private String remark;
private Long companyId;
}

View File

@ -38,6 +38,7 @@ import com.bonus.material.basic.domain.report.DownloadRequest;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import com.bonus.material.common.domain.dto.SelectDto;
import com.bonus.material.common.utils.DocxUtil;
import com.bonus.material.ma.service.ITypeService;
import com.bonus.material.part.domain.PartLeaseInfo;
import com.bonus.material.settlement.domain.*;
import com.bonus.material.settlement.domain.dto.ExportProgressManager;
@ -110,6 +111,11 @@ public class SltAgreementInfoController extends BaseController {
@Autowired
private ExportProgressManager exportProgressManager;
@Autowired
private ITypeService typeService;
private static final Map<String, DownloadProgress> downloadProgressMap = new ConcurrentHashMap<>();
/**
* 查询结算信息列表
@ -131,6 +137,8 @@ public class SltAgreementInfoController extends BaseController {
public AjaxResult getSltAgreementInfo4Project(SltAgreementInfo bean) {
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
Long deptId = typeService.getUserDeptId();
bean.setCompanyId(deptId);
// int loginUserHasSettlementPermission = sltAgreementInfoService.checkLoginUserHasSettlementPermission();
// if (bean != null) {
// bean.setSettlementType(loginUserHasSettlementPermission);
@ -1599,9 +1607,9 @@ public class SltAgreementInfoController extends BaseController {
@ApiOperation(value = "结算审批列表")
@GetMapping("/getSltList")
public TableDataInfo getSltList(SltAgreementInfo bean) {
Long deptId = typeService.getUserDeptId();
bean.setCompanyId(deptId);
startPage();
List<SltAgreementInfo> list = sltAgreementInfoService.getSltList(bean);
return getDataTable(list);
}

View File

@ -2,6 +2,7 @@ package com.bonus.material.warehouse.mapper;
import java.util.List;
import com.bonus.material.warehouse.domain.WhHouseSet;
import org.apache.ibatis.annotations.Param;
/**
* 仓库货架配置Mapper接口
@ -32,7 +33,7 @@ public interface WhHouseSetMapper
* 根据物资类型id查询机具列表
* @param typeId 物资类型id
*/
List<WhHouseSet> selectListByMaType(Long typeId);
List<WhHouseSet> selectListByMaType(@Param("typeId") Long typeId, @Param("deptId") Long deptId);
/**
* 新增仓库货架配置

View File

@ -27,7 +27,7 @@ public interface IWhHouseSetService
*/
public List<WhHouseSet> selectWhHouseSetList(WhHouseSet whHouseSet);
List<WhHouseSet> selectListByMaType(Long typeId);
List<WhHouseSet> selectListByMaType(Long typeId,Long deptId);
/**
* 新增仓库货架配置

View File

@ -46,8 +46,8 @@ public class WhHouseSetServiceImpl implements IWhHouseSetService
@Override
public List<WhHouseSet> selectListByMaType(Long typeId) {
return whHouseSetMapper.selectListByMaType(typeId);
public List<WhHouseSet> selectListByMaType(Long typeId,Long deptId) {
return whHouseSetMapper.selectListByMaType(typeId,deptId);
}
;

View File

@ -56,14 +56,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND mt.del_flag = '0'
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
AND mt1.del_flag = '0'
<where>
where 1=1
<if test="modelTitle != null and modelTitle != ''">
and bs.model_title like concat('%', #{modelTitle}, '%')
</if>
<if test="typeId != null">
and mt.type_id = #{typeId}
</if>
</where>
<if test="companyId != null">
and mt.company_id = #{companyId}
</if>
ORDER BY bs.create_time DESC
</select>

View File

@ -25,6 +25,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dictLabel != null and dictLabel != ''">
AND dict_label like concat('%', #{dictLabel}, '%')
</if>
<if test="companyId != null">
AND company_id = #{companyId}
</if>
</where>
order by dict_sort asc
</select>

View File

@ -40,6 +40,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeId != null and typeId != 0">
AND bu.type_id = #{typeId}
</if>
<if test="companyId != null">
AND bu.dept_id = #{companyId}
</if>
UNION
@ -73,6 +78,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeId != null and typeId != 0">
AND bu.type_id = #{typeId}
</if>
<if test="companyId != null">
AND bu.dept_id = #{companyId}
</if>
UNION
SELECT
@ -105,6 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeId != null and typeId != 0">
AND bu.type_id = #{typeId}
</if>
<if test="companyId != null">
AND bu.dept_id = #{companyId}
</if>
) ff
ORDER BY
LEVEL
@ -144,6 +155,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE mm.ma_code is not null and mm.ma_status in (1)
GROUP BY mt.type_id) AS subquery0 ON subquery0.type_id = mt.type_id
WHERE mt.del_flag = '0'
<if test="companyId != null">
AND mt.company_id = #{companyId}
</if>
<if test="level!=null and level!=''">
<if test="level == 2">
AND mt.level IN ('1','2')
@ -397,6 +411,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeId != null and typeId != 0">
AND bu.type_id = #{typeId}
</if>
<if test="companyId != null">
AND bu.dept_id = #{companyId}
</if>
</if>
<if test="projectId == null">
SELECT unit_id AS unitId,
@ -409,6 +426,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeId != null and typeId != 0">
AND bu.type_id = #{typeId}
</if>
<if test="companyId != null">
AND bu.dept_id = #{companyId}
</if>
</if>
</select>
@ -1011,6 +1031,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="level == 4">
AND mt.level IN ('1','2','3','4')
</if>
<if test="companyId != null">
AND mt.company_id = #{companyId}
</if>
</if>
</select>
@ -1343,8 +1366,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
type_name as typeName
FROM
ma_type
WHERE
del_flag='0'
WHERE 1=1
<if test="companyId != null">
and company_id = #{companyId}
</if>
and del_flag='0'
and parent_id='0'
</select>
<select id="getMaterialTypeList" resultType="com.bonus.material.ma.domain.Type">
@ -1356,6 +1382,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
del_flag='0'
and `level`='2'
<if test="companyId != null">
and company_id = #{companyId}
</if>
<if test="constructionType != null and constructionType.length > 0">
and parent_id in
<foreach item="item" index="index" collection="constructionType" open="(" separator="," close=")">

View File

@ -165,7 +165,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jiJuTypeStr != null and jiJuTypeStr != ''">
AND mt.jiju_type = #{jiJuTypeStr}
</if>
<if test="companyId != null ">
and ma.company_id = #{companyId}
</if>
) a
where
1=1
@ -256,6 +258,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="manageType != null and manageType!=''">
and manage_type=#{manageType}
</if>
<if test="companyId != null">
and company_id = #{companyId}
</if>
GROUP BY type_name
</select>
@ -1214,6 +1219,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
or su.nick_name like concat('%', #{keyWord}, '%')
)
</if>
<if test="companyId != null">
and mci.company_id = #{companyId}
</if>
</where>
order by mci.create_time desc
</select>
@ -1264,12 +1272,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into ma_check_info(
ex_code,
create_by,
create_time
create_time,
company_id
)
values(
#{reportNum},
#{userId},
NOW()
NOW(),
#{companyId}
)
</insert>

View File

@ -219,7 +219,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
and mt2.type_id is not null
and mhs.house_id = #{houseId} and mhs.del_flag = 0
<if test="companyId != null">and mt2.company_id = #{companyId} and mhs.company_id = #{companyId}</if>
</where>
</select>
@ -261,6 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="samplingRatio != null">sampling_ratio,</if>
<if test="isEnter != null">is_enter,</if>
<if test="jiJuType != null">jiJu_type,</if>
<if test="companyId != null">company_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="typeName != null and typeName != ''">#{typeName},</if>
@ -298,6 +299,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="samplingRatio != null">#{samplingRatio},</if>
<if test="isEnter != null">#{isEnter},</if>
<if test="jiJuType != null">#{jiJuType},</if>
<if test="companyId != null">#{companyId},</if>
</trim>
</insert>
@ -379,7 +381,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ma_type mt1 on mt1.type_id=mt2.parent_id
left join wh_house_set whs on mt1.type_id=whs.type_id
where mt3.del_flag = 0 and mt3.level = 3
<if test="deptId != null">and mt3.company_id = #{deptId}</if>
UNION
select
@ -389,7 +391,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ma_type mt1 on mt1.type_id=mt2.parent_id
left join wh_house_set whs on mt1.type_id=whs.type_id
where mt2.del_flag = 0 and mt2.level = 2
<if test="deptId != null">and mt2.company_id = #{deptId}</if>
UNION
select
@ -398,7 +400,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from ma_type mt1
left join wh_house_set whs on mt1.type_id=whs.type_id
where mt1.del_flag = 0 and mt1.level = 1
<if test="deptId != null">and mt1.company_id = #{deptId}</if>
order by type_id
</select>
@ -1308,6 +1310,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
or m3.type_name like concat('%',#{type.keyword},'%')
)
</if>
<if test="type.companyId != null">
and m.company_id = #{type.companyId}
</if>
GROUP BY m.type_id
ORDER BY
m.sort_num ASC,

View File

@ -8,12 +8,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select type_id as parentId,type_name as parentName
from ma_type mt
where level = 2 and del_flag = 0
<if test="companyId != null">
and mt.company_id = #{companyId}
</if>
</select>
<select id="levelThreelist" resultType="com.bonus.material.scrap.domain.ScrapReason">
select type_id as typeId,type_name as typeName
from ma_type mt
where parent_id = #{parentId} and del_flag = 0
<if test="companyId != null">
and mt.company_id = #{companyId}
</if>
</select>
@ -34,6 +40,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
OR mt.type_name LIKE CONCAT('%',#{keyWord},'%')
)
</if>
<if test="companyId != null">
and mt.company_id = #{companyId}
</if>
</select>

View File

@ -263,6 +263,9 @@
<if test="agreementCode != null">
and bai.agreement_code like concat('%',#{agreementCode},'%')
</if>
<if test="companyId != null">
and bai.company_id = #{companyId}
</if>
GROUP BY bai.agreement_id
) t
<where>
@ -687,12 +690,15 @@
<if test="projectId != null and projectId != ''">
and bp.pro_id = #{projectId}
</if>
<if test="companyId != null">
and bai.company_id = #{companyId}
</if>
<choose>
<when test="sltStatus == '1'.toString()">
and sas.slt_status = '1'
</when>
<when test="sltStatus == '2'.toString()">
and ssas.slt_status = '2'
and sas.slt_status = '2'
</when>
<when test="sltStatus == '3'.toString()">
and sas.slt_status = '3'

View File

@ -123,5 +123,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ma_type mt2 on mt1.parent_id = mt2.type_id
right join wh_house_info mhi on mhs.house_id = mhi.house_id
where mhi.del_flag=0
<if test="deptId != null">and mhs.company_id = #{deptId}</if>
</select>
</mapper>