23 changed files with 1113 additions and 18 deletions
@ -0,0 +1,90 @@
|
||||
/* |
||||
* 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 lmy |
||||
* @since 2023-06-17 |
||||
*/ |
||||
@Data |
||||
@TableName("logpm_distribution_packadeli") |
||||
@ApiModel(value = "DistributionPackadeli对象", description = "配送包条中间表") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DistributionPackadeliEntity 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; |
||||
/** |
||||
* 配送管理表id |
||||
*/ |
||||
@ApiModelProperty(value = "配送管理表id") |
||||
private Long deliveryId; |
||||
/** |
||||
* 包件表id |
||||
*/ |
||||
@ApiModelProperty(value = "包件表id") |
||||
private Long parcelListId; |
||||
/** |
||||
* 配送状态 |
||||
*/ |
||||
@ApiModelProperty(value = "配送状态") |
||||
private String state; |
||||
/** |
||||
* 数量 |
||||
*/ |
||||
@ApiModelProperty(value = "数量") |
||||
private Integer number; |
||||
/** |
||||
* 出库数量 |
||||
*/ |
||||
@ApiModelProperty(value = "出库数量") |
||||
private Integer outboundNumber; |
||||
|
||||
} |
@ -0,0 +1,50 @@
|
||||
/* |
||||
* 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.common.constant.ModuleNameConstant; |
||||
import org.springblade.core.mp.support.BladePage; |
||||
import com.logpm.distribution.entity.DistributionPackadeliEntity; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
||||
/** |
||||
* 配送包条中间表 Feign接口类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-06-17 |
||||
*/ |
||||
@FeignClient( |
||||
value = ModuleNameConstant.APPLICATION_DISTRIBUTION_NAME |
||||
) |
||||
public interface IDistributionPackadeliClient { |
||||
|
||||
String API_PREFIX = "packadeli/client"; |
||||
String TOP = API_PREFIX + "/top"; |
||||
|
||||
/** |
||||
* 获取配送包条中间表列表 |
||||
* |
||||
* @param current 页号 |
||||
* @param size 页数 |
||||
* @return BladePage |
||||
*/ |
||||
@GetMapping(TOP) |
||||
BladePage<DistributionPackadeliEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size); |
||||
|
||||
} |
@ -0,0 +1,97 @@
|
||||
/* |
||||
* 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.DistributionPackadeliEntity; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import org.springblade.core.tool.node.INode; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* 配送包条中间表 视图实体类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-06-17 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DistributionPackadeliVO extends DistributionPackadeliEntity { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 仓库 |
||||
*/ |
||||
@ApiModelProperty(value = "仓库") |
||||
private String warehouse; |
||||
/** |
||||
* 状态 |
||||
*/ |
||||
@ApiModelProperty(value = "状态") |
||||
private Integer conditions; |
||||
/** |
||||
* 包条码 |
||||
*/ |
||||
@ApiModelProperty(value = "包条码") |
||||
private String packetBarCode; |
||||
/** |
||||
* 货位信息 |
||||
*/ |
||||
@ApiModelProperty(value = "货位信息") |
||||
private String goodsAllocation; |
||||
/** |
||||
* 所在托盘 |
||||
*/ |
||||
@ApiModelProperty(value = "所在托盘") |
||||
private String pallet; |
||||
/** |
||||
* 一级品 |
||||
*/ |
||||
@ApiModelProperty(value = "一级品") |
||||
private String firsts; |
||||
/** |
||||
* 二级品 |
||||
*/ |
||||
@ApiModelProperty(value = "二级品") |
||||
private String second; |
||||
/** |
||||
* 三级品 |
||||
*/ |
||||
@ApiModelProperty(value = "三级品") |
||||
private String thirdProduct; |
||||
/** |
||||
* 物料 |
||||
*/ |
||||
@ApiModelProperty(value = "物料") |
||||
private String material; |
||||
/** |
||||
* 数量 |
||||
*/ |
||||
@ApiModelProperty(value = "数量") |
||||
private Integer quantity; |
||||
/** |
||||
* 车次号 |
||||
*/ |
||||
@ApiModelProperty(value = "车次号") |
||||
private String trainNumber; |
||||
/** |
||||
* 在库订单ID |
||||
*/ |
||||
@ApiModelProperty(value = "在库订单ID") |
||||
private String stockArticleId; |
||||
|
||||
} |
@ -0,0 +1,47 @@
|
||||
package com.logpm.distribution.vo; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* 车次统计 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-06-19 |
||||
*/ |
||||
@Data |
||||
public class DistributionstatisticsnmbVO { |
||||
|
||||
/** |
||||
* 配送总车数 |
||||
*/ |
||||
@ApiModelProperty(value = "配送总车数") |
||||
private Integer vehiclesNub; |
||||
|
||||
/** |
||||
* 配送总件数 |
||||
*/ |
||||
@ApiModelProperty(value = "配送总件数") |
||||
private Integer deliveriesTotal; |
||||
|
||||
/** |
||||
* 商配总车次 |
||||
*/ |
||||
@ApiModelProperty(value = "商配总车次") |
||||
private Integer commercialNub; |
||||
/** |
||||
* 商配总件数 |
||||
*/ |
||||
@ApiModelProperty(value = "商配总件数") |
||||
private Integer commercialTotal; |
||||
/** |
||||
* 市配总车数 |
||||
*/ |
||||
@ApiModelProperty(value = "市配总车数") |
||||
private Integer marketNub; |
||||
/** |
||||
* 市配总件数 |
||||
*/ |
||||
@ApiModelProperty(value = "市配总件数") |
||||
private Integer marketTotal; |
||||
} |
@ -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.DistributionPackadeliEntity; |
||||
import com.logpm.distribution.vo.DistributionPackadeliVO; |
||||
import com.logpm.distribution.excel.DistributionPackadeliExcel; |
||||
import com.logpm.distribution.service.IDistributionPackadeliService; |
||||
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 lmy |
||||
* @since 2023-06-17 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("packadeli/distributionPackadeli") |
||||
@Api(value = "配送包条中间表", tags = "配送包条中间表接口") |
||||
public class DistributionPackadeliController extends BladeController { |
||||
|
||||
private final IDistributionPackadeliService distributionPackadeliService; |
||||
|
||||
/** |
||||
* 配送包条中间表 详情 |
||||
*/ |
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "详情", notes = "传入distributionPackadeli") |
||||
public R<DistributionPackadeliEntity> detail(DistributionPackadeliEntity distributionPackadeli) { |
||||
DistributionPackadeliEntity detail = distributionPackadeliService.getOne(Condition.getQueryWrapper(distributionPackadeli)); |
||||
return R.data(detail); |
||||
} |
||||
/** |
||||
* 配送包条中间表 分页 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "分页", notes = "传入distributionPackadeli") |
||||
public R<IPage<DistributionPackadeliEntity>> list(@ApiIgnore @RequestParam Map<String, Object> distributionPackadeli, Query query) { |
||||
IPage<DistributionPackadeliEntity> pages = distributionPackadeliService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionPackadeli, DistributionPackadeliEntity.class)); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* 配送包条中间表 自定义分页 |
||||
*/ |
||||
@GetMapping("/page") |
||||
@ApiOperationSupport(order = 3) |
||||
@ApiOperation(value = "分页", notes = "传入distributionPackadeli") |
||||
public R<IPage<DistributionPackadeliVO>> page(DistributionPackadeliVO distributionPackadeli, Query query) { |
||||
IPage<DistributionPackadeliVO> pages = distributionPackadeliService.selectDistributionPackadeliPage(Condition.getPage(query), distributionPackadeli); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
/** |
||||
* 配送包条中间表 新增 |
||||
*/ |
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 4) |
||||
@ApiOperation(value = "新增", notes = "传入distributionPackadeli") |
||||
public R save(@Valid @RequestBody DistributionPackadeliEntity distributionPackadeli) { |
||||
return R.status(distributionPackadeliService.save(distributionPackadeli)); |
||||
} |
||||
|
||||
/** |
||||
* 配送包条中间表 修改 |
||||
*/ |
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 5) |
||||
@ApiOperation(value = "修改", notes = "传入distributionPackadeli") |
||||
public R update(@Valid @RequestBody DistributionPackadeliEntity distributionPackadeli) { |
||||
return R.status(distributionPackadeliService.updateById(distributionPackadeli)); |
||||
} |
||||
|
||||
/** |
||||
* 配送包条中间表 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 6) |
||||
@ApiOperation(value = "新增或修改", notes = "传入distributionPackadeli") |
||||
public R submit(@Valid @RequestBody DistributionPackadeliEntity distributionPackadeli) { |
||||
return R.status(distributionPackadeliService.saveOrUpdate(distributionPackadeli)); |
||||
} |
||||
|
||||
/** |
||||
* 配送包条中间表 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 7) |
||||
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(distributionPackadeliService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
*/ |
||||
@GetMapping("/export-distributionPackadeli") |
||||
@ApiOperationSupport(order = 9) |
||||
@ApiOperation(value = "导出数据", notes = "传入distributionPackadeli") |
||||
public void exportDistributionPackadeli(@ApiIgnore @RequestParam Map<String, Object> distributionPackadeli, BladeUser bladeUser, HttpServletResponse response) { |
||||
QueryWrapper<DistributionPackadeliEntity> queryWrapper = Condition.getQueryWrapper(distributionPackadeli, DistributionPackadeliEntity.class); |
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(DistributionPackadeli::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
queryWrapper.lambda().eq(DistributionPackadeliEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
||||
List<DistributionPackadeliExcel> list = distributionPackadeliService.exportDistributionPackadeli(queryWrapper); |
||||
ExcelUtil.export(response, "配送包条中间表数据" + DateUtil.time(), "配送包条中间表数据表", list, DistributionPackadeliExcel.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.DistributionPackadeliEntity; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* 配送包条中间表 数据传输对象实体类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-06-17 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class DistributionPackadeliDTO extends DistributionPackadeliEntity { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
@ -0,0 +1,117 @@
|
||||
/* |
||||
* 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 lmy |
||||
* @since 2023-06-17 |
||||
*/ |
||||
@Data |
||||
@ColumnWidth(25) |
||||
@HeadRowHeight(20) |
||||
@ContentRowHeight(18) |
||||
public class DistributionPackadeliExcel 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; |
||||
/** |
||||
* 配送管理表id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("配送管理表id") |
||||
private Long deliveryId; |
||||
/** |
||||
* 包件表id |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("包件表id") |
||||
private Long parcelListId; |
||||
/** |
||||
* 配送状态 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("配送状态") |
||||
private String state; |
||||
/** |
||||
* 数量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("数量") |
||||
private Integer number; |
||||
/** |
||||
* 出库数量 |
||||
*/ |
||||
@ColumnWidth(20) |
||||
@ExcelProperty("出库数量") |
||||
private Integer outboundNumber; |
||||
|
||||
} |
@ -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.DistributionPackadeliEntity; |
||||
import com.logpm.distribution.service.IDistributionPackadeliService; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
/** |
||||
* 配送包条中间表 Feign实现类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-06-17 |
||||
*/ |
||||
@ApiIgnore() |
||||
@RestController |
||||
@AllArgsConstructor |
||||
public class DistributionPackadeliClient implements IDistributionPackadeliClient { |
||||
|
||||
private final IDistributionPackadeliService distributionPackadeliService; |
||||
|
||||
@Override |
||||
@GetMapping(TOP) |
||||
public BladePage<DistributionPackadeliEntity> top(Integer current, Integer size) { |
||||
Query query = new Query(); |
||||
query.setCurrent(current); |
||||
query.setSize(size); |
||||
IPage<DistributionPackadeliEntity> page = distributionPackadeliService.page(Condition.getPage(query)); |
||||
return BladePage.of(page); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,60 @@
|
||||
/* |
||||
* 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.DistributionPackadeliEntity; |
||||
import com.logpm.distribution.vo.DistributionPackadeliVO; |
||||
import com.logpm.distribution.excel.DistributionPackadeliExcel; |
||||
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 lmy |
||||
* @since 2023-06-17 |
||||
*/ |
||||
public interface DistributionPackadeliMapper extends BaseMapper<DistributionPackadeliEntity> { |
||||
|
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page |
||||
* @param distributionPackadeli |
||||
* @return |
||||
*/ |
||||
List<DistributionPackadeliVO> selectDistributionPackadeliPage(IPage page, DistributionPackadeliVO distributionPackadeli); |
||||
|
||||
|
||||
/** |
||||
* 获取导出数据 |
||||
* |
||||
* @param queryWrapper |
||||
* @return |
||||
*/ |
||||
List<DistributionPackadeliExcel> exportDistributionPackadeli(@Param("ew") Wrapper<DistributionPackadeliEntity> queryWrapper); |
||||
/** |
||||
* 通过配送id查询包条数据 |
||||
* |
||||
* @param id |
||||
* @return DistributionPackadeliVO |
||||
*/ |
||||
List<DistributionPackadeliVO> selectjointList(Long id); |
||||
} |
@ -0,0 +1,62 @@
|
||||
<?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.DistributionPackadeliMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="distributionPackadeliResultMap" type="com.logpm.distribution.entity.DistributionPackadeliEntity"> |
||||
<result column="id" property="id"/> |
||||
<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="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="delivery_id" property="deliveryId"/> |
||||
<result column="parcel_list_id" property="parcelListId"/> |
||||
<result column="state" property="state"/> |
||||
<result column="number" property="number"/> |
||||
<result column="outbound_number" property="outboundNumber"/> |
||||
</resultMap> |
||||
|
||||
|
||||
<select id="selectDistributionPackadeliPage" resultMap="distributionPackadeliResultMap"> |
||||
select * from logpm_distribution_packadeli where is_deleted = 0 |
||||
</select> |
||||
|
||||
|
||||
<select id="exportDistributionPackadeli" resultType="com.logpm.distribution.excel.DistributionPackadeliExcel"> |
||||
SELECT * FROM logpm_distribution_packadeli ${ew.customSqlSegment} |
||||
</select> |
||||
<select id="selectjointList" resultType="com.logpm.distribution.vo.DistributionPackadeliVO"> |
||||
SELECT |
||||
ldpl.warehouse warehouse, |
||||
ldpl.conditions conditions, |
||||
ldpl.packet_bar_code packetBarCode, |
||||
ldpl.goods_allocation goodsAllocation, |
||||
ldpl.pallet pallet, |
||||
ldpl.firsts firsts, |
||||
ldpl.second second, |
||||
ldpl.third_product thirdProduct, |
||||
ldpl.material material, |
||||
ldpl.quantity quantity, |
||||
ldpl.train_number trainNumber, |
||||
ldpl.stock_article_id stockArticleId, |
||||
ldp.state state, |
||||
ldp.number number, |
||||
ldp.outbound_number outboundNumber |
||||
FROM |
||||
logpm_distribution_packadeli ldp |
||||
JOIN logpm_distribution_parcel_list ldpl ON ldp.parcel_list_id = ldpl.id |
||||
<where> |
||||
ldp.is_deleted = 0 and ldp.delivery_id = #{id} |
||||
</where> |
||||
</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.DistributionPackadeliEntity; |
||||
import com.logpm.distribution.vo.DistributionPackadeliVO; |
||||
import com.logpm.distribution.excel.DistributionPackadeliExcel; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 配送包条中间表 服务类 |
||||
* |
||||
* @author lmy |
||||
* @since 2023-06-17 |
||||
*/ |
||||
public interface IDistributionPackadeliService extends BaseService<DistributionPackadeliEntity> { |
||||
/** |
||||
* 自定义分页 |
||||
* |
||||
* @param page |
||||
* @param distributionPackadeli |
||||
* @return |
||||
*/ |
||||
IPage<DistributionPackadeliVO> selectDistributionPackadeliPage(IPage<DistributionPackadeliVO> page, DistributionPackadeliVO distributionPackadeli); |
||||
|
||||
|
||||
/** |
||||
* 导出数据 |
||||
* |
||||
* @param queryWrapper |
||||
* @return |
||||
*/ |
||||
List<DistributionPackadeliExcel> exportDistributionPackadeli(Wrapper<DistributionPackadeliEntity> 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.DistributionPackadeliEntity; |
||||
import com.logpm.distribution.vo.DistributionPackadeliVO; |
||||
import com.logpm.distribution.excel.DistributionPackadeliExcel; |
||||
import com.logpm.distribution.mapper.DistributionPackadeliMapper; |
||||
import com.logpm.distribution.service.IDistributionPackadeliService; |
||||
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 lmy |
||||
* @since 2023-06-17 |
||||
*/ |
||||
@Service |
||||
public class DistributionPackadeliServiceImpl extends BaseServiceImpl<DistributionPackadeliMapper, DistributionPackadeliEntity> implements IDistributionPackadeliService { |
||||
|
||||
@Override |
||||
public IPage<DistributionPackadeliVO> selectDistributionPackadeliPage(IPage<DistributionPackadeliVO> page, DistributionPackadeliVO distributionPackadeli) { |
||||
return page.setRecords(baseMapper.selectDistributionPackadeliPage(page, distributionPackadeli)); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public List<DistributionPackadeliExcel> exportDistributionPackadeli(Wrapper<DistributionPackadeliEntity> queryWrapper) { |
||||
List<DistributionPackadeliExcel> distributionPackadeliList = baseMapper.exportDistributionPackadeli(queryWrapper); |
||||
//distributionPackadeliList.forEach(distributionPackadeli -> {
|
||||
// distributionPackadeli.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionPackadeli.getType()));
|
||||
//});
|
||||
return distributionPackadeliList; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue