diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/PurchasereceiptJobMainController.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/PurchasereceiptJobMainController.java index 7aeb490c..585ffc02 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/PurchasereceiptJobMainController.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/PurchasereceiptJobMainController.java @@ -52,22 +52,6 @@ public class PurchasereceiptJobMainController { @Resource private AdminUserApi userApi; - @Operation(summary = "承接任务") - @PreAuthorize("@ss.hasPermission('wms:purchasereceipt-job-main:accept')") - @PostMapping(value = "/accept/{id}") - public CommonResult accept(@PathVariable("id") Long id) { - int result = purchasereceiptJobMainService.accept(id); - return success(result > 0); - } - - @Operation(summary = "取消承接任务") - @PreAuthorize("@ss.hasPermission('wms:purchasereceipt-job-main:cancel-accept')") - @PostMapping(value = "/cancelAccept/{id}") - public CommonResult cancelAccept(@PathVariable("id") Long id) { - int result = purchasereceiptJobMainService.cancelAccept(id); - return success(result > 0); - } - @GetMapping("/page") @Operation(summary = "获得采购收货任务主分页") @PreAuthorize("@ss.hasPermission('wms:purchasereceipt-job-main:query')") @@ -189,4 +173,29 @@ public class PurchasereceiptJobMainController { return success(countByStatus); } + @Operation(summary = "承接任务") + @PreAuthorize("@ss.hasPermission('wms:purchasereceipt-job-main:accept')") + @PostMapping(value = "/accept/{id}") + public CommonResult accept(@PathVariable("id") Long id) { + int result = purchasereceiptJobMainService.accept(id); + return success(result > 0); + } + + @Operation(summary = "取消承接任务") + @PreAuthorize("@ss.hasPermission('wms:purchasereceipt-job-main:cancel-accept')") + @PostMapping(value = "/cancelAccept/{id}") + public CommonResult cancelAccept(@PathVariable("id") Long id) { + int result = purchasereceiptJobMainService.cancelAccept(id); + return success(result > 0); + } + + @PutMapping("/execute") + @Operation(summary = "执行采购收货任务主") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('wms:purchasereceipt-job-main:execute')") + public CommonResult excutePurchasereceiptJobMain(@Valid @RequestBody PurchasereceiptJobMainUpdateReqVO updateReqVO) { + Integer count = purchasereceiptJobMainService.excutePurchasereceiptJobMain(updateReqVO); + return success(count > 0); + } + } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/vo/PurchasereceiptJobDetailBaseVO.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/vo/PurchasereceiptJobDetailBaseVO.java index a2f0e337..28c2ae56 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/vo/PurchasereceiptJobDetailBaseVO.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/vo/PurchasereceiptJobDetailBaseVO.java @@ -1,18 +1,11 @@ package com.win.module.wms.controller.purchasereceiptJob.vo; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import java.util.*; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.math.BigDecimal; -import java.math.BigDecimal; -import java.math.BigDecimal; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + import java.math.BigDecimal; import java.time.LocalDateTime; -import javax.validation.constraints.*; -import org.springframework.format.annotation.DateTimeFormat; import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @@ -120,4 +113,7 @@ public class PurchasereceiptJobDetailBaseVO { @Schema(description = "到货主代码") private String toOwnerCode; + @Schema(description = "实际数量") + private BigDecimal handleQty; + } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/vo/PurchasereceiptJobMainUpdateReqVO.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/vo/PurchasereceiptJobMainUpdateReqVO.java index 95ebcc03..87a55025 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/vo/PurchasereceiptJobMainUpdateReqVO.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptJob/vo/PurchasereceiptJobMainUpdateReqVO.java @@ -1,9 +1,12 @@ package com.win.module.wms.controller.purchasereceiptJob.vo; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import java.util.*; -import javax.validation.constraints.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import javax.validation.Valid; +import java.util.List; @Schema(description = "管理后台 - 采购收货任务主更新 Request VO") @Data @@ -11,4 +14,6 @@ import javax.validation.constraints.*; @ToString(callSuper = true) public class PurchasereceiptJobMainUpdateReqVO extends PurchasereceiptJobMainBaseVO { + @Schema(description = "子表数据") + private List<@Valid PurchasereceiptJobDetailUpdateReqVO> subList; } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailBaseVO.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailBaseVO.java new file mode 100644 index 00000000..c613f773 --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailBaseVO.java @@ -0,0 +1,171 @@ +package com.win.module.wms.controller.purchasereceiptRecord.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotNull; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +/** + * 采购收货记录子 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ +@Data +public class PurchaseshortageDetailBaseVO { + + @Schema(description = "从包装号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "从包装号不能为空") + private String fromPackingNumber; + + @Schema(description = "到包装号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "到包装号不能为空") + private String toPackingNumber; + + @Schema(description = "从器具号") + private String fromContainerNumber; + + @Schema(description = "到器具号") + private String toContainerNumber; + + @Schema(description = "从批次") + private String fromBatch; + + @Schema(description = "替代批次") + private String altBatch; + + @Schema(description = "到货日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "到货日期不能为空") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime arriveDate; + + @Schema(description = "生产日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "生产日期不能为空") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime produceDate; + + @Schema(description = "过期日期", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "过期日期不能为空") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime expireDate; + + @Schema(description = "库存状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "库存状态不能为空") + private String inventoryStatus; + + @Schema(description = "从库位代码") + private String fromLocationCode; + + @Schema(description = "到库位代码") + private String toLocationCode; + + @Schema(description = "从库位组代码") + private String fromLocationGroupCode; + + @Schema(description = "到库位组代码") + private String toLocationGroupCode; + + @Schema(description = "从库区代码") + private String fromAreaCodes; + + @Schema(description = "到库区代码") + private String toAreaCodes; + + @Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "订单号不能为空") + private String poNumber; + + @Schema(description = "订单行", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "订单行不能为空") + private String poLine; + + @Schema(description = "标包数量", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "标包数量不能为空") + private BigDecimal stdPackQty; + + @Schema(description = "标包单位", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "标包单位不能为空") + private String stdPackUnit; + + @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "数量不能为空") + private BigDecimal qty; + + @Schema(description = "单位") + private String uom; + + @Schema(description = "供应商计量数量") + private BigDecimal supplierQty; + + @Schema(description = "供应商计量单位") + private String supplierUom; + + @Schema(description = "转换率") + private BigDecimal convertRate; + + @Schema(description = "目检结果") + private String visualInspectResult; + + @Schema(description = "目检照片") + private String visualInspectPhotos; + + @Schema(description = "不合格原因", example = "不对") + private String failedReason; + + @Schema(description = "单价", example = "25384") + private BigDecimal singlePrice; + + @Schema(description = "金额") + private BigDecimal amount; + + @Schema(description = "任务明细ID", example = "20190") + private String jobDetailId; + + @Schema(description = "物品代码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "物品代码不能为空") + private String itemCode; + + @Schema(description = "物品名称", example = "赵六") + private String itemName; + + @Schema(description = "物品描述1") + private String itemDesc1; + + @Schema(description = "物品描述2") + private String itemDesc2; + + @Schema(description = "主表ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30925") + @NotNull(message = "主表ID不能为空") + private Long masterId; + + @Schema(description = "单据号") + private String number; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "地点ID", example = "25612") + private String siteId; + + @Schema(description = "项目代码") + private String projectCode; + + @Schema(description = "代码") + private String code; + + @Schema(description = "接口类型", example = "1") + private String interfaceType; + + @Schema(description = "从货主代码") + private String fromOwnerCode; + + @Schema(description = "到货主代码") + private String toOwnerCode; + + @Schema(description = "到批次") + private String toBatch; + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailCreateReqVO.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailCreateReqVO.java new file mode 100644 index 00000000..18de29e4 --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailCreateReqVO.java @@ -0,0 +1,14 @@ +package com.win.module.wms.controller.purchasereceiptRecord.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "管理后台 - 采购收货记录子创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class PurchaseshortageDetailCreateReqVO extends PurchaseshortageDetailBaseVO { + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailExcelVO.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailExcelVO.java new file mode 100644 index 00000000..75f0a8d6 --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailExcelVO.java @@ -0,0 +1,158 @@ +package com.win.module.wms.controller.purchasereceiptRecord.vo; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * 采购收货记录子 Excel VO + * + * @author 超级管理员 + */ +@Data +public class PurchaseshortageDetailExcelVO { + + @ExcelProperty("id") + private Long id; + + @ExcelProperty("从包装号") + private String fromPackingNumber; + + @ExcelProperty("到包装号") + private String toPackingNumber; + + @ExcelProperty("从器具号") + private String fromContainerNumber; + + @ExcelProperty("到器具号") + private String toContainerNumber; + + @ExcelProperty("从批次") + private String fromBatch; + + @ExcelProperty("替代批次") + private String altBatch; + + @ExcelProperty("到货日期") + private LocalDateTime arriveDate; + + @ExcelProperty("生产日期") + private LocalDateTime produceDate; + + @ExcelProperty("过期日期") + private LocalDateTime expireDate; + + @ExcelProperty("库存状态") + private String inventoryStatus; + + @ExcelProperty("从库位代码") + private String fromLocationCode; + + @ExcelProperty("到库位代码") + private String toLocationCode; + + @ExcelProperty("从库位组代码") + private String fromLocationGroupCode; + + @ExcelProperty("到库位组代码") + private String toLocationGroupCode; + + @ExcelProperty("从库区代码") + private String fromAreaCodes; + + @ExcelProperty("到库区代码") + private String toAreaCodes; + + @ExcelProperty("订单号") + private String poNumber; + + @ExcelProperty("订单行") + private String poLine; + + @ExcelProperty("标包数量") + private BigDecimal stdPackQty; + + @ExcelProperty("标包单位") + private String stdPackUnit; + + @ExcelProperty("数量") + private BigDecimal qty; + + @ExcelProperty("单位") + private String uom; + + @ExcelProperty("供应商计量数量") + private BigDecimal supplierQty; + + @ExcelProperty("供应商计量单位") + private String supplierUom; + + @ExcelProperty("转换率") + private BigDecimal convertRate; + + @ExcelProperty("目检结果") + private String visualInspectResult; + + @ExcelProperty("目检照片") + private String visualInspectPhotos; + + @ExcelProperty("不合格原因") + private String failedReason; + + @ExcelProperty("单价") + private BigDecimal singlePrice; + + @ExcelProperty("金额") + private BigDecimal amount; + + @ExcelProperty("任务明细ID") + private String jobDetailId; + + @ExcelProperty("物品代码") + private String itemCode; + + @ExcelProperty("物品名称") + private String itemName; + + @ExcelProperty("物品描述1") + private String itemDesc1; + + @ExcelProperty("物品描述2") + private String itemDesc2; + + @ExcelProperty("主表ID") + private Long masterId; + + @ExcelProperty("单据号") + private String number; + + @ExcelProperty("备注") + private String remark; + + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @ExcelProperty("地点ID") + private String siteId; + + @ExcelProperty("项目代码") + private String projectCode; + + @ExcelProperty("代码") + private String code; + + @ExcelProperty("接口类型") + private String interfaceType; + + @ExcelProperty("从货主代码") + private String fromOwnerCode; + + @ExcelProperty("到货主代码") + private String toOwnerCode; + + @ExcelProperty("到批次") + private String toBatch; + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailExportReqVO.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailExportReqVO.java new file mode 100644 index 00000000..3e5da6c2 --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailExportReqVO.java @@ -0,0 +1,158 @@ +package com.win.module.wms.controller.purchasereceiptRecord.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 采购收货记录子 Excel 导出 Request VO,参数和 PurchaseshortageDetailPageReqVO 是一致的") +@Data +public class PurchaseshortageDetailExportReqVO { + + @Schema(description = "从包装号") + private String fromPackingNumber; + + @Schema(description = "到包装号") + private String toPackingNumber; + + @Schema(description = "从器具号") + private String fromContainerNumber; + + @Schema(description = "到器具号") + private String toContainerNumber; + + @Schema(description = "从批次") + private String fromBatch; + + @Schema(description = "替代批次") + private String altBatch; + + @Schema(description = "到货日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] arriveDate; + + @Schema(description = "生产日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] produceDate; + + @Schema(description = "过期日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] expireDate; + + @Schema(description = "库存状态", example = "1") + private String inventoryStatus; + + @Schema(description = "从库位代码") + private String fromLocationCode; + + @Schema(description = "到库位代码") + private String toLocationCode; + + @Schema(description = "从库位组代码") + private String fromLocationGroupCode; + + @Schema(description = "到库位组代码") + private String toLocationGroupCode; + + @Schema(description = "从库区代码") + private String fromAreaCodes; + + @Schema(description = "到库区代码") + private String toAreaCodes; + + @Schema(description = "订单号") + private String poNumber; + + @Schema(description = "订单行") + private String poLine; + + @Schema(description = "标包数量") + private BigDecimal stdPackQty; + + @Schema(description = "标包单位") + private String stdPackUnit; + + @Schema(description = "数量") + private BigDecimal qty; + + @Schema(description = "单位") + private String uom; + + @Schema(description = "供应商计量数量") + private BigDecimal supplierQty; + + @Schema(description = "供应商计量单位") + private String supplierUom; + + @Schema(description = "转换率") + private BigDecimal convertRate; + + @Schema(description = "目检结果") + private String visualInspectResult; + + @Schema(description = "目检照片") + private String visualInspectPhotos; + + @Schema(description = "不合格原因", example = "不对") + private String failedReason; + + @Schema(description = "单价", example = "25384") + private BigDecimal singlePrice; + + @Schema(description = "金额") + private BigDecimal amount; + + @Schema(description = "任务明细ID", example = "20190") + private String jobDetailId; + + @Schema(description = "物品代码") + private String itemCode; + + @Schema(description = "物品名称", example = "赵六") + private String itemName; + + @Schema(description = "物品描述1") + private String itemDesc1; + + @Schema(description = "物品描述2") + private String itemDesc2; + + @Schema(description = "主表ID", example = "30925") + private Long masterId; + + @Schema(description = "单据号") + private String number; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "地点ID", example = "25612") + private String siteId; + + @Schema(description = "项目代码") + private String projectCode; + + @Schema(description = "代码") + private String code; + + @Schema(description = "接口类型", example = "1") + private String interfaceType; + + @Schema(description = "从货主代码") + private String fromOwnerCode; + + @Schema(description = "到货主代码") + private String toOwnerCode; + + @Schema(description = "到批次") + private String toBatch; + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailPageReqVO.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailPageReqVO.java new file mode 100644 index 00000000..f0313d74 --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailPageReqVO.java @@ -0,0 +1,163 @@ +package com.win.module.wms.controller.purchasereceiptRecord.vo; + +import com.win.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 采购收货记录子分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class PurchaseshortageDetailPageReqVO extends PageParam { + + @Schema(description = "从包装号") + private String fromPackingNumber; + + @Schema(description = "到包装号") + private String toPackingNumber; + + @Schema(description = "从器具号") + private String fromContainerNumber; + + @Schema(description = "到器具号") + private String toContainerNumber; + + @Schema(description = "从批次") + private String fromBatch; + + @Schema(description = "替代批次") + private String altBatch; + + @Schema(description = "到货日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] arriveDate; + + @Schema(description = "生产日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] produceDate; + + @Schema(description = "过期日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] expireDate; + + @Schema(description = "库存状态", example = "1") + private String inventoryStatus; + + @Schema(description = "从库位代码") + private String fromLocationCode; + + @Schema(description = "到库位代码") + private String toLocationCode; + + @Schema(description = "从库位组代码") + private String fromLocationGroupCode; + + @Schema(description = "到库位组代码") + private String toLocationGroupCode; + + @Schema(description = "从库区代码") + private String fromAreaCodes; + + @Schema(description = "到库区代码") + private String toAreaCodes; + + @Schema(description = "订单号") + private String poNumber; + + @Schema(description = "订单行") + private String poLine; + + @Schema(description = "标包数量") + private BigDecimal stdPackQty; + + @Schema(description = "标包单位") + private String stdPackUnit; + + @Schema(description = "数量") + private BigDecimal qty; + + @Schema(description = "单位") + private String uom; + + @Schema(description = "供应商计量数量") + private BigDecimal supplierQty; + + @Schema(description = "供应商计量单位") + private String supplierUom; + + @Schema(description = "转换率") + private BigDecimal convertRate; + + @Schema(description = "目检结果") + private String visualInspectResult; + + @Schema(description = "目检照片") + private String visualInspectPhotos; + + @Schema(description = "不合格原因", example = "不对") + private String failedReason; + + @Schema(description = "单价", example = "25384") + private BigDecimal singlePrice; + + @Schema(description = "金额") + private BigDecimal amount; + + @Schema(description = "任务明细ID", example = "20190") + private String jobDetailId; + + @Schema(description = "物品代码") + private String itemCode; + + @Schema(description = "物品名称", example = "赵六") + private String itemName; + + @Schema(description = "物品描述1") + private String itemDesc1; + + @Schema(description = "物品描述2") + private String itemDesc2; + + @Schema(description = "主表ID", example = "30925") + private Long masterId; + + @Schema(description = "单据号") + private String number; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "地点ID", example = "25612") + private String siteId; + + @Schema(description = "项目代码") + private String projectCode; + + @Schema(description = "代码") + private String code; + + @Schema(description = "接口类型", example = "1") + private String interfaceType; + + @Schema(description = "从货主代码") + private String fromOwnerCode; + + @Schema(description = "到货主代码") + private String toOwnerCode; + + @Schema(description = "到批次") + private String toBatch; + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailRespVO.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailRespVO.java new file mode 100644 index 00000000..54ce0ab7 --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailRespVO.java @@ -0,0 +1,19 @@ +package com.win.module.wms.controller.purchasereceiptRecord.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 采购收货记录子 Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class PurchaseshortageDetailRespVO extends PurchaseshortageDetailBaseVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26980") + private Long id; + + @Schema(description = "创建时间") + private LocalDateTime createTime; + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailUpdateReqVO.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailUpdateReqVO.java new file mode 100644 index 00000000..d2faab32 --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/purchasereceiptRecord/vo/PurchaseshortageDetailUpdateReqVO.java @@ -0,0 +1,20 @@ +package com.win.module.wms.controller.purchasereceiptRecord.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import javax.validation.constraints.NotNull; + +@Schema(description = "管理后台 - 采购收货记录子更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class PurchaseshortageDetailUpdateReqVO extends PurchaseshortageDetailBaseVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26980") + @NotNull(message = "id不能为空") + private Long id; + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/convert/purchasereceiptRecord/PurchaseshortageDetailConvert.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/convert/purchasereceiptRecord/PurchaseshortageDetailConvert.java new file mode 100644 index 00000000..75fc8f68 --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/convert/purchasereceiptRecord/PurchaseshortageDetailConvert.java @@ -0,0 +1,36 @@ +package com.win.module.wms.convert.purchasereceiptRecord; + +import com.win.framework.common.pojo.PageResult; +import com.win.module.wms.controller.purchasereceiptRecord.vo.PurchaseshortageDetailCreateReqVO; +import com.win.module.wms.controller.purchasereceiptRecord.vo.PurchaseshortageDetailExcelVO; +import com.win.module.wms.controller.purchasereceiptRecord.vo.PurchaseshortageDetailRespVO; +import com.win.module.wms.controller.purchasereceiptRecord.vo.PurchaseshortageDetailUpdateReqVO; +import com.win.module.wms.dal.dataobject.purchasereceiptRecord.PurchaseshortageDetailDO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +/** + * 采购收货记录子 Convert + * + * @author 超级管理员 + */ +@Mapper +public interface PurchaseshortageDetailConvert { + + PurchaseshortageDetailConvert INSTANCE = Mappers.getMapper(PurchaseshortageDetailConvert.class); + + PurchaseshortageDetailDO convert(PurchaseshortageDetailCreateReqVO bean); + + PurchaseshortageDetailDO convert(PurchaseshortageDetailUpdateReqVO bean); + + PurchaseshortageDetailRespVO convert(PurchaseshortageDetailDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/dataobject/purchasereceiptRecord/PurchaseshortageDetailDO.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/dataobject/purchasereceiptRecord/PurchaseshortageDetailDO.java new file mode 100644 index 00000000..b7cb5b6d --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/dataobject/purchasereceiptRecord/PurchaseshortageDetailDO.java @@ -0,0 +1,211 @@ +package com.win.module.wms.dal.dataobject.purchasereceiptRecord; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.win.framework.mybatis.core.dataobject.BaseDO; +import lombok.*; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * 采购收货记录子 DO + * + * @author 超级管理员 + */ +@TableName("record_purchaseshortage_detail") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class PurchaseshortageDetailDO extends BaseDO { + + /** + * id + */ + @TableId + private Long id; + /** + * 从包装号 + */ + private String fromPackingNumber; + /** + * 到包装号 + */ + private String toPackingNumber; + /** + * 从器具号 + */ + private String fromContainerNumber; + /** + * 到器具号 + */ + private String toContainerNumber; + /** + * 从批次 + */ + private String fromBatch; + /** + * 替代批次 + */ + private String altBatch; + /** + * 到货日期 + */ + private LocalDateTime arriveDate; + /** + * 生产日期 + */ + private LocalDateTime produceDate; + /** + * 过期日期 + */ + private LocalDateTime expireDate; + /** + * 库存状态 + */ + private String inventoryStatus; + /** + * 从库位代码 + */ + private String fromLocationCode; + /** + * 到库位代码 + */ + private String toLocationCode; + /** + * 从库位组代码 + */ + private String fromLocationGroupCode; + /** + * 到库位组代码 + */ + private String toLocationGroupCode; + /** + * 从库区代码 + */ + private String fromAreaCodes; + /** + * 到库区代码 + */ + private String toAreaCodes; + /** + * 订单号 + */ + private String poNumber; + /** + * 订单行 + */ + private String poLine; + /** + * 标包数量 + */ + private BigDecimal stdPackQty; + /** + * 标包单位 + */ + private String stdPackUnit; + /** + * 数量 + */ + private BigDecimal qty; + /** + * 单位 + */ + private String uom; + /** + * 供应商计量数量 + */ + private BigDecimal supplierQty; + /** + * 供应商计量单位 + */ + private String supplierUom; + /** + * 转换率 + */ + private BigDecimal convertRate; + /** + * 目检结果 + */ + private String visualInspectResult; + /** + * 目检照片 + */ + private String visualInspectPhotos; + /** + * 不合格原因 + */ + private String failedReason; + /** + * 单价 + */ + private BigDecimal singlePrice; + /** + * 金额 + */ + private BigDecimal amount; + /** + * 任务明细ID + */ + private String jobDetailId; + /** + * 物品代码 + */ + private String itemCode; + /** + * 物品名称 + */ + private String itemName; + /** + * 物品描述1 + */ + private String itemDesc1; + /** + * 物品描述2 + */ + private String itemDesc2; + /** + * 主表ID + */ + private Long masterId; + /** + * 单据号 + */ + private String number; + /** + * 备注 + */ + private String remark; + /** + * 地点ID + */ + private String siteId; + /** + * 项目代码 + */ + private String projectCode; + /** + * 代码 + */ + private String code; + /** + * 接口类型 + */ + private String interfaceType; + /** + * 从货主代码 + */ + private String fromOwnerCode; + /** + * 到货主代码 + */ + private String toOwnerCode; + /** + * 到批次 + */ + private String toBatch; + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/purchasereceiptJob/PurchasereceiptJobMainMapper.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/purchasereceiptJob/PurchasereceiptJobMainMapper.java index 67b9103b..d8f4038d 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/purchasereceiptJob/PurchasereceiptJobMainMapper.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/purchasereceiptJob/PurchasereceiptJobMainMapper.java @@ -143,4 +143,17 @@ public interface PurchasereceiptJobMainMapper extends BaseMapperX types, String requestNumber) { + return selectCount(new LambdaQueryWrapperX() + .in(PurchasereceiptJobMainDO::getStatus, types) + .eq(PurchasereceiptJobMainDO::getRequestNumber, requestNumber)); + + } + } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/purchasereceiptRecord/PurchaseshortageDetailMapper.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/purchasereceiptRecord/PurchaseshortageDetailMapper.java new file mode 100644 index 00000000..34f9f08a --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/purchasereceiptRecord/PurchaseshortageDetailMapper.java @@ -0,0 +1,123 @@ +package com.win.module.wms.dal.mysql.purchasereceiptRecord; + +import com.win.framework.common.pojo.PageResult; +import com.win.framework.mybatis.core.mapper.BaseMapperX; +import com.win.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.win.module.wms.controller.purchasereceiptRecord.vo.PurchaseshortageDetailExportReqVO; +import com.win.module.wms.controller.purchasereceiptRecord.vo.PurchaseshortageDetailPageReqVO; +import com.win.module.wms.dal.dataobject.purchasereceiptRecord.PurchaseshortageDetailDO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 采购收货记录子 Mapper + * + * @author 超级管理员 + */ +@Mapper +public interface PurchaseshortageDetailMapper extends BaseMapperX { + + default PageResult selectPage(PurchaseshortageDetailPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(PurchaseshortageDetailDO::getFromPackingNumber, reqVO.getFromPackingNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getToPackingNumber, reqVO.getToPackingNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getFromContainerNumber, reqVO.getFromContainerNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getToContainerNumber, reqVO.getToContainerNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getFromBatch, reqVO.getFromBatch()) + .eqIfPresent(PurchaseshortageDetailDO::getAltBatch, reqVO.getAltBatch()) + .betweenIfPresent(PurchaseshortageDetailDO::getArriveDate, reqVO.getArriveDate()) + .betweenIfPresent(PurchaseshortageDetailDO::getProduceDate, reqVO.getProduceDate()) + .betweenIfPresent(PurchaseshortageDetailDO::getExpireDate, reqVO.getExpireDate()) + .eqIfPresent(PurchaseshortageDetailDO::getInventoryStatus, reqVO.getInventoryStatus()) + .eqIfPresent(PurchaseshortageDetailDO::getFromLocationCode, reqVO.getFromLocationCode()) + .eqIfPresent(PurchaseshortageDetailDO::getToLocationCode, reqVO.getToLocationCode()) + .eqIfPresent(PurchaseshortageDetailDO::getFromLocationGroupCode, reqVO.getFromLocationGroupCode()) + .eqIfPresent(PurchaseshortageDetailDO::getToLocationGroupCode, reqVO.getToLocationGroupCode()) + .eqIfPresent(PurchaseshortageDetailDO::getFromAreaCodes, reqVO.getFromAreaCodes()) + .eqIfPresent(PurchaseshortageDetailDO::getToAreaCodes, reqVO.getToAreaCodes()) + .eqIfPresent(PurchaseshortageDetailDO::getPoNumber, reqVO.getPoNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getPoLine, reqVO.getPoLine()) + .eqIfPresent(PurchaseshortageDetailDO::getStdPackQty, reqVO.getStdPackQty()) + .eqIfPresent(PurchaseshortageDetailDO::getStdPackUnit, reqVO.getStdPackUnit()) + .eqIfPresent(PurchaseshortageDetailDO::getQty, reqVO.getQty()) + .eqIfPresent(PurchaseshortageDetailDO::getUom, reqVO.getUom()) + .eqIfPresent(PurchaseshortageDetailDO::getSupplierQty, reqVO.getSupplierQty()) + .eqIfPresent(PurchaseshortageDetailDO::getSupplierUom, reqVO.getSupplierUom()) + .eqIfPresent(PurchaseshortageDetailDO::getConvertRate, reqVO.getConvertRate()) + .eqIfPresent(PurchaseshortageDetailDO::getVisualInspectResult, reqVO.getVisualInspectResult()) + .eqIfPresent(PurchaseshortageDetailDO::getVisualInspectPhotos, reqVO.getVisualInspectPhotos()) + .eqIfPresent(PurchaseshortageDetailDO::getFailedReason, reqVO.getFailedReason()) + .eqIfPresent(PurchaseshortageDetailDO::getSinglePrice, reqVO.getSinglePrice()) + .eqIfPresent(PurchaseshortageDetailDO::getAmount, reqVO.getAmount()) + .eqIfPresent(PurchaseshortageDetailDO::getJobDetailId, reqVO.getJobDetailId()) + .eqIfPresent(PurchaseshortageDetailDO::getItemCode, reqVO.getItemCode()) + .likeIfPresent(PurchaseshortageDetailDO::getItemName, reqVO.getItemName()) + .eqIfPresent(PurchaseshortageDetailDO::getItemDesc1, reqVO.getItemDesc1()) + .eqIfPresent(PurchaseshortageDetailDO::getItemDesc2, reqVO.getItemDesc2()) + .eqIfPresent(PurchaseshortageDetailDO::getMasterId, reqVO.getMasterId()) + .eqIfPresent(PurchaseshortageDetailDO::getNumber, reqVO.getNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(PurchaseshortageDetailDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(PurchaseshortageDetailDO::getSiteId, reqVO.getSiteId()) + .eqIfPresent(PurchaseshortageDetailDO::getProjectCode, reqVO.getProjectCode()) + .eqIfPresent(PurchaseshortageDetailDO::getCode, reqVO.getCode()) + .eqIfPresent(PurchaseshortageDetailDO::getInterfaceType, reqVO.getInterfaceType()) + .eqIfPresent(PurchaseshortageDetailDO::getFromOwnerCode, reqVO.getFromOwnerCode()) + .eqIfPresent(PurchaseshortageDetailDO::getToOwnerCode, reqVO.getToOwnerCode()) + .eqIfPresent(PurchaseshortageDetailDO::getToBatch, reqVO.getToBatch()) + .orderByDesc(PurchaseshortageDetailDO::getId)); + } + + default List selectList(PurchaseshortageDetailExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(PurchaseshortageDetailDO::getFromPackingNumber, reqVO.getFromPackingNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getToPackingNumber, reqVO.getToPackingNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getFromContainerNumber, reqVO.getFromContainerNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getToContainerNumber, reqVO.getToContainerNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getFromBatch, reqVO.getFromBatch()) + .eqIfPresent(PurchaseshortageDetailDO::getAltBatch, reqVO.getAltBatch()) + .betweenIfPresent(PurchaseshortageDetailDO::getArriveDate, reqVO.getArriveDate()) + .betweenIfPresent(PurchaseshortageDetailDO::getProduceDate, reqVO.getProduceDate()) + .betweenIfPresent(PurchaseshortageDetailDO::getExpireDate, reqVO.getExpireDate()) + .eqIfPresent(PurchaseshortageDetailDO::getInventoryStatus, reqVO.getInventoryStatus()) + .eqIfPresent(PurchaseshortageDetailDO::getFromLocationCode, reqVO.getFromLocationCode()) + .eqIfPresent(PurchaseshortageDetailDO::getToLocationCode, reqVO.getToLocationCode()) + .eqIfPresent(PurchaseshortageDetailDO::getFromLocationGroupCode, reqVO.getFromLocationGroupCode()) + .eqIfPresent(PurchaseshortageDetailDO::getToLocationGroupCode, reqVO.getToLocationGroupCode()) + .eqIfPresent(PurchaseshortageDetailDO::getFromAreaCodes, reqVO.getFromAreaCodes()) + .eqIfPresent(PurchaseshortageDetailDO::getToAreaCodes, reqVO.getToAreaCodes()) + .eqIfPresent(PurchaseshortageDetailDO::getPoNumber, reqVO.getPoNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getPoLine, reqVO.getPoLine()) + .eqIfPresent(PurchaseshortageDetailDO::getStdPackQty, reqVO.getStdPackQty()) + .eqIfPresent(PurchaseshortageDetailDO::getStdPackUnit, reqVO.getStdPackUnit()) + .eqIfPresent(PurchaseshortageDetailDO::getQty, reqVO.getQty()) + .eqIfPresent(PurchaseshortageDetailDO::getUom, reqVO.getUom()) + .eqIfPresent(PurchaseshortageDetailDO::getSupplierQty, reqVO.getSupplierQty()) + .eqIfPresent(PurchaseshortageDetailDO::getSupplierUom, reqVO.getSupplierUom()) + .eqIfPresent(PurchaseshortageDetailDO::getConvertRate, reqVO.getConvertRate()) + .eqIfPresent(PurchaseshortageDetailDO::getVisualInspectResult, reqVO.getVisualInspectResult()) + .eqIfPresent(PurchaseshortageDetailDO::getVisualInspectPhotos, reqVO.getVisualInspectPhotos()) + .eqIfPresent(PurchaseshortageDetailDO::getFailedReason, reqVO.getFailedReason()) + .eqIfPresent(PurchaseshortageDetailDO::getSinglePrice, reqVO.getSinglePrice()) + .eqIfPresent(PurchaseshortageDetailDO::getAmount, reqVO.getAmount()) + .eqIfPresent(PurchaseshortageDetailDO::getJobDetailId, reqVO.getJobDetailId()) + .eqIfPresent(PurchaseshortageDetailDO::getItemCode, reqVO.getItemCode()) + .likeIfPresent(PurchaseshortageDetailDO::getItemName, reqVO.getItemName()) + .eqIfPresent(PurchaseshortageDetailDO::getItemDesc1, reqVO.getItemDesc1()) + .eqIfPresent(PurchaseshortageDetailDO::getItemDesc2, reqVO.getItemDesc2()) + .eqIfPresent(PurchaseshortageDetailDO::getMasterId, reqVO.getMasterId()) + .eqIfPresent(PurchaseshortageDetailDO::getNumber, reqVO.getNumber()) + .eqIfPresent(PurchaseshortageDetailDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(PurchaseshortageDetailDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(PurchaseshortageDetailDO::getSiteId, reqVO.getSiteId()) + .eqIfPresent(PurchaseshortageDetailDO::getProjectCode, reqVO.getProjectCode()) + .eqIfPresent(PurchaseshortageDetailDO::getCode, reqVO.getCode()) + .eqIfPresent(PurchaseshortageDetailDO::getInterfaceType, reqVO.getInterfaceType()) + .eqIfPresent(PurchaseshortageDetailDO::getFromOwnerCode, reqVO.getFromOwnerCode()) + .eqIfPresent(PurchaseshortageDetailDO::getToOwnerCode, reqVO.getToOwnerCode()) + .eqIfPresent(PurchaseshortageDetailDO::getToBatch, reqVO.getToBatch()) + .orderByDesc(PurchaseshortageDetailDO::getId)); + } + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/purchasereceiptRequest/PurchasereceiptRequestMainMapper.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/purchasereceiptRequest/PurchasereceiptRequestMainMapper.java index 05418d7d..1abd85d4 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/purchasereceiptRequest/PurchasereceiptRequestMainMapper.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/dal/mysql/purchasereceiptRequest/PurchasereceiptRequestMainMapper.java @@ -60,8 +60,8 @@ public interface PurchasereceiptRequestMainMapper extends BaseMapperX selectList(PurchasereceiptRequestMainExportReqVO reqVO) { diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainService.java index b527f9e3..cff53e2c 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainService.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainService.java @@ -4,6 +4,7 @@ import com.win.framework.common.pojo.CustomConditions; import com.win.framework.common.pojo.PageResult; import com.win.module.wms.controller.purchasereceiptJob.vo.PurchasereceiptJobMainExportReqVO; import com.win.module.wms.controller.purchasereceiptJob.vo.PurchasereceiptJobMainPageReqVO; +import com.win.module.wms.controller.purchasereceiptJob.vo.PurchasereceiptJobMainUpdateReqVO; import com.win.module.wms.dal.dataobject.purchasereceiptJob.PurchasereceiptJobMainDO; import com.win.module.wms.dal.dataobject.supplierdeliverRecord.SupplierdeliverRecordDetailDO; import org.springframework.lang.Nullable; @@ -19,20 +20,6 @@ import java.util.Map; */ public interface PurchasereceiptJobMainService { - /** - * 承接任务 - * @param id - * @return - */ - Integer accept(Long id); - - /** - * 取消承接任务 - * @param id - * @return - */ - Integer cancelAccept(Long id); - /** * 获得用高级搜索户分页列表 * @@ -91,7 +78,7 @@ public interface PurchasereceiptJobMainService { * @param pstatus 状态 * @return 采购订单主列表 */ - public PurchasereceiptJobMainDO purchasereceiptJobMainDoStatusRight(String pnumber, String pstatus); + PurchasereceiptJobMainDO purchasereceiptJobMainDoStatusRight(String pnumber, String pstatus); /** *根据任务状态获取任务数量 @@ -99,4 +86,25 @@ public interface PurchasereceiptJobMainService { * @return */ Map getCountByStatus(@Nullable Collection types); + + /** + * 承接任务 + * @param id + * @return + */ + Integer accept(Long id); + + /** + * 取消承接任务 + * @param id + * @return + */ + Integer cancelAccept(Long id); + + /** + * 执行采购收货任务 + * @param purchasereceiptJobMainUpdateReqVO + * @return + */ + Integer excutePurchasereceiptJobMain(PurchasereceiptJobMainUpdateReqVO purchasereceiptJobMainUpdateReqVO); } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainServiceImpl.java index d67ab7f3..6cb82b57 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptJob/PurchasereceiptJobMainServiceImpl.java @@ -1,26 +1,45 @@ package com.win.module.wms.service.purchasereceiptJob; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.win.framework.common.exception.ServiceException; import com.win.framework.common.pojo.CustomConditions; import com.win.framework.common.pojo.PageResult; +import com.win.module.infra.api.trends.TrendsApi; +import com.win.module.infra.enums.TrendsTypeEnum; +import com.win.module.system.api.serialnumber.SerialNumberApi; import com.win.module.system.api.user.AdminUserApi; import com.win.module.system.api.user.dto.AdminUserRespDTO; +import com.win.module.system.enums.serialNumber.RuleCodeEnum; +import com.win.module.wms.controller.purchasereceiptJob.vo.PurchasereceiptJobDetailUpdateReqVO; import com.win.module.wms.controller.purchasereceiptJob.vo.PurchasereceiptJobMainExportReqVO; import com.win.module.wms.controller.purchasereceiptJob.vo.PurchasereceiptJobMainPageReqVO; +import com.win.module.wms.controller.purchasereceiptJob.vo.PurchasereceiptJobMainUpdateReqVO; +import com.win.module.wms.controller.transaction.vo.TransactionCreateReqVO; +import com.win.module.wms.dal.dataobject.purchasereceiptJob.PurchasereceiptJobDetailDO; import com.win.module.wms.dal.dataobject.purchasereceiptJob.PurchasereceiptJobMainDO; +import com.win.module.wms.dal.dataobject.purchasereceiptRecord.PurchasereceiptRecordDetailDO; +import com.win.module.wms.dal.dataobject.purchasereceiptRecord.PurchasereceiptRecordMainDO; +import com.win.module.wms.dal.dataobject.purchasereceiptRecord.PurchaseshortageDetailDO; +import com.win.module.wms.dal.dataobject.purchasereceiptRequest.PurchasereceiptRequestMainDO; import com.win.module.wms.dal.dataobject.supplierdeliverRecord.SupplierdeliverRecordDetailDO; import com.win.module.wms.dal.mysql.purchasereceiptJob.PurchasereceiptJobMainMapper; +import com.win.module.wms.dal.mysql.purchasereceiptRecord.PurchasereceiptRecordDetailMapper; +import com.win.module.wms.dal.mysql.purchasereceiptRecord.PurchasereceiptRecordMainMapper; +import com.win.module.wms.dal.mysql.purchasereceiptRecord.PurchaseshortageDetailMapper; +import com.win.module.wms.dal.mysql.purchasereceiptRequest.PurchasereceiptRequestMainMapper; +import com.win.module.wms.enums.job.JobStatusEnum; import com.win.module.wms.enums.job.JobStatusState; +import com.win.module.wms.enums.request.RequestStatusEnum; import com.win.module.wms.service.supplierdeliverRecord.SupplierdeliverRecordMainService; +import com.win.module.wms.service.transaction.TransactionService; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; import java.time.LocalDateTime; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; import static com.win.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @@ -38,41 +57,25 @@ public class PurchasereceiptJobMainServiceImpl implements PurchasereceiptJobMain @Resource private PurchasereceiptJobMainMapper purchasereceiptJobMainMapper; @Resource + private PurchasereceiptRecordMainMapper purchasereceiptRecordMainMapper; + @Resource + private PurchasereceiptRecordDetailMapper purchasereceiptRecordDetailMapper; + @Resource + private PurchaseshortageDetailMapper purchaseshortageDetailMapper; + @Resource private SupplierdeliverRecordMainService supplierdeliverRecordMainService; @Resource + private PurchasereceiptJobDetailService purchasereceiptJobDetailService; + @Resource + private PurchasereceiptRequestMainMapper purchasereceiptRequestMainMapper; + @Resource + private TransactionService transactionService; + @Resource private AdminUserApi userApi; - - @Override - public Integer accept(Long id) { - PurchasereceiptJobMainDO purchasereceiptJobMainDO = this.validatePurchasereceiptJobMainExists(id); - JobStatusState jobStatusState = new JobStatusState(purchasereceiptJobMainDO.getStatus()); - if(!jobStatusState.accept()) { - throw exception(PURCHASERECEIPT_JOB_MAIN_STATUS_ERROR); - } - Long userId = getLoginUserId(); - AdminUserRespDTO userRespDTO = userApi.getUser(userId); - purchasereceiptJobMainDO.setStatus(jobStatusState.getState().getCode()); - purchasereceiptJobMainDO.setAcceptUserId(String.valueOf(userId)); - purchasereceiptJobMainDO.setAcceptUserName(userRespDTO.getNickname()); - purchasereceiptJobMainDO.setAcceptTime(LocalDateTime.now()); - return purchasereceiptJobMainMapper.updateById(purchasereceiptJobMainDO); - } - - @Override - public Integer cancelAccept(Long id) { - PurchasereceiptJobMainDO purchasereceiptJobMainDO = this.validatePurchasereceiptJobMainExists(id); - JobStatusState jobStatusState = new JobStatusState(purchasereceiptJobMainDO.getStatus()); - if(!jobStatusState.cancelAccept()) { - throw exception(PURCHASERECEIPT_JOB_MAIN_STATUS_ERROR); - } - Long userId = getLoginUserId(); - AdminUserRespDTO userRespDTO = userApi.getUser(userId); - purchasereceiptJobMainDO.setStatus(jobStatusState.getState().getCode()); - purchasereceiptJobMainDO.setAcceptUserId(null); - purchasereceiptJobMainDO.setAcceptUserName(null); - purchasereceiptJobMainDO.setAcceptTime(null); - return purchasereceiptJobMainMapper.updateById(purchasereceiptJobMainDO); - } + @Resource + private TrendsApi trendsApi; + @Resource + private SerialNumberApi serialNumberApi; @Override public PageResult getPurchasereceiptJobMainSenior(CustomConditions conditions) { @@ -119,13 +122,13 @@ public class PurchasereceiptJobMainServiceImpl implements PurchasereceiptJobMain @Override public PurchasereceiptJobMainDO purchasereceiptJobMainDoStatusRight(String pnumber, String pstatus) { - QueryWrapper queryWrapper = new QueryWrapper(); + QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("number",pnumber); queryWrapper.eq("status",pstatus); PurchasereceiptJobMainDO purchasereceiptJobMainDO = purchasereceiptJobMainMapper.selectOne(queryWrapper); if(purchasereceiptJobMainDO != null){ return purchasereceiptJobMainDO; - }else { + } else { throw exception(PURCHASERECEIPT_JOB_MAIN_STATUS_ERROR); } } @@ -138,4 +141,137 @@ public class PurchasereceiptJobMainServiceImpl implements PurchasereceiptJobMain map.put("count", l.intValue()); return map; } + + @Override + @Transactional + public Integer accept(Long id) { + PurchasereceiptJobMainDO purchasereceiptJobMainDO = this.validatePurchasereceiptJobMainExists(id); + JobStatusState jobStatusState = new JobStatusState(purchasereceiptJobMainDO.getStatus()); + if(!jobStatusState.accept()) { + throw exception(PURCHASERECEIPT_JOB_MAIN_STATUS_ERROR); + } + Long userId = getLoginUserId(); + AdminUserRespDTO userRespDTO = userApi.getUser(userId); + purchasereceiptJobMainDO.setStatus(jobStatusState.getState().getCode()); + purchasereceiptJobMainDO.setAcceptUserId(String.valueOf(userId)); + purchasereceiptJobMainDO.setAcceptUserName(userRespDTO.getNickname()); + purchasereceiptJobMainDO.setAcceptTime(LocalDateTime.now()); + trendsApi.createTrends(id, "purchasereceiptJob", "承接了采购收货任务", TrendsTypeEnum.UPDATE); + return purchasereceiptJobMainMapper.updateById(purchasereceiptJobMainDO); + } + + @Override + @Transactional + public Integer cancelAccept(Long id) { + PurchasereceiptJobMainDO purchasereceiptJobMainDO = this.validatePurchasereceiptJobMainExists(id); + JobStatusState jobStatusState = new JobStatusState(purchasereceiptJobMainDO.getStatus()); + if(!jobStatusState.cancelAccept()) { + throw exception(PURCHASERECEIPT_JOB_MAIN_STATUS_ERROR); + } + purchasereceiptJobMainDO.setStatus(jobStatusState.getState().getCode()); + purchasereceiptJobMainDO.setAcceptUserId(null); + purchasereceiptJobMainDO.setAcceptUserName(null); + purchasereceiptJobMainDO.setAcceptTime(null); + trendsApi.createTrends(id, "purchasereceiptJob", "取消了采购收货任务", TrendsTypeEnum.UPDATE); + return purchasereceiptJobMainMapper.updateById(purchasereceiptJobMainDO); + } + + @Override + @Transactional + public Integer excutePurchasereceiptJobMain(PurchasereceiptJobMainUpdateReqVO purchasereceiptJobMainUpdateReqVO) { + //查询数据 + PurchasereceiptJobMainDO purchasereceiptJobMainDO = this.validatePurchasereceiptJobMainExists(purchasereceiptJobMainUpdateReqVO.getId()); + List subList = purchasereceiptJobDetailService.selectList(purchasereceiptJobMainDO.getId()); + JobStatusState jobStatusState = new JobStatusState(purchasereceiptJobMainDO.getStatus()); + boolean flag = jobStatusState.execute(); + if(!flag) { + throw new ServiceException(PURCHASERECEIPT_JOB_MAIN_STATUS_ERROR); + } + //更新完成信息 + Long userId = getLoginUserId(); + AdminUserRespDTO userRespDTO = userApi.getUser(userId); + purchasereceiptJobMainDO.setStatus(jobStatusState.getState().getCode()); + purchasereceiptJobMainDO.setCompleteTime(LocalDateTime.now()); + purchasereceiptJobMainDO.setCompleteUserId(String.valueOf(userRespDTO.getId())); + purchasereceiptJobMainDO.setCompleteUserName(userRespDTO.getNickname()); + //更新任务表状态 + purchasereceiptJobMainMapper.updateById(purchasereceiptJobMainDO); + //创建采购收货记录主表 + PurchasereceiptRecordMainDO purchasereceiptRecordMainDO = new PurchasereceiptRecordMainDO(); + BeanUtils.copyProperties(purchasereceiptJobMainDO, purchasereceiptRecordMainDO); + String number = serialNumberApi.generateCode(RuleCodeEnum.PURCHASE_RECEIPT_RECORD.getCode()); + purchasereceiptRecordMainDO.setNumber(number); + purchasereceiptRecordMainDO.setJobNumber(purchasereceiptJobMainDO.getNumber()); + purchasereceiptRecordMainDO.setId(null); + purchasereceiptRecordMainDO.setCreator(null); + purchasereceiptRecordMainDO.setCreateTime(null); + purchasereceiptRecordMainDO.setUpdater(null); + purchasereceiptRecordMainDO.setUpdateTime(null); + purchasereceiptRecordMainMapper.insert(purchasereceiptRecordMainDO); + //库存事务 + List transactionCreateReqVOList = new ArrayList<>(); + List purchasereceiptJobDetailUpdateReqVOList = purchasereceiptJobMainUpdateReqVO.getSubList(); + for(PurchasereceiptJobDetailDO purchasereceiptJobDetailDO : subList) { + boolean isExists = false; + for(PurchasereceiptJobDetailUpdateReqVO purchasereceiptJobDetailUpdateReqVO : purchasereceiptJobDetailUpdateReqVOList) { + if(purchasereceiptJobDetailDO.getId().equals(purchasereceiptJobDetailUpdateReqVO.getId())) { + //实际收货数量 + purchasereceiptJobDetailUpdateReqVO.setQty(purchasereceiptJobDetailUpdateReqVO.getHandleQty()); + isExists = true; + break; + } + } + if(isExists) { + PurchasereceiptRecordDetailDO purchasereceiptRecordDetailDO = new PurchasereceiptRecordDetailDO(); + BeanUtils.copyProperties(purchasereceiptJobDetailDO, purchasereceiptRecordDetailDO); + purchasereceiptRecordDetailDO.setMasterId(purchasereceiptRecordMainDO.getId()); + purchasereceiptRecordDetailDO.setNumber(number); + purchasereceiptRecordDetailDO.setJobDetailId(String.valueOf(purchasereceiptJobDetailDO.getId())); + purchasereceiptRecordDetailDO.setId(null); + purchasereceiptRecordDetailDO.setCreator(null); + purchasereceiptRecordDetailDO.setCreateTime(null); + purchasereceiptRecordDetailDO.setUpdater(null); + purchasereceiptRecordDetailDO.setUpdateTime(null); + purchasereceiptRecordDetailMapper.insert(purchasereceiptRecordDetailDO); + } else {//生成缺货记录 + PurchaseshortageDetailDO purchaseshortageDetailDO = new PurchaseshortageDetailDO(); + BeanUtils.copyProperties(purchasereceiptJobDetailDO, purchaseshortageDetailDO); + purchaseshortageDetailDO.setMasterId(purchasereceiptRecordMainDO.getId()); + purchaseshortageDetailDO.setNumber(number); + purchaseshortageDetailDO.setJobDetailId(String.valueOf(purchasereceiptJobDetailDO.getId())); + purchaseshortageDetailDO.setId(null); + purchaseshortageDetailDO.setCreator(null); + purchaseshortageDetailDO.setCreateTime(null); + purchaseshortageDetailDO.setUpdater(null); + purchaseshortageDetailDO.setUpdateTime(null); + purchaseshortageDetailMapper.insert(purchaseshortageDetailDO); + } + //添加库存事务list + TransactionCreateReqVO transactionCreateReqVO = new TransactionCreateReqVO(); + BeanUtils.copyProperties(purchasereceiptJobDetailDO, transactionCreateReqVO); + transactionCreateReqVO.setId(null); + //待确定库存事务信息 + + transactionCreateReqVOList.add(transactionCreateReqVO); + } + List typeList = new ArrayList<>(); + typeList.add(JobStatusEnum.PENDING.getCode()); + typeList.add(JobStatusEnum.PROCESSING.getCode()); + Long count = purchasereceiptJobMainMapper.selectListCount(typeList, purchasereceiptJobMainDO.getRequestNumber()); + PurchasereceiptRequestMainDO purchasereceiptRequestMainDO = purchasereceiptRequestMainMapper.selectByNumber(purchasereceiptJobMainDO.getRequestNumber()); + if(count == 0) {//申请单下所有任务全部完成 + purchasereceiptRequestMainDO.setStatus(RequestStatusEnum.COMPLETED.getCode()); + purchasereceiptRequestMainMapper.updateById(purchasereceiptRequestMainDO); + } else if(purchasereceiptRequestMainDO.getStatus().equals(RequestStatusEnum.HANDLING.getCode())) {//不分完成 + purchasereceiptRequestMainDO.setStatus(RequestStatusEnum.PARTIAL.getCode()); + purchasereceiptRequestMainMapper.updateById(purchasereceiptRequestMainDO); + } + //创建拣货申请 + + //增加库存事务 + transactionService.createTransaction(transactionCreateReqVOList); + //变更记录 + trendsApi.createTrends(purchasereceiptJobMainDO.getId(), "purchasereceiptJob", "执行了采购收货任务", TrendsTypeEnum.UPDATE); + return null; + } } diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptRecord/PurchaseshortageDetailService.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptRecord/PurchaseshortageDetailService.java new file mode 100644 index 00000000..e0d9e311 --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptRecord/PurchaseshortageDetailService.java @@ -0,0 +1,58 @@ +package com.win.module.wms.service.purchasereceiptRecord; + +import com.win.framework.common.pojo.PageResult; +import com.win.module.wms.controller.purchasereceiptRecord.vo.*; +import com.win.module.wms.dal.dataobject.purchasereceiptRecord.PurchaseshortageDetailDO; + +import javax.validation.Valid; +import java.util.Collection; +import java.util.List; + +/** + * 采购收货记录子 Service 接口 + * + * @author 超级管理员 + */ +public interface PurchaseshortageDetailService { + + /** + * 创建采购收货记录子 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createPurchaseshortageDetail(@Valid PurchaseshortageDetailCreateReqVO createReqVO); + + /** + * 获得采购收货记录子 + * + * @param id 编号 + * @return 采购收货记录子 + */ + PurchaseshortageDetailDO getPurchaseshortageDetail(Long id); + + /** + * 获得采购收货记录子列表 + * + * @param ids 编号 + * @return 采购收货记录子列表 + */ + List getPurchaseshortageDetailList(Collection ids); + + /** + * 获得采购收货记录子分页 + * + * @param pageReqVO 分页查询 + * @return 采购收货记录子分页 + */ + PageResult getPurchaseshortageDetailPage(PurchaseshortageDetailPageReqVO pageReqVO); + + /** + * 获得采购收货记录子列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 采购收货记录子列表 + */ + List getPurchaseshortageDetailList(PurchaseshortageDetailExportReqVO exportReqVO); + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptRecord/PurchaseshortageDetailServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptRecord/PurchaseshortageDetailServiceImpl.java new file mode 100644 index 00000000..87fa6590 --- /dev/null +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptRecord/PurchaseshortageDetailServiceImpl.java @@ -0,0 +1,58 @@ +package com.win.module.wms.service.purchasereceiptRecord; + +import com.win.framework.common.pojo.PageResult; +import com.win.module.wms.controller.purchasereceiptRecord.vo.PurchaseshortageDetailCreateReqVO; +import com.win.module.wms.controller.purchasereceiptRecord.vo.PurchaseshortageDetailExportReqVO; +import com.win.module.wms.controller.purchasereceiptRecord.vo.PurchaseshortageDetailPageReqVO; +import com.win.module.wms.convert.purchasereceiptRecord.PurchaseshortageDetailConvert; +import com.win.module.wms.dal.dataobject.purchasereceiptRecord.PurchaseshortageDetailDO; +import com.win.module.wms.dal.mysql.purchasereceiptRecord.PurchaseshortageDetailMapper; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; +import java.util.Collection; +import java.util.List; + +/** + * 采购收货记录子 Service 实现类 + * + * @author 超级管理员 + */ +@Service +@Validated +public class PurchaseshortageDetailServiceImpl implements PurchaseshortageDetailService { + + @Resource + private PurchaseshortageDetailMapper purchaseshortageDetailMapper; + + @Override + public Long createPurchaseshortageDetail(PurchaseshortageDetailCreateReqVO createReqVO) { + // 插入 + PurchaseshortageDetailDO purchaseshortageDetail = PurchaseshortageDetailConvert.INSTANCE.convert(createReqVO); + purchaseshortageDetailMapper.insert(purchaseshortageDetail); + // 返回 + return purchaseshortageDetail.getId(); + } + + @Override + public PurchaseshortageDetailDO getPurchaseshortageDetail(Long id) { + return purchaseshortageDetailMapper.selectById(id); + } + + @Override + public List getPurchaseshortageDetailList(Collection ids) { + return purchaseshortageDetailMapper.selectBatchIds(ids); + } + + @Override + public PageResult getPurchaseshortageDetailPage(PurchaseshortageDetailPageReqVO pageReqVO) { + return purchaseshortageDetailMapper.selectPage(pageReqVO); + } + + @Override + public List getPurchaseshortageDetailList(PurchaseshortageDetailExportReqVO exportReqVO) { + return purchaseshortageDetailMapper.selectList(exportReqVO); + } + +} diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptRequest/PurchasereceiptRequestMainServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptRequest/PurchasereceiptRequestMainServiceImpl.java index c987accc..bf38d0f3 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptRequest/PurchasereceiptRequestMainServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/purchasereceiptRequest/PurchasereceiptRequestMainServiceImpl.java @@ -34,6 +34,7 @@ import com.win.module.wms.dal.mysql.purchasereceiptJob.PurchasereceiptJobDetailM import com.win.module.wms.dal.mysql.purchasereceiptJob.PurchasereceiptJobMainMapper; import com.win.module.wms.dal.mysql.purchasereceiptRequest.PurchasereceiptRequestDetailMapper; import com.win.module.wms.dal.mysql.purchasereceiptRequest.PurchasereceiptRequestMainMapper; +import com.win.module.wms.enums.job.JobStatusEnum; import com.win.module.wms.enums.request.RequestStatusEnum; import com.win.module.wms.enums.request.RequestStatusState; import com.win.module.wms.service.itembasic.ItembasicService; @@ -136,7 +137,7 @@ public class PurchasereceiptRequestMainServiceImpl implements PurchasereceiptReq } purchasereceiptRequestDetailMapper.insertBatch(subDOList); //增加操作记录 - trendsApi.createTrends(requestsettingDO.getId(), "purchasereceiptRequestMain", "增加了采购收货", TrendsTypeEnum.CREATE); + trendsApi.createTrends(requestsettingDO.getId(), "purchasereceiptRequestMain", "增加了采购收货申请", TrendsTypeEnum.CREATE); // 返回 return mainDO.getId(); } @@ -246,7 +247,7 @@ public class PurchasereceiptRequestMainServiceImpl implements PurchasereceiptReq //if(existPurchasereceiptRequestMainDO == null && mode != 3) {//新增 purchasereceiptRequestMainMapper.insert(mainDO); //增加操作记录 - trendsApi.createTrends(mainDO.getId(), "purchasereceiptRequestMain", "导入了采购收货", TrendsTypeEnum.CREATE); + trendsApi.createTrends(mainDO.getId(), "purchasereceiptRequestMain", "导入了采购收货申请", TrendsTypeEnum.CREATE); String number = serialNumberApi.generateCode(RuleCodeEnum.PURCHASE_RECEIPT_REQUEST.getCode()); mainDO.setNumber(number); RequestsettingDO requestsettingDO = requestsettingService.selectRequestsettingExist("PurchaseReceiptRequest"); @@ -305,7 +306,7 @@ public class PurchasereceiptRequestMainServiceImpl implements PurchasereceiptReq throw new ServiceException(PURCHASERECEIPT_REQUEST_CANNOT_CLOSE); } mainDO.setStatus(requestStatusState.getState().getCode());//增加操作记录 - trendsApi.createTrends(id, "purchasereceiptRequest", "关闭了采购收货", TrendsTypeEnum.UPDATE); + trendsApi.createTrends(id, "purchasereceiptRequest", "关闭了采购收货申请", TrendsTypeEnum.UPDATE); return purchasereceiptRequestMainMapper.updateById(mainDO); } @@ -323,7 +324,7 @@ public class PurchasereceiptRequestMainServiceImpl implements PurchasereceiptReq if(RequestStatusEnum.HANDLING.getCode().equals(mainDO.getStatus())) { this.generateJob(mainDO, purchasereceiptRequestDetailMapper.selectList(mainDO.getId())); } - trendsApi.createTrends(id, "purchasereceiptRequest", "提交了采购收货", TrendsTypeEnum.UPDATE); + trendsApi.createTrends(id, "purchasereceiptRequest", "提交了采购收货申请", TrendsTypeEnum.UPDATE); return purchasereceiptRequestMainMapper.updateById(mainDO); } @@ -342,7 +343,7 @@ public class PurchasereceiptRequestMainServiceImpl implements PurchasereceiptReq if(RequestStatusEnum.HANDLING.getCode().equals(mainDO.getStatus())) { this.generateJob(mainDO, purchasereceiptRequestDetailMapper.selectList(mainDO.getId())); } - trendsApi.createTrends(id, "purchasereceiptRequest", "审批同意了采购收货", TrendsTypeEnum.UPDATE); + trendsApi.createTrends(id, "purchasereceiptRequest", "审批同意了采购收货申请", TrendsTypeEnum.UPDATE); return purchasereceiptRequestMainMapper.updateById(mainDO); } @@ -359,7 +360,7 @@ public class PurchasereceiptRequestMainServiceImpl implements PurchasereceiptReq mainDO.setStatus(requestStatusState.getState().getCode()); //调用执行方法 this.generateJob(mainDO, purchasereceiptRequestDetailMapper.selectList(mainDO.getId())); - trendsApi.createTrends(id, "purchasereceiptRequest", "执行了采购收货", TrendsTypeEnum.UPDATE); + trendsApi.createTrends(id, "purchasereceiptRequest", "执行了采购收货申请", TrendsTypeEnum.UPDATE); return purchasereceiptRequestMainMapper.updateById(mainDO); } @@ -374,7 +375,7 @@ public class PurchasereceiptRequestMainServiceImpl implements PurchasereceiptReq throw new ServiceException(PURCHASERECEIPT_REQUEST_CANNOT_CLOSE); } mainDO.setStatus(requestStatusState.getState().getCode()); - trendsApi.createTrends(id, "purchasereceiptRequest", "审批拒绝了采购收货", TrendsTypeEnum.UPDATE); + trendsApi.createTrends(id, "purchasereceiptRequest", "审批拒绝了采购收货申请", TrendsTypeEnum.UPDATE); return purchasereceiptRequestMainMapper.updateById(mainDO); } @@ -502,6 +503,7 @@ public class PurchasereceiptRequestMainServiceImpl implements PurchasereceiptReq //把任务插入数据库 for(PurchasereceiptJobMainCreateReqVO purchasereceiptJobMainCreateReqVO : purchasereceiptJobMainCreateReqVOList) { PurchasereceiptJobMainDO purchasereceiptJobMainDO = PurchasereceiptJobMainConvert.INSTANCE.convert(purchasereceiptJobMainCreateReqVO); + purchasereceiptJobMainDO.setStatus(JobStatusEnum.PENDING.getCode()); String number = serialNumberApi.generateCode(RuleCodeEnum.PURCHASE_RECEIPT_JOB.getCode()); purchasereceiptJobMainDO.setNumber(number); //增加业务类型