feat: 子卷包装关系crud
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
package cn.code.nl.module.lms.controller.admin.subpackagerelation;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.code.nl.framework.common.pojo.PageParam;
|
||||
import cn.code.nl.framework.common.pojo.PageResult;
|
||||
import cn.code.nl.framework.common.pojo.CommonResult;
|
||||
import cn.code.nl.framework.common.util.object.BeanUtils;
|
||||
import static cn.code.nl.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.code.nl.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.code.nl.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.code.nl.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.code.nl.module.lms.controller.admin.subpackagerelation.vo.*;
|
||||
import cn.code.nl.module.lms.dal.dataobject.subpackagerelation.SubPackageRelationDO;
|
||||
import cn.code.nl.module.lms.service.subpackagerelation.SubPackageRelationService;
|
||||
|
||||
@Tag(name = "管理后台 - 子卷包装关系")
|
||||
@RestController
|
||||
@RequestMapping("/lms/sub-package-relation")
|
||||
@Validated
|
||||
public class SubPackageRelationController {
|
||||
|
||||
@Resource
|
||||
private SubPackageRelationService subPackageRelationService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建子卷包装关系")
|
||||
@PreAuthorize("@ss.hasPermission('lms:sub-package-relation:create')")
|
||||
public CommonResult<Long> createSubPackageRelation(@Valid @RequestBody SubPackageRelationSaveReqVO createReqVO) {
|
||||
return success(subPackageRelationService.createSubPackageRelation(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新子卷包装关系")
|
||||
@PreAuthorize("@ss.hasPermission('lms:sub-package-relation:update')")
|
||||
public CommonResult<Boolean> updateSubPackageRelation(@Valid @RequestBody SubPackageRelationSaveReqVO updateReqVO) {
|
||||
subPackageRelationService.updateSubPackageRelation(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除子卷包装关系")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('lms:sub-package-relation:delete')")
|
||||
public CommonResult<Boolean> deleteSubPackageRelation(@RequestParam("id") Long id) {
|
||||
subPackageRelationService.deleteSubPackageRelation(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除子卷包装关系")
|
||||
@PreAuthorize("@ss.hasPermission('lms:sub-package-relation:delete')")
|
||||
public CommonResult<Boolean> deleteSubPackageRelationList(@RequestParam("ids") List<Long> ids) {
|
||||
subPackageRelationService.deleteSubPackageRelationListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得子卷包装关系")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('lms:sub-package-relation:query')")
|
||||
public CommonResult<SubPackageRelationRespVO> getSubPackageRelation(@RequestParam("id") Long id) {
|
||||
SubPackageRelationDO subPackageRelation = subPackageRelationService.getSubPackageRelation(id);
|
||||
return success(BeanUtils.toBean(subPackageRelation, SubPackageRelationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得子卷包装关系分页")
|
||||
@PreAuthorize("@ss.hasPermission('lms:sub-package-relation:query')")
|
||||
public CommonResult<PageResult<SubPackageRelationRespVO>> getSubPackageRelationPage(@Valid SubPackageRelationPageReqVO pageReqVO) {
|
||||
PageResult<SubPackageRelationDO> pageResult = subPackageRelationService.getSubPackageRelationPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, SubPackageRelationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出子卷包装关系 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('lms:sub-package-relation:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportSubPackageRelationExcel(@Valid SubPackageRelationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<SubPackageRelationDO> list = subPackageRelationService.getSubPackageRelationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "子卷包装关系.xls", "数据", SubPackageRelationRespVO.class,
|
||||
BeanUtils.toBean(list, SubPackageRelationRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package cn.code.nl.module.lms.controller.admin.subpackagerelation.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.code.nl.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.code.nl.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 子卷包装关系分页 Request VO")
|
||||
@Data
|
||||
public class SubPackageRelationPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "木箱唯一码")
|
||||
private String packageBoxSn;
|
||||
|
||||
@Schema(description = "木箱料号", example = "2")
|
||||
private String boxType;
|
||||
|
||||
@Schema(description = "销售订单及行号", example = "王五")
|
||||
private String saleOrderName;
|
||||
|
||||
@Schema(description = "客户编号", example = "王五")
|
||||
private String customerName;
|
||||
|
||||
@Schema(description = "产品编码", example = "李四")
|
||||
private String productName;
|
||||
|
||||
@Schema(description = "入库日期")
|
||||
private String dateOfFgInbound;
|
||||
|
||||
@Schema(description = "子卷号", example = "李四")
|
||||
private String containerName;
|
||||
|
||||
@Schema(description = "储存地点")
|
||||
private String extCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
package cn.code.nl.module.lms.controller.admin.subpackagerelation.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 子卷包装关系 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class SubPackageRelationRespVO {
|
||||
|
||||
@Schema(description = "子卷包装标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "14551")
|
||||
@ExcelProperty("子卷包装标识")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "木箱唯一码")
|
||||
@ExcelProperty("木箱唯一码")
|
||||
private String packageBoxSn;
|
||||
|
||||
@Schema(description = "箱内子卷数量")
|
||||
@ExcelProperty("箱内子卷数量")
|
||||
private Integer qualityInBox;
|
||||
|
||||
@Schema(description = "erp木箱号")
|
||||
@ExcelProperty("erp木箱号")
|
||||
private String extBoxSn;
|
||||
|
||||
@Schema(description = "木箱自身重量")
|
||||
@ExcelProperty("木箱自身重量")
|
||||
private BigDecimal boxWeight;
|
||||
|
||||
@Schema(description = "木箱料号", example = "2")
|
||||
@ExcelProperty("木箱料号")
|
||||
private String boxType;
|
||||
|
||||
@Schema(description = "保质期")
|
||||
@ExcelProperty("保质期")
|
||||
private String qualityGuaranPeriod;
|
||||
|
||||
@Schema(description = "销售订单及行号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("销售订单及行号")
|
||||
private String saleOrderName;
|
||||
|
||||
@Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("客户编号")
|
||||
private String customerName;
|
||||
|
||||
@Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
||||
@ExcelProperty("客户名称")
|
||||
private String customerDescription;
|
||||
|
||||
@Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@ExcelProperty("产品编码")
|
||||
private String productName;
|
||||
|
||||
@Schema(description = "产品描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
|
||||
@ExcelProperty("产品描述")
|
||||
private String productDescription;
|
||||
|
||||
@Schema(description = "入库日期")
|
||||
@ExcelProperty("入库日期")
|
||||
private String dateOfFgInbound;
|
||||
|
||||
@Schema(description = "子卷号", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@ExcelProperty("子卷号")
|
||||
private String containerName;
|
||||
|
||||
@Schema(description = "产品规格(幅宽)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("产品规格(幅宽)")
|
||||
private String width;
|
||||
|
||||
@Schema(description = "产品厚度")
|
||||
@ExcelProperty("产品厚度")
|
||||
private String thickness;
|
||||
|
||||
@Schema(description = "单位面积质量")
|
||||
@ExcelProperty("单位面积质量")
|
||||
private BigDecimal massPerUnitArea;
|
||||
|
||||
@Schema(description = "净重", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("净重")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("长度")
|
||||
private BigDecimal length;
|
||||
|
||||
@Schema(description = "制造完成日期")
|
||||
@ExcelProperty("制造完成日期")
|
||||
private String dateOfProduction;
|
||||
|
||||
@Schema(description = "计划外分切的子卷", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("计划外分切的子卷")
|
||||
private String isUnPlanProduction;
|
||||
|
||||
@Schema(description = "子卷的物性值1")
|
||||
@ExcelProperty("子卷的物性值1")
|
||||
private String unPlanProductProperty1;
|
||||
|
||||
@Schema(description = "子卷的物性值2")
|
||||
@ExcelProperty("子卷的物性值2")
|
||||
private String unPlanProductProperty2;
|
||||
|
||||
@Schema(description = "子卷的物性值3")
|
||||
@ExcelProperty("子卷的物性值3")
|
||||
private String unPlanProductProperty3;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "是否需要重打外包装标签")
|
||||
@ExcelProperty("是否需要重打外包装标签")
|
||||
private Integer isReprintBoxLabel;
|
||||
|
||||
@Schema(description = "是否需要拆包重打子卷标签")
|
||||
@ExcelProperty("是否需要拆包重打子卷标签")
|
||||
private Integer isUnpackBox;
|
||||
|
||||
@Schema(description = "SAP批次", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("SAP批次")
|
||||
private String sapPcsn;
|
||||
|
||||
@Schema(description = "交货单号")
|
||||
@ExcelProperty("交货单号")
|
||||
private String vbeln;
|
||||
|
||||
@Schema(description = "交货单行号")
|
||||
@ExcelProperty("交货单行号")
|
||||
private String posnr;
|
||||
|
||||
@Schema(description = "木箱长度")
|
||||
@ExcelProperty("木箱长度")
|
||||
private String boxLength;
|
||||
|
||||
@Schema(description = "木箱宽度")
|
||||
@ExcelProperty("木箱宽度")
|
||||
private String boxWidth;
|
||||
|
||||
@Schema(description = "木箱高度")
|
||||
@ExcelProperty("木箱高度")
|
||||
private String boxHigh;
|
||||
|
||||
@Schema(description = "销售订单描述", example = "你说的对")
|
||||
@ExcelProperty("销售订单描述")
|
||||
private String saleOrderDescription;
|
||||
|
||||
@Schema(description = "客户要求规格幅宽")
|
||||
@ExcelProperty("客户要求规格幅宽")
|
||||
private String widthStandard;
|
||||
|
||||
@Schema(description = "物料标准厚度")
|
||||
@ExcelProperty("物料标准厚度")
|
||||
private String thicknessRequest;
|
||||
|
||||
@Schema(description = "实际木箱自身重量")
|
||||
@ExcelProperty("实际木箱自身重量")
|
||||
private BigDecimal realWeight;
|
||||
|
||||
@Schema(description = "包装关系类型", example = "1")
|
||||
@ExcelProperty("包装关系类型")
|
||||
private String subType;
|
||||
|
||||
@Schema(description = "客户需求抗拉下限")
|
||||
@ExcelProperty("客户需求抗拉下限")
|
||||
private String demandLimit;
|
||||
|
||||
@Schema(description = "内控标准抗拉下限")
|
||||
@ExcelProperty("内控标准抗拉下限")
|
||||
private String standardLimit;
|
||||
|
||||
@Schema(description = "生产实际抗拉值")
|
||||
@ExcelProperty("生产实际抗拉值")
|
||||
private String actualValue;
|
||||
|
||||
@Schema(description = "解绑删除标识")
|
||||
@ExcelProperty("解绑删除标识")
|
||||
private String needDelete;
|
||||
|
||||
@Schema(description = "储存地点", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("储存地点")
|
||||
private String extCode;
|
||||
|
||||
@Schema(description = "木箱组")
|
||||
@ExcelProperty("木箱组")
|
||||
private String boxGroup;
|
||||
|
||||
@Schema(description = "物料类型", example = "1")
|
||||
@ExcelProperty("物料类型")
|
||||
private String materialType;
|
||||
|
||||
@Schema(description = "接头数", example = "1")
|
||||
@ExcelProperty("接头数")
|
||||
private Long jointType;
|
||||
|
||||
@Schema(description = "是否放行", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否放行")
|
||||
private Integer isPass;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package cn.code.nl.module.lms.controller.admin.subpackagerelation.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 子卷包装关系新增/修改 Request VO")
|
||||
@Data
|
||||
public class SubPackageRelationSaveReqVO {
|
||||
|
||||
@Schema(description = "子卷包装标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "14551")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "木箱唯一码")
|
||||
private String packageBoxSn;
|
||||
|
||||
@Schema(description = "箱内子卷数量")
|
||||
private Integer qualityInBox;
|
||||
|
||||
@Schema(description = "木箱自身重量")
|
||||
private BigDecimal boxWeight;
|
||||
|
||||
@Schema(description = "木箱料号", example = "2")
|
||||
private String boxType;
|
||||
|
||||
@Schema(description = "保质期")
|
||||
private String qualityGuaranPeriod;
|
||||
|
||||
@Schema(description = "销售订单及行号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "销售订单及行号不能为空")
|
||||
private String saleOrderName;
|
||||
|
||||
@Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "客户编号不能为空")
|
||||
private String customerName;
|
||||
|
||||
@Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
||||
@NotEmpty(message = "客户名称不能为空")
|
||||
private String customerDescription;
|
||||
|
||||
@Schema(description = "产品编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@NotEmpty(message = "产品编码不能为空")
|
||||
private String productName;
|
||||
|
||||
@Schema(description = "产品描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
|
||||
@NotEmpty(message = "产品描述不能为空")
|
||||
private String productDescription;
|
||||
|
||||
@Schema(description = "入库日期")
|
||||
private String dateOfFgInbound;
|
||||
|
||||
@Schema(description = "子卷号", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@NotEmpty(message = "子卷号不能为空")
|
||||
private String containerName;
|
||||
|
||||
@Schema(description = "产品规格(幅宽)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "产品规格(幅宽)不能为空")
|
||||
private String width;
|
||||
|
||||
@Schema(description = "产品厚度")
|
||||
private String thickness;
|
||||
|
||||
@Schema(description = "单位面积质量")
|
||||
private BigDecimal massPerUnitArea;
|
||||
|
||||
@Schema(description = "净重", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "净重不能为空")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "长度不能为空")
|
||||
private BigDecimal length;
|
||||
|
||||
@Schema(description = "制造完成日期")
|
||||
private String dateOfProduction;
|
||||
|
||||
@Schema(description = "计划外分切的子卷", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "计划外分切的子卷不能为空")
|
||||
private String isUnPlanProduction;
|
||||
|
||||
@Schema(description = "子卷的物性值1")
|
||||
private String unPlanProductProperty1;
|
||||
|
||||
@Schema(description = "子卷的物性值2")
|
||||
private String unPlanProductProperty2;
|
||||
|
||||
@Schema(description = "子卷的物性值3")
|
||||
private String unPlanProductProperty3;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "状态不能为空")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "是否需要重打外包装标签")
|
||||
private Integer isReprintBoxLabel;
|
||||
|
||||
@Schema(description = "是否需要拆包重打子卷标签")
|
||||
private Integer isUnpackBox;
|
||||
|
||||
@Schema(description = "SAP批次", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "SAP批次不能为空")
|
||||
private String sapPcsn;
|
||||
|
||||
@Schema(description = "交货单号")
|
||||
private String vbeln;
|
||||
|
||||
@Schema(description = "交货单行号")
|
||||
private String posnr;
|
||||
|
||||
@Schema(description = "木箱长度")
|
||||
private String boxLength;
|
||||
|
||||
@Schema(description = "木箱宽度")
|
||||
private String boxWidth;
|
||||
|
||||
@Schema(description = "木箱高度")
|
||||
private String boxHigh;
|
||||
|
||||
@Schema(description = "销售订单描述", example = "你说的对")
|
||||
private String saleOrderDescription;
|
||||
|
||||
@Schema(description = "客户要求规格幅宽")
|
||||
private String widthStandard;
|
||||
|
||||
@Schema(description = "物料标准厚度")
|
||||
private String thicknessRequest;
|
||||
|
||||
@Schema(description = "实际木箱自身重量")
|
||||
private BigDecimal realWeight;
|
||||
|
||||
@Schema(description = "包装关系类型", example = "1")
|
||||
private String subType;
|
||||
|
||||
@Schema(description = "客户需求抗拉下限")
|
||||
private String demandLimit;
|
||||
|
||||
@Schema(description = "内控标准抗拉下限")
|
||||
private String standardLimit;
|
||||
|
||||
@Schema(description = "生产实际抗拉值")
|
||||
private String actualValue;
|
||||
|
||||
@Schema(description = "解绑删除标识")
|
||||
private String needDelete;
|
||||
|
||||
@Schema(description = "储存地点", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "储存地点不能为空")
|
||||
private String extCode;
|
||||
|
||||
@Schema(description = "木箱组")
|
||||
private String boxGroup;
|
||||
|
||||
@Schema(description = "物料类型", example = "1")
|
||||
private String materialType;
|
||||
|
||||
@Schema(description = "接头数", example = "1")
|
||||
private Long jointType;
|
||||
|
||||
@Schema(description = "是否放行", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否放行不能为空")
|
||||
private Integer isPass;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package cn.code.nl.module.lms.controller.pda;
|
||||
|
||||
import cn.code.nl.framework.common.pojo.CommonResult;
|
||||
import cn.code.nl.module.lms.controller.admin.packagepoint.vo.PackagePointRespVO;
|
||||
import cn.code.nl.module.lms.controller.pda.vo.ManaQualityCheckReqVO;
|
||||
import cn.code.nl.module.lms.dal.dataobject.packagepoint.PackagePointDO;
|
||||
import cn.code.nl.module.lms.service.packagepoint.PackagePdaService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static cn.code.nl.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
*
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/8/13 18:54
|
||||
*/
|
||||
@Tag(name = "手持接口 - 打包管理")
|
||||
@RestController
|
||||
@RequestMapping("/lms/pda/package")
|
||||
@Validated
|
||||
public class PackagePdaController {
|
||||
|
||||
/** PDA 装箱业务服务 */
|
||||
@Resource
|
||||
private PackagePdaService packagePdaService;
|
||||
|
||||
/**
|
||||
* 根据点位编码查询装箱区点位信息
|
||||
*
|
||||
* @param manaQualityCheckReqVO 查询参数
|
||||
* @return 点位编码、子卷号和载具号
|
||||
*/
|
||||
@PostMapping("/query-point-info")
|
||||
@Operation(summary = "查询点位信息")
|
||||
@PermitAll
|
||||
public CommonResult<PackagePointRespVO> queryPointInfo(
|
||||
@Valid @RequestBody ManaQualityCheckReqVO manaQualityCheckReqVO) {
|
||||
PackagePointDO packagePoint = packagePdaService.queryPointInfo(manaQualityCheckReqVO.getPointCode());
|
||||
PackagePointRespVO response = new PackagePointRespVO();
|
||||
response.setPointCode(packagePoint.getPointCode());
|
||||
response.setContainerName(packagePoint.getContainerName());
|
||||
response.setVehicleCode(packagePoint.getVehicleCode());
|
||||
return success(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/quality-check")
|
||||
@Operation(summary = "人工质检")
|
||||
@PermitAll
|
||||
public CommonResult<String> executeManualQualityCheck(@Valid @RequestBody ManaQualityCheckReqVO manaQualityCheckReqVO) {
|
||||
// packagePdaService.executeManualQualityCheck(manaQualityCheckReqVO)
|
||||
return success("操作成功!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.code.nl.module.lms.controller.pda.vo;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 人工质检
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/8/13 19:06
|
||||
*/
|
||||
@Data
|
||||
public class ManaQualityCheckReqVO {
|
||||
|
||||
/** 点位编码 */
|
||||
@NotEmpty(message = "点位编码不能为空")
|
||||
private String pointCode;
|
||||
|
||||
/** 子卷号 */
|
||||
private String containerName;
|
||||
|
||||
/** 架子号 */
|
||||
private String vehicleCode;
|
||||
|
||||
/** 是否合格 */
|
||||
private Boolean isQualified;
|
||||
}
|
||||
@@ -40,6 +40,14 @@ public class SlittingproductionplanDO extends BaseDO {
|
||||
* 产品编码
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 子卷号
|
||||
*/
|
||||
private String containerName;
|
||||
/**
|
||||
* 外部子卷号
|
||||
*/
|
||||
private String extContainerName;
|
||||
/**
|
||||
* 产品描述
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
package cn.code.nl.module.lms.dal.dataobject.subpackagerelation;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.code.nl.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 子卷包装关系 DO
|
||||
*
|
||||
* @author 诺力管理员
|
||||
*/
|
||||
@TableName("lms_sub_package_relation")
|
||||
@KeySequence("lms_sub_package_relation_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SubPackageRelationDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 子卷包装标识
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 木箱唯一码
|
||||
*/
|
||||
private String packageBoxSn;
|
||||
/**
|
||||
* 箱内子卷数量
|
||||
*/
|
||||
private Integer qualityInBox;
|
||||
/**
|
||||
* 木箱自身重量
|
||||
*/
|
||||
private BigDecimal boxWeight;
|
||||
/**
|
||||
* 木箱料号
|
||||
*/
|
||||
private String boxType;
|
||||
/**
|
||||
* 保质期
|
||||
*/
|
||||
private String qualityGuaranPeriod;
|
||||
/**
|
||||
* 销售订单及行号
|
||||
*/
|
||||
private String saleOrderName;
|
||||
/**
|
||||
* 客户编号
|
||||
*/
|
||||
private String customerName;
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
private String customerDescription;
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 产品描述
|
||||
*/
|
||||
private String productDescription;
|
||||
/**
|
||||
* 入库日期
|
||||
*/
|
||||
private String dateOfFgInbound;
|
||||
/**
|
||||
* 子卷号
|
||||
*/
|
||||
private String containerName;
|
||||
/**
|
||||
* 产品规格(幅宽)
|
||||
*/
|
||||
private String width;
|
||||
/**
|
||||
* 产品厚度
|
||||
*/
|
||||
private String thickness;
|
||||
/**
|
||||
* 单位面积质量
|
||||
*/
|
||||
private BigDecimal massPerUnitArea;
|
||||
/**
|
||||
* 净重
|
||||
*/
|
||||
private BigDecimal netWeight;
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private BigDecimal length;
|
||||
/**
|
||||
* 制造完成日期
|
||||
*/
|
||||
private String dateOfProduction;
|
||||
/**
|
||||
* 计划外分切的子卷
|
||||
*/
|
||||
private String isUnPlanProduction;
|
||||
/**
|
||||
* 子卷的物性值1
|
||||
*/
|
||||
private String unPlanProductProperty1;
|
||||
/**
|
||||
* 子卷的物性值2
|
||||
*/
|
||||
private String unPlanProductProperty2;
|
||||
/**
|
||||
* 子卷的物性值3
|
||||
*/
|
||||
private String unPlanProductProperty3;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 是否需要重打外包装标签
|
||||
*/
|
||||
private Integer isReprintBoxLabel;
|
||||
/**
|
||||
* 是否需要拆包重打子卷标签
|
||||
*/
|
||||
private Integer isUnpackBox;
|
||||
/**
|
||||
* SAP批次
|
||||
*/
|
||||
private String sapPcsn;
|
||||
/**
|
||||
* 交货单号
|
||||
*/
|
||||
private String vbeln;
|
||||
/**
|
||||
* 交货单行号
|
||||
*/
|
||||
private String posnr;
|
||||
/**
|
||||
* 木箱长度
|
||||
*/
|
||||
private String boxLength;
|
||||
/**
|
||||
* 木箱宽度
|
||||
*/
|
||||
private String boxWidth;
|
||||
/**
|
||||
* 木箱高度
|
||||
*/
|
||||
private String boxHigh;
|
||||
/**
|
||||
* 销售订单描述
|
||||
*/
|
||||
private String saleOrderDescription;
|
||||
/**
|
||||
* 客户要求规格幅宽
|
||||
*/
|
||||
private String widthStandard;
|
||||
/**
|
||||
* 物料标准厚度
|
||||
*/
|
||||
private String thicknessRequest;
|
||||
/**
|
||||
* 实际木箱自身重量
|
||||
*/
|
||||
private BigDecimal realWeight;
|
||||
/**
|
||||
* 包装关系类型
|
||||
*/
|
||||
private String subType;
|
||||
/**
|
||||
* 客户需求抗拉下限
|
||||
*/
|
||||
private String demandLimit;
|
||||
/**
|
||||
* 内控标准抗拉下限
|
||||
*/
|
||||
private String standardLimit;
|
||||
/**
|
||||
* 生产实际抗拉值
|
||||
*/
|
||||
private String actualValue;
|
||||
/**
|
||||
* 解绑删除标识
|
||||
*/
|
||||
private String needDelete;
|
||||
/**
|
||||
* 储存地点
|
||||
*/
|
||||
private String extCode;
|
||||
/**
|
||||
* 木箱组
|
||||
*/
|
||||
private String boxGroup;
|
||||
/**
|
||||
* 物料类型
|
||||
*/
|
||||
private String materialType;
|
||||
/**
|
||||
* 接头数
|
||||
*/
|
||||
private Long jointType;
|
||||
/**
|
||||
* 是否放行
|
||||
*/
|
||||
private Integer isPass;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package cn.code.nl.module.lms.dal.mysql.subpackagerelation;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.code.nl.framework.common.pojo.PageResult;
|
||||
import cn.code.nl.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.code.nl.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.code.nl.module.lms.dal.dataobject.subpackagerelation.SubPackageRelationDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.code.nl.module.lms.controller.admin.subpackagerelation.vo.*;
|
||||
|
||||
/**
|
||||
* 子卷包装关系 Mapper
|
||||
*
|
||||
* @author 诺力管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface SubPackageRelationMapper extends BaseMapperX<SubPackageRelationDO> {
|
||||
|
||||
default PageResult<SubPackageRelationDO> selectPage(SubPackageRelationPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<SubPackageRelationDO>()
|
||||
.eqIfPresent(SubPackageRelationDO::getPackageBoxSn, reqVO.getPackageBoxSn())
|
||||
.eqIfPresent(SubPackageRelationDO::getBoxType, reqVO.getBoxType())
|
||||
.likeIfPresent(SubPackageRelationDO::getSaleOrderName, reqVO.getSaleOrderName())
|
||||
.likeIfPresent(SubPackageRelationDO::getCustomerName, reqVO.getCustomerName())
|
||||
.likeIfPresent(SubPackageRelationDO::getProductName, reqVO.getProductName())
|
||||
.eqIfPresent(SubPackageRelationDO::getDateOfFgInbound, reqVO.getDateOfFgInbound())
|
||||
.likeIfPresent(SubPackageRelationDO::getContainerName, reqVO.getContainerName())
|
||||
.eqIfPresent(SubPackageRelationDO::getExtCode, reqVO.getExtCode())
|
||||
.betweenIfPresent(SubPackageRelationDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(SubPackageRelationDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package cn.code.nl.module.lms.service.packagepoint;
|
||||
|
||||
import cn.code.nl.module.lms.dal.dataobject.packagepoint.PackagePointDO;
|
||||
|
||||
/**
|
||||
*
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/8/13 18:56
|
||||
*/
|
||||
public interface PackagePdaService {
|
||||
|
||||
/**
|
||||
* 根据点位编码查询装箱区点位信息
|
||||
*
|
||||
* @param pointCode 点位编码
|
||||
* @return 装箱区点位信息
|
||||
*/
|
||||
PackagePointDO queryPointInfo(String pointCode);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package cn.code.nl.module.lms.service.packagepoint;
|
||||
|
||||
import cn.code.nl.module.lms.dal.dataobject.packagepoint.PackagePointDO;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import static cn.code.nl.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.code.nl.module.lms.enums.ErrorCodeConstants.PACKAGE_POINT_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
*
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/8/13 18:56
|
||||
*/
|
||||
@Service
|
||||
public class PackagePdaServiceImpl implements PackagePdaService {
|
||||
|
||||
/** 装箱区点位服务 */
|
||||
@Resource
|
||||
private PackagePointService packagePointService;
|
||||
|
||||
/**
|
||||
* 根据点位编码查询装箱区点位信息
|
||||
*
|
||||
* @param pointCode 点位编码
|
||||
* @return 装箱区点位信息
|
||||
*/
|
||||
@Override
|
||||
public PackagePointDO queryPointInfo(String pointCode) {
|
||||
PackagePointDO packagePoint = packagePointService.getPackagePointByCode(pointCode, false);
|
||||
if (packagePoint == null) {
|
||||
throw exception(PACKAGE_POINT_NOT_EXISTS);
|
||||
}
|
||||
return packagePoint;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.code.nl.module.lms.service.subpackagerelation;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.code.nl.module.lms.controller.admin.subpackagerelation.vo.*;
|
||||
import cn.code.nl.module.lms.dal.dataobject.subpackagerelation.SubPackageRelationDO;
|
||||
import cn.code.nl.framework.common.pojo.PageResult;
|
||||
import cn.code.nl.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 子卷包装关系 Service 接口
|
||||
*
|
||||
* @author 诺力管理员
|
||||
*/
|
||||
public interface SubPackageRelationService {
|
||||
|
||||
/**
|
||||
* 创建子卷包装关系
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createSubPackageRelation(@Valid SubPackageRelationSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新子卷包装关系
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateSubPackageRelation(@Valid SubPackageRelationSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除子卷包装关系
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteSubPackageRelation(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除子卷包装关系
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteSubPackageRelationListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得子卷包装关系
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 子卷包装关系
|
||||
*/
|
||||
SubPackageRelationDO getSubPackageRelation(Long id);
|
||||
|
||||
/**
|
||||
* 获得子卷包装关系分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 子卷包装关系分页
|
||||
*/
|
||||
PageResult<SubPackageRelationDO> getSubPackageRelationPage(SubPackageRelationPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package cn.code.nl.module.lms.service.subpackagerelation;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.code.nl.module.lms.controller.admin.subpackagerelation.vo.*;
|
||||
import cn.code.nl.module.lms.dal.dataobject.subpackagerelation.SubPackageRelationDO;
|
||||
import cn.code.nl.framework.common.pojo.PageResult;
|
||||
import cn.code.nl.framework.common.pojo.PageParam;
|
||||
import cn.code.nl.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.code.nl.module.lms.dal.mysql.subpackagerelation.SubPackageRelationMapper;
|
||||
|
||||
import static cn.code.nl.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.code.nl.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static cn.code.nl.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static cn.code.nl.module.lms.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 子卷包装关系 Service 实现类
|
||||
*
|
||||
* @author 诺力管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class SubPackageRelationServiceImpl implements SubPackageRelationService {
|
||||
|
||||
@Resource
|
||||
private SubPackageRelationMapper subPackageRelationMapper;
|
||||
|
||||
@Override
|
||||
public Long createSubPackageRelation(SubPackageRelationSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
SubPackageRelationDO subPackageRelation = BeanUtils.toBean(createReqVO, SubPackageRelationDO.class);
|
||||
subPackageRelationMapper.insert(subPackageRelation);
|
||||
|
||||
// 返回
|
||||
return subPackageRelation.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSubPackageRelation(SubPackageRelationSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateSubPackageRelationExists(updateReqVO.getId());
|
||||
// 更新
|
||||
SubPackageRelationDO updateObj = BeanUtils.toBean(updateReqVO, SubPackageRelationDO.class);
|
||||
subPackageRelationMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSubPackageRelation(Long id) {
|
||||
// 校验存在
|
||||
validateSubPackageRelationExists(id);
|
||||
// 删除
|
||||
subPackageRelationMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteSubPackageRelationListByIds(List<Long> ids) {
|
||||
// 删除
|
||||
subPackageRelationMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
private void validateSubPackageRelationExists(Long id) {
|
||||
if (subPackageRelationMapper.selectById(id) == null) {
|
||||
throw exception(SUB_PACKAGE_RELATION_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SubPackageRelationDO getSubPackageRelation(Long id) {
|
||||
return subPackageRelationMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<SubPackageRelationDO> getSubPackageRelationPage(SubPackageRelationPageReqVO pageReqVO) {
|
||||
return subPackageRelationMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?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="cn.code.nl.module.lms.dal.mysql.subpackagerelation.SubPackageRelationMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user