forked from sfms3.0/sfms3.0
29 changed files with 1702 additions and 0 deletions
@ -0,0 +1,135 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair; |
||||
|
|
||||
|
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.containerRepair.vo.*; |
||||
|
import com.win.module.wms.convert.containerRepair.ContainerRepairRecordDetailConvert; |
||||
|
import com.win.module.wms.dal.dataobject.containerRepair.ContainerRepairRecordDetailDO; |
||||
|
import com.win.module.wms.service.containerRepair.ContainerRepairRecordDetailService; |
||||
|
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-repair-record-detail") |
||||
|
@Validated |
||||
|
public class ContainerRepairRecordDetailController { |
||||
|
|
||||
|
@Resource |
||||
|
private ContainerRepairRecordDetailService containerRepairRecordDetailService; |
||||
|
|
||||
|
@PostMapping("/create") |
||||
|
@Operation(summary = "创建器具维修记录子") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-detail:create')") |
||||
|
public CommonResult<Long> createContainerRepairRecordDetail(@Valid @RequestBody ContainerRepairRecordDetailCreateReqVO createReqVO) { |
||||
|
return success(containerRepairRecordDetailService.createContainerRepairRecordDetail(createReqVO)); |
||||
|
} |
||||
|
|
||||
|
@PutMapping("/update") |
||||
|
@Operation(summary = "更新器具维修记录子") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-detail:update')") |
||||
|
public CommonResult<Boolean> updateContainerRepairRecordDetail(@Valid @RequestBody ContainerRepairRecordDetailUpdateReqVO updateReqVO) { |
||||
|
int result = containerRepairRecordDetailService.updateContainerRepairRecordDetail(updateReqVO); |
||||
|
return success(result > 0); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping("/delete") |
||||
|
@Operation(summary = "删除器具维修记录子") |
||||
|
@Parameter(name = "id", description = "编号", required = true) |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-detail:delete')") |
||||
|
public CommonResult<Boolean> deleteContainerRepairRecordDetail(@RequestParam("id") Long id) { |
||||
|
int result = containerRepairRecordDetailService.deleteContainerRepairRecordDetail(id); |
||||
|
return success(result > 0); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/get") |
||||
|
@Operation(summary = "获得器具维修记录子") |
||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-detail:query')") |
||||
|
public CommonResult<ContainerRepairRecordDetailRespVO> getContainerRepairRecordDetail(@RequestParam("id") Long id) { |
||||
|
ContainerRepairRecordDetailDO containerRepairRecordDetail = containerRepairRecordDetailService.getContainerRepairRecordDetail(id); |
||||
|
return success(ContainerRepairRecordDetailConvert.INSTANCE.convert(containerRepairRecordDetail)); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/list") |
||||
|
@Operation(summary = "获得器具维修记录子列表") |
||||
|
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-detail:query')") |
||||
|
public CommonResult<List<ContainerRepairRecordDetailRespVO>> getContainerRepairRecordDetailList(@RequestParam("ids") Collection<Long> ids) { |
||||
|
List<ContainerRepairRecordDetailDO> list = containerRepairRecordDetailService.getContainerRepairRecordDetailList(ids); |
||||
|
return success(ContainerRepairRecordDetailConvert.INSTANCE.convertList(list)); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/page") |
||||
|
@Operation(summary = "获得器具维修记录子分页") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-detail:query')") |
||||
|
public CommonResult<PageResult<ContainerRepairRecordDetailRespVO>> getContainerRepairRecordDetailPage(@Valid ContainerRepairRecordDetailPageReqVO pageVO) { |
||||
|
PageResult<ContainerRepairRecordDetailDO> pageResult = containerRepairRecordDetailService.getContainerRepairRecordDetailPage(pageVO); |
||||
|
return success(ContainerRepairRecordDetailConvert.INSTANCE.convertPage(pageResult)); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/export-excel") |
||||
|
@Operation(summary = "导出器具维修记录子 Excel") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-detail:export')") |
||||
|
@OperateLog(type = EXPORT) |
||||
|
public void exportContainerRepairRecordDetailExcel(@Valid ContainerRepairRecordDetailExportReqVO exportReqVO, |
||||
|
HttpServletResponse response) throws IOException { |
||||
|
List<ContainerRepairRecordDetailDO> list = containerRepairRecordDetailService.getContainerRepairRecordDetailList(exportReqVO); |
||||
|
// 导出 Excel
|
||||
|
List<ContainerRepairRecordDetailExcelVO> datas = ContainerRepairRecordDetailConvert.INSTANCE.convertList02(list); |
||||
|
ExcelUtils.write(response, "器具维修记录子.xls", "数据", ContainerRepairRecordDetailExcelVO.class, datas); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/get-import-template") |
||||
|
@Operation(summary = "获得导入器具维修记录子模板") |
||||
|
public void importTemplate(HttpServletResponse response) throws IOException { |
||||
|
List<ContainerRepairRecordDetailExcelVO> list = Arrays.asList(); |
||||
|
// 输出
|
||||
|
ExcelUtils.write(response, "器具维修记录子基本信息导入模板.xls", "器具维修记录子基本信息列表", ContainerRepairRecordDetailExcelVO.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-repair-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<ContainerRepairRecordDetailExcelVO> list = ExcelUtils.read(file, ContainerRepairRecordDetailExcelVO.class); |
||||
|
List<ContainerRepairRecordDetailExcelVO> errorList = containerRepairRecordDetailService.importContainerRepairRecordDetailList(list, mode, updatePart); |
||||
|
|
||||
|
Map<String, Object> returnMap = new HashMap<>(); |
||||
|
returnMap.put("errorCount", errorList.size()); |
||||
|
if(!errorList.isEmpty()) { |
||||
|
String url = ExcelUtils.writeLocalFile("器具维修记录子基本信息导入错误数据" + LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")) + ".xlsx", "错误列表", errorList); |
||||
|
returnMap.put("errorFile", url); |
||||
|
} |
||||
|
|
||||
|
return success(returnMap); |
||||
|
} |
||||
|
} |
@ -0,0 +1,135 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair; |
||||
|
|
||||
|
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.containerRepair.vo.*; |
||||
|
import com.win.module.wms.convert.containerRepair.ContainerRepairRecordMainConvert; |
||||
|
import com.win.module.wms.dal.dataobject.containerRepair.ContainerRepairRecordMainDO; |
||||
|
import com.win.module.wms.service.containerRepair.ContainerRepairRecordMainService; |
||||
|
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-repair-record-main") |
||||
|
@Validated |
||||
|
public class ContainerRepairRecordMainController { |
||||
|
|
||||
|
@Resource |
||||
|
private ContainerRepairRecordMainService containerRepairRecordMainService; |
||||
|
|
||||
|
@PostMapping("/create") |
||||
|
@Operation(summary = "创建器具维修记录主") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-main:create')") |
||||
|
public CommonResult<Long> createContainerRepairRecordMain(@Valid @RequestBody ContainerRepairRecordMainCreateReqVO createReqVO) { |
||||
|
return success(containerRepairRecordMainService.createContainerRepairRecordMain(createReqVO)); |
||||
|
} |
||||
|
|
||||
|
@PutMapping("/update") |
||||
|
@Operation(summary = "更新器具维修记录主") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-main:update')") |
||||
|
public CommonResult<Boolean> updateContainerRepairRecordMain(@Valid @RequestBody ContainerRepairRecordMainUpdateReqVO updateReqVO) { |
||||
|
int result = containerRepairRecordMainService.updateContainerRepairRecordMain(updateReqVO); |
||||
|
return success(result > 0); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping("/delete") |
||||
|
@Operation(summary = "删除器具维修记录主") |
||||
|
@Parameter(name = "id", description = "编号", required = true) |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-main:delete')") |
||||
|
public CommonResult<Boolean> deleteContainerRepairRecordMain(@RequestParam("id") Long id) { |
||||
|
int result = containerRepairRecordMainService.deleteContainerRepairRecordMain(id); |
||||
|
return success(result > 0); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/get") |
||||
|
@Operation(summary = "获得器具维修记录主") |
||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-main:query')") |
||||
|
public CommonResult<ContainerRepairRecordMainRespVO> getContainerRepairRecordMain(@RequestParam("id") Long id) { |
||||
|
ContainerRepairRecordMainDO containerRepairRecordMain = containerRepairRecordMainService.getContainerRepairRecordMain(id); |
||||
|
return success(ContainerRepairRecordMainConvert.INSTANCE.convert(containerRepairRecordMain)); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/list") |
||||
|
@Operation(summary = "获得器具维修记录主列表") |
||||
|
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-main:query')") |
||||
|
public CommonResult<List<ContainerRepairRecordMainRespVO>> getContainerRepairRecordMainList(@RequestParam("ids") Collection<Long> ids) { |
||||
|
List<ContainerRepairRecordMainDO> list = containerRepairRecordMainService.getContainerRepairRecordMainList(ids); |
||||
|
return success(ContainerRepairRecordMainConvert.INSTANCE.convertList(list)); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/page") |
||||
|
@Operation(summary = "获得器具维修记录主分页") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-main:query')") |
||||
|
public CommonResult<PageResult<ContainerRepairRecordMainRespVO>> getContainerRepairRecordMainPage(@Valid ContainerRepairRecordMainPageReqVO pageVO) { |
||||
|
PageResult<ContainerRepairRecordMainDO> pageResult = containerRepairRecordMainService.getContainerRepairRecordMainPage(pageVO); |
||||
|
return success(ContainerRepairRecordMainConvert.INSTANCE.convertPage(pageResult)); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/export-excel") |
||||
|
@Operation(summary = "导出器具维修记录主 Excel") |
||||
|
@PreAuthorize("@ss.hasPermission('wms:container-repair-record-main:export')") |
||||
|
@OperateLog(type = EXPORT) |
||||
|
public void exportContainerRepairRecordMainExcel(@Valid ContainerRepairRecordMainExportReqVO exportReqVO, |
||||
|
HttpServletResponse response) throws IOException { |
||||
|
List<ContainerRepairRecordMainDO> list = containerRepairRecordMainService.getContainerRepairRecordMainList(exportReqVO); |
||||
|
// 导出 Excel
|
||||
|
List<ContainerRepairRecordMainExcelVO> datas = ContainerRepairRecordMainConvert.INSTANCE.convertList02(list); |
||||
|
ExcelUtils.write(response, "器具维修记录主.xls", "数据", ContainerRepairRecordMainExcelVO.class, datas); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/get-import-template") |
||||
|
@Operation(summary = "获得导入器具维修记录主模板") |
||||
|
public void importTemplate(HttpServletResponse response) throws IOException { |
||||
|
List<ContainerRepairRecordMainExcelVO> list = Arrays.asList(); |
||||
|
// 输出
|
||||
|
ExcelUtils.write(response, "器具维修记录主基本信息导入模板.xls", "器具维修记录主基本信息列表", ContainerRepairRecordMainExcelVO.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-repair-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<ContainerRepairRecordMainExcelVO> list = ExcelUtils.read(file, ContainerRepairRecordMainExcelVO.class); |
||||
|
List<ContainerRepairRecordMainExcelVO> errorList = containerRepairRecordMainService.importContainerRepairRecordMainList(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,38 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.vo; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录子 Base VO,提供给添加、修改、详细的子 VO 使用 |
||||
|
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ContainerRepairRecordDetailBaseVO { |
||||
|
|
||||
|
@Schema(description = "器具号") |
||||
|
private String containerNumber; |
||||
|
|
||||
|
@Schema(description = "从状态", example = "2") |
||||
|
private String fromContainerStatus; |
||||
|
|
||||
|
@Schema(description = "到状态", example = "2") |
||||
|
private String toContainerStatus; |
||||
|
|
||||
|
@Schema(description = "主表ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16293") |
||||
|
@NotNull(message = "主表ID不能为空") |
||||
|
private Long masterId; |
||||
|
|
||||
|
@Schema(description = "单据号", requiredMode = Schema.RequiredMode.REQUIRED) |
||||
|
@NotNull(message = "单据号不能为空") |
||||
|
private String number; |
||||
|
|
||||
|
@Schema(description = "地点ID", example = "2538") |
||||
|
private String siteId; |
||||
|
|
||||
|
@Schema(description = "备注", example = "随便") |
||||
|
private String remark; |
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.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 ContainerRepairRecordDetailCreateReqVO extends ContainerRepairRecordDetailBaseVO { |
||||
|
|
||||
|
} |
@ -0,0 +1,43 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.vo; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录子 Excel VO |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ContainerRepairRecordDetailExcelVO { |
||||
|
|
||||
|
@ExcelProperty("id") |
||||
|
private Long id; |
||||
|
|
||||
|
@ExcelProperty("器具号") |
||||
|
private String containerNumber; |
||||
|
|
||||
|
@ExcelProperty("从状态") |
||||
|
private String fromContainerStatus; |
||||
|
|
||||
|
@ExcelProperty("到状态") |
||||
|
private String toContainerStatus; |
||||
|
|
||||
|
@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,40 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.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,参数和 ContainerRepairRecordDetailPageReqVO 是一致的") |
||||
|
@Data |
||||
|
public class ContainerRepairRecordDetailExportReqVO { |
||||
|
|
||||
|
@Schema(description = "器具号") |
||||
|
private String containerNumber; |
||||
|
|
||||
|
@Schema(description = "从状态", example = "2") |
||||
|
private String fromContainerStatus; |
||||
|
|
||||
|
@Schema(description = "到状态", example = "2") |
||||
|
private String toContainerStatus; |
||||
|
|
||||
|
@Schema(description = "主表ID", example = "16293") |
||||
|
private Long masterId; |
||||
|
|
||||
|
@Schema(description = "单据号") |
||||
|
private String number; |
||||
|
|
||||
|
@Schema(description = "地点ID", example = "2538") |
||||
|
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,45 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.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 ContainerRepairRecordDetailPageReqVO extends PageParam { |
||||
|
|
||||
|
@Schema(description = "器具号") |
||||
|
private String containerNumber; |
||||
|
|
||||
|
@Schema(description = "从状态", example = "2") |
||||
|
private String fromContainerStatus; |
||||
|
|
||||
|
@Schema(description = "到状态", example = "2") |
||||
|
private String toContainerStatus; |
||||
|
|
||||
|
@Schema(description = "主表ID", example = "16293") |
||||
|
private Long masterId; |
||||
|
|
||||
|
@Schema(description = "单据号") |
||||
|
private String number; |
||||
|
|
||||
|
@Schema(description = "地点ID", example = "2538") |
||||
|
private String siteId; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private LocalDateTime[] createTime; |
||||
|
|
||||
|
@Schema(description = "备注", example = "随便") |
||||
|
private String remark; |
||||
|
|
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.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 ContainerRepairRecordDetailRespVO extends ContainerRepairRecordDetailBaseVO { |
||||
|
|
||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "22880") |
||||
|
private Long id; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.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 ContainerRepairRecordDetailUpdateReqVO extends ContainerRepairRecordDetailBaseVO { |
||||
|
|
||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "22880") |
||||
|
@NotNull(message = "id不能为空") |
||||
|
private Long id; |
||||
|
|
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.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 ContainerRepairRecordMainBaseVO { |
||||
|
|
||||
|
@Schema(description = "单据号") |
||||
|
private String number; |
||||
|
|
||||
|
@Schema(description = "器具号") |
||||
|
private String containerNumber; |
||||
|
|
||||
|
@Schema(description = "从仓库代码") |
||||
|
private String fromWarehouseCode; |
||||
|
|
||||
|
@Schema(description = "到仓库代码") |
||||
|
private String toWarehouseCode; |
||||
|
|
||||
|
@Schema(description = "出库事务类型", example = "1") |
||||
|
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 = "1") |
||||
|
private String interfaceType; |
||||
|
|
||||
|
@Schema(description = "业务类型", example = "1") |
||||
|
private String businessType; |
||||
|
|
||||
|
@Schema(description = "备注", example = "你猜") |
||||
|
private String remark; |
||||
|
|
||||
|
@Schema(description = "扩展属性") |
||||
|
private String extraProperties; |
||||
|
|
||||
|
@Schema(description = "地点ID", example = "5854") |
||||
|
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.containerRepair.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 ContainerRepairRecordMainCreateReqVO extends ContainerRepairRecordMainBaseVO { |
||||
|
|
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.vo; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录主 Excel VO |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ContainerRepairRecordMainExcelVO { |
||||
|
|
||||
|
@ExcelProperty("id") |
||||
|
private Long id; |
||||
|
|
||||
|
@ExcelProperty("单据号") |
||||
|
private String number; |
||||
|
|
||||
|
@ExcelProperty("器具号") |
||||
|
private String containerNumber; |
||||
|
|
||||
|
@ExcelProperty("从仓库代码") |
||||
|
private String fromWarehouseCode; |
||||
|
|
||||
|
@ExcelProperty("到仓库代码") |
||||
|
private String toWarehouseCode; |
||||
|
|
||||
|
@ExcelProperty("出库事务类型") |
||||
|
private String outTransactionType; |
||||
|
|
||||
|
@ExcelProperty("入库事务类型") |
||||
|
private String inTransactionType; |
||||
|
|
||||
|
@ExcelProperty("执行时间") |
||||
|
private LocalDateTime executeTime; |
||||
|
|
||||
|
@ExcelProperty("生效日期") |
||||
|
private LocalDateTime activeDate; |
||||
|
|
||||
|
@ExcelProperty("是否可用") |
||||
|
private String available; |
||||
|
|
||||
|
@ExcelProperty("申请时间") |
||||
|
private LocalDateTime requestTime; |
||||
|
|
||||
|
@ExcelProperty("截止时间") |
||||
|
private LocalDateTime dueTime; |
||||
|
|
||||
|
@ExcelProperty("部门") |
||||
|
private String departmentCode; |
||||
|
|
||||
|
@ExcelProperty("用户组") |
||||
|
private String userGroupCode; |
||||
|
|
||||
|
@ExcelProperty("接口类型") |
||||
|
private String interfaceType; |
||||
|
|
||||
|
@ExcelProperty("业务类型") |
||||
|
private String businessType; |
||||
|
|
||||
|
@ExcelProperty("备注") |
||||
|
private String remark; |
||||
|
|
||||
|
@ExcelProperty("创建时间") |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
@ExcelProperty("扩展属性") |
||||
|
private String extraProperties; |
||||
|
|
||||
|
@ExcelProperty("地点ID") |
||||
|
private String siteId; |
||||
|
|
||||
|
@ExcelProperty("代码") |
||||
|
private String code; |
||||
|
|
||||
|
@ExcelProperty("从库位类型范围") |
||||
|
private String fromLocationTypes; |
||||
|
|
||||
|
@ExcelProperty("到库位类型范围") |
||||
|
private String toLocationTypes; |
||||
|
|
||||
|
@ExcelProperty("从库区代码范围") |
||||
|
private String fromAreaCodes; |
||||
|
|
||||
|
@ExcelProperty("到库区代码范围") |
||||
|
private String toAreaCodes; |
||||
|
|
||||
|
} |
@ -0,0 +1,92 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.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,参数和 ContainerRepairRecordMainPageReqVO 是一致的") |
||||
|
@Data |
||||
|
public class ContainerRepairRecordMainExportReqVO { |
||||
|
|
||||
|
@Schema(description = "单据号") |
||||
|
private String number; |
||||
|
|
||||
|
@Schema(description = "器具号") |
||||
|
private String containerNumber; |
||||
|
|
||||
|
@Schema(description = "从仓库代码") |
||||
|
private String fromWarehouseCode; |
||||
|
|
||||
|
@Schema(description = "到仓库代码") |
||||
|
private String toWarehouseCode; |
||||
|
|
||||
|
@Schema(description = "出库事务类型", example = "1") |
||||
|
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 = "1") |
||||
|
private String interfaceType; |
||||
|
|
||||
|
@Schema(description = "业务类型", example = "1") |
||||
|
private String businessType; |
||||
|
|
||||
|
@Schema(description = "备注", example = "你猜") |
||||
|
private String remark; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private LocalDateTime[] createTime; |
||||
|
|
||||
|
@Schema(description = "扩展属性") |
||||
|
private String extraProperties; |
||||
|
|
||||
|
@Schema(description = "地点ID", example = "5854") |
||||
|
private String siteId; |
||||
|
|
||||
|
@Schema(description = "代码") |
||||
|
private String code; |
||||
|
|
||||
|
@Schema(description = "从库位类型范围") |
||||
|
private String fromLocationTypes; |
||||
|
|
||||
|
@Schema(description = "到库位类型范围") |
||||
|
private String toLocationTypes; |
||||
|
|
||||
|
@Schema(description = "从库区代码范围") |
||||
|
private String fromAreaCodes; |
||||
|
|
||||
|
@Schema(description = "到库区代码范围") |
||||
|
private String toAreaCodes; |
||||
|
|
||||
|
} |
@ -0,0 +1,97 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.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 ContainerRepairRecordMainPageReqVO extends PageParam { |
||||
|
|
||||
|
@Schema(description = "单据号") |
||||
|
private String number; |
||||
|
|
||||
|
@Schema(description = "器具号") |
||||
|
private String containerNumber; |
||||
|
|
||||
|
@Schema(description = "从仓库代码") |
||||
|
private String fromWarehouseCode; |
||||
|
|
||||
|
@Schema(description = "到仓库代码") |
||||
|
private String toWarehouseCode; |
||||
|
|
||||
|
@Schema(description = "出库事务类型", example = "1") |
||||
|
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 = "1") |
||||
|
private String interfaceType; |
||||
|
|
||||
|
@Schema(description = "业务类型", example = "1") |
||||
|
private String businessType; |
||||
|
|
||||
|
@Schema(description = "备注", example = "你猜") |
||||
|
private String remark; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
||||
|
private LocalDateTime[] createTime; |
||||
|
|
||||
|
@Schema(description = "扩展属性") |
||||
|
private String extraProperties; |
||||
|
|
||||
|
@Schema(description = "地点ID", example = "5854") |
||||
|
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.containerRepair.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 ContainerRepairRecordMainRespVO extends ContainerRepairRecordMainBaseVO { |
||||
|
|
||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "359") |
||||
|
private Long id; |
||||
|
|
||||
|
@Schema(description = "创建时间") |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.win.module.wms.controller.containerRepair.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 ContainerRepairRecordMainUpdateReqVO extends ContainerRepairRecordMainBaseVO { |
||||
|
|
||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "359") |
||||
|
@NotNull(message = "id不能为空") |
||||
|
private Long id; |
||||
|
|
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.win.module.wms.convert.containerRepair; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.ContainerRepairRecordDetailCreateReqVO; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.ContainerRepairRecordDetailExcelVO; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.ContainerRepairRecordDetailRespVO; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.ContainerRepairRecordDetailUpdateReqVO; |
||||
|
import com.win.module.wms.dal.dataobject.containerRepair.ContainerRepairRecordDetailDO; |
||||
|
import org.mapstruct.Mapper; |
||||
|
import org.mapstruct.factory.Mappers; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录子 Convert |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ContainerRepairRecordDetailConvert { |
||||
|
|
||||
|
ContainerRepairRecordDetailConvert INSTANCE = Mappers.getMapper(ContainerRepairRecordDetailConvert.class); |
||||
|
|
||||
|
ContainerRepairRecordDetailDO convert(ContainerRepairRecordDetailCreateReqVO bean); |
||||
|
|
||||
|
ContainerRepairRecordDetailDO convert(ContainerRepairRecordDetailUpdateReqVO bean); |
||||
|
|
||||
|
ContainerRepairRecordDetailRespVO convert(ContainerRepairRecordDetailDO bean); |
||||
|
|
||||
|
List<ContainerRepairRecordDetailRespVO> convertList(List<ContainerRepairRecordDetailDO> list); |
||||
|
|
||||
|
PageResult<ContainerRepairRecordDetailRespVO> convertPage(PageResult<ContainerRepairRecordDetailDO> page); |
||||
|
|
||||
|
List<ContainerRepairRecordDetailExcelVO> convertList02(List<ContainerRepairRecordDetailDO> list); |
||||
|
|
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.win.module.wms.convert.containerRepair; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.ContainerRepairRecordMainCreateReqVO; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.ContainerRepairRecordMainExcelVO; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.ContainerRepairRecordMainRespVO; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.ContainerRepairRecordMainUpdateReqVO; |
||||
|
import com.win.module.wms.dal.dataobject.containerRepair.ContainerRepairRecordMainDO; |
||||
|
import org.mapstruct.Mapper; |
||||
|
import org.mapstruct.factory.Mappers; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录主 Convert |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ContainerRepairRecordMainConvert { |
||||
|
|
||||
|
ContainerRepairRecordMainConvert INSTANCE = Mappers.getMapper(ContainerRepairRecordMainConvert.class); |
||||
|
|
||||
|
ContainerRepairRecordMainDO convert(ContainerRepairRecordMainCreateReqVO bean); |
||||
|
|
||||
|
ContainerRepairRecordMainDO convert(ContainerRepairRecordMainUpdateReqVO bean); |
||||
|
|
||||
|
ContainerRepairRecordMainRespVO convert(ContainerRepairRecordMainDO bean); |
||||
|
|
||||
|
List<ContainerRepairRecordMainRespVO> convertList(List<ContainerRepairRecordMainDO> list); |
||||
|
|
||||
|
PageResult<ContainerRepairRecordMainRespVO> convertPage(PageResult<ContainerRepairRecordMainDO> page); |
||||
|
|
||||
|
List<ContainerRepairRecordMainExcelVO> convertList02(List<ContainerRepairRecordMainDO> list); |
||||
|
|
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
package com.win.module.wms.dal.dataobject.containerRepair; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.win.framework.mybatis.core.dataobject.BaseDO; |
||||
|
import lombok.*; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录子 DO |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@TableName("record_container_repair_detail") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
@Builder |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public class ContainerRepairRecordDetailDO extends BaseDO { |
||||
|
|
||||
|
/** |
||||
|
* id |
||||
|
*/ |
||||
|
@TableId |
||||
|
private Long id; |
||||
|
/** |
||||
|
* 器具号 |
||||
|
*/ |
||||
|
private String containerNumber; |
||||
|
/** |
||||
|
* 从状态 |
||||
|
*/ |
||||
|
private String fromContainerStatus; |
||||
|
/** |
||||
|
* 到状态 |
||||
|
*/ |
||||
|
private String toContainerStatus; |
||||
|
/** |
||||
|
* 主表ID |
||||
|
*/ |
||||
|
private Long masterId; |
||||
|
/** |
||||
|
* 单据号 |
||||
|
*/ |
||||
|
private String number; |
||||
|
/** |
||||
|
* 地点ID |
||||
|
*/ |
||||
|
private String siteId; |
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
} |
@ -0,0 +1,122 @@ |
|||||
|
package com.win.module.wms.dal.dataobject.containerRepair; |
||||
|
|
||||
|
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_repair_main") |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = true) |
||||
|
@ToString(callSuper = true) |
||||
|
@Builder |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public class ContainerRepairRecordMainDO extends BaseDO { |
||||
|
|
||||
|
/** |
||||
|
* id |
||||
|
*/ |
||||
|
@TableId |
||||
|
private Long id; |
||||
|
/** |
||||
|
* 单据号 |
||||
|
*/ |
||||
|
private String number; |
||||
|
/** |
||||
|
* 器具号 |
||||
|
*/ |
||||
|
private String containerNumber; |
||||
|
/** |
||||
|
* 从仓库代码 |
||||
|
*/ |
||||
|
private String fromWarehouseCode; |
||||
|
/** |
||||
|
* 到仓库代码 |
||||
|
*/ |
||||
|
private String toWarehouseCode; |
||||
|
/** |
||||
|
* 出库事务类型 |
||||
|
*/ |
||||
|
private String outTransactionType; |
||||
|
/** |
||||
|
* 入库事务类型 |
||||
|
*/ |
||||
|
private String inTransactionType; |
||||
|
/** |
||||
|
* 执行时间 |
||||
|
*/ |
||||
|
private LocalDateTime executeTime; |
||||
|
/** |
||||
|
* 生效日期 |
||||
|
*/ |
||||
|
private LocalDateTime activeDate; |
||||
|
/** |
||||
|
* 是否可用 |
||||
|
*/ |
||||
|
private String available; |
||||
|
/** |
||||
|
* 申请时间 |
||||
|
*/ |
||||
|
private LocalDateTime requestTime; |
||||
|
/** |
||||
|
* 截止时间 |
||||
|
*/ |
||||
|
private LocalDateTime dueTime; |
||||
|
/** |
||||
|
* 部门 |
||||
|
*/ |
||||
|
private String departmentCode; |
||||
|
/** |
||||
|
* 用户组 |
||||
|
*/ |
||||
|
private String userGroupCode; |
||||
|
/** |
||||
|
* 接口类型 |
||||
|
*/ |
||||
|
private String interfaceType; |
||||
|
/** |
||||
|
* 业务类型 |
||||
|
*/ |
||||
|
private String businessType; |
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
/** |
||||
|
* 扩展属性 |
||||
|
*/ |
||||
|
private String extraProperties; |
||||
|
/** |
||||
|
* 地点ID |
||||
|
*/ |
||||
|
private String siteId; |
||||
|
/** |
||||
|
* 代码 |
||||
|
*/ |
||||
|
private String code; |
||||
|
/** |
||||
|
* 从库位类型范围 |
||||
|
*/ |
||||
|
private String fromLocationTypes; |
||||
|
/** |
||||
|
* 到库位类型范围 |
||||
|
*/ |
||||
|
private String toLocationTypes; |
||||
|
/** |
||||
|
* 从库区代码范围 |
||||
|
*/ |
||||
|
private String fromAreaCodes; |
||||
|
/** |
||||
|
* 到库区代码范围 |
||||
|
*/ |
||||
|
private String toAreaCodes; |
||||
|
|
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
package com.win.module.wms.dal.mysql.containerRepair; |
||||
|
|
||||
|
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.containerRepair.vo.ContainerRepairRecordDetailExportReqVO; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.ContainerRepairRecordDetailPageReqVO; |
||||
|
import com.win.module.wms.dal.dataobject.containerRepair.ContainerRepairRecordDetailDO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录子 Mapper |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ContainerRepairRecordDetailMapper extends BaseMapperX<ContainerRepairRecordDetailDO> { |
||||
|
|
||||
|
default PageResult<ContainerRepairRecordDetailDO> selectPage(ContainerRepairRecordDetailPageReqVO reqVO) { |
||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<ContainerRepairRecordDetailDO>() |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getContainerNumber, reqVO.getContainerNumber()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getFromContainerStatus, reqVO.getFromContainerStatus()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getToContainerStatus, reqVO.getToContainerStatus()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getMasterId, reqVO.getMasterId()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getNumber, reqVO.getNumber()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getSiteId, reqVO.getSiteId()) |
||||
|
.betweenIfPresent(ContainerRepairRecordDetailDO::getCreateTime, reqVO.getCreateTime()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getRemark, reqVO.getRemark()) |
||||
|
.orderByDesc(ContainerRepairRecordDetailDO::getId)); |
||||
|
} |
||||
|
|
||||
|
default List<ContainerRepairRecordDetailDO> selectList(ContainerRepairRecordDetailExportReqVO reqVO) { |
||||
|
return selectList(new LambdaQueryWrapperX<ContainerRepairRecordDetailDO>() |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getContainerNumber, reqVO.getContainerNumber()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getFromContainerStatus, reqVO.getFromContainerStatus()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getToContainerStatus, reqVO.getToContainerStatus()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getMasterId, reqVO.getMasterId()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getNumber, reqVO.getNumber()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getSiteId, reqVO.getSiteId()) |
||||
|
.betweenIfPresent(ContainerRepairRecordDetailDO::getCreateTime, reqVO.getCreateTime()) |
||||
|
.eqIfPresent(ContainerRepairRecordDetailDO::getRemark, reqVO.getRemark()) |
||||
|
.orderByDesc(ContainerRepairRecordDetailDO::getId)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,79 @@ |
|||||
|
package com.win.module.wms.dal.mysql.containerRepair; |
||||
|
|
||||
|
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.containerRepair.vo.ContainerRepairRecordMainExportReqVO; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.ContainerRepairRecordMainPageReqVO; |
||||
|
import com.win.module.wms.dal.dataobject.containerRepair.ContainerRepairRecordMainDO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录主 Mapper |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ContainerRepairRecordMainMapper extends BaseMapperX<ContainerRepairRecordMainDO> { |
||||
|
|
||||
|
default PageResult<ContainerRepairRecordMainDO> selectPage(ContainerRepairRecordMainPageReqVO reqVO) { |
||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<ContainerRepairRecordMainDO>() |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getNumber, reqVO.getNumber()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getContainerNumber, reqVO.getContainerNumber()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getFromWarehouseCode, reqVO.getFromWarehouseCode()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getToWarehouseCode, reqVO.getToWarehouseCode()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getOutTransactionType, reqVO.getOutTransactionType()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getInTransactionType, reqVO.getInTransactionType()) |
||||
|
.betweenIfPresent(ContainerRepairRecordMainDO::getExecuteTime, reqVO.getExecuteTime()) |
||||
|
.betweenIfPresent(ContainerRepairRecordMainDO::getActiveDate, reqVO.getActiveDate()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getAvailable, reqVO.getAvailable()) |
||||
|
.betweenIfPresent(ContainerRepairRecordMainDO::getRequestTime, reqVO.getRequestTime()) |
||||
|
.betweenIfPresent(ContainerRepairRecordMainDO::getDueTime, reqVO.getDueTime()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getDepartmentCode, reqVO.getDepartmentCode()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getUserGroupCode, reqVO.getUserGroupCode()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getInterfaceType, reqVO.getInterfaceType()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getBusinessType, reqVO.getBusinessType()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getRemark, reqVO.getRemark()) |
||||
|
.betweenIfPresent(ContainerRepairRecordMainDO::getCreateTime, reqVO.getCreateTime()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getExtraProperties, reqVO.getExtraProperties()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getSiteId, reqVO.getSiteId()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getCode, reqVO.getCode()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getFromLocationTypes, reqVO.getFromLocationTypes()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getToLocationTypes, reqVO.getToLocationTypes()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getFromAreaCodes, reqVO.getFromAreaCodes()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getToAreaCodes, reqVO.getToAreaCodes()) |
||||
|
.orderByDesc(ContainerRepairRecordMainDO::getId)); |
||||
|
} |
||||
|
|
||||
|
default List<ContainerRepairRecordMainDO> selectList(ContainerRepairRecordMainExportReqVO reqVO) { |
||||
|
return selectList(new LambdaQueryWrapperX<ContainerRepairRecordMainDO>() |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getNumber, reqVO.getNumber()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getContainerNumber, reqVO.getContainerNumber()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getFromWarehouseCode, reqVO.getFromWarehouseCode()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getToWarehouseCode, reqVO.getToWarehouseCode()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getOutTransactionType, reqVO.getOutTransactionType()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getInTransactionType, reqVO.getInTransactionType()) |
||||
|
.betweenIfPresent(ContainerRepairRecordMainDO::getExecuteTime, reqVO.getExecuteTime()) |
||||
|
.betweenIfPresent(ContainerRepairRecordMainDO::getActiveDate, reqVO.getActiveDate()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getAvailable, reqVO.getAvailable()) |
||||
|
.betweenIfPresent(ContainerRepairRecordMainDO::getRequestTime, reqVO.getRequestTime()) |
||||
|
.betweenIfPresent(ContainerRepairRecordMainDO::getDueTime, reqVO.getDueTime()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getDepartmentCode, reqVO.getDepartmentCode()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getUserGroupCode, reqVO.getUserGroupCode()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getInterfaceType, reqVO.getInterfaceType()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getBusinessType, reqVO.getBusinessType()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getRemark, reqVO.getRemark()) |
||||
|
.betweenIfPresent(ContainerRepairRecordMainDO::getCreateTime, reqVO.getCreateTime()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getExtraProperties, reqVO.getExtraProperties()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getSiteId, reqVO.getSiteId()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getCode, reqVO.getCode()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getFromLocationTypes, reqVO.getFromLocationTypes()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getToLocationTypes, reqVO.getToLocationTypes()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getFromAreaCodes, reqVO.getFromAreaCodes()) |
||||
|
.eqIfPresent(ContainerRepairRecordMainDO::getToAreaCodes, reqVO.getToAreaCodes()) |
||||
|
.orderByDesc(ContainerRepairRecordMainDO::getId)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
package com.win.module.wms.service.containerRepair; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.*; |
||||
|
import com.win.module.wms.dal.dataobject.containerRepair.ContainerRepairRecordDetailDO; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.Collection; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录子 Service 接口 |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
public interface ContainerRepairRecordDetailService { |
||||
|
|
||||
|
/** |
||||
|
* 创建器具维修记录子 |
||||
|
* |
||||
|
* @param createReqVO 创建信息 |
||||
|
* @return 编号 |
||||
|
*/ |
||||
|
Long createContainerRepairRecordDetail(@Valid ContainerRepairRecordDetailCreateReqVO createReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 更新器具维修记录子 |
||||
|
* |
||||
|
* @param updateReqVO 更新信息 |
||||
|
*/ |
||||
|
Integer updateContainerRepairRecordDetail(@Valid ContainerRepairRecordDetailUpdateReqVO updateReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 删除器具维修记录子 |
||||
|
* |
||||
|
* @param id 编号 |
||||
|
*/ |
||||
|
Integer deleteContainerRepairRecordDetail(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 获得器具维修记录子 |
||||
|
* |
||||
|
* @param id 编号 |
||||
|
* @return 器具维修记录子 |
||||
|
*/ |
||||
|
ContainerRepairRecordDetailDO getContainerRepairRecordDetail(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 获得器具维修记录子列表 |
||||
|
* |
||||
|
* @param ids 编号 |
||||
|
* @return 器具维修记录子列表 |
||||
|
*/ |
||||
|
List<ContainerRepairRecordDetailDO> getContainerRepairRecordDetailList(Collection<Long> ids); |
||||
|
|
||||
|
/** |
||||
|
* 获得器具维修记录子分页 |
||||
|
* |
||||
|
* @param pageReqVO 分页查询 |
||||
|
* @return 器具维修记录子分页 |
||||
|
*/ |
||||
|
PageResult<ContainerRepairRecordDetailDO> getContainerRepairRecordDetailPage(ContainerRepairRecordDetailPageReqVO pageReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 获得器具维修记录子列表, 用于 Excel 导出 |
||||
|
* |
||||
|
* @param exportReqVO 查询条件 |
||||
|
* @return 器具维修记录子列表 |
||||
|
*/ |
||||
|
List<ContainerRepairRecordDetailDO> getContainerRepairRecordDetailList(ContainerRepairRecordDetailExportReqVO exportReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 导入器具维修记录子主信息 |
||||
|
* |
||||
|
* @param datas 导入器具维修记录子主信息列表 |
||||
|
* @param mode 导入模式1更新2追加3覆盖 |
||||
|
* @param updatePart 是否支持更新 |
||||
|
* @return 导入结果 |
||||
|
*/ |
||||
|
public List<ContainerRepairRecordDetailExcelVO> importContainerRepairRecordDetailList(List<ContainerRepairRecordDetailExcelVO> datas, Integer mode, boolean updatePart); |
||||
|
} |
@ -0,0 +1,108 @@ |
|||||
|
package com.win.module.wms.service.containerRepair; |
||||
|
|
||||
|
import cn.hutool.core.collection.CollUtil; |
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.*; |
||||
|
import com.win.module.wms.convert.containerRepair.ContainerRepairRecordDetailConvert; |
||||
|
import com.win.module.wms.dal.dataobject.containerRepair.ContainerRepairRecordDetailDO; |
||||
|
import com.win.module.wms.dal.mysql.containerRepair.ContainerRepairRecordDetailMapper; |
||||
|
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_REPAIR_RECORD_DETAIL_IMPORT_LIST_IS_EMPTY; |
||||
|
import static com.win.module.wms.enums.ErrorCodeConstants.CONTAINER_REPAIR_RECORD_DETAIL_NOT_EXISTS; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录子 Service 实现类 |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Service |
||||
|
@Validated |
||||
|
public class ContainerRepairRecordDetailServiceImpl implements ContainerRepairRecordDetailService { |
||||
|
|
||||
|
@Resource |
||||
|
private ContainerRepairRecordDetailMapper containerRepairRecordDetailMapper; |
||||
|
|
||||
|
@Override |
||||
|
public Long createContainerRepairRecordDetail(ContainerRepairRecordDetailCreateReqVO createReqVO) { |
||||
|
// 插入
|
||||
|
ContainerRepairRecordDetailDO containerRepairRecordDetail = ContainerRepairRecordDetailConvert.INSTANCE.convert(createReqVO); |
||||
|
containerRepairRecordDetailMapper.insert(containerRepairRecordDetail); |
||||
|
// 返回
|
||||
|
return containerRepairRecordDetail.getId(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Integer updateContainerRepairRecordDetail(ContainerRepairRecordDetailUpdateReqVO updateReqVO) { |
||||
|
// 校验存在
|
||||
|
validateContainerRepairRecordDetailExists(updateReqVO.getId()); |
||||
|
// 更新
|
||||
|
ContainerRepairRecordDetailDO updateObj = ContainerRepairRecordDetailConvert.INSTANCE.convert(updateReqVO); |
||||
|
return containerRepairRecordDetailMapper.updateById(updateObj); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Integer deleteContainerRepairRecordDetail(Long id) { |
||||
|
// 校验存在
|
||||
|
validateContainerRepairRecordDetailExists(id); |
||||
|
// 删除
|
||||
|
return containerRepairRecordDetailMapper.deleteById(id); |
||||
|
} |
||||
|
|
||||
|
private void validateContainerRepairRecordDetailExists(Long id) { |
||||
|
if (containerRepairRecordDetailMapper.selectById(id) == null) { |
||||
|
throw exception(CONTAINER_REPAIR_RECORD_DETAIL_NOT_EXISTS); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ContainerRepairRecordDetailDO getContainerRepairRecordDetail(Long id) { |
||||
|
return containerRepairRecordDetailMapper.selectById(id); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ContainerRepairRecordDetailDO> getContainerRepairRecordDetailList(Collection<Long> ids) { |
||||
|
return containerRepairRecordDetailMapper.selectBatchIds(ids); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageResult<ContainerRepairRecordDetailDO> getContainerRepairRecordDetailPage(ContainerRepairRecordDetailPageReqVO pageReqVO) { |
||||
|
return containerRepairRecordDetailMapper.selectPage(pageReqVO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ContainerRepairRecordDetailDO> getContainerRepairRecordDetailList(ContainerRepairRecordDetailExportReqVO exportReqVO) { |
||||
|
return containerRepairRecordDetailMapper.selectList(exportReqVO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ContainerRepairRecordDetailExcelVO> importContainerRepairRecordDetailList(List<ContainerRepairRecordDetailExcelVO> datas, Integer mode, boolean updatePart) { |
||||
|
if (CollUtil.isEmpty(datas)) { |
||||
|
throw exception(CONTAINER_REPAIR_RECORD_DETAIL_IMPORT_LIST_IS_EMPTY); |
||||
|
} |
||||
|
|
||||
|
List<ContainerRepairRecordDetailExcelVO> errorList = new ArrayList<>(); |
||||
|
// datas.forEach(item -> {
|
||||
|
// if(errorList == null){
|
||||
|
// // 判断如果不存在,在进行插入
|
||||
|
// ContainerRepairRecordDetailDO obj = containerRepairRecordDetailMapper.selectByCode(item.getCode());
|
||||
|
// if (obj == null&& mode != 3) {
|
||||
|
// containerRepairRecordDetailMapper.insert(ContainerRepairRecordDetailConvert.INSTANCE.convert(item));
|
||||
|
// }
|
||||
|
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
|
||||
|
// ContainerRepairRecordDetailDO containerRepairRecordDetailDO = ContainerRepairRecordDetailConvert.INSTANCE.convert(item);
|
||||
|
// containerRepairRecordDetailDO.setId(obj.getId());
|
||||
|
// containerRepairRecordDetailMapper.updateById(obj);
|
||||
|
// }
|
||||
|
// }
|
||||
|
// });
|
||||
|
return errorList; |
||||
|
} |
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
package com.win.module.wms.service.containerRepair; |
||||
|
|
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.*; |
||||
|
import com.win.module.wms.dal.dataobject.containerRepair.ContainerRepairRecordMainDO; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.Collection; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录主 Service 接口 |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
public interface ContainerRepairRecordMainService { |
||||
|
|
||||
|
/** |
||||
|
* 创建器具维修记录主 |
||||
|
* |
||||
|
* @param createReqVO 创建信息 |
||||
|
* @return 编号 |
||||
|
*/ |
||||
|
Long createContainerRepairRecordMain(@Valid ContainerRepairRecordMainCreateReqVO createReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 更新器具维修记录主 |
||||
|
* |
||||
|
* @param updateReqVO 更新信息 |
||||
|
*/ |
||||
|
Integer updateContainerRepairRecordMain(@Valid ContainerRepairRecordMainUpdateReqVO updateReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 删除器具维修记录主 |
||||
|
* |
||||
|
* @param id 编号 |
||||
|
*/ |
||||
|
Integer deleteContainerRepairRecordMain(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 获得器具维修记录主 |
||||
|
* |
||||
|
* @param id 编号 |
||||
|
* @return 器具维修记录主 |
||||
|
*/ |
||||
|
ContainerRepairRecordMainDO getContainerRepairRecordMain(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 获得器具维修记录主列表 |
||||
|
* |
||||
|
* @param ids 编号 |
||||
|
* @return 器具维修记录主列表 |
||||
|
*/ |
||||
|
List<ContainerRepairRecordMainDO> getContainerRepairRecordMainList(Collection<Long> ids); |
||||
|
|
||||
|
/** |
||||
|
* 获得器具维修记录主分页 |
||||
|
* |
||||
|
* @param pageReqVO 分页查询 |
||||
|
* @return 器具维修记录主分页 |
||||
|
*/ |
||||
|
PageResult<ContainerRepairRecordMainDO> getContainerRepairRecordMainPage(ContainerRepairRecordMainPageReqVO pageReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 获得器具维修记录主列表, 用于 Excel 导出 |
||||
|
* |
||||
|
* @param exportReqVO 查询条件 |
||||
|
* @return 器具维修记录主列表 |
||||
|
*/ |
||||
|
List<ContainerRepairRecordMainDO> getContainerRepairRecordMainList(ContainerRepairRecordMainExportReqVO exportReqVO); |
||||
|
|
||||
|
/** |
||||
|
* 导入器具维修记录主主信息 |
||||
|
* |
||||
|
* @param datas 导入器具维修记录主主信息列表 |
||||
|
* @param mode 导入模式1更新2追加3覆盖 |
||||
|
* @param updatePart 是否支持更新 |
||||
|
* @return 导入结果 |
||||
|
*/ |
||||
|
public List<ContainerRepairRecordMainExcelVO> importContainerRepairRecordMainList(List<ContainerRepairRecordMainExcelVO> datas, Integer mode, boolean updatePart); |
||||
|
} |
@ -0,0 +1,109 @@ |
|||||
|
package com.win.module.wms.service.containerRepair; |
||||
|
|
||||
|
import cn.hutool.core.collection.CollUtil; |
||||
|
import com.win.framework.common.pojo.PageResult; |
||||
|
import com.win.module.wms.controller.containerRepair.vo.*; |
||||
|
import com.win.module.wms.convert.containerRepair.ContainerRepairRecordMainConvert; |
||||
|
import com.win.module.wms.dal.dataobject.containerRepair.ContainerRepairRecordMainDO; |
||||
|
import com.win.module.wms.dal.mysql.containerRepair.ContainerRepairRecordMainMapper; |
||||
|
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_REPAIR_RECORD_MAIN_IMPORT_LIST_IS_EMPTY; |
||||
|
import static com.win.module.wms.enums.ErrorCodeConstants.CONTAINER_REPAIR_RECORD_MAIN_NOT_EXISTS; |
||||
|
|
||||
|
/** |
||||
|
* 器具维修记录主 Service 实现类 |
||||
|
* |
||||
|
* @author 超级管理员 |
||||
|
*/ |
||||
|
@Service |
||||
|
@Validated |
||||
|
public class ContainerRepairRecordMainServiceImpl implements ContainerRepairRecordMainService { |
||||
|
|
||||
|
@Resource |
||||
|
private ContainerRepairRecordMainMapper containerRepairRecordMainMapper; |
||||
|
|
||||
|
@Override |
||||
|
public Long createContainerRepairRecordMain(ContainerRepairRecordMainCreateReqVO createReqVO) { |
||||
|
// 插入
|
||||
|
ContainerRepairRecordMainDO containerRepairRecordMain = ContainerRepairRecordMainConvert.INSTANCE.convert(createReqVO); |
||||
|
containerRepairRecordMainMapper.insert(containerRepairRecordMain); |
||||
|
// 返回
|
||||
|
return containerRepairRecordMain.getId(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Integer updateContainerRepairRecordMain(ContainerRepairRecordMainUpdateReqVO updateReqVO) { |
||||
|
// 校验存在
|
||||
|
validateContainerRepairRecordMainExists(updateReqVO.getId()); |
||||
|
// 更新
|
||||
|
ContainerRepairRecordMainDO updateObj = ContainerRepairRecordMainConvert.INSTANCE.convert(updateReqVO); |
||||
|
return containerRepairRecordMainMapper.updateById(updateObj); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Integer deleteContainerRepairRecordMain(Long id) { |
||||
|
// 校验存在
|
||||
|
validateContainerRepairRecordMainExists(id); |
||||
|
// 删除
|
||||
|
return containerRepairRecordMainMapper.deleteById(id); |
||||
|
} |
||||
|
|
||||
|
private void validateContainerRepairRecordMainExists(Long id) { |
||||
|
if (containerRepairRecordMainMapper.selectById(id) == null) { |
||||
|
throw exception(CONTAINER_REPAIR_RECORD_MAIN_NOT_EXISTS); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ContainerRepairRecordMainDO getContainerRepairRecordMain(Long id) { |
||||
|
return containerRepairRecordMainMapper.selectById(id); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ContainerRepairRecordMainDO> getContainerRepairRecordMainList(Collection<Long> ids) { |
||||
|
return containerRepairRecordMainMapper.selectBatchIds(ids); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageResult<ContainerRepairRecordMainDO> getContainerRepairRecordMainPage(ContainerRepairRecordMainPageReqVO pageReqVO) { |
||||
|
return containerRepairRecordMainMapper.selectPage(pageReqVO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ContainerRepairRecordMainDO> getContainerRepairRecordMainList(ContainerRepairRecordMainExportReqVO exportReqVO) { |
||||
|
return containerRepairRecordMainMapper.selectList(exportReqVO); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ContainerRepairRecordMainExcelVO> importContainerRepairRecordMainList(List<ContainerRepairRecordMainExcelVO> datas, Integer mode, boolean updatePart) { |
||||
|
if (CollUtil.isEmpty(datas)) { |
||||
|
throw exception(CONTAINER_REPAIR_RECORD_MAIN_IMPORT_LIST_IS_EMPTY); |
||||
|
} |
||||
|
|
||||
|
List<ContainerRepairRecordMainExcelVO> errorList = new ArrayList<>(); |
||||
|
// datas.forEach(item -> {
|
||||
|
// if(errorList == null){
|
||||
|
// // 判断如果不存在,在进行插入
|
||||
|
// ContainerRepairRecordMainDO obj = containerRepairRecordMainMapper.selectByCode(item.getCode());
|
||||
|
// if (obj == null&& mode != 3) {
|
||||
|
// containerRepairRecordMainMapper.insert(ContainerRepairRecordMainConvert.INSTANCE.convert(item));
|
||||
|
// }
|
||||
|
// else if (obj != null && mode != 2) {// 如果存在,判断是否允许更新
|
||||
|
// ContainerRepairRecordMainDO containerRepairRecordMainDO = ContainerRepairRecordMainConvert.INSTANCE.convert(item);
|
||||
|
// containerRepairRecordMainDO.setId(obj.getId());
|
||||
|
// containerRepairRecordMainMapper.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.containerRepair.ContainerRepairRecordDetailMapper"> |
||||
|
|
||||
|
<!-- |
||||
|
一般情况下,尽可能使用 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.containerRepair.ContainerRepairRecordMainMapper"> |
||||
|
|
||||
|
<!-- |
||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。 |
||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。 |
||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。 |
||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ |
||||
|
--> |
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue