导出matype

This commit is contained in:
sxu 2024-11-06 16:34:03 +08:00
parent 39a5e5e9c7
commit 5ba84741a0
5 changed files with 79 additions and 1 deletions

View File

@ -153,6 +153,34 @@ public class TypeController extends BaseController {
util.exportExcel(response, list, "物资类型管理数据"); util.exportExcel(response, list, "物资类型管理数据");
} }
/**
* 导出物资类型管理列表(库管员)
*/
@ApiOperation(value = "导出物资类型列表(库管员)")
@PreventRepeatSubmit
@RequiresPermissions("ma:type:export")
@SysLog(title = "物资类型管理(库管员)", businessType = OperaType.EXPORT, module = "仓储管理->导出物资类型(库管员)")
@PostMapping("/export4Keeper")
public void export4Keeper(HttpServletResponse response, Type type) {
List<Type> list = typeService.selectTypeList4Keeper(type);
ExcelUtil<Type> util = new ExcelUtil<Type>(Type.class);
util.exportExcel(response, list, "物资类型管理数据(库管员)");
}
/**
* 导出物资类型管理列表(维修员)
*/
@ApiOperation(value = "导出物资类型列表(维修员)")
@PreventRepeatSubmit
@RequiresPermissions("ma:type:export")
@SysLog(title = "物资类型管理(维修员)", businessType = OperaType.EXPORT, module = "仓储管理->导出物资类型(维修员)")
@PostMapping("/export4Repair")
public void export4Repair(HttpServletResponse response, Type type) {
List<Type> list = typeService.selectTypeList4Repair(type);
ExcelUtil<Type> util = new ExcelUtil<Type>(Type.class);
util.exportExcel(response, list, "物资类型管理数据(维修员)");
}
/** /**
* 获取物资类型管理详细信息 * 获取物资类型管理详细信息
*/ */

View File

@ -59,6 +59,10 @@ public interface TypeMapper {
*/ */
List<Type> selectTypeList(Type type); List<Type> selectTypeList(Type type);
List<Type> selectTypeList4Keeper(Type type);
List<Type> selectTypeList4Repair(Type type);
/** /**
* 查询物资类型列表 -- 并且查询当前节点的父级节点名称 * 查询物资类型列表 -- 并且查询当前节点的父级节点名称

View File

@ -44,6 +44,10 @@ public interface ITypeService {
*/ */
List<Type> selectTypeList(Type type); List<Type> selectTypeList(Type type);
List<Type> selectTypeList4Keeper(Type type);
List<Type> selectTypeList4Repair(Type type);
List<MaTypeVo> selectTypeListAndParentInfo(Type type); List<MaTypeVo> selectTypeListAndParentInfo(Type type);

View File

@ -132,6 +132,48 @@ public class TypeServiceImpl implements ITypeService {
return typeMapper.selectTypeList(type); return typeMapper.selectTypeList(type);
} }
/**
* 查询物资类型管理列表(库管员)
*
* @param type 物资类型管理(库管员)
* @return 物资类型管理(库管员)
*/
@Override
public List<Type> selectTypeList4Keeper(Type type) {
if (type != null ) {
if (StringUtils.isEmpty(type.getDelFlag())) {
// 如果没赋值则默认查询正常数据状态
type.setDelFlag(String.valueOf(DataCodeEnum.NORMAL.getCode()));
}
// 如果是顶级节点则查询所有子节点
if ("0".equals(type.getLevel())) {
type.setLevel(null);
}
}
return typeMapper.selectTypeList4Keeper(type);
}
/**
* 查询物资类型管理列表(维修员)
*
* @param type 物资类型管理(维修员)
* @return 物资类型管理(维修员)
*/
@Override
public List<Type> selectTypeList4Repair(Type type) {
if (type != null ) {
if (StringUtils.isEmpty(type.getDelFlag())) {
// 如果没赋值则默认查询正常数据状态
type.setDelFlag(String.valueOf(DataCodeEnum.NORMAL.getCode()));
}
// 如果是顶级节点则查询所有子节点
if ("0".equals(type.getLevel())) {
type.setLevel(null);
}
}
return typeMapper.selectTypeList4Repair(type);
}
/** /**
* 查询物资类型管理列表 -- 并获取父级信息 * 查询物资类型管理列表 -- 并获取父级信息
* *

View File

@ -580,7 +580,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by type_id order by type_id
</select> </select>
<select id="selectTypeList4repair" parameterType="com.bonus.material.ma.domain.Type" resultMap="TypeResult"> <select id="selectTypeList4Repair" parameterType="com.bonus.material.ma.domain.Type" resultMap="TypeResult">
select select
mt4.type_id, mt4.type_name, mt4.parent_id, mt4.storage_num, mt4.type_code, mt4.model_code, mt4.unit_id, mt4.unit_name, mt4.manage_type, mt4.lease_price, mt4.type_id, mt4.type_name, mt4.parent_id, mt4.storage_num, mt4.type_code, mt4.model_code, mt4.unit_id, mt4.unit_name, mt4.manage_type, mt4.lease_price,
mt4.eff_time, mt4.rent_price, mt4.buy_price, mt4.pay_ratio, mt4.pay_price, mt4.tax_ratio, mt4.level, mt4.rated_load, mt4.test_load, mt4.holding_time, mt4.warn_num, mt4.eff_time, mt4.rent_price, mt4.buy_price, mt4.pay_ratio, mt4.pay_price, mt4.tax_ratio, mt4.level, mt4.rated_load, mt4.test_load, mt4.holding_time, mt4.warn_num,