erpBOM、工艺路线代码生成
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpBomDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpBomService;
|
||||
|
||||
@Tag(name = "管理后台 - ERP物料清单(BOM)")
|
||||
@RestController
|
||||
@RequestMapping("/sply/erp-bom")
|
||||
@Validated
|
||||
public class ErpBomController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ErpBomService erpBomService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP物料清单(BOM)")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom:create')")
|
||||
public CommonResult<ErpBomRespVO> createErpBom(@Valid @RequestBody ErpBomSaveReqVO createReqVO) {
|
||||
return success(erpBomService.createErpBom(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP物料清单(BOM)")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom:update')")
|
||||
public CommonResult<Boolean> updateErpBom(@Valid @RequestBody ErpBomSaveReqVO updateReqVO) {
|
||||
erpBomService.updateErpBom(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP物料清单(BOM)")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom:delete')")
|
||||
public CommonResult<Boolean> deleteErpBom(@RequestParam("id") Long id) {
|
||||
erpBomService.deleteErpBom(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP物料清单(BOM)")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom:delete')")
|
||||
public CommonResult<Boolean> deleteErpBomList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpBomService.deleteErpBomListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP物料清单(BOM)")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom:query')")
|
||||
public CommonResult<ErpBomRespVO> getErpBom(@RequestParam("id") Long id) {
|
||||
ErpBomDO erpBom = erpBomService.getErpBom(id);
|
||||
return success(BeanUtils.toBean(erpBom, ErpBomRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP物料清单(BOM)分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom:query')")
|
||||
public CommonResult<PageResult<ErpBomRespVO>> getErpBomPage(@Valid ErpBomPageReqVO pageReqVO) {
|
||||
PageResult<ErpBomDO> pageResult = erpBomService.getErpBomPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpBomRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP物料清单(BOM) Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpBomExcel(@Valid ErpBomPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpBomDO> list = erpBomService.getErpBomPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "ERP物料清单(BOM).xls", "数据", ErpBomRespVO.class,
|
||||
BeanUtils.toBean(list, ErpBomRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpBomDetailDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpBomDetailService;
|
||||
|
||||
@Tag(name = "管理后台 - ERP物料清单(BOM)明细")
|
||||
@RestController
|
||||
@RequestMapping("/sply/erp-bom-detail")
|
||||
@Validated
|
||||
public class ErpBomDetailController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ErpBomDetailService erpBomDetailService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP物料清单(BOM)明细")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom-detail:create')")
|
||||
public CommonResult<ErpBomDetailRespVO> createErpBomDetail(@Valid @RequestBody ErpBomDetailSaveReqVO createReqVO) {
|
||||
return success(erpBomDetailService.createErpBomDetail(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP物料清单(BOM)明细")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom-detail:update')")
|
||||
public CommonResult<Boolean> updateErpBomDetail(@Valid @RequestBody ErpBomDetailSaveReqVO updateReqVO) {
|
||||
erpBomDetailService.updateErpBomDetail(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP物料清单(BOM)明细")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom-detail:delete')")
|
||||
public CommonResult<Boolean> deleteErpBomDetail(@RequestParam("id") Long id) {
|
||||
erpBomDetailService.deleteErpBomDetail(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP物料清单(BOM)明细")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom-detail:delete')")
|
||||
public CommonResult<Boolean> deleteErpBomDetailList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpBomDetailService.deleteErpBomDetailListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP物料清单(BOM)明细")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom-detail:query')")
|
||||
public CommonResult<ErpBomDetailRespVO> getErpBomDetail(@RequestParam("id") Long id) {
|
||||
ErpBomDetailDO erpBomDetail = erpBomDetailService.getErpBomDetail(id);
|
||||
return success(BeanUtils.toBean(erpBomDetail, ErpBomDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP物料清单(BOM)明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom-detail:query')")
|
||||
public CommonResult<PageResult<ErpBomDetailRespVO>> getErpBomDetailPage(@Valid ErpBomDetailPageReqVO pageReqVO) {
|
||||
PageResult<ErpBomDetailDO> pageResult = erpBomDetailService.getErpBomDetailPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpBomDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP物料清单(BOM)明细 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-bom-detail:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpBomDetailExcel(@Valid ErpBomDetailPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpBomDetailDO> list = erpBomDetailService.getErpBomDetailPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "ERP物料清单(BOM)明细.xls", "数据", ErpBomDetailRespVO.class,
|
||||
BeanUtils.toBean(list, ErpBomDetailRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -33,7 +33,7 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - ERP公司")
|
||||
@RestController
|
||||
@RequestMapping("/admin/erp/company")
|
||||
@RequestMapping("/sply/erp-company")
|
||||
@Validated
|
||||
public class ErpCompanyController {
|
||||
|
||||
@@ -104,10 +104,10 @@ public class ErpCompanyController {
|
||||
BeanUtils.toBean(list, ErpCompanyRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/callErpRfcInterface")
|
||||
@PostMapping("/getErpCompanyTask")
|
||||
@Operation(summary = "定时获得erp更新公司")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-company:query')")
|
||||
public void callErpRfcInterface() {
|
||||
public void getErpCompanyTask() {
|
||||
erpCompanyService.callErpRfcInterface();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - ERP客商信息")
|
||||
@RestController
|
||||
@RequestMapping("/erp/customer")
|
||||
@RequestMapping("/sply/erp-customer")
|
||||
@Validated
|
||||
public class ErpCustomerController {
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
@Tag(name = "管理后台 - ERP物料信息")
|
||||
@RestController
|
||||
@RequestMapping("/erp/material")
|
||||
@RequestMapping("/sply/erp-material")
|
||||
@Validated
|
||||
public class ErpMaterialController {
|
||||
|
||||
@@ -104,10 +104,10 @@ public class ErpMaterialController {
|
||||
BeanUtils.toBean(list, ErpMaterialRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/callErpRfcInterface")
|
||||
@PostMapping("/getErpMaterialTask")
|
||||
@Operation(summary = "定时获得erp更新公司")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:create')")
|
||||
public void callErpRfcInterface() {
|
||||
public void getErpMaterialTask() {
|
||||
erpMaterialService.callErpRfcInterface();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpProcessDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpProcessService;
|
||||
|
||||
@Tag(name = "管理后台 - ERP工艺路线")
|
||||
@RestController
|
||||
@RequestMapping("/sply/erp-process")
|
||||
@Validated
|
||||
public class ErpProcessController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ErpProcessService erpProcessService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP工艺路线")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process:create')")
|
||||
public CommonResult<ErpProcessRespVO> createErpProcess(@Valid @RequestBody ErpProcessSaveReqVO createReqVO) {
|
||||
return success(erpProcessService.createErpProcess(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP工艺路线")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process:update')")
|
||||
public CommonResult<Boolean> updateErpProcess(@Valid @RequestBody ErpProcessSaveReqVO updateReqVO) {
|
||||
erpProcessService.updateErpProcess(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP工艺路线")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process:delete')")
|
||||
public CommonResult<Boolean> deleteErpProcess(@RequestParam("id") Long id) {
|
||||
erpProcessService.deleteErpProcess(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP工艺路线")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process:delete')")
|
||||
public CommonResult<Boolean> deleteErpProcessList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpProcessService.deleteErpProcessListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP工艺路线")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process:query')")
|
||||
public CommonResult<ErpProcessRespVO> getErpProcess(@RequestParam("id") Long id) {
|
||||
ErpProcessDO erpProcess = erpProcessService.getErpProcess(id);
|
||||
return success(BeanUtils.toBean(erpProcess, ErpProcessRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP工艺路线分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process:query')")
|
||||
public CommonResult<PageResult<ErpProcessRespVO>> getErpProcessPage(@Valid ErpProcessPageReqVO pageReqVO) {
|
||||
PageResult<ErpProcessDO> pageResult = erpProcessService.getErpProcessPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpProcessRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP工艺路线 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpProcessExcel(@Valid ErpProcessPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpProcessDO> list = erpProcessService.getErpProcessPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "ERP工艺路线.xls", "数据", ErpProcessRespVO.class,
|
||||
BeanUtils.toBean(list, ErpProcessRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpProcessDetailDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpProcessDetailService;
|
||||
|
||||
@Tag(name = "管理后台 - ERP工艺路线明细")
|
||||
@RestController
|
||||
@RequestMapping("/sply/erp-process-detail")
|
||||
@Validated
|
||||
public class ErpProcessDetailController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ErpProcessDetailService erpProcessDetailService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP工艺路线明细")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process-detail:create')")
|
||||
public CommonResult<ErpProcessDetailRespVO> createErpProcessDetail(@Valid @RequestBody ErpProcessDetailSaveReqVO createReqVO) {
|
||||
return success(erpProcessDetailService.createErpProcessDetail(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP工艺路线明细")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process-detail:update')")
|
||||
public CommonResult<Boolean> updateErpProcessDetail(@Valid @RequestBody ErpProcessDetailSaveReqVO updateReqVO) {
|
||||
erpProcessDetailService.updateErpProcessDetail(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP工艺路线明细")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process-detail:delete')")
|
||||
public CommonResult<Boolean> deleteErpProcessDetail(@RequestParam("id") Long id) {
|
||||
erpProcessDetailService.deleteErpProcessDetail(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP工艺路线明细")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process-detail:delete')")
|
||||
public CommonResult<Boolean> deleteErpProcessDetailList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpProcessDetailService.deleteErpProcessDetailListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP工艺路线明细")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process-detail:query')")
|
||||
public CommonResult<ErpProcessDetailRespVO> getErpProcessDetail(@RequestParam("id") Long id) {
|
||||
ErpProcessDetailDO erpProcessDetail = erpProcessDetailService.getErpProcessDetail(id);
|
||||
return success(BeanUtils.toBean(erpProcessDetail, ErpProcessDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP工艺路线明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process-detail:query')")
|
||||
public CommonResult<PageResult<ErpProcessDetailRespVO>> getErpProcessDetailPage(@Valid ErpProcessDetailPageReqVO pageReqVO) {
|
||||
PageResult<ErpProcessDetailDO> pageResult = erpProcessDetailService.getErpProcessDetailPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpProcessDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP工艺路线明细 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-process-detail:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpProcessDetailExcel(@Valid ErpProcessDetailPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpProcessDetailDO> list = erpProcessDetailService.getErpProcessDetailPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "ERP工艺路线明细.xls", "数据", ErpProcessDetailRespVO.class,
|
||||
BeanUtils.toBean(list, ErpProcessDetailRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP物料清单(BOM)明细分页 Request VO")
|
||||
@Data
|
||||
public class ErpBomDetailPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "BOM主键", example = "24876")
|
||||
private String bomId;
|
||||
|
||||
@Schema(description = "ERP物料清单主键", example = "14731")
|
||||
private String erpBomId;
|
||||
|
||||
@Schema(description = "子项物料编码")
|
||||
private String childMaterialNumber;
|
||||
|
||||
@Schema(description = "子项物料描述")
|
||||
private BigDecimal childMaterialDescription;
|
||||
|
||||
@Schema(description = "子项类别")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "基本数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Schema(description = "基本单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "物料标识", example = "2")
|
||||
private String identificationType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP物料清单(BOM)明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpBomDetailRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2110")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "BOM主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24876")
|
||||
@ExcelProperty("BOM主键")
|
||||
private String bomId;
|
||||
|
||||
@Schema(description = "ERP物料清单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14731")
|
||||
@ExcelProperty("ERP物料清单主键")
|
||||
private String erpBomId;
|
||||
|
||||
@Schema(description = "子项物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("子项物料编码")
|
||||
private String childMaterialNumber;
|
||||
|
||||
@Schema(description = "子项物料描述", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("子项物料描述")
|
||||
private BigDecimal childMaterialDescription;
|
||||
|
||||
@Schema(description = "子项类别", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("子项类别")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "基本数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("基本数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Schema(description = "基本单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("基本单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "物料标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("物料标识")
|
||||
private String identificationType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP物料清单(BOM)明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpBomDetailSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2110")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "BOM主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24876")
|
||||
@NotEmpty(message = "BOM主键不能为空")
|
||||
private String bomId;
|
||||
|
||||
@Schema(description = "ERP物料清单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14731")
|
||||
@NotEmpty(message = "ERP物料清单主键不能为空")
|
||||
private String erpBomId;
|
||||
|
||||
@Schema(description = "子项物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "子项物料编码不能为空")
|
||||
private String childMaterialNumber;
|
||||
|
||||
@Schema(description = "子项物料描述", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "子项物料描述不能为空")
|
||||
private BigDecimal childMaterialDescription;
|
||||
|
||||
@Schema(description = "子项类别", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "子项类别不能为空")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "基本数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "基本数量不能为空")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Schema(description = "基本单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "基本单位不能为空")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "物料标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "物料标识不能为空")
|
||||
private String identificationType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP物料清单(BOM)分页 Request VO")
|
||||
@Data
|
||||
public class ErpBomPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
private BigDecimal factoryNumber;
|
||||
|
||||
@Schema(description = "顶层物料编码")
|
||||
private String upMaterial;
|
||||
|
||||
@Schema(description = "可选BOM")
|
||||
private String useItem;
|
||||
|
||||
@Schema(description = "物料描述")
|
||||
private String materialDescription;
|
||||
|
||||
@Schema(description = "基本数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Schema(description = "基本单位")
|
||||
private String unit;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP物料清单(BOM) Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpBomRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31348")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("工厂编码")
|
||||
private BigDecimal factoryNumber;
|
||||
|
||||
@Schema(description = "顶层物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("顶层物料编码")
|
||||
private String upMaterial;
|
||||
|
||||
@Schema(description = "可选BOM", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("可选BOM")
|
||||
private String useItem;
|
||||
|
||||
@Schema(description = "物料描述")
|
||||
@ExcelProperty("物料描述")
|
||||
private String materialDescription;
|
||||
|
||||
@Schema(description = "基本数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("基本数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Schema(description = "基本单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("基本单位")
|
||||
private String unit;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP物料清单(BOM)新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpBomSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31348")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "工厂编码不能为空")
|
||||
private BigDecimal factoryNumber;
|
||||
|
||||
@Schema(description = "顶层物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "顶层物料编码不能为空")
|
||||
private String upMaterial;
|
||||
|
||||
@Schema(description = "可选BOM", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "可选BOM不能为空")
|
||||
private String useItem;
|
||||
|
||||
@Schema(description = "物料描述")
|
||||
private String materialDescription;
|
||||
|
||||
@Schema(description = "基本数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "基本数量不能为空")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Schema(description = "基本单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "基本单位不能为空")
|
||||
private String unit;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工艺路线明细分页 Request VO")
|
||||
@Data
|
||||
public class ErpProcessDetailPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "ERP工艺路线主键", example = "30589")
|
||||
private String processId;
|
||||
|
||||
@Schema(description = "工序编码")
|
||||
private BigDecimal processingNumber;
|
||||
|
||||
@Schema(description = "工序描述", example = "李四")
|
||||
private String processingName;
|
||||
|
||||
@Schema(description = "作业的计量单位")
|
||||
private String uom;
|
||||
|
||||
@Schema(description = "工作中心编号")
|
||||
private String workCenterNumber;
|
||||
|
||||
@Schema(description = "工作中心描述", example = "张三")
|
||||
private String workCenterName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工艺路线明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpProcessDetailRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5707")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "ERP工艺路线主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "30589")
|
||||
@ExcelProperty("ERP工艺路线主键")
|
||||
private String processId;
|
||||
|
||||
@Schema(description = "工序编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("工序编码")
|
||||
private BigDecimal processingNumber;
|
||||
|
||||
@Schema(description = "工序描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@ExcelProperty("工序描述")
|
||||
private String processingName;
|
||||
|
||||
@Schema(description = "作业的计量单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("作业的计量单位")
|
||||
private String uom;
|
||||
|
||||
@Schema(description = "工作中心编号")
|
||||
@ExcelProperty("工作中心编号")
|
||||
private String workCenterNumber;
|
||||
|
||||
@Schema(description = "工作中心描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("工作中心描述")
|
||||
private String workCenterName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工艺路线明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpProcessDetailSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "5707")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "ERP工艺路线主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "30589")
|
||||
@NotEmpty(message = "ERP工艺路线主键不能为空")
|
||||
private String processId;
|
||||
|
||||
@Schema(description = "工序编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "工序编码不能为空")
|
||||
private BigDecimal processingNumber;
|
||||
|
||||
@Schema(description = "工序描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@NotEmpty(message = "工序描述不能为空")
|
||||
private String processingName;
|
||||
|
||||
@Schema(description = "作业的计量单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "作业的计量单位不能为空")
|
||||
private String uom;
|
||||
|
||||
@Schema(description = "工作中心编号")
|
||||
private String workCenterNumber;
|
||||
|
||||
@Schema(description = "工作中心描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "工作中心描述不能为空")
|
||||
private String workCenterName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工艺路线分页 Request VO")
|
||||
@Data
|
||||
public class ErpProcessPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
private BigDecimal factoryNumber;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料描述", example = "李四")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "工艺路线组")
|
||||
private String blineGroup;
|
||||
|
||||
@Schema(description = "组计数器", example = "27504")
|
||||
private Long groupCount;
|
||||
|
||||
@Schema(description = "工艺路线描述")
|
||||
private String blineDescription;
|
||||
|
||||
@Schema(description = "计量单位")
|
||||
private String uom;
|
||||
|
||||
@Schema(description = "用途")
|
||||
private String useDescription;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工艺路线 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpProcessRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "13200")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("工厂编码")
|
||||
private BigDecimal factoryNumber;
|
||||
|
||||
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料描述", example = "李四")
|
||||
@ExcelProperty("物料描述")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "工艺路线组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("工艺路线组")
|
||||
private String blineGroup;
|
||||
|
||||
@Schema(description = "组计数器", requiredMode = Schema.RequiredMode.REQUIRED, example = "27504")
|
||||
@ExcelProperty("组计数器")
|
||||
private Long groupCount;
|
||||
|
||||
@Schema(description = "工艺路线描述", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("工艺路线描述")
|
||||
private String blineDescription;
|
||||
|
||||
@Schema(description = "计量单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("计量单位")
|
||||
private String uom;
|
||||
|
||||
@Schema(description = "用途")
|
||||
@ExcelProperty("用途")
|
||||
private String useDescription;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("状态")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工艺路线新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpProcessSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "13200")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "工厂编码不能为空")
|
||||
private BigDecimal factoryNumber;
|
||||
|
||||
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "物料编码不能为空")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料描述", example = "李四")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "工艺路线组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "工艺路线组不能为空")
|
||||
private String blineGroup;
|
||||
|
||||
@Schema(description = "组计数器", requiredMode = Schema.RequiredMode.REQUIRED, example = "27504")
|
||||
@NotNull(message = "组计数器不能为空")
|
||||
private Long groupCount;
|
||||
|
||||
@Schema(description = "工艺路线描述", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "工艺路线描述不能为空")
|
||||
private String blineDescription;
|
||||
|
||||
@Schema(description = "计量单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "计量单位不能为空")
|
||||
private String uom;
|
||||
|
||||
@Schema(description = "用途")
|
||||
private String useDescription;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "状态不能为空")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
/**
|
||||
* ERP物料清单(BOM) DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_erp_bm")
|
||||
@KeySequence("sply_erp_bm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpBomDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 工厂编码
|
||||
*/
|
||||
@TableField("FACT_NUM")
|
||||
private BigDecimal factoryNumber;
|
||||
/**
|
||||
* 顶层物料编码
|
||||
*/
|
||||
@TableField("UP_MTRL")
|
||||
private String upMaterial;
|
||||
/**
|
||||
* 可选BOM
|
||||
*/
|
||||
@TableField("USE_ITM")
|
||||
private String useItem;
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
@TableField("MTRL_DSP")
|
||||
private String materialDescription;
|
||||
/**
|
||||
* 基本数量
|
||||
*/
|
||||
@TableField("QTY")
|
||||
private BigDecimal quantity;
|
||||
/**
|
||||
* 基本单位
|
||||
*/
|
||||
@TableField("UNT")
|
||||
private String unit;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
/**
|
||||
* ERP物料清单(BOM)明细 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_erp_bm_dtl")
|
||||
@KeySequence("sply_erp_bm_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpBomDetailDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* BOM主键
|
||||
*/
|
||||
@TableField("BM_ID")
|
||||
private String bomId;
|
||||
/**
|
||||
* ERP物料清单主键
|
||||
*/
|
||||
@TableField("ERP_BM_ID")
|
||||
private String erpBomId;
|
||||
/**
|
||||
* 子项物料编码
|
||||
*/
|
||||
@TableField("CHD_MTRL_NUM")
|
||||
private String childMaterialNumber;
|
||||
/**
|
||||
* 子项物料描述
|
||||
*/
|
||||
@TableField("CHD_MTRL_DSP")
|
||||
private BigDecimal childMaterialDescription;
|
||||
/**
|
||||
* 子项类别
|
||||
*/
|
||||
@TableField("CTGR")
|
||||
private String category;
|
||||
/**
|
||||
* 基本数量
|
||||
*/
|
||||
@TableField("QTY")
|
||||
private BigDecimal quantity;
|
||||
/**
|
||||
* 基本单位
|
||||
*/
|
||||
@TableField("UNT")
|
||||
private String unit;
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
@TableField("IDE_TP")
|
||||
private String identificationType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
/**
|
||||
* ERP工艺路线 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_erp_prcs")
|
||||
@KeySequence("sply_erp_prcs_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpProcessDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 工厂编码
|
||||
*/
|
||||
@TableField("FACT_NUM")
|
||||
private BigDecimal factoryNumber;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@TableField("MTRL_NUM")
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
@TableField("MTRL_NAME")
|
||||
private String materialName;
|
||||
/**
|
||||
* 工艺路线组
|
||||
*/
|
||||
@TableField("BLN_GRP")
|
||||
private String blineGroup;
|
||||
/**
|
||||
* 组计数器
|
||||
*/
|
||||
@TableField("GRP_CNT")
|
||||
private Long groupCount;
|
||||
/**
|
||||
* 工艺路线描述
|
||||
*/
|
||||
@TableField("BLN_DSP")
|
||||
private String blineDescription;
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
@TableField("UOM")
|
||||
private String uom;
|
||||
/**
|
||||
* 用途
|
||||
*/
|
||||
@TableField("USE_DSP")
|
||||
private String useDescription;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@TableField("STS")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
/**
|
||||
* ERP工艺路线明细 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_erp_prcs_dtl")
|
||||
@KeySequence("sply_erp_prcs_dtl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpProcessDetailDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* ERP工艺路线主键
|
||||
*/
|
||||
@TableField("PRCS_ID")
|
||||
private String processId;
|
||||
/**
|
||||
* 工序编码
|
||||
*/
|
||||
@TableField("PROC_NUM")
|
||||
private BigDecimal processingNumber;
|
||||
/**
|
||||
* 工序描述
|
||||
*/
|
||||
@TableField("PROC_NAME")
|
||||
private String processingName;
|
||||
/**
|
||||
* 作业的计量单位
|
||||
*/
|
||||
@TableField("UOM")
|
||||
private String uom;
|
||||
/**
|
||||
* 工作中心编号
|
||||
*/
|
||||
@TableField("WRK_CTR_NUM")
|
||||
private String workCenterNumber;
|
||||
/**
|
||||
* 工作中心描述
|
||||
*/
|
||||
@TableField("WRK_CTR_NAME")
|
||||
private String workCenterName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.mysql.erp;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpBomDetailDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
|
||||
/**
|
||||
* ERP物料清单(BOM)明细 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ErpBomDetailMapper extends BaseMapperX<ErpBomDetailDO> {
|
||||
|
||||
default PageResult<ErpBomDetailDO> selectPage(ErpBomDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ErpBomDetailDO>()
|
||||
.eqIfPresent(ErpBomDetailDO::getBomId, reqVO.getBomId())
|
||||
.eqIfPresent(ErpBomDetailDO::getErpBomId, reqVO.getErpBomId())
|
||||
.eqIfPresent(ErpBomDetailDO::getChildMaterialNumber, reqVO.getChildMaterialNumber())
|
||||
.eqIfPresent(ErpBomDetailDO::getChildMaterialDescription, reqVO.getChildMaterialDescription())
|
||||
.eqIfPresent(ErpBomDetailDO::getCategory, reqVO.getCategory())
|
||||
.eqIfPresent(ErpBomDetailDO::getQuantity, reqVO.getQuantity())
|
||||
.eqIfPresent(ErpBomDetailDO::getUnit, reqVO.getUnit())
|
||||
.eqIfPresent(ErpBomDetailDO::getIdentificationType, reqVO.getIdentificationType())
|
||||
.orderByDesc(ErpBomDetailDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.mysql.erp;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpBomDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
|
||||
/**
|
||||
* ERP物料清单(BOM) Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ErpBomMapper extends BaseMapperX<ErpBomDO> {
|
||||
|
||||
default PageResult<ErpBomDO> selectPage(ErpBomPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ErpBomDO>()
|
||||
.eqIfPresent(ErpBomDO::getFactoryNumber, reqVO.getFactoryNumber())
|
||||
.eqIfPresent(ErpBomDO::getUpMaterial, reqVO.getUpMaterial())
|
||||
.eqIfPresent(ErpBomDO::getUseItem, reqVO.getUseItem())
|
||||
.eqIfPresent(ErpBomDO::getMaterialDescription, reqVO.getMaterialDescription())
|
||||
.eqIfPresent(ErpBomDO::getQuantity, reqVO.getQuantity())
|
||||
.eqIfPresent(ErpBomDO::getUnit, reqVO.getUnit())
|
||||
.orderByDesc(ErpBomDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.mysql.erp;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpProcessDetailDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
|
||||
/**
|
||||
* ERP工艺路线明细 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ErpProcessDetailMapper extends BaseMapperX<ErpProcessDetailDO> {
|
||||
|
||||
default PageResult<ErpProcessDetailDO> selectPage(ErpProcessDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ErpProcessDetailDO>()
|
||||
.eqIfPresent(ErpProcessDetailDO::getProcessId, reqVO.getProcessId())
|
||||
.eqIfPresent(ErpProcessDetailDO::getProcessingNumber, reqVO.getProcessingNumber())
|
||||
.likeIfPresent(ErpProcessDetailDO::getProcessingName, reqVO.getProcessingName())
|
||||
.eqIfPresent(ErpProcessDetailDO::getUom, reqVO.getUom())
|
||||
.eqIfPresent(ErpProcessDetailDO::getWorkCenterNumber, reqVO.getWorkCenterNumber())
|
||||
.likeIfPresent(ErpProcessDetailDO::getWorkCenterName, reqVO.getWorkCenterName())
|
||||
.orderByDesc(ErpProcessDetailDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.mysql.erp;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpProcessDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
|
||||
/**
|
||||
* ERP工艺路线 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ErpProcessMapper extends BaseMapperX<ErpProcessDO> {
|
||||
|
||||
default PageResult<ErpProcessDO> selectPage(ErpProcessPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ErpProcessDO>()
|
||||
.eqIfPresent(ErpProcessDO::getFactoryNumber, reqVO.getFactoryNumber())
|
||||
.eqIfPresent(ErpProcessDO::getMaterialNumber, reqVO.getMaterialNumber())
|
||||
.likeIfPresent(ErpProcessDO::getMaterialName, reqVO.getMaterialName())
|
||||
.eqIfPresent(ErpProcessDO::getBlineGroup, reqVO.getBlineGroup())
|
||||
.eqIfPresent(ErpProcessDO::getGroupCount, reqVO.getGroupCount())
|
||||
.eqIfPresent(ErpProcessDO::getBlineDescription, reqVO.getBlineDescription())
|
||||
.eqIfPresent(ErpProcessDO::getUom, reqVO.getUom())
|
||||
.eqIfPresent(ErpProcessDO::getUseDescription, reqVO.getUseDescription())
|
||||
.eqIfPresent(ErpProcessDO::getStatus, reqVO.getStatus())
|
||||
.orderByDesc(ErpProcessDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.erp.service.erp;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpBomDetailDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* ERP物料清单(BOM)明细 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ErpBomDetailService {
|
||||
|
||||
/**
|
||||
* 创建ERP物料清单(BOM)明细
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ErpBomDetailRespVO createErpBomDetail(@Valid ErpBomDetailSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新ERP物料清单(BOM)明细
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateErpBomDetail(@Valid ErpBomDetailSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除ERP物料清单(BOM)明细
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteErpBomDetail(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除ERP物料清单(BOM)明细
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteErpBomDetailListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得ERP物料清单(BOM)明细
|
||||
*
|
||||
* @param id 编号
|
||||
* @return ERP物料清单(BOM)明细
|
||||
*/
|
||||
ErpBomDetailDO getErpBomDetail(Long id);
|
||||
|
||||
/**
|
||||
* 获得ERP物料清单(BOM)明细分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return ERP物料清单(BOM)明细分页
|
||||
*/
|
||||
PageResult<ErpBomDetailDO> getErpBomDetailPage(ErpBomDetailPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package cn.iocoder.yudao.module.erp.service.erp;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpBomDetailDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.erp.dal.mysql.erp.ErpBomDetailMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* ERP物料清单(BOM)明细 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ErpBomDetailServiceImpl implements ErpBomDetailService {
|
||||
|
||||
@Resource
|
||||
private ErpBomDetailMapper erpBomDetailMapper;
|
||||
|
||||
@Override
|
||||
public ErpBomDetailRespVO createErpBomDetail(ErpBomDetailSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ErpBomDetailDO erpBomDetail = BeanUtils.toBean(createReqVO, ErpBomDetailDO.class);
|
||||
erpBomDetailMapper.insert(erpBomDetail);
|
||||
// 返回
|
||||
return BeanUtils.toBean(erpBomDetail, ErpBomDetailRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateErpBomDetail(ErpBomDetailSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateErpBomDetailExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ErpBomDetailDO updateObj = BeanUtils.toBean(updateReqVO, ErpBomDetailDO.class);
|
||||
erpBomDetailMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteErpBomDetail(Long id) {
|
||||
// 校验存在
|
||||
validateErpBomDetailExists(id);
|
||||
// 删除
|
||||
erpBomDetailMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteErpBomDetailListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateErpBomDetailExists(ids);
|
||||
// 删除
|
||||
erpBomDetailMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateErpBomDetailExists(List<Long> ids) {
|
||||
List<ErpBomDetailDO> list = erpBomDetailMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(ERP_BOM_DETAIL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateErpBomDetailExists(Long id) {
|
||||
if (erpBomDetailMapper.selectById(id) == null) {
|
||||
throw exception(ERP_BOM_DETAIL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ErpBomDetailDO getErpBomDetail(Long id) {
|
||||
return erpBomDetailMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ErpBomDetailDO> getErpBomDetailPage(ErpBomDetailPageReqVO pageReqVO) {
|
||||
return erpBomDetailMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.erp.service.erp;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpBomDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* ERP物料清单(BOM) Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ErpBomService {
|
||||
|
||||
/**
|
||||
* 创建ERP物料清单(BOM)
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ErpBomRespVO createErpBom(@Valid ErpBomSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新ERP物料清单(BOM)
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateErpBom(@Valid ErpBomSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除ERP物料清单(BOM)
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteErpBom(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除ERP物料清单(BOM)
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteErpBomListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得ERP物料清单(BOM)
|
||||
*
|
||||
* @param id 编号
|
||||
* @return ERP物料清单(BOM)
|
||||
*/
|
||||
ErpBomDO getErpBom(Long id);
|
||||
|
||||
/**
|
||||
* 获得ERP物料清单(BOM)分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return ERP物料清单(BOM)分页
|
||||
*/
|
||||
PageResult<ErpBomDO> getErpBomPage(ErpBomPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package cn.iocoder.yudao.module.erp.service.erp;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpBomDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.erp.dal.mysql.erp.ErpBomMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* ERP物料清单(BOM) Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ErpBomServiceImpl implements ErpBomService {
|
||||
|
||||
@Resource
|
||||
private ErpBomMapper erpBomMapper;
|
||||
|
||||
@Override
|
||||
public ErpBomRespVO createErpBom(ErpBomSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ErpBomDO erpBom = BeanUtils.toBean(createReqVO, ErpBomDO.class);
|
||||
erpBomMapper.insert(erpBom);
|
||||
// 返回
|
||||
return BeanUtils.toBean(erpBom, ErpBomRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateErpBom(ErpBomSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateErpBomExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ErpBomDO updateObj = BeanUtils.toBean(updateReqVO, ErpBomDO.class);
|
||||
erpBomMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteErpBom(Long id) {
|
||||
// 校验存在
|
||||
validateErpBomExists(id);
|
||||
// 删除
|
||||
erpBomMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteErpBomListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateErpBomExists(ids);
|
||||
// 删除
|
||||
erpBomMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateErpBomExists(List<Long> ids) {
|
||||
List<ErpBomDO> list = erpBomMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(ERP_BOM_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateErpBomExists(Long id) {
|
||||
if (erpBomMapper.selectById(id) == null) {
|
||||
throw exception(ERP_BOM_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ErpBomDO getErpBom(Long id) {
|
||||
return erpBomMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ErpBomDO> getErpBomPage(ErpBomPageReqVO pageReqVO) {
|
||||
return erpBomMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.erp.service.erp;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpProcessDetailDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* ERP工艺路线明细 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ErpProcessDetailService {
|
||||
|
||||
/**
|
||||
* 创建ERP工艺路线明细
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ErpProcessDetailRespVO createErpProcessDetail(@Valid ErpProcessDetailSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新ERP工艺路线明细
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateErpProcessDetail(@Valid ErpProcessDetailSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除ERP工艺路线明细
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteErpProcessDetail(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除ERP工艺路线明细
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteErpProcessDetailListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得ERP工艺路线明细
|
||||
*
|
||||
* @param id 编号
|
||||
* @return ERP工艺路线明细
|
||||
*/
|
||||
ErpProcessDetailDO getErpProcessDetail(Long id);
|
||||
|
||||
/**
|
||||
* 获得ERP工艺路线明细分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return ERP工艺路线明细分页
|
||||
*/
|
||||
PageResult<ErpProcessDetailDO> getErpProcessDetailPage(ErpProcessDetailPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package cn.iocoder.yudao.module.erp.service.erp;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpProcessDetailDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.erp.dal.mysql.erp.ErpProcessDetailMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* ERP工艺路线明细 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ErpProcessDetailServiceImpl implements ErpProcessDetailService {
|
||||
|
||||
@Resource
|
||||
private ErpProcessDetailMapper erpProcessDetailMapper;
|
||||
|
||||
@Override
|
||||
public ErpProcessDetailRespVO createErpProcessDetail(ErpProcessDetailSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ErpProcessDetailDO erpProcessDetail = BeanUtils.toBean(createReqVO, ErpProcessDetailDO.class);
|
||||
erpProcessDetailMapper.insert(erpProcessDetail);
|
||||
// 返回
|
||||
return BeanUtils.toBean(erpProcessDetail, ErpProcessDetailRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateErpProcessDetail(ErpProcessDetailSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateErpProcessDetailExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ErpProcessDetailDO updateObj = BeanUtils.toBean(updateReqVO, ErpProcessDetailDO.class);
|
||||
erpProcessDetailMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteErpProcessDetail(Long id) {
|
||||
// 校验存在
|
||||
validateErpProcessDetailExists(id);
|
||||
// 删除
|
||||
erpProcessDetailMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteErpProcessDetailListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateErpProcessDetailExists(ids);
|
||||
// 删除
|
||||
erpProcessDetailMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateErpProcessDetailExists(List<Long> ids) {
|
||||
List<ErpProcessDetailDO> list = erpProcessDetailMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(ERP_PROCESS_DETAIL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateErpProcessDetailExists(Long id) {
|
||||
if (erpProcessDetailMapper.selectById(id) == null) {
|
||||
throw exception(ERP_PROCESS_DETAIL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ErpProcessDetailDO getErpProcessDetail(Long id) {
|
||||
return erpProcessDetailMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ErpProcessDetailDO> getErpProcessDetailPage(ErpProcessDetailPageReqVO pageReqVO) {
|
||||
return erpProcessDetailMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.erp.service.erp;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpProcessDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* ERP工艺路线 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ErpProcessService {
|
||||
|
||||
/**
|
||||
* 创建ERP工艺路线
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ErpProcessRespVO createErpProcess(@Valid ErpProcessSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新ERP工艺路线
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateErpProcess(@Valid ErpProcessSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除ERP工艺路线
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteErpProcess(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除ERP工艺路线
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteErpProcessListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得ERP工艺路线
|
||||
*
|
||||
* @param id 编号
|
||||
* @return ERP工艺路线
|
||||
*/
|
||||
ErpProcessDO getErpProcess(Long id);
|
||||
|
||||
/**
|
||||
* 获得ERP工艺路线分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return ERP工艺路线分页
|
||||
*/
|
||||
PageResult<ErpProcessDO> getErpProcessPage(ErpProcessPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package cn.iocoder.yudao.module.erp.service.erp;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.*;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpProcessDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.erp.dal.mysql.erp.ErpProcessMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static cn.iocoder.yudao.module.erp.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* ERP工艺路线 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ErpProcessServiceImpl implements ErpProcessService {
|
||||
|
||||
@Resource
|
||||
private ErpProcessMapper erpProcessMapper;
|
||||
|
||||
@Override
|
||||
public ErpProcessRespVO createErpProcess(ErpProcessSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ErpProcessDO erpProcess = BeanUtils.toBean(createReqVO, ErpProcessDO.class);
|
||||
erpProcessMapper.insert(erpProcess);
|
||||
// 返回
|
||||
return BeanUtils.toBean(erpProcess, ErpProcessRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateErpProcess(ErpProcessSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateErpProcessExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ErpProcessDO updateObj = BeanUtils.toBean(updateReqVO, ErpProcessDO.class);
|
||||
erpProcessMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteErpProcess(Long id) {
|
||||
// 校验存在
|
||||
validateErpProcessExists(id);
|
||||
// 删除
|
||||
erpProcessMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteErpProcessListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateErpProcessExists(ids);
|
||||
// 删除
|
||||
erpProcessMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateErpProcessExists(List<Long> ids) {
|
||||
List<ErpProcessDO> list = erpProcessMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(ERP_PROCESS_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateErpProcessExists(Long id) {
|
||||
if (erpProcessMapper.selectById(id) == null) {
|
||||
throw exception(ERP_PROCESS_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ErpProcessDO getErpProcess(Long id) {
|
||||
return erpProcessMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ErpProcessDO> getErpProcessPage(ErpProcessPageReqVO pageReqVO) {
|
||||
return erpProcessMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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="cn.iocoder.yudao.module.erp.dal.mysql.erp.ErpBomDetailMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 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="cn.iocoder.yudao.module.erp.dal.mysql.erp.ErpBomMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 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="cn.iocoder.yudao.module.erp.dal.mysql.erp.ErpProcessDetailMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 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="cn.iocoder.yudao.module.erp.dal.mysql.erp.ErpProcessMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user