forked from sfms3.0/sfms3.0
29 changed files with 1787 additions and 0 deletions
@ -0,0 +1,135 @@ |
|||
package com.win.module.wms.controller.containerUnbind; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import com.win.module.wms.controller.containerUnbind.vo.*; |
|||
import com.win.module.wms.convert.containerUnbind.ContainerUnbindRecordDetailConvert; |
|||
import com.win.module.wms.dal.dataobject.containerUnbind.ContainerUnbindRecordDetailDO; |
|||
import com.win.module.wms.service.containerUnbind.ContainerUnbindRecordDetailService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import javax.validation.Valid; |
|||
import java.io.IOException; |
|||
import java.time.LocalDateTime; |
|||
import java.time.ZoneOffset; |
|||
import java.util.*; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; |
|||
|
|||
@Tag(name = "管理后台 - 器具解绑记录子") |
|||
@RestController |
|||
@RequestMapping("/wms/container-unbind-record-detail") |
|||
@Validated |
|||
public class ContainerUnbindRecordDetailController { |
|||
|
|||
@Resource |
|||
private ContainerUnbindRecordDetailService containerUnbindRecordDetailService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建器具解绑记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-detail:create')") |
|||
public CommonResult<Long> createContainerUnbindRecordDetail(@Valid @RequestBody ContainerUnbindRecordDetailCreateReqVO createReqVO) { |
|||
return success(containerUnbindRecordDetailService.createContainerUnbindRecordDetail(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新器具解绑记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-detail:update')") |
|||
public CommonResult<Boolean> updateContainerUnbindRecordDetail(@Valid @RequestBody ContainerUnbindRecordDetailUpdateReqVO updateReqVO) { |
|||
int result = containerUnbindRecordDetailService.updateContainerUnbindRecordDetail(updateReqVO); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除器具解绑记录子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-detail:delete')") |
|||
public CommonResult<Boolean> deleteContainerUnbindRecordDetail(@RequestParam("id") Long id) { |
|||
int result = containerUnbindRecordDetailService.deleteContainerUnbindRecordDetail(id); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得器具解绑记录子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-detail:query')") |
|||
public CommonResult<ContainerUnbindRecordDetailRespVO> getContainerUnbindRecordDetail(@RequestParam("id") Long id) { |
|||
ContainerUnbindRecordDetailDO containerUnbindRecordDetail = containerUnbindRecordDetailService.getContainerUnbindRecordDetail(id); |
|||
return success(ContainerUnbindRecordDetailConvert.INSTANCE.convert(containerUnbindRecordDetail)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得器具解绑记录子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-detail:query')") |
|||
public CommonResult<List<ContainerUnbindRecordDetailRespVO>> getContainerUnbindRecordDetailList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<ContainerUnbindRecordDetailDO> list = containerUnbindRecordDetailService.getContainerUnbindRecordDetailList(ids); |
|||
return success(ContainerUnbindRecordDetailConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得器具解绑记录子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-detail:query')") |
|||
public CommonResult<PageResult<ContainerUnbindRecordDetailRespVO>> getContainerUnbindRecordDetailPage(@Valid ContainerUnbindRecordDetailPageReqVO pageVO) { |
|||
PageResult<ContainerUnbindRecordDetailDO> pageResult = containerUnbindRecordDetailService.getContainerUnbindRecordDetailPage(pageVO); |
|||
return success(ContainerUnbindRecordDetailConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出器具解绑记录子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-detail:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportContainerUnbindRecordDetailExcel(@Valid ContainerUnbindRecordDetailExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<ContainerUnbindRecordDetailDO> list = containerUnbindRecordDetailService.getContainerUnbindRecordDetailList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<ContainerUnbindRecordDetailExcelVO> datas = ContainerUnbindRecordDetailConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "器具解绑记录子.xls", "数据", ContainerUnbindRecordDetailExcelVO.class, datas); |
|||
} |
|||
|
|||
@GetMapping("/get-import-template") |
|||
@Operation(summary = "获得导入器具解绑记录子模板") |
|||
public void importTemplate(HttpServletResponse response) throws IOException { |
|||
List<ContainerUnbindRecordDetailExcelVO> list = Arrays.asList(); |
|||
// 输出
|
|||
ExcelUtils.write(response, "器具解绑记录子基本信息导入模板.xls", "器具解绑记录子基本信息列表", ContainerUnbindRecordDetailExcelVO.class, list); |
|||
} |
|||
|
|||
@PostMapping("/import") |
|||
@Operation(summary = "导入器具解绑记录子基本信息") |
|||
@Parameters({ |
|||
@Parameter(name = "file", description = "Excel 文件", required = true), |
|||
@Parameter(name = "mode", description = "导入模式1更新2追加3覆盖", example = "1"), |
|||
@Parameter(name = "updatePart", description = "部分更新,默认为 true", example = "true") |
|||
}) |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-detail:import')") |
|||
public CommonResult<Map<String, Object>> importExcel(HttpServletResponse response, |
|||
@RequestParam("file") MultipartFile file, |
|||
@RequestParam(value = "mode") Integer mode, |
|||
@RequestParam(value = "updatePart", required = false, defaultValue = "false") Boolean updatePart) throws Exception { |
|||
|
|||
List<ContainerUnbindRecordDetailExcelVO> list = ExcelUtils.read(file, ContainerUnbindRecordDetailExcelVO.class); |
|||
List<ContainerUnbindRecordDetailExcelVO> errorList = containerUnbindRecordDetailService.importContainerUnbindRecordDetailList(list, mode, updatePart); |
|||
|
|||
Map<String, Object> returnMap = new HashMap<>(); |
|||
returnMap.put("errorCount", errorList.size()); |
|||
if(!errorList.isEmpty()) { |
|||
String url = ExcelUtils.writeLocalFile("器具解绑记录子基本信息导入错误数据" + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")) + ".xlsx", "错误列表", errorList); |
|||
returnMap.put("errorFile", url); |
|||
} |
|||
|
|||
return success(returnMap); |
|||
} |
|||
} |
@ -0,0 +1,135 @@ |
|||
package com.win.module.wms.controller.containerUnbind; |
|||
|
|||
import com.win.framework.common.pojo.CommonResult; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.excel.core.util.ExcelUtils; |
|||
import com.win.framework.operatelog.core.annotations.OperateLog; |
|||
import com.win.module.wms.controller.containerUnbind.vo.*; |
|||
import com.win.module.wms.convert.containerUnbind.ContainerUnbindRecordMainConvert; |
|||
import com.win.module.wms.dal.dataobject.containerUnbind.ContainerUnbindRecordMainDO; |
|||
import com.win.module.wms.service.containerUnbind.ContainerUnbindRecordMainService; |
|||
import io.swagger.v3.oas.annotations.Operation; |
|||
import io.swagger.v3.oas.annotations.Parameter; |
|||
import io.swagger.v3.oas.annotations.Parameters; |
|||
import io.swagger.v3.oas.annotations.tags.Tag; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import javax.validation.Valid; |
|||
import java.io.IOException; |
|||
import java.time.LocalDateTime; |
|||
import java.time.ZoneOffset; |
|||
import java.util.*; |
|||
|
|||
import static com.win.framework.common.pojo.CommonResult.success; |
|||
import static com.win.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; |
|||
|
|||
@Tag(name = "管理后台 - 器具解绑记录主") |
|||
@RestController |
|||
@RequestMapping("/wms/container-unbind-record-main") |
|||
@Validated |
|||
public class ContainerUnbindRecordMainController { |
|||
|
|||
@Resource |
|||
private ContainerUnbindRecordMainService containerUnbindRecordMainService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建器具解绑记录主") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-main:create')") |
|||
public CommonResult<Long> createContainerUnbindRecordMain(@Valid @RequestBody ContainerUnbindRecordMainCreateReqVO createReqVO) { |
|||
return success(containerUnbindRecordMainService.createContainerUnbindRecordMain(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新器具解绑记录主") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-main:update')") |
|||
public CommonResult<Boolean> updateContainerUnbindRecordMain(@Valid @RequestBody ContainerUnbindRecordMainUpdateReqVO updateReqVO) { |
|||
int result = containerUnbindRecordMainService.updateContainerUnbindRecordMain(updateReqVO); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除器具解绑记录主") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-main:delete')") |
|||
public CommonResult<Boolean> deleteContainerUnbindRecordMain(@RequestParam("id") Long id) { |
|||
int result = containerUnbindRecordMainService.deleteContainerUnbindRecordMain(id); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得器具解绑记录主") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-main:query')") |
|||
public CommonResult<ContainerUnbindRecordMainRespVO> getContainerUnbindRecordMain(@RequestParam("id") Long id) { |
|||
ContainerUnbindRecordMainDO containerUnbindRecordMain = containerUnbindRecordMainService.getContainerUnbindRecordMain(id); |
|||
return success(ContainerUnbindRecordMainConvert.INSTANCE.convert(containerUnbindRecordMain)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得器具解绑记录主列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-main:query')") |
|||
public CommonResult<List<ContainerUnbindRecordMainRespVO>> getContainerUnbindRecordMainList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<ContainerUnbindRecordMainDO> list = containerUnbindRecordMainService.getContainerUnbindRecordMainList(ids); |
|||
return success(ContainerUnbindRecordMainConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得器具解绑记录主分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-main:query')") |
|||
public CommonResult<PageResult<ContainerUnbindRecordMainRespVO>> getContainerUnbindRecordMainPage(@Valid ContainerUnbindRecordMainPageReqVO pageVO) { |
|||
PageResult<ContainerUnbindRecordMainDO> pageResult = containerUnbindRecordMainService.getContainerUnbindRecordMainPage(pageVO); |
|||
return success(ContainerUnbindRecordMainConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出器具解绑记录主 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-main:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportContainerUnbindRecordMainExcel(@Valid ContainerUnbindRecordMainExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<ContainerUnbindRecordMainDO> list = containerUnbindRecordMainService.getContainerUnbindRecordMainList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<ContainerUnbindRecordMainExcelVO> datas = ContainerUnbindRecordMainConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "器具解绑记录主.xls", "数据", ContainerUnbindRecordMainExcelVO.class, datas); |
|||
} |
|||
|
|||
@GetMapping("/get-import-template") |
|||
@Operation(summary = "获得导入器具解绑记录主模板") |
|||
public void importTemplate(HttpServletResponse response) throws IOException { |
|||
List<ContainerUnbindRecordMainExcelVO> list = Arrays.asList(); |
|||
// 输出
|
|||
ExcelUtils.write(response, "器具解绑记录主基本信息导入模板.xls", "器具解绑记录主基本信息列表", ContainerUnbindRecordMainExcelVO.class, list); |
|||
} |
|||
|
|||
@PostMapping("/import") |
|||
@Operation(summary = "导入器具解绑记录主基本信息") |
|||
@Parameters({ |
|||
@Parameter(name = "file", description = "Excel 文件", required = true), |
|||
@Parameter(name = "mode", description = "导入模式1更新2追加3覆盖", example = "1"), |
|||
@Parameter(name = "updatePart", description = "部分更新,默认为 true", example = "true") |
|||
}) |
|||
@PreAuthorize("@ss.hasPermission('wms:container-unbind-record-main:import')") |
|||
public CommonResult<Map<String, Object>> importExcel(HttpServletResponse response, |
|||
@RequestParam("file") MultipartFile file, |
|||
@RequestParam(value = "mode") Integer mode, |
|||
@RequestParam(value = "updatePart", required = false, defaultValue = "false") Boolean updatePart) throws Exception { |
|||
|
|||
List<ContainerUnbindRecordMainExcelVO> list = ExcelUtils.read(file, ContainerUnbindRecordMainExcelVO.class); |
|||
List<ContainerUnbindRecordMainExcelVO> errorList = containerUnbindRecordMainService.importContainerUnbindRecordMainList(list, mode, updatePart); |
|||
|
|||
Map<String, Object> returnMap = new HashMap<>(); |
|||
returnMap.put("errorCount", errorList.size()); |
|||
if(!errorList.isEmpty()) { |
|||
String url = ExcelUtils.writeLocalFile("器具解绑记录主基本信息导入错误数据" + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")) + ".xlsx", "错误列表", errorList); |
|||
returnMap.put("errorFile", url); |
|||
} |
|||
|
|||
return success(returnMap); |
|||
} |
|||
} |
@ -0,0 +1,52 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 器具解绑记录子 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class ContainerUnbindRecordDetailBaseVO { |
|||
|
|||
@Schema(description = "内容物类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@NotNull(message = "内容物类型不能为空") |
|||
private String containerContentType; |
|||
|
|||
@Schema(description = "内容物号") |
|||
private String contentNumber; |
|||
|
|||
@Schema(description = "物料代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "库存状态", example = "1") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "主表ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6555") |
|||
@NotNull(message = "主表ID不能为空") |
|||
private Long masterId; |
|||
|
|||
@Schema(description = "单据号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "单据号不能为空") |
|||
private String number; |
|||
|
|||
@Schema(description = "地点ID", example = "3546") |
|||
private String siteId; |
|||
|
|||
@Schema(description = "备注", example = "你猜") |
|||
private String remark; |
|||
|
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
@Schema(description = "管理后台 - 器具解绑记录子创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ContainerUnbindRecordDetailCreateReqVO extends ContainerUnbindRecordDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 器具解绑记录子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class ContainerUnbindRecordDetailExcelVO { |
|||
|
|||
@ExcelProperty("id") |
|||
private Long id; |
|||
|
|||
@ExcelProperty("内容物类型") |
|||
private String containerContentType; |
|||
|
|||
@ExcelProperty("内容物号") |
|||
private String contentNumber; |
|||
|
|||
@ExcelProperty("物料代码") |
|||
private String itemCode; |
|||
|
|||
@ExcelProperty("批次") |
|||
private String batch; |
|||
|
|||
@ExcelProperty("库存状态") |
|||
private String inventoryStatus; |
|||
|
|||
@ExcelProperty("计量单位") |
|||
private String uom; |
|||
|
|||
@ExcelProperty("数量") |
|||
private BigDecimal qty; |
|||
|
|||
@ExcelProperty("主表ID") |
|||
private Long masterId; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("地点ID") |
|||
private String siteId; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 器具解绑记录子 Excel 导出 Request VO,参数和 ContainerUnbindRecordDetailPageReqVO 是一致的") |
|||
@Data |
|||
public class ContainerUnbindRecordDetailExportReqVO { |
|||
|
|||
@Schema(description = "内容物类型", example = "1") |
|||
private String containerContentType; |
|||
|
|||
@Schema(description = "内容物号") |
|||
private String contentNumber; |
|||
|
|||
@Schema(description = "物料代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "库存状态", example = "1") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "主表ID", example = "6555") |
|||
private Long masterId; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "地点ID", example = "3546") |
|||
private String siteId; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "备注", example = "你猜") |
|||
private String remark; |
|||
|
|||
} |
@ -0,0 +1,58 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
import static com.win.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
|||
|
|||
@Schema(description = "管理后台 - 器具解绑记录子分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ContainerUnbindRecordDetailPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "内容物类型", example = "1") |
|||
private String containerContentType; |
|||
|
|||
@Schema(description = "内容物号") |
|||
private String contentNumber; |
|||
|
|||
@Schema(description = "物料代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "库存状态", example = "1") |
|||
private String inventoryStatus; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "主表ID", example = "6555") |
|||
private Long masterId; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "地点ID", example = "3546") |
|||
private String siteId; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "备注", example = "你猜") |
|||
private String remark; |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 器具解绑记录子 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ContainerUnbindRecordDetailRespVO extends ContainerUnbindRecordDetailBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21310") |
|||
private Long id; |
|||
|
|||
@Schema(description = "创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
@Schema(description = "管理后台 - 器具解绑记录子更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ContainerUnbindRecordDetailUpdateReqVO extends ContainerUnbindRecordDetailBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21310") |
|||
@NotNull(message = "id不能为空") |
|||
private Long id; |
|||
|
|||
} |
@ -0,0 +1,91 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
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; |
|||
|
|||
/** |
|||
* 器具解绑记录主 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class ContainerUnbindRecordMainBaseVO { |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "从仓库代码") |
|||
private String fromWarehouseCode; |
|||
|
|||
@Schema(description = "到仓库代码") |
|||
private String toWarehouseCode; |
|||
|
|||
@Schema(description = "出库事务类型", example = "2") |
|||
private String outTransactionType; |
|||
|
|||
@Schema(description = "入库事务类型", example = "1") |
|||
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 = "是否可用") |
|||
private String available; |
|||
|
|||
@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 userGroupCode; |
|||
|
|||
@Schema(description = "接口类型", example = "2") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "业务类型", example = "1") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
@Schema(description = "扩展属性") |
|||
private String extraProperties; |
|||
|
|||
@Schema(description = "地点ID", example = "11950") |
|||
private String siteId; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "从库位类型范围") |
|||
private String fromLocationTypes; |
|||
|
|||
@Schema(description = "到库位类型范围") |
|||
private String toLocationTypes; |
|||
|
|||
@Schema(description = "从库区代码范围") |
|||
private String fromAreaCodes; |
|||
|
|||
@Schema(description = "到库区代码范围") |
|||
private String toAreaCodes; |
|||
|
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
@Schema(description = "管理后台 - 器具解绑记录主创建 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ContainerUnbindRecordMainCreateReqVO extends ContainerUnbindRecordMainBaseVO { |
|||
|
|||
} |
@ -0,0 +1,91 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 器具解绑记录主 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class ContainerUnbindRecordMainExcelVO { |
|||
|
|||
@ExcelProperty("id") |
|||
private Long id; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("器具号") |
|||
private String containerNumber; |
|||
|
|||
@ExcelProperty("从仓库代码") |
|||
private String fromWarehouseCode; |
|||
|
|||
@ExcelProperty("到仓库代码") |
|||
private String toWarehouseCode; |
|||
|
|||
@ExcelProperty("出库事务类型") |
|||
private String outTransactionType; |
|||
|
|||
@ExcelProperty("入库事务类型") |
|||
private String inTransactionType; |
|||
|
|||
@ExcelProperty("执行时间") |
|||
private LocalDateTime executeTime; |
|||
|
|||
@ExcelProperty("生效日期") |
|||
private LocalDateTime activeDate; |
|||
|
|||
@ExcelProperty("是否可用") |
|||
private String available; |
|||
|
|||
@ExcelProperty("申请时间") |
|||
private LocalDateTime requestTime; |
|||
|
|||
@ExcelProperty("截止时间") |
|||
private LocalDateTime dueTime; |
|||
|
|||
@ExcelProperty("部门") |
|||
private String departmentCode; |
|||
|
|||
@ExcelProperty("用户组") |
|||
private String userGroupCode; |
|||
|
|||
@ExcelProperty("接口类型") |
|||
private String interfaceType; |
|||
|
|||
@ExcelProperty("业务类型") |
|||
private String businessType; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("扩展属性") |
|||
private String extraProperties; |
|||
|
|||
@ExcelProperty("地点ID") |
|||
private String siteId; |
|||
|
|||
@ExcelProperty("代码") |
|||
private String code; |
|||
|
|||
@ExcelProperty("从库位类型范围") |
|||
private String fromLocationTypes; |
|||
|
|||
@ExcelProperty("到库位类型范围") |
|||
private String toLocationTypes; |
|||
|
|||
@ExcelProperty("从库区代码范围") |
|||
private String fromAreaCodes; |
|||
|
|||
@ExcelProperty("到库区代码范围") |
|||
private String toAreaCodes; |
|||
|
|||
} |
@ -0,0 +1,92 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
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 = "管理后台 - 器具解绑记录主 Excel 导出 Request VO,参数和 ContainerUnbindRecordMainPageReqVO 是一致的") |
|||
@Data |
|||
public class ContainerUnbindRecordMainExportReqVO { |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "从仓库代码") |
|||
private String fromWarehouseCode; |
|||
|
|||
@Schema(description = "到仓库代码") |
|||
private String toWarehouseCode; |
|||
|
|||
@Schema(description = "出库事务类型", example = "2") |
|||
private String outTransactionType; |
|||
|
|||
@Schema(description = "入库事务类型", example = "1") |
|||
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 = "是否可用") |
|||
private String available; |
|||
|
|||
@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 userGroupCode; |
|||
|
|||
@Schema(description = "接口类型", example = "2") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "业务类型", example = "1") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "扩展属性") |
|||
private String extraProperties; |
|||
|
|||
@Schema(description = "地点ID", example = "11950") |
|||
private String siteId; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "从库位类型范围") |
|||
private String fromLocationTypes; |
|||
|
|||
@Schema(description = "到库位类型范围") |
|||
private String toLocationTypes; |
|||
|
|||
@Schema(description = "从库区代码范围") |
|||
private String fromAreaCodes; |
|||
|
|||
@Schema(description = "到库区代码范围") |
|||
private String toAreaCodes; |
|||
|
|||
} |
@ -0,0 +1,97 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import com.win.framework.common.pojo.PageParam; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.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 ContainerUnbindRecordMainPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "从仓库代码") |
|||
private String fromWarehouseCode; |
|||
|
|||
@Schema(description = "到仓库代码") |
|||
private String toWarehouseCode; |
|||
|
|||
@Schema(description = "出库事务类型", example = "2") |
|||
private String outTransactionType; |
|||
|
|||
@Schema(description = "入库事务类型", example = "1") |
|||
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 = "是否可用") |
|||
private String available; |
|||
|
|||
@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 userGroupCode; |
|||
|
|||
@Schema(description = "接口类型", example = "2") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "业务类型", example = "1") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
@Schema(description = "创建时间") |
|||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
|||
private LocalDateTime[] createTime; |
|||
|
|||
@Schema(description = "扩展属性") |
|||
private String extraProperties; |
|||
|
|||
@Schema(description = "地点ID", example = "11950") |
|||
private String siteId; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "从库位类型范围") |
|||
private String fromLocationTypes; |
|||
|
|||
@Schema(description = "到库位类型范围") |
|||
private String toLocationTypes; |
|||
|
|||
@Schema(description = "从库区代码范围") |
|||
private String fromAreaCodes; |
|||
|
|||
@Schema(description = "到库区代码范围") |
|||
private String toAreaCodes; |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 器具解绑记录主 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ContainerUnbindRecordMainRespVO extends ContainerUnbindRecordMainBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28627") |
|||
private Long id; |
|||
|
|||
@Schema(description = "创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.win.module.wms.controller.containerUnbind.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import lombok.ToString; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
@Schema(description = "管理后台 - 器具解绑记录主更新 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ContainerUnbindRecordMainUpdateReqVO extends ContainerUnbindRecordMainBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28627") |
|||
@NotNull(message = "id不能为空") |
|||
private Long id; |
|||
|
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.win.module.wms.convert.containerUnbind; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordDetailCreateReqVO; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordDetailExcelVO; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordDetailRespVO; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordDetailUpdateReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerUnbind.ContainerUnbindRecordDetailDO; |
|||
import org.mapstruct.Mapper; |
|||
import org.mapstruct.factory.Mappers; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具解绑记录子 Convert |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerUnbindRecordDetailConvert { |
|||
|
|||
ContainerUnbindRecordDetailConvert INSTANCE = Mappers.getMapper(ContainerUnbindRecordDetailConvert.class); |
|||
|
|||
ContainerUnbindRecordDetailDO convert(ContainerUnbindRecordDetailCreateReqVO bean); |
|||
|
|||
ContainerUnbindRecordDetailDO convert(ContainerUnbindRecordDetailUpdateReqVO bean); |
|||
|
|||
ContainerUnbindRecordDetailRespVO convert(ContainerUnbindRecordDetailDO bean); |
|||
|
|||
List<ContainerUnbindRecordDetailRespVO> convertList(List<ContainerUnbindRecordDetailDO> list); |
|||
|
|||
PageResult<ContainerUnbindRecordDetailRespVO> convertPage(PageResult<ContainerUnbindRecordDetailDO> page); |
|||
|
|||
List<ContainerUnbindRecordDetailExcelVO> convertList02(List<ContainerUnbindRecordDetailDO> list); |
|||
|
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.win.module.wms.convert.containerUnbind; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordMainCreateReqVO; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordMainExcelVO; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordMainRespVO; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordMainUpdateReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerUnbind.ContainerUnbindRecordMainDO; |
|||
import org.mapstruct.Mapper; |
|||
import org.mapstruct.factory.Mappers; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具解绑记录主 Convert |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerUnbindRecordMainConvert { |
|||
|
|||
ContainerUnbindRecordMainConvert INSTANCE = Mappers.getMapper(ContainerUnbindRecordMainConvert.class); |
|||
|
|||
ContainerUnbindRecordMainDO convert(ContainerUnbindRecordMainCreateReqVO bean); |
|||
|
|||
ContainerUnbindRecordMainDO convert(ContainerUnbindRecordMainUpdateReqVO bean); |
|||
|
|||
ContainerUnbindRecordMainRespVO convert(ContainerUnbindRecordMainDO bean); |
|||
|
|||
List<ContainerUnbindRecordMainRespVO> convertList(List<ContainerUnbindRecordMainDO> list); |
|||
|
|||
PageResult<ContainerUnbindRecordMainRespVO> convertPage(PageResult<ContainerUnbindRecordMainDO> page); |
|||
|
|||
List<ContainerUnbindRecordMainExcelVO> convertList02(List<ContainerUnbindRecordMainDO> list); |
|||
|
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.win.module.wms.dal.dataobject.containerUnbind; |
|||
|
|||
import lombok.*; |
|||
import java.util.*; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
import java.time.LocalDateTime; |
|||
import com.baomidou.mybatisplus.annotation.*; |
|||
import com.win.framework.mybatis.core.dataobject.BaseDO; |
|||
|
|||
/** |
|||
* 器具解绑记录子 DO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@TableName("record_container_unbind_detail") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class ContainerUnbindRecordDetailDO extends BaseDO { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId |
|||
private Long id; |
|||
/** |
|||
* 内容物类型 |
|||
*/ |
|||
private String containerContentType; |
|||
/** |
|||
* 内容物号 |
|||
*/ |
|||
private String contentNumber; |
|||
/** |
|||
* 物料代码 |
|||
*/ |
|||
private String itemCode; |
|||
/** |
|||
* 批次 |
|||
*/ |
|||
private String batch; |
|||
/** |
|||
* 库存状态 |
|||
*/ |
|||
private String inventoryStatus; |
|||
/** |
|||
* 计量单位 |
|||
*/ |
|||
private String uom; |
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private BigDecimal qty; |
|||
/** |
|||
* 主表ID |
|||
*/ |
|||
private Long masterId; |
|||
/** |
|||
* 单据号 |
|||
*/ |
|||
private String number; |
|||
/** |
|||
* 地点ID |
|||
*/ |
|||
private String siteId; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
} |
@ -0,0 +1,126 @@ |
|||
package com.win.module.wms.dal.dataobject.containerUnbind; |
|||
|
|||
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 com.baomidou.mybatisplus.annotation.*; |
|||
import com.win.framework.mybatis.core.dataobject.BaseDO; |
|||
|
|||
/** |
|||
* 器具解绑记录主 DO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@TableName("record_container_unbind_main") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class ContainerUnbindRecordMainDO extends BaseDO { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId |
|||
private Long id; |
|||
/** |
|||
* 单据号 |
|||
*/ |
|||
private String number; |
|||
/** |
|||
* 器具号 |
|||
*/ |
|||
private String containerNumber; |
|||
/** |
|||
* 从仓库代码 |
|||
*/ |
|||
private String fromWarehouseCode; |
|||
/** |
|||
* 到仓库代码 |
|||
*/ |
|||
private String toWarehouseCode; |
|||
/** |
|||
* 出库事务类型 |
|||
*/ |
|||
private String outTransactionType; |
|||
/** |
|||
* 入库事务类型 |
|||
*/ |
|||
private String inTransactionType; |
|||
/** |
|||
* 执行时间 |
|||
*/ |
|||
private LocalDateTime executeTime; |
|||
/** |
|||
* 生效日期 |
|||
*/ |
|||
private LocalDateTime activeDate; |
|||
/** |
|||
* 是否可用 |
|||
*/ |
|||
private String available; |
|||
/** |
|||
* 申请时间 |
|||
*/ |
|||
private LocalDateTime requestTime; |
|||
/** |
|||
* 截止时间 |
|||
*/ |
|||
private LocalDateTime dueTime; |
|||
/** |
|||
* 部门 |
|||
*/ |
|||
private String departmentCode; |
|||
/** |
|||
* 用户组 |
|||
*/ |
|||
private String userGroupCode; |
|||
/** |
|||
* 接口类型 |
|||
*/ |
|||
private String interfaceType; |
|||
/** |
|||
* 业务类型 |
|||
*/ |
|||
private String businessType; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
/** |
|||
* 扩展属性 |
|||
*/ |
|||
private String extraProperties; |
|||
/** |
|||
* 地点ID |
|||
*/ |
|||
private String siteId; |
|||
/** |
|||
* 代码 |
|||
*/ |
|||
private String code; |
|||
/** |
|||
* 从库位类型范围 |
|||
*/ |
|||
private String fromLocationTypes; |
|||
/** |
|||
* 到库位类型范围 |
|||
*/ |
|||
private String toLocationTypes; |
|||
/** |
|||
* 从库区代码范围 |
|||
*/ |
|||
private String fromAreaCodes; |
|||
/** |
|||
* 到库区代码范围 |
|||
*/ |
|||
private String toAreaCodes; |
|||
|
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.win.module.wms.dal.mysql.containerUnbind; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.mybatis.core.mapper.BaseMapperX; |
|||
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordDetailExportReqVO; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordDetailPageReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerUnbind.ContainerUnbindRecordDetailDO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具解绑记录子 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerUnbindRecordDetailMapper extends BaseMapperX<ContainerUnbindRecordDetailDO> { |
|||
|
|||
default PageResult<ContainerUnbindRecordDetailDO> selectPage(ContainerUnbindRecordDetailPageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<ContainerUnbindRecordDetailDO>() |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getContainerContentType, reqVO.getContainerContentType()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getContentNumber, reqVO.getContentNumber()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getItemCode, reqVO.getItemCode()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getBatch, reqVO.getBatch()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getInventoryStatus, reqVO.getInventoryStatus()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getUom, reqVO.getUom()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getQty, reqVO.getQty()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getMasterId, reqVO.getMasterId()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getSiteId, reqVO.getSiteId()) |
|||
.betweenIfPresent(ContainerUnbindRecordDetailDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getRemark, reqVO.getRemark()) |
|||
.orderByDesc(ContainerUnbindRecordDetailDO::getId)); |
|||
} |
|||
|
|||
default List<ContainerUnbindRecordDetailDO> selectList(ContainerUnbindRecordDetailExportReqVO reqVO) { |
|||
return selectList(new LambdaQueryWrapperX<ContainerUnbindRecordDetailDO>() |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getContainerContentType, reqVO.getContainerContentType()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getContentNumber, reqVO.getContentNumber()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getItemCode, reqVO.getItemCode()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getBatch, reqVO.getBatch()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getInventoryStatus, reqVO.getInventoryStatus()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getUom, reqVO.getUom()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getQty, reqVO.getQty()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getMasterId, reqVO.getMasterId()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getSiteId, reqVO.getSiteId()) |
|||
.betweenIfPresent(ContainerUnbindRecordDetailDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(ContainerUnbindRecordDetailDO::getRemark, reqVO.getRemark()) |
|||
.orderByDesc(ContainerUnbindRecordDetailDO::getId)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,79 @@ |
|||
package com.win.module.wms.dal.mysql.containerUnbind; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.framework.mybatis.core.mapper.BaseMapperX; |
|||
import com.win.framework.mybatis.core.query.LambdaQueryWrapperX; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordMainExportReqVO; |
|||
import com.win.module.wms.controller.containerUnbind.vo.ContainerUnbindRecordMainPageReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerUnbind.ContainerUnbindRecordMainDO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具解绑记录主 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerUnbindRecordMainMapper extends BaseMapperX<ContainerUnbindRecordMainDO> { |
|||
|
|||
default PageResult<ContainerUnbindRecordMainDO> selectPage(ContainerUnbindRecordMainPageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<ContainerUnbindRecordMainDO>() |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getContainerNumber, reqVO.getContainerNumber()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getFromWarehouseCode, reqVO.getFromWarehouseCode()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getToWarehouseCode, reqVO.getToWarehouseCode()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getOutTransactionType, reqVO.getOutTransactionType()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getInTransactionType, reqVO.getInTransactionType()) |
|||
.betweenIfPresent(ContainerUnbindRecordMainDO::getExecuteTime, reqVO.getExecuteTime()) |
|||
.betweenIfPresent(ContainerUnbindRecordMainDO::getActiveDate, reqVO.getActiveDate()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getAvailable, reqVO.getAvailable()) |
|||
.betweenIfPresent(ContainerUnbindRecordMainDO::getRequestTime, reqVO.getRequestTime()) |
|||
.betweenIfPresent(ContainerUnbindRecordMainDO::getDueTime, reqVO.getDueTime()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getDepartmentCode, reqVO.getDepartmentCode()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getUserGroupCode, reqVO.getUserGroupCode()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getInterfaceType, reqVO.getInterfaceType()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getBusinessType, reqVO.getBusinessType()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getRemark, reqVO.getRemark()) |
|||
.betweenIfPresent(ContainerUnbindRecordMainDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getExtraProperties, reqVO.getExtraProperties()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getSiteId, reqVO.getSiteId()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getCode, reqVO.getCode()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getFromLocationTypes, reqVO.getFromLocationTypes()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getToLocationTypes, reqVO.getToLocationTypes()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getFromAreaCodes, reqVO.getFromAreaCodes()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getToAreaCodes, reqVO.getToAreaCodes()) |
|||
.orderByDesc(ContainerUnbindRecordMainDO::getId)); |
|||
} |
|||
|
|||
default List<ContainerUnbindRecordMainDO> selectList(ContainerUnbindRecordMainExportReqVO reqVO) { |
|||
return selectList(new LambdaQueryWrapperX<ContainerUnbindRecordMainDO>() |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getContainerNumber, reqVO.getContainerNumber()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getFromWarehouseCode, reqVO.getFromWarehouseCode()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getToWarehouseCode, reqVO.getToWarehouseCode()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getOutTransactionType, reqVO.getOutTransactionType()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getInTransactionType, reqVO.getInTransactionType()) |
|||
.betweenIfPresent(ContainerUnbindRecordMainDO::getExecuteTime, reqVO.getExecuteTime()) |
|||
.betweenIfPresent(ContainerUnbindRecordMainDO::getActiveDate, reqVO.getActiveDate()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getAvailable, reqVO.getAvailable()) |
|||
.betweenIfPresent(ContainerUnbindRecordMainDO::getRequestTime, reqVO.getRequestTime()) |
|||
.betweenIfPresent(ContainerUnbindRecordMainDO::getDueTime, reqVO.getDueTime()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getDepartmentCode, reqVO.getDepartmentCode()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getUserGroupCode, reqVO.getUserGroupCode()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getInterfaceType, reqVO.getInterfaceType()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getBusinessType, reqVO.getBusinessType()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getRemark, reqVO.getRemark()) |
|||
.betweenIfPresent(ContainerUnbindRecordMainDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getExtraProperties, reqVO.getExtraProperties()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getSiteId, reqVO.getSiteId()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getCode, reqVO.getCode()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getFromLocationTypes, reqVO.getFromLocationTypes()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getToLocationTypes, reqVO.getToLocationTypes()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getFromAreaCodes, reqVO.getFromAreaCodes()) |
|||
.eqIfPresent(ContainerUnbindRecordMainDO::getToAreaCodes, reqVO.getToAreaCodes()) |
|||
.orderByDesc(ContainerUnbindRecordMainDO::getId)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,81 @@ |
|||
package com.win.module.wms.service.containerUnbind; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerUnbind.vo.*; |
|||
import com.win.module.wms.dal.dataobject.containerUnbind.ContainerUnbindRecordDetailDO; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具解绑记录子 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface ContainerUnbindRecordDetailService { |
|||
|
|||
/** |
|||
* 创建器具解绑记录子 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
Long createContainerUnbindRecordDetail(@Valid ContainerUnbindRecordDetailCreateReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新器具解绑记录子 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
Integer updateContainerUnbindRecordDetail(@Valid ContainerUnbindRecordDetailUpdateReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除器具解绑记录子 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
Integer deleteContainerUnbindRecordDetail(Long id); |
|||
|
|||
/** |
|||
* 获得器具解绑记录子 |
|||
* |
|||
* @param id 编号 |
|||
* @return 器具解绑记录子 |
|||
*/ |
|||
ContainerUnbindRecordDetailDO getContainerUnbindRecordDetail(Long id); |
|||
|
|||
/** |
|||
* 获得器具解绑记录子列表 |
|||
* |
|||
* @param ids 编号 |
|||
* @return 器具解绑记录子列表 |
|||
*/ |
|||
List<ContainerUnbindRecordDetailDO> getContainerUnbindRecordDetailList(Collection<Long> ids); |
|||
|
|||
/** |
|||
* 获得器具解绑记录子分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return 器具解绑记录子分页 |
|||
*/ |
|||
PageResult<ContainerUnbindRecordDetailDO> getContainerUnbindRecordDetailPage(ContainerUnbindRecordDetailPageReqVO pageReqVO); |
|||
|
|||
/** |
|||
* 获得器具解绑记录子列表, 用于 Excel 导出 |
|||
* |
|||
* @param exportReqVO 查询条件 |
|||
* @return 器具解绑记录子列表 |
|||
*/ |
|||
List<ContainerUnbindRecordDetailDO> getContainerUnbindRecordDetailList(ContainerUnbindRecordDetailExportReqVO exportReqVO); |
|||
|
|||
/** |
|||
* 导入器具解绑记录子主信息 |
|||
* |
|||
* @param datas 导入器具解绑记录子主信息列表 |
|||
* @param mode 导入模式1更新2追加3覆盖 |
|||
* @param updatePart 是否支持更新 |
|||
* @return 导入结果 |
|||
*/ |
|||
public List<ContainerUnbindRecordDetailExcelVO> importContainerUnbindRecordDetailList(List<ContainerUnbindRecordDetailExcelVO> datas, Integer mode, boolean updatePart); |
|||
} |
@ -0,0 +1,109 @@ |
|||
package com.win.module.wms.service.containerUnbind; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerUnbind.vo.*; |
|||
import com.win.module.wms.convert.containerUnbind.ContainerUnbindRecordDetailConvert; |
|||
import com.win.module.wms.dal.dataobject.containerUnbind.ContainerUnbindRecordDetailDO; |
|||
import com.win.module.wms.dal.mysql.containerUnbind.ContainerUnbindRecordDetailMapper; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.validation.annotation.Validated; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.ArrayList; |
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; |
|||
import static com.win.module.wms.enums.ErrorCodeConstants.CONTAINER_UNBIND_RECORD_DETAIL_IMPORT_LIST_IS_EMPTY; |
|||
import static com.win.module.wms.enums.ErrorCodeConstants.CONTAINER_UNBIND_RECORD_DETAIL_NOT_EXISTS; |
|||
|
|||
/** |
|||
* 器具解绑记录子 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class ContainerUnbindRecordDetailServiceImpl implements ContainerUnbindRecordDetailService { |
|||
|
|||
@Resource |
|||
private ContainerUnbindRecordDetailMapper containerUnbindRecordDetailMapper; |
|||
|
|||
@Override |
|||
public Long createContainerUnbindRecordDetail(ContainerUnbindRecordDetailCreateReqVO createReqVO) { |
|||
// 插入
|
|||
ContainerUnbindRecordDetailDO containerUnbindRecordDetail = ContainerUnbindRecordDetailConvert.INSTANCE.convert(createReqVO); |
|||
containerUnbindRecordDetailMapper.insert(containerUnbindRecordDetail); |
|||
// 返回
|
|||
return containerUnbindRecordDetail.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public Integer updateContainerUnbindRecordDetail(ContainerUnbindRecordDetailUpdateReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateContainerUnbindRecordDetailExists(updateReqVO.getId()); |
|||
// 更新
|
|||
ContainerUnbindRecordDetailDO updateObj = ContainerUnbindRecordDetailConvert.INSTANCE.convert(updateReqVO); |
|||
return containerUnbindRecordDetailMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public Integer deleteContainerUnbindRecordDetail(Long id) { |
|||
// 校验存在
|
|||
validateContainerUnbindRecordDetailExists(id); |
|||
// 删除
|
|||
return containerUnbindRecordDetailMapper.deleteById(id); |
|||
} |
|||
|
|||
private void validateContainerUnbindRecordDetailExists(Long id) { |
|||
if (containerUnbindRecordDetailMapper.selectById(id) == null) { |
|||
throw exception(CONTAINER_UNBIND_RECORD_DETAIL_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public ContainerUnbindRecordDetailDO getContainerUnbindRecordDetail(Long id) { |
|||
return containerUnbindRecordDetailMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerUnbindRecordDetailDO> getContainerUnbindRecordDetailList(Collection<Long> ids) { |
|||
return containerUnbindRecordDetailMapper.selectBatchIds(ids); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<ContainerUnbindRecordDetailDO> getContainerUnbindRecordDetailPage(ContainerUnbindRecordDetailPageReqVO pageReqVO) { |
|||
return containerUnbindRecordDetailMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerUnbindRecordDetailDO> getContainerUnbindRecordDetailList(ContainerUnbindRecordDetailExportReqVO exportReqVO) { |
|||
return containerUnbindRecordDetailMapper.selectList(exportReqVO); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerUnbindRecordDetailExcelVO> importContainerUnbindRecordDetailList(List<ContainerUnbindRecordDetailExcelVO> datas, Integer mode, boolean updatePart) { |
|||
if (CollUtil.isEmpty(datas)) { |
|||
throw exception(CONTAINER_UNBIND_RECORD_DETAIL_IMPORT_LIST_IS_EMPTY); |
|||
} |
|||
|
|||
List<ContainerUnbindRecordDetailExcelVO> errorList = new ArrayList<>(); |
|||
// datas.forEach(item -> {
|
|||
// if(errorList == null){
|
|||
// // 判断如果不存在,在进行插入
|
|||
// ContainerUnbindRecordDetailDO obj = containerUnbindRecordDetailMapper.selectByCode(item.getCode());
|
|||
// if (obj == null&& mode != 3) {
|
|||
// containerUnbindRecordDetailMapper.insert(ContainerUnbindRecordDetailConvert.INSTANCE.convert(item));
|
|||
// }
|
|||
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
|
|||
// ContainerUnbindRecordDetailDO containerUnbindRecordDetailDO = ContainerUnbindRecordDetailConvert.INSTANCE.convert(item);
|
|||
// containerUnbindRecordDetailDO.setId(obj.getId());
|
|||
// containerUnbindRecordDetailMapper.updateById(obj);
|
|||
// }
|
|||
// }
|
|||
// });
|
|||
|
|||
return errorList; |
|||
} |
|||
} |
@ -0,0 +1,81 @@ |
|||
package com.win.module.wms.service.containerUnbind; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerUnbind.vo.*; |
|||
import com.win.module.wms.dal.dataobject.containerUnbind.ContainerUnbindRecordMainDO; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具解绑记录主 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface ContainerUnbindRecordMainService { |
|||
|
|||
/** |
|||
* 创建器具解绑记录主 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
Long createContainerUnbindRecordMain(@Valid ContainerUnbindRecordMainCreateReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新器具解绑记录主 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
Integer updateContainerUnbindRecordMain(@Valid ContainerUnbindRecordMainUpdateReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除器具解绑记录主 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
Integer deleteContainerUnbindRecordMain(Long id); |
|||
|
|||
/** |
|||
* 获得器具解绑记录主 |
|||
* |
|||
* @param id 编号 |
|||
* @return 器具解绑记录主 |
|||
*/ |
|||
ContainerUnbindRecordMainDO getContainerUnbindRecordMain(Long id); |
|||
|
|||
/** |
|||
* 获得器具解绑记录主列表 |
|||
* |
|||
* @param ids 编号 |
|||
* @return 器具解绑记录主列表 |
|||
*/ |
|||
List<ContainerUnbindRecordMainDO> getContainerUnbindRecordMainList(Collection<Long> ids); |
|||
|
|||
/** |
|||
* 获得器具解绑记录主分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return 器具解绑记录主分页 |
|||
*/ |
|||
PageResult<ContainerUnbindRecordMainDO> getContainerUnbindRecordMainPage(ContainerUnbindRecordMainPageReqVO pageReqVO); |
|||
|
|||
/** |
|||
* 获得器具解绑记录主列表, 用于 Excel 导出 |
|||
* |
|||
* @param exportReqVO 查询条件 |
|||
* @return 器具解绑记录主列表 |
|||
*/ |
|||
List<ContainerUnbindRecordMainDO> getContainerUnbindRecordMainList(ContainerUnbindRecordMainExportReqVO exportReqVO); |
|||
|
|||
/** |
|||
* 导入器具解绑记录主主信息 |
|||
* |
|||
* @param datas 导入器具解绑记录主主信息列表 |
|||
* @param mode 导入模式1更新2追加3覆盖 |
|||
* @param updatePart 是否支持更新 |
|||
* @return 导入结果 |
|||
*/ |
|||
public List<ContainerUnbindRecordMainExcelVO> importContainerUnbindRecordMainList(List<ContainerUnbindRecordMainExcelVO> datas, Integer mode, boolean updatePart); |
|||
} |
@ -0,0 +1,109 @@ |
|||
package com.win.module.wms.service.containerUnbind; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerUnbind.vo.*; |
|||
import com.win.module.wms.convert.containerUnbind.ContainerUnbindRecordMainConvert; |
|||
import com.win.module.wms.dal.dataobject.containerUnbind.ContainerUnbindRecordMainDO; |
|||
import com.win.module.wms.dal.mysql.containerUnbind.ContainerUnbindRecordMainMapper; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.validation.annotation.Validated; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.ArrayList; |
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; |
|||
import static com.win.module.wms.enums.ErrorCodeConstants.CONTAINER_UNBIND_RECORD_MAIN_IMPORT_LIST_IS_EMPTY; |
|||
import static com.win.module.wms.enums.ErrorCodeConstants.CONTAINER_UNBIND_RECORD_MAIN_NOT_EXISTS; |
|||
|
|||
/** |
|||
* 器具解绑记录主 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class ContainerUnbindRecordMainServiceImpl implements ContainerUnbindRecordMainService { |
|||
|
|||
@Resource |
|||
private ContainerUnbindRecordMainMapper containerUnbindRecordMainMapper; |
|||
|
|||
@Override |
|||
public Long createContainerUnbindRecordMain(ContainerUnbindRecordMainCreateReqVO createReqVO) { |
|||
// 插入
|
|||
ContainerUnbindRecordMainDO containerUnbindRecordMain = ContainerUnbindRecordMainConvert.INSTANCE.convert(createReqVO); |
|||
containerUnbindRecordMainMapper.insert(containerUnbindRecordMain); |
|||
// 返回
|
|||
return containerUnbindRecordMain.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public Integer updateContainerUnbindRecordMain(ContainerUnbindRecordMainUpdateReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateContainerUnbindRecordMainExists(updateReqVO.getId()); |
|||
// 更新
|
|||
ContainerUnbindRecordMainDO updateObj = ContainerUnbindRecordMainConvert.INSTANCE.convert(updateReqVO); |
|||
return containerUnbindRecordMainMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public Integer deleteContainerUnbindRecordMain(Long id) { |
|||
// 校验存在
|
|||
validateContainerUnbindRecordMainExists(id); |
|||
// 删除
|
|||
return containerUnbindRecordMainMapper.deleteById(id); |
|||
} |
|||
|
|||
private void validateContainerUnbindRecordMainExists(Long id) { |
|||
if (containerUnbindRecordMainMapper.selectById(id) == null) { |
|||
throw exception(CONTAINER_UNBIND_RECORD_MAIN_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public ContainerUnbindRecordMainDO getContainerUnbindRecordMain(Long id) { |
|||
return containerUnbindRecordMainMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerUnbindRecordMainDO> getContainerUnbindRecordMainList(Collection<Long> ids) { |
|||
return containerUnbindRecordMainMapper.selectBatchIds(ids); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<ContainerUnbindRecordMainDO> getContainerUnbindRecordMainPage(ContainerUnbindRecordMainPageReqVO pageReqVO) { |
|||
return containerUnbindRecordMainMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerUnbindRecordMainDO> getContainerUnbindRecordMainList(ContainerUnbindRecordMainExportReqVO exportReqVO) { |
|||
return containerUnbindRecordMainMapper.selectList(exportReqVO); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerUnbindRecordMainExcelVO> importContainerUnbindRecordMainList(List<ContainerUnbindRecordMainExcelVO> datas, Integer mode, boolean updatePart) { |
|||
if (CollUtil.isEmpty(datas)) { |
|||
throw exception(CONTAINER_UNBIND_RECORD_MAIN_IMPORT_LIST_IS_EMPTY); |
|||
} |
|||
|
|||
List<ContainerUnbindRecordMainExcelVO> errorList = new ArrayList<>(); |
|||
// datas.forEach(item -> {
|
|||
// if(errorList == null){
|
|||
// // 判断如果不存在,在进行插入
|
|||
// ContainerUnbindRecordMainDO obj = containerUnbindRecordMainMapper.selectByCode(item.getCode());
|
|||
// if (obj == null&& mode != 3) {
|
|||
// containerUnbindRecordMainMapper.insert(ContainerUnbindRecordMainConvert.INSTANCE.convert(item));
|
|||
// }
|
|||
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
|
|||
// ContainerUnbindRecordMainDO containerUnbindRecordMainDO = ContainerUnbindRecordMainConvert.INSTANCE.convert(item);
|
|||
// containerUnbindRecordMainDO.setId(obj.getId());
|
|||
// containerUnbindRecordMainMapper.updateById(obj);
|
|||
// }
|
|||
// }
|
|||
// });
|
|||
|
|||
return errorList; |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.win.module.wms.dal.mysql.containerUnbind.ContainerUnbindRecordDetailMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
@ -0,0 +1,12 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.win.module.wms.dal.mysql.containerUnbind.ContainerUnbindRecordMainMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue