16 changed files with 882 additions and 32 deletions
@ -0,0 +1,105 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import java.util.Date; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
/** |
||||
* 库存品详情信息 实体类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-06-26 |
||||
*/ |
||||
@Data |
||||
@TableName("logpm_distribution_stock") |
||||
@ApiModel(value = "DistributionStock对象", description = "库存品详情信息") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DistributionStockEntity extends TenantEntity { |
||||
|
||||
/** |
||||
* 预留1 |
||||
*/ |
||||
@ApiModelProperty(value = "预留1") |
||||
private String reserve1; |
||||
/** |
||||
* 预留2 |
||||
*/ |
||||
@ApiModelProperty(value = "预留2") |
||||
private String reserve2; |
||||
/** |
||||
* 预留3 |
||||
*/ |
||||
@ApiModelProperty(value = "预留3") |
||||
private String reserve3; |
||||
/** |
||||
* 预留4 |
||||
*/ |
||||
@ApiModelProperty(value = "预留4") |
||||
private String reserve4; |
||||
/** |
||||
* 预留5 |
||||
*/ |
||||
@ApiModelProperty(value = "预留5") |
||||
private String reserve5; |
||||
/** |
||||
* 货位 |
||||
*/ |
||||
@ApiModelProperty(value = "货位") |
||||
private String goodsAllocation; |
||||
/** |
||||
* 在库订单ID |
||||
*/ |
||||
@ApiModelProperty(value = "在库订单ID") |
||||
private Long stockArticle; |
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@ApiModelProperty(value = "编码") |
||||
private String coding; |
||||
/** |
||||
* 状态 |
||||
*/ |
||||
@ApiModelProperty(value = "状态") |
||||
private Integer conditions; |
||||
/** |
||||
* 货物名称 |
||||
*/ |
||||
@ApiModelProperty(value = "货物名称") |
||||
private String goodsName; |
||||
/** |
||||
* 库存品ID |
||||
*/ |
||||
@ApiModelProperty(value = "库存品ID") |
||||
private Long stockListId; |
||||
/** |
||||
* 拆包数 |
||||
*/ |
||||
@ApiModelProperty(value = "拆包数") |
||||
private Integer unpackingQuantity; |
||||
/** |
||||
* 在库包件ID |
||||
*/ |
||||
@ApiModelProperty(value = "在库包件ID") |
||||
private Long parcelListId; |
||||
|
||||
} |
@ -0,0 +1,49 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.feign; |
||||
|
||||
import org.springblade.core.mp.support.BladePage; |
||||
import com.logpm.distribution.entity.DistributionStockEntity; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
||||
/** |
||||
* 库存品详情信息 Feign接口类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-06-26 |
||||
*/ |
||||
@FeignClient( |
||||
value = "blade-distributionStock" |
||||
) |
||||
public interface IDistributionStockClient { |
||||
|
||||
String API_PREFIX = "/client"; |
||||
String TOP = API_PREFIX + "/t111op"; |
||||
|
||||
/** |
||||
* 获取库存品详情信息列表 |
||||
* |
||||
* @param current 页号 |
||||
* @param size 页数 |
||||
* @return BladePage |
||||
*/ |
||||
@GetMapping(TOP) |
||||
BladePage<DistributionStockEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size); |
||||
|
||||
} |
@ -0,0 +1,35 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.vo; |
||||
|
||||
import com.logpm.distribution.entity.DistributionStockEntity; |
||||
import org.springblade.core.tool.node.INode; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* 库存品详情信息 视图实体类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-06-26 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DistributionStockVO extends DistributionStockEntity { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
@ -0,0 +1,150 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.controller; |
||||
|
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import io.swagger.annotations.ApiParam; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import lombok.AllArgsConstructor; |
||||
import javax.validation.Valid; |
||||
|
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.logpm.distribution.entity.DistributionStockEntity; |
||||
import com.logpm.distribution.vo.DistributionStockVO; |
||||
import com.logpm.distribution.excel.DistributionStockExcel; |
||||
import com.logpm.distribution.service.IDistributionStockService; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.excel.util.ExcelUtil; |
||||
import org.springblade.core.tool.constant.BladeConstant; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
import java.util.Map; |
||||
import java.util.List; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
|
||||
/** |
||||
* 库存品详情信息 控制器 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-06-26 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/distributionStock") |
||||
@Api(value = "库存品详情信息", tags = "库存品详情信息接口") |
||||
public class DistributionStockController extends BladeController { |
||||
|
||||
private final IDistributionStockService distributionStockService; |
||||
|
||||
/** |
||||
* 库存品详情信息 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "详情", notes = "传入distributionStock") |
||||
public R<DistributionStockEntity> detail(DistributionStockEntity distributionStock) { |
||||
DistributionStockEntity detail = distributionStockService.getOne(Condition.getQueryWrapper(distributionStock)); |
||||
return R.data(detail); |
||||
} |
||||
/** |
||||
* 库存品详情信息 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "分页", notes = "传入distributionStock") |
||||
public R<IPage<DistributionStockEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distributionStock, Query query) { |
||||
IPage<DistributionStockEntity> pages = distributionStockService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionStock, DistributionStockEntity.class)); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* 库存品详情信息 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@ApiOperation(value = "分页", notes = "传入distributionStock") |
||||
public R<IPage<DistributionStockVO>> page(DistributionStockVO distributionStock, Query query) { |
||||
IPage<DistributionStockVO> pages = distributionStockService.selectDistributionStockPage(Condition.getPage(query), distributionStock); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* 库存品详情信息 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@ApiOperation(value = "新增", notes = "传入distributionStock") |
||||
public R save(@Valid @RequestBody DistributionStockEntity distributionStock) { |
||||
return R.status(distributionStockService.save(distributionStock)); |
||||
} |
||||
|
||||
/** |
||||
* 库存品详情信息 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@ApiOperation(value = "修改", notes = "传入distributionStock") |
||||
public R update(@Valid @RequestBody DistributionStockEntity distributionStock) { |
||||
return R.status(distributionStockService.updateById(distributionStock)); |
||||
} |
||||
|
||||
/** |
||||
* 库存品详情信息 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@ApiOperation(value = "新增或修改", notes = "传入distributionStock") |
||||
public R submit(@Valid @RequestBody DistributionStockEntity distributionStock) { |
||||
return R.status(distributionStockService.saveOrUpdate(distributionStock)); |
||||
} |
||||
|
||||
/** |
||||
* 库存品详情信息 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(distributionStockService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@GetMapping("/export-distributionStock") |
||||
@ApiOperationSupport(order = 9) |
||||
@ApiOperation(value = "导出数据", notes = "传入distributionStock") |
||||
public void exportDistributionStock(@ApiIgnore @RequestParam Map<String, Object> distributionStock, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<DistributionStockEntity> queryWrapper = Condition.getQueryWrapper(distributionStock, DistributionStockEntity.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(DistributionStock::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
queryWrapper.lambda().eq(DistributionStockEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
||||
List<DistributionStockExcel> list = distributionStockService.exportDistributionStock(queryWrapper); |
||||
ExcelUtil.export(response, "库存品详情信息数据" + DateUtil.time(), "库存品详情信息数据表", list, DistributionStockExcel.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,34 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.dto; |
||||
|
||||
import com.logpm.distribution.entity.DistributionStockEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* 库存品详情信息 数据传输对象实体类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-06-26 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DistributionStockDTO extends DistributionStockEntity { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
@ -0,0 +1,135 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.excel; |
||||
|
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||
import java.io.Serializable; |
||||
|
||||
|
||||
/** |
||||
* 库存品详情信息 Excel实体类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-06-26 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class DistributionStockExcel implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 租户号 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("租户号") |
||||
private String tenantId; |
||||
/** |
||||
* 是否已删除 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("是否已删除") |
||||
private Integer isDeleted; |
||||
/** |
||||
* 预留1 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留1") |
||||
private String reserve1; |
||||
/** |
||||
* 预留2 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留2") |
||||
private String reserve2; |
||||
/** |
||||
* 预留3 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留3") |
||||
private String reserve3; |
||||
/** |
||||
* 预留4 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留4") |
||||
private String reserve4; |
||||
/** |
||||
* 预留5 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("预留5") |
||||
private String reserve5; |
||||
/** |
||||
* 货位 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货位") |
||||
private String goodsAllocation; |
||||
/** |
||||
* 在库订单ID |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("在库订单ID") |
||||
private Long stockArticle; |
||||
/** |
||||
* 编码 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("编码") |
||||
private String coding; |
||||
/** |
||||
* 状态 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("状态") |
||||
private Integer conditions; |
||||
/** |
||||
* 货物名称 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("货物名称") |
||||
private String goodsName; |
||||
/** |
||||
* 库存品ID |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("库存品ID") |
||||
private Long stockListId; |
||||
/** |
||||
* 拆包数 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("拆包数") |
||||
private Integer unpackingQuantity; |
||||
/** |
||||
* 在库包件ID |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("在库包件ID") |
||||
private Long parcelListId; |
||||
|
||||
} |
@ -0,0 +1,53 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.feign; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.mp.support.BladePage; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import com.logpm.distribution.entity.DistributionStockEntity; |
||||
import com.logpm.distribution.service.IDistributionStockService; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
/** |
||||
* 库存品详情信息 Feign实现类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-06-26 |
||||
*/ |
||||
@ApiIgnore() |
||||
@RestController |
||||
@AllArgsConstructor |
||||
public class DistributionStockClient implements IDistributionStockClient { |
||||
|
||||
private final IDistributionStockService distributionStockService; |
||||
|
||||
@Override |
||||
@GetMapping(TOP) |
||||
public BladePage<DistributionStockEntity> top(Integer current, Integer size) { |
||||
Query query = new Query(); |
||||
query.setCurrent(current); |
||||
query.setSize(size); |
||||
IPage<DistributionStockEntity> page = distributionStockService.page(Condition.getPage(query)); |
||||
return BladePage.of(page); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,54 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.mapper; |
||||
|
||||
import com.logpm.distribution.entity.DistributionStockEntity; |
||||
import com.logpm.distribution.vo.DistributionStockVO; |
||||
import com.logpm.distribution.excel.DistributionStockExcel; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 库存品详情信息 Mapper 接口 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-06-26 |
||||
*/ |
||||
public interface DistributionStockMapper extends BaseMapper<DistributionStockEntity> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page |
||||
* @param distributionStock |
||||
* @return |
||||
*/ |
||||
List<DistributionStockVO> selectDistributionStockPage(IPage page, DistributionStockVO distributionStock); |
||||
|
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper |
||||
* @return |
||||
*/ |
||||
List<DistributionStockExcel> exportDistributionStock(@Param("ew") Wrapper<DistributionStockEntity> queryWrapper); |
||||
|
||||
} |
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.logpm.distribution.mapper.DistributionStockMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="distributionStockResultMap" type="com.logpm.distribution.entity.DistributionStockEntity"> |
||||
<result column="tenant_id" property="tenantId"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="status" property="status"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="create_dept" property="createDept"/> |
||||
<result column="id" property="id"/> |
||||
<result column="reserve1" property="reserve1"/> |
||||
<result column="reserve2" property="reserve2"/> |
||||
<result column="reserve3" property="reserve3"/> |
||||
<result column="reserve4" property="reserve4"/> |
||||
<result column="reserve5" property="reserve5"/> |
||||
<result column="goods_allocation" property="goodsAllocation"/> |
||||
<result column="stock_article" property="stockArticle"/> |
||||
<result column="coding" property="coding"/> |
||||
<result column="conditions" property="conditions"/> |
||||
<result column="goods_name" property="goodsName"/> |
||||
<result column="stock_list_id" property="stockListId"/> |
||||
<result column="unpacking_quantity" property="unpackingQuantity"/> |
||||
<result column="parcel_list_id" property="parcelListId"/> |
||||
</resultMap> |
||||
|
||||
|
||||
<select id="selectDistributionStockPage" resultMap="distributionStockResultMap"> |
||||
select * from logpm_distribution_stock where is_deleted = 0 |
||||
</select> |
||||
|
||||
|
||||
<select id="exportDistributionStock" resultType="com.logpm.distribution.excel.DistributionStockExcel"> |
||||
SELECT * FROM logpm_distribution_stock ${ew.customSqlSegment} |
||||
</select> |
||||
|
||||
</mapper> |
@ -0,0 +1,52 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.logpm.distribution.entity.DistributionStockEntity; |
||||
import com.logpm.distribution.vo.DistributionStockVO; |
||||
import com.logpm.distribution.excel.DistributionStockExcel; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 库存品详情信息 服务类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-06-26 |
||||
*/ |
||||
public interface IDistributionStockService extends BaseService<DistributionStockEntity> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page |
||||
* @param distributionStock |
||||
* @return |
||||
*/ |
||||
IPage<DistributionStockVO> selectDistributionStockPage(IPage<DistributionStockVO> page, DistributionStockVO distributionStock); |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
* |
||||
* @param queryWrapper |
||||
* @return |
||||
*/ |
||||
List<DistributionStockExcel> exportDistributionStock(Wrapper<DistributionStockEntity> queryWrapper); |
||||
|
||||
} |
@ -0,0 +1,54 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.logpm.distribution.service.impl; |
||||
|
||||
import com.logpm.distribution.entity.DistributionStockEntity; |
||||
import com.logpm.distribution.vo.DistributionStockVO; |
||||
import com.logpm.distribution.excel.DistributionStockExcel; |
||||
import com.logpm.distribution.mapper.DistributionStockMapper; |
||||
import com.logpm.distribution.service.IDistributionStockService; |
||||
import org.springframework.stereotype.Service; |
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 库存品详情信息 服务实现类 |
||||
* |
||||
* @author cyz |
||||
* @since 2023-06-26 |
||||
*/ |
||||
@Service |
||||
public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionStockMapper, DistributionStockEntity> implements IDistributionStockService { |
||||
|
||||
@Override |
||||
public IPage<DistributionStockVO> selectDistributionStockPage(IPage<DistributionStockVO> page, DistributionStockVO distributionStock) { |
||||
return page.setRecords(baseMapper.selectDistributionStockPage(page, distributionStock)); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public List<DistributionStockExcel> exportDistributionStock(Wrapper<DistributionStockEntity> queryWrapper) { |
||||
List<DistributionStockExcel> distributionStockList = baseMapper.exportDistributionStock(queryWrapper); |
||||
//distributionStockList.forEach(distributionStock -> {
|
||||
// distributionStock.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionStock.getType()));
|
||||
//});
|
||||
return distributionStockList; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue