forked from sfms3.0/sfms3.0
1475 changed files with 104227 additions and 212 deletions
@ -0,0 +1,102 @@ |
|||
package com.win.module.wms.controller.backflushRecord; |
|||
|
|||
import com.win.module.wms.controller.backflushRecord.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.controller.backflushRecord.vo.*; |
|||
import com.win.module.wms.dal.dataobject.backflushRecord.BackflushRecordDetailbDO; |
|||
import com.win.module.wms.convert.backflushRecord.BackflushRecordDetailbConvert; |
|||
import com.win.module.wms.service.backflushRecord.BackflushRecordDetailbService; |
|||
|
|||
@Tag(name = "管理后台 - 制品收货记录子") |
|||
@RestController |
|||
@RequestMapping("/wms/backflush-record-detailb") |
|||
@Validated |
|||
public class BackflushRecordDetailbController { |
|||
|
|||
@Resource |
|||
private BackflushRecordDetailbService backflushRecordDetailbService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建制品收货记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:backflush-record-detailb:create')") |
|||
public CommonResult<String> createBackflushRecordDetailb(@Valid @RequestBody BackflushRecordDetailbCreateReqVO createReqVO) { |
|||
return success(backflushRecordDetailbService.createBackflushRecordDetailb(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新制品收货记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:backflush-record-detailb:update')") |
|||
public CommonResult<Boolean> updateBackflushRecordDetailb(@Valid @RequestBody BackflushRecordDetailbUpdateReqVO updateReqVO) { |
|||
backflushRecordDetailbService.updateBackflushRecordDetailb(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除制品收货记录子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:backflush-record-detailb:delete')") |
|||
public CommonResult<Boolean> deleteBackflushRecordDetailb(@RequestParam("id") String id) { |
|||
backflushRecordDetailbService.deleteBackflushRecordDetailb(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得制品收货记录子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:backflush-record-detailb:query')") |
|||
public CommonResult<BackflushRecordDetailbRespVO> getBackflushRecordDetailb(@RequestParam("id") String id) { |
|||
BackflushRecordDetailbDO backflushRecordDetailb = backflushRecordDetailbService.getBackflushRecordDetailb(id); |
|||
return success(BackflushRecordDetailbConvert.INSTANCE.convert(backflushRecordDetailb)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得制品收货记录子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:backflush-record-detailb:query')") |
|||
public CommonResult<List<BackflushRecordDetailbRespVO>> getBackflushRecordDetailbList(@RequestParam("ids") Collection<String> ids) { |
|||
List<BackflushRecordDetailbDO> list = backflushRecordDetailbService.getBackflushRecordDetailbList(ids); |
|||
return success(BackflushRecordDetailbConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得制品收货记录子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:backflush-record-detailb:query')") |
|||
public CommonResult<PageResult<BackflushRecordDetailbRespVO>> getBackflushRecordDetailbPage(@Valid BackflushRecordDetailbPageReqVO pageVO) { |
|||
PageResult<BackflushRecordDetailbDO> pageResult = backflushRecordDetailbService.getBackflushRecordDetailbPage(pageVO); |
|||
return success(BackflushRecordDetailbConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出制品收货记录子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:backflush-record-detailb:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportBackflushRecordDetailbExcel(@Valid BackflushRecordDetailbExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<BackflushRecordDetailbDO> list = backflushRecordDetailbService.getBackflushRecordDetailbList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<BackflushRecordDetailbExcelVO> datas = BackflushRecordDetailbConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "制品收货记录子.xls", "数据", BackflushRecordDetailbExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,89 @@ |
|||
package com.win.module.wms.controller.backflushRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
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; |
|||
|
|||
/** |
|||
* 制品收货记录子 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class BackflushRecordDetailbBaseVO { |
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
@Schema(description = "工序代码") |
|||
private String processCode; |
|||
|
|||
@Schema(description = "BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@Schema(description = "从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "物品代码不能为空") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "创建时间不能为空") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "创建者Id", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "创建者Id不能为空") |
|||
private String creator; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.backflushRecord.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 制品收货记录子创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BackflushRecordDetailbCreateReqVO extends BackflushRecordDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,87 @@ |
|||
package com.win.module.wms.controller.backflushRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 制品收货记录子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class BackflushRecordDetailbExcelVO { |
|||
|
|||
@ExcelProperty("工序代码") |
|||
private String processCode; |
|||
|
|||
@ExcelProperty("BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@ExcelProperty("包装号") |
|||
private String packingNumber; |
|||
|
|||
@ExcelProperty("批次") |
|||
private String batch; |
|||
|
|||
@ExcelProperty(value = "库存状态", converter = DictConvert.class) |
|||
@DictFormat("inventory_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String inventoryStatus; |
|||
|
|||
@ExcelProperty("从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@ExcelProperty("从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@ExcelProperty("从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@ExcelProperty("物品名称") |
|||
private String itemName; |
|||
|
|||
@ExcelProperty("物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@ExcelProperty("物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@ExcelProperty("项目代码") |
|||
private String projectCode; |
|||
|
|||
@ExcelProperty(value = "计量单位", converter = DictConvert.class) |
|||
@DictFormat("uom") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String uom; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("物品代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("创建者Id") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("代码") |
|||
private String code; |
|||
|
|||
@ExcelProperty(value = "接口类型", converter = DictConvert.class) |
|||
@DictFormat("interface_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String interfaceType; |
|||
|
|||
@ExcelProperty("任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,80 @@ |
|||
package com.win.module.wms.controller.backflushRecord.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 制品收货记录子 Excel 导出 Request VO,参数和 BackflushRecordDetailbPageReqVO 是一致的") |
|||
@Data |
|||
public class BackflushRecordDetailbExportReqVO { |
|||
|
|||
@Schema(description = "工序代码") |
|||
private String processCode; |
|||
|
|||
@Schema(description = "BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@Schema(description = "从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.win.module.wms.controller.backflushRecord.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 BackflushRecordDetailbPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "工序代码") |
|||
private String processCode; |
|||
|
|||
@Schema(description = "BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@Schema(description = "从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.backflushRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 制品收货记录子 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BackflushRecordDetailbRespVO extends BackflushRecordDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.backflushRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 制品收货记录子更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class BackflushRecordDetailbUpdateReqVO extends BackflushRecordDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,102 @@ |
|||
package com.win.module.wms.controller.consumeRecord; |
|||
|
|||
import com.win.module.wms.controller.consumeRecord.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.controller.consumeRecord.vo.*; |
|||
import com.win.module.wms.dal.dataobject.consumeRecord.ConsumeRecordDetailbDO; |
|||
import com.win.module.wms.convert.consumeRecord.ConsumeRecordDetailbConvert; |
|||
import com.win.module.wms.service.consumeRecord.ConsumeRecordDetailbService; |
|||
|
|||
@Tag(name = "管理后台 - 制品返修记录子") |
|||
@RestController |
|||
@RequestMapping("/wms/consume-record-detailb") |
|||
@Validated |
|||
public class ConsumeRecordDetailbController { |
|||
|
|||
@Resource |
|||
private ConsumeRecordDetailbService consumeRecordDetailbService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建制品返修记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:consume-record-detailb:create')") |
|||
public CommonResult<Long> createConsumeRecordDetailb(@Valid @RequestBody ConsumeRecordDetailbCreateReqVO createReqVO) { |
|||
return success(consumeRecordDetailbService.createConsumeRecordDetailb(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新制品返修记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:consume-record-detailb:update')") |
|||
public CommonResult<Boolean> updateConsumeRecordDetailb(@Valid @RequestBody ConsumeRecordDetailbUpdateReqVO updateReqVO) { |
|||
consumeRecordDetailbService.updateConsumeRecordDetailb(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除制品返修记录子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:consume-record-detailb:delete')") |
|||
public CommonResult<Boolean> deleteConsumeRecordDetailb(@RequestParam("id") Long id) { |
|||
consumeRecordDetailbService.deleteConsumeRecordDetailb(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得制品返修记录子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:consume-record-detailb:query')") |
|||
public CommonResult<ConsumeRecordDetailbRespVO> getConsumeRecordDetailb(@RequestParam("id") Long id) { |
|||
ConsumeRecordDetailbDO consumeRecordDetailb = consumeRecordDetailbService.getConsumeRecordDetailb(id); |
|||
return success(ConsumeRecordDetailbConvert.INSTANCE.convert(consumeRecordDetailb)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得制品返修记录子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:consume-record-detailb:query')") |
|||
public CommonResult<List<ConsumeRecordDetailbRespVO>> getConsumeRecordDetailbList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<ConsumeRecordDetailbDO> list = consumeRecordDetailbService.getConsumeRecordDetailbList(ids); |
|||
return success(ConsumeRecordDetailbConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得制品返修记录子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:consume-record-detailb:query')") |
|||
public CommonResult<PageResult<ConsumeRecordDetailbRespVO>> getConsumeRecordDetailbPage(@Valid ConsumeRecordDetailbPageReqVO pageVO) { |
|||
PageResult<ConsumeRecordDetailbDO> pageResult = consumeRecordDetailbService.getConsumeRecordDetailbPage(pageVO); |
|||
return success(ConsumeRecordDetailbConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出制品返修记录子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:consume-record-detailb:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportConsumeRecordDetailbExcel(@Valid ConsumeRecordDetailbExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<ConsumeRecordDetailbDO> list = consumeRecordDetailbService.getConsumeRecordDetailbList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<ConsumeRecordDetailbExcelVO> datas = ConsumeRecordDetailbConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "制品返修记录子.xls", "数据", ConsumeRecordDetailbExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.win.module.wms.controller.consumeRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
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; |
|||
|
|||
/** |
|||
* 制品返修记录子 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class ConsumeRecordDetailbBaseVO { |
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@Schema(description = "从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.consumeRecord.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 制品返修记录子创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ConsumeRecordDetailbCreateReqVO extends ConsumeRecordDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,78 @@ |
|||
package com.win.module.wms.controller.consumeRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 制品返修记录子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class ConsumeRecordDetailbExcelVO { |
|||
|
|||
@ExcelProperty("批次") |
|||
private String batch; |
|||
|
|||
@ExcelProperty("从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@ExcelProperty("从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@ExcelProperty("从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@ExcelProperty(value = "库存状态", converter = DictConvert.class) |
|||
@DictFormat("inventory_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String inventoryStatus; |
|||
|
|||
@ExcelProperty("包装号") |
|||
private String packingNumber; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("物品代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("创建者Id") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("物品名称") |
|||
private String itemName; |
|||
|
|||
@ExcelProperty("物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@ExcelProperty("物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@ExcelProperty("项目代码") |
|||
private String projectCode; |
|||
|
|||
@ExcelProperty(value = "计量单位", converter = DictConvert.class) |
|||
@DictFormat("uom") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String uom; |
|||
|
|||
@ExcelProperty("代码") |
|||
private String code; |
|||
|
|||
@ExcelProperty(value = "接口类型", converter = DictConvert.class) |
|||
@DictFormat("interface_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String interfaceType; |
|||
|
|||
} |
@ -0,0 +1,71 @@ |
|||
package com.win.module.wms.controller.consumeRecord.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 制品返修记录子 Excel 导出 Request VO,参数和 ConsumeRecordDetailbPageReqVO 是一致的") |
|||
@Data |
|||
public class ConsumeRecordDetailbExportReqVO { |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@Schema(description = "从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
} |
@ -0,0 +1,73 @@ |
|||
package com.win.module.wms.controller.consumeRecord.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 ConsumeRecordDetailbPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@Schema(description = "从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.consumeRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 制品返修记录子 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ConsumeRecordDetailbRespVO extends ConsumeRecordDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.consumeRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 制品返修记录子更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ConsumeRecordDetailbUpdateReqVO extends ConsumeRecordDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,102 @@ |
|||
package com.win.module.wms.controller.consumereRequest; |
|||
|
|||
import com.win.module.wms.controller.consumereRequest.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.controller.consumereRequest.vo.*; |
|||
import com.win.module.wms.dal.dataobject.consumereRequest.ConsumereRequestDetailbDO; |
|||
import com.win.module.wms.convert.consumereRequest.ConsumereRequestDetailbConvert; |
|||
import com.win.module.wms.service.consumereRequest.ConsumereRequestDetailbService; |
|||
|
|||
@Tag(name = "管理后台 - 制品返修申请子") |
|||
@RestController |
|||
@RequestMapping("/wms/consumere-request-detailb") |
|||
@Validated |
|||
public class ConsumereRequestDetailbController { |
|||
|
|||
@Resource |
|||
private ConsumereRequestDetailbService consumereRequestDetailbService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建制品返修申请子") |
|||
@PreAuthorize("@ss.hasPermission('wms:consumere-request-detailb:create')") |
|||
public CommonResult<String> createConsumereRequestDetailb(@Valid @RequestBody ConsumereRequestDetailbCreateReqVO createReqVO) { |
|||
return success(consumereRequestDetailbService.createConsumereRequestDetailb(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新制品返修申请子") |
|||
@PreAuthorize("@ss.hasPermission('wms:consumere-request-detailb:update')") |
|||
public CommonResult<Boolean> updateConsumereRequestDetailb(@Valid @RequestBody ConsumereRequestDetailbUpdateReqVO updateReqVO) { |
|||
consumereRequestDetailbService.updateConsumereRequestDetailb(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除制品返修申请子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:consumere-request-detailb:delete')") |
|||
public CommonResult<Boolean> deleteConsumereRequestDetailb(@RequestParam("id") String id) { |
|||
consumereRequestDetailbService.deleteConsumereRequestDetailb(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得制品返修申请子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:consumere-request-detailb:query')") |
|||
public CommonResult<ConsumereRequestDetailbRespVO> getConsumereRequestDetailb(@RequestParam("id") String id) { |
|||
ConsumereRequestDetailbDO consumereRequestDetailb = consumereRequestDetailbService.getConsumereRequestDetailb(id); |
|||
return success(ConsumereRequestDetailbConvert.INSTANCE.convert(consumereRequestDetailb)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得制品返修申请子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:consumere-request-detailb:query')") |
|||
public CommonResult<List<ConsumereRequestDetailbRespVO>> getConsumereRequestDetailbList(@RequestParam("ids") Collection<String> ids) { |
|||
List<ConsumereRequestDetailbDO> list = consumereRequestDetailbService.getConsumereRequestDetailbList(ids); |
|||
return success(ConsumereRequestDetailbConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得制品返修申请子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:consumere-request-detailb:query')") |
|||
public CommonResult<PageResult<ConsumereRequestDetailbRespVO>> getConsumereRequestDetailbPage(@Valid ConsumereRequestDetailbPageReqVO pageVO) { |
|||
PageResult<ConsumereRequestDetailbDO> pageResult = consumereRequestDetailbService.getConsumereRequestDetailbPage(pageVO); |
|||
return success(ConsumereRequestDetailbConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出制品返修申请子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:consumere-request-detailb:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportConsumereRequestDetailbExcel(@Valid ConsumereRequestDetailbExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<ConsumereRequestDetailbDO> list = consumereRequestDetailbService.getConsumereRequestDetailbList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<ConsumereRequestDetailbExcelVO> datas = ConsumereRequestDetailbConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "制品返修申请子.xls", "数据", ConsumereRequestDetailbExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,79 @@ |
|||
package com.win.module.wms.controller.consumereRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
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; |
|||
|
|||
/** |
|||
* 制品返修申请子 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class ConsumereRequestDetailbBaseVO { |
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
@Schema(description = "库存状态", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "库存状态不能为空") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "包装号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "包装号不能为空") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "批次", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "批次不能为空") |
|||
private String batch; |
|||
|
|||
@Schema(description = "从库位代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "从库位代码不能为空") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "物品代码不能为空") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "创建时间不能为空") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.consumereRequest.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 制品返修申请子创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ConsumereRequestDetailbCreateReqVO extends ConsumereRequestDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,71 @@ |
|||
package com.win.module.wms.controller.consumereRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 制品返修申请子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class ConsumereRequestDetailbExcelVO { |
|||
|
|||
@ExcelProperty("库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@ExcelProperty("包装号") |
|||
private String packingNumber; |
|||
|
|||
@ExcelProperty("批次") |
|||
private String batch; |
|||
|
|||
@ExcelProperty("从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("物品代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("创建者用户名") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("物品名称") |
|||
private String itemName; |
|||
|
|||
@ExcelProperty("物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@ExcelProperty("物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@ExcelProperty("项目代码") |
|||
private String projectCode; |
|||
|
|||
@ExcelProperty(value = "计量单位", converter = DictConvert.class) |
|||
@DictFormat("uom") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String uom; |
|||
|
|||
@ExcelProperty("最后更新时间") |
|||
private LocalDateTime updateTime; |
|||
|
|||
@ExcelProperty("最后更新者用户名") |
|||
private String updater; |
|||
|
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.win.module.wms.controller.consumereRequest.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 制品返修申请子 Excel 导出 Request VO,参数和 ConsumereRequestDetailbPageReqVO 是一致的") |
|||
@Data |
|||
public class ConsumereRequestDetailbExportReqVO { |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.win.module.wms.controller.consumereRequest.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 ConsumereRequestDetailbPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.consumereRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 制品返修申请子 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ConsumereRequestDetailbRespVO extends ConsumereRequestDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.consumereRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 制品返修申请子更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ConsumereRequestDetailbUpdateReqVO extends ConsumereRequestDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,102 @@ |
|||
package com.win.module.wms.controller.demandforecasting; |
|||
|
|||
import com.win.module.wms.controller.demandforecasting.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
|
|||
import com.win.module.wms.dal.dataobject.demandforecasting.DemandforecastingDetailDO; |
|||
import com.win.module.wms.convert.demandforecasting.DemandforecastingDetailConvert; |
|||
import com.win.module.wms.service.demandforecasting.DemandforecastingDetailService; |
|||
|
|||
@Tag(name = "管理后台 - 要货预测子") |
|||
@RestController |
|||
@RequestMapping("/wms/demandforecasting-detail") |
|||
@Validated |
|||
public class DemandforecastingDetailController { |
|||
|
|||
@Resource |
|||
private DemandforecastingDetailService demandforecastingDetailService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建要货预测子") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-detail:create')") |
|||
public CommonResult<Long> createDemandforecastingDetail(@Valid @RequestBody DemandforecastingDetailCreateReqVO createReqVO) { |
|||
return success(demandforecastingDetailService.createDemandforecastingDetail(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新要货预测子") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-detail:update')") |
|||
public CommonResult<Boolean> updateDemandforecastingDetail(@Valid @RequestBody DemandforecastingDetailUpdateReqVO updateReqVO) { |
|||
demandforecastingDetailService.updateDemandforecastingDetail(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除要货预测子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-detail:delete')") |
|||
public CommonResult<Boolean> deleteDemandforecastingDetail(@RequestParam("id") Long id) { |
|||
demandforecastingDetailService.deleteDemandforecastingDetail(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得要货预测子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-detail:query')") |
|||
public CommonResult<DemandforecastingDetailRespVO> getDemandforecastingDetail(@RequestParam("id") Long id) { |
|||
DemandforecastingDetailDO demandforecastingDetail = demandforecastingDetailService.getDemandforecastingDetail(id); |
|||
return success(DemandforecastingDetailConvert.INSTANCE.convert(demandforecastingDetail)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得要货预测子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-detail:query')") |
|||
public CommonResult<List<DemandforecastingDetailRespVO>> getDemandforecastingDetailList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<DemandforecastingDetailDO> list = demandforecastingDetailService.getDemandforecastingDetailList(ids); |
|||
return success(DemandforecastingDetailConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得要货预测子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-detail:query')") |
|||
public CommonResult<PageResult<DemandforecastingDetailRespVO>> getDemandforecastingDetailPage(@Valid DemandforecastingDetailPageReqVO pageVO) { |
|||
PageResult<DemandforecastingDetailDO> pageResult = demandforecastingDetailService.getDemandforecastingDetailPage(pageVO); |
|||
return success(DemandforecastingDetailConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出要货预测子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-detail:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportDemandforecastingDetailExcel(@Valid DemandforecastingDetailExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<DemandforecastingDetailDO> list = demandforecastingDetailService.getDemandforecastingDetailList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<DemandforecastingDetailExcelVO> datas = DemandforecastingDetailConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "要货预测子.xls", "数据", DemandforecastingDetailExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
package com.win.module.wms.controller.demandforecasting; |
|||
|
|||
import com.win.module.wms.controller.demandforecasting.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.dal.dataobject.demandforecasting.DemandforecastingMainDO; |
|||
import com.win.module.wms.convert.demandforecasting.DemandforecastingMainConvert; |
|||
import com.win.module.wms.service.demandforecasting.DemandforecastingMainService; |
|||
|
|||
@Tag(name = "管理后台 - 要货预测主") |
|||
@RestController |
|||
@RequestMapping("/wms/demandforecasting-main") |
|||
@Validated |
|||
public class DemandforecastingMainController { |
|||
|
|||
@Resource |
|||
private DemandforecastingMainService demandforecastingMainService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建要货预测主") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-main:create')") |
|||
public CommonResult<Long> createDemandforecastingMain(@Valid @RequestBody DemandforecastingMainCreateReqVO createReqVO) { |
|||
return success(demandforecastingMainService.createDemandforecastingMain(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新要货预测主") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-main:update')") |
|||
public CommonResult<Boolean> updateDemandforecastingMain(@Valid @RequestBody DemandforecastingMainUpdateReqVO updateReqVO) { |
|||
demandforecastingMainService.updateDemandforecastingMain(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除要货预测主") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-main:delete')") |
|||
public CommonResult<Boolean> deleteDemandforecastingMain(@RequestParam("id") Long id) { |
|||
demandforecastingMainService.deleteDemandforecastingMain(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得要货预测主") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-main:query')") |
|||
public CommonResult<DemandforecastingMainRespVO> getDemandforecastingMain(@RequestParam("id") Long id) { |
|||
DemandforecastingMainDO demandforecastingMain = demandforecastingMainService.getDemandforecastingMain(id); |
|||
return success(DemandforecastingMainConvert.INSTANCE.convert(demandforecastingMain)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得要货预测主列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-main:query')") |
|||
public CommonResult<List<DemandforecastingMainRespVO>> getDemandforecastingMainList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<DemandforecastingMainDO> list = demandforecastingMainService.getDemandforecastingMainList(ids); |
|||
return success(DemandforecastingMainConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得要货预测主分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-main:query')") |
|||
public CommonResult<PageResult<DemandforecastingMainRespVO>> getDemandforecastingMainPage(@Valid DemandforecastingMainPageReqVO pageVO) { |
|||
PageResult<DemandforecastingMainDO> pageResult = demandforecastingMainService.getDemandforecastingMainPage(pageVO); |
|||
return success(DemandforecastingMainConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出要货预测主 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:demandforecasting-main:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportDemandforecastingMainExcel(@Valid DemandforecastingMainExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<DemandforecastingMainDO> list = demandforecastingMainService.getDemandforecastingMainList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<DemandforecastingMainExcelVO> datas = DemandforecastingMainConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "要货预测主.xls", "数据", DemandforecastingMainExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,67 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
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; |
|||
|
|||
/** |
|||
* 要货预测子 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class DemandforecastingDetailBaseVO { |
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
@Schema(description = "预测时间类型", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "预测时间类型不能为空") |
|||
private String predictTimeType; |
|||
|
|||
@Schema(description = "预测日期", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "预测日期不能为空") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime predictTime; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "物品代码不能为空") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "计划数量") |
|||
private BigDecimal planQty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "是否可用") |
|||
private String available; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 要货预测子创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DemandforecastingDetailCreateReqVO extends DemandforecastingDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,63 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 要货预测子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class DemandforecastingDetailExcelVO { |
|||
|
|||
@ExcelProperty(value = "预测时间类型", converter = DictConvert.class) |
|||
@DictFormat("predict_time_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String predictTimeType; |
|||
|
|||
@ExcelProperty("预测日期") |
|||
private LocalDateTime predictTime; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("物品代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("创建者用户名") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("计划数量") |
|||
private BigDecimal planQty; |
|||
|
|||
@ExcelProperty(value = "计量单位", converter = DictConvert.class) |
|||
@DictFormat("uom") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String uom; |
|||
|
|||
@ExcelProperty("最后更新时间") |
|||
private LocalDateTime updateTime; |
|||
|
|||
@ExcelProperty("最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@ExcelProperty(value = "是否可用", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String available; |
|||
|
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 要货预测子 Excel 导出 Request VO,参数和 DemandforecastingDetailPageReqVO 是一致的") |
|||
@Data |
|||
public class DemandforecastingDetailExportReqVO { |
|||
|
|||
@Schema(description = "预测时间类型") |
|||
private String predictTimeType; |
|||
|
|||
@Schema(description = "预测日期") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] predictTime; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "计划数量") |
|||
private BigDecimal planQty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "是否可用") |
|||
private String available; |
|||
|
|||
} |
@ -0,0 +1,59 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 DemandforecastingDetailPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "预测时间类型") |
|||
private String predictTimeType; |
|||
|
|||
@Schema(description = "预测日期") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] predictTime; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "计划数量") |
|||
private BigDecimal planQty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "是否可用") |
|||
private String available; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 要货预测子 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DemandforecastingDetailRespVO extends DemandforecastingDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 要货预测子更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DemandforecastingDetailUpdateReqVO extends DemandforecastingDetailBaseVO { |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.win.module.wms.controller.demandforecasting.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.time.LocalDateTime; |
|||
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; |
|||
|
|||
/** |
|||
* 要货预测主 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class DemandforecastingMainBaseVO { |
|||
|
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
@Schema(description = "供应商代码") |
|||
private String supplierCode; |
|||
|
|||
@Schema(description = "版本号") |
|||
private String version; |
|||
|
|||
@Schema(description = "发布时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime publishTime; |
|||
|
|||
@Schema(description = "单据号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "单据号不能为空") |
|||
private String number; |
|||
|
|||
@Schema(description = "业务类型", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "业务类型不能为空") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "开始时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime beginTime; |
|||
|
|||
@Schema(description = "结束时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime endTime; |
|||
|
|||
@Schema(description = "状态") |
|||
private String status; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "是否可用", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "是否可用不能为空") |
|||
private String available; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 要货预测主创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DemandforecastingMainCreateReqVO extends DemandforecastingMainBaseVO { |
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.win.module.wms.controller.demandforecasting.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.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 要货预测主 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class DemandforecastingMainExcelVO { |
|||
|
|||
@ExcelProperty("供应商代码") |
|||
private String supplierCode; |
|||
|
|||
@ExcelProperty("版本号") |
|||
private String version; |
|||
|
|||
@ExcelProperty("发布时间") |
|||
private LocalDateTime publishTime; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("业务类型") |
|||
private String businessType; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("创建者用户名") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("开始时间") |
|||
private LocalDateTime beginTime; |
|||
|
|||
@ExcelProperty("结束时间") |
|||
private LocalDateTime endTime; |
|||
|
|||
@ExcelProperty("状态") |
|||
private String status; |
|||
|
|||
@ExcelProperty("最后更新时间") |
|||
private LocalDateTime updateTime; |
|||
|
|||
@ExcelProperty("最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@ExcelProperty(value = "是否可用", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String available; |
|||
|
|||
} |
@ -0,0 +1,63 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 要货预测主 Excel 导出 Request VO,参数和 DemandforecastingMainPageReqVO 是一致的") |
|||
@Data |
|||
public class DemandforecastingMainExportReqVO { |
|||
|
|||
@Schema(description = "供应商代码") |
|||
private String supplierCode; |
|||
|
|||
@Schema(description = "版本号") |
|||
private String version; |
|||
|
|||
@Schema(description = "发布时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] publishTime; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "业务类型") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "开始时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] beginTime; |
|||
|
|||
@Schema(description = "结束时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] endTime; |
|||
|
|||
@Schema(description = "状态") |
|||
private String status; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "是否可用") |
|||
private String available; |
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 DemandforecastingMainPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "供应商代码") |
|||
private String supplierCode; |
|||
|
|||
@Schema(description = "版本号") |
|||
private String version; |
|||
|
|||
@Schema(description = "发布时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] publishTime; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "业务类型") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "开始时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] beginTime; |
|||
|
|||
@Schema(description = "结束时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] endTime; |
|||
|
|||
@Schema(description = "状态") |
|||
private String status; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "是否可用") |
|||
private String available; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 要货预测主 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DemandforecastingMainRespVO extends DemandforecastingMainBaseVO { |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.demandforecasting.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 要货预测主更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DemandforecastingMainUpdateReqVO extends DemandforecastingMainBaseVO { |
|||
|
|||
} |
@ -0,0 +1,102 @@ |
|||
package com.win.module.wms.controller.dismantleRecord; |
|||
|
|||
import com.win.module.wms.controller.dismantleRecord.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.controller.dismantleRecord.vo.*; |
|||
import com.win.module.wms.dal.dataobject.dismantleRecord.DismantleRecordDetailbDO; |
|||
import com.win.module.wms.convert.dismantleRecord.DismantleRecordDetailbConvert; |
|||
import com.win.module.wms.service.dismantleRecord.DismantleRecordDetailbService; |
|||
|
|||
@Tag(name = "管理后台 - 制品拆解记录子") |
|||
@RestController |
|||
@RequestMapping("/wms/dismantle-record-detailb") |
|||
@Validated |
|||
public class DismantleRecordDetailbController { |
|||
|
|||
@Resource |
|||
private DismantleRecordDetailbService dismantleRecordDetailbService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建制品拆解记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-record-detailb:create')") |
|||
public CommonResult<Long> createDismantleRecordDetailb(@Valid @RequestBody DismantleRecordDetailbCreateReqVO createReqVO) { |
|||
return success(dismantleRecordDetailbService.createDismantleRecordDetailb(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新制品拆解记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-record-detailb:update')") |
|||
public CommonResult<Boolean> updateDismantleRecordDetailb(@Valid @RequestBody DismantleRecordDetailbUpdateReqVO updateReqVO) { |
|||
dismantleRecordDetailbService.updateDismantleRecordDetailb(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除制品拆解记录子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-record-detailb:delete')") |
|||
public CommonResult<Boolean> deleteDismantleRecordDetailb(@RequestParam("id") Long id) { |
|||
dismantleRecordDetailbService.deleteDismantleRecordDetailb(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得制品拆解记录子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-record-detailb:query')") |
|||
public CommonResult<DismantleRecordDetailbRespVO> getDismantleRecordDetailb(@RequestParam("id") Long id) { |
|||
DismantleRecordDetailbDO dismantleRecordDetailb = dismantleRecordDetailbService.getDismantleRecordDetailb(id); |
|||
return success(DismantleRecordDetailbConvert.INSTANCE.convert(dismantleRecordDetailb)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得制品拆解记录子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-record-detailb:query')") |
|||
public CommonResult<List<DismantleRecordDetailbRespVO>> getDismantleRecordDetailbList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<DismantleRecordDetailbDO> list = dismantleRecordDetailbService.getDismantleRecordDetailbList(ids); |
|||
return success(DismantleRecordDetailbConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得制品拆解记录子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-record-detailb:query')") |
|||
public CommonResult<PageResult<DismantleRecordDetailbRespVO>> getDismantleRecordDetailbPage(@Valid DismantleRecordDetailbPageReqVO pageVO) { |
|||
PageResult<DismantleRecordDetailbDO> pageResult = dismantleRecordDetailbService.getDismantleRecordDetailbPage(pageVO); |
|||
return success(DismantleRecordDetailbConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出制品拆解记录子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-record-detailb:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportDismantleRecordDetailbExcel(@Valid DismantleRecordDetailbExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<DismantleRecordDetailbDO> list = dismantleRecordDetailbService.getDismantleRecordDetailbList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<DismantleRecordDetailbExcelVO> datas = DismantleRecordDetailbConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "制品拆解记录子.xls", "数据", DismantleRecordDetailbExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
package com.win.module.wms.controller.dismantleRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
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; |
|||
|
|||
/** |
|||
* 制品拆解记录子 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class DismantleRecordDetailbBaseVO { |
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
@Schema(description = "工序代码") |
|||
private String processCode; |
|||
|
|||
@Schema(description = "BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "到库位代码") |
|||
private String toLocationCode; |
|||
|
|||
@Schema(description = "到库位组代码") |
|||
private String toLocationGroupCode; |
|||
|
|||
@Schema(description = "到库区代码") |
|||
private String toAreaCode; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.dismantleRecord.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 制品拆解记录子创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DismantleRecordDetailbCreateReqVO extends DismantleRecordDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,87 @@ |
|||
package com.win.module.wms.controller.dismantleRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 制品拆解记录子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class DismantleRecordDetailbExcelVO { |
|||
|
|||
@ExcelProperty("工序代码") |
|||
private String processCode; |
|||
|
|||
@ExcelProperty("BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@ExcelProperty("批次") |
|||
private String batch; |
|||
|
|||
@ExcelProperty("到库位代码") |
|||
private String toLocationCode; |
|||
|
|||
@ExcelProperty("到库位组代码") |
|||
private String toLocationGroupCode; |
|||
|
|||
@ExcelProperty("到库区代码") |
|||
private String toAreaCode; |
|||
|
|||
@ExcelProperty(value = "库存状态", converter = DictConvert.class) |
|||
@DictFormat("inventory_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String inventoryStatus; |
|||
|
|||
@ExcelProperty("包装号") |
|||
private String packingNumber; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("物品代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("创建者Id") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("物品名称") |
|||
private String itemName; |
|||
|
|||
@ExcelProperty("物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@ExcelProperty("物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@ExcelProperty("项目代码") |
|||
private String projectCode; |
|||
|
|||
@ExcelProperty(value = "计量单位", converter = DictConvert.class) |
|||
@DictFormat("uom") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String uom; |
|||
|
|||
@ExcelProperty("代码") |
|||
private String code; |
|||
|
|||
@ExcelProperty(value = "接口类型", converter = DictConvert.class) |
|||
@DictFormat("interface_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String interfaceType; |
|||
|
|||
@ExcelProperty("任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,80 @@ |
|||
package com.win.module.wms.controller.dismantleRecord.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 制品拆解记录子 Excel 导出 Request VO,参数和 DismantleRecordDetailbPageReqVO 是一致的") |
|||
@Data |
|||
public class DismantleRecordDetailbExportReqVO { |
|||
|
|||
@Schema(description = "工序代码") |
|||
private String processCode; |
|||
|
|||
@Schema(description = "BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "到库位代码") |
|||
private String toLocationCode; |
|||
|
|||
@Schema(description = "到库位组代码") |
|||
private String toLocationGroupCode; |
|||
|
|||
@Schema(description = "到库区代码") |
|||
private String toAreaCode; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.win.module.wms.controller.dismantleRecord.vo; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 DismantleRecordDetailbPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "工序代码") |
|||
private String processCode; |
|||
|
|||
@Schema(description = "BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "到库位代码") |
|||
private String toLocationCode; |
|||
|
|||
@Schema(description = "到库位组代码") |
|||
private String toLocationGroupCode; |
|||
|
|||
@Schema(description = "到库区代码") |
|||
private String toAreaCode; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.dismantleRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 制品拆解记录子 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DismantleRecordDetailbRespVO extends DismantleRecordDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.dismantleRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 制品拆解记录子更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DismantleRecordDetailbUpdateReqVO extends DismantleRecordDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,102 @@ |
|||
package com.win.module.wms.controller.dismantleRequest; |
|||
|
|||
import com.win.module.wms.controller.dismantleRequest.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.controller.dismantleRequest.vo.*; |
|||
import com.win.module.wms.dal.dataobject.dismantleRequest.DismantleRequestDetailbDO; |
|||
import com.win.module.wms.convert.dismantleRequest.DismantleRequestDetailbConvert; |
|||
import com.win.module.wms.service.dismantleRequest.DismantleRequestDetailbService; |
|||
|
|||
@Tag(name = "管理后台 - 制品拆解申请子") |
|||
@RestController |
|||
@RequestMapping("/wms/dismantle-request-detailb") |
|||
@Validated |
|||
public class DismantleRequestDetailbController { |
|||
|
|||
@Resource |
|||
private DismantleRequestDetailbService dismantleRequestDetailbService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建制品拆解申请子") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-request-detailb:create')") |
|||
public CommonResult<Long> createDismantleRequestDetailb(@Valid @RequestBody DismantleRequestDetailbCreateReqVO createReqVO) { |
|||
return success(dismantleRequestDetailbService.createDismantleRequestDetailb(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新制品拆解申请子") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-request-detailb:update')") |
|||
public CommonResult<Boolean> updateDismantleRequestDetailb(@Valid @RequestBody DismantleRequestDetailbUpdateReqVO updateReqVO) { |
|||
dismantleRequestDetailbService.updateDismantleRequestDetailb(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除制品拆解申请子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-request-detailb:delete')") |
|||
public CommonResult<Boolean> deleteDismantleRequestDetailb(@RequestParam("id") Long id) { |
|||
dismantleRequestDetailbService.deleteDismantleRequestDetailb(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得制品拆解申请子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-request-detailb:query')") |
|||
public CommonResult<DismantleRequestDetailbRespVO> getDismantleRequestDetailb(@RequestParam("id") Long id) { |
|||
DismantleRequestDetailbDO dismantleRequestDetailb = dismantleRequestDetailbService.getDismantleRequestDetailb(id); |
|||
return success(DismantleRequestDetailbConvert.INSTANCE.convert(dismantleRequestDetailb)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得制品拆解申请子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-request-detailb:query')") |
|||
public CommonResult<List<DismantleRequestDetailbRespVO>> getDismantleRequestDetailbList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<DismantleRequestDetailbDO> list = dismantleRequestDetailbService.getDismantleRequestDetailbList(ids); |
|||
return success(DismantleRequestDetailbConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得制品拆解申请子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-request-detailb:query')") |
|||
public CommonResult<PageResult<DismantleRequestDetailbRespVO>> getDismantleRequestDetailbPage(@Valid DismantleRequestDetailbPageReqVO pageVO) { |
|||
PageResult<DismantleRequestDetailbDO> pageResult = dismantleRequestDetailbService.getDismantleRequestDetailbPage(pageVO); |
|||
return success(DismantleRequestDetailbConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出制品拆解申请子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:dismantle-request-detailb:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportDismantleRequestDetailbExcel(@Valid DismantleRequestDetailbExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<DismantleRequestDetailbDO> list = dismantleRequestDetailbService.getDismantleRequestDetailbList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<DismantleRequestDetailbExcelVO> datas = DismantleRequestDetailbConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "制品拆解申请子.xls", "数据", DismantleRequestDetailbExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,76 @@ |
|||
package com.win.module.wms.controller.dismantleRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
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; |
|||
|
|||
/** |
|||
* 制品拆解申请子 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class DismantleRequestDetailbBaseVO { |
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
@Schema(description = "工序代码") |
|||
private String processCode; |
|||
|
|||
@Schema(description = "BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@Schema(description = "物品代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "物品代码不能为空") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "创建时间不能为空") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "地点ID") |
|||
private String siteId; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.dismantleRequest.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 制品拆解申请子创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DismantleRequestDetailbCreateReqVO extends DismantleRequestDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,72 @@ |
|||
package com.win.module.wms.controller.dismantleRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 制品拆解申请子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class DismantleRequestDetailbExcelVO { |
|||
|
|||
@ExcelProperty("工序代码") |
|||
private String processCode; |
|||
|
|||
@ExcelProperty("BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@ExcelProperty("物品代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("物品名称") |
|||
private String itemName; |
|||
|
|||
@ExcelProperty("物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@ExcelProperty("物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@ExcelProperty("项目代码") |
|||
private String projectCode; |
|||
|
|||
@ExcelProperty("数量") |
|||
private BigDecimal qty; |
|||
|
|||
@ExcelProperty(value = "计量单位", converter = DictConvert.class) |
|||
@DictFormat("uom") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String uom; |
|||
|
|||
@ExcelProperty("最后更新时间") |
|||
private LocalDateTime updateTime; |
|||
|
|||
@ExcelProperty("最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@ExcelProperty("创建者用户名") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("地点ID") |
|||
private String siteId; |
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.win.module.wms.controller.dismantleRequest.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 制品拆解申请子 Excel 导出 Request VO,参数和 DismantleRequestDetailbPageReqVO 是一致的") |
|||
@Data |
|||
public class DismantleRequestDetailbExportReqVO { |
|||
|
|||
@Schema(description = "工序代码") |
|||
private String processCode; |
|||
|
|||
@Schema(description = "BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "地点ID") |
|||
private String siteId; |
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
package com.win.module.wms.controller.dismantleRequest.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 DismantleRequestDetailbPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "工序代码") |
|||
private String processCode; |
|||
|
|||
@Schema(description = "BOM版本") |
|||
private String bomVersion; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "地点ID") |
|||
private String siteId; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.dismantleRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 制品拆解申请子 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DismantleRequestDetailbRespVO extends DismantleRequestDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.dismantleRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 制品拆解申请子更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class DismantleRequestDetailbUpdateReqVO extends DismantleRequestDetailbBaseVO { |
|||
|
|||
} |
@ -0,0 +1,102 @@ |
|||
package com.win.module.wms.controller.inspectJob; |
|||
|
|||
import com.win.module.wms.controller.inspectJob.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.controller.inspectJob.vo.*; |
|||
import com.win.module.wms.dal.dataobject.inspectJob.InspectJobDetailDO; |
|||
import com.win.module.wms.convert.inspectJob.InspectJobDetailConvert; |
|||
import com.win.module.wms.service.inspectJob.InspectJobDetailService; |
|||
|
|||
@Tag(name = "管理后台 - 检验任务子") |
|||
@RestController |
|||
@RequestMapping("/wms/inspect-job-detail") |
|||
@Validated |
|||
public class InspectJobDetailController { |
|||
|
|||
@Resource |
|||
private InspectJobDetailService inspectJobDetailService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建检验任务子") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-detail:create')") |
|||
public CommonResult<Long> createInspectJobDetail(@Valid @RequestBody InspectJobDetailCreateReqVO createReqVO) { |
|||
return success(inspectJobDetailService.createInspectJobDetail(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新检验任务子") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-detail:update')") |
|||
public CommonResult<Boolean> updateInspectJobDetail(@Valid @RequestBody InspectJobDetailUpdateReqVO updateReqVO) { |
|||
inspectJobDetailService.updateInspectJobDetail(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除检验任务子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-detail:delete')") |
|||
public CommonResult<Boolean> deleteInspectJobDetail(@RequestParam("id") Long id) { |
|||
inspectJobDetailService.deleteInspectJobDetail(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得检验任务子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-detail:query')") |
|||
public CommonResult<InspectJobDetailRespVO> getInspectJobDetail(@RequestParam("id") Long id) { |
|||
InspectJobDetailDO inspectJobDetail = inspectJobDetailService.getInspectJobDetail(id); |
|||
return success(InspectJobDetailConvert.INSTANCE.convert(inspectJobDetail)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得检验任务子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-detail:query')") |
|||
public CommonResult<List<InspectJobDetailRespVO>> getInspectJobDetailList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<InspectJobDetailDO> list = inspectJobDetailService.getInspectJobDetailList(ids); |
|||
return success(InspectJobDetailConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得检验任务子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-detail:query')") |
|||
public CommonResult<PageResult<InspectJobDetailRespVO>> getInspectJobDetailPage(@Valid InspectJobDetailPageReqVO pageVO) { |
|||
PageResult<InspectJobDetailDO> pageResult = inspectJobDetailService.getInspectJobDetailPage(pageVO); |
|||
return success(InspectJobDetailConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出检验任务子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-detail:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportInspectJobDetailExcel(@Valid InspectJobDetailExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<InspectJobDetailDO> list = inspectJobDetailService.getInspectJobDetailList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<InspectJobDetailExcelVO> datas = InspectJobDetailConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "检验任务子.xls", "数据", InspectJobDetailExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
package com.win.module.wms.controller.inspectJob; |
|||
|
|||
import com.win.module.wms.controller.inspectJob.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.dal.dataobject.inspectJob.InspectJobMainDO; |
|||
import com.win.module.wms.convert.inspectJob.InspectJobMainConvert; |
|||
import com.win.module.wms.service.inspectJob.InspectJobMainService; |
|||
|
|||
@Tag(name = "管理后台 - 检验任务主") |
|||
@RestController |
|||
@RequestMapping("/wms/inspect-job-main") |
|||
@Validated |
|||
public class InspectJobMainController { |
|||
|
|||
@Resource |
|||
private InspectJobMainService inspectJobMainService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建检验任务主") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-main:create')") |
|||
public CommonResult<Long> createInspectJobMain(@Valid @RequestBody InspectJobMainCreateReqVO createReqVO) { |
|||
return success(inspectJobMainService.createInspectJobMain(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新检验任务主") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-main:update')") |
|||
public CommonResult<Boolean> updateInspectJobMain(@Valid @RequestBody InspectJobMainUpdateReqVO updateReqVO) { |
|||
inspectJobMainService.updateInspectJobMain(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除检验任务主") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-main:delete')") |
|||
public CommonResult<Boolean> deleteInspectJobMain(@RequestParam("id") Long id) { |
|||
inspectJobMainService.deleteInspectJobMain(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得检验任务主") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-main:query')") |
|||
public CommonResult<InspectJobMainRespVO> getInspectJobMain(@RequestParam("id") Long id) { |
|||
InspectJobMainDO inspectJobMain = inspectJobMainService.getInspectJobMain(id); |
|||
return success(InspectJobMainConvert.INSTANCE.convert(inspectJobMain)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得检验任务主列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-main:query')") |
|||
public CommonResult<List<InspectJobMainRespVO>> getInspectJobMainList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<InspectJobMainDO> list = inspectJobMainService.getInspectJobMainList(ids); |
|||
return success(InspectJobMainConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得检验任务主分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-main:query')") |
|||
public CommonResult<PageResult<InspectJobMainRespVO>> getInspectJobMainPage(@Valid InspectJobMainPageReqVO pageVO) { |
|||
PageResult<InspectJobMainDO> pageResult = inspectJobMainService.getInspectJobMainPage(pageVO); |
|||
return success(InspectJobMainConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出检验任务主 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-job-main:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportInspectJobMainExcel(@Valid InspectJobMainExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<InspectJobMainDO> list = inspectJobMainService.getInspectJobMainList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<InspectJobMainExcelVO> datas = InspectJobMainConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "检验任务主.xls", "数据", InspectJobMainExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,73 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.math.BigDecimal; |
|||
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; |
|||
|
|||
/** |
|||
* 检验任务子 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class InspectJobDetailBaseVO { |
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
|
|||
@Schema(description = "包装号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "包装号不能为空") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "库存状态", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "库存状态不能为空") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "从库位代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "从库位代码不能为空") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 检验任务子创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectJobDetailCreateReqVO extends InspectJobDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,69 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.math.BigDecimal; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 检验任务子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class InspectJobDetailExcelVO { |
|||
|
|||
@ExcelProperty("包装号") |
|||
private String packingNumber; |
|||
|
|||
@ExcelProperty("器具号") |
|||
private String containerNumber; |
|||
|
|||
@ExcelProperty(value = "库存状态", converter = DictConvert.class) |
|||
@DictFormat("inventory_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String inventoryStatus; |
|||
|
|||
@ExcelProperty("从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("创建者Id") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("物品代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty("物品名称") |
|||
private String itemName; |
|||
|
|||
@ExcelProperty("物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@ExcelProperty("物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@ExcelProperty("项目代码") |
|||
private String projectCode; |
|||
|
|||
@ExcelProperty("数量") |
|||
private BigDecimal qty; |
|||
|
|||
@ExcelProperty(value = "计量单位", converter = DictConvert.class) |
|||
@DictFormat("uom") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String uom; |
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 检验任务子 Excel 导出 Request VO,参数和 InspectJobDetailPageReqVO 是一致的") |
|||
@Data |
|||
public class InspectJobDetailExportReqVO { |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 InspectJobDetailPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 检验任务子 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectJobDetailRespVO extends InspectJobDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 检验任务子更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectJobDetailUpdateReqVO extends InspectJobDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,189 @@ |
|||
package com.win.module.wms.controller.inspectJob.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.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
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; |
|||
|
|||
/** |
|||
* 检验任务主 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class InspectJobMainBaseVO { |
|||
|
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
|
|||
@Schema(description = "申请单号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "申请单号不能为空") |
|||
private String requestNumber; |
|||
|
|||
@Schema(description = "采购收货记录单号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "采购收货记录单号不能为空") |
|||
private String purchaseReceiptRecordNumber; |
|||
|
|||
@Schema(description = "供应商代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "供应商代码不能为空") |
|||
private String supplierCode; |
|||
|
|||
@Schema(description = "仓库代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "仓库代码不能为空") |
|||
private String warehouseCode; |
|||
|
|||
@Schema(description = "申请时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime requestTime; |
|||
|
|||
@Schema(description = "要求截止时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime requestDueTime; |
|||
|
|||
@Schema(description = "状态") |
|||
private String status; |
|||
|
|||
@Schema(description = "过期时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime expiredTime; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime updateTime; |
|||
|
|||
@Schema(description = "最后更新者Id") |
|||
private String updater; |
|||
|
|||
@Schema(description = "状态") |
|||
private String jobStageStatus; |
|||
|
|||
@Schema(description = "优先级") |
|||
private Integer priority; |
|||
|
|||
@Schema(description = "优先级增量") |
|||
private Integer priorityIncrement; |
|||
|
|||
@Schema(description = "部门") |
|||
private String departmentCode; |
|||
|
|||
@Schema(description = "承接人用户ID") |
|||
private String acceptUserId; |
|||
|
|||
@Schema(description = "承接时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime acceptTime; |
|||
|
|||
@Schema(description = "完成人用户ID") |
|||
private String completeUserId; |
|||
|
|||
@Schema(description = "完成时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime completeTime; |
|||
|
|||
@Schema(description = "从库位类型范围") |
|||
private String fromLocationTypes; |
|||
|
|||
@Schema(description = "到库位类型范围") |
|||
private String toLocationTypes; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "业务类型") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "创建者id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "订单号不能为空") |
|||
private String poUmber; |
|||
|
|||
@Schema(description = "订单行", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "订单行不能为空") |
|||
private String poLine; |
|||
|
|||
@Schema(description = "批次", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "批次不能为空") |
|||
private String batch; |
|||
|
|||
@Schema(description = "物品代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "物品代码不能为空") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "检验类型", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "检验类型不能为空") |
|||
private String inspectType; |
|||
|
|||
@Schema(description = "下一步检验动作", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "下一步检验动作不能为空") |
|||
private String nextAction; |
|||
|
|||
@Schema(description = "抽检方式") |
|||
private String sampleMethod; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "收货数量", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "收货数量不能为空") |
|||
private BigDecimal receiveQty; |
|||
|
|||
@Schema(description = "样品数量", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "样品数量不能为空") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@Schema(description = "货主代码") |
|||
private String owner; |
|||
|
|||
@Schema(description = "自动完成") |
|||
private String autoComplete; |
|||
|
|||
@Schema(description = "允许修改库位") |
|||
private String allowModifyLocation; |
|||
|
|||
@Schema(description = "允许修改数量") |
|||
private String allowModifyQty; |
|||
|
|||
@Schema(description = "允许大于推荐数量") |
|||
private String allowBiggerQty; |
|||
|
|||
@Schema(description = "允许小于推荐数量") |
|||
private String allowSmallerQty; |
|||
|
|||
@Schema(description = "允许修改库存状态") |
|||
private String allowModifyInventoryStatus; |
|||
|
|||
@Schema(description = "允许连续扫描") |
|||
private String allowContinuousScanning; |
|||
|
|||
@Schema(description = "允许部分完成") |
|||
private String allowPartialComplete; |
|||
|
|||
@Schema(description = "允许修改批次") |
|||
private String allowModifyBatch; |
|||
|
|||
@Schema(description = "允许修改箱码") |
|||
private String allowModifyPackingNumber; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 检验任务主创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectJobMainCreateReqVO extends InspectJobMainBaseVO { |
|||
|
|||
} |
@ -0,0 +1,183 @@ |
|||
package com.win.module.wms.controller.inspectJob.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.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 检验任务主 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class InspectJobMainExcelVO { |
|||
|
|||
@ExcelProperty("申请单号") |
|||
private String requestNumber; |
|||
|
|||
@ExcelProperty("采购收货记录单号") |
|||
private String purchaseReceiptRecordNumber; |
|||
|
|||
@ExcelProperty("供应商代码") |
|||
private String supplierCode; |
|||
|
|||
@ExcelProperty("仓库代码") |
|||
private String warehouseCode; |
|||
|
|||
@ExcelProperty("申请时间") |
|||
private LocalDateTime requestTime; |
|||
|
|||
@ExcelProperty("要求截止时间") |
|||
private LocalDateTime requestDueTime; |
|||
|
|||
@ExcelProperty(value = "状态", converter = DictConvert.class) |
|||
@DictFormat("job_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String status; |
|||
|
|||
@ExcelProperty("过期时间") |
|||
private LocalDateTime expiredTime; |
|||
|
|||
@ExcelProperty("最后更新时间") |
|||
private LocalDateTime updateTime; |
|||
|
|||
@ExcelProperty("最后更新者Id") |
|||
private String updater; |
|||
|
|||
@ExcelProperty(value = "状态", converter = DictConvert.class) |
|||
@DictFormat("job_stage_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String jobStageStatus; |
|||
|
|||
@ExcelProperty("优先级") |
|||
private Integer priority; |
|||
|
|||
@ExcelProperty("优先级增量") |
|||
private Integer priorityIncrement; |
|||
|
|||
@ExcelProperty("部门") |
|||
private String departmentCode; |
|||
|
|||
@ExcelProperty("承接人用户ID") |
|||
private String acceptUserId; |
|||
|
|||
@ExcelProperty("承接时间") |
|||
private LocalDateTime acceptTime; |
|||
|
|||
@ExcelProperty("完成人用户ID") |
|||
private String completeUserId; |
|||
|
|||
@ExcelProperty("完成时间") |
|||
private LocalDateTime completeTime; |
|||
|
|||
@ExcelProperty("从库位类型范围") |
|||
private String fromLocationTypes; |
|||
|
|||
@ExcelProperty("到库位类型范围") |
|||
private String toLocationTypes; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("业务类型") |
|||
private String businessType; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("创建者id") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("订单号") |
|||
private String poUmber; |
|||
|
|||
@ExcelProperty("订单行") |
|||
private String poLine; |
|||
|
|||
@ExcelProperty("批次") |
|||
private String batch; |
|||
|
|||
@ExcelProperty("物品代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty(value = "检验类型", converter = DictConvert.class) |
|||
@DictFormat("inspect_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String inspectType; |
|||
|
|||
@ExcelProperty(value = "下一步检验动作", converter = DictConvert.class) |
|||
@DictFormat("next_action") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String nextAction; |
|||
|
|||
@ExcelProperty(value = "抽检方式", converter = DictConvert.class) |
|||
@DictFormat("sample_method") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String sampleMethod; |
|||
|
|||
@ExcelProperty(value = "计量单位", converter = DictConvert.class) |
|||
@DictFormat("uom") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String uom; |
|||
|
|||
@ExcelProperty("收货数量") |
|||
private BigDecimal receiveQty; |
|||
|
|||
@ExcelProperty("样品数量") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@ExcelProperty("货主代码") |
|||
private String owner; |
|||
|
|||
@ExcelProperty(value = "自动完成", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String autoComplete; |
|||
|
|||
@ExcelProperty(value = "允许修改库位", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String allowModifyLocation; |
|||
|
|||
@ExcelProperty(value = "允许修改数量", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String allowModifyQty; |
|||
|
|||
@ExcelProperty(value = "允许大于推荐数量", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String allowBiggerQty; |
|||
|
|||
@ExcelProperty(value = "允许小于推荐数量", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String allowSmallerQty; |
|||
|
|||
@ExcelProperty(value = "允许修改库存状态", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String allowModifyInventoryStatus; |
|||
|
|||
@ExcelProperty(value = "允许连续扫描", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String allowContinuousScanning; |
|||
|
|||
@ExcelProperty(value = "允许部分完成", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String allowPartialComplete; |
|||
|
|||
@ExcelProperty(value = "允许修改批次", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String allowModifyBatch; |
|||
|
|||
@ExcelProperty(value = "允许修改箱码", converter = DictConvert.class) |
|||
@DictFormat("true_false") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String allowModifyPackingNumber; |
|||
|
|||
} |
@ -0,0 +1,163 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 检验任务主 Excel 导出 Request VO,参数和 InspectJobMainPageReqVO 是一致的") |
|||
@Data |
|||
public class InspectJobMainExportReqVO { |
|||
|
|||
@Schema(description = "申请单号") |
|||
private String requestNumber; |
|||
|
|||
@Schema(description = "采购收货记录单号") |
|||
private String purchaseReceiptRecordNumber; |
|||
|
|||
@Schema(description = "供应商代码") |
|||
private String supplierCode; |
|||
|
|||
@Schema(description = "仓库代码") |
|||
private String warehouseCode; |
|||
|
|||
@Schema(description = "申请时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] requestTime; |
|||
|
|||
@Schema(description = "要求截止时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] requestDueTime; |
|||
|
|||
@Schema(description = "状态") |
|||
private String status; |
|||
|
|||
@Schema(description = "过期时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] expiredTime; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者Id") |
|||
private String updater; |
|||
|
|||
@Schema(description = "状态") |
|||
private String jobStageStatus; |
|||
|
|||
@Schema(description = "优先级") |
|||
private Integer priority; |
|||
|
|||
@Schema(description = "优先级增量") |
|||
private Integer priorityIncrement; |
|||
|
|||
@Schema(description = "部门") |
|||
private String departmentCode; |
|||
|
|||
@Schema(description = "承接人用户ID") |
|||
private String acceptUserId; |
|||
|
|||
@Schema(description = "承接时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] acceptTime; |
|||
|
|||
@Schema(description = "完成人用户ID") |
|||
private String completeUserId; |
|||
|
|||
@Schema(description = "完成时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] completeTime; |
|||
|
|||
@Schema(description = "从库位类型范围") |
|||
private String fromLocationTypes; |
|||
|
|||
@Schema(description = "到库位类型范围") |
|||
private String toLocationTypes; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "业务类型") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "订单号") |
|||
private String poUmber; |
|||
|
|||
@Schema(description = "订单行") |
|||
private String poLine; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "检验类型") |
|||
private String inspectType; |
|||
|
|||
@Schema(description = "下一步检验动作") |
|||
private String nextAction; |
|||
|
|||
@Schema(description = "抽检方式") |
|||
private String sampleMethod; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "收货数量") |
|||
private BigDecimal receiveQty; |
|||
|
|||
@Schema(description = "样品数量") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@Schema(description = "货主代码") |
|||
private String owner; |
|||
|
|||
@Schema(description = "自动完成") |
|||
private String autoComplete; |
|||
|
|||
@Schema(description = "允许修改库位") |
|||
private String allowModifyLocation; |
|||
|
|||
@Schema(description = "允许修改数量") |
|||
private String allowModifyQty; |
|||
|
|||
@Schema(description = "允许大于推荐数量") |
|||
private String allowBiggerQty; |
|||
|
|||
@Schema(description = "允许小于推荐数量") |
|||
private String allowSmallerQty; |
|||
|
|||
@Schema(description = "允许修改库存状态") |
|||
private String allowModifyInventoryStatus; |
|||
|
|||
@Schema(description = "允许连续扫描") |
|||
private String allowContinuousScanning; |
|||
|
|||
@Schema(description = "允许部分完成") |
|||
private String allowPartialComplete; |
|||
|
|||
@Schema(description = "允许修改批次") |
|||
private String allowModifyBatch; |
|||
|
|||
@Schema(description = "允许修改箱码") |
|||
private String allowModifyPackingNumber; |
|||
|
|||
} |
@ -0,0 +1,165 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 InspectJobMainPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "申请单号") |
|||
private String requestNumber; |
|||
|
|||
@Schema(description = "采购收货记录单号") |
|||
private String purchaseReceiptRecordNumber; |
|||
|
|||
@Schema(description = "供应商代码") |
|||
private String supplierCode; |
|||
|
|||
@Schema(description = "仓库代码") |
|||
private String warehouseCode; |
|||
|
|||
@Schema(description = "申请时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] requestTime; |
|||
|
|||
@Schema(description = "要求截止时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] requestDueTime; |
|||
|
|||
@Schema(description = "状态") |
|||
private String status; |
|||
|
|||
@Schema(description = "过期时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] expiredTime; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者Id") |
|||
private String updater; |
|||
|
|||
@Schema(description = "状态") |
|||
private String jobStageStatus; |
|||
|
|||
@Schema(description = "优先级") |
|||
private Integer priority; |
|||
|
|||
@Schema(description = "优先级增量") |
|||
private Integer priorityIncrement; |
|||
|
|||
@Schema(description = "部门") |
|||
private String departmentCode; |
|||
|
|||
@Schema(description = "承接人用户ID") |
|||
private String acceptUserId; |
|||
|
|||
@Schema(description = "承接时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] acceptTime; |
|||
|
|||
@Schema(description = "完成人用户ID") |
|||
private String completeUserId; |
|||
|
|||
@Schema(description = "完成时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] completeTime; |
|||
|
|||
@Schema(description = "从库位类型范围") |
|||
private String fromLocationTypes; |
|||
|
|||
@Schema(description = "到库位类型范围") |
|||
private String toLocationTypes; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "业务类型") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "订单号") |
|||
private String poUmber; |
|||
|
|||
@Schema(description = "订单行") |
|||
private String poLine; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "检验类型") |
|||
private String inspectType; |
|||
|
|||
@Schema(description = "下一步检验动作") |
|||
private String nextAction; |
|||
|
|||
@Schema(description = "抽检方式") |
|||
private String sampleMethod; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "收货数量") |
|||
private BigDecimal receiveQty; |
|||
|
|||
@Schema(description = "样品数量") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@Schema(description = "货主代码") |
|||
private String owner; |
|||
|
|||
@Schema(description = "自动完成") |
|||
private String autoComplete; |
|||
|
|||
@Schema(description = "允许修改库位") |
|||
private String allowModifyLocation; |
|||
|
|||
@Schema(description = "允许修改数量") |
|||
private String allowModifyQty; |
|||
|
|||
@Schema(description = "允许大于推荐数量") |
|||
private String allowBiggerQty; |
|||
|
|||
@Schema(description = "允许小于推荐数量") |
|||
private String allowSmallerQty; |
|||
|
|||
@Schema(description = "允许修改库存状态") |
|||
private String allowModifyInventoryStatus; |
|||
|
|||
@Schema(description = "允许连续扫描") |
|||
private String allowContinuousScanning; |
|||
|
|||
@Schema(description = "允许部分完成") |
|||
private String allowPartialComplete; |
|||
|
|||
@Schema(description = "允许修改批次") |
|||
private String allowModifyBatch; |
|||
|
|||
@Schema(description = "允许修改箱码") |
|||
private String allowModifyPackingNumber; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 检验任务主 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectJobMainRespVO extends InspectJobMainBaseVO { |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectJob.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 检验任务主更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectJobMainUpdateReqVO extends InspectJobMainBaseVO { |
|||
|
|||
} |
@ -0,0 +1,102 @@ |
|||
package com.win.module.wms.controller.inspectRecord; |
|||
|
|||
import com.win.module.wms.controller.inspectRecord.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.controller.inspectRecord.vo.*; |
|||
import com.win.module.wms.dal.dataobject.inspectRecord.InspectRecordDetailDO; |
|||
import com.win.module.wms.convert.inspectRecord.InspectRecordDetailConvert; |
|||
import com.win.module.wms.service.inspectRecord.InspectRecordDetailService; |
|||
|
|||
@Tag(name = "管理后台 - 检验记录子") |
|||
@RestController |
|||
@RequestMapping("/wms/inspect-record-detail") |
|||
@Validated |
|||
public class InspectRecordDetailController { |
|||
|
|||
@Resource |
|||
private InspectRecordDetailService inspectRecordDetailService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建检验记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-detail:create')") |
|||
public CommonResult<Long> createInspectRecordDetail(@Valid @RequestBody InspectRecordDetailCreateReqVO createReqVO) { |
|||
return success(inspectRecordDetailService.createInspectRecordDetail(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新检验记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-detail:update')") |
|||
public CommonResult<Boolean> updateInspectRecordDetail(@Valid @RequestBody InspectRecordDetailUpdateReqVO updateReqVO) { |
|||
inspectRecordDetailService.updateInspectRecordDetail(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除检验记录子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-detail:delete')") |
|||
public CommonResult<Boolean> deleteInspectRecordDetail(@RequestParam("id") Long id) { |
|||
inspectRecordDetailService.deleteInspectRecordDetail(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得检验记录子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-detail:query')") |
|||
public CommonResult<InspectRecordDetailRespVO> getInspectRecordDetail(@RequestParam("id") Long id) { |
|||
InspectRecordDetailDO inspectRecordDetail = inspectRecordDetailService.getInspectRecordDetail(id); |
|||
return success(InspectRecordDetailConvert.INSTANCE.convert(inspectRecordDetail)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得检验记录子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-detail:query')") |
|||
public CommonResult<List<InspectRecordDetailRespVO>> getInspectRecordDetailList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<InspectRecordDetailDO> list = inspectRecordDetailService.getInspectRecordDetailList(ids); |
|||
return success(InspectRecordDetailConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得检验记录子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-detail:query')") |
|||
public CommonResult<PageResult<InspectRecordDetailRespVO>> getInspectRecordDetailPage(@Valid InspectRecordDetailPageReqVO pageVO) { |
|||
PageResult<InspectRecordDetailDO> pageResult = inspectRecordDetailService.getInspectRecordDetailPage(pageVO); |
|||
return success(InspectRecordDetailConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出检验记录子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-detail:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportInspectRecordDetailExcel(@Valid InspectRecordDetailExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<InspectRecordDetailDO> list = inspectRecordDetailService.getInspectRecordDetailList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<InspectRecordDetailExcelVO> datas = InspectRecordDetailConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "检验记录子.xls", "数据", InspectRecordDetailExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
package com.win.module.wms.controller.inspectRecord; |
|||
|
|||
import com.win.module.wms.controller.inspectRecord.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.dal.dataobject.inspectRecord.InspectRecordMainDO; |
|||
import com.win.module.wms.convert.inspectRecord.InspectRecordMainConvert; |
|||
import com.win.module.wms.service.inspectRecord.InspectRecordMainService; |
|||
|
|||
@Tag(name = "管理后台 - 检验记录主") |
|||
@RestController |
|||
@RequestMapping("/wms/inspect-record-main") |
|||
@Validated |
|||
public class InspectRecordMainController { |
|||
|
|||
@Resource |
|||
private InspectRecordMainService inspectRecordMainService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建检验记录主") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-main:create')") |
|||
public CommonResult<Long> createInspectRecordMain(@Valid @RequestBody InspectRecordMainCreateReqVO createReqVO) { |
|||
return success(inspectRecordMainService.createInspectRecordMain(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新检验记录主") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-main:update')") |
|||
public CommonResult<Boolean> updateInspectRecordMain(@Valid @RequestBody InspectRecordMainUpdateReqVO updateReqVO) { |
|||
inspectRecordMainService.updateInspectRecordMain(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除检验记录主") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-main:delete')") |
|||
public CommonResult<Boolean> deleteInspectRecordMain(@RequestParam("id") Long id) { |
|||
inspectRecordMainService.deleteInspectRecordMain(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得检验记录主") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-main:query')") |
|||
public CommonResult<InspectRecordMainRespVO> getInspectRecordMain(@RequestParam("id") Long id) { |
|||
InspectRecordMainDO inspectRecordMain = inspectRecordMainService.getInspectRecordMain(id); |
|||
return success(InspectRecordMainConvert.INSTANCE.convert(inspectRecordMain)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得检验记录主列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-main:query')") |
|||
public CommonResult<List<InspectRecordMainRespVO>> getInspectRecordMainList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<InspectRecordMainDO> list = inspectRecordMainService.getInspectRecordMainList(ids); |
|||
return success(InspectRecordMainConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得检验记录主分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-main:query')") |
|||
public CommonResult<PageResult<InspectRecordMainRespVO>> getInspectRecordMainPage(@Valid InspectRecordMainPageReqVO pageVO) { |
|||
PageResult<InspectRecordMainDO> pageResult = inspectRecordMainService.getInspectRecordMainPage(pageVO); |
|||
return success(InspectRecordMainConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出检验记录主 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-record-main:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportInspectRecordMainExcel(@Valid InspectRecordMainExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<InspectRecordMainDO> list = inspectRecordMainService.getInspectRecordMainList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<InspectRecordMainExcelVO> datas = InspectRecordMainConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "检验记录主.xls", "数据", InspectRecordMainExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,125 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
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 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; |
|||
|
|||
/** |
|||
* 检验记录子 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class InspectRecordDetailBaseVO { |
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
|
|||
@Schema(description = "包装号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "包装号不能为空") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@Schema(description = "从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@Schema(description = "样品数量") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@Schema(description = "合格数量") |
|||
private BigDecimal goodQty; |
|||
|
|||
@Schema(description = "不合格数量") |
|||
private BigDecimal failedQty; |
|||
|
|||
@Schema(description = "破坏数量") |
|||
private BigDecimal crackQty; |
|||
|
|||
@Schema(description = "最终不合格数量") |
|||
private BigDecimal notPassedQty; |
|||
|
|||
@Schema(description = "不合格原因") |
|||
private String failedReason; |
|||
|
|||
@Schema(description = "异常照片") |
|||
private String photos; |
|||
|
|||
@Schema(description = "检验人") |
|||
private String inspectUser; |
|||
|
|||
@Schema(description = "检验结果") |
|||
private String inspectResult; |
|||
|
|||
@Schema(description = "外观") |
|||
private String appearance; |
|||
|
|||
@Schema(description = "尺寸") |
|||
private String volume; |
|||
|
|||
@Schema(description = "重量") |
|||
private String weight; |
|||
|
|||
@Schema(description = "其他属性") |
|||
private String otherProperties; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "创建时间不能为空") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime creationTime; |
|||
|
|||
@Schema(description = "创建者Id", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "创建者Id不能为空") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 检验记录子创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectRecordDetailCreateReqVO extends InspectRecordDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,123 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
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 com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 检验记录子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class InspectRecordDetailExcelVO { |
|||
|
|||
@ExcelProperty("包装号") |
|||
private String packingNumber; |
|||
|
|||
@ExcelProperty("器具号") |
|||
private String containerNumber; |
|||
|
|||
@ExcelProperty("从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@ExcelProperty("从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@ExcelProperty("从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@ExcelProperty("样品数量") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@ExcelProperty("合格数量") |
|||
private BigDecimal goodQty; |
|||
|
|||
@ExcelProperty("不合格数量") |
|||
private BigDecimal failedQty; |
|||
|
|||
@ExcelProperty("破坏数量") |
|||
private BigDecimal crackQty; |
|||
|
|||
@ExcelProperty("最终不合格数量") |
|||
private BigDecimal notPassedQty; |
|||
|
|||
@ExcelProperty(value = "不合格原因", converter = DictConvert.class) |
|||
@DictFormat("inspect_failed_reason") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String failedReason; |
|||
|
|||
@ExcelProperty("异常照片") |
|||
private String photos; |
|||
|
|||
@ExcelProperty("检验人") |
|||
private String inspectUser; |
|||
|
|||
@ExcelProperty(value = "检验结果", converter = DictConvert.class) |
|||
@DictFormat("inspect_result") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String inspectResult; |
|||
|
|||
@ExcelProperty("外观") |
|||
private String appearance; |
|||
|
|||
@ExcelProperty("尺寸") |
|||
private String volume; |
|||
|
|||
@ExcelProperty("重量") |
|||
private String weight; |
|||
|
|||
@ExcelProperty("其他属性") |
|||
private String otherProperties; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("物品代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime creationTime; |
|||
|
|||
@ExcelProperty("创建者Id") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("物品名称") |
|||
private String itemName; |
|||
|
|||
@ExcelProperty("物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@ExcelProperty("物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@ExcelProperty("项目代码") |
|||
private String projectCode; |
|||
|
|||
@ExcelProperty(value = "计量单位", converter = DictConvert.class) |
|||
@DictFormat("uom") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String uom; |
|||
|
|||
@ExcelProperty("代码") |
|||
private String code; |
|||
|
|||
@ExcelProperty(value = "接口类型", converter = DictConvert.class) |
|||
@DictFormat("interface_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String interfaceType; |
|||
|
|||
@ExcelProperty("任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,112 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 检验记录子 Excel 导出 Request VO,参数和 InspectRecordDetailPageReqVO 是一致的") |
|||
@Data |
|||
public class InspectRecordDetailExportReqVO { |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@Schema(description = "从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@Schema(description = "样品数量") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@Schema(description = "合格数量") |
|||
private BigDecimal goodQty; |
|||
|
|||
@Schema(description = "不合格数量") |
|||
private BigDecimal failedQty; |
|||
|
|||
@Schema(description = "破坏数量") |
|||
private BigDecimal crackQty; |
|||
|
|||
@Schema(description = "最终不合格数量") |
|||
private BigDecimal notPassedQty; |
|||
|
|||
@Schema(description = "不合格原因") |
|||
private String failedReason; |
|||
|
|||
@Schema(description = "异常照片") |
|||
private String photos; |
|||
|
|||
@Schema(description = "检验人") |
|||
private String inspectUser; |
|||
|
|||
@Schema(description = "检验结果") |
|||
private String inspectResult; |
|||
|
|||
@Schema(description = "外观") |
|||
private String appearance; |
|||
|
|||
@Schema(description = "尺寸") |
|||
private String volume; |
|||
|
|||
@Schema(description = "重量") |
|||
private String weight; |
|||
|
|||
@Schema(description = "其他属性") |
|||
private String otherProperties; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] creationTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,114 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 InspectRecordDetailPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "从库位组代码") |
|||
private String fromLocationGroupCode; |
|||
|
|||
@Schema(description = "从库区代码") |
|||
private String fromAreaCode; |
|||
|
|||
@Schema(description = "样品数量") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@Schema(description = "合格数量") |
|||
private BigDecimal goodQty; |
|||
|
|||
@Schema(description = "不合格数量") |
|||
private BigDecimal failedQty; |
|||
|
|||
@Schema(description = "破坏数量") |
|||
private BigDecimal crackQty; |
|||
|
|||
@Schema(description = "最终不合格数量") |
|||
private BigDecimal notPassedQty; |
|||
|
|||
@Schema(description = "不合格原因") |
|||
private String failedReason; |
|||
|
|||
@Schema(description = "异常照片") |
|||
private String photos; |
|||
|
|||
@Schema(description = "检验人") |
|||
private String inspectUser; |
|||
|
|||
@Schema(description = "检验结果") |
|||
private String inspectResult; |
|||
|
|||
@Schema(description = "外观") |
|||
private String appearance; |
|||
|
|||
@Schema(description = "尺寸") |
|||
private String volume; |
|||
|
|||
@Schema(description = "重量") |
|||
private String weight; |
|||
|
|||
@Schema(description = "其他属性") |
|||
private String otherProperties; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] creationTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "任务明细ID") |
|||
private String jobDetailId; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 检验记录子 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectRecordDetailRespVO extends InspectRecordDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 检验记录子更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectRecordDetailUpdateReqVO extends InspectRecordDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,151 @@ |
|||
package com.win.module.wms.controller.inspectRecord.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.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
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; |
|||
|
|||
/** |
|||
* 检验记录主 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class InspectRecordMainBaseVO { |
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
@Schema(description = "申请单号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "申请单号不能为空") |
|||
private String requestNumber; |
|||
|
|||
@Schema(description = "任务单号") |
|||
private String jobNumber; |
|||
|
|||
@Schema(description = "采购收货记录单号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "采购收货记录单号不能为空") |
|||
private String purchaseReceiptRecordNumber; |
|||
|
|||
@Schema(description = "供应商代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "供应商代码不能为空") |
|||
private String supplierCode; |
|||
|
|||
@Schema(description = "出库事务类型") |
|||
private String outTransactionType; |
|||
|
|||
@Schema(description = "入库事务类型") |
|||
private String inTransactionType; |
|||
|
|||
@Schema(description = "执行时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime executeTime; |
|||
|
|||
@Schema(description = "生效日期") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime activeDate; |
|||
|
|||
@Schema(description = "申请时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime requestTime; |
|||
|
|||
@Schema(description = "截止时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime dueTime; |
|||
|
|||
@Schema(description = "部门") |
|||
private String departmentCode; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "业务类型") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "订单号") |
|||
private String poNumber; |
|||
|
|||
@Schema(description = "订单行") |
|||
private String poLine; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "检验类型") |
|||
private String inspectType; |
|||
|
|||
@Schema(description = "下一步检验动作") |
|||
private String nextAction; |
|||
|
|||
@Schema(description = "抽检方式") |
|||
private String sampleMethod; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "收货数量") |
|||
private BigDecimal receiveQty; |
|||
|
|||
@Schema(description = "合格数量") |
|||
private BigDecimal batchGoodQty; |
|||
|
|||
@Schema(description = "不合格数量") |
|||
private BigDecimal batchFaildQty; |
|||
|
|||
@Schema(description = "破坏数量") |
|||
private BigDecimal batchCrackQty; |
|||
|
|||
@Schema(description = "最终不合格数量") |
|||
private BigDecimal batchNotPassedQty; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "从仓库代码") |
|||
private String fromWarehouseCode; |
|||
|
|||
@Schema(description = "从库区代码范围") |
|||
private String fromAreaCodes; |
|||
|
|||
@Schema(description = "货主代码") |
|||
private String ownerCode; |
|||
|
|||
@Schema(description = "是否可用") |
|||
private String available; |
|||
|
|||
@Schema(description = "样品数量") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@Schema(description = "从库位类型范围") |
|||
private String fromLocationTypes; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 检验记录主创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectRecordMainCreateReqVO extends InspectRecordMainBaseVO { |
|||
|
|||
} |
@ -0,0 +1,148 @@ |
|||
package com.win.module.wms.controller.inspectRecord.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.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
import java.math.BigDecimal; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 检验记录主 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class InspectRecordMainExcelVO { |
|||
|
|||
@ExcelProperty("申请单号") |
|||
private String requestNumber; |
|||
|
|||
@ExcelProperty("任务单号") |
|||
private String jobNumber; |
|||
|
|||
@ExcelProperty("采购收货记录单号") |
|||
private String purchaseReceiptRecordNumber; |
|||
|
|||
@ExcelProperty("供应商代码") |
|||
private String supplierCode; |
|||
|
|||
@ExcelProperty("出库事务类型") |
|||
private String outTransactionType; |
|||
|
|||
@ExcelProperty("入库事务类型") |
|||
private String inTransactionType; |
|||
|
|||
@ExcelProperty("执行时间") |
|||
private LocalDateTime executeTime; |
|||
|
|||
@ExcelProperty("生效日期") |
|||
private LocalDateTime activeDate; |
|||
|
|||
@ExcelProperty("申请时间") |
|||
private LocalDateTime requestTime; |
|||
|
|||
@ExcelProperty("截止时间") |
|||
private LocalDateTime dueTime; |
|||
|
|||
@ExcelProperty("部门") |
|||
private String departmentCode; |
|||
|
|||
@ExcelProperty(value = "接口类型", converter = DictConvert.class) |
|||
@DictFormat("interface_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String interfaceType; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("业务类型") |
|||
private String businessType; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("创建者Id") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("代码") |
|||
private String code; |
|||
|
|||
@ExcelProperty("订单号") |
|||
private String poNumber; |
|||
|
|||
@ExcelProperty("订单行") |
|||
private String poLine; |
|||
|
|||
@ExcelProperty("批次") |
|||
private String batch; |
|||
|
|||
@ExcelProperty(value = "检验类型", converter = DictConvert.class) |
|||
@DictFormat("inspect_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String inspectType; |
|||
|
|||
@ExcelProperty(value = "下一步检验动作", converter = DictConvert.class) |
|||
@DictFormat("next_action") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String nextAction; |
|||
|
|||
@ExcelProperty(value = "抽检方式", converter = DictConvert.class) |
|||
@DictFormat("sample_method") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String sampleMethod; |
|||
|
|||
@ExcelProperty(value = "计量单位", converter = DictConvert.class) |
|||
@DictFormat("uom") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String uom; |
|||
|
|||
@ExcelProperty("收货数量") |
|||
private BigDecimal receiveQty; |
|||
|
|||
@ExcelProperty("合格数量") |
|||
private BigDecimal batchGoodQty; |
|||
|
|||
@ExcelProperty("不合格数量") |
|||
private BigDecimal batchFaildQty; |
|||
|
|||
@ExcelProperty("破坏数量") |
|||
private BigDecimal batchCrackQty; |
|||
|
|||
@ExcelProperty("最终不合格数量") |
|||
private BigDecimal batchNotPassedQty; |
|||
|
|||
@ExcelProperty("物品代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty("从仓库代码") |
|||
private String fromWarehouseCode; |
|||
|
|||
@ExcelProperty("从库区代码范围") |
|||
private String fromAreaCodes; |
|||
|
|||
@ExcelProperty("货主代码") |
|||
private String ownerCode; |
|||
|
|||
@ExcelProperty("是否可用") |
|||
private String available; |
|||
|
|||
@ExcelProperty("样品数量") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@ExcelProperty(value = "从库位类型范围", converter = DictConvert.class) |
|||
@DictFormat("location_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String fromLocationTypes; |
|||
|
|||
} |
@ -0,0 +1,134 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 检验记录主 Excel 导出 Request VO,参数和 InspectRecordMainPageReqVO 是一致的") |
|||
@Data |
|||
public class InspectRecordMainExportReqVO { |
|||
|
|||
@Schema(description = "申请单号") |
|||
private String requestNumber; |
|||
|
|||
@Schema(description = "任务单号") |
|||
private String jobNumber; |
|||
|
|||
@Schema(description = "采购收货记录单号") |
|||
private String purchaseReceiptRecordNumber; |
|||
|
|||
@Schema(description = "供应商代码") |
|||
private String supplierCode; |
|||
|
|||
@Schema(description = "出库事务类型") |
|||
private String outTransactionType; |
|||
|
|||
@Schema(description = "入库事务类型") |
|||
private String inTransactionType; |
|||
|
|||
@Schema(description = "执行时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] executeTime; |
|||
|
|||
@Schema(description = "生效日期") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] activeDate; |
|||
|
|||
@Schema(description = "申请时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] requestTime; |
|||
|
|||
@Schema(description = "截止时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] dueTime; |
|||
|
|||
@Schema(description = "部门") |
|||
private String departmentCode; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "业务类型") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "订单号") |
|||
private String poNumber; |
|||
|
|||
@Schema(description = "订单行") |
|||
private String poLine; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "检验类型") |
|||
private String inspectType; |
|||
|
|||
@Schema(description = "下一步检验动作") |
|||
private String nextAction; |
|||
|
|||
@Schema(description = "抽检方式") |
|||
private String sampleMethod; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "收货数量") |
|||
private BigDecimal receiveQty; |
|||
|
|||
@Schema(description = "合格数量") |
|||
private BigDecimal batchGoodQty; |
|||
|
|||
@Schema(description = "不合格数量") |
|||
private BigDecimal batchFaildQty; |
|||
|
|||
@Schema(description = "破坏数量") |
|||
private BigDecimal batchCrackQty; |
|||
|
|||
@Schema(description = "最终不合格数量") |
|||
private BigDecimal batchNotPassedQty; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "从仓库代码") |
|||
private String fromWarehouseCode; |
|||
|
|||
@Schema(description = "从库区代码范围") |
|||
private String fromAreaCodes; |
|||
|
|||
@Schema(description = "货主代码") |
|||
private String ownerCode; |
|||
|
|||
@Schema(description = "是否可用") |
|||
private String available; |
|||
|
|||
@Schema(description = "样品数量") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@Schema(description = "从库位类型范围") |
|||
private String fromLocationTypes; |
|||
|
|||
} |
@ -0,0 +1,136 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 InspectRecordMainPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "申请单号") |
|||
private String requestNumber; |
|||
|
|||
@Schema(description = "任务单号") |
|||
private String jobNumber; |
|||
|
|||
@Schema(description = "采购收货记录单号") |
|||
private String purchaseReceiptRecordNumber; |
|||
|
|||
@Schema(description = "供应商代码") |
|||
private String supplierCode; |
|||
|
|||
@Schema(description = "出库事务类型") |
|||
private String outTransactionType; |
|||
|
|||
@Schema(description = "入库事务类型") |
|||
private String inTransactionType; |
|||
|
|||
@Schema(description = "执行时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] executeTime; |
|||
|
|||
@Schema(description = "生效日期") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] activeDate; |
|||
|
|||
@Schema(description = "申请时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] requestTime; |
|||
|
|||
@Schema(description = "截止时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] dueTime; |
|||
|
|||
@Schema(description = "部门") |
|||
private String departmentCode; |
|||
|
|||
@Schema(description = "接口类型") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "业务类型") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "订单号") |
|||
private String poNumber; |
|||
|
|||
@Schema(description = "订单行") |
|||
private String poLine; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "检验类型") |
|||
private String inspectType; |
|||
|
|||
@Schema(description = "下一步检验动作") |
|||
private String nextAction; |
|||
|
|||
@Schema(description = "抽检方式") |
|||
private String sampleMethod; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "收货数量") |
|||
private BigDecimal receiveQty; |
|||
|
|||
@Schema(description = "合格数量") |
|||
private BigDecimal batchGoodQty; |
|||
|
|||
@Schema(description = "不合格数量") |
|||
private BigDecimal batchFaildQty; |
|||
|
|||
@Schema(description = "破坏数量") |
|||
private BigDecimal batchCrackQty; |
|||
|
|||
@Schema(description = "最终不合格数量") |
|||
private BigDecimal batchNotPassedQty; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "从仓库代码") |
|||
private String fromWarehouseCode; |
|||
|
|||
@Schema(description = "从库区代码范围") |
|||
private String fromAreaCodes; |
|||
|
|||
@Schema(description = "货主代码") |
|||
private String ownerCode; |
|||
|
|||
@Schema(description = "是否可用") |
|||
private String available; |
|||
|
|||
@Schema(description = "样品数量") |
|||
private BigDecimal sampleQty; |
|||
|
|||
@Schema(description = "从库位类型范围") |
|||
private String fromLocationTypes; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 检验记录主 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectRecordMainRespVO extends InspectRecordMainBaseVO { |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectRecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 检验记录主更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectRecordMainUpdateReqVO extends InspectRecordMainBaseVO { |
|||
|
|||
} |
@ -0,0 +1,102 @@ |
|||
package com.win.module.wms.controller.inspectRequest; |
|||
|
|||
import com.win.module.wms.controller.inspectRequest.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.controller.inspectRequest.vo.*; |
|||
import com.win.module.wms.dal.dataobject.inspectRequest.InspectRequestDetailDO; |
|||
import com.win.module.wms.convert.inspectRequest.InspectRequestDetailConvert; |
|||
import com.win.module.wms.service.inspectRequest.InspectRequestDetailService; |
|||
|
|||
@Tag(name = "管理后台 - 检验申请子") |
|||
@RestController |
|||
@RequestMapping("/wms/inspect-request-detail") |
|||
@Validated |
|||
public class InspectRequestDetailController { |
|||
|
|||
@Resource |
|||
private InspectRequestDetailService inspectRequestDetailService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建检验申请子") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-detail:create')") |
|||
public CommonResult<Long> createInspectRequestDetail(@Valid @RequestBody InspectRequestDetailCreateReqVO createReqVO) { |
|||
return success(inspectRequestDetailService.createInspectRequestDetail(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新检验申请子") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-detail:update')") |
|||
public CommonResult<Boolean> updateInspectRequestDetail(@Valid @RequestBody InspectRequestDetailUpdateReqVO updateReqVO) { |
|||
inspectRequestDetailService.updateInspectRequestDetail(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除检验申请子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-detail:delete')") |
|||
public CommonResult<Boolean> deleteInspectRequestDetail(@RequestParam("id") Long id) { |
|||
inspectRequestDetailService.deleteInspectRequestDetail(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得检验申请子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-detail:query')") |
|||
public CommonResult<InspectRequestDetailRespVO> getInspectRequestDetail(@RequestParam("id") Long id) { |
|||
InspectRequestDetailDO inspectRequestDetail = inspectRequestDetailService.getInspectRequestDetail(id); |
|||
return success(InspectRequestDetailConvert.INSTANCE.convert(inspectRequestDetail)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得检验申请子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-detail:query')") |
|||
public CommonResult<List<InspectRequestDetailRespVO>> getInspectRequestDetailList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<InspectRequestDetailDO> list = inspectRequestDetailService.getInspectRequestDetailList(ids); |
|||
return success(InspectRequestDetailConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得检验申请子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-detail:query')") |
|||
public CommonResult<PageResult<InspectRequestDetailRespVO>> getInspectRequestDetailPage(@Valid InspectRequestDetailPageReqVO pageVO) { |
|||
PageResult<InspectRequestDetailDO> pageResult = inspectRequestDetailService.getInspectRequestDetailPage(pageVO); |
|||
return success(InspectRequestDetailConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出检验申请子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-detail:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportInspectRequestDetailExcel(@Valid InspectRequestDetailExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<InspectRequestDetailDO> list = inspectRequestDetailService.getInspectRequestDetailList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<InspectRequestDetailExcelVO> datas = InspectRequestDetailConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "检验申请子.xls", "数据", InspectRequestDetailExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
package com.win.module.wms.controller.inspectRequest; |
|||
|
|||
import com.win.module.wms.controller.inspectRequest.vo.*; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.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 javax.validation.*; |
|||
import javax.servlet.http.*; |
|||
import java.util.*; |
|||
import java.io.IOException; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
|
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
|
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.*; |
|||
|
|||
import com.win.module.wms.dal.dataobject.inspectRequest.InspectRequestMainDO; |
|||
import com.win.module.wms.convert.inspectRequest.InspectRequestMainConvert; |
|||
import com.win.module.wms.service.inspectRequest.InspectRequestMainService; |
|||
|
|||
@Tag(name = "管理后台 - 检验申请主") |
|||
@RestController |
|||
@RequestMapping("/wms/inspect-request-main") |
|||
@Validated |
|||
public class InspectRequestMainController { |
|||
|
|||
@Resource |
|||
private InspectRequestMainService inspectRequestMainService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建检验申请主") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-main:create')") |
|||
public CommonResult<Long> createInspectRequestMain(@Valid @RequestBody InspectRequestMainCreateReqVO createReqVO) { |
|||
return success(inspectRequestMainService.createInspectRequestMain(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新检验申请主") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-main:update')") |
|||
public CommonResult<Boolean> updateInspectRequestMain(@Valid @RequestBody InspectRequestMainUpdateReqVO updateReqVO) { |
|||
inspectRequestMainService.updateInspectRequestMain(updateReqVO); |
|||
return success(true); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除检验申请主") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-main:delete')") |
|||
public CommonResult<Boolean> deleteInspectRequestMain(@RequestParam("id") Long id) { |
|||
inspectRequestMainService.deleteInspectRequestMain(id); |
|||
return success(true); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得检验申请主") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-main:query')") |
|||
public CommonResult<InspectRequestMainRespVO> getInspectRequestMain(@RequestParam("id") Long id) { |
|||
InspectRequestMainDO inspectRequestMain = inspectRequestMainService.getInspectRequestMain(id); |
|||
return success(InspectRequestMainConvert.INSTANCE.convert(inspectRequestMain)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得检验申请主列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-main:query')") |
|||
public CommonResult<List<InspectRequestMainRespVO>> getInspectRequestMainList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<InspectRequestMainDO> list = inspectRequestMainService.getInspectRequestMainList(ids); |
|||
return success(InspectRequestMainConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得检验申请主分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-main:query')") |
|||
public CommonResult<PageResult<InspectRequestMainRespVO>> getInspectRequestMainPage(@Valid InspectRequestMainPageReqVO pageVO) { |
|||
PageResult<InspectRequestMainDO> pageResult = inspectRequestMainService.getInspectRequestMainPage(pageVO); |
|||
return success(InspectRequestMainConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出检验申请主 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:inspect-request-main:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportInspectRequestMainExcel(@Valid InspectRequestMainExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<InspectRequestMainDO> list = inspectRequestMainService.getInspectRequestMainList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<InspectRequestMainExcelVO> datas = InspectRequestMainConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "检验申请主.xls", "数据", InspectRequestMainExcelVO.class, datas); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package com.win.module.wms.controller.inspectRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.math.BigDecimal; |
|||
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; |
|||
|
|||
/** |
|||
* 检验申请子 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class InspectRequestDetailBaseVO { |
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
@Schema(description = "包装号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "包装号不能为空") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectRequest.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 检验申请子创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectRequestDetailCreateReqVO extends InspectRequestDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,63 @@ |
|||
package com.win.module.wms.controller.inspectRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.time.LocalDateTime; |
|||
import java.math.BigDecimal; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.win.framework.excel.core.annotations.DictFormat; |
|||
import com.win.framework.excel.core.convert.DictConvert; |
|||
|
|||
|
|||
/** |
|||
* 检验申请子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class InspectRequestDetailExcelVO { |
|||
|
|||
@ExcelProperty("包装号") |
|||
private String packingNumber; |
|||
|
|||
@ExcelProperty("器具号") |
|||
private String containerNumber; |
|||
|
|||
@ExcelProperty(value = "库存状态", converter = DictConvert.class) |
|||
@DictFormat("inventory_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String inventoryStatus; |
|||
|
|||
@ExcelProperty("从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@ExcelProperty("最后更新时间") |
|||
private LocalDateTime updateTime; |
|||
|
|||
@ExcelProperty("最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@ExcelProperty("物品代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty("物品名称") |
|||
private String itemName; |
|||
|
|||
@ExcelProperty("物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@ExcelProperty("物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@ExcelProperty("项目代码") |
|||
private String projectCode; |
|||
|
|||
@ExcelProperty("数量") |
|||
private BigDecimal qty; |
|||
|
|||
@ExcelProperty(value = "计量单位", converter = DictConvert.class) |
|||
@DictFormat("uom") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中
|
|||
private String uom; |
|||
|
|||
} |
@ -0,0 +1,58 @@ |
|||
package com.win.module.wms.controller.inspectRequest.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import java.time.LocalDateTime; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 检验申请子 Excel 导出 Request VO,参数和 InspectRequestDetailPageReqVO 是一致的") |
|||
@Data |
|||
public class InspectRequestDetailExportReqVO { |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
} |
@ -0,0 +1,60 @@ |
|||
package com.win.module.wms.controller.inspectRequest.vo; |
|||
|
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import com.win.framework.common.pojo.PageParam; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
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 InspectRequestDetailPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "物品名称") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 检验申请子 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectRequestDetailRespVO extends InspectRequestDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectRequest.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
|
|||
@Schema(description = "管理后台 - 检验申请子更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectRequestDetailUpdateReqVO extends InspectRequestDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,141 @@ |
|||
package com.win.module.wms.controller.inspectRequest.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.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; |
|||
|
|||
/** |
|||
* 检验申请主 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class InspectRequestMainBaseVO { |
|||
|
|||
@Schema(description = "id", example = "id") |
|||
private Long id; |
|||
|
|||
@Schema(description = "采购收货记录单号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "采购收货记录单号不能为空") |
|||
private String purchaseReceiptRecordNumber; |
|||
|
|||
@Schema(description = "供应商代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "供应商代码不能为空") |
|||
private String supplierCode; |
|||
|
|||
@Schema(description = "单据号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "单据号不能为空") |
|||
private String number; |
|||
|
|||
@Schema(description = "业务类型", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "业务类型不能为空") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "从仓库代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "从仓库代码不能为空") |
|||
private String fromWarehouseCode; |
|||
|
|||
@Schema(description = "从库区代码范围") |
|||
private String fromAreaCodes; |
|||
|
|||
@Schema(description = "从库位类型范围", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "从库位类型范围不能为空") |
|||
private String fromLocationTypes; |
|||
|
|||
@Schema(description = "备注") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "创建时间不能为空") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "创建者用户名") |
|||
private String creator; |
|||
|
|||
@Schema(description = "申请时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime requestTime; |
|||
|
|||
@Schema(description = "截止时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime dueTime; |
|||
|
|||
@Schema(description = "部门", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "部门不能为空") |
|||
private String departmentCode; |
|||
|
|||
@Schema(description = "状态") |
|||
private String status; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime updateTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@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 String batch; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "检验类型", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "检验类型不能为空") |
|||
private String inspectType; |
|||
|
|||
@Schema(description = "下一步检验动作") |
|||
private String nextAction; |
|||
|
|||
@Schema(description = "抽检方式", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "抽检方式不能为空") |
|||
private String sampleMethod; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "收货数量", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "收货数量不能为空") |
|||
private Integer receiveQty; |
|||
|
|||
@Schema(description = "样品数量", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "样品数量不能为空") |
|||
private Integer sampleQty; |
|||
|
|||
@Schema(description = "货主代码") |
|||
private String ownerCode; |
|||
|
|||
@Schema(description = "自动提交", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "自动提交不能为空") |
|||
private String autoCommit; |
|||
|
|||
@Schema(description = "自动通过", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "自动通过不能为空") |
|||
private String autoAgree; |
|||
|
|||
@Schema(description = "自动执行", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "自动执行不能为空") |
|||
private String autoExecute; |
|||
|
|||
@Schema(description = "直接生成记录", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "直接生成记录不能为空") |
|||
private String directCreateRecord; |
|||
|
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.win.module.wms.controller.inspectRequest.vo; |
|||
|
|||
import lombok.*; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
|
|||
@Schema(description = "管理后台 - 检验申请主创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class InspectRequestMainCreateReqVO extends InspectRequestMainBaseVO { |
|||
|
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue