rsf-server/src/main/java/com/vincent/rsf/server/common/security/SecurityConfig.java
@@ -42,6 +42,7 @@ "/pda/login", "/erp/**", "/login", "/**/download", "/register", "/druid/**", "/doc.html", rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/LocAreaMatRelaController.java
@@ -183,12 +183,12 @@ if (Objects.isNull(param)) { throw new CoolException("参数不能为空!!"); } if (Objects.isNull(param.getAreaId())) { throw new CoolException("库区不能为空!!"); } if (Objects.isNull(param.getWarehouseId())) { throw new CoolException("仓库不能为空!!"); } // if (Objects.isNull(param.getAreaId())) { // throw new CoolException("库区不能为空!!"); // } // if (Objects.isNull(param.getWarehouseId())) { // throw new CoolException("仓库不能为空!!"); // } if (Objects.isNull(param.getAreaMatId())) { throw new CoolException("主单ID不能为空!!"); } rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/MatnrGroupController.java
@@ -65,13 +65,14 @@ @PostMapping("/matnrGroup/save") public R save(@RequestBody MatnrGroup matnrGroup) { if (Objects.isNull(matnrGroup)) { throw new CoolException("参数不能为空!!"); return R.error("参数不能为空!!"); } if (Objects.isNull(matnrGroup.getName())) { throw new CoolException("分组名称不能为空!!"); return R.error("分组名称不能为空!!"); } if (Objects.isNull(matnrGroup.getCode())) { throw new CoolException("分组编码不能为空!!"); return R.error("分组编码不能为空!!"); } matnrGroup.setCreateBy(getLoginUserId()); matnrGroup.setUpdateBy(getLoginUserId()); @@ -80,12 +81,12 @@ .eq(!Objects.isNull(matnrGroup.getParCode()), MatnrGroup::getParCode, matnrGroup.getParCode()) .eq(MatnrGroup::getCode, matnrGroup.getCode())); if (!list.isEmpty()) { throw new CoolException("物料分组编码不能重复!!"); return R.error("物料分组编码不能重复!!"); } List<MatnrGroup> groups = matnrGroupService.list(new LambdaQueryWrapper<MatnrGroup>() .eq(MatnrGroup::getName, matnrGroup.getName())); if (!groups.isEmpty()) { throw new CoolException("分组已存在,请勿重复添加!!"); return R.error("分组已存在,请勿重复添加!!"); } //判断上级编码是否为空 if (!Objects.isNull(matnrGroup.getParCode()) && !StringUtils.isBlank(matnrGroup.getParCode())) { @@ -104,10 +105,13 @@ matnrGroup.setUpdateBy(getLoginUserId()); MatnrGroup matGroup = matnrGroupService.getById(matnrGroup.getId()); if (Objects.isNull(matGroup)) { return R.error("物料分组不存在!!"); } if (!matnrGroup.getName().equals(matGroup.getName())) { List<MatnrGroup> areasList = matnrGroupService.list(new LambdaQueryWrapper<MatnrGroup>().eq(MatnrGroup::getName, matnrGroup.getName())); if (!areasList.isEmpty()) { throw new CoolException("仓库名已存在!!"); return R.error("仓库名已存在!!"); } } if (!Objects.isNull(matnrGroup.getCode()) && !matnrGroup.getCode().equals(matGroup.getCode())) { @@ -115,13 +119,8 @@ .eq(!Objects.isNull(matnrGroup.getParCode()), MatnrGroup::getParCode, matnrGroup.getParCode()) .eq(MatnrGroup::getCode, matnrGroup.getCode())); if (!areasList.isEmpty()) { throw new CoolException("仓库编码已存在!!"); return R.error("仓库编码已存在!!"); } } //判断上级编码是否为空 if (!Objects.isNull(matnrGroup.getParCode()) && !StringUtils.isBlank(matnrGroup.getParCode())) { matnrGroup.setCode(matnrGroup.getParCode() + matnrGroup.getCode()); } if (!matnrGroupService.updateById(matnrGroup)) { rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/WarehouseAreasController.java
@@ -115,7 +115,7 @@ @PostMapping("/warehouseAreas/update") public R update(@RequestBody WarehouseAreas warehouseAreas) { warehouseAreas.setUpdateBy(getLoginUserId()); WarehouseAreas areas = warehouseAreasService.getById(warehouseAreas.getWarehouseId()); WarehouseAreas areas = warehouseAreasService.getById(warehouseAreas.getId()); if (Objects.isNull(areas)) { throw new CoolException("数据错误:仓库库区不存在!!"); } rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/params/LocModifyParams.java
@@ -25,6 +25,9 @@ @ApiModelProperty("分区ID") private Long locAreaId; @ApiModelProperty("库位类型") private List<Long> typeIds; @ApiModelProperty("库位信息") private Loc loc; rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WarehouseAreas.java
@@ -206,7 +206,7 @@ return null; } public String getSupplier$() { public String getSupplierId$() { CompanysService service = SpringUtils.getBean(CompanysService.class); Companys supplier = service.getById(this.supplierId); if (!Cools.isEmpty(supplier)){ rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocAreaMatRelaServiceImpl.java
@@ -77,7 +77,7 @@ LocAreaMatRela locAreaMatRela = new LocAreaMatRela(); locAreaMatRela .setAreaMatId(param.getAreaMatId()) .setAreaId(param.getAreaId()) // .setAreaId(param.getAreaId()) .setLocId(locId) .setLocTypeId(typeId) .setMatnrId(matnrId.getId()) rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/LocServiceImpl.java
@@ -49,13 +49,17 @@ throw new CoolException("修改库位信息不能为空!!"); } String join = locs.getLoc().getType(); if (!Objects.isNull(locs.getTypeIds()) && !locs.getTypeIds().isEmpty()) { join = StringUtils.join(locs.getTypeIds(), ","); } boolean update = this.update(new LambdaUpdateWrapper<Loc>() .in(Loc::getId, locs.getId()) .eq(Loc::getStatus, 1) .set(!Objects.isNull(loc.getAreaId()), Loc::getAreaId, loc.getAreaId()) .set(!Objects.isNull(loc.getWarehouseId()), Loc::getWarehouseId, loc.getWarehouseId()) .set(!Objects.isNull(loc.getUseStatus()), Loc::getUseStatus, loc.getUseStatus()) .set(!Objects.isNull(loc.getType()), Loc::getType, loc.getType()) .set(!Objects.isNull(loc.getType()), Loc::getType, join) .set(!Objects.isNull(loc.getLength()), Loc::getLength, loc.getLength()) .set(!Objects.isNull(loc.getWidth()), Loc::getWidth, loc.getWidth()) .set(!Objects.isNull(loc.getHeight()), Loc::getHeight, loc.getHeight())