diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanAbnormalEntity.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanAbnormalEntity.java new file mode 100644 index 000000000..55119db85 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscanAbnormalEntity.java @@ -0,0 +1,170 @@ +/* + * 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 BladeX + * @since 2023-09-22 + */ +@Data +@TableName("logpm_distribution_loadscan_abnormal") +@ApiModel(value = "DistributionLoadscanAbnormal对象", description = "异常装车扫描表") +@EqualsAndHashCode(callSuper = true) +public class DistributionLoadscanAbnormalEntity extends TenantEntity { + + /** + * 预约ID + */ + @ApiModelProperty(value = "预约ID") + private String reservationId; + /** + * 配送管理ID + */ + @ApiModelProperty(value = "配送管理ID") + private String deliveryListId; + /** + * 包件ID + */ + @ApiModelProperty(value = "包件ID") + private String packageId; + /** + * 订单ID + */ + @ApiModelProperty(value = "订单ID") + private String stockArticleId; + /** + * 扫描操作人 + */ + @ApiModelProperty(value = "扫描操作人") + private String sacnUser; + /** + * 扫描操作时间 + */ + @ApiModelProperty(value = "扫描操作时间") + private String scanTime; + /** + * 包条码 + */ + @ApiModelProperty(value = "包条码") + private String packageCode; + /** + * 车次号 + */ + @ApiModelProperty(value = "车次号") + private String trainNumber; + /** + * 司机ID + */ + @ApiModelProperty(value = "司机ID") + private String driverId; + /** + * 司机名称 + */ + @ApiModelProperty(value = "司机名称") + private String driverName; + /** + * 车辆ID + */ + @ApiModelProperty(value = "车辆ID") + private String vehicleId; + /** + * 车牌号 + */ + @ApiModelProperty(value = "车牌号") + private String vehicleName; + /** + * 司机电话 + */ + @ApiModelProperty(value = "司机电话") + private String driverPhone; + /** + * 仓库Id + */ + @ApiModelProperty(value = "仓库Id") + private String warehouseId; + /** + * 仓库名称 + */ + @ApiModelProperty(value = "仓库名称") + private String warehouseName; + /** + * 审核人 + */ + @ApiModelProperty(value = "审核人") + private String auditingUser; + /** + * 审核时间 + */ + @ApiModelProperty(value = "审核时间") + private String auditingTime; + /** + * 包件配送类型 1 - 商配 2-市配 + */ + @ApiModelProperty(value = "包件配送类型 1 - 商配 2-市配") + private String deliveryType; + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remarks; + /** + * 审核状态 1-未审核 2- 已审核 3 - 异常 + */ + @ApiModelProperty(value = "审核状态 1-未审核 2- 已审核 3 - 异常") + private String auditingStatus; + /** + * 装车数量 + */ + @ApiModelProperty(value = "装车数量") + private String loadingQuantity; + /** + * 预留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; + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionLoadscanAbnormalClient.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionLoadscanAbnormalClient.java new file mode 100644 index 000000000..ec1d1502d --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionLoadscanAbnormalClient.java @@ -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 com.logpm.distribution.entity.DistributionLoadscanAbnormalEntity; +import org.springblade.core.mp.support.BladePage; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * 异常装车扫描表 Feign接口类 + * + * @author BladeX + * @since 2023-09-22 + */ +@FeignClient( + value = "loadscanAbnormal" +) +public interface IDistributionLoadscanAbnormalClient { + + String API_PREFIX = "loadscanAbnormal/client"; + String TOP = API_PREFIX + "/top"; + + /** + * 获取异常装车扫描表列表 + * + * @param current 页号 + * @param size 页数 + * @return BladePage + */ + @GetMapping(TOP) + BladePage loadscanAbnormalTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size); + +} diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanAbnormalVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanAbnormalVO.java new file mode 100644 index 000000000..47cd31c52 --- /dev/null +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionLoadscanAbnormalVO.java @@ -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.DistributionLoadscanAbnormalEntity; +import org.springblade.core.tool.node.INode; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 异常装车扫描表 视图实体类 + * + * @author BladeX + * @since 2023-09-22 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DistributionLoadscanAbnormalVO extends DistributionLoadscanAbnormalEntity { + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionLoadscanAbnormalController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionLoadscanAbnormalController.java new file mode 100644 index 000000000..7741f1b80 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionLoadscanAbnormalController.java @@ -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 com.logpm.distribution.entity.DistributionLoadscanAbnormalEntity; +import com.logpm.distribution.excel.DistributionLoadscanAbnormalExcel; +import com.logpm.distribution.service.IDistributionLoadscanAbnormalService; +import com.logpm.distribution.vo.DistributionLoadscanAbnormalVO; +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 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 BladeX + * @since 2023-09-22 + */ +@RestController +@AllArgsConstructor +@RequestMapping("loadscanAbnormal/distributionLoadscanAbnormal") +@Api(value = "异常装车扫描表", tags = "异常装车扫描表接口") +public class DistributionLoadscanAbnormalController extends BladeController { + + private final IDistributionLoadscanAbnormalService distributionLoadscanAbnormalService; + + /** + * 异常装车扫描表 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "详情", notes = "传入distributionLoadscanAbnormal") + public R detail(DistributionLoadscanAbnormalEntity distributionLoadscanAbnormal) { + DistributionLoadscanAbnormalEntity detail = distributionLoadscanAbnormalService.getOne(Condition.getQueryWrapper(distributionLoadscanAbnormal)); + return R.data(detail); + } + /** + * 异常装车扫描表 分页 + */ + @GetMapping("/list") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "分页", notes = "传入distributionLoadscanAbnormal") + public R> list(@ApiIgnore @RequestParam Map distributionLoadscanAbnormal, Query query) { + IPage pages = distributionLoadscanAbnormalService.page(Condition.getPage(query), Condition.getQueryWrapper(distributionLoadscanAbnormal, DistributionLoadscanAbnormalEntity.class)); + return R.data(pages); + } + + /** + * 异常装车扫描表 自定义分页 + */ + @GetMapping("/page") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "分页", notes = "传入distributionLoadscanAbnormal") + public R> page(DistributionLoadscanAbnormalVO distributionLoadscanAbnormal, Query query) { + IPage pages = distributionLoadscanAbnormalService.selectDistributionLoadscanAbnormalPage(Condition.getPage(query), distributionLoadscanAbnormal); + return R.data(pages); + } + + /** + * 异常装车扫描表 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入distributionLoadscanAbnormal") + public R save(@Valid @RequestBody DistributionLoadscanAbnormalEntity distributionLoadscanAbnormal) { + return R.status(distributionLoadscanAbnormalService.save(distributionLoadscanAbnormal)); + } + + /** + * 异常装车扫描表 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入distributionLoadscanAbnormal") + public R update(@Valid @RequestBody DistributionLoadscanAbnormalEntity distributionLoadscanAbnormal) { + return R.status(distributionLoadscanAbnormalService.updateById(distributionLoadscanAbnormal)); + } + + /** + * 异常装车扫描表 新增或修改 + */ + @PostMapping("/submit") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "新增或修改", notes = "传入distributionLoadscanAbnormal") + public R submit(@Valid @RequestBody DistributionLoadscanAbnormalEntity distributionLoadscanAbnormal) { + return R.status(distributionLoadscanAbnormalService.saveOrUpdate(distributionLoadscanAbnormal)); + } + + /** + * 异常装车扫描表 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + return R.status(distributionLoadscanAbnormalService.deleteLogic(Func.toLongList(ids))); + } + + + /** + * 导出数据 + */ + @GetMapping("/export-distributionLoadscanAbnormal") + @ApiOperationSupport(order = 9) + @ApiOperation(value = "导出数据", notes = "传入distributionLoadscanAbnormal") + public void exportDistributionLoadscanAbnormal(@ApiIgnore @RequestParam Map distributionLoadscanAbnormal, BladeUser bladeUser, HttpServletResponse response) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(distributionLoadscanAbnormal, DistributionLoadscanAbnormalEntity.class); + //if (!AuthUtil.isAdministrator()) { + // queryWrapper.lambda().eq(DistributionLoadscanAbnormal::getTenantId, bladeUser.getTenantId()); + //} + queryWrapper.lambda().eq(DistributionLoadscanAbnormalEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); + List list = distributionLoadscanAbnormalService.exportDistributionLoadscanAbnormal(queryWrapper); + ExcelUtil.export(response, "异常装车扫描表数据" + DateUtil.time(), "异常装车扫描表数据表", list, DistributionLoadscanAbnormalExcel.class); + } + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionLoadscanAbnormalDTO.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionLoadscanAbnormalDTO.java new file mode 100644 index 000000000..837113630 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionLoadscanAbnormalDTO.java @@ -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.DistributionLoadscanAbnormalEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 异常装车扫描表 数据传输对象实体类 + * + * @author BladeX + * @since 2023-09-22 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class DistributionLoadscanAbnormalDTO extends DistributionLoadscanAbnormalEntity { + private static final long serialVersionUID = 1L; + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionLoadscanAbnormalExcel.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionLoadscanAbnormalExcel.java new file mode 100644 index 000000000..47f9c4c1f --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionLoadscanAbnormalExcel.java @@ -0,0 +1,213 @@ +/* + * 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 BladeX + * @since 2023-09-22 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class DistributionLoadscanAbnormalExcel implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 租户号 + */ + @ColumnWidth(20) + @ExcelProperty("租户号") + private String tenantId; + /** + * 是否已删除 + */ + @ColumnWidth(20) + @ExcelProperty("是否已删除") + private Integer isDeleted; + /** + * 预约ID + */ + @ColumnWidth(20) + @ExcelProperty("预约ID") + private String reservationId; + /** + * 配送管理ID + */ + @ColumnWidth(20) + @ExcelProperty("配送管理ID") + private String deliveryListId; + /** + * 包件ID + */ + @ColumnWidth(20) + @ExcelProperty("包件ID") + private String packageId; + /** + * 订单ID + */ + @ColumnWidth(20) + @ExcelProperty("订单ID") + private String stockArticleId; + /** + * 扫描操作人 + */ + @ColumnWidth(20) + @ExcelProperty("扫描操作人") + private String sacnUser; + /** + * 扫描操作时间 + */ + @ColumnWidth(20) + @ExcelProperty("扫描操作时间") + private String scanTime; + /** + * 包条码 + */ + @ColumnWidth(20) + @ExcelProperty("包条码") + private String packageCode; + /** + * 车次号 + */ + @ColumnWidth(20) + @ExcelProperty("车次号") + private String trainNumber; + /** + * 司机ID + */ + @ColumnWidth(20) + @ExcelProperty("司机ID") + private String driverId; + /** + * 司机名称 + */ + @ColumnWidth(20) + @ExcelProperty("司机名称") + private String driverName; + /** + * 车辆ID + */ + @ColumnWidth(20) + @ExcelProperty("车辆ID") + private String vehicleId; + /** + * 车牌号 + */ + @ColumnWidth(20) + @ExcelProperty("车牌号") + private String vehicleName; + /** + * 司机电话 + */ + @ColumnWidth(20) + @ExcelProperty("司机电话") + private String driverPhone; + /** + * 仓库Id + */ + @ColumnWidth(20) + @ExcelProperty("仓库Id") + private String warehouseId; + /** + * 仓库名称 + */ + @ColumnWidth(20) + @ExcelProperty("仓库名称") + private String warehouseName; + /** + * 审核人 + */ + @ColumnWidth(20) + @ExcelProperty("审核人") + private String auditingUser; + /** + * 审核时间 + */ + @ColumnWidth(20) + @ExcelProperty("审核时间") + private String auditingTime; + /** + * 包件配送类型 1 - 商配 2-市配 + */ + @ColumnWidth(20) + @ExcelProperty("包件配送类型 1 - 商配 2-市配") + private String deliveryType; + /** + * 备注 + */ + @ColumnWidth(20) + @ExcelProperty("备注") + private String remarks; + /** + * 审核状态 1-未审核 2- 已审核 3 - 异常 + */ + @ColumnWidth(20) + @ExcelProperty("审核状态 1-未审核 2- 已审核 3 - 异常") + private String auditingStatus; + /** + * 装车数量 + */ + @ColumnWidth(20) + @ExcelProperty("装车数量") + private String loadingQuantity; + /** + * 预留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; + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionLoadscanAbnormalClient.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionLoadscanAbnormalClient.java new file mode 100644 index 000000000..bafceca0a --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionLoadscanAbnormalClient.java @@ -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 com.logpm.distribution.entity.DistributionLoadscanAbnormalEntity; +import com.logpm.distribution.service.IDistributionLoadscanAbnormalService; +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 org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +/** + * 异常装车扫描表 Feign实现类 + * + * @author BladeX + * @since 2023-09-22 + */ +@ApiIgnore() +@RestController +@AllArgsConstructor +public class DistributionLoadscanAbnormalClient implements IDistributionLoadscanAbnormalClient { + + private final IDistributionLoadscanAbnormalService distributionLoadscanAbnormalService; + + @Override + @GetMapping(TOP) + public BladePage loadscanAbnormalTop(Integer current, Integer size) { + Query query = new Query(); + query.setCurrent(current); + query.setSize(size); + IPage page = distributionLoadscanAbnormalService.page(Condition.getPage(query)); + return BladePage.of(page); + } + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanAbnormalMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanAbnormalMapper.java new file mode 100644 index 000000000..5e09d7a64 --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanAbnormalMapper.java @@ -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.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.entity.DistributionLoadscanAbnormalEntity; +import com.logpm.distribution.excel.DistributionLoadscanAbnormalExcel; +import com.logpm.distribution.vo.DistributionLoadscanAbnormalVO; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + * 异常装车扫描表 Mapper 接口 + * + * @author BladeX + * @since 2023-09-22 + */ +public interface DistributionLoadscanAbnormalMapper extends BaseMapper { + + /** + * 自定义分页 + * + * @param page + * @param distributionLoadscanAbnormal + * @return + */ + List selectDistributionLoadscanAbnormalPage(IPage page, DistributionLoadscanAbnormalVO distributionLoadscanAbnormal); + + + /** + * 获取导出数据 + * + * @param queryWrapper + * @return + */ + List exportDistributionLoadscanAbnormal(@Param("ew") Wrapper queryWrapper); + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanAbnormalMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanAbnormalMapper.xml new file mode 100644 index 000000000..289530bad --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanAbnormalMapper.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionLoadscanAbnormalService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionLoadscanAbnormalService.java new file mode 100644 index 000000000..d9670448c --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionLoadscanAbnormalService.java @@ -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.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.distribution.entity.DistributionLoadscanAbnormalEntity; +import com.logpm.distribution.excel.DistributionLoadscanAbnormalExcel; +import com.logpm.distribution.vo.DistributionLoadscanAbnormalVO; +import org.springblade.core.mp.base.BaseService; +import java.util.List; + +/** + * 异常装车扫描表 服务类 + * + * @author BladeX + * @since 2023-09-22 + */ +public interface IDistributionLoadscanAbnormalService extends BaseService { + /** + * 自定义分页 + * + * @param page + * @param distributionLoadscanAbnormal + * @return + */ + IPage selectDistributionLoadscanAbnormalPage(IPage page, DistributionLoadscanAbnormalVO distributionLoadscanAbnormal); + + + /** + * 导出数据 + * + * @param queryWrapper + * @return + */ + List exportDistributionLoadscanAbnormal(Wrapper queryWrapper); + +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionLoadscanAbnormalServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionLoadscanAbnormalServiceImpl.java new file mode 100644 index 000000000..7d3bd203b --- /dev/null +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionLoadscanAbnormalServiceImpl.java @@ -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.DistributionLoadscanAbnormalEntity; +import com.logpm.distribution.excel.DistributionLoadscanAbnormalExcel; +import com.logpm.distribution.mapper.DistributionLoadscanAbnormalMapper; +import com.logpm.distribution.service.IDistributionLoadscanAbnormalService; +import com.logpm.distribution.vo.DistributionLoadscanAbnormalVO; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.List; + +/** + * 异常装车扫描表 服务实现类 + * + * @author BladeX + * @since 2023-09-22 + */ +@Service +public class DistributionLoadscanAbnormalServiceImpl extends BaseServiceImpl implements IDistributionLoadscanAbnormalService { + + @Override + public IPage selectDistributionLoadscanAbnormalPage(IPage page, DistributionLoadscanAbnormalVO distributionLoadscanAbnormal) { + return page.setRecords(baseMapper.selectDistributionLoadscanAbnormalPage(page, distributionLoadscanAbnormal)); + } + + + @Override + public List exportDistributionLoadscanAbnormal(Wrapper queryWrapper) { + List distributionLoadscanAbnormalList = baseMapper.exportDistributionLoadscanAbnormal(queryWrapper); + //distributionLoadscanAbnormalList.forEach(distributionLoadscanAbnormal -> { + // distributionLoadscanAbnormal.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionLoadscanAbnormal.getType())); + //}); + return distributionLoadscanAbnormalList; + } + +}