forked from sfms3.0/sfms3.0
28 changed files with 0 additions and 1563 deletions
@ -1,135 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord; |
|||
|
|||
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.containerbindrecord.vo.*; |
|||
import com.win.module.wms.convert.containerbindrecord.ContainerBindRecordDetailConvert; |
|||
import com.win.module.wms.dal.dataobject.containerbindrecord.ContainerBindRecordDetailDO; |
|||
import com.win.module.wms.service.containerbindrecord.ContainerBindRecordDetailService; |
|||
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-bind-record-detail") |
|||
@Validated |
|||
public class ContainerBindRecordDetailController { |
|||
|
|||
@Resource |
|||
private ContainerBindRecordDetailService containerBindRecordDetailService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建器具绑定记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-detail:create')") |
|||
public CommonResult<Long> createContainerBindRecordDetail(@Valid @RequestBody ContainerBindRecordDetailCreateReqVO createReqVO) { |
|||
return success(containerBindRecordDetailService.createContainerBindRecordDetail(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新器具绑定记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-detail:update')") |
|||
public CommonResult<Boolean> updateContainerBindRecordDetail(@Valid @RequestBody ContainerBindRecordDetailUpdateReqVO updateReqVO) { |
|||
int result = containerBindRecordDetailService.updateContainerBindRecordDetail(updateReqVO); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除器具绑定记录子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-detail:delete')") |
|||
public CommonResult<Boolean> deleteContainerBindRecordDetail(@RequestParam("id") Long id) { |
|||
int result = containerBindRecordDetailService.deleteContainerBindRecordDetail(id); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得器具绑定记录子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-detail:query')") |
|||
public CommonResult<ContainerBindRecordDetailRespVO> getContainerBindRecordDetail(@RequestParam("id") Long id) { |
|||
ContainerBindRecordDetailDO containerBindRecordDetail = containerBindRecordDetailService.getContainerBindRecordDetail(id); |
|||
return success(ContainerBindRecordDetailConvert.INSTANCE.convert(containerBindRecordDetail)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得器具绑定记录子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-detail:query')") |
|||
public CommonResult<List<ContainerBindRecordDetailRespVO>> getContainerBindRecordDetailList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<ContainerBindRecordDetailDO> list = containerBindRecordDetailService.getContainerBindRecordDetailList(ids); |
|||
return success(ContainerBindRecordDetailConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得器具绑定记录子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-detail:query')") |
|||
public CommonResult<PageResult<ContainerBindRecordDetailRespVO>> getContainerBindRecordDetailPage(@Valid ContainerBindRecordDetailPageReqVO pageVO) { |
|||
PageResult<ContainerBindRecordDetailDO> pageResult = containerBindRecordDetailService.getContainerBindRecordDetailPage(pageVO); |
|||
return success(ContainerBindRecordDetailConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出器具绑定记录子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-detail:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportContainerBindRecordDetailExcel(@Valid ContainerBindRecordDetailExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<ContainerBindRecordDetailDO> list = containerBindRecordDetailService.getContainerBindRecordDetailList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<ContainerBindRecordDetailExcelVO> datas = ContainerBindRecordDetailConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "器具绑定记录子.xls", "数据", ContainerBindRecordDetailExcelVO.class, datas); |
|||
} |
|||
|
|||
@GetMapping("/get-import-template") |
|||
@Operation(summary = "获得导入器具绑定记录子模板") |
|||
public void importTemplate(HttpServletResponse response) throws IOException { |
|||
List<ContainerBindRecordDetailExcelVO> list = Arrays.asList(); |
|||
// 输出
|
|||
ExcelUtils.write(response, "器具绑定记录子基本信息导入模板.xls", "器具绑定记录子基本信息列表", ContainerBindRecordDetailExcelVO.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-bind-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<ContainerBindRecordDetailExcelVO> list = ExcelUtils.read(file, ContainerBindRecordDetailExcelVO.class); |
|||
List<ContainerBindRecordDetailExcelVO> errorList = containerBindRecordDetailService.importContainerBindRecordDetailList(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); |
|||
} |
|||
} |
@ -1,135 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord; |
|||
|
|||
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.containerbindrecord.vo.*; |
|||
import com.win.module.wms.convert.containerbindrecord.ContainerBindRecordMainConvert; |
|||
import com.win.module.wms.dal.dataobject.containerbindrecord.ContainerBindRecordMainDO; |
|||
import com.win.module.wms.service.containerbindrecord.ContainerBindRecordMainService; |
|||
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-bind-record-main") |
|||
@Validated |
|||
public class ContainerBindRecordMainController { |
|||
|
|||
@Resource |
|||
private ContainerBindRecordMainService containerBindRecordMainService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建器具绑定记录主") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-main:create')") |
|||
public CommonResult<Long> createContainerBindRecordMain(@Valid @RequestBody ContainerBindRecordMainCreateReqVO createReqVO) { |
|||
return success(containerBindRecordMainService.createContainerBindRecordMain(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新器具绑定记录主") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-main:update')") |
|||
public CommonResult<Boolean> updateContainerBindRecordMain(@Valid @RequestBody ContainerBindRecordMainUpdateReqVO updateReqVO) { |
|||
int result = containerBindRecordMainService.updateContainerBindRecordMain(updateReqVO); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除器具绑定记录主") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-main:delete')") |
|||
public CommonResult<Boolean> deleteContainerBindRecordMain(@RequestParam("id") Long id) { |
|||
int result = containerBindRecordMainService.deleteContainerBindRecordMain(id); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得器具绑定记录主") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-main:query')") |
|||
public CommonResult<ContainerBindRecordMainRespVO> getContainerBindRecordMain(@RequestParam("id") Long id) { |
|||
ContainerBindRecordMainDO containerBindRecordMain = containerBindRecordMainService.getContainerBindRecordMain(id); |
|||
return success(ContainerBindRecordMainConvert.INSTANCE.convert(containerBindRecordMain)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得器具绑定记录主列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-main:query')") |
|||
public CommonResult<List<ContainerBindRecordMainRespVO>> getContainerBindRecordMainList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<ContainerBindRecordMainDO> list = containerBindRecordMainService.getContainerBindRecordMainList(ids); |
|||
return success(ContainerBindRecordMainConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得器具绑定记录主分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-main:query')") |
|||
public CommonResult<PageResult<ContainerBindRecordMainRespVO>> getContainerBindRecordMainPage(@Valid ContainerBindRecordMainPageReqVO pageVO) { |
|||
PageResult<ContainerBindRecordMainDO> pageResult = containerBindRecordMainService.getContainerBindRecordMainPage(pageVO); |
|||
return success(ContainerBindRecordMainConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出器具绑定记录主 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-bind-record-main:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportContainerBindRecordMainExcel(@Valid ContainerBindRecordMainExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<ContainerBindRecordMainDO> list = containerBindRecordMainService.getContainerBindRecordMainList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<ContainerBindRecordMainExcelVO> datas = ContainerBindRecordMainConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "器具绑定记录主.xls", "数据", ContainerBindRecordMainExcelVO.class, datas); |
|||
} |
|||
|
|||
@GetMapping("/get-import-template") |
|||
@Operation(summary = "获得导入器具绑定记录主模板") |
|||
public void importTemplate(HttpServletResponse response) throws IOException { |
|||
List<ContainerBindRecordMainExcelVO> list = Arrays.asList(); |
|||
// 输出
|
|||
ExcelUtils.write(response, "器具绑定记录主基本信息导入模板.xls", "器具绑定记录主基本信息列表", ContainerBindRecordMainExcelVO.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-bind-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<ContainerBindRecordMainExcelVO> list = ExcelUtils.read(file, ContainerBindRecordMainExcelVO.class); |
|||
List<ContainerBindRecordMainExcelVO> errorList = containerBindRecordMainService.importContainerBindRecordMainList(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); |
|||
} |
|||
} |
@ -1,63 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 器具绑定记录子 Base VO,提供给添加、修改、详细的子 VO 使用 |
|||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
|||
*/ |
|||
@Data |
|||
public class ContainerBindRecordDetailBaseVO { |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "主表ID", example = "3678") |
|||
private Long masterId; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "批次") |
|||
private String batch; |
|||
|
|||
@Schema(description = "物品代码") |
|||
private String itemCode; |
|||
|
|||
@Schema(description = "物品名称", example = "王五") |
|||
private String itemName; |
|||
|
|||
@Schema(description = "物品描述1") |
|||
private String itemDesc1; |
|||
|
|||
@Schema(description = "物品描述2") |
|||
private String itemDesc2; |
|||
|
|||
@Schema(description = "项目代码") |
|||
private String projectCode; |
|||
|
|||
@Schema(description = "数量") |
|||
private BigDecimal qty; |
|||
|
|||
@Schema(description = "计量单位") |
|||
private String uom; |
|||
|
|||
@Schema(description = "接口类型", example = "1") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "地点ID", example = "地点ID") |
|||
private String siteId; |
|||
|
|||
@Schema(description = "备注", example = "备注") |
|||
private String remark; |
|||
|
|||
} |
@ -1,14 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.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 ContainerBindRecordDetailCreateReqVO extends ContainerBindRecordDetailBaseVO { |
|||
|
|||
} |
@ -1,71 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 器具绑定记录子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class ContainerBindRecordDetailExcelVO { |
|||
|
|||
@ExcelProperty("id") |
|||
private Long id; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("主表ID") |
|||
private Long masterId; |
|||
|
|||
@ExcelProperty("包装号") |
|||
private String packingNumber; |
|||
|
|||
@ExcelProperty("器具号") |
|||
private String containerNumber; |
|||
|
|||
@ExcelProperty("批次") |
|||
private String batch; |
|||
|
|||
@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("计量单位") |
|||
private String uom; |
|||
|
|||
@ExcelProperty("接口类型") |
|||
private String interfaceType; |
|||
|
|||
@ExcelProperty("代码") |
|||
private String code; |
|||
|
|||
@ExcelProperty("地点ID") |
|||
private String siteId; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
} |
@ -1,22 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
@Schema(description = "管理后台 - 器具绑定记录子 Excel 导出 Request VO,参数和 ContainerBindRecordDetailPageReqVO 是一致的") |
|||
@Data |
|||
public class ContainerBindRecordDetailExportReqVO { |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
} |
@ -1,27 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.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; |
|||
|
|||
@Schema(description = "管理后台 - 器具绑定记录子分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ContainerBindRecordDetailPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "包装号") |
|||
private String packingNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
} |
@ -1,22 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.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 ContainerBindRecordDetailRespVO extends ContainerBindRecordDetailBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "29158") |
|||
private Long id; |
|||
|
|||
@Schema(description = "创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.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 ContainerBindRecordDetailUpdateReqVO extends ContainerBindRecordDetailBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "29158") |
|||
@NotNull(message = "id不能为空") |
|||
private Long id; |
|||
|
|||
} |
@ -1,84 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.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 ContainerBindRecordMainBaseVO { |
|||
|
|||
@Schema(description = "单据号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "单据号不能为空") |
|||
private String number; |
|||
|
|||
@Schema(description = "申请单号") |
|||
private String requestNumber; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@Schema(description = "绑定类型", example = "1") |
|||
private String bindType; |
|||
|
|||
@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 = "业务类型", example = "1") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "接口类型", example = "2") |
|||
private String interfaceType; |
|||
|
|||
@Schema(description = "出库事务类型", example = "2") |
|||
private String outTransactionType; |
|||
|
|||
@Schema(description = "入库事务类型", example = "1") |
|||
private String inTransactionType; |
|||
|
|||
@Schema(description = "扩展属性") |
|||
private String extraProperties; |
|||
|
|||
@Schema(description = "地点ID", example = "12246") |
|||
private String siteId; |
|||
|
|||
@Schema(description = "代码") |
|||
private String code; |
|||
|
|||
@Schema(description = "用户组") |
|||
private String userGroupCode; |
|||
|
|||
@Schema(description = "部门") |
|||
private String departmentCode; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
} |
@ -1,14 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.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 ContainerBindRecordMainCreateReqVO extends ContainerBindRecordMainBaseVO { |
|||
|
|||
} |
@ -1,97 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 器具绑定记录主 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class ContainerBindRecordMainExcelVO { |
|||
|
|||
@ExcelProperty("id") |
|||
private Long id; |
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("申请单号") |
|||
private String requestNumber; |
|||
|
|||
@ExcelProperty("器具号") |
|||
private String containerNumber; |
|||
|
|||
@ExcelProperty("从库位代码") |
|||
private String fromLocationCode; |
|||
|
|||
@ExcelProperty("绑定类型") |
|||
private String bindType; |
|||
|
|||
@ExcelProperty("执行时间") |
|||
private LocalDateTime executeTime; |
|||
|
|||
@ExcelProperty("生效日期") |
|||
private LocalDateTime activeDate; |
|||
|
|||
@ExcelProperty("是否可用") |
|||
private String available; |
|||
|
|||
@ExcelProperty("申请时间") |
|||
private LocalDateTime requestTime; |
|||
|
|||
@ExcelProperty("截止时间") |
|||
private LocalDateTime dueTime; |
|||
|
|||
@ExcelProperty("业务类型") |
|||
private String businessType; |
|||
|
|||
@ExcelProperty("接口类型") |
|||
private String interfaceType; |
|||
|
|||
@ExcelProperty("出库事务类型") |
|||
private String outTransactionType; |
|||
|
|||
@ExcelProperty("入库事务类型") |
|||
private String inTransactionType; |
|||
|
|||
@ExcelProperty("扩展属性") |
|||
private String extraProperties; |
|||
|
|||
@ExcelProperty("地点ID") |
|||
private String siteId; |
|||
|
|||
@ExcelProperty("代码") |
|||
private String code; |
|||
|
|||
@ExcelProperty("用户组") |
|||
private String userGroupCode; |
|||
|
|||
@ExcelProperty("部门") |
|||
private String departmentCode; |
|||
|
|||
@ExcelProperty("租户编号") |
|||
private Long tenantId; |
|||
|
|||
@ExcelProperty("创建者Id") |
|||
private String creator; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@ExcelProperty("最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@ExcelProperty("最后更新时间") |
|||
private LocalDateTime updateTime; |
|||
|
|||
@ExcelProperty("是否删除") |
|||
private Boolean deleted; |
|||
|
|||
@ExcelProperty("备注") |
|||
private String remark; |
|||
|
|||
} |
@ -1,19 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
|
|||
@Schema(description = "管理后台 - 器具绑定记录主 Excel 导出 Request VO,参数和 ContainerBindRecordMainPageReqVO 是一致的") |
|||
@Data |
|||
public class ContainerBindRecordMainExportReqVO { |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
} |
@ -1,24 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.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; |
|||
|
|||
@Schema(description = "管理后台 - 器具绑定记录主分页 Request VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ContainerBindRecordMainPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "备注", example = "你说的对") |
|||
private String remark; |
|||
|
|||
} |
@ -1,37 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.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 ContainerBindRecordMainRespVO extends ContainerBindRecordMainBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "25654") |
|||
private Long id; |
|||
|
|||
@Schema(description = "租户编号", example = "622") |
|||
private Long tenantId; |
|||
|
|||
@Schema(description = "创建者Id") |
|||
private String creator; |
|||
|
|||
@Schema(description = "创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
@Schema(description = "最后更新者用户名") |
|||
private String updater; |
|||
|
|||
@Schema(description = "最后更新时间") |
|||
private LocalDateTime updateTime; |
|||
|
|||
@Schema(description = "是否删除") |
|||
private Boolean deleted; |
|||
|
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.win.module.wms.controller.containerbindrecord.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 ContainerBindRecordMainUpdateReqVO extends ContainerBindRecordMainBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "25654") |
|||
@NotNull(message = "id不能为空") |
|||
private Long id; |
|||
|
|||
} |
@ -1,38 +0,0 @@ |
|||
package com.win.module.wms.convert.containerbindrecord; |
|||
|
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.ContainerBindRecordDetailCreateReqVO; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.ContainerBindRecordDetailExcelVO; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.ContainerBindRecordDetailRespVO; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.ContainerBindRecordDetailUpdateReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerbindrecord.ContainerBindRecordDetailDO; |
|||
import org.mapstruct.Mapper; |
|||
import org.mapstruct.factory.Mappers; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 器具绑定记录子 Convert |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerBindRecordDetailConvert { |
|||
|
|||
ContainerBindRecordDetailConvert INSTANCE = Mappers.getMapper(ContainerBindRecordDetailConvert.class); |
|||
|
|||
ContainerBindRecordDetailDO convert(ContainerBindRecordDetailCreateReqVO bean); |
|||
|
|||
ContainerBindRecordDetailDO convert(ContainerBindRecordDetailUpdateReqVO bean); |
|||
|
|||
ContainerBindRecordDetailRespVO convert(ContainerBindRecordDetailDO bean); |
|||
|
|||
List<ContainerBindRecordDetailRespVO> convertList(List<ContainerBindRecordDetailDO> list); |
|||
|
|||
PageResult<ContainerBindRecordDetailRespVO> convertPage(PageResult<ContainerBindRecordDetailDO> page); |
|||
|
|||
List<ContainerBindRecordDetailExcelVO> convertList02(List<ContainerBindRecordDetailDO> list); |
|||
|
|||
} |
@ -1,37 +0,0 @@ |
|||
package com.win.module.wms.convert.containerbindrecord; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.ContainerBindRecordMainCreateReqVO; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.ContainerBindRecordMainExcelVO; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.ContainerBindRecordMainRespVO; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.ContainerBindRecordMainUpdateReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerbindrecord.ContainerBindRecordMainDO; |
|||
import org.mapstruct.Mapper; |
|||
import org.mapstruct.factory.Mappers; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 器具绑定记录主 Convert |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerBindRecordMainConvert { |
|||
|
|||
ContainerBindRecordMainConvert INSTANCE = Mappers.getMapper(ContainerBindRecordMainConvert.class); |
|||
|
|||
ContainerBindRecordMainDO convert(ContainerBindRecordMainCreateReqVO bean); |
|||
|
|||
ContainerBindRecordMainDO convert(ContainerBindRecordMainUpdateReqVO bean); |
|||
|
|||
ContainerBindRecordMainRespVO convert(ContainerBindRecordMainDO bean); |
|||
|
|||
List<ContainerBindRecordMainRespVO> convertList(List<ContainerBindRecordMainDO> list); |
|||
|
|||
PageResult<ContainerBindRecordMainRespVO> convertPage(PageResult<ContainerBindRecordMainDO> page); |
|||
|
|||
List<ContainerBindRecordMainExcelVO> convertList02(List<ContainerBindRecordMainDO> list); |
|||
|
|||
} |
@ -1,94 +0,0 @@ |
|||
package com.win.module.wms.dal.dataobject.containerbindrecord; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.win.framework.mybatis.core.dataobject.BaseDO; |
|||
import lombok.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 器具绑定记录子 DO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@TableName("record_container_bind_detail") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class ContainerBindRecordDetailDO extends BaseDO { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId |
|||
private Long id; |
|||
/** |
|||
* 单据号 |
|||
*/ |
|||
private String number; |
|||
/** |
|||
* 主表ID |
|||
*/ |
|||
private Long masterId; |
|||
/** |
|||
* 包装号 |
|||
*/ |
|||
private String packingNumber; |
|||
/** |
|||
* 器具号 |
|||
*/ |
|||
private String containerNumber; |
|||
/** |
|||
* 批次 |
|||
*/ |
|||
private String batch; |
|||
/** |
|||
* 物品代码 |
|||
*/ |
|||
private String itemCode; |
|||
/** |
|||
* 物品名称 |
|||
*/ |
|||
private String itemName; |
|||
/** |
|||
* 物品描述1 |
|||
*/ |
|||
private String itemDesc1; |
|||
/** |
|||
* 物品描述2 |
|||
*/ |
|||
private String itemDesc2; |
|||
/** |
|||
* 项目代码 |
|||
*/ |
|||
private String projectCode; |
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private BigDecimal qty; |
|||
/** |
|||
* 计量单位 |
|||
*/ |
|||
private String uom; |
|||
/** |
|||
* 接口类型 |
|||
*/ |
|||
private String interfaceType; |
|||
/** |
|||
* 代码 |
|||
*/ |
|||
private String code; |
|||
/** |
|||
* 地点ID |
|||
*/ |
|||
private String siteId; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
} |
@ -1,110 +0,0 @@ |
|||
package com.win.module.wms.dal.dataobject.containerbindrecord; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.win.framework.mybatis.core.dataobject.BaseDO; |
|||
import lombok.*; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 器具绑定记录主 DO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@TableName("record_container_bind_main") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class ContainerBindRecordMainDO extends BaseDO { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId |
|||
private Long id; |
|||
/** |
|||
* 单据号 |
|||
*/ |
|||
private String number; |
|||
/** |
|||
* 申请单号 |
|||
*/ |
|||
private String requestNumber; |
|||
/** |
|||
* 器具号 |
|||
*/ |
|||
private String containerNumber; |
|||
/** |
|||
* 从库位代码 |
|||
*/ |
|||
private String fromLocationCode; |
|||
/** |
|||
* 绑定类型 |
|||
*/ |
|||
private String bindType; |
|||
/** |
|||
* 执行时间 |
|||
*/ |
|||
private LocalDateTime executeTime; |
|||
/** |
|||
* 生效日期 |
|||
*/ |
|||
private LocalDateTime activeDate; |
|||
/** |
|||
* 是否可用 |
|||
*/ |
|||
private String available; |
|||
/** |
|||
* 申请时间 |
|||
*/ |
|||
private LocalDateTime requestTime; |
|||
/** |
|||
* 截止时间 |
|||
*/ |
|||
private LocalDateTime dueTime; |
|||
/** |
|||
* 业务类型 |
|||
*/ |
|||
private String businessType; |
|||
/** |
|||
* 接口类型 |
|||
*/ |
|||
private String interfaceType; |
|||
/** |
|||
* 出库事务类型 |
|||
*/ |
|||
private String outTransactionType; |
|||
/** |
|||
* 入库事务类型 |
|||
*/ |
|||
private String inTransactionType; |
|||
/** |
|||
* 扩展属性 |
|||
*/ |
|||
private String extraProperties; |
|||
/** |
|||
* 地点ID |
|||
*/ |
|||
private String siteId; |
|||
/** |
|||
* 代码 |
|||
*/ |
|||
private String code; |
|||
/** |
|||
* 用户组 |
|||
*/ |
|||
private String userGroupCode; |
|||
/** |
|||
* 部门 |
|||
*/ |
|||
private String departmentCode; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
} |
@ -1,39 +0,0 @@ |
|||
package com.win.module.wms.dal.mysql.containerbindrecord; |
|||
|
|||
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.containerbindrecord.vo.ContainerBindRecordDetailExportReqVO; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.ContainerBindRecordDetailPageReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerbindrecord.ContainerBindRecordDetailDO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具绑定记录子 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerBindRecordDetailMapper extends BaseMapperX<ContainerBindRecordDetailDO> { |
|||
|
|||
default PageResult<ContainerBindRecordDetailDO> selectPage(ContainerBindRecordDetailPageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<ContainerBindRecordDetailDO>() |
|||
.eqIfPresent(ContainerBindRecordDetailDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerBindRecordDetailDO::getPackingNumber, reqVO.getPackingNumber()) |
|||
.eqIfPresent(ContainerBindRecordDetailDO::getContainerNumber, reqVO.getContainerNumber()) |
|||
.eqIfPresent(ContainerBindRecordDetailDO::getRemark, reqVO.getRemark()) |
|||
.orderByDesc(ContainerBindRecordDetailDO::getId)); |
|||
} |
|||
|
|||
default List<ContainerBindRecordDetailDO> selectList(ContainerBindRecordDetailExportReqVO reqVO) { |
|||
return selectList(new LambdaQueryWrapperX<ContainerBindRecordDetailDO>() |
|||
.eqIfPresent(ContainerBindRecordDetailDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerBindRecordDetailDO::getPackingNumber, reqVO.getPackingNumber()) |
|||
.eqIfPresent(ContainerBindRecordDetailDO::getContainerNumber, reqVO.getContainerNumber()) |
|||
.eqIfPresent(ContainerBindRecordDetailDO::getRemark, reqVO.getRemark()) |
|||
.orderByDesc(ContainerBindRecordDetailDO::getId)); |
|||
} |
|||
|
|||
} |
@ -1,37 +0,0 @@ |
|||
package com.win.module.wms.dal.mysql.containerbindrecord; |
|||
|
|||
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.containerbindrecord.vo.ContainerBindRecordMainExportReqVO; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.ContainerBindRecordMainPageReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerbindrecord.ContainerBindRecordMainDO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具绑定记录主 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerBindRecordMainMapper extends BaseMapperX<ContainerBindRecordMainDO> { |
|||
|
|||
default PageResult<ContainerBindRecordMainDO> selectPage(ContainerBindRecordMainPageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<ContainerBindRecordMainDO>() |
|||
.eqIfPresent(ContainerBindRecordMainDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerBindRecordMainDO::getContainerNumber, reqVO.getContainerNumber()) |
|||
.eqIfPresent(ContainerBindRecordMainDO::getRemark, reqVO.getRemark()) |
|||
.orderByDesc(ContainerBindRecordMainDO::getId)); |
|||
} |
|||
|
|||
default List<ContainerBindRecordMainDO> selectList(ContainerBindRecordMainExportReqVO reqVO) { |
|||
return selectList(new LambdaQueryWrapperX<ContainerBindRecordMainDO>() |
|||
.eqIfPresent(ContainerBindRecordMainDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerBindRecordMainDO::getContainerNumber, reqVO.getContainerNumber()) |
|||
.eqIfPresent(ContainerBindRecordMainDO::getRemark, reqVO.getRemark()) |
|||
.orderByDesc(ContainerBindRecordMainDO::getId)); |
|||
} |
|||
|
|||
} |
@ -1,81 +0,0 @@ |
|||
package com.win.module.wms.service.containerbindrecord; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.*; |
|||
import com.win.module.wms.dal.dataobject.containerbindrecord.ContainerBindRecordDetailDO; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具绑定记录子 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface ContainerBindRecordDetailService { |
|||
|
|||
/** |
|||
* 创建器具绑定记录子 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
Long createContainerBindRecordDetail(@Valid ContainerBindRecordDetailCreateReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新器具绑定记录子 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
Integer updateContainerBindRecordDetail(@Valid ContainerBindRecordDetailUpdateReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除器具绑定记录子 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
Integer deleteContainerBindRecordDetail(Long id); |
|||
|
|||
/** |
|||
* 获得器具绑定记录子 |
|||
* |
|||
* @param id 编号 |
|||
* @return 器具绑定记录子 |
|||
*/ |
|||
ContainerBindRecordDetailDO getContainerBindRecordDetail(Long id); |
|||
|
|||
/** |
|||
* 获得器具绑定记录子列表 |
|||
* |
|||
* @param ids 编号 |
|||
* @return 器具绑定记录子列表 |
|||
*/ |
|||
List<ContainerBindRecordDetailDO> getContainerBindRecordDetailList(Collection<Long> ids); |
|||
|
|||
/** |
|||
* 获得器具绑定记录子分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return 器具绑定记录子分页 |
|||
*/ |
|||
PageResult<ContainerBindRecordDetailDO> getContainerBindRecordDetailPage(ContainerBindRecordDetailPageReqVO pageReqVO); |
|||
|
|||
/** |
|||
* 获得器具绑定记录子列表, 用于 Excel 导出 |
|||
* |
|||
* @param exportReqVO 查询条件 |
|||
* @return 器具绑定记录子列表 |
|||
*/ |
|||
List<ContainerBindRecordDetailDO> getContainerBindRecordDetailList(ContainerBindRecordDetailExportReqVO exportReqVO); |
|||
|
|||
/** |
|||
* 导入器具绑定记录子主信息 |
|||
* |
|||
* @param datas 导入器具绑定记录子主信息列表 |
|||
* @param mode 导入模式1更新2追加3覆盖 |
|||
* @param updatePart 是否支持更新 |
|||
* @return 导入结果 |
|||
*/ |
|||
public List<ContainerBindRecordDetailExcelVO> importContainerBindRecordDetailList(List<ContainerBindRecordDetailExcelVO> datas, Integer mode, boolean updatePart); |
|||
} |
@ -1,109 +0,0 @@ |
|||
package com.win.module.wms.service.containerbindrecord; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.*; |
|||
import com.win.module.wms.convert.containerbindrecord.ContainerBindRecordDetailConvert; |
|||
import com.win.module.wms.dal.dataobject.containerbindrecord.ContainerBindRecordDetailDO; |
|||
import com.win.module.wms.dal.mysql.containerbindrecord.ContainerBindRecordDetailMapper; |
|||
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_BIND_RECORD_DETAIL_IMPORT_LIST_IS_EMPTY; |
|||
import static com.win.module.wms.enums.ErrorCodeConstants.CONTAINER_BIND_RECORD_DETAIL_NOT_EXISTS; |
|||
|
|||
/** |
|||
* 器具绑定记录子 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class ContainerBindRecordDetailServiceImpl implements ContainerBindRecordDetailService { |
|||
|
|||
@Resource |
|||
private ContainerBindRecordDetailMapper containerBindRecordDetailMapper; |
|||
|
|||
@Override |
|||
public Long createContainerBindRecordDetail(ContainerBindRecordDetailCreateReqVO createReqVO) { |
|||
// 插入
|
|||
ContainerBindRecordDetailDO containerBindRecordDetail = ContainerBindRecordDetailConvert.INSTANCE.convert(createReqVO); |
|||
containerBindRecordDetailMapper.insert(containerBindRecordDetail); |
|||
// 返回
|
|||
return containerBindRecordDetail.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public Integer updateContainerBindRecordDetail(ContainerBindRecordDetailUpdateReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateContainerBindRecordDetailExists(updateReqVO.getId()); |
|||
// 更新
|
|||
ContainerBindRecordDetailDO updateObj = ContainerBindRecordDetailConvert.INSTANCE.convert(updateReqVO); |
|||
return containerBindRecordDetailMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public Integer deleteContainerBindRecordDetail(Long id) { |
|||
// 校验存在
|
|||
validateContainerBindRecordDetailExists(id); |
|||
// 删除
|
|||
return containerBindRecordDetailMapper.deleteById(id); |
|||
} |
|||
|
|||
private void validateContainerBindRecordDetailExists(Long id) { |
|||
if (containerBindRecordDetailMapper.selectById(id) == null) { |
|||
throw exception(CONTAINER_BIND_RECORD_DETAIL_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public ContainerBindRecordDetailDO getContainerBindRecordDetail(Long id) { |
|||
return containerBindRecordDetailMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerBindRecordDetailDO> getContainerBindRecordDetailList(Collection<Long> ids) { |
|||
return containerBindRecordDetailMapper.selectBatchIds(ids); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<ContainerBindRecordDetailDO> getContainerBindRecordDetailPage(ContainerBindRecordDetailPageReqVO pageReqVO) { |
|||
return containerBindRecordDetailMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerBindRecordDetailDO> getContainerBindRecordDetailList(ContainerBindRecordDetailExportReqVO exportReqVO) { |
|||
return containerBindRecordDetailMapper.selectList(exportReqVO); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerBindRecordDetailExcelVO> importContainerBindRecordDetailList(List<ContainerBindRecordDetailExcelVO> datas, Integer mode, boolean updatePart) { |
|||
if (CollUtil.isEmpty(datas)) { |
|||
throw exception(CONTAINER_BIND_RECORD_DETAIL_IMPORT_LIST_IS_EMPTY); |
|||
} |
|||
|
|||
List<ContainerBindRecordDetailExcelVO> errorList = new ArrayList<>(); |
|||
// datas.forEach(item -> {
|
|||
// if(errorList == null){
|
|||
// // 判断如果不存在,在进行插入
|
|||
// ContainerBindRecordDetailDO obj = containerBindRecordDetailMapper.selectByCode(item.getCode());
|
|||
// if (obj == null&& mode != 3) {
|
|||
// containerBindRecordDetailMapper.insert(ContainerBindRecordDetailConvert.INSTANCE.convert(item));
|
|||
// }
|
|||
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
|
|||
// ContainerBindRecordDetailDO containerBindRecordDetailDO = ContainerBindRecordDetailConvert.INSTANCE.convert(item);
|
|||
// containerBindRecordDetailDO.setId(obj.getId());
|
|||
// containerBindRecordDetailMapper.updateById(obj);
|
|||
// }
|
|||
// }
|
|||
// });
|
|||
|
|||
return errorList; |
|||
} |
|||
} |
@ -1,81 +0,0 @@ |
|||
package com.win.module.wms.service.containerbindrecord; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.*; |
|||
import com.win.module.wms.dal.dataobject.containerbindrecord.ContainerBindRecordMainDO; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具绑定记录主 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface ContainerBindRecordMainService { |
|||
|
|||
/** |
|||
* 创建器具绑定记录主 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
Long createContainerBindRecordMain(@Valid ContainerBindRecordMainCreateReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新器具绑定记录主 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
Integer updateContainerBindRecordMain(@Valid ContainerBindRecordMainUpdateReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除器具绑定记录主 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
Integer deleteContainerBindRecordMain(Long id); |
|||
|
|||
/** |
|||
* 获得器具绑定记录主 |
|||
* |
|||
* @param id 编号 |
|||
* @return 器具绑定记录主 |
|||
*/ |
|||
ContainerBindRecordMainDO getContainerBindRecordMain(Long id); |
|||
|
|||
/** |
|||
* 获得器具绑定记录主列表 |
|||
* |
|||
* @param ids 编号 |
|||
* @return 器具绑定记录主列表 |
|||
*/ |
|||
List<ContainerBindRecordMainDO> getContainerBindRecordMainList(Collection<Long> ids); |
|||
|
|||
/** |
|||
* 获得器具绑定记录主分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return 器具绑定记录主分页 |
|||
*/ |
|||
PageResult<ContainerBindRecordMainDO> getContainerBindRecordMainPage(ContainerBindRecordMainPageReqVO pageReqVO); |
|||
|
|||
/** |
|||
* 获得器具绑定记录主列表, 用于 Excel 导出 |
|||
* |
|||
* @param exportReqVO 查询条件 |
|||
* @return 器具绑定记录主列表 |
|||
*/ |
|||
List<ContainerBindRecordMainDO> getContainerBindRecordMainList(ContainerBindRecordMainExportReqVO exportReqVO); |
|||
|
|||
/** |
|||
* 导入器具绑定记录主主信息 |
|||
* |
|||
* @param datas 导入器具绑定记录主主信息列表 |
|||
* @param mode 导入模式1更新2追加3覆盖 |
|||
* @param updatePart 是否支持更新 |
|||
* @return 导入结果 |
|||
*/ |
|||
List<ContainerBindRecordMainExcelVO> importContainerBindRecordMainList(List<ContainerBindRecordMainExcelVO> datas, Integer mode, boolean updatePart); |
|||
} |
@ -1,109 +0,0 @@ |
|||
package com.win.module.wms.service.containerbindrecord; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerbindrecord.vo.*; |
|||
import com.win.module.wms.convert.containerbindrecord.ContainerBindRecordMainConvert; |
|||
import com.win.module.wms.dal.dataobject.containerbindrecord.ContainerBindRecordMainDO; |
|||
import com.win.module.wms.dal.mysql.containerbindrecord.ContainerBindRecordMainMapper; |
|||
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_BIND_RECORD_MAIN_IMPORT_LIST_IS_EMPTY; |
|||
import static com.win.module.wms.enums.ErrorCodeConstants.CONTAINER_BIND_RECORD_MAIN_NOT_EXISTS; |
|||
|
|||
/** |
|||
* 器具绑定记录主 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class ContainerBindRecordMainServiceImpl implements ContainerBindRecordMainService { |
|||
|
|||
@Resource |
|||
private ContainerBindRecordMainMapper containerBindRecordMainMapper; |
|||
|
|||
@Override |
|||
public Long createContainerBindRecordMain(ContainerBindRecordMainCreateReqVO createReqVO) { |
|||
// 插入
|
|||
ContainerBindRecordMainDO containerBindRecordMain = ContainerBindRecordMainConvert.INSTANCE.convert(createReqVO); |
|||
containerBindRecordMainMapper.insert(containerBindRecordMain); |
|||
// 返回
|
|||
return containerBindRecordMain.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public Integer updateContainerBindRecordMain(ContainerBindRecordMainUpdateReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateContainerBindRecordMainExists(updateReqVO.getId()); |
|||
// 更新
|
|||
ContainerBindRecordMainDO updateObj = ContainerBindRecordMainConvert.INSTANCE.convert(updateReqVO); |
|||
return containerBindRecordMainMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public Integer deleteContainerBindRecordMain(Long id) { |
|||
// 校验存在
|
|||
validateContainerBindRecordMainExists(id); |
|||
// 删除
|
|||
return containerBindRecordMainMapper.deleteById(id); |
|||
} |
|||
|
|||
private void validateContainerBindRecordMainExists(Long id) { |
|||
if (containerBindRecordMainMapper.selectById(id) == null) { |
|||
throw exception(CONTAINER_BIND_RECORD_MAIN_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public ContainerBindRecordMainDO getContainerBindRecordMain(Long id) { |
|||
return containerBindRecordMainMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerBindRecordMainDO> getContainerBindRecordMainList(Collection<Long> ids) { |
|||
return containerBindRecordMainMapper.selectBatchIds(ids); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<ContainerBindRecordMainDO> getContainerBindRecordMainPage(ContainerBindRecordMainPageReqVO pageReqVO) { |
|||
return containerBindRecordMainMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerBindRecordMainDO> getContainerBindRecordMainList(ContainerBindRecordMainExportReqVO exportReqVO) { |
|||
return containerBindRecordMainMapper.selectList(exportReqVO); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerBindRecordMainExcelVO> importContainerBindRecordMainList(List<ContainerBindRecordMainExcelVO> datas, Integer mode, boolean updatePart) { |
|||
if (CollUtil.isEmpty(datas)) { |
|||
throw exception(CONTAINER_BIND_RECORD_MAIN_IMPORT_LIST_IS_EMPTY); |
|||
} |
|||
|
|||
List<ContainerBindRecordMainExcelVO> errorList = new ArrayList<>(); |
|||
// datas.forEach(item -> {
|
|||
// if(errorList == null){
|
|||
// // 判断如果不存在,在进行插入
|
|||
// ContainerBindRecordMainDO obj = containerBindRecordMainMapper.selectByCode(item.getCode());
|
|||
// if (obj == null&& mode != 3) {
|
|||
// containerBindRecordMainMapper.insert(ContainerBindRecordMainConvert.INSTANCE.convert(item));
|
|||
// }
|
|||
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
|
|||
// ContainerBindRecordMainDO containerBindRecordMainDO = ContainerBindRecordMainConvert.INSTANCE.convert(item);
|
|||
// containerBindRecordMainDO.setId(obj.getId());
|
|||
// containerBindRecordMainMapper.updateById(obj);
|
|||
// }
|
|||
// }
|
|||
// });
|
|||
|
|||
return errorList; |
|||
} |
|||
} |
@ -1,12 +0,0 @@ |
|||
<?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.containerbindrecord.ContainerBindRecordDetailMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
@ -1,12 +0,0 @@ |
|||
<?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.containerbindrecord.ContainerBindRecordMainMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue