forked from sfms3.0/sfms3.0
31 changed files with 1643 additions and 2 deletions
@ -0,0 +1,135 @@ |
|||
package com.win.module.wms.controller.containerinit; |
|||
|
|||
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.containerinit.vo.*; |
|||
import com.win.module.wms.convert.containerinit.ContainerInitRecordDetailConvert; |
|||
import com.win.module.wms.dal.dataobject.containerinit.ContainerInitRecordDetailDO; |
|||
import com.win.module.wms.service.containerinit.ContainerInitRecordDetailService; |
|||
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-init-record-detail") |
|||
@Validated |
|||
public class ContainerInitRecordDetailController { |
|||
|
|||
@Resource |
|||
private ContainerInitRecordDetailService containerInitRecordDetailService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建器具初始化记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-detail:create')") |
|||
public CommonResult<Long> createContainerInitRecordDetail(@Valid @RequestBody ContainerInitRecordDetailCreateReqVO createReqVO) { |
|||
return success(containerInitRecordDetailService.createContainerInitRecordDetail(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新器具初始化记录子") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-detail:update')") |
|||
public CommonResult<Boolean> updateContainerInitRecordDetail(@Valid @RequestBody ContainerInitRecordDetailUpdateReqVO updateReqVO) { |
|||
int result = containerInitRecordDetailService.updateContainerInitRecordDetail(updateReqVO); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除器具初始化记录子") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-detail:delete')") |
|||
public CommonResult<Boolean> deleteContainerInitRecordDetail(@RequestParam("id") Long id) { |
|||
int result = containerInitRecordDetailService.deleteContainerInitRecordDetail(id); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得器具初始化记录子") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-detail:query')") |
|||
public CommonResult<ContainerInitRecordDetailRespVO> getContainerInitRecordDetail(@RequestParam("id") Long id) { |
|||
ContainerInitRecordDetailDO containerInitRecordDetail = containerInitRecordDetailService.getContainerInitRecordDetail(id); |
|||
return success(ContainerInitRecordDetailConvert.INSTANCE.convert(containerInitRecordDetail)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得器具初始化记录子列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-detail:query')") |
|||
public CommonResult<List<ContainerInitRecordDetailRespVO>> getContainerInitRecordDetailList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<ContainerInitRecordDetailDO> list = containerInitRecordDetailService.getContainerInitRecordDetailList(ids); |
|||
return success(ContainerInitRecordDetailConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得器具初始化记录子分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-detail:query')") |
|||
public CommonResult<PageResult<ContainerInitRecordDetailRespVO>> getContainerInitRecordDetailPage(@Valid ContainerInitRecordDetailPageReqVO pageVO) { |
|||
PageResult<ContainerInitRecordDetailDO> pageResult = containerInitRecordDetailService.getContainerInitRecordDetailPage(pageVO); |
|||
return success(ContainerInitRecordDetailConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出器具初始化记录子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-detail:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportContainerInitRecordDetailExcel(@Valid ContainerInitRecordDetailExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<ContainerInitRecordDetailDO> list = containerInitRecordDetailService.getContainerInitRecordDetailList(exportReqVO); |
|||
// 导出 Excel
|
|||
List<ContainerInitRecordDetailExcelVO> datas = ContainerInitRecordDetailConvert.INSTANCE.convertList02(list); |
|||
ExcelUtils.write(response, "器具初始化记录子.xls", "数据", ContainerInitRecordDetailExcelVO.class, datas); |
|||
} |
|||
|
|||
@GetMapping("/get-import-template") |
|||
@Operation(summary = "获得导入器具初始化记录子模板") |
|||
public void importTemplate(HttpServletResponse response) throws IOException { |
|||
List<ContainerInitRecordDetailExcelVO> list = Arrays.asList(); |
|||
// 输出
|
|||
ExcelUtils.write(response, "器具初始化记录子基本信息导入模板.xls", "器具初始化记录子基本信息列表", ContainerInitRecordDetailExcelVO.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-init-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<ContainerInitRecordDetailExcelVO> list = ExcelUtils.read(file, ContainerInitRecordDetailExcelVO.class); |
|||
List<ContainerInitRecordDetailExcelVO> errorList = containerInitRecordDetailService.importContainerInitRecordDetailList(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,134 @@ |
|||
package com.win.module.wms.controller.containerinit; |
|||
|
|||
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.containerinit.vo.*; |
|||
import com.win.module.wms.convert.containerinit.ContainerInitRecordMainConvert; |
|||
import com.win.module.wms.dal.dataobject.containerinit.ContainerInitRecordMainDO; |
|||
import com.win.module.wms.service.containerinit.ContainerInitRecordMainService; |
|||
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-init-record-main") |
|||
@Validated |
|||
public class ContainerInitRecordMainController { |
|||
|
|||
@Resource |
|||
private ContainerInitRecordMainService containerInitRecordMainService; |
|||
|
|||
@PostMapping("/create") |
|||
@Operation(summary = "创建器具初始化记录主") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-main:create')") |
|||
public CommonResult<Long> createContainerInitRecordMain(@Valid @RequestBody ContainerInitRecordMainCreateReqVO createReqVO) { |
|||
return success(containerInitRecordMainService.createContainerInitRecordMain(createReqVO)); |
|||
} |
|||
|
|||
@PutMapping("/update") |
|||
@Operation(summary = "更新器具初始化记录主") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-main:update')") |
|||
public CommonResult<Boolean> updateContainerInitRecordMain(@Valid @RequestBody ContainerInitRecordMainUpdateReqVO updateReqVO) { |
|||
int result = containerInitRecordMainService.updateContainerInitRecordMain(updateReqVO); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@DeleteMapping("/delete") |
|||
@Operation(summary = "删除器具初始化记录主") |
|||
@Parameter(name = "id", description = "编号", required = true) |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-main:delete')") |
|||
public CommonResult<Boolean> deleteContainerInitRecordMain(@RequestParam("id") Long id) { |
|||
int result = containerInitRecordMainService.deleteContainerInitRecordMain(id); |
|||
return success(result > 0); |
|||
} |
|||
|
|||
@GetMapping("/get") |
|||
@Operation(summary = "获得器具初始化记录主") |
|||
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-main:query')") |
|||
public CommonResult<ContainerInitRecordMainRespVO> getContainerInitRecordMain(@RequestParam("id") Long id) { |
|||
ContainerInitRecordMainDO containerInitRecordMain = containerInitRecordMainService.getContainerInitRecordMain(id); |
|||
return success(ContainerInitRecordMainConvert.INSTANCE.convert(containerInitRecordMain)); |
|||
} |
|||
|
|||
@GetMapping("/list") |
|||
@Operation(summary = "获得器具初始化记录主列表") |
|||
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-main:query')") |
|||
public CommonResult<List<ContainerInitRecordMainRespVO>> getContainerInitRecordMainList(@RequestParam("ids") Collection<Long> ids) { |
|||
List<ContainerInitRecordMainDO> list = containerInitRecordMainService.getContainerInitRecordMainList(ids); |
|||
return success(ContainerInitRecordMainConvert.INSTANCE.convertList(list)); |
|||
} |
|||
|
|||
@GetMapping("/page") |
|||
@Operation(summary = "获得器具初始化记录主分页") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-main:query')") |
|||
public CommonResult<PageResult<ContainerInitRecordMainRespVO>> getContainerInitRecordMainPage(@Valid ContainerInitRecordMainPageReqVO pageVO) { |
|||
PageResult<ContainerInitRecordMainDO> pageResult = containerInitRecordMainService.getContainerInitRecordMainPage(pageVO); |
|||
return success(ContainerInitRecordMainConvert.INSTANCE.convertPage(pageResult)); |
|||
} |
|||
|
|||
@GetMapping("/export-excel") |
|||
@Operation(summary = "导出器具初始化记录主子 Excel") |
|||
@PreAuthorize("@ss.hasPermission('wms:container-init-record-main:export')") |
|||
@OperateLog(type = EXPORT) |
|||
public void exportContainerInitRecordMainExcel(@Valid ContainerInitRecordMainExportReqVO exportReqVO, |
|||
HttpServletResponse response) throws IOException { |
|||
List<ContainerInitRecordMainExcelVO> list = containerInitRecordMainService.getContainerInitRecordMainList(exportReqVO); |
|||
// 导出 Excel
|
|||
ExcelUtils.write(response, "器具初始化记录.xls", "数据", ContainerInitRecordMainExcelVO.class, list); |
|||
} |
|||
|
|||
@GetMapping("/get-import-template") |
|||
@Operation(summary = "获得导入器具初始化记录主模板") |
|||
public void importTemplate(HttpServletResponse response) throws IOException { |
|||
List<ContainerInitRecordMainExcelVO> list = Arrays.asList(); |
|||
// 输出
|
|||
ExcelUtils.write(response, "器具初始化记录主基本信息导入模板.xls", "器具初始化记录主基本信息列表", ContainerInitRecordMainExcelVO.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-init-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<ContainerInitRecordMainExcelVO> list = ExcelUtils.read(file, ContainerInitRecordMainExcelVO.class); |
|||
List<ContainerInitRecordMainExcelVO> errorList = containerInitRecordMainService.importContainerInitRecordMainList(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,48 @@ |
|||
package com.win.module.wms.controller.containerinit.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 ContainerInitRecordDetailBaseVO { |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") |
|||
@NotNull(message = "类型不能为空") |
|||
private String type; |
|||
|
|||
@Schema(description = "总容量") |
|||
private BigDecimal capacity; |
|||
|
|||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|||
@NotNull(message = "状态不能为空") |
|||
private String status; |
|||
|
|||
@Schema(description = "货主代码", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "货主代码不能为空") |
|||
private String ownerCode; |
|||
|
|||
@Schema(description = "主表ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1372") |
|||
@NotNull(message = "主表ID不能为空") |
|||
private Long masterId; |
|||
|
|||
@Schema(description = "单据号", requiredMode = Schema.RequiredMode.REQUIRED) |
|||
@NotNull(message = "单据号不能为空") |
|||
private String number; |
|||
|
|||
@Schema(description = "地点ID", example = "5160") |
|||
private String siteId; |
|||
|
|||
@Schema(description = "备注", example = "随便") |
|||
private String remark; |
|||
|
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.win.module.wms.controller.containerinit.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 ContainerInitRecordDetailCreateReqVO extends ContainerInitRecordDetailBaseVO { |
|||
|
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.win.module.wms.controller.containerinit.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 器具初始化记录子 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class ContainerInitRecordDetailExcelVO { |
|||
|
|||
|
|||
@ExcelProperty("器具号") |
|||
private String containerNumber; |
|||
|
|||
@ExcelProperty("类型") |
|||
private String type; |
|||
|
|||
@ExcelProperty("总容量") |
|||
private BigDecimal capacity; |
|||
|
|||
@ExcelProperty("状态") |
|||
private String status; |
|||
|
|||
@ExcelProperty("货主代码") |
|||
private String ownerCode; |
|||
|
|||
@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,47 @@ |
|||
package com.win.module.wms.controller.containerinit.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,参数和 ContainerInitRecordDetailPageReqVO 是一致的") |
|||
@Data |
|||
public class ContainerInitRecordDetailExportReqVO { |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "类型", example = "2") |
|||
private String type; |
|||
|
|||
@Schema(description = "总容量") |
|||
private BigDecimal capacity; |
|||
|
|||
@Schema(description = "状态", example = "1") |
|||
private String status; |
|||
|
|||
@Schema(description = "货主代码") |
|||
private String ownerCode; |
|||
|
|||
@Schema(description = "主表ID", example = "1372") |
|||
private Long masterId; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "地点ID", example = "5160") |
|||
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,52 @@ |
|||
package com.win.module.wms.controller.containerinit.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 ContainerInitRecordDetailPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "器具号") |
|||
private String containerNumber; |
|||
|
|||
@Schema(description = "类型", example = "2") |
|||
private String type; |
|||
|
|||
@Schema(description = "总容量") |
|||
private BigDecimal capacity; |
|||
|
|||
@Schema(description = "状态", example = "1") |
|||
private String status; |
|||
|
|||
@Schema(description = "货主代码") |
|||
private String ownerCode; |
|||
|
|||
@Schema(description = "主表ID", example = "1372") |
|||
private Long masterId; |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@Schema(description = "地点ID", example = "5160") |
|||
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,19 @@ |
|||
package com.win.module.wms.controller.containerinit.vo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.*; |
|||
import java.time.LocalDateTime; |
|||
|
|||
@Schema(description = "管理后台 - 器具初始化记录子 Response VO") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
public class ContainerInitRecordDetailRespVO extends ContainerInitRecordDetailBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27503") |
|||
private Long id; |
|||
|
|||
@Schema(description = "创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.win.module.wms.controller.containerinit.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 ContainerInitRecordDetailUpdateReqVO extends ContainerInitRecordDetailBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27503") |
|||
@NotNull(message = "id不能为空") |
|||
private Long id; |
|||
|
|||
} |
@ -0,0 +1,88 @@ |
|||
package com.win.module.wms.controller.containerinit.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 ContainerInitRecordMainBaseVO { |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@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 = "2") |
|||
private String businessType; |
|||
|
|||
@Schema(description = "备注", example = "你猜") |
|||
private String remark; |
|||
|
|||
@Schema(description = "扩展属性") |
|||
private String extraProperties; |
|||
|
|||
@Schema(description = "地点ID", example = "17905") |
|||
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.containerinit.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 ContainerInitRecordMainCreateReqVO extends ContainerInitRecordMainBaseVO { |
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.win.module.wms.controller.containerinit.vo; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 器具初始化记录主 Excel VO |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Data |
|||
public class ContainerInitRecordMainExcelVO { |
|||
|
|||
|
|||
@ExcelProperty("单据号") |
|||
private String number; |
|||
|
|||
@ExcelProperty("仓库代码") |
|||
private String fromWarehouseCode; |
|||
|
|||
@ExcelProperty("器具号") |
|||
private String containerNumber; |
|||
|
|||
@ExcelProperty("类型") |
|||
private String type; |
|||
|
|||
@ExcelProperty("总容量") |
|||
private BigDecimal capacity; |
|||
|
|||
@ExcelProperty("状态") |
|||
private String status; |
|||
|
|||
@ExcelProperty("货主代码") |
|||
private String ownerCode; |
|||
|
|||
@ExcelProperty("创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -0,0 +1,89 @@ |
|||
package com.win.module.wms.controller.containerinit.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,参数和 ContainerInitRecordMainPageReqVO 是一致的") |
|||
@Data |
|||
public class ContainerInitRecordMainExportReqVO { |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@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 = "2") |
|||
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 = "17905") |
|||
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,94 @@ |
|||
package com.win.module.wms.controller.containerinit.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 ContainerInitRecordMainPageReqVO extends PageParam { |
|||
|
|||
@Schema(description = "单据号") |
|||
private String number; |
|||
|
|||
@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 = "2") |
|||
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 = "17905") |
|||
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.containerinit.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 ContainerInitRecordMainRespVO extends ContainerInitRecordMainBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8791") |
|||
private Long id; |
|||
|
|||
@Schema(description = "创建时间") |
|||
private LocalDateTime createTime; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.win.module.wms.controller.containerinit.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 ContainerInitRecordMainUpdateReqVO extends ContainerInitRecordMainBaseVO { |
|||
|
|||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8791") |
|||
@NotNull(message = "id不能为空") |
|||
private Long id; |
|||
|
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.win.module.wms.convert.containerinit; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerinit.vo.ContainerInitRecordDetailCreateReqVO; |
|||
import com.win.module.wms.controller.containerinit.vo.ContainerInitRecordDetailExcelVO; |
|||
import com.win.module.wms.controller.containerinit.vo.ContainerInitRecordDetailRespVO; |
|||
import com.win.module.wms.controller.containerinit.vo.ContainerInitRecordDetailUpdateReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerinit.ContainerInitRecordDetailDO; |
|||
import org.mapstruct.Mapper; |
|||
import org.mapstruct.factory.Mappers; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具初始化记录子 Convert |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerInitRecordDetailConvert { |
|||
|
|||
ContainerInitRecordDetailConvert INSTANCE = Mappers.getMapper(ContainerInitRecordDetailConvert.class); |
|||
|
|||
ContainerInitRecordDetailDO convert(ContainerInitRecordDetailCreateReqVO bean); |
|||
|
|||
ContainerInitRecordDetailDO convert(ContainerInitRecordDetailUpdateReqVO bean); |
|||
|
|||
ContainerInitRecordDetailRespVO convert(ContainerInitRecordDetailDO bean); |
|||
|
|||
List<ContainerInitRecordDetailRespVO> convertList(List<ContainerInitRecordDetailDO> list); |
|||
|
|||
PageResult<ContainerInitRecordDetailRespVO> convertPage(PageResult<ContainerInitRecordDetailDO> page); |
|||
|
|||
List<ContainerInitRecordDetailExcelVO> convertList02(List<ContainerInitRecordDetailDO> list); |
|||
|
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.win.module.wms.convert.containerinit; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerinit.vo.ContainerInitRecordMainCreateReqVO; |
|||
import com.win.module.wms.controller.containerinit.vo.ContainerInitRecordMainExcelVO; |
|||
import com.win.module.wms.controller.containerinit.vo.ContainerInitRecordMainRespVO; |
|||
import com.win.module.wms.controller.containerinit.vo.ContainerInitRecordMainUpdateReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerinit.ContainerInitRecordMainDO; |
|||
import org.mapstruct.Mapper; |
|||
import org.mapstruct.factory.Mappers; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具初始化记录主 Convert |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerInitRecordMainConvert { |
|||
|
|||
ContainerInitRecordMainConvert INSTANCE = Mappers.getMapper(ContainerInitRecordMainConvert.class); |
|||
|
|||
ContainerInitRecordMainDO convert(ContainerInitRecordMainCreateReqVO bean); |
|||
|
|||
ContainerInitRecordMainDO convert(ContainerInitRecordMainUpdateReqVO bean); |
|||
|
|||
ContainerInitRecordMainRespVO convert(ContainerInitRecordMainDO bean); |
|||
|
|||
List<ContainerInitRecordMainRespVO> convertList(List<ContainerInitRecordMainDO> list); |
|||
|
|||
PageResult<ContainerInitRecordMainRespVO> convertPage(PageResult<ContainerInitRecordMainDO> page); |
|||
|
|||
List<ContainerInitRecordMainExcelVO> convertList02(List<ContainerInitRecordMainDO> list); |
|||
|
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.win.module.wms.dal.dataobject.containerinit; |
|||
|
|||
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_init_detail") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class ContainerInitRecordDetailDO extends BaseDO { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId |
|||
private Long id; |
|||
/** |
|||
* 器具号 |
|||
*/ |
|||
private String containerNumber; |
|||
/** |
|||
* 类型 |
|||
*/ |
|||
private String type; |
|||
/** |
|||
* 总容量 |
|||
*/ |
|||
private BigDecimal capacity; |
|||
/** |
|||
* 状态 |
|||
*/ |
|||
private String status; |
|||
/** |
|||
* 货主代码 |
|||
*/ |
|||
private String ownerCode; |
|||
/** |
|||
* 主表ID |
|||
*/ |
|||
private Long masterId; |
|||
/** |
|||
* 单据号 |
|||
*/ |
|||
private String number; |
|||
/** |
|||
* 地点ID |
|||
*/ |
|||
private String siteId; |
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
} |
@ -0,0 +1,118 @@ |
|||
package com.win.module.wms.dal.dataobject.containerinit; |
|||
|
|||
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_init_main") |
|||
@Data |
|||
@EqualsAndHashCode(callSuper = true) |
|||
@ToString(callSuper = true) |
|||
@Builder |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class ContainerInitRecordMainDO extends BaseDO { |
|||
|
|||
/** |
|||
* id |
|||
*/ |
|||
@TableId |
|||
private Long id; |
|||
/** |
|||
* 单据号 |
|||
*/ |
|||
private String number; |
|||
/** |
|||
* 从仓库代码 |
|||
*/ |
|||
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,51 @@ |
|||
package com.win.module.wms.dal.mysql.containerinit; |
|||
|
|||
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.containerinit.vo.ContainerInitRecordDetailExportReqVO; |
|||
import com.win.module.wms.controller.containerinit.vo.ContainerInitRecordDetailPageReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerinit.ContainerInitRecordDetailDO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具初始化记录子 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerInitRecordDetailMapper extends BaseMapperX<ContainerInitRecordDetailDO> { |
|||
|
|||
default PageResult<ContainerInitRecordDetailDO> selectPage(ContainerInitRecordDetailPageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<ContainerInitRecordDetailDO>() |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getContainerNumber, reqVO.getContainerNumber()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getType, reqVO.getType()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getCapacity, reqVO.getCapacity()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getStatus, reqVO.getStatus()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getOwnerCode, reqVO.getOwnerCode()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getMasterId, reqVO.getMasterId()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getSiteId, reqVO.getSiteId()) |
|||
.betweenIfPresent(ContainerInitRecordDetailDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getRemark, reqVO.getRemark()) |
|||
.orderByDesc(ContainerInitRecordDetailDO::getId)); |
|||
} |
|||
|
|||
default List<ContainerInitRecordDetailDO> selectList(ContainerInitRecordDetailExportReqVO reqVO) { |
|||
return selectList(new LambdaQueryWrapperX<ContainerInitRecordDetailDO>() |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getContainerNumber, reqVO.getContainerNumber()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getType, reqVO.getType()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getCapacity, reqVO.getCapacity()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getStatus, reqVO.getStatus()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getOwnerCode, reqVO.getOwnerCode()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getMasterId, reqVO.getMasterId()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getSiteId, reqVO.getSiteId()) |
|||
.betweenIfPresent(ContainerInitRecordDetailDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(ContainerInitRecordDetailDO::getRemark, reqVO.getRemark()) |
|||
.orderByDesc(ContainerInitRecordDetailDO::getId)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.win.module.wms.dal.mysql.containerinit; |
|||
|
|||
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.containerinit.vo.ContainerInitRecordMainExportReqVO; |
|||
import com.win.module.wms.controller.containerinit.vo.ContainerInitRecordMainPageReqVO; |
|||
import com.win.module.wms.dal.dataobject.containerinit.ContainerInitRecordMainDO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具初始化记录主 Mapper |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Mapper |
|||
public interface ContainerInitRecordMainMapper extends BaseMapperX<ContainerInitRecordMainDO> { |
|||
|
|||
default PageResult<ContainerInitRecordMainDO> selectPage(ContainerInitRecordMainPageReqVO reqVO) { |
|||
return selectPage(reqVO, new LambdaQueryWrapperX<ContainerInitRecordMainDO>() |
|||
.eqIfPresent(ContainerInitRecordMainDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getFromWarehouseCode, reqVO.getFromWarehouseCode()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getToWarehouseCode, reqVO.getToWarehouseCode()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getOutTransactionType, reqVO.getOutTransactionType()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getInTransactionType, reqVO.getInTransactionType()) |
|||
.betweenIfPresent(ContainerInitRecordMainDO::getExecuteTime, reqVO.getExecuteTime()) |
|||
.betweenIfPresent(ContainerInitRecordMainDO::getActiveDate, reqVO.getActiveDate()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getAvailable, reqVO.getAvailable()) |
|||
.betweenIfPresent(ContainerInitRecordMainDO::getRequestTime, reqVO.getRequestTime()) |
|||
.betweenIfPresent(ContainerInitRecordMainDO::getDueTime, reqVO.getDueTime()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getDepartmentCode, reqVO.getDepartmentCode()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getUserGroupCode, reqVO.getUserGroupCode()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getInterfaceType, reqVO.getInterfaceType()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getBusinessType, reqVO.getBusinessType()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getRemark, reqVO.getRemark()) |
|||
.betweenIfPresent(ContainerInitRecordMainDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getExtraProperties, reqVO.getExtraProperties()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getSiteId, reqVO.getSiteId()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getCode, reqVO.getCode()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getFromLocationTypes, reqVO.getFromLocationTypes()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getToLocationTypes, reqVO.getToLocationTypes()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getFromAreaCodes, reqVO.getFromAreaCodes()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getToAreaCodes, reqVO.getToAreaCodes()) |
|||
.orderByDesc(ContainerInitRecordMainDO::getId)); |
|||
} |
|||
|
|||
default List<ContainerInitRecordMainDO> selectList(ContainerInitRecordMainExportReqVO reqVO) { |
|||
return selectList(new LambdaQueryWrapperX<ContainerInitRecordMainDO>() |
|||
.eqIfPresent(ContainerInitRecordMainDO::getNumber, reqVO.getNumber()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getFromWarehouseCode, reqVO.getFromWarehouseCode()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getToWarehouseCode, reqVO.getToWarehouseCode()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getOutTransactionType, reqVO.getOutTransactionType()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getInTransactionType, reqVO.getInTransactionType()) |
|||
.betweenIfPresent(ContainerInitRecordMainDO::getExecuteTime, reqVO.getExecuteTime()) |
|||
.betweenIfPresent(ContainerInitRecordMainDO::getActiveDate, reqVO.getActiveDate()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getAvailable, reqVO.getAvailable()) |
|||
.betweenIfPresent(ContainerInitRecordMainDO::getRequestTime, reqVO.getRequestTime()) |
|||
.betweenIfPresent(ContainerInitRecordMainDO::getDueTime, reqVO.getDueTime()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getDepartmentCode, reqVO.getDepartmentCode()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getUserGroupCode, reqVO.getUserGroupCode()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getInterfaceType, reqVO.getInterfaceType()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getBusinessType, reqVO.getBusinessType()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getRemark, reqVO.getRemark()) |
|||
.betweenIfPresent(ContainerInitRecordMainDO::getCreateTime, reqVO.getCreateTime()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getExtraProperties, reqVO.getExtraProperties()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getSiteId, reqVO.getSiteId()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getCode, reqVO.getCode()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getFromLocationTypes, reqVO.getFromLocationTypes()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getToLocationTypes, reqVO.getToLocationTypes()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getFromAreaCodes, reqVO.getFromAreaCodes()) |
|||
.eqIfPresent(ContainerInitRecordMainDO::getToAreaCodes, reqVO.getToAreaCodes()) |
|||
.orderByDesc(ContainerInitRecordMainDO::getId)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,81 @@ |
|||
package com.win.module.wms.service.containerinit; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerinit.vo.*; |
|||
import com.win.module.wms.dal.dataobject.containerinit.ContainerInitRecordDetailDO; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具初始化记录子 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface ContainerInitRecordDetailService { |
|||
|
|||
/** |
|||
* 创建器具初始化记录子 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
Long createContainerInitRecordDetail(@Valid ContainerInitRecordDetailCreateReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新器具初始化记录子 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
Integer updateContainerInitRecordDetail(@Valid ContainerInitRecordDetailUpdateReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除器具初始化记录子 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
Integer deleteContainerInitRecordDetail(Long id); |
|||
|
|||
/** |
|||
* 获得器具初始化记录子 |
|||
* |
|||
* @param id 编号 |
|||
* @return 器具初始化记录子 |
|||
*/ |
|||
ContainerInitRecordDetailDO getContainerInitRecordDetail(Long id); |
|||
|
|||
/** |
|||
* 获得器具初始化记录子列表 |
|||
* |
|||
* @param ids 编号 |
|||
* @return 器具初始化记录子列表 |
|||
*/ |
|||
List<ContainerInitRecordDetailDO> getContainerInitRecordDetailList(Collection<Long> ids); |
|||
|
|||
/** |
|||
* 获得器具初始化记录子分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return 器具初始化记录子分页 |
|||
*/ |
|||
PageResult<ContainerInitRecordDetailDO> getContainerInitRecordDetailPage(ContainerInitRecordDetailPageReqVO pageReqVO); |
|||
|
|||
/** |
|||
* 获得器具初始化记录子列表, 用于 Excel 导出 |
|||
* |
|||
* @param exportReqVO 查询条件 |
|||
* @return 器具初始化记录子列表 |
|||
*/ |
|||
List<ContainerInitRecordDetailDO> getContainerInitRecordDetailList(ContainerInitRecordDetailExportReqVO exportReqVO); |
|||
|
|||
/** |
|||
* 导入器具初始化记录子主信息 |
|||
* |
|||
* @param datas 导入器具初始化记录子主信息列表 |
|||
* @param mode 导入模式1更新2追加3覆盖 |
|||
* @param updatePart 是否支持更新 |
|||
* @return 导入结果 |
|||
*/ |
|||
public List<ContainerInitRecordDetailExcelVO> importContainerInitRecordDetailList(List<ContainerInitRecordDetailExcelVO> datas, Integer mode, boolean updatePart); |
|||
} |
@ -0,0 +1,81 @@ |
|||
package com.win.module.wms.service.containerinit; |
|||
|
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerinit.vo.*; |
|||
import com.win.module.wms.dal.dataobject.containerinit.ContainerInitRecordMainDO; |
|||
|
|||
import javax.validation.Valid; |
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 器具初始化记录主 Service 接口 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
public interface ContainerInitRecordMainService { |
|||
|
|||
/** |
|||
* 创建器具初始化记录主 |
|||
* |
|||
* @param createReqVO 创建信息 |
|||
* @return 编号 |
|||
*/ |
|||
Long createContainerInitRecordMain(@Valid ContainerInitRecordMainCreateReqVO createReqVO); |
|||
|
|||
/** |
|||
* 更新器具初始化记录主 |
|||
* |
|||
* @param updateReqVO 更新信息 |
|||
*/ |
|||
Integer updateContainerInitRecordMain(@Valid ContainerInitRecordMainUpdateReqVO updateReqVO); |
|||
|
|||
/** |
|||
* 删除器具初始化记录主 |
|||
* |
|||
* @param id 编号 |
|||
*/ |
|||
Integer deleteContainerInitRecordMain(Long id); |
|||
|
|||
/** |
|||
* 获得器具初始化记录主 |
|||
* |
|||
* @param id 编号 |
|||
* @return 器具初始化记录主 |
|||
*/ |
|||
ContainerInitRecordMainDO getContainerInitRecordMain(Long id); |
|||
|
|||
/** |
|||
* 获得器具初始化记录主列表 |
|||
* |
|||
* @param ids 编号 |
|||
* @return 器具初始化记录主列表 |
|||
*/ |
|||
List<ContainerInitRecordMainDO> getContainerInitRecordMainList(Collection<Long> ids); |
|||
|
|||
/** |
|||
* 获得器具初始化记录主分页 |
|||
* |
|||
* @param pageReqVO 分页查询 |
|||
* @return 器具初始化记录主分页 |
|||
*/ |
|||
PageResult<ContainerInitRecordMainDO> getContainerInitRecordMainPage(ContainerInitRecordMainPageReqVO pageReqVO); |
|||
|
|||
/** |
|||
* 获得器具初始化记录主列表, 用于 Excel 导出 |
|||
* |
|||
* @param exportReqVO 查询条件 |
|||
* @return 器具初始化记录主列表 |
|||
*/ |
|||
List<ContainerInitRecordMainExcelVO> getContainerInitRecordMainList(ContainerInitRecordMainExportReqVO exportReqVO); |
|||
|
|||
/** |
|||
* 导入器具初始化记录主主信息 |
|||
* |
|||
* @param datas 导入器具初始化记录主主信息列表 |
|||
* @param mode 导入模式1更新2追加3覆盖 |
|||
* @param updatePart 是否支持更新 |
|||
* @return 导入结果 |
|||
*/ |
|||
public List<ContainerInitRecordMainExcelVO> importContainerInitRecordMainList(List<ContainerInitRecordMainExcelVO> datas, Integer mode, boolean updatePart); |
|||
} |
@ -0,0 +1,137 @@ |
|||
package com.win.module.wms.service.containerinit; |
|||
|
|||
import cn.hutool.core.collection.CollUtil; |
|||
import com.win.framework.common.pojo.PageResult; |
|||
import com.win.module.wms.controller.containerinit.vo.*; |
|||
import com.win.module.wms.convert.containerinit.ContainerInitRecordMainConvert; |
|||
import com.win.module.wms.dal.dataobject.containerinit.ContainerInitRecordDetailDO; |
|||
import com.win.module.wms.dal.dataobject.containerinit.ContainerInitRecordMainDO; |
|||
import com.win.module.wms.dal.mysql.containerinit.ContainerInitRecordDetailMapper; |
|||
import com.win.module.wms.dal.mysql.containerinit.ContainerInitRecordMainMapper; |
|||
import org.springframework.beans.BeanUtils; |
|||
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 java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
import static com.win.framework.common.exception.util.ServiceExceptionUtil.exception; |
|||
import static com.win.module.wms.enums.ErrorCodeConstants.CONTAINER_INIT_RECORD_MAIN_IMPORT_LIST_IS_EMPTY; |
|||
import static com.win.module.wms.enums.ErrorCodeConstants.CONTAINER_INIT_RECORD_MAIN_NOT_EXISTS; |
|||
|
|||
/** |
|||
* 器具初始化记录主 Service 实现类 |
|||
* |
|||
* @author 超级管理员 |
|||
*/ |
|||
@Service |
|||
@Validated |
|||
public class ContainerInitRecordMainServiceImpl implements ContainerInitRecordMainService { |
|||
|
|||
@Resource |
|||
private ContainerInitRecordMainMapper containerInitRecordMainMapper; |
|||
@Resource |
|||
private ContainerInitRecordDetailMapper containerInitRecordDetailMapper; |
|||
|
|||
|
|||
@Override |
|||
public Long createContainerInitRecordMain(ContainerInitRecordMainCreateReqVO createReqVO) { |
|||
// 插入
|
|||
ContainerInitRecordMainDO containerInitRecordMain = ContainerInitRecordMainConvert.INSTANCE.convert(createReqVO); |
|||
containerInitRecordMainMapper.insert(containerInitRecordMain); |
|||
// 返回
|
|||
return containerInitRecordMain.getId(); |
|||
} |
|||
|
|||
@Override |
|||
public Integer updateContainerInitRecordMain(ContainerInitRecordMainUpdateReqVO updateReqVO) { |
|||
// 校验存在
|
|||
validateContainerInitRecordMainExists(updateReqVO.getId()); |
|||
// 更新
|
|||
ContainerInitRecordMainDO updateObj = ContainerInitRecordMainConvert.INSTANCE.convert(updateReqVO); |
|||
return containerInitRecordMainMapper.updateById(updateObj); |
|||
} |
|||
|
|||
@Override |
|||
public Integer deleteContainerInitRecordMain(Long id) { |
|||
// 校验存在
|
|||
validateContainerInitRecordMainExists(id); |
|||
// 删除
|
|||
return containerInitRecordMainMapper.deleteById(id); |
|||
} |
|||
|
|||
private void validateContainerInitRecordMainExists(Long id) { |
|||
if (containerInitRecordMainMapper.selectById(id) == null) { |
|||
throw exception(CONTAINER_INIT_RECORD_MAIN_NOT_EXISTS); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public ContainerInitRecordMainDO getContainerInitRecordMain(Long id) { |
|||
return containerInitRecordMainMapper.selectById(id); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerInitRecordMainDO> getContainerInitRecordMainList(Collection<Long> ids) { |
|||
return containerInitRecordMainMapper.selectBatchIds(ids); |
|||
} |
|||
|
|||
@Override |
|||
public PageResult<ContainerInitRecordMainDO> getContainerInitRecordMainPage(ContainerInitRecordMainPageReqVO pageReqVO) { |
|||
return containerInitRecordMainMapper.selectPage(pageReqVO); |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerInitRecordMainExcelVO> getContainerInitRecordMainList(ContainerInitRecordMainExportReqVO exportReqVO) { |
|||
List<ContainerInitRecordMainExcelVO> excelVOList = new ArrayList<>(); |
|||
List<ContainerInitRecordMainDO> mainDOList = containerInitRecordMainMapper.selectList(exportReqVO); |
|||
if(mainDOList != null && mainDOList.size() > 0){ |
|||
ContainerInitRecordDetailExportReqVO reqVO = new ContainerInitRecordDetailExportReqVO(); |
|||
BeanUtils.copyProperties(exportReqVO,reqVO); |
|||
List<ContainerInitRecordDetailDO> detailDOList = containerInitRecordDetailMapper.selectList(reqVO); |
|||
Map<Long,List<ContainerInitRecordDetailDO>> groupMasterIdMap = detailDOList.stream().collect(Collectors.groupingBy(ContainerInitRecordDetailDO::getMasterId)); |
|||
for(ContainerInitRecordMainDO mainDO:mainDOList){ |
|||
Long id = mainDO.getId(); |
|||
List<ContainerInitRecordDetailDO> detailChildList = groupMasterIdMap.get(id); |
|||
if(detailChildList != null && detailChildList.size() > 0){ |
|||
for(ContainerInitRecordDetailDO detailDO:detailChildList){ |
|||
ContainerInitRecordMainExcelVO containerInitRecordMainExcelVO = new ContainerInitRecordMainExcelVO(); |
|||
BeanUtils.copyProperties(mainDO,containerInitRecordMainExcelVO); |
|||
BeanUtils.copyProperties(detailDO,containerInitRecordMainExcelVO); |
|||
excelVOList.add(containerInitRecordMainExcelVO); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return excelVOList; |
|||
} |
|||
|
|||
@Override |
|||
public List<ContainerInitRecordMainExcelVO> importContainerInitRecordMainList(List<ContainerInitRecordMainExcelVO> datas, Integer mode, boolean updatePart) { |
|||
if (CollUtil.isEmpty(datas)) { |
|||
throw exception(CONTAINER_INIT_RECORD_MAIN_IMPORT_LIST_IS_EMPTY); |
|||
} |
|||
|
|||
List<ContainerInitRecordMainExcelVO> errorList = new ArrayList<>(); |
|||
// datas.forEach(item -> {
|
|||
// if(errorList == null){
|
|||
// // 判断如果不存在,在进行插入
|
|||
// ContainerInitRecordMainDO obj = containerInitRecordMainMapper.selectByCode(item.getCode());
|
|||
// if (obj == null&& mode != 3) {
|
|||
// containerInitRecordMainMapper.insert(ContainerInitRecordMainConvert.INSTANCE.convert(item));
|
|||
// }
|
|||
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
|
|||
// ContainerInitRecordMainDO containerInitRecordMainDO = ContainerInitRecordMainConvert.INSTANCE.convert(item);
|
|||
// containerInitRecordMainDO.setId(obj.getId());
|
|||
// containerInitRecordMainMapper.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.containerinit.ContainerInitRecordDetailMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 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.containerinit.ContainerInitRecordMainMapper"> |
|||
|
|||
<!-- |
|||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
|||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
|||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
|||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
|||
--> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue