Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -19,7 +19,7 @@
|
||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||
|
||||
<properties>
|
||||
<revision>3.0.31</revision>
|
||||
<revision>3.0.34</revision>
|
||||
<!-- Maven 相关 -->
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
|
||||
@@ -12,7 +12,9 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode TEMPLATE_INSTANCE_NOT_EXISTS = new ErrorCode(1_027_000_504, "模板实例不存在");
|
||||
ErrorCode TMPL_TP_SATUS_ERROR = new ErrorCode(1_027_000_506, "状态变更失败");
|
||||
ErrorCode TMPL_TP_DEl_ERROR = new ErrorCode(1_027_000_507, "模版分类删除失败");
|
||||
|
||||
ErrorCode TEMPLATE_INSTANCE_DATA_NOT_EXISTS = new ErrorCode(1_027_000_508, "实例字段值不存在");
|
||||
ErrorCode TEMPLATE_INSTANCE_ITEM_NOT_EXISTS = new ErrorCode(1_027_000_509, "实例条款值不存在");
|
||||
ErrorCode PARAMS_IS_NULL_OR_ERR = new ErrorCode(1_027_000_510, "参数为空");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
package cn.iocoder.yudao.module.base.controller.admin.templtp;
|
||||
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceDataPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceDataRespVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceDataSaveReqVO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TemplateInstanceDataDO;
|
||||
import cn.iocoder.yudao.module.base.service.tmpltp.TemplateInstanceDataService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
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.*;
|
||||
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 实例字段值")
|
||||
@RestController
|
||||
@RequestMapping("/base/template-instance-data")
|
||||
@Validated
|
||||
public class TemplateInstanceDataController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private TemplateInstanceDataService templateInstanceDataService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建实例字段值")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-data:create')")
|
||||
public CommonResult<TemplateInstanceDataRespVO> createTemplateInstanceData(@Valid @RequestBody TemplateInstanceDataSaveReqVO createReqVO) {
|
||||
return success(templateInstanceDataService.createTemplateInstanceData(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新实例字段值")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-data:update')")
|
||||
public CommonResult<Boolean> updateTemplateInstanceData(@Valid @RequestBody TemplateInstanceDataSaveReqVO updateReqVO) {
|
||||
templateInstanceDataService.updateTemplateInstanceData(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除实例字段值")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-data:delete')")
|
||||
public CommonResult<Boolean> deleteTemplateInstanceData(@RequestParam("id") Long id) {
|
||||
templateInstanceDataService.deleteTemplateInstanceData(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除实例字段值")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-data:delete')")
|
||||
public CommonResult<Boolean> deleteTemplateInstanceDataList(@RequestBody BatchDeleteReqVO req) {
|
||||
templateInstanceDataService.deleteTemplateInstanceDataListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得实例字段值")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-data:query')")
|
||||
public CommonResult<TemplateInstanceDataRespVO> getTemplateInstanceData(@RequestParam("id") Long id) {
|
||||
TemplateInstanceDataDO templateInstanceData = templateInstanceDataService.getTemplateInstanceData(id);
|
||||
return success(BeanUtils.toBean(templateInstanceData, TemplateInstanceDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得实例字段值分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-data:query')")
|
||||
public CommonResult<PageResult<TemplateInstanceDataRespVO>> getTemplateInstanceDataPage(@Valid TemplateInstanceDataPageReqVO pageReqVO) {
|
||||
PageResult<TemplateInstanceDataDO> pageResult = templateInstanceDataService.getTemplateInstanceDataPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, TemplateInstanceDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出实例字段值 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-data:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportTemplateInstanceDataExcel(@Valid TemplateInstanceDataPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<TemplateInstanceDataDO> list = templateInstanceDataService.getTemplateInstanceDataPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "实例字段值.xls", "数据", TemplateInstanceDataRespVO.class,
|
||||
BeanUtils.toBean(list, TemplateInstanceDataRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package cn.iocoder.yudao.module.base.controller.admin.templtp;
|
||||
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceItemPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceItemRespVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceItemSaveReqVO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TemplateInstanceItemDO;
|
||||
import cn.iocoder.yudao.module.base.service.tmpltp.TemplateInstanceItemService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
|
||||
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.*;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 实例条款值")
|
||||
@RestController
|
||||
@RequestMapping("/base/template-instance-item")
|
||||
@Validated
|
||||
public class TemplateInstanceItemController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private TemplateInstanceItemService templateInstanceItemService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建实例条款值")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-item:create')")
|
||||
public CommonResult<TemplateInstanceItemRespVO> createTemplateInstanceItem(@Valid @RequestBody TemplateInstanceItemSaveReqVO createReqVO) {
|
||||
return success(templateInstanceItemService.createTemplateInstanceItem(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新实例条款值")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-item:update')")
|
||||
public CommonResult<Boolean> updateTemplateInstanceItem(@Valid @RequestBody TemplateInstanceItemSaveReqVO updateReqVO) {
|
||||
templateInstanceItemService.updateTemplateInstanceItem(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除实例条款值")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-item:delete')")
|
||||
public CommonResult<Boolean> deleteTemplateInstanceItem(@RequestParam("id") String id) {
|
||||
templateInstanceItemService.deleteTemplateInstanceItem(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除实例条款值")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-item:delete')")
|
||||
public CommonResult<Boolean> deleteTemplateInstanceItemList(@RequestBody BatchDeleteReqVO req) {
|
||||
List<String> ids = req.getIds().stream().map(String::valueOf).toList();
|
||||
templateInstanceItemService.deleteTemplateInstanceItemListByIds(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得实例条款值")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-item:query')")
|
||||
public CommonResult<TemplateInstanceItemRespVO> getTemplateInstanceItem(@RequestParam("id") String id) {
|
||||
TemplateInstanceItemDO templateInstanceItem = templateInstanceItemService.getTemplateInstanceItem(id);
|
||||
return success(BeanUtils.toBean(templateInstanceItem, TemplateInstanceItemRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得实例条款值分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-item:query')")
|
||||
public CommonResult<PageResult<TemplateInstanceItemRespVO>> getTemplateInstanceItemPage(@Valid TemplateInstanceItemPageReqVO pageReqVO) {
|
||||
PageResult<TemplateInstanceItemDO> pageResult = templateInstanceItemService.getTemplateInstanceItemPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, TemplateInstanceItemRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出实例条款值 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:template-instance-item:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportTemplateInstanceItemExcel(@Valid TemplateInstanceItemPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<TemplateInstanceItemDO> list = templateInstanceItemService.getTemplateInstanceItemPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "实例条款值.xls", "数据", TemplateInstanceItemRespVO.class,
|
||||
BeanUtils.toBean(list, TemplateInstanceItemRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,6 +26,8 @@ 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.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
@@ -33,6 +35,7 @@ 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 static cn.iocoder.yudao.module.tmpltp.enums.ErrorCodeConstants.PARAMS_IS_NULL_OR_ERR;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 模板分类")
|
||||
@@ -127,16 +130,16 @@ public class TmplTpController extends AbstractFileUploadController implements Bu
|
||||
|
||||
//更新类型状态
|
||||
@PutMapping("/updateStatus")
|
||||
@Operation(summary = "更新模板字段状态")
|
||||
@Operation(summary = "更新模板类型状态")
|
||||
@PreAuthorize("@ss.hasPermission('bse:tmpl-tp:update')")
|
||||
public CommonResult<Boolean> updateStatus(@RequestBody Map<String,Object> params) {
|
||||
if (params == null){
|
||||
throw new RuntimeException("参数不能为空");
|
||||
throw exception(PARAMS_IS_NULL_OR_ERR);
|
||||
}
|
||||
if (!params.containsKey("id") || !params.containsKey("status")){
|
||||
throw new RuntimeException("参数id或者状态不能为空");
|
||||
if (!params.containsKey("id") || !params.containsKey("sts")){
|
||||
throw exception(PARAMS_IS_NULL_OR_ERR);
|
||||
}
|
||||
tmplTpService.updateStatus(Long.valueOf(params.get("id").toString()), params.get("status").toString());
|
||||
tmplTpService.updateStatus(Long.valueOf(params.get("id").toString()), params.get("sts").toString());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 实例字段值分页 Request VO")
|
||||
@Data
|
||||
public class TemplateInstanceDataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "关联实例主键", example = "25824")
|
||||
private String instanceId;
|
||||
|
||||
@Schema(description = "字段标识;关联字段库")
|
||||
private String fieldKey;
|
||||
|
||||
@Schema(description = "用户填写的值")
|
||||
private String fieldValue;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 实例字段值 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class TemplateInstanceDataRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "10920")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联实例主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25824")
|
||||
@ExcelProperty("关联实例主键")
|
||||
private String instanceId;
|
||||
|
||||
@Schema(description = "字段标识;关联字段库", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("字段标识;关联字段库")
|
||||
private String fieldKey;
|
||||
|
||||
@Schema(description = "用户填写的值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("用户填写的值")
|
||||
private String fieldValue;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 实例字段值新增/修改 Request VO")
|
||||
@Data
|
||||
public class TemplateInstanceDataSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "10920")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "关联实例主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25824")
|
||||
@NotEmpty(message = "关联实例主键不能为空")
|
||||
private String instanceId;
|
||||
|
||||
@Schema(description = "字段标识;关联字段库", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "字段标识;关联字段库不能为空")
|
||||
private String fieldKey;
|
||||
|
||||
@Schema(description = "用户填写的值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "用户填写的值不能为空")
|
||||
private String fieldValue;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 实例条款值分页 Request VO")
|
||||
@Data
|
||||
public class TemplateInstanceItemPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "关联实例主键", example = "28964")
|
||||
private String inscId;
|
||||
|
||||
@Schema(description = "条款库主键;关联字段库", example = "11278")
|
||||
private String itmId;
|
||||
|
||||
@Schema(description = "用户填写的值")
|
||||
private String val;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDate[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 实例条款值 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class TemplateInstanceItemRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25152")
|
||||
@ExcelProperty("主键")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "关联实例主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "28964")
|
||||
@ExcelProperty("关联实例主键")
|
||||
private String inscId;
|
||||
|
||||
@Schema(description = "条款库主键;关联字段库", requiredMode = Schema.RequiredMode.REQUIRED, example = "11278")
|
||||
@ExcelProperty("条款库主键;关联字段库")
|
||||
private String itmId;
|
||||
|
||||
@Schema(description = "用户填写的值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("用户填写的值")
|
||||
private String val;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDate createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 实例条款值新增/修改 Request VO")
|
||||
@Data
|
||||
public class TemplateInstanceItemSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25152")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "关联实例主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "28964")
|
||||
@NotEmpty(message = "关联实例主键不能为空")
|
||||
private String inscId;
|
||||
|
||||
@Schema(description = "条款库主键;关联字段库", requiredMode = Schema.RequiredMode.REQUIRED, example = "11278")
|
||||
@NotEmpty(message = "条款库主键;关联字段库不能为空")
|
||||
private String itmId;
|
||||
|
||||
@Schema(description = "用户填写的值", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "用户填写的值不能为空")
|
||||
private String val;
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class TmplItmSaveReqVO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
|
||||
private long id;
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "条款编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
|
||||
private String itmNum;
|
||||
|
||||
@@ -28,11 +28,10 @@ public class TmplTpSaveReqVO {
|
||||
private Long srt;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "状态不能为空")
|
||||
private String sts;
|
||||
@NotEmpty(message = "条款能为空")
|
||||
|
||||
private List<String> tmplItmIds ;
|
||||
@NotEmpty(message = "字段不能为空")
|
||||
private List<TmplTpFldSaveReqVO> tmplTpFldIds;
|
||||
|
||||
private List<String> tmplTpFldIds;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package cn.iocoder.yudao.module.base.dal.dataobject.tmpltp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 实例字段值 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("bse_tmpl_insc_dat")
|
||||
@KeySequence("bse_tmpl_insc_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class TemplateInstanceDataDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 关联实例主键
|
||||
*/
|
||||
@TableField("INSC_ID")
|
||||
private String instanceId;
|
||||
/**
|
||||
* 字段标识;关联字段库
|
||||
*/
|
||||
@TableField("FLD_KY")
|
||||
private String fieldKey;
|
||||
/**
|
||||
* 用户填写的值
|
||||
*/
|
||||
@TableField("FLD_VAL")
|
||||
private String fieldValue;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.iocoder.yudao.module.base.dal.dataobject.tmpltp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 实例条款值 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("bse_tmpl_insc_itm")
|
||||
@KeySequence("bse_tmpl_insc_itm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class TemplateInstanceItemDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
private String id;
|
||||
/**
|
||||
* 关联实例主键
|
||||
*/
|
||||
@TableField("INSC_ID")
|
||||
private String inscId;
|
||||
/**
|
||||
* 条款库主键;关联字段库
|
||||
*/
|
||||
@TableField("ITM_ID")
|
||||
private String itmId;
|
||||
/**
|
||||
* 用户填写的值
|
||||
*/
|
||||
@TableField("VAL")
|
||||
private String val;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.base.dal.mysql.tmpltp;
|
||||
|
||||
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.base.controller.admin.templtp.vo.TemplateInstanceDataPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TemplateInstanceDataDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 实例字段值 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface TemplateInstanceDataMapper extends BaseMapperX<TemplateInstanceDataDO> {
|
||||
|
||||
default PageResult<TemplateInstanceDataDO> selectPage(TemplateInstanceDataPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<TemplateInstanceDataDO>()
|
||||
.eqIfPresent(TemplateInstanceDataDO::getInstanceId, reqVO.getInstanceId())
|
||||
.eqIfPresent(TemplateInstanceDataDO::getFieldKey, reqVO.getFieldKey())
|
||||
.eqIfPresent(TemplateInstanceDataDO::getFieldValue, reqVO.getFieldValue())
|
||||
.betweenIfPresent(TemplateInstanceDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(TemplateInstanceDataDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.base.dal.mysql.tmpltp;
|
||||
|
||||
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.base.controller.admin.templtp.vo.TemplateInstanceItemPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TemplateInstanceItemDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
/**
|
||||
* 实例条款值 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface TemplateInstanceItemMapper extends BaseMapperX<TemplateInstanceItemDO> {
|
||||
|
||||
default PageResult<TemplateInstanceItemDO> selectPage(TemplateInstanceItemPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<TemplateInstanceItemDO>()
|
||||
.eqIfPresent(TemplateInstanceItemDO::getInscId, reqVO.getInscId())
|
||||
.eqIfPresent(TemplateInstanceItemDO::getItmId, reqVO.getItmId())
|
||||
.eqIfPresent(TemplateInstanceItemDO::getVal, reqVO.getVal())
|
||||
.betweenIfPresent(TemplateInstanceItemDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(TemplateInstanceItemDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,8 +5,11 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplFldRespVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplItmRespVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplTpPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TmplTpDO;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
@@ -34,26 +37,11 @@ public interface TmplTpMapper extends BaseMapperX<TmplTpDO> {
|
||||
.orderByDesc(TmplTpDO::getId));
|
||||
}
|
||||
|
||||
@Select("select bt.*\n" +
|
||||
"from bse_tmpl_tp btt\n" +
|
||||
" inner join bse_tmpl_fld_rel btfr on btt.id = btfr.tmpl_tp_id\n" +
|
||||
" inner join biz_tmpl_tp_fld bt on bt.id = btfr.tp_fld_id\n" +
|
||||
"where btt.deleted = 0\n" +
|
||||
" and btfr.deleted = 0\n" +
|
||||
" and bt.deleted = 0\n" +
|
||||
"and btt.id = #{id}")
|
||||
List<Map<String, Object>> getField(@Param("id") Long id);
|
||||
@MapKey("id")
|
||||
List<TmplFldRespVO> getField(@Param("id") Long id);
|
||||
|
||||
@Select("select bti.*\n" +
|
||||
"from bse_tmpl_tp btt\n" +
|
||||
" inner join BSE_TMPL_ITM_REL btir on btt.id = btir.itm_fld_id\n" +
|
||||
" inner join BSE_TMPL_ITM bti on btir.itm_fld_id = bti.id\n" +
|
||||
"where btt.deleted = 0\n" +
|
||||
" and btfr.deleted = 0\n" +
|
||||
" and bti.deleted = 0\n" +
|
||||
"and btt.id = #{id}")
|
||||
List<Map<String, Object>>getClause(@Param("id") Long id);
|
||||
@MapKey("id")
|
||||
List<TmplItmRespVO> getClause(@Param("id") Long id);
|
||||
|
||||
@Select("select * from bse_tmpl_tp where id= #{id}")
|
||||
TmplTpDO getTmplTpById(@Param("id") Long id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package cn.iocoder.yudao.module.base.service.tmpltp;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceDataPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceDataRespVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceDataSaveReqVO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TemplateInstanceDataDO;
|
||||
import jakarta.validation.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 实例字段值 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface TemplateInstanceDataService {
|
||||
|
||||
/**
|
||||
* 创建实例字段值
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
TemplateInstanceDataRespVO createTemplateInstanceData(@Valid TemplateInstanceDataSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新实例字段值
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateTemplateInstanceData(@Valid TemplateInstanceDataSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除实例字段值
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteTemplateInstanceData(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除实例字段值
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteTemplateInstanceDataListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得实例字段值
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 实例字段值
|
||||
*/
|
||||
TemplateInstanceDataDO getTemplateInstanceData(Long id);
|
||||
|
||||
/**
|
||||
* 获得实例字段值分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 实例字段值分页
|
||||
*/
|
||||
PageResult<TemplateInstanceDataDO> getTemplateInstanceDataPage(TemplateInstanceDataPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package cn.iocoder.yudao.module.base.service.tmpltp;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceDataPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceDataRespVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceDataSaveReqVO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TemplateInstanceDataDO;
|
||||
import cn.iocoder.yudao.module.base.dal.mysql.tmpltp.TemplateInstanceDataMapper;
|
||||
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.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
|
||||
|
||||
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.base.enums.ErrorCodeConstants.*;
|
||||
import static cn.iocoder.yudao.module.tmpltp.enums.ErrorCodeConstants.TEMPLATE_INSTANCE_DATA_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 实例字段值 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class TemplateInstanceDataServiceImpl implements TemplateInstanceDataService {
|
||||
|
||||
@Resource
|
||||
private TemplateInstanceDataMapper templateInstanceDataMapper;
|
||||
|
||||
@Override
|
||||
public TemplateInstanceDataRespVO createTemplateInstanceData(TemplateInstanceDataSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
TemplateInstanceDataDO templateInstanceData = BeanUtils.toBean(createReqVO, TemplateInstanceDataDO.class);
|
||||
templateInstanceDataMapper.insert(templateInstanceData);
|
||||
// 返回
|
||||
return BeanUtils.toBean(templateInstanceData, TemplateInstanceDataRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTemplateInstanceData(TemplateInstanceDataSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateTemplateInstanceDataExists(updateReqVO.getId());
|
||||
// 更新
|
||||
TemplateInstanceDataDO updateObj = BeanUtils.toBean(updateReqVO, TemplateInstanceDataDO.class);
|
||||
templateInstanceDataMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteTemplateInstanceData(Long id) {
|
||||
// 校验存在
|
||||
validateTemplateInstanceDataExists(id);
|
||||
// 删除
|
||||
templateInstanceDataMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteTemplateInstanceDataListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateTemplateInstanceDataExists(ids);
|
||||
// 删除
|
||||
templateInstanceDataMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateTemplateInstanceDataExists(List<Long> ids) {
|
||||
List<TemplateInstanceDataDO> list = templateInstanceDataMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(TEMPLATE_INSTANCE_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateTemplateInstanceDataExists(Long id) {
|
||||
if (templateInstanceDataMapper.selectById(id) == null) {
|
||||
throw exception(TEMPLATE_INSTANCE_DATA_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateInstanceDataDO getTemplateInstanceData(Long id) {
|
||||
return templateInstanceDataMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<TemplateInstanceDataDO> getTemplateInstanceDataPage(TemplateInstanceDataPageReqVO pageReqVO) {
|
||||
return templateInstanceDataMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package cn.iocoder.yudao.module.base.service.tmpltp;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceItemPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceItemRespVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceItemSaveReqVO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TemplateInstanceItemDO;
|
||||
import jakarta.validation.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 实例条款值 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface TemplateInstanceItemService {
|
||||
|
||||
/**
|
||||
* 创建实例条款值
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
TemplateInstanceItemRespVO createTemplateInstanceItem(@Valid TemplateInstanceItemSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新实例条款值
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateTemplateInstanceItem(@Valid TemplateInstanceItemSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除实例条款值
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteTemplateInstanceItem(String id);
|
||||
|
||||
/**
|
||||
* 批量删除实例条款值
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteTemplateInstanceItemListByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 获得实例条款值
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 实例条款值
|
||||
*/
|
||||
TemplateInstanceItemDO getTemplateInstanceItem(String id);
|
||||
|
||||
/**
|
||||
* 获得实例条款值分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 实例条款值分页
|
||||
*/
|
||||
PageResult<TemplateInstanceItemDO> getTemplateInstanceItemPage(TemplateInstanceItemPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package cn.iocoder.yudao.module.base.service.tmpltp;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceItemPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceItemRespVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TemplateInstanceItemSaveReqVO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TemplateInstanceItemDO;
|
||||
import cn.iocoder.yudao.module.base.dal.mysql.tmpltp.TemplateInstanceItemMapper;
|
||||
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.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
|
||||
|
||||
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.base.enums.ErrorCodeConstants.*;
|
||||
import static cn.iocoder.yudao.module.tmpltp.enums.ErrorCodeConstants.TEMPLATE_INSTANCE_ITEM_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 实例条款值 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class TemplateInstanceItemServiceImpl implements TemplateInstanceItemService {
|
||||
|
||||
@Resource
|
||||
private TemplateInstanceItemMapper templateInstanceItemMapper;
|
||||
|
||||
@Override
|
||||
public TemplateInstanceItemRespVO createTemplateInstanceItem(TemplateInstanceItemSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
TemplateInstanceItemDO templateInstanceItem = BeanUtils.toBean(createReqVO, TemplateInstanceItemDO.class);
|
||||
templateInstanceItemMapper.insert(templateInstanceItem);
|
||||
// 返回
|
||||
return BeanUtils.toBean(templateInstanceItem, TemplateInstanceItemRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTemplateInstanceItem(TemplateInstanceItemSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateTemplateInstanceItemExists(updateReqVO.getId());
|
||||
// 更新
|
||||
TemplateInstanceItemDO updateObj = BeanUtils.toBean(updateReqVO, TemplateInstanceItemDO.class);
|
||||
templateInstanceItemMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteTemplateInstanceItem(String id) {
|
||||
// 校验存在
|
||||
validateTemplateInstanceItemExists(id);
|
||||
// 删除
|
||||
templateInstanceItemMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteTemplateInstanceItemListByIds(List<String> ids) {
|
||||
// 校验存在
|
||||
validateTemplateInstanceItemExists(ids);
|
||||
// 删除
|
||||
templateInstanceItemMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateTemplateInstanceItemExists(List<String> ids) {
|
||||
List<TemplateInstanceItemDO> list = templateInstanceItemMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(TEMPLATE_INSTANCE_ITEM_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateTemplateInstanceItemExists(String id) {
|
||||
if (templateInstanceItemMapper.selectById(id) == null) {
|
||||
throw exception(TEMPLATE_INSTANCE_ITEM_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateInstanceItemDO getTemplateInstanceItem(String id) {
|
||||
return templateInstanceItemMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<TemplateInstanceItemDO> getTemplateInstanceItemPage(TemplateInstanceItemPageReqVO pageReqVO) {
|
||||
return templateInstanceItemMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,8 +23,9 @@ import static cn.iocoder.yudao.module.tmpltp.enums.ErrorCodeConstants.TMPL_ITM_N
|
||||
public class TmplItmServiceImpl extends ServiceImpl<TmplItmMapper, TmplItmDO> implements TmplItmService{
|
||||
@Override
|
||||
public TmplItmRespVO createTmplItm(TmplItmSaveReqVO tmplItmSaveReqVO) {
|
||||
tmplItmSaveReqVO.setId(null);
|
||||
TmplItmDO bean = BeanUtils.toBean(tmplItmSaveReqVO, TmplItmDO.class);
|
||||
this.save(bean);
|
||||
baseMapper.insert(bean);
|
||||
return BeanUtils.toBean(bean, TmplItmRespVO.class);
|
||||
}
|
||||
|
||||
@@ -46,7 +47,7 @@ public class TmplItmServiceImpl extends ServiceImpl<TmplItmMapper, TmplItmDO> im
|
||||
}
|
||||
|
||||
private void validateTmplLtmExists(Long id) {
|
||||
if (this.getById(id) == null) {
|
||||
if (baseMapper.selectById(id) == null) {
|
||||
throw exception(TMPL_ITM_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class TmplTpFldServiceImpl extends ServiceImpl<TmplTpFldMapper, TmplTpFld
|
||||
}
|
||||
|
||||
private void validateTmplFldExists(Long id) {
|
||||
if (this.getById(id) == null) {
|
||||
if (baseMapper.selectById(id) == null) {
|
||||
throw exception(TMPL_FLD_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,7 @@ package cn.iocoder.yudao.module.base.service.tmpltp;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplTpPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplTpRespVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplTpSaveReqVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplTpTreeVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.*;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TmplTpDO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import jakarta.validation.*;
|
||||
@@ -66,8 +63,8 @@ public interface TmplTpService extends IService<TmplTpDO> {
|
||||
PageResult<TmplTpDO> getTmplTpPage(TmplTpPageReqVO pageReqVO);
|
||||
|
||||
|
||||
List<Map<String, Object>> getField(Long id);
|
||||
List<Map<String, Object>> getClause(Long id);
|
||||
List<TmplFldRespVO> getField(Long id);
|
||||
List<TmplItmRespVO> getClause(Long id);
|
||||
List<TmplTpTreeVO> buildTree();
|
||||
void updateStatus(Long id, String status);
|
||||
}
|
||||
|
||||
@@ -2,11 +2,8 @@ package cn.iocoder.yudao.module.base.service.tmpltp;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplTpPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplTpRespVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplTpSaveReqVO;
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.*;
|
||||
|
||||
import cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplTpTreeVO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TmplFldRelDO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TmplItmRelDO;
|
||||
import cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TmplTpDO;
|
||||
@@ -50,8 +47,11 @@ public class TmplTpServiceImpl extends ServiceImpl<TmplTpMapper, TmplTpDO> imple
|
||||
@Override
|
||||
@Transactional
|
||||
public TmplTpRespVO createTmplTp(TmplTpSaveReqVO createReqVO) {
|
||||
//置空id
|
||||
createReqVO.setId(null);
|
||||
// 插入
|
||||
TmplTpDO tmplTp = BeanUtils.toBean(createReqVO, TmplTpDO.class);
|
||||
tmplTp.setSts("Y");
|
||||
baseMapper.insert(tmplTp);
|
||||
// 返回
|
||||
List<TmplFldRelDO> tmplFldRelDOS = new ArrayList<>();
|
||||
@@ -62,7 +62,7 @@ public class TmplTpServiceImpl extends ServiceImpl<TmplTpMapper, TmplTpDO> imple
|
||||
tmplFldRelDO.setTpFldId(String.valueOf(tmplItmId));
|
||||
tmplFldRelDOS.add(tmplFldRelDO);
|
||||
});
|
||||
createReqVO.getTmplTpFldIds().forEach(tmplFldId -> {
|
||||
createReqVO.getTmplItmIds().forEach(tmplFldId -> {
|
||||
TmplItmRelDO tmplItmRelDO = new TmplItmRelDO();
|
||||
tmplItmRelDO.setTmplTpId(String.valueOf(tmplTp.getId()));
|
||||
tmplItmRelDO.setItmFldId(String.valueOf(tmplFldId));
|
||||
@@ -88,9 +88,9 @@ public class TmplTpServiceImpl extends ServiceImpl<TmplTpMapper, TmplTpDO> imple
|
||||
// 校验存在
|
||||
validateTmplTpExists(ids);
|
||||
//校验能否进行删除
|
||||
if (!validateStatusCanDelete(ids)){
|
||||
throw exception(TMPL_TP_DEl_ERROR);
|
||||
}
|
||||
// if (!validateStatusCanDelete(ids)){
|
||||
// throw exception(TMPL_TP_DEl_ERROR);
|
||||
// }
|
||||
// 删除
|
||||
baseMapper.deleteByIds(ids);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public class TmplTpServiceImpl extends ServiceImpl<TmplTpMapper, TmplTpDO> imple
|
||||
}
|
||||
|
||||
private void validateTmplTpExists(Long id) {
|
||||
if (this.getById(id) == null) {
|
||||
if (baseMapper.selectById(id) == null) {
|
||||
throw exception(TMPL_TP_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
@@ -127,12 +127,12 @@ public class TmplTpServiceImpl extends ServiceImpl<TmplTpMapper, TmplTpDO> imple
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getField(Long id) {
|
||||
public List<TmplFldRespVO> getField(Long id) {
|
||||
return baseMapper.getField(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getClause(Long id) {
|
||||
public List<TmplItmRespVO> getClause(Long id) {
|
||||
return baseMapper.getClause(id);
|
||||
}
|
||||
|
||||
@@ -183,9 +183,9 @@ public class TmplTpServiceImpl extends ServiceImpl<TmplTpMapper, TmplTpDO> imple
|
||||
@Override
|
||||
public void updateStatus(Long id, String status) {
|
||||
//验证当前的能否变更为之后的状态
|
||||
if (!validateStatusUpdate(id, status)) {
|
||||
throw exception(TMPL_TP_SATUS_ERROR);
|
||||
}
|
||||
// if (!validateStatusUpdate(id, status)) {
|
||||
// throw exception(TMPL_TP_SATUS_ERROR);
|
||||
// }
|
||||
baseMapper.update(Wrappers.<TmplTpDO>lambdaUpdate().set(TmplTpDO::getSts, status).eq(TmplTpDO::getId, id));
|
||||
}
|
||||
|
||||
@@ -207,13 +207,13 @@ public class TmplTpServiceImpl extends ServiceImpl<TmplTpMapper, TmplTpDO> imple
|
||||
|
||||
private boolean validateStatusCanDelete(List<Long> ids) {
|
||||
Set<String> sts = listByIds(ids).stream().map(TmplTpDO::getSts).collect(Collectors.toSet());
|
||||
List<Boolean> result=new ArrayList<>();
|
||||
List<Boolean> result = new ArrayList<>();
|
||||
sts.forEach(status -> {
|
||||
StatusEnum currentStatus = StatusEnum.fromCode(status);
|
||||
boolean transitionAllowed = false;
|
||||
if (currentStatus != null) {
|
||||
transitionAllowed = currentStatus.isTransitionAllowed(status);
|
||||
}else {
|
||||
} else {
|
||||
result.add(false);
|
||||
}
|
||||
result.add(transitionAllowed);
|
||||
|
||||
@@ -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.base.dal.mysql.tmpltp.TemplateInstanceDataMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 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.base.dal.mysql.tmpltp.TemplateInstanceItemMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@@ -9,4 +9,34 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="getClause" resultType="cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplItmRespVO">
|
||||
SELECT itm.*
|
||||
FROM BSE_TMPL_ITM itm
|
||||
INNER JOIN BSE_TMPL_ITM_REL rel ON itm.ID = rel.ITM_FLD_ID
|
||||
AND itm.tenant_id = 1
|
||||
AND rel.tenant_id = 1
|
||||
INNER JOIN BSE_TMPL_TP tp ON rel.TMPL_TP_ID = tp.ID
|
||||
AND tp.tenant_id = 1
|
||||
WHERE itm.DELETED = 0
|
||||
AND tp.id = #{id}
|
||||
|
||||
</select>
|
||||
<select id="getField" resultType="cn.iocoder.yudao.module.base.controller.admin.templtp.vo.TmplFldRespVO">
|
||||
|
||||
SELECT f.*
|
||||
FROM BIZ_TMPL_TP_FLD f
|
||||
INNER JOIN BSE_TMPL_FLD_REL r ON f.ID = r.TP_FLD_ID
|
||||
INNER JOIN BSE_TMPL_TP t ON r.TMPL_TP_ID = t.ID
|
||||
WHERE f.DELETED = '0'
|
||||
AND r.DELETED = '0'
|
||||
AND t.DELETED = '0'
|
||||
AND t.id = #{id}
|
||||
ORDER BY t.SRT, f.FLD_KY
|
||||
</select>
|
||||
|
||||
<select id="getTmplTpById" resultType="cn.iocoder.yudao.module.base.dal.dataobject.tmpltp.TmplTpDO">
|
||||
select *
|
||||
from bse_tmpl_tp
|
||||
where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -8,4 +8,15 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode ERP_CUSTOMER_NOT_EXISTS = new ErrorCode(1_001_000_001, "ERP客商主数据不存在");
|
||||
ErrorCode ERP_MATERIAL_NOT_EXISTS = new ErrorCode(1_001_000_002, "ERP物料数据不存在");
|
||||
ErrorCode ERP_COMPANY_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
ErrorCode ERP_BOM_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
ErrorCode ERP_BOM_DETAIL_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
ErrorCode ERP_PROCESS_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
ErrorCode ERP_PROCESS_DETAIL_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
ErrorCode ERP_FACTORY_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
ErrorCode ERP_COSTCENTER_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
ErrorCode ERP_PRODUCTIVE_VERSION_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
ErrorCode ERP_PURCHASE_ORGANIZATION_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
ErrorCode ERP_INTERNAL_ORDER_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
ErrorCode ERP_SALES_ORGANIZATION_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
ErrorCode ERP_WAREHOUSE_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package cn.iocoder.yudao.module.erp;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* ContractOrder 模块的启动类
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
package cn.iocoder.yudao.module.erp.common.conf;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static dm.jdbc.util.DriverUtil.log;
|
||||
|
||||
@Configuration
|
||||
public class ErpConfig {
|
||||
|
||||
@Value("${erp.address}")
|
||||
private String erpAddress;
|
||||
|
||||
@Value("${erp.sapsys}")
|
||||
private String sapsys;
|
||||
|
||||
@Resource
|
||||
private RedisTemplate redisTemplate;
|
||||
|
||||
|
||||
/**
|
||||
* 调用ERP接口获取公司数据
|
||||
*/
|
||||
public JSONArray fetchDataFromERP(String funcnr, Map<String, Object> req) {
|
||||
// 构建完整URL
|
||||
String url = "http://" + erpAddress + "/api/rfc/get";
|
||||
// 构建请求参数
|
||||
JSONObject requestBody = new JSONObject();
|
||||
requestBody.put("sapsys", sapsys);
|
||||
requestBody.put("funcnr", funcnr); // 获取枚举值
|
||||
if (req != null) {
|
||||
requestBody.put("req", req);
|
||||
}
|
||||
|
||||
// 设置请求头
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||
|
||||
// 创建HTTP请求实体
|
||||
HttpEntity<String> requestEntity = new HttpEntity<>(requestBody.toJSONString(), headers);
|
||||
|
||||
// 发送POST请求
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
ResponseEntity<String> response = restTemplate.postForEntity(url, requestEntity, String.class);
|
||||
|
||||
// 解析响应结果
|
||||
String responseBody = response.getBody();
|
||||
if (responseBody == null) {
|
||||
log.warn("ERP接口返回空响应");
|
||||
return null;
|
||||
}
|
||||
|
||||
JSONObject jsonResponse = JSON.parseObject(responseBody);
|
||||
if (jsonResponse == null) {
|
||||
log.warn("ERP接口响应无法解析为JSON");
|
||||
return null;
|
||||
}
|
||||
|
||||
// 正确获取E_DATA数组
|
||||
JSONObject dataObject = jsonResponse.getJSONObject("data");
|
||||
if (dataObject != null && "S".equals(dataObject.getString("E_FLAG"))) {
|
||||
return dataObject.getJSONArray("E_DATA");
|
||||
} else {
|
||||
log.warn("ERP接口调用失败或返回错误标志");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Map<String, List<String>> numbers(JSONArray dataArray, String key,String dataKey) {
|
||||
// 使用 Redis 获取缓存数据
|
||||
Map<String, List<String>> numbers = new HashMap<>();
|
||||
List<String> cachedNumbers = (List<String>) redisTemplate.opsForValue().get(key);
|
||||
if (cachedNumbers == null) {
|
||||
cachedNumbers = new ArrayList<>();
|
||||
}
|
||||
|
||||
// 提取有效的 BUKRS 编号
|
||||
List<String> existingNumbers = new ArrayList<>();
|
||||
if (dataArray != null) {
|
||||
existingNumbers = dataArray.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.map(dataJson -> ((JSONObject) dataJson).getString(dataKey))
|
||||
.filter(Objects::nonNull)
|
||||
.map(String::trim) // 去除字符串首尾空格
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
// 找出共同存在的编号
|
||||
Set<String> cachedNumberSet = new HashSet<>(cachedNumbers != null ? cachedNumbers : new ArrayList<>());
|
||||
List<String> commonNumbers = existingNumbers.stream()
|
||||
.filter(cachedNumberSet::contains)
|
||||
.collect(Collectors.toList());
|
||||
numbers.put("com", commonNumbers);
|
||||
|
||||
List<String> newNumbers = existingNumbers.stream()
|
||||
.filter(num -> !cachedNumberSet.contains(num))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 合并所有编号
|
||||
List<String> allNumbers = new ArrayList<>(cachedNumbers);
|
||||
allNumbers.addAll(newNumbers);
|
||||
numbers.put("all", allNumbers);
|
||||
return numbers;
|
||||
}
|
||||
|
||||
public void updateRedisCache(String key, List<String> allnumbers) {
|
||||
// 使用 Redis 更新缓存数据
|
||||
redisTemplate.opsForValue().set(key, allnumbers);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package cn.iocoder.yudao.module.erp.common.conf;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
|
||||
import org.springframework.data.redis.serializer.RedisSerializer;
|
||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||
//import redis.clients.jedis.JedisPoolConfig;
|
||||
|
||||
|
||||
/**
|
||||
* @author wuxz
|
||||
* @create 2022-06-07 20:54
|
||||
*/
|
||||
@Primary
|
||||
@Configuration
|
||||
public class MyRedisConfig {
|
||||
|
||||
/*
|
||||
@Value("${spring.redis.database}")
|
||||
private Integer database;
|
||||
|
||||
@Value("${spring.redis.host}")
|
||||
private String host;
|
||||
|
||||
@Value("${spring.redis.port}")
|
||||
private Integer port;
|
||||
|
||||
@Value("${spring.redis.password}")
|
||||
private String password;
|
||||
|
||||
@Value("${spring.redis.jedis.pool.max-idle}")
|
||||
private Integer max_idle;
|
||||
|
||||
@Value("${spring.redis.jedis.pool.min-idle}")
|
||||
private Integer min_idle;
|
||||
|
||||
@Value("${spring.redis.jedis.pool.max-active}")
|
||||
private Integer max_active;
|
||||
|
||||
@Value("${spring.redis.jedis.pool.max-wait}")
|
||||
private Integer max_wait;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Bean(value = "MyRedisTemplate")
|
||||
public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
|
||||
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
|
||||
redisTemplate.setConnectionFactory(redisConnectionFactory);
|
||||
|
||||
// 通过 Jackson 组件进行序列化
|
||||
RedisSerializer<Object> serializer = redisSerializer();
|
||||
|
||||
// key 和 value
|
||||
// 一般来说, redis-key采用字符串序列化;
|
||||
// redis-value采用json序列化, json的体积小,可读性高,不需要实现serializer接口。
|
||||
redisTemplate.setKeySerializer(new StringRedisSerializer());
|
||||
redisTemplate.setValueSerializer(serializer);
|
||||
|
||||
redisTemplate.setHashKeySerializer(new StringRedisSerializer());
|
||||
redisTemplate.setHashValueSerializer(serializer);
|
||||
|
||||
redisTemplate.afterPropertiesSet();
|
||||
return redisTemplate;
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public RedisSerializer<Object> redisSerializer() {
|
||||
//创建JSON序列化器
|
||||
Jackson2JsonRedisSerializer<Object> serializer = new Jackson2JsonRedisSerializer<>(Object.class);
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
|
||||
// objectMapper.enableDefaultTyping()被弃用
|
||||
objectMapper.activateDefaultTyping(
|
||||
LaissezFaireSubTypeValidator.instance,
|
||||
ObjectMapper.DefaultTyping.NON_FINAL,
|
||||
JsonTypeInfo.As.WRAPPER_ARRAY);
|
||||
serializer.setObjectMapper(objectMapper);
|
||||
return serializer;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// @Bean
|
||||
// public JedisPoolConfig jedisPoolConfig() {
|
||||
// JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
|
||||
// //最小空闲连接数
|
||||
// jedisPoolConfig.setMinIdle(min_idle);
|
||||
// jedisPoolConfig.setMaxIdle(max_idle);
|
||||
// jedisPoolConfig.setMaxTotal(max_active);
|
||||
// //当池内没有可用的连接时,最大等待时间
|
||||
// jedisPoolConfig.setMaxWaitMillis(max_wait);
|
||||
// //------其他属性根据需要自行添加-------------
|
||||
// return jedisPoolConfig;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * jedis连接工厂
|
||||
// * @param jedisPoolConfig
|
||||
// * @return
|
||||
// */
|
||||
// @Bean
|
||||
// public RedisConnectionFactory redisConnectionFactory(JedisPoolConfig jedisPoolConfig) {
|
||||
// //单机版jedis
|
||||
// RedisStandaloneConfiguration redisStandaloneConfiguration =
|
||||
// new RedisStandaloneConfiguration();
|
||||
// //设置redis服务器的host或者ip地址
|
||||
// redisStandaloneConfiguration.setHostName(host);
|
||||
// //设置默认使用的数据库
|
||||
// redisStandaloneConfiguration.setDatabase(database);
|
||||
// //设置密码
|
||||
// redisStandaloneConfiguration.setPassword(password);
|
||||
// //设置redis的服务的端口号
|
||||
// redisStandaloneConfiguration.setPort(port);
|
||||
// //获得默认的连接池构造器
|
||||
// JedisClientConfiguration.JedisPoolingClientConfigurationBuilder jc =
|
||||
// (JedisClientConfiguration.JedisPoolingClientConfigurationBuilder)JedisClientConfiguration.builder();
|
||||
// //指定jedisPoolConifig
|
||||
// jc.poolConfig(jedisPoolConfig);
|
||||
// //通过构造器来构造jedis客户端配置
|
||||
// JedisClientConfiguration jedisClientConfiguration = jc.build();
|
||||
// return new JedisConnectionFactory(redisStandaloneConfiguration, jedisClientConfiguration);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @Bean
|
||||
// @ConditionalOnMissingBean(name = {"redisTemplate"})
|
||||
// public RedisTemplate<String, Serializable> redisTemplate(JedisConnectionFactory jedisConnectionFactory){
|
||||
// RedisTemplate<String, Serializable> redisTemplate = new RedisTemplate<>();
|
||||
// redisTemplate.setKeySerializer(new StringRedisSerializer());
|
||||
// redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer());
|
||||
// redisTemplate.setConnectionFactory(jedisConnectionFactory);
|
||||
// return redisTemplate;
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 序列化乱码问题解决
|
||||
*/
|
||||
// @Bean
|
||||
// public RedisTemplate<String, Serializable> redisTemplate(JedisConnectionFactory jedisConnectionFactory){
|
||||
// RedisTemplate<String, Serializable> redisTemplate = new RedisTemplate<>();
|
||||
// redisTemplate.setKeySerializer(new StringRedisSerializer());
|
||||
// redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer());
|
||||
// redisTemplate.setConnectionFactory(jedisConnectionFactory);
|
||||
// return redisTemplate;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@@ -13,32 +13,60 @@ public class OftenEnum {
|
||||
|
||||
//接口编号枚举
|
||||
public enum FuncnrEnum {
|
||||
公司代码("001"),
|
||||
工厂信息("002"),
|
||||
客商信息("003"),
|
||||
成本中心("004"),
|
||||
内部订单("005"),
|
||||
库位信息("006"),
|
||||
采购组织("007"),
|
||||
销售组织("008"),
|
||||
合同信息("009"),
|
||||
资产卡片("010"),
|
||||
库存信息("011"),
|
||||
辅组编码("012"),
|
||||
生产订单("013"),
|
||||
BOM清单("014"),
|
||||
工艺路线("015"),
|
||||
生产版本("016"),
|
||||
生产投料("017"),
|
||||
生产订单明细("018"),
|
||||
库存明细("019"),
|
||||
发票状态("020"),
|
||||
物料数据("021");
|
||||
公司代码("001", "BUKRS", ""),
|
||||
工厂信息("002", "", ""),
|
||||
客商信息("003", "PARTNER", "DATUM"),
|
||||
成本中心("004", "", ""),
|
||||
内部订单("005", "", ""),
|
||||
库位信息("006", "", ""),
|
||||
采购组织("007", "", ""),
|
||||
销售组织("008", "", ""),
|
||||
合同信息("009", "", ""),
|
||||
资产卡片("010", "", ""),
|
||||
库存信息("011", "", ""),
|
||||
辅组编码("012", "", ""),
|
||||
生产订单("013", "", ""),
|
||||
BOM清单("014", "", ""),
|
||||
工艺路线("015", "", ""),
|
||||
生产版本("016", "", ""),
|
||||
生产投料("017", "", ""),
|
||||
生产订单明细("018", "", ""),
|
||||
库存明细("019", "", ""),
|
||||
发票状态("020", "", ""),
|
||||
物料数据("021", "", "ERSDA");
|
||||
|
||||
public String funcnr = null;
|
||||
private final String funcnr;
|
||||
private final String datakey;
|
||||
private final String datekey;
|
||||
|
||||
FuncnrEnum(String funcnr) {
|
||||
FuncnrEnum(String funcnr, String datakey,String datekey) {
|
||||
this.funcnr = funcnr;
|
||||
this.datakey = datakey;
|
||||
this.datekey = datekey;
|
||||
}
|
||||
|
||||
public String getFuncnr() {
|
||||
return funcnr;
|
||||
}
|
||||
|
||||
public String getDatakey() {
|
||||
return datakey;
|
||||
}
|
||||
|
||||
public String getDatekey() {
|
||||
return datekey;
|
||||
}
|
||||
}
|
||||
|
||||
//接口编号枚举
|
||||
public enum ModeTypeEnum {
|
||||
供应商("K"),
|
||||
客户("D");
|
||||
|
||||
public String modetype = null;
|
||||
|
||||
ModeTypeEnum(String modetype) {
|
||||
this.modetype = modetype;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
**/
|
||||
@Configuration
|
||||
@EnableScheduling
|
||||
public class statisticsTask {
|
||||
public class statisticstask {
|
||||
|
||||
@Resource
|
||||
private ErpCompanyService erpCompanyService;
|
||||
@@ -0,0 +1,104 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpBomPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpBomRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpBomSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpBomDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpBomService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@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,104 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpBomDetailPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpBomDetailRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpBomDetailSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpBomDetailDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpBomDetailService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@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));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +1,36 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpCompanyPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpCompanyRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpCompanySaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpCompanyDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpCompanyService;
|
||||
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 io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
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.*;
|
||||
|
||||
@Tag(name = "管理后台 - ERP公司")
|
||||
@RestController
|
||||
@RequestMapping("/admin/erp/company")
|
||||
@RequestMapping("/sply/erp-company")
|
||||
@Validated
|
||||
public class ErpCompanyController {
|
||||
|
||||
@@ -104,10 +101,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();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpCostcenterPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpCostcenterRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpCostcenterSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpCostcenterDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpCostcenterService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - ERP成本中心")
|
||||
@RestController
|
||||
@RequestMapping("/sply/erp-costcenter")
|
||||
@Validated
|
||||
public class ErpCostcenterController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ErpCostcenterService erpCostcenterService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP成本中心")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-costcenter:create')")
|
||||
public CommonResult<ErpCostcenterRespVO> createErpCostcenter(@Valid @RequestBody ErpCostcenterSaveReqVO createReqVO) {
|
||||
return success(erpCostcenterService.createErpCostcenter(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP成本中心")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-costcenter:update')")
|
||||
public CommonResult<Boolean> updateErpCostcenter(@Valid @RequestBody ErpCostcenterSaveReqVO updateReqVO) {
|
||||
erpCostcenterService.updateErpCostcenter(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP成本中心")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-costcenter:delete')")
|
||||
public CommonResult<Boolean> deleteErpCostcenter(@RequestParam("id") Long id) {
|
||||
erpCostcenterService.deleteErpCostcenter(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP成本中心")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-costcenter:delete')")
|
||||
public CommonResult<Boolean> deleteErpCostcenterList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpCostcenterService.deleteErpCostcenterListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP成本中心")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-costcenter:query')")
|
||||
public CommonResult<ErpCostcenterRespVO> getErpCostcenter(@RequestParam("id") Long id) {
|
||||
ErpCostcenterDO erpCostcenter = erpCostcenterService.getErpCostcenter(id);
|
||||
return success(BeanUtils.toBean(erpCostcenter, ErpCostcenterRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP成本中心分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-costcenter:query')")
|
||||
public CommonResult<PageResult<ErpCostcenterRespVO>> getErpCostcenterPage(@Valid ErpCostcenterPageReqVO pageReqVO) {
|
||||
PageResult<ErpCostcenterDO> pageResult = erpCostcenterService.getErpCostcenterPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpCostcenterRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP成本中心 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-costcenter:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpCostcenterExcel(@Valid ErpCostcenterPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpCostcenterDO> list = erpCostcenterService.getErpCostcenterPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "ERP成本中心.xls", "数据", ErpCostcenterRespVO.class,
|
||||
BeanUtils.toBean(list, ErpCostcenterRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +1,36 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpCustomerDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpCustomerService;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpCustomerPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpCustomerRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpCustomerSaveReqVO;
|
||||
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 cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpCustomerDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpCustomerService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
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.*;
|
||||
|
||||
@Tag(name = "管理后台 - ERP客商信息")
|
||||
@RestController
|
||||
@RequestMapping("/erp/customer")
|
||||
@RequestMapping("/sply/erp-customer")
|
||||
@Validated
|
||||
public class ErpCustomerController {
|
||||
|
||||
@@ -104,4 +101,18 @@ public class ErpCustomerController {
|
||||
BeanUtils.toBean(list, ErpCustomerRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/getErpCustomerTask")
|
||||
@Operation(summary = "定时获得erp更新客商主数据")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-customer:create')")
|
||||
public void getErpCustomerTask() {
|
||||
erpCustomerService.callErpRfcInterface();
|
||||
}
|
||||
|
||||
@PostMapping("/initialize")
|
||||
@Operation(summary = "把数据库数据number搞到redis")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-customer:create')")
|
||||
public void initialize() {
|
||||
erpCustomerService.initialize();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpFactoryPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpFactoryRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpFactorySaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpFactoryDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpFactoryService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - ERP工厂")
|
||||
@RestController
|
||||
@RequestMapping("/sply/erp-factory")
|
||||
@Validated
|
||||
public class ErpFactoryController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ErpFactoryService erpFactoryService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP工厂")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-factory:create')")
|
||||
public CommonResult<ErpFactoryRespVO> createErpFactory(@Valid @RequestBody ErpFactorySaveReqVO createReqVO) {
|
||||
return success(erpFactoryService.createErpFactory(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP工厂")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-factory:update')")
|
||||
public CommonResult<Boolean> updateErpFactory(@Valid @RequestBody ErpFactorySaveReqVO updateReqVO) {
|
||||
erpFactoryService.updateErpFactory(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP工厂")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-factory:delete')")
|
||||
public CommonResult<Boolean> deleteErpFactory(@RequestParam("id") Long id) {
|
||||
erpFactoryService.deleteErpFactory(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP工厂")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-factory:delete')")
|
||||
public CommonResult<Boolean> deleteErpFactoryList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpFactoryService.deleteErpFactoryListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP工厂")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-factory:query')")
|
||||
public CommonResult<ErpFactoryRespVO> getErpFactory(@RequestParam("id") Long id) {
|
||||
ErpFactoryDO erpFactory = erpFactoryService.getErpFactory(id);
|
||||
return success(BeanUtils.toBean(erpFactory, ErpFactoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP工厂分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-factory:query')")
|
||||
public CommonResult<PageResult<ErpFactoryRespVO>> getErpFactoryPage(@Valid ErpFactoryPageReqVO pageReqVO) {
|
||||
PageResult<ErpFactoryDO> pageResult = erpFactoryService.getErpFactoryPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpFactoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP工厂 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-factory:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpFactoryExcel(@Valid ErpFactoryPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpFactoryDO> list = erpFactoryService.getErpFactoryPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "ERP工厂.xls", "数据", ErpFactoryRespVO.class,
|
||||
BeanUtils.toBean(list, ErpFactoryRespVO.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.ErpInternalOrderDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpInternalOrderService;
|
||||
|
||||
@Tag(name = "管理后台 - ERP内部订单")
|
||||
@RestController
|
||||
@RequestMapping("/sply/erp-internal-order")
|
||||
@Validated
|
||||
public class ErpInternalOrderController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ErpInternalOrderService erpInternalOrderService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP内部订单")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-internal-order:create')")
|
||||
public CommonResult<ErpInternalOrderRespVO> createErpInternalOrder(@Valid @RequestBody ErpInternalOrderSaveReqVO createReqVO) {
|
||||
return success(erpInternalOrderService.createErpInternalOrder(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP内部订单")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-internal-order:update')")
|
||||
public CommonResult<Boolean> updateErpInternalOrder(@Valid @RequestBody ErpInternalOrderSaveReqVO updateReqVO) {
|
||||
erpInternalOrderService.updateErpInternalOrder(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP内部订单")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-internal-order:delete')")
|
||||
public CommonResult<Boolean> deleteErpInternalOrder(@RequestParam("id") Long id) {
|
||||
erpInternalOrderService.deleteErpInternalOrder(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP内部订单")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-internal-order:delete')")
|
||||
public CommonResult<Boolean> deleteErpInternalOrderList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpInternalOrderService.deleteErpInternalOrderListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP内部订单")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-internal-order:query')")
|
||||
public CommonResult<ErpInternalOrderRespVO> getErpInternalOrder(@RequestParam("id") Long id) {
|
||||
ErpInternalOrderDO erpInternalOrder = erpInternalOrderService.getErpInternalOrder(id);
|
||||
return success(BeanUtils.toBean(erpInternalOrder, ErpInternalOrderRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP内部订单分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-internal-order:query')")
|
||||
public CommonResult<PageResult<ErpInternalOrderRespVO>> getErpInternalOrderPage(@Valid ErpInternalOrderPageReqVO pageReqVO) {
|
||||
PageResult<ErpInternalOrderDO> pageResult = erpInternalOrderService.getErpInternalOrderPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpInternalOrderRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP内部订单 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-internal-order:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpInternalOrderExcel(@Valid ErpInternalOrderPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpInternalOrderDO> list = erpInternalOrderService.getErpInternalOrderPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "ERP内部订单.xls", "数据", ErpInternalOrderRespVO.class,
|
||||
BeanUtils.toBean(list, ErpInternalOrderRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +1,36 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpMaterialPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpMaterialRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpMaterialSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpMaterialDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpMaterialService;
|
||||
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 io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
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.*;
|
||||
|
||||
@Tag(name = "管理后台 - ERP物料信息")
|
||||
@RestController
|
||||
@RequestMapping("/erp/material")
|
||||
@RequestMapping("/sply/erp-material")
|
||||
@Validated
|
||||
public class ErpMaterialController {
|
||||
|
||||
@@ -104,4 +101,18 @@ public class ErpMaterialController {
|
||||
BeanUtils.toBean(list, ErpMaterialRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/getErpMaterialTask")
|
||||
@Operation(summary = "定时获得erp更新公司")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:create')")
|
||||
public void getErpMaterialTask() {
|
||||
erpMaterialService.callErpRfcInterface();
|
||||
}
|
||||
|
||||
@PostMapping("/initialize")
|
||||
@Operation(summary = "把数据库数据number搞到redis")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:create')")
|
||||
public void initialize() {
|
||||
erpMaterialService.initialize();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpProcessPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpProcessRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpProcessSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpProcessDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpProcessService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@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,104 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpProcessDetailPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpProcessDetailRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpProcessDetailSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpProcessDetailDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpProcessDetailService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@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,104 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpProductiveVersionPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpProductiveVersionRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.erp.vo.ErpProductiveVersionSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.erp.ErpProductiveVersionDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpProductiveVersionService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - ERP生产版本")
|
||||
@RestController
|
||||
@RequestMapping("/sply/erp-productive-version")
|
||||
@Validated
|
||||
public class ErpProductiveVersionController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ErpProductiveVersionService erpProductiveVersionService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP生产版本")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-productive-version:create')")
|
||||
public CommonResult<ErpProductiveVersionRespVO> createErpProductiveVersion(@Valid @RequestBody ErpProductiveVersionSaveReqVO createReqVO) {
|
||||
return success(erpProductiveVersionService.createErpProductiveVersion(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP生产版本")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-productive-version:update')")
|
||||
public CommonResult<Boolean> updateErpProductiveVersion(@Valid @RequestBody ErpProductiveVersionSaveReqVO updateReqVO) {
|
||||
erpProductiveVersionService.updateErpProductiveVersion(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP生产版本")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-productive-version:delete')")
|
||||
public CommonResult<Boolean> deleteErpProductiveVersion(@RequestParam("id") Long id) {
|
||||
erpProductiveVersionService.deleteErpProductiveVersion(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP生产版本")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-productive-version:delete')")
|
||||
public CommonResult<Boolean> deleteErpProductiveVersionList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpProductiveVersionService.deleteErpProductiveVersionListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP生产版本")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-productive-version:query')")
|
||||
public CommonResult<ErpProductiveVersionRespVO> getErpProductiveVersion(@RequestParam("id") Long id) {
|
||||
ErpProductiveVersionDO erpProductiveVersion = erpProductiveVersionService.getErpProductiveVersion(id);
|
||||
return success(BeanUtils.toBean(erpProductiveVersion, ErpProductiveVersionRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP生产版本分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-productive-version:query')")
|
||||
public CommonResult<PageResult<ErpProductiveVersionRespVO>> getErpProductiveVersionPage(@Valid ErpProductiveVersionPageReqVO pageReqVO) {
|
||||
PageResult<ErpProductiveVersionDO> pageResult = erpProductiveVersionService.getErpProductiveVersionPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpProductiveVersionRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP生产版本 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-productive-version:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpProductiveVersionExcel(@Valid ErpProductiveVersionPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpProductiveVersionDO> list = erpProductiveVersionService.getErpProductiveVersionPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "ERP生产版本.xls", "数据", ErpProductiveVersionRespVO.class,
|
||||
BeanUtils.toBean(list, ErpProductiveVersionRespVO.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.ErpPurchaseOrganizationDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpPurchaseOrganizationService;
|
||||
|
||||
@Tag(name = "管理后台 - ERP采购组织")
|
||||
@RestController
|
||||
@RequestMapping("/sply/erp-purchase-organization")
|
||||
@Validated
|
||||
public class ErpPurchaseOrganizationController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ErpPurchaseOrganizationService erpPurchaseOrganizationService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP采购组织")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-purchase-organization:create')")
|
||||
public CommonResult<ErpPurchaseOrganizationRespVO> createErpPurchaseOrganization(@Valid @RequestBody ErpPurchaseOrganizationSaveReqVO createReqVO) {
|
||||
return success(erpPurchaseOrganizationService.createErpPurchaseOrganization(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP采购组织")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-purchase-organization:update')")
|
||||
public CommonResult<Boolean> updateErpPurchaseOrganization(@Valid @RequestBody ErpPurchaseOrganizationSaveReqVO updateReqVO) {
|
||||
erpPurchaseOrganizationService.updateErpPurchaseOrganization(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP采购组织")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-purchase-organization:delete')")
|
||||
public CommonResult<Boolean> deleteErpPurchaseOrganization(@RequestParam("id") Long id) {
|
||||
erpPurchaseOrganizationService.deleteErpPurchaseOrganization(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP采购组织")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-purchase-organization:delete')")
|
||||
public CommonResult<Boolean> deleteErpPurchaseOrganizationList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpPurchaseOrganizationService.deleteErpPurchaseOrganizationListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP采购组织")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-purchase-organization:query')")
|
||||
public CommonResult<ErpPurchaseOrganizationRespVO> getErpPurchaseOrganization(@RequestParam("id") Long id) {
|
||||
ErpPurchaseOrganizationDO erpPurchaseOrganization = erpPurchaseOrganizationService.getErpPurchaseOrganization(id);
|
||||
return success(BeanUtils.toBean(erpPurchaseOrganization, ErpPurchaseOrganizationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP采购组织分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-purchase-organization:query')")
|
||||
public CommonResult<PageResult<ErpPurchaseOrganizationRespVO>> getErpPurchaseOrganizationPage(@Valid ErpPurchaseOrganizationPageReqVO pageReqVO) {
|
||||
PageResult<ErpPurchaseOrganizationDO> pageResult = erpPurchaseOrganizationService.getErpPurchaseOrganizationPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpPurchaseOrganizationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP采购组织 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-purchase-organization:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpPurchaseOrganizationExcel(@Valid ErpPurchaseOrganizationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpPurchaseOrganizationDO> list = erpPurchaseOrganizationService.getErpPurchaseOrganizationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "ERP采购组织.xls", "数据", ErpPurchaseOrganizationRespVO.class,
|
||||
BeanUtils.toBean(list, ErpPurchaseOrganizationRespVO.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.ErpSalesOrganizationDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpSalesOrganizationService;
|
||||
|
||||
@Tag(name = "管理后台 - ERP销售组织")
|
||||
@RestController
|
||||
@RequestMapping("/sply/erp-sales-organization")
|
||||
@Validated
|
||||
public class ErpSalesOrganizationController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ErpSalesOrganizationService erpSalesOrganizationService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP销售组织")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-sales-organization:create')")
|
||||
public CommonResult<ErpSalesOrganizationRespVO> createErpSalesOrganization(@Valid @RequestBody ErpSalesOrganizationSaveReqVO createReqVO) {
|
||||
return success(erpSalesOrganizationService.createErpSalesOrganization(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP销售组织")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-sales-organization:update')")
|
||||
public CommonResult<Boolean> updateErpSalesOrganization(@Valid @RequestBody ErpSalesOrganizationSaveReqVO updateReqVO) {
|
||||
erpSalesOrganizationService.updateErpSalesOrganization(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP销售组织")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-sales-organization:delete')")
|
||||
public CommonResult<Boolean> deleteErpSalesOrganization(@RequestParam("id") Long id) {
|
||||
erpSalesOrganizationService.deleteErpSalesOrganization(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP销售组织")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-sales-organization:delete')")
|
||||
public CommonResult<Boolean> deleteErpSalesOrganizationList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpSalesOrganizationService.deleteErpSalesOrganizationListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP销售组织")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-sales-organization:query')")
|
||||
public CommonResult<ErpSalesOrganizationRespVO> getErpSalesOrganization(@RequestParam("id") Long id) {
|
||||
ErpSalesOrganizationDO erpSalesOrganization = erpSalesOrganizationService.getErpSalesOrganization(id);
|
||||
return success(BeanUtils.toBean(erpSalesOrganization, ErpSalesOrganizationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP销售组织分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-sales-organization:query')")
|
||||
public CommonResult<PageResult<ErpSalesOrganizationRespVO>> getErpSalesOrganizationPage(@Valid ErpSalesOrganizationPageReqVO pageReqVO) {
|
||||
PageResult<ErpSalesOrganizationDO> pageResult = erpSalesOrganizationService.getErpSalesOrganizationPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpSalesOrganizationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP销售组织 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-sales-organization:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpSalesOrganizationExcel(@Valid ErpSalesOrganizationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpSalesOrganizationDO> list = erpSalesOrganizationService.getErpSalesOrganizationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "ERP销售组织.xls", "数据", ErpSalesOrganizationRespVO.class,
|
||||
BeanUtils.toBean(list, ErpSalesOrganizationRespVO.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.ErpWarehouseDO;
|
||||
import cn.iocoder.yudao.module.erp.service.erp.ErpWarehouseService;
|
||||
|
||||
@Tag(name = "管理后台 - ERP库位")
|
||||
@RestController
|
||||
@RequestMapping("/sply/erp-warehouse")
|
||||
@Validated
|
||||
public class ErpWarehouseController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ErpWarehouseService erpWarehouseService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP库位")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-warehouse:create')")
|
||||
public CommonResult<ErpWarehouseRespVO> createErpWarehouse(@Valid @RequestBody ErpWarehouseSaveReqVO createReqVO) {
|
||||
return success(erpWarehouseService.createErpWarehouse(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP库位")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-warehouse:update')")
|
||||
public CommonResult<Boolean> updateErpWarehouse(@Valid @RequestBody ErpWarehouseSaveReqVO updateReqVO) {
|
||||
erpWarehouseService.updateErpWarehouse(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP库位")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-warehouse:delete')")
|
||||
public CommonResult<Boolean> deleteErpWarehouse(@RequestParam("id") Long id) {
|
||||
erpWarehouseService.deleteErpWarehouse(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP库位")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-warehouse:delete')")
|
||||
public CommonResult<Boolean> deleteErpWarehouseList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpWarehouseService.deleteErpWarehouseListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP库位")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-warehouse:query')")
|
||||
public CommonResult<ErpWarehouseRespVO> getErpWarehouse(@RequestParam("id") Long id) {
|
||||
ErpWarehouseDO erpWarehouse = erpWarehouseService.getErpWarehouse(id);
|
||||
return success(BeanUtils.toBean(erpWarehouse, ErpWarehouseRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得ERP库位分页")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-warehouse:query')")
|
||||
public CommonResult<PageResult<ErpWarehouseRespVO>> getErpWarehousePage(@Valid ErpWarehousePageReqVO pageReqVO) {
|
||||
PageResult<ErpWarehouseDO> pageResult = erpWarehouseService.getErpWarehousePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpWarehouseRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP库位 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-warehouse:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpWarehouseExcel(@Valid ErpWarehousePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpWarehouseDO> list = erpWarehouseService.getErpWarehousePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "ERP库位.xls", "数据", ErpWarehouseRespVO.class,
|
||||
BeanUtils.toBean(list, ErpWarehouseRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
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,51 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@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,49 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
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 cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
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,43 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@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,40 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - ERP公司分页 Request VO")
|
||||
@Data
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - ERP公司 Response VO")
|
||||
@Data
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
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 jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - ERP公司新增/修改 Request VO")
|
||||
@Data
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - ERP成本中心分页 Request VO")
|
||||
@Data
|
||||
public class ErpCostcenterPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "成本中心编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "成本中心描述", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "工区必填;使用这个基础数据是,如果为X时必须和工区使用")
|
||||
private String isUse;
|
||||
|
||||
@Schema(description = "功能范围")
|
||||
private String scopeNumber;
|
||||
|
||||
@Schema(description = "功能范围描述", example = "赵六")
|
||||
private String scopeName;
|
||||
|
||||
@Schema(description = "起始日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] startDate;
|
||||
|
||||
@Schema(description = "截止日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endDate;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - ERP成本中心 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpCostcenterRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "23318")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "成本中心编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("成本中心编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "成本中心描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@ExcelProperty("成本中心描述")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "工区必填;使用这个基础数据是,如果为X时必须和工区使用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("工区必填;使用这个基础数据是,如果为X时必须和工区使用")
|
||||
private String isUse;
|
||||
|
||||
@Schema(description = "功能范围", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("功能范围")
|
||||
private String scopeNumber;
|
||||
|
||||
@Schema(description = "功能范围描述", example = "赵六")
|
||||
@ExcelProperty("功能范围描述")
|
||||
private String scopeName;
|
||||
|
||||
@Schema(description = "起始日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("起始日期")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
@Schema(description = "截止日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("截止日期")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - ERP成本中心新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpCostcenterSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "23318")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "成本中心编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "成本中心编码不能为空")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "成本中心描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@NotEmpty(message = "成本中心描述不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "工区必填;使用这个基础数据是,如果为X时必须和工区使用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "工区必填;使用这个基础数据是,如果为X时必须和工区使用不能为空")
|
||||
private String isUse;
|
||||
|
||||
@Schema(description = "功能范围", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "功能范围不能为空")
|
||||
private String scopeNumber;
|
||||
|
||||
@Schema(description = "功能范围描述", example = "赵六")
|
||||
private String scopeName;
|
||||
|
||||
@Schema(description = "起始日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "起始日期不能为空")
|
||||
private LocalDateTime startDate;
|
||||
|
||||
@Schema(description = "截止日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "截止日期不能为空")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
@@ -41,7 +42,4 @@ public class ErpCustomerPageReqVO extends PageParam {
|
||||
@Schema(description = "冻结标识")
|
||||
private String isProvisional;
|
||||
|
||||
@Schema(description = "类型", example = "2")
|
||||
private String type;
|
||||
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP客商主数据 Response VO")
|
||||
@Data
|
||||
@@ -51,8 +52,4 @@ public class ErpCustomerRespVO {
|
||||
@ExcelProperty("冻结标识")
|
||||
private String isProvisional;
|
||||
|
||||
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("类型")
|
||||
private String type;
|
||||
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -45,8 +46,4 @@ public class ErpCustomerSaveReqVO {
|
||||
@Schema(description = "冻结标识")
|
||||
private String isProvisional;
|
||||
|
||||
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "类型不能为空")
|
||||
private String type;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工厂分页 Request VO")
|
||||
@Data
|
||||
public class ErpFactoryPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工厂名称", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
private String number;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工厂 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpFactoryRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9235")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@ExcelProperty("工厂名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("工厂编码")
|
||||
private String number;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工厂新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpFactorySaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9235")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@NotEmpty(message = "工厂名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "工厂编码不能为空")
|
||||
private String number;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
|
||||
@Schema(description = "管理后台 - ERP内部订单分页 Request VO")
|
||||
@Data
|
||||
public class ErpInternalOrderPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "内部订单编号")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "内部订单描述", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "内部订单类型", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "是否已关闭;使用这个基础数据是,如果为X时必须和工区使用")
|
||||
private String isOff;
|
||||
|
||||
@Schema(description = "是否已完成")
|
||||
private String isFinish;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP内部订单 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpInternalOrderRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "19327")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "内部订单编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("内部订单编号")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "内部订单描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("内部订单描述")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "内部订单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("内部订单类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "是否已关闭;使用这个基础数据是,如果为X时必须和工区使用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("是否已关闭;使用这个基础数据是,如果为X时必须和工区使用")
|
||||
private String isOff;
|
||||
|
||||
@Schema(description = "是否已完成")
|
||||
@ExcelProperty("是否已完成")
|
||||
private String isFinish;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
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.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP内部订单新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpInternalOrderSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "19327")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "内部订单编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "内部订单编号不能为空")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "内部订单描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "内部订单描述不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "内部订单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "内部订单类型不能为空")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "是否已关闭;使用这个基础数据是,如果为X时必须和工区使用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "是否已关闭;使用这个基础数据是,如果为X时必须和工区使用不能为空")
|
||||
private String isOff;
|
||||
|
||||
@Schema(description = "是否已完成")
|
||||
private String isFinish;
|
||||
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP物料数据 Response VO")
|
||||
@Data
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
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 org.springframework.format.annotation.DateTimeFormat;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - ERP物料数据新增/修改 Request VO")
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
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,43 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@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,40 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
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 cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
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,55 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@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,51 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
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,34 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP生产版本分页 Request VO")
|
||||
@Data
|
||||
public class ErpProductiveVersionPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
private BigDecimal factoryNumber;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "生产版本编码")
|
||||
private String productiveVersionNumber;
|
||||
|
||||
@Schema(description = "生产版本描述", example = "赵六")
|
||||
private String productiveVersionName;
|
||||
|
||||
@Schema(description = "备选BOM编号")
|
||||
private String bomNumber;
|
||||
|
||||
@Schema(description = "工艺路线组")
|
||||
private String blineGroup;
|
||||
|
||||
@Schema(description = "组计数器", example = "15610")
|
||||
private Long groupCount;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP生产版本 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpProductiveVersionRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27745")
|
||||
@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 = "生产版本编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("生产版本编码")
|
||||
private String productiveVersionNumber;
|
||||
|
||||
@Schema(description = "生产版本描述", example = "赵六")
|
||||
@ExcelProperty("生产版本描述")
|
||||
private String productiveVersionName;
|
||||
|
||||
@Schema(description = "备选BOM编号")
|
||||
@ExcelProperty("备选BOM编号")
|
||||
private String bomNumber;
|
||||
|
||||
@Schema(description = "工艺路线组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("工艺路线组")
|
||||
private String blineGroup;
|
||||
|
||||
@Schema(description = "组计数器", requiredMode = Schema.RequiredMode.REQUIRED, example = "15610")
|
||||
@ExcelProperty("组计数器")
|
||||
private Long groupCount;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP生产版本新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpProductiveVersionSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27745")
|
||||
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 = "生产版本编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "生产版本编码不能为空")
|
||||
private String productiveVersionNumber;
|
||||
|
||||
@Schema(description = "生产版本描述", example = "赵六")
|
||||
private String productiveVersionName;
|
||||
|
||||
@Schema(description = "备选BOM编号")
|
||||
private String bomNumber;
|
||||
|
||||
@Schema(description = "工艺路线组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "工艺路线组不能为空")
|
||||
private String blineGroup;
|
||||
|
||||
@Schema(description = "组计数器", requiredMode = Schema.RequiredMode.REQUIRED, example = "15610")
|
||||
@NotNull(message = "组计数器不能为空")
|
||||
private Long groupCount;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
|
||||
@Schema(description = "管理后台 - ERP采购组织分页 Request VO")
|
||||
@Data
|
||||
public class ErpPurchaseOrganizationPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "采购组织编号")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "采购组织描述", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "公司编码;存入ERP公司编码")
|
||||
private String companyNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP采购组织 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpPurchaseOrganizationRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17344")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "采购组织编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("采购组织编号")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "采购组织描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@ExcelProperty("采购组织描述")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "公司编码;存入ERP公司编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("公司编码;存入ERP公司编码")
|
||||
private String companyNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
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.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP采购组织新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpPurchaseOrganizationSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17344")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "采购组织编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "采购组织编号不能为空")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "采购组织描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@NotEmpty(message = "采购组织描述不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "公司编码;存入ERP公司编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "公司编码;存入ERP公司编码不能为空")
|
||||
private String companyNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
|
||||
@Schema(description = "管理后台 - ERP销售组织分页 Request VO")
|
||||
@Data
|
||||
public class ErpSalesOrganizationPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "销售组织编号")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "销售组织描述", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "公司编码;存入ERP公司编码")
|
||||
private String companyNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP销售组织 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpSalesOrganizationRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "22623")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "销售组织编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("销售组织编号")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "销售组织描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@ExcelProperty("销售组织描述")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "公司编码;存入ERP公司编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("公司编码;存入ERP公司编码")
|
||||
private String companyNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
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.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP销售组织新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpSalesOrganizationSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "22623")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "销售组织编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "销售组织编号不能为空")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "销售组织描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@NotEmpty(message = "销售组织描述不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "公司编码;存入ERP公司编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "公司编码;存入ERP公司编码不能为空")
|
||||
private String companyNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
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 org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - ERP库位分页 Request VO")
|
||||
@Data
|
||||
public class ErpWarehousePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工厂编码;将查询参数存入")
|
||||
private String factoryNumber;
|
||||
|
||||
@Schema(description = "库位描述", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "库位编码")
|
||||
private String number;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP库位 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpWarehouseRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "16847")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂编码;将查询参数存入")
|
||||
@ExcelProperty("工厂编码;将查询参数存入")
|
||||
private String factoryNumber;
|
||||
|
||||
@Schema(description = "库位描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("库位描述")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "库位编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("库位编码")
|
||||
private String number;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
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.*;
|
||||
|
||||
@Schema(description = "管理后台 - ERP库位新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpWarehouseSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "16847")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂编码;将查询参数存入")
|
||||
private String factoryNumber;
|
||||
|
||||
@Schema(description = "库位描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "库位描述不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "库位编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "库位编码不能为空")
|
||||
private String number;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
/**
|
||||
* 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,74 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* ERP公司 DO
|
||||
*
|
||||
@@ -12,7 +10,8 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
@TableName("sply_erp_cpn")
|
||||
@KeySequence("sply_erp_cpn_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
//@EqualsAndHashCode(callSuper = true)
|
||||
@EqualsAndHashCode
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@@ -20,9 +19,8 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpCompanyDO extends BaseDO {
|
||||
|
||||
|
||||
//public class ErpCompanyDO extends BaseDO {
|
||||
public class ErpCompanyDO{
|
||||
|
||||
/**
|
||||
* 主键
|
||||
@@ -45,4 +43,7 @@ public class ErpCompanyDO extends BaseDO {
|
||||
@TableField("CUR")
|
||||
private String currency;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer TENANT_ID;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
/**
|
||||
* ERP成本中心 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_erp_cctr")
|
||||
@KeySequence("sply_erp_cctr_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpCostcenterDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 成本中心编码
|
||||
*/
|
||||
@TableField("NUM")
|
||||
private String number;
|
||||
/**
|
||||
* 成本中心描述
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 工区必填;使用这个基础数据是,如果为X时必须和工区使用
|
||||
*/
|
||||
@TableField("IS_USE")
|
||||
private String isUse;
|
||||
/**
|
||||
* 功能范围
|
||||
*/
|
||||
@TableField("SCO_NUM")
|
||||
private String scopeNumber;
|
||||
/**
|
||||
* 功能范围描述
|
||||
*/
|
||||
@TableField("SCO_NAME")
|
||||
private String scopeName;
|
||||
/**
|
||||
* 起始日期
|
||||
*/
|
||||
@TableField("STRT_DT")
|
||||
private LocalDateTime startDate;
|
||||
/**
|
||||
* 截止日期
|
||||
*/
|
||||
@TableField("END_DT")
|
||||
private LocalDateTime endDate;
|
||||
|
||||
}
|
||||
@@ -1,11 +1,9 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
/**
|
||||
* ERP客商主数据 DO
|
||||
*
|
||||
@@ -14,7 +12,8 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
@TableName("sply_erp_cstm")
|
||||
@KeySequence("sply_erp_cstm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
//@EqualsAndHashCode(callSuper = true)
|
||||
@EqualsAndHashCode
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@@ -22,7 +21,8 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpCustomerDO extends BaseDO {
|
||||
//public class ErpCustomerDO extends BaseDO {
|
||||
public class ErpCustomerDO{
|
||||
|
||||
|
||||
|
||||
@@ -76,10 +76,8 @@ public class ErpCustomerDO extends BaseDO {
|
||||
*/
|
||||
@TableField("IS_PRVS")
|
||||
private String isProvisional;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer TENANT_ID;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
/**
|
||||
* ERP工厂 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_erp_fact")
|
||||
@KeySequence("sply_erp_fact_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpFactoryDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 工厂名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 工厂编码
|
||||
*/
|
||||
@TableField("NUM")
|
||||
private String number;
|
||||
/**
|
||||
* 公司编号
|
||||
*/
|
||||
@TableField("CPN_ID")
|
||||
private Long companyId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
/**
|
||||
* ERP内部订单 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_erp_intl_ord")
|
||||
@KeySequence("sply_erp_intl_ord_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpInternalOrderDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 内部订单编号
|
||||
*/
|
||||
@TableField("NUM")
|
||||
private String number;
|
||||
/**
|
||||
* 内部订单描述
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 内部订单类型
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
/**
|
||||
* 是否已关闭;使用这个基础数据是,如果为X时必须和工区使用
|
||||
*/
|
||||
@TableField("IS_OFF")
|
||||
private String isOff;
|
||||
/**
|
||||
* 是否已完成
|
||||
*/
|
||||
@TableField("IS_FIN")
|
||||
private String isFinish;
|
||||
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
/**
|
||||
* ERP物料数据 DO
|
||||
*
|
||||
@@ -13,7 +12,8 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
@TableName("sply_erp_mtrl")
|
||||
@KeySequence("sply_erp_mtrl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
//@EqualsAndHashCode(callSuper = true)
|
||||
@EqualsAndHashCode
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@@ -21,7 +21,8 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpMaterialDO extends BaseDO {
|
||||
//public class ErpMaterialDO extends BaseDO {
|
||||
public class ErpMaterialDO {
|
||||
|
||||
|
||||
|
||||
@@ -96,4 +97,7 @@ public class ErpMaterialDO extends BaseDO {
|
||||
@TableField("MTRL_LEN_DSP")
|
||||
private String materialLengthDescription;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer TENANT_ID;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package cn.iocoder.yudao.module.erp.dal.dataobject.erp;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
/**
|
||||
* 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;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user