diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/DataCodeEnum.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/DataCodeEnum.java new file mode 100644 index 00000000..6b1aab14 --- /dev/null +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/DataCodeEnum.java @@ -0,0 +1,26 @@ +package com.bonus.common.biz.enums; + +import lombok.Getter; + +/** + * @author : 阮世耀 + * @version : 1.0 + * @PackagePath: com.bonus.common.biz.enums + * @CreateTime: 2024-10-15 10:28 + * @Description: 数据状态枚举类 + */ +@Getter +public enum DataCodeEnum { + + NORMAL(0, "正常"), + DELETED(2, "已删除"); + + private final int code; + private final String msg; + + DataCodeEnum(int code, String msg) { + this.code = code; + this.msg = msg; + } + +} diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/HttpCodeEnum.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/HttpCodeEnum.java index df53128d..7032eee0 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/HttpCodeEnum.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/enums/HttpCodeEnum.java @@ -1,5 +1,12 @@ package com.bonus.common.biz.enums; +import lombok.Getter; + +/** + * @author bonus + */ + +@Getter public enum HttpCodeEnum { // 成功 SUCCESS(200, "操作成功"), @@ -20,19 +27,13 @@ public enum HttpCodeEnum { NICKNAME_EXIST(512, "昵称已存在"), LOGIN_ERROR(505, "用户名或密码错误"), REPEATE_ERROR(600, "不允许重复提交,请稍候再试"); - int code; - String msg; + + private final int code; + private final String msg; HttpCodeEnum(int code, String errorMessage) { this.code = code; this.msg = errorMessage; } - public int getCode() { - return code; - } - - public String getMsg() { - return msg; - } } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java index b7195b9c..ab0e2f54 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java @@ -57,7 +57,7 @@ public class TypeController extends BaseController { /** * 导出物资类型管理列表 */ - @ApiOperation(value = "导出物资类型管理列表") + @ApiOperation(value = "导出物资类型列表") @PreventRepeatSubmit @RequiresPermissions("ma:type:export") @SysLog(title = "物资类型管理", businessType = OperaType.EXPORT, module = "仓储管理->导出物资类型") @@ -71,7 +71,7 @@ public class TypeController extends BaseController { /** * 获取物资类型管理详细信息 */ - @ApiOperation(value = "获取物资类型管理详细信息") + @ApiOperation(value = "获取物资类型详细信息") @RequiresPermissions("ma:type:query") @GetMapping(value = "/{typeId}") public AjaxResult getInfo(@PathVariable("typeId") Long typeId) { @@ -81,7 +81,7 @@ public class TypeController extends BaseController { /** * 新增物资类型管理 */ - @ApiOperation(value = "新增物资类型管理") + @ApiOperation(value = "新增物资类型") @PreventRepeatSubmit @RequiresPermissions("ma:type:add") @SysLog(title = "物资类型管理", businessType = OperaType.INSERT, module = "仓储管理->新增物资类型") @@ -93,7 +93,7 @@ public class TypeController extends BaseController { /** * 修改物资类型管理 */ - @ApiOperation(value = "修改物资类型管理") + @ApiOperation(value = "修改物资类型") @PreventRepeatSubmit @RequiresPermissions("ma:type:edit") @SysLog(title = "物资类型管理", businessType = OperaType.UPDATE, module = "仓储管理->修改物资类型") @@ -105,7 +105,7 @@ public class TypeController extends BaseController { /** * 删除物资类型管理 */ - @ApiOperation(value = "删除物资类型管理") + @ApiOperation(value = "删除物资类型") @PreventRepeatSubmit @RequiresPermissions("ma:type:remove") @SysLog(title = "物资类型管理", businessType = OperaType.DELETE, module = "仓储管理->删除物资类型") diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeKeeperController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeKeeperController.java index d719aff8..b328de4f 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeKeeperController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeKeeperController.java @@ -26,15 +26,13 @@ import com.bonus.common.core.web.page.TableDataInfo; /** * 库管员配置Controller - * - * @author xsheng - * @date 2024-09-27 + * @author bonus */ @Api(tags = "库管员配置接口") @RestController @RequestMapping("/ma_type_keeper") -public class TypeKeeperController extends BaseController -{ +public class TypeKeeperController extends BaseController { + @Autowired private ITypeKeeperService typeKeeperService; @@ -44,8 +42,7 @@ public class TypeKeeperController extends BaseController @ApiOperation(value = "查询库管员配置列表") @RequiresPermissions("ma:keeper:list") @GetMapping("/list") - public TableDataInfo list(TypeKeeper typeKeeper) - { + public TableDataInfo list(TypeKeeper typeKeeper) { startPage(); List list = typeKeeperService.selectTypeKeeperList(typeKeeper); return getDataTable(list); @@ -57,10 +54,9 @@ public class TypeKeeperController extends BaseController @ApiOperation(value = "导出库管员配置列表") @PreventRepeatSubmit @RequiresPermissions("ma:keeper:export") - @SysLog(title = "库管员配置", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出库管员配置") + @SysLog(title = "库管员配置", businessType = OperaType.EXPORT, module = "仓储管理->导出库管员配置") @PostMapping("/export") - public void export(HttpServletResponse response, TypeKeeper typeKeeper) - { + public void export(HttpServletResponse response, TypeKeeper typeKeeper) { List list = typeKeeperService.selectTypeKeeperList(typeKeeper); ExcelUtil util = new ExcelUtil(TypeKeeper.class); util.exportExcel(response, list, "库管员配置数据"); @@ -72,8 +68,7 @@ public class TypeKeeperController extends BaseController @ApiOperation(value = "获取库管员配置详细信息") @RequiresPermissions("ma:keeper:query") @GetMapping(value = "/{ID}") - public AjaxResult getInfo(@PathVariable("ID") Long ID) - { + public AjaxResult getInfo(@PathVariable("ID") Long ID) { return success(typeKeeperService.selectTypeKeeperByID(ID)); } @@ -83,10 +78,9 @@ public class TypeKeeperController extends BaseController @ApiOperation(value = "新增库管员配置") @PreventRepeatSubmit @RequiresPermissions("ma:keeper:add") - @SysLog(title = "库管员配置", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增库管员配置") + @SysLog(title = "库管员配置", businessType = OperaType.INSERT, module = "仓储管理->新增库管员配置") @PostMapping - public AjaxResult add(@RequestBody TypeKeeper typeKeeper) - { + public AjaxResult add(@RequestBody TypeKeeper typeKeeper) { return toAjax(typeKeeperService.insertTypeKeeper(typeKeeper)); } @@ -96,10 +90,9 @@ public class TypeKeeperController extends BaseController @ApiOperation(value = "修改库管员配置") @PreventRepeatSubmit @RequiresPermissions("ma:keeper:edit") - @SysLog(title = "库管员配置", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改库管员配置") + @SysLog(title = "库管员配置", businessType = OperaType.UPDATE, module = "仓储管理->修改库管员配置") @PutMapping - public AjaxResult edit(@RequestBody TypeKeeper typeKeeper) - { + public AjaxResult edit(@RequestBody TypeKeeper typeKeeper) { return toAjax(typeKeeperService.updateTypeKeeper(typeKeeper)); } @@ -109,7 +102,7 @@ public class TypeKeeperController extends BaseController @ApiOperation(value = "删除库管员配置") @PreventRepeatSubmit @RequiresPermissions("ma:keeper:remove") - @SysLog(title = "库管员配置", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除库管员配置") + @SysLog(title = "库管员配置", businessType = OperaType.DELETE, module = "仓储管理->删除库管员配置") @DeleteMapping("/{IDs}") public AjaxResult remove(@PathVariable Long[] IDs) { diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/TypeKeeper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/TypeKeeper.java index 3bf63608..660b4187 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/TypeKeeper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/TypeKeeper.java @@ -3,22 +3,20 @@ package com.bonus.material.ma.domain; import com.bonus.common.core.annotation.Excel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.ToString; import com.bonus.common.core.web.domain.BaseEntity; /** * 库管员配置对象 ma_type_keeper - * - * @author xsheng - * @date 2024-09-27 */ - +@EqualsAndHashCode(callSuper = false) @Data @ToString -public class TypeKeeper extends BaseEntity -{ - private static final long serialVersionUID = 1L; +public class TypeKeeper extends BaseEntity { + + private static final long serialVersionUID = -5333521595576336827L; /** 主键ID */ private Long ID; @@ -27,10 +25,17 @@ public class TypeKeeper extends BaseEntity private Long typeId; /** 用户 */ - @Excel(name = "用户") - @ApiModelProperty(value = "用户") + @Excel(name = "用户ID") + @ApiModelProperty(value = "用户ID") private Long userId; + /** + * 用户名称 + */ + @Excel(name = "用户名称") + @ApiModelProperty(value = "用户名称") + private String userName; + /** 数据所属组织 */ @Excel(name = "数据所属组织") @ApiModelProperty(value = "数据所属组织") diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/PartRepairMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/PartRepairMapper.java index 830682a4..f5db8b41 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/PartRepairMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/PartRepairMapper.java @@ -5,12 +5,11 @@ import com.bonus.material.ma.domain.PartRepair; /** * 维修班配件配置Mapper接口 - * + * * @author xsheng * @date 2024-09-27 */ -public interface PartRepairMapper -{ +public interface PartRepairMapper { /** * 查询维修班配件配置 * diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeKeeperMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeKeeperMapper.java index 1273e086..4dc372fd 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeKeeperMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeKeeperMapper.java @@ -2,22 +2,20 @@ package com.bonus.material.ma.mapper; import java.util.List; import com.bonus.material.ma.domain.TypeKeeper; +import org.apache.ibatis.annotations.Mapper; /** * 库管员配置Mapper接口 - * - * @author xsheng - * @date 2024-09-27 */ -public interface TypeKeeperMapper -{ +@Mapper +public interface TypeKeeperMapper { /** * 查询库管员配置 * * @param ID 库管员配置主键 * @return 库管员配置 */ - public TypeKeeper selectTypeKeeperByID(Long ID); + TypeKeeper selectTypeKeeperByID(Long ID); /** * 查询库管员配置列表 @@ -25,7 +23,7 @@ public interface TypeKeeperMapper * @param typeKeeper 库管员配置 * @return 库管员配置集合 */ - public List selectTypeKeeperList(TypeKeeper typeKeeper); + List selectTypeKeeperList(TypeKeeper typeKeeper); /** * 新增库管员配置 @@ -33,7 +31,7 @@ public interface TypeKeeperMapper * @param typeKeeper 库管员配置 * @return 结果 */ - public int insertTypeKeeper(TypeKeeper typeKeeper); + int insertTypeKeeper(TypeKeeper typeKeeper); /** * 修改库管员配置 @@ -41,7 +39,7 @@ public interface TypeKeeperMapper * @param typeKeeper 库管员配置 * @return 结果 */ - public int updateTypeKeeper(TypeKeeper typeKeeper); + int updateTypeKeeper(TypeKeeper typeKeeper); /** * 删除库管员配置 @@ -49,7 +47,7 @@ public interface TypeKeeperMapper * @param ID 库管员配置主键 * @return 结果 */ - public int deleteTypeKeeperByID(Long ID); + int deleteTypeKeeperByID(Long ID); /** * 批量删除库管员配置 @@ -57,5 +55,5 @@ public interface TypeKeeperMapper * @param IDs 需要删除的数据主键集合 * @return 结果 */ - public int deleteTypeKeeperByIDs(Long[] IDs); + int deleteTypeKeeperByIDs(Long[] IDs); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeKeeperService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeKeeperService.java index 39a73c7a..701e600f 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeKeeperService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeKeeperService.java @@ -5,19 +5,15 @@ import com.bonus.material.ma.domain.TypeKeeper; /** * 库管员配置Service接口 - * - * @author xsheng - * @date 2024-09-27 */ -public interface ITypeKeeperService -{ +public interface ITypeKeeperService { /** * 查询库管员配置 * * @param ID 库管员配置主键 * @return 库管员配置 */ - public TypeKeeper selectTypeKeeperByID(Long ID); + TypeKeeper selectTypeKeeperByID(Long ID); /** * 查询库管员配置列表 @@ -25,7 +21,7 @@ public interface ITypeKeeperService * @param typeKeeper 库管员配置 * @return 库管员配置集合 */ - public List selectTypeKeeperList(TypeKeeper typeKeeper); + List selectTypeKeeperList(TypeKeeper typeKeeper); /** * 新增库管员配置 @@ -33,7 +29,7 @@ public interface ITypeKeeperService * @param typeKeeper 库管员配置 * @return 结果 */ - public int insertTypeKeeper(TypeKeeper typeKeeper); + int insertTypeKeeper(TypeKeeper typeKeeper); /** * 修改库管员配置 @@ -41,7 +37,7 @@ public interface ITypeKeeperService * @param typeKeeper 库管员配置 * @return 结果 */ - public int updateTypeKeeper(TypeKeeper typeKeeper); + int updateTypeKeeper(TypeKeeper typeKeeper); /** * 批量删除库管员配置 @@ -49,7 +45,7 @@ public interface ITypeKeeperService * @param IDs 需要删除的库管员配置主键集合 * @return 结果 */ - public int deleteTypeKeeperByIDs(Long[] IDs); + int deleteTypeKeeperByIDs(Long[] IDs); /** * 删除库管员配置信息 @@ -57,5 +53,5 @@ public interface ITypeKeeperService * @param ID 库管员配置主键 * @return 结果 */ - public int deleteTypeKeeperByID(Long ID); + int deleteTypeKeeperByID(Long ID); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeKeeperServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeKeeperServiceImpl.java index 11e4155b..0da9dd02 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeKeeperServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeKeeperServiceImpl.java @@ -15,8 +15,8 @@ import com.bonus.material.ma.service.ITypeKeeperService; * @date 2024-09-27 */ @Service -public class TypeKeeperServiceImpl implements ITypeKeeperService -{ +public class TypeKeeperServiceImpl implements ITypeKeeperService { + @Autowired private TypeKeeperMapper typeKeeperMapper; @@ -27,8 +27,7 @@ public class TypeKeeperServiceImpl implements ITypeKeeperService * @return 库管员配置 */ @Override - public TypeKeeper selectTypeKeeperByID(Long ID) - { + public TypeKeeper selectTypeKeeperByID(Long ID) { return typeKeeperMapper.selectTypeKeeperByID(ID); } @@ -39,8 +38,7 @@ public class TypeKeeperServiceImpl implements ITypeKeeperService * @return 库管员配置 */ @Override - public List selectTypeKeeperList(TypeKeeper typeKeeper) - { + public List selectTypeKeeperList(TypeKeeper typeKeeper) { return typeKeeperMapper.selectTypeKeeperList(typeKeeper); } @@ -51,8 +49,7 @@ public class TypeKeeperServiceImpl implements ITypeKeeperService * @return 结果 */ @Override - public int insertTypeKeeper(TypeKeeper typeKeeper) - { + public int insertTypeKeeper(TypeKeeper typeKeeper) { typeKeeper.setCreateTime(DateUtils.getNowDate()); return typeKeeperMapper.insertTypeKeeper(typeKeeper); } @@ -64,8 +61,7 @@ public class TypeKeeperServiceImpl implements ITypeKeeperService * @return 结果 */ @Override - public int updateTypeKeeper(TypeKeeper typeKeeper) - { + public int updateTypeKeeper(TypeKeeper typeKeeper) { typeKeeper.setUpdateTime(DateUtils.getNowDate()); return typeKeeperMapper.updateTypeKeeper(typeKeeper); } @@ -77,8 +73,7 @@ public class TypeKeeperServiceImpl implements ITypeKeeperService * @return 结果 */ @Override - public int deleteTypeKeeperByIDs(Long[] IDs) - { + public int deleteTypeKeeperByIDs(Long[] IDs) { return typeKeeperMapper.deleteTypeKeeperByIDs(IDs); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java index 078f9299..0803cd37 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java @@ -6,6 +6,7 @@ import java.util.Objects; import java.util.stream.Collectors; import com.bonus.common.biz.domain.TreeSelect; +import com.bonus.common.biz.enums.DataCodeEnum; import com.bonus.common.core.utils.DateUtils; import com.bonus.common.core.utils.StringUtils; import com.bonus.material.ma.vo.MaTypeListVo; @@ -49,9 +50,15 @@ public class TypeServiceImpl implements ITypeService { */ @Override public List selectTypeList(Type type) { - // 如果是顶级节点,则查询所有子节点 - if (type != null && "0".equals(type.getLevel())) { - type.setLevel(null); + if (type != null ) { + if (type.getDelFlag() == null || type.getDelFlag().isEmpty()) { + // 如果没赋值,则默认查询正常数据状态 + type.setDelFlag(String.valueOf(DataCodeEnum.NORMAL.getCode())); + } + // 如果是顶级节点,则查询所有子节点 + if ("0".equals(type.getLevel())) { + type.setLevel(null); + } } return typeMapper.selectTypeList(type); } @@ -130,6 +137,10 @@ public class TypeServiceImpl implements ITypeService { .collect(Collectors.toList()); } + /** + * 通过构造函数将 Type对象 转换为 TreeSelect -- 并递归处理子节点 + * @param type 要进行转换的object对象 + */ private TreeSelect convertToTreeSelect(Type type) { List children = type.getChildren().stream() .filter(Objects::nonNull) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/controller/WhHouseInfoController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/controller/WhHouseInfoController.java index b2de6065..573f8ba4 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/controller/WhHouseInfoController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/controller/WhHouseInfoController.java @@ -33,8 +33,8 @@ import com.bonus.common.core.web.page.TableDataInfo; @Api(tags = "仓库管理接口") @RestController @RequestMapping("/wh_house_info") -public class WhHouseInfoController extends BaseController -{ +public class WhHouseInfoController extends BaseController { + @Autowired private IWhHouseInfoService whHouseInfoService; @@ -44,13 +44,23 @@ public class WhHouseInfoController extends BaseController @ApiOperation(value = "查询仓库管理列表") @RequiresPermissions("warehouse:info:list") @GetMapping("/list") - public TableDataInfo list(WhHouseInfo whHouseInfo) - { + public TableDataInfo list(WhHouseInfo whHouseInfo) { startPage(); List list = whHouseInfoService.selectWhHouseInfoList(whHouseInfo); return getDataTable(list); } + /** + * 查询仓库列表 -- 不分页 + */ + @ApiOperation(value = "查询仓库列表--不分页") + @RequiresPermissions("warehouse:info:list") + @GetMapping("/listNoPage") + public AjaxResult listNoPage(WhHouseInfo whHouseInfo) { + List list = whHouseInfoService.selectWhHouseInfoList(whHouseInfo); + return success(list); + } + /** * 导出仓库管理列表 */ @@ -59,8 +69,7 @@ public class WhHouseInfoController extends BaseController @RequiresPermissions("warehouse:info:export") @SysLog(title = "仓库管理", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出仓库管理") @PostMapping("/export") - public void export(HttpServletResponse response, WhHouseInfo whHouseInfo) - { + public void export(HttpServletResponse response, WhHouseInfo whHouseInfo) { List list = whHouseInfoService.selectWhHouseInfoList(whHouseInfo); ExcelUtil util = new ExcelUtil(WhHouseInfo.class); util.exportExcel(response, list, "仓库管理数据"); @@ -72,8 +81,7 @@ public class WhHouseInfoController extends BaseController @ApiOperation(value = "获取仓库管理详细信息") @RequiresPermissions("warehouse:info:query") @GetMapping(value = "/{houseId}") - public AjaxResult getInfo(@PathVariable("houseId") Long houseId) - { + public AjaxResult getInfo(@PathVariable("houseId") Long houseId) { return success(whHouseInfoService.selectWhHouseInfoByHouseId(houseId)); } @@ -85,8 +93,7 @@ public class WhHouseInfoController extends BaseController @RequiresPermissions("warehouse:info:add") @SysLog(title = "仓库管理", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增仓库管理") @PostMapping - public AjaxResult add(@RequestBody WhHouseInfo whHouseInfo) - { + public AjaxResult add(@RequestBody WhHouseInfo whHouseInfo) { return toAjax(whHouseInfoService.insertWhHouseInfo(whHouseInfo)); } @@ -98,8 +105,7 @@ public class WhHouseInfoController extends BaseController @RequiresPermissions("warehouse:info:edit") @SysLog(title = "仓库管理", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改仓库管理") @PutMapping - public AjaxResult edit(@RequestBody WhHouseInfo whHouseInfo) - { + public AjaxResult edit(@RequestBody WhHouseInfo whHouseInfo) { return toAjax(whHouseInfoService.updateWhHouseInfo(whHouseInfo)); } @@ -109,10 +115,9 @@ public class WhHouseInfoController extends BaseController @ApiOperation(value = "删除仓库管理") @PreventRepeatSubmit @RequiresPermissions("warehouse:info:remove") - @SysLog(title = "仓库管理", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除仓库管理") + @SysLog(title = "仓库管理", businessType = OperaType.DELETE, module = "仓储管理->删除仓库管理") @DeleteMapping("/{houseIds}") - public AjaxResult remove(@PathVariable Long[] houseIds) - { + public AjaxResult remove(@PathVariable Long[] houseIds) { return toAjax(whHouseInfoService.deleteWhHouseInfoByHouseIds(houseIds)); } } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/domain/WhHouseInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/domain/WhHouseInfo.java index a80385f0..9e828752 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/domain/WhHouseInfo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/domain/WhHouseInfo.java @@ -3,22 +3,20 @@ package com.bonus.material.warehouse.domain; import com.bonus.common.core.annotation.Excel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.ToString; import com.bonus.common.core.web.domain.BaseEntity; /** * 仓库管理对象 wh_house_info - * - * @author xsheng - * @date 2024-09-27 + * @author bonus */ - - +@EqualsAndHashCode(callSuper = false) @Data @ToString -public class WhHouseInfo extends BaseEntity -{ - private static final long serialVersionUID = 1L; +public class WhHouseInfo extends BaseEntity { + + private static final long serialVersionUID = -6993602646196064834L; /** 仓库ID */ private Long houseId; @@ -28,6 +26,16 @@ public class WhHouseInfo extends BaseEntity @ApiModelProperty(value = "工程项目名称") private String houseName; + /** 实物库名称 */ + @Excel(name = "实物库名称") + @ApiModelProperty(value = "实物库名称") + private String physicalName; + + /** 仓库地理位置 */ + @Excel(name = "仓库地理位置") + @ApiModelProperty(value = "仓库地址位置") + private String geoLocation; + /** 上级ID */ @Excel(name = "上级ID") @ApiModelProperty(value = "上级ID") @@ -43,11 +51,12 @@ public class WhHouseInfo extends BaseEntity private Long deptId; /** 删除标志(0代表存在 2代表删除) */ + @ApiModelProperty(value = "删除标志(0存在 2代表已删除)") private String delFlag; /** 数据所属组织 */ - @Excel(name = "数据所属组织") - @ApiModelProperty(value = "数据所属组织") + @Excel(name = "所属组织") + @ApiModelProperty(value = "所属组织") private String companyId; /** 排序 */ diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/mapper/WhHouseInfoMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/mapper/WhHouseInfoMapper.java index a07ddada..82976b74 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/mapper/WhHouseInfoMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/mapper/WhHouseInfoMapper.java @@ -25,7 +25,7 @@ public interface WhHouseInfoMapper * @param whHouseInfo 仓库管理 * @return 仓库管理集合 */ - public List selectWhHouseInfoList(WhHouseInfo whHouseInfo); + List selectWhHouseInfoList(WhHouseInfo whHouseInfo); /** * 新增仓库管理 diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/service/IWhHouseInfoService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/service/IWhHouseInfoService.java index 56f3c7b7..d0736cd2 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/service/IWhHouseInfoService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/service/IWhHouseInfoService.java @@ -9,15 +9,14 @@ import com.bonus.material.warehouse.domain.WhHouseInfo; * @author xsheng * @date 2024-09-27 */ -public interface IWhHouseInfoService -{ +public interface IWhHouseInfoService { /** * 查询仓库管理 * * @param houseId 仓库管理主键 * @return 仓库管理 */ - public WhHouseInfo selectWhHouseInfoByHouseId(Long houseId); + WhHouseInfo selectWhHouseInfoByHouseId(Long houseId); /** * 查询仓库管理列表 @@ -25,7 +24,7 @@ public interface IWhHouseInfoService * @param whHouseInfo 仓库管理 * @return 仓库管理集合 */ - public List selectWhHouseInfoList(WhHouseInfo whHouseInfo); + List selectWhHouseInfoList(WhHouseInfo whHouseInfo); /** * 新增仓库管理 @@ -33,7 +32,7 @@ public interface IWhHouseInfoService * @param whHouseInfo 仓库管理 * @return 结果 */ - public int insertWhHouseInfo(WhHouseInfo whHouseInfo); + int insertWhHouseInfo(WhHouseInfo whHouseInfo); /** * 修改仓库管理 @@ -41,7 +40,7 @@ public interface IWhHouseInfoService * @param whHouseInfo 仓库管理 * @return 结果 */ - public int updateWhHouseInfo(WhHouseInfo whHouseInfo); + int updateWhHouseInfo(WhHouseInfo whHouseInfo); /** * 批量删除仓库管理 @@ -49,7 +48,7 @@ public interface IWhHouseInfoService * @param houseIds 需要删除的仓库管理主键集合 * @return 结果 */ - public int deleteWhHouseInfoByHouseIds(Long[] houseIds); + int deleteWhHouseInfoByHouseIds(Long[] houseIds); /** * 删除仓库管理信息 @@ -57,5 +56,5 @@ public interface IWhHouseInfoService * @param houseId 仓库管理主键 * @return 结果 */ - public int deleteWhHouseInfoByHouseId(Long houseId); + int deleteWhHouseInfoByHouseId(Long houseId); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/service/impl/WhHouseInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/service/impl/WhHouseInfoServiceImpl.java index 6680527b..09eebf28 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/service/impl/WhHouseInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/warehouse/service/impl/WhHouseInfoServiceImpl.java @@ -39,8 +39,7 @@ public class WhHouseInfoServiceImpl implements IWhHouseInfoService * @return 仓库管理 */ @Override - public List selectWhHouseInfoList(WhHouseInfo whHouseInfo) - { + public List selectWhHouseInfoList(WhHouseInfo whHouseInfo) { return whHouseInfoMapper.selectWhHouseInfoList(whHouseInfo); } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeKeeperMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeKeeperMapper.xml index 7260d12f..6394a01b 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeKeeperMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeKeeperMapper.xml @@ -52,8 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" type_id = #{typeId}, user_id = #{userId}, - create_time = #{createTime}, - update_time = #{updateTime}, + update_time = #{updateTime}, company_id = #{companyId}, where ID = #{ID} diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml index 2576399c..342aee02 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml @@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and is_ancuo = #{isAncuo} and fac_model = #{facModel} and intelligent_code = #{intelligentCode} - and del_flag = '0' + and del_flag = #{delFlag} diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/warehouse/WhHouseInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/warehouse/WhHouseInfoMapper.xml index 144fe4b6..5c41eadc 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/warehouse/WhHouseInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/warehouse/WhHouseInfoMapper.xml @@ -6,6 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -22,13 +24,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select house_id, house_name, parent_id, status, dept_id, del_flag, create_by, create_time, update_by, update_time, remark, company_id, sort, concat, phone from wh_house_info + select house_id, house_name, physical_name, geo_location, parent_id, status, dept_id, del_flag, create_by, create_time, update_by, update_time, remark, company_id, sort, concat, phone from wh_house_info