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.35</revision>
|
||||
<revision>3.0.37</revision>
|
||||
<!-- Maven 相关 -->
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
|
||||
@@ -12,6 +12,14 @@ import com.zt.plat.framework.common.exception.ErrorCode;
|
||||
public interface ErrorCodeConstants {
|
||||
|
||||
// ========== 示例模块 1-001-000-000 ==========
|
||||
ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
ErrorCode MATERIAL_OTHER_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
ErrorCode ELEMENT_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
ErrorCode CONTACT_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
ErrorCode ACCOUNT_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
ErrorCode MATERIAL_DESTROY_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
ErrorCode MATERIAL_INFOMATION_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
ErrorCode COMPANY_RELATIVITY_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
ErrorCode WAREHOUSE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
ErrorCode FACTORY_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.zt.plat.module.tmpltp.enums;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public enum DeleteStatusEnum {
|
||||
|
||||
STATUS_DRF(TmplStsEnum.DRAFT.getCode(), new HashSet<>() {{add(TmplStsEnum.DRAFT.getCode());}}),
|
||||
STATUS_PUB(TmplStsEnum.PUBLISHED.getCode(), new HashSet<>()),
|
||||
STATUS_STOP(TmplStsEnum.STOPPED.getCode(), new HashSet<>());
|
||||
|
||||
|
||||
private final String code;
|
||||
private final Set<String> allowedTransitions;
|
||||
|
||||
DeleteStatusEnum(String code, Set<String> allowedTransitions) {
|
||||
this.code = code;
|
||||
this.allowedTransitions = allowedTransitions;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态码获取对应的枚举实例
|
||||
*/
|
||||
public static DeleteStatusEnum fromCode(String code) {
|
||||
for (DeleteStatusEnum status : values()) {
|
||||
if (status.code.equals(code)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验状态转换是否合法
|
||||
*/
|
||||
public boolean isTransitionAllowed(String targetStatus) {
|
||||
return allowedTransitions.contains(targetStatus);
|
||||
}
|
||||
}
|
||||
@@ -14,14 +14,15 @@ public interface ErrorCodeConstants {
|
||||
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 TEMPLATE_INSTANCE_CREATE_FAIL = new ErrorCode(1_027_000_510, "实例创建失败");
|
||||
ErrorCode PARAMS_IS_NULL_OR_ERR = new ErrorCode(1_027_000_510, "参数为空或参数错误");
|
||||
ErrorCode DEPARTMENT_INSTANCE_RELATIVITY_NOT_EXISTS = new ErrorCode(1_027_000_511, "部门与实例关联不存在");
|
||||
ErrorCode ILLEGAL_OPERATION_TYPE = new ErrorCode(1_027_000_511, "非法操作类型");
|
||||
ErrorCode OPERATION_FAIL= new ErrorCode(1_027_000_512, "操作失败");
|
||||
ErrorCode STATUS_OPERATION_FAIL= new ErrorCode(1_027_000_513, "当前状态不支持此操作");
|
||||
ErrorCode NOT_FOUND_CLASS= new ErrorCode(1_027_000_514, "找不到对应的类");
|
||||
ErrorCode UTIL_NOT_INIT= new ErrorCode(1_027_000_515, "工具类为未初始化");
|
||||
ErrorCode TMPL_INS_FLD_CODE_EXISTS = new ErrorCode(1_027_000_516, "字段已存在");
|
||||
ErrorCode DEPARTMENT_INSTANCE_RELATIVITY_NOT_EXISTS = new ErrorCode(1_027_000_512, "部门与实例关联不存在");
|
||||
ErrorCode ILLEGAL_OPERATION_TYPE = new ErrorCode(1_027_000_513, "非法操作类型");
|
||||
ErrorCode OPERATION_FAIL= new ErrorCode(1_027_000_514, "操作失败");
|
||||
ErrorCode STATUS_OPERATION_FAIL= new ErrorCode(1_027_000_515, "当前状态不支持此操作");
|
||||
ErrorCode NOT_FOUND_CLASS= new ErrorCode(1_027_000_516, "找不到对应的类");
|
||||
ErrorCode UTIL_NOT_INIT= new ErrorCode(1_027_000_517, "工具类为未初始化");
|
||||
ErrorCode TMPL_INS_FLD_CODE_EXISTS = new ErrorCode(1_027_000_518, "字段已存在");
|
||||
//Illegal operation type
|
||||
}
|
||||
|
||||
|
||||
@@ -6,25 +6,17 @@ import java.util.Set;
|
||||
/**
|
||||
* 状态枚举类,定义所有可能的状态及合法的状态转换
|
||||
*/
|
||||
public enum StatusEnum {
|
||||
// 定义所有状态及对应的合法转换目标状态
|
||||
STATUS_1("1", new HashSet<String>() {{
|
||||
add("2");
|
||||
add("4");
|
||||
}}),
|
||||
STATUS_2("2", new HashSet<String>() {{
|
||||
add("3");
|
||||
}}),
|
||||
STATUS_3("3", new HashSet<String>() {{
|
||||
add("4");
|
||||
add("2");
|
||||
}}),
|
||||
STATUS_4("4", new HashSet<>()); // 没有合法的转换目标
|
||||
public enum PublishStatusEnum {
|
||||
|
||||
STATUS_DRF(TmplStsEnum.DRAFT.getCode(), new HashSet<>() {{add(TmplStsEnum.DRAFT.getCode());}}),
|
||||
STATUS_PUB(TmplStsEnum.PUBLISHED.getCode(), new HashSet<>()),
|
||||
STATUS_STOP(TmplStsEnum.STOPPED.getCode(), new HashSet<>() );
|
||||
|
||||
|
||||
private final String code;
|
||||
private final Set<String> allowedTransitions;
|
||||
|
||||
StatusEnum(String code, Set<String> allowedTransitions) {
|
||||
PublishStatusEnum(String code, Set<String> allowedTransitions) {
|
||||
this.code = code;
|
||||
this.allowedTransitions = allowedTransitions;
|
||||
}
|
||||
@@ -32,8 +24,8 @@ public enum StatusEnum {
|
||||
/**
|
||||
* 根据状态码获取对应的枚举实例
|
||||
*/
|
||||
public static StatusEnum fromCode(String code) {
|
||||
for (StatusEnum status : values()) {
|
||||
public static PublishStatusEnum fromCode(String code) {
|
||||
for (PublishStatusEnum status : values()) {
|
||||
if (status.code.equals(code)) {
|
||||
return status;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.zt.plat.module.tmpltp.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum TmplStsEnum {
|
||||
// 草稿状态
|
||||
DRAFT("DRF", "草稿"),
|
||||
// 已发布状态
|
||||
PUBLISHED("PUB", "已发布"),
|
||||
// 已停用状态
|
||||
STOPPED("STOP", "已停用");
|
||||
|
||||
// 获取状态编码
|
||||
private final String code;
|
||||
// 获取状态描述
|
||||
private final String description;
|
||||
|
||||
// 构造方法
|
||||
TmplStsEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
// 根据编码获取枚举实例
|
||||
public static TmplStsEnum getByCode(String code) {
|
||||
for (TmplStsEnum status : TmplStsEnum.values()) {
|
||||
if (status.getCode().equals(code)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.zt.plat.module.tmpltp.enums;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public enum UpdateStatusEnum {
|
||||
|
||||
STATUS_DRF(TmplStsEnum.DRAFT.getCode(), new HashSet<>() {{
|
||||
add(TmplStsEnum.DRAFT.getCode());
|
||||
add(TmplStsEnum.STOPPED.getCode());
|
||||
}}),
|
||||
STATUS_PUB(TmplStsEnum.PUBLISHED.getCode(), new HashSet<>()),
|
||||
STATUS_STOP(TmplStsEnum.STOPPED.getCode(), new HashSet<>(){{
|
||||
add(TmplStsEnum.DRAFT.getCode());
|
||||
add(TmplStsEnum.STOPPED.getCode());
|
||||
}});
|
||||
|
||||
|
||||
private final String code;
|
||||
private final Set<String> allowedTransitions;
|
||||
|
||||
UpdateStatusEnum(String code, Set<String> allowedTransitions) {
|
||||
this.code = code;
|
||||
this.allowedTransitions = allowedTransitions;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态码获取对应的枚举实例
|
||||
*/
|
||||
public static UpdateStatusEnum fromCode(String code) {
|
||||
for (UpdateStatusEnum status : values()) {
|
||||
if (status.code.equals(code)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验状态转换是否合法
|
||||
*/
|
||||
public boolean isTransitionAllowed(String targetStatus) {
|
||||
return allowedTransitions.contains(targetStatus);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.AccountDO;
|
||||
import com.zt.plat.module.base.service.base.AccountService;
|
||||
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 com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 账户条款")
|
||||
@RestController
|
||||
@RequestMapping("/base/account")
|
||||
@Validated
|
||||
public class AccountController {
|
||||
|
||||
|
||||
@Resource
|
||||
private AccountService accountService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建账户条款")
|
||||
@PreAuthorize("@ss.hasPermission('base:account:create')")
|
||||
public CommonResult<AccountRespVO> createAccount(@Valid @RequestBody AccountSaveReqVO createReqVO) {
|
||||
return success(accountService.createAccount(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新账户条款")
|
||||
@PreAuthorize("@ss.hasPermission('base:account:update')")
|
||||
public CommonResult<Boolean> updateAccount(@Valid @RequestBody AccountSaveReqVO updateReqVO) {
|
||||
accountService.updateAccount(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除账户条款")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:account:delete')")
|
||||
public CommonResult<Boolean> deleteAccount(@RequestParam("id") Long id) {
|
||||
accountService.deleteAccount(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除账户条款")
|
||||
@PreAuthorize("@ss.hasPermission('base:account:delete')")
|
||||
public CommonResult<Boolean> deleteAccountList(@RequestBody BatchDeleteReqVO req) {
|
||||
accountService.deleteAccountListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得账户条款")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:account:query')")
|
||||
public CommonResult<AccountRespVO> getAccount(@RequestParam("id") Long id) {
|
||||
AccountDO account = accountService.getAccount(id);
|
||||
return success(BeanUtils.toBean(account, AccountRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得账户条款分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:account:query')")
|
||||
public CommonResult<PageResult<AccountRespVO>> getAccountPage(@Valid AccountPageReqVO pageReqVO) {
|
||||
PageResult<AccountDO> pageResult = accountService.getAccountPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AccountRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出账户条款 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:account:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportAccountExcel(@Valid AccountPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AccountDO> list = accountService.getAccountPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "账户条款.xls", "数据", AccountRespVO.class,
|
||||
BeanUtils.toBean(list, AccountRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.*;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.CompanyRelativityDO;
|
||||
import com.zt.plat.module.base.service.base.CompanyRelativityService;
|
||||
|
||||
@Tag(name = "管理后台 - 公司关系")
|
||||
@RestController
|
||||
@RequestMapping("/base/company-relativity")
|
||||
@Validated
|
||||
public class CompanyRelativityController {
|
||||
|
||||
|
||||
@Resource
|
||||
private CompanyRelativityService companyRelativityService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建公司关系")
|
||||
@PreAuthorize("@ss.hasPermission('base:company-relativity:create')")
|
||||
public CommonResult<CompanyRelativityRespVO> createCompanyRelativity(@Valid @RequestBody CompanyRelativitySaveReqVO createReqVO) {
|
||||
return success(companyRelativityService.createCompanyRelativity(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新公司关系")
|
||||
@PreAuthorize("@ss.hasPermission('base:company-relativity:update')")
|
||||
public CommonResult<Boolean> updateCompanyRelativity(@Valid @RequestBody CompanyRelativitySaveReqVO updateReqVO) {
|
||||
companyRelativityService.updateCompanyRelativity(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除公司关系")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:company-relativity:delete')")
|
||||
public CommonResult<Boolean> deleteCompanyRelativity(@RequestParam("id") Long id) {
|
||||
companyRelativityService.deleteCompanyRelativity(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除公司关系")
|
||||
@PreAuthorize("@ss.hasPermission('base:company-relativity:delete')")
|
||||
public CommonResult<Boolean> deleteCompanyRelativityList(@RequestBody BatchDeleteReqVO req) {
|
||||
companyRelativityService.deleteCompanyRelativityListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得公司关系")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:company-relativity:query')")
|
||||
public CommonResult<CompanyRelativityRespVO> getCompanyRelativity(@RequestParam("id") Long id) {
|
||||
CompanyRelativityDO companyRelativity = companyRelativityService.getCompanyRelativity(id);
|
||||
return success(BeanUtils.toBean(companyRelativity, CompanyRelativityRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得公司关系分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:company-relativity:query')")
|
||||
public CommonResult<PageResult<CompanyRelativityRespVO>> getCompanyRelativityPage(@Valid CompanyRelativityPageReqVO pageReqVO) {
|
||||
PageResult<CompanyRelativityDO> pageResult = companyRelativityService.getCompanyRelativityPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CompanyRelativityRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出公司关系 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:company-relativity:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCompanyRelativityExcel(@Valid CompanyRelativityPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CompanyRelativityDO> list = companyRelativityService.getCompanyRelativityPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "公司关系.xls", "数据", CompanyRelativityRespVO.class,
|
||||
BeanUtils.toBean(list, CompanyRelativityRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ContactPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ContactRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ContactSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.ContactDO;
|
||||
import com.zt.plat.module.base.service.base.ContactService;
|
||||
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 com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 联系人信息")
|
||||
@RestController
|
||||
@RequestMapping("/base/contact")
|
||||
@Validated
|
||||
public class ContactController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ContactService contactService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建联系人信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:create')")
|
||||
public CommonResult<ContactRespVO> createContact(@Valid @RequestBody ContactSaveReqVO createReqVO) {
|
||||
return success(contactService.createContact(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新联系人信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:update')")
|
||||
public CommonResult<Boolean> updateContact(@Valid @RequestBody ContactSaveReqVO updateReqVO) {
|
||||
contactService.updateContact(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除联系人信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:delete')")
|
||||
public CommonResult<Boolean> deleteContact(@RequestParam("id") Long id) {
|
||||
contactService.deleteContact(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除联系人信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:delete')")
|
||||
public CommonResult<Boolean> deleteContactList(@RequestBody BatchDeleteReqVO req) {
|
||||
contactService.deleteContactListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得联系人信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:query')")
|
||||
public CommonResult<ContactRespVO> getContact(@RequestParam("id") Long id) {
|
||||
ContactDO contact = contactService.getContact(id);
|
||||
return success(BeanUtils.toBean(contact, ContactRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得联系人信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:query')")
|
||||
public CommonResult<PageResult<ContactRespVO>> getContactPage(@Valid ContactPageReqVO pageReqVO) {
|
||||
PageResult<ContactDO> pageResult = contactService.getContactPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ContactRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出联系人信息 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:contact:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportContactExcel(@Valid ContactPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ContactDO> list = contactService.getContactPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "联系人信息.xls", "数据", ContactRespVO.class,
|
||||
BeanUtils.toBean(list, ContactRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ElementPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ElementRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ElementSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.ElementDO;
|
||||
import com.zt.plat.module.base.service.base.ElementService;
|
||||
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 com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 金属元素")
|
||||
@RestController
|
||||
@RequestMapping("/base/element")
|
||||
@Validated
|
||||
public class ElementController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ElementService elementService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建金属元素")
|
||||
@PreAuthorize("@ss.hasPermission('base:element:create')")
|
||||
public CommonResult<ElementRespVO> createElement(@Valid @RequestBody ElementSaveReqVO createReqVO) {
|
||||
return success(elementService.createElement(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新金属元素")
|
||||
@PreAuthorize("@ss.hasPermission('base:element:update')")
|
||||
public CommonResult<Boolean> updateElement(@Valid @RequestBody ElementSaveReqVO updateReqVO) {
|
||||
elementService.updateElement(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除金属元素")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:element:delete')")
|
||||
public CommonResult<Boolean> deleteElement(@RequestParam("id") Long id) {
|
||||
elementService.deleteElement(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除金属元素")
|
||||
@PreAuthorize("@ss.hasPermission('base:element:delete')")
|
||||
public CommonResult<Boolean> deleteElementList(@RequestBody BatchDeleteReqVO req) {
|
||||
elementService.deleteElementListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得金属元素")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:element:query')")
|
||||
public CommonResult<ElementRespVO> getElement(@RequestParam("id") Long id) {
|
||||
ElementDO element = elementService.getElement(id);
|
||||
return success(BeanUtils.toBean(element, ElementRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得金属元素分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:element:query')")
|
||||
public CommonResult<PageResult<ElementRespVO>> getElementPage(@Valid ElementPageReqVO pageReqVO) {
|
||||
PageResult<ElementDO> pageResult = elementService.getElementPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ElementRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出金属元素 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:element:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportElementExcel(@Valid ElementPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ElementDO> list = elementService.getElementPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "金属元素.xls", "数据", ElementRespVO.class,
|
||||
BeanUtils.toBean(list, ElementRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.FactoryPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.FactoryRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.FactorySaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.FactoryDO;
|
||||
import com.zt.plat.module.base.service.base.FactoryService;
|
||||
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 com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 工厂")
|
||||
@RestController
|
||||
@RequestMapping("/base/factory")
|
||||
@Validated
|
||||
public class FactoryController {
|
||||
|
||||
|
||||
@Resource
|
||||
private FactoryService factoryService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建工厂")
|
||||
@PreAuthorize("@ss.hasPermission('base:factory:create')")
|
||||
public CommonResult<FactoryRespVO> createFactory(@Valid @RequestBody FactorySaveReqVO createReqVO) {
|
||||
return success(factoryService.createFactory(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新工厂")
|
||||
@PreAuthorize("@ss.hasPermission('base:factory:update')")
|
||||
public CommonResult<Boolean> updateFactory(@Valid @RequestBody FactorySaveReqVO updateReqVO) {
|
||||
factoryService.updateFactory(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除工厂")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:factory:delete')")
|
||||
public CommonResult<Boolean> deleteFactory(@RequestParam("id") Long id) {
|
||||
factoryService.deleteFactory(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除工厂")
|
||||
@PreAuthorize("@ss.hasPermission('base:factory:delete')")
|
||||
public CommonResult<Boolean> deleteFactoryList(@RequestBody BatchDeleteReqVO req) {
|
||||
factoryService.deleteFactoryListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得工厂")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:factory:query')")
|
||||
public CommonResult<FactoryRespVO> getFactory(@RequestParam("id") Long id) {
|
||||
FactoryDO factory = factoryService.getFactory(id);
|
||||
return success(BeanUtils.toBean(factory, FactoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得工厂分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:factory:query')")
|
||||
public CommonResult<PageResult<FactoryRespVO>> getFactoryPage(@Valid FactoryPageReqVO pageReqVO) {
|
||||
PageResult<FactoryDO> pageResult = factoryService.getFactoryPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, FactoryRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出工厂 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:factory:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportFactoryExcel(@Valid FactoryPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<FactoryDO> list = factoryService.getFactoryPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "工厂.xls", "数据", FactoryRespVO.class,
|
||||
BeanUtils.toBean(list, FactoryRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.*;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialDestroyDO;
|
||||
import com.zt.plat.module.base.service.base.MaterialDestroyService;
|
||||
|
||||
@Tag(name = "管理后台 - 物料回收率")
|
||||
@RestController
|
||||
@RequestMapping("/base/material-destroy")
|
||||
@Validated
|
||||
public class MaterialDestroyController {
|
||||
|
||||
|
||||
@Resource
|
||||
private MaterialDestroyService materialDestroyService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建物料回收率")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:create')")
|
||||
public CommonResult<MaterialDestroyRespVO> createMaterialDestroy(@Valid @RequestBody MaterialDestroySaveReqVO createReqVO) {
|
||||
return success(materialDestroyService.createMaterialDestroy(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新物料回收率")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:update')")
|
||||
public CommonResult<Boolean> updateMaterialDestroy(@Valid @RequestBody MaterialDestroySaveReqVO updateReqVO) {
|
||||
materialDestroyService.updateMaterialDestroy(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除物料回收率")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:delete')")
|
||||
public CommonResult<Boolean> deleteMaterialDestroy(@RequestParam("id") Long id) {
|
||||
materialDestroyService.deleteMaterialDestroy(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除物料回收率")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:delete')")
|
||||
public CommonResult<Boolean> deleteMaterialDestroyList(@RequestBody BatchDeleteReqVO req) {
|
||||
materialDestroyService.deleteMaterialDestroyListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得物料回收率")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:query')")
|
||||
public CommonResult<MaterialDestroyRespVO> getMaterialDestroy(@RequestParam("id") Long id) {
|
||||
MaterialDestroyDO materialDestroy = materialDestroyService.getMaterialDestroy(id);
|
||||
return success(BeanUtils.toBean(materialDestroy, MaterialDestroyRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得物料回收率分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:query')")
|
||||
public CommonResult<PageResult<MaterialDestroyRespVO>> getMaterialDestroyPage(@Valid MaterialDestroyPageReqVO pageReqVO) {
|
||||
PageResult<MaterialDestroyDO> pageResult = materialDestroyService.getMaterialDestroyPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialDestroyRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出物料回收率 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-destroy:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportMaterialDestroyExcel(@Valid MaterialDestroyPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<MaterialDestroyDO> list = materialDestroyService.getMaterialDestroyPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "物料回收率.xls", "数据", MaterialDestroyRespVO.class,
|
||||
BeanUtils.toBean(list, MaterialDestroyRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.*;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialInfomationDO;
|
||||
import com.zt.plat.module.base.service.base.MaterialInfomationService;
|
||||
|
||||
@Tag(name = "管理后台 - 物料信息")
|
||||
@RestController
|
||||
@RequestMapping("/base/material-infomation")
|
||||
@Validated
|
||||
public class MaterialInfomationController {
|
||||
|
||||
|
||||
@Resource
|
||||
private MaterialInfomationService materialInfomationService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建物料信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:create')")
|
||||
public CommonResult<MaterialInfomationRespVO> createMaterialInfomation(@Valid @RequestBody MaterialInfomationSaveReqVO createReqVO) {
|
||||
return success(materialInfomationService.createMaterialInfomation(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新物料信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:update')")
|
||||
public CommonResult<Boolean> updateMaterialInfomation(@Valid @RequestBody MaterialInfomationSaveReqVO updateReqVO) {
|
||||
materialInfomationService.updateMaterialInfomation(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除物料信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:delete')")
|
||||
public CommonResult<Boolean> deleteMaterialInfomation(@RequestParam("id") Long id) {
|
||||
materialInfomationService.deleteMaterialInfomation(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除物料信息")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:delete')")
|
||||
public CommonResult<Boolean> deleteMaterialInfomationList(@RequestBody BatchDeleteReqVO req) {
|
||||
materialInfomationService.deleteMaterialInfomationListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得物料信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:query')")
|
||||
public CommonResult<MaterialInfomationRespVO> getMaterialInfomation(@RequestParam("id") Long id) {
|
||||
MaterialInfomationDO materialInfomation = materialInfomationService.getMaterialInfomation(id);
|
||||
return success(BeanUtils.toBean(materialInfomation, MaterialInfomationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得物料信息分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:query')")
|
||||
public CommonResult<PageResult<MaterialInfomationRespVO>> getMaterialInfomationPage(@Valid MaterialInfomationPageReqVO pageReqVO) {
|
||||
PageResult<MaterialInfomationDO> pageResult = materialInfomationService.getMaterialInfomationPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialInfomationRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出物料信息 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-infomation:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportMaterialInfomationExcel(@Valid MaterialInfomationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<MaterialInfomationDO> list = materialInfomationService.getMaterialInfomationPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "物料信息.xls", "数据", MaterialInfomationRespVO.class,
|
||||
BeanUtils.toBean(list, MaterialInfomationRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.*;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialOtherDO;
|
||||
import com.zt.plat.module.base.service.base.MaterialOtherService;
|
||||
|
||||
@Tag(name = "管理后台 - 物料拓展数据")
|
||||
@RestController
|
||||
@RequestMapping("/base/material-other")
|
||||
@Validated
|
||||
public class MaterialOtherController {
|
||||
|
||||
|
||||
@Resource
|
||||
private MaterialOtherService materialOtherService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建物料拓展数据")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-other:create')")
|
||||
public CommonResult<MaterialOtherRespVO> createMaterialOther(@Valid @RequestBody MaterialOtherSaveReqVO createReqVO) {
|
||||
return success(materialOtherService.createMaterialOther(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新物料拓展数据")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-other:update')")
|
||||
public CommonResult<Boolean> updateMaterialOther(@Valid @RequestBody MaterialOtherSaveReqVO updateReqVO) {
|
||||
materialOtherService.updateMaterialOther(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除物料拓展数据")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:material-other:delete')")
|
||||
public CommonResult<Boolean> deleteMaterialOther(@RequestParam("id") Long id) {
|
||||
materialOtherService.deleteMaterialOther(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除物料拓展数据")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-other:delete')")
|
||||
public CommonResult<Boolean> deleteMaterialOtherList(@RequestBody BatchDeleteReqVO req) {
|
||||
materialOtherService.deleteMaterialOtherListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得物料拓展数据")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-other:query')")
|
||||
public CommonResult<MaterialOtherRespVO> getMaterialOther(@RequestParam("id") Long id) {
|
||||
MaterialOtherDO materialOther = materialOtherService.getMaterialOther(id);
|
||||
return success(BeanUtils.toBean(materialOther, MaterialOtherRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得物料拓展数据分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-other:query')")
|
||||
public CommonResult<PageResult<MaterialOtherRespVO>> getMaterialOtherPage(@Valid MaterialOtherPageReqVO pageReqVO) {
|
||||
PageResult<MaterialOtherDO> pageResult = materialOtherService.getMaterialOtherPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MaterialOtherRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出物料拓展数据 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:material-other:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportMaterialOtherExcel(@Valid MaterialOtherPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<MaterialOtherDO> list = materialOtherService.getMaterialOtherPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "物料拓展数据.xls", "数据", MaterialOtherRespVO.class,
|
||||
BeanUtils.toBean(list, MaterialOtherRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.zt.plat.module.base.controller.admin.base;
|
||||
|
||||
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 com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.*;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.WarehouseDO;
|
||||
import com.zt.plat.module.base.service.base.WarehouseService;
|
||||
|
||||
@Tag(name = "管理后台 - 仓库")
|
||||
@RestController
|
||||
@RequestMapping("/base/warehouse")
|
||||
@Validated
|
||||
public class WarehouseController {
|
||||
|
||||
|
||||
@Resource
|
||||
private WarehouseService warehouseService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建仓库")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse:create')")
|
||||
public CommonResult<WarehouseRespVO> createWarehouse(@Valid @RequestBody WarehouseSaveReqVO createReqVO) {
|
||||
return success(warehouseService.createWarehouse(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新仓库")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse:update')")
|
||||
public CommonResult<Boolean> updateWarehouse(@Valid @RequestBody WarehouseSaveReqVO updateReqVO) {
|
||||
warehouseService.updateWarehouse(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除仓库")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse:delete')")
|
||||
public CommonResult<Boolean> deleteWarehouse(@RequestParam("id") Long id) {
|
||||
warehouseService.deleteWarehouse(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除仓库")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse:delete')")
|
||||
public CommonResult<Boolean> deleteWarehouseList(@RequestBody BatchDeleteReqVO req) {
|
||||
warehouseService.deleteWarehouseListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得仓库")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse:query')")
|
||||
public CommonResult<WarehouseRespVO> getWarehouse(@RequestParam("id") Long id) {
|
||||
WarehouseDO warehouse = warehouseService.getWarehouse(id);
|
||||
return success(BeanUtils.toBean(warehouse, WarehouseRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得仓库分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse:query')")
|
||||
public CommonResult<PageResult<WarehouseRespVO>> getWarehousePage(@Valid WarehousePageReqVO pageReqVO) {
|
||||
PageResult<WarehouseDO> pageResult = warehouseService.getWarehousePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, WarehouseRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出仓库 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportWarehouseExcel(@Valid WarehousePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<WarehouseDO> list = warehouseService.getWarehousePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "仓库.xls", "数据", WarehouseRespVO.class,
|
||||
BeanUtils.toBean(list, WarehouseRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.zt.plat.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 com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 账户条款分页 Request VO")
|
||||
@Data
|
||||
public class AccountPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "类型", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "户名", example = "赵六")
|
||||
private String accountName;
|
||||
|
||||
@Schema(description = "开户行", example = "2834")
|
||||
private String bankAccount;
|
||||
|
||||
@Schema(description = "户号")
|
||||
private String accountNumber;
|
||||
|
||||
@Schema(description = "税号/社会信用代码")
|
||||
private String taxNumber;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.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 = "管理后台 - 账户条款 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class AccountRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15166")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@ExcelProperty("户名")
|
||||
private String accountName;
|
||||
|
||||
@Schema(description = "开户行", requiredMode = Schema.RequiredMode.REQUIRED, example = "2834")
|
||||
@ExcelProperty("开户行")
|
||||
private String bankAccount;
|
||||
|
||||
@Schema(description = "户号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("户号")
|
||||
private String accountNumber;
|
||||
|
||||
@Schema(description = "税号/社会信用代码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("税号/社会信用代码")
|
||||
private String taxNumber;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 账户条款新增/修改 Request VO")
|
||||
@Data
|
||||
public class AccountSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15166")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "类型不能为空")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "户名", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@NotEmpty(message = "户名不能为空")
|
||||
private String accountName;
|
||||
|
||||
@Schema(description = "开户行", requiredMode = Schema.RequiredMode.REQUIRED, example = "2834")
|
||||
@NotEmpty(message = "开户行不能为空")
|
||||
private String bankAccount;
|
||||
|
||||
@Schema(description = "户号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "户号不能为空")
|
||||
private String accountNumber;
|
||||
|
||||
@Schema(description = "税号/社会信用代码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "税号/社会信用代码不能为空")
|
||||
private String taxNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.zt.plat.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 com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 公司关系分页 Request VO")
|
||||
@Data
|
||||
public class CompanyRelativityPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "ERP公司编码;一个供应链公司,可以关联多个ERP公司")
|
||||
private String erpNumber;
|
||||
|
||||
@Schema(description = "供应链公司编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "负责人")
|
||||
private String manager;
|
||||
|
||||
@Schema(description = "部门来源")
|
||||
private String departmentSource;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.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 = "管理后台 - 公司关系 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CompanyRelativityRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "12011")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "ERP公司编码;一个供应链公司,可以关联多个ERP公司", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("ERP公司编码;一个供应链公司,可以关联多个ERP公司")
|
||||
private String erpNumber;
|
||||
|
||||
@Schema(description = "供应链公司编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("供应链公司编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 公司关系新增/修改 Request VO")
|
||||
@Data
|
||||
public class CompanyRelativitySaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "12011")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "ERP公司编码;一个供应链公司,可以关联多个ERP公司", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "ERP公司编码;一个供应链公司,可以关联多个ERP公司不能为空")
|
||||
private String erpNumber;
|
||||
|
||||
@Schema(description = "供应链公司编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "供应链公司编码不能为空")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "供应链公司编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "供应链公司编号不能为空")
|
||||
private Long companyId;
|
||||
|
||||
@Schema(description = "供应链公司名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "供应链公司名称不能为空")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "供应链部门编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "供应链部门名称不能为空")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "供应链部门名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "供应链部门名称不能为空")
|
||||
private String deptName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.zt.plat.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 com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 联系人信息分页 Request VO")
|
||||
@Data
|
||||
public class ContactPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "类型甲方/乙方", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "联系人")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "电话")
|
||||
private String tel;
|
||||
|
||||
@Schema(description = "邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "传真")
|
||||
private String fax;
|
||||
|
||||
@Schema(description = "联系地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.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 = "管理后台 - 联系人信息 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ContactRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27121")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "类型甲方/乙方", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("类型甲方/乙方")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("联系人")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "电话", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("电话")
|
||||
private String tel;
|
||||
|
||||
@Schema(description = "邮箱")
|
||||
@ExcelProperty("邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "传真")
|
||||
@ExcelProperty("传真")
|
||||
private String fax;
|
||||
|
||||
@Schema(description = "联系地址", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("联系地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 联系人信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class ContactSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27121")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "类型甲方/乙方", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "类型甲方/乙方不能为空")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "联系人不能为空")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "电话", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "电话不能为空")
|
||||
private String tel;
|
||||
|
||||
@Schema(description = "邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(description = "传真")
|
||||
private String fax;
|
||||
|
||||
@Schema(description = "联系地址", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "联系地址不能为空")
|
||||
private String address;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.zt.plat.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 com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 金属元素分页 Request VO")
|
||||
@Data
|
||||
public class ElementPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String abbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "芋艿")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.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 = "管理后台 - 金属元素 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ElementRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21884")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "金属元素缩写", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("金属元素缩写")
|
||||
private String abbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("金属元素名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "金属元素编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("金属元素编码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "品位单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 金属元素新增/修改 Request VO")
|
||||
@Data
|
||||
public class ElementSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "21884")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "金属元素缩写", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "金属元素缩写不能为空")
|
||||
private String abbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "金属元素名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "金属元素编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
// @NotEmpty(message = "金属元素编码不能为空")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "品位单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "品位单位不能为空")
|
||||
private String gradeUnit;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.zt.plat.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 com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂分页 Request VO")
|
||||
@Data
|
||||
public class FactoryPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "工厂名称", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "ERP工厂名称", example = "张三")
|
||||
private String erpName;
|
||||
|
||||
@Schema(description = "ERP工厂编码")
|
||||
private String erpNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.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 = "管理后台 - 工厂 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class FactoryRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "10325")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
@ExcelProperty("公司编码")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "工厂名称", example = "赵六")
|
||||
@ExcelProperty("工厂名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
@ExcelProperty("工厂编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
@ExcelProperty("是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "ERP工厂名称", example = "张三")
|
||||
@ExcelProperty("ERP工厂名称")
|
||||
private String erpName;
|
||||
|
||||
@Schema(description = "ERP工厂编码")
|
||||
@ExcelProperty("ERP工厂编码")
|
||||
private String erpNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂新增/修改 Request VO")
|
||||
@Data
|
||||
public class FactorySaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "10325")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "工厂名称", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
private String number;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "ERP工厂名称", example = "张三")
|
||||
private String erpName;
|
||||
|
||||
@Schema(description = "ERP工厂编码")
|
||||
private String erpNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 物料回收率分页 Request VO")
|
||||
@Data
|
||||
public class MaterialDestroyPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "原料物料编码")
|
||||
private String upNumber;
|
||||
|
||||
@Schema(description = "返产品物料编码")
|
||||
private String downNumber;
|
||||
|
||||
@Schema(description = "回收率")
|
||||
private BigDecimal ratio;
|
||||
|
||||
@Schema(description = "是否使用该物料核销")
|
||||
private String operation;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "供应商编码")
|
||||
private String supplierNumber;
|
||||
|
||||
@Schema(description = "供应商名称", example = "王五")
|
||||
private String supplierName;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.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;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 物料回收率 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MaterialDestroyRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "23885")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "原料物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("原料物料编码")
|
||||
private String upNumber;
|
||||
|
||||
@Schema(description = "返产品物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("返产品物料编码")
|
||||
private String downNumber;
|
||||
|
||||
@Schema(description = "回收率", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("回收率")
|
||||
private BigDecimal ratio;
|
||||
|
||||
@Schema(description = "是否使用该物料核销")
|
||||
@ExcelProperty("是否使用该物料核销")
|
||||
private String operation;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "供应商编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("供应商编码")
|
||||
private String supplierNumber;
|
||||
|
||||
@Schema(description = "供应商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
@ExcelProperty("是否启用")
|
||||
private String isEnable;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.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 = "管理后台 - 物料回收率新增/修改 Request VO")
|
||||
@Data
|
||||
public class MaterialDestroySaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "23885")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "原料物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "原料物料编码不能为空")
|
||||
private String upNumber;
|
||||
|
||||
@Schema(description = "返产品物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "返产品物料编码不能为空")
|
||||
private String downNumber;
|
||||
|
||||
@Schema(description = "回收率", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "回收率不能为空")
|
||||
private BigDecimal ratio;
|
||||
|
||||
@Schema(description = "是否使用该物料核销")
|
||||
private String operation;
|
||||
|
||||
@Schema(description = "供应商编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "供应商编码不能为空")
|
||||
private String supplierNumber;
|
||||
|
||||
@Schema(description = "供应商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "供应商名称不能为空")
|
||||
private String supplierName;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.zt.plat.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 com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 物料信息分页 Request VO")
|
||||
@Data
|
||||
public class MaterialInfomationPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "物料名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.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 = "管理后台 - 物料信息 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MaterialInfomationRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3326")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("物料编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("物料名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 物料信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class MaterialInfomationSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3326")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "物料编码不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "物料名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.zt.plat.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 com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 物料拓展数据分页 Request VO")
|
||||
@Data
|
||||
public class MaterialOtherPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "王五")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "ERP物料编码")
|
||||
private String erpMaterialNumber;
|
||||
|
||||
@Schema(description = "ERP物料名称", example = "李四")
|
||||
private String erpMaterialName;
|
||||
|
||||
@Schema(description = "ERP物料计量单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String abbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "小数位数")
|
||||
private Long decimal;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.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 = "管理后台 - 物料拓展数据 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MaterialOtherRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27804")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@ExcelProperty("物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "王五")
|
||||
@ExcelProperty("物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "ERP物料编码")
|
||||
@ExcelProperty("ERP物料编码")
|
||||
private String erpMaterialNumber;
|
||||
|
||||
@Schema(description = "ERP物料名称", example = "李四")
|
||||
@ExcelProperty("ERP物料名称")
|
||||
private String erpMaterialName;
|
||||
|
||||
@Schema(description = "ERP物料计量单位")
|
||||
@ExcelProperty("ERP物料计量单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
@ExcelProperty("金属元素缩写")
|
||||
private String abbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "赵六")
|
||||
@ExcelProperty("金属元素名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
@ExcelProperty("金属元素编码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "品位单位")
|
||||
@ExcelProperty("品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "小数位数")
|
||||
@ExcelProperty("小数位数")
|
||||
private Long decimal;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
@ExcelProperty("是否启用")
|
||||
private String isEnable;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 物料拓展数据新增/修改 Request VO")
|
||||
@Data
|
||||
public class MaterialOtherSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27804")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "物料名称", example = "王五")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "ERP物料编码")
|
||||
private String erpMaterialNumber;
|
||||
|
||||
@Schema(description = "ERP物料名称", example = "李四")
|
||||
private String erpMaterialName;
|
||||
|
||||
@Schema(description = "ERP物料计量单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String abbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "小数位数")
|
||||
private Long decimal;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import com.zt.plat.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 com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 仓库分页 Request VO")
|
||||
@Data
|
||||
public class WarehousePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
private String factoryNumber;
|
||||
|
||||
@Schema(description = "仓库名称", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "仓库编码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "工厂名称", example = "李四")
|
||||
private String factoryName;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "ERP库位编码")
|
||||
private String erpCoding;
|
||||
|
||||
@Schema(description = "ERP库位名称", example = "赵六")
|
||||
private String erpName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.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 = "管理后台 - 仓库 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WarehouseRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18014")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
@ExcelProperty("工厂编码")
|
||||
private String factoryNumber;
|
||||
|
||||
@Schema(description = "仓库名称", example = "李四")
|
||||
@ExcelProperty("仓库名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "仓库编码")
|
||||
@ExcelProperty("仓库编码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "工厂名称", example = "李四")
|
||||
@ExcelProperty("工厂名称")
|
||||
private String factoryName;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
@ExcelProperty("是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
@ExcelProperty("公司编码")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "ERP库位编码")
|
||||
@ExcelProperty("ERP库位编码")
|
||||
private String erpCoding;
|
||||
|
||||
@Schema(description = "ERP库位名称", example = "赵六")
|
||||
@ExcelProperty("ERP库位名称")
|
||||
private String erpName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.zt.plat.module.base.controller.admin.base.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 仓库新增/修改 Request VO")
|
||||
@Data
|
||||
public class WarehouseSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "18014")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工厂编码")
|
||||
private String factoryNumber;
|
||||
|
||||
@Schema(description = "仓库名称", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "仓库编码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "工厂名称", example = "李四")
|
||||
private String factoryName;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
private String companyNumber;
|
||||
|
||||
@Schema(description = "ERP库位编码")
|
||||
private String erpCoding;
|
||||
|
||||
@Schema(description = "ERP库位名称", example = "赵六")
|
||||
private String erpName;
|
||||
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
package com.zt.plat.module.base.controller.admin.templtp;
|
||||
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstancePageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceSaveReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.*;
|
||||
import com.zt.plat.module.base.dal.dataobject.tmpltp.TemplateInstanceDO;
|
||||
import com.zt.plat.module.base.service.tmpltp.TemplateInstanceService;
|
||||
import com.zt.plat.module.infra.api.file.FileApi;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -21,6 +20,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
@@ -39,7 +40,6 @@ import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 模板实例")
|
||||
@RestController
|
||||
@RequestMapping("/base/template-instance")
|
||||
@@ -57,21 +57,7 @@ public class TemplateInstanceController extends AbstractFileUploadController {
|
||||
@Resource
|
||||
private TemplateInstanceService templateInstanceService;
|
||||
|
||||
@Resource
|
||||
private FileApi fileApi;
|
||||
|
||||
// @PostMapping("/upload-file")
|
||||
// @Operation(summary = "上传模板实例文件")
|
||||
// public CommonResult<Map<String, String> >upload(MultipartFile file) {
|
||||
// Map<String, String> fileMap = new HashMap<>();
|
||||
// try {
|
||||
// String fileWhitReturn = fileApi.createFile(file.getBytes(), file.getOriginalFilename());
|
||||
// fileMap.put("fileUrl", fileWhitReturn);
|
||||
// } catch (IOException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// return success(fileMap);
|
||||
// }
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建模板实例")
|
||||
@PreAuthorize("@ss.hasPermission('bse:template-instance:create')")
|
||||
@@ -112,7 +98,7 @@ public class TemplateInstanceController extends AbstractFileUploadController {
|
||||
public CommonResult<TemplateInstanceRespVO> getTemplateInstance(@RequestParam("id") Long id) {
|
||||
TemplateInstanceDO templateInstance = templateInstanceService.getTemplateInstance(id);
|
||||
TemplateInstanceRespVO templateInstanceRespVO = BeanUtils.toBean(templateInstance, TemplateInstanceRespVO.class);
|
||||
templateInstanceRespVO.setDeptIds(templateInstanceService.getDeptByInstanId(id));
|
||||
templateInstanceService.getDetailedInfo(templateInstanceRespVO);
|
||||
return success(templateInstanceRespVO);
|
||||
}
|
||||
|
||||
@@ -121,7 +107,11 @@ public class TemplateInstanceController extends AbstractFileUploadController {
|
||||
@PreAuthorize("@ss.hasPermission('bse:template-instance:query')")
|
||||
public CommonResult<PageResult<TemplateInstanceRespVO>> getTemplateInstancePage(@Valid TemplateInstancePageReqVO pageReqVO) {
|
||||
PageResult<TemplateInstanceDO> pageResult = templateInstanceService.getTemplateInstancePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, TemplateInstanceRespVO.class));
|
||||
PageResult<TemplateInstanceRespVO> templateInstanceRespVOPageResult = BeanUtils.toBean(pageResult, TemplateInstanceRespVO.class);
|
||||
templateInstanceRespVOPageResult.getList().forEach(templateInstanceRespVO -> {
|
||||
templateInstanceService.getDetailedInfo(templateInstanceRespVO);
|
||||
});
|
||||
return success(templateInstanceRespVOPageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@@ -137,4 +127,54 @@ public class TemplateInstanceController extends AbstractFileUploadController {
|
||||
BeanUtils.toBean(list, TemplateInstanceRespVO.class));
|
||||
}
|
||||
|
||||
//模版实例发布
|
||||
@PostMapping("/publish-batch")
|
||||
@Operation(summary = "模版实例发布")
|
||||
@PreAuthorize("@ss.hasPermission('bse:template-instance:publish')")
|
||||
public CommonResult<Boolean> publishTemplateInstance(@Valid @RequestBody List<PublishTemplateInstanceReqVO> publishReqVOS) {
|
||||
templateInstanceService.publishTemplateInstance(publishReqVOS);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
//不显示停用状态的查询接口
|
||||
@GetMapping("/list-excluding-disabled")
|
||||
@Operation(summary = "获得模板实例")
|
||||
@PreAuthorize("@ss.hasPermission('bse:template-instance:query')")
|
||||
public CommonResult<PageResult<TemplateInstanceRespVO>> listExcludingDisabled(@Valid TemplateInstancePageReqVO pageReqVO) {
|
||||
PageResult<TemplateInstanceRespVO> templateInstanceRespVOPageResult = BeanUtils.toBean(templateInstanceService.listExcludingDisabled(pageReqVO), TemplateInstanceRespVO.class);
|
||||
templateInstanceRespVOPageResult.getList().forEach(
|
||||
templateInstanceRespVO ->
|
||||
templateInstanceService.getDetailedInfo(templateInstanceRespVO));
|
||||
return success(templateInstanceRespVOPageResult);
|
||||
}
|
||||
|
||||
//停用和启用接口
|
||||
@PostMapping("/disable-enable")
|
||||
@Operation(summary = "实例停用和启用接口",description = "实例停用和启用接口")
|
||||
@PreAuthorize("@ss.hasPermission('bse:template-instance:disable-enable')")
|
||||
public CommonResult<Boolean> setDisableOrEnable(@Valid @RequestBody DisableEnableReqVO reqVO) {
|
||||
templateInstanceService.setDisableOrEnable(reqVO);
|
||||
return success(true);
|
||||
}
|
||||
//根据id获取实例版本号
|
||||
@GetMapping("/get-version")
|
||||
@Operation(summary = "根据id获取实例版本号")
|
||||
public CommonResult<Map<String,Object>> getVersion(@RequestParam("id") String id) {
|
||||
return success(templateInstanceService.getVersion(id));
|
||||
}
|
||||
|
||||
//创建版本
|
||||
@PostMapping("/create-version")
|
||||
@Operation(summary = "创建版本")
|
||||
@PreAuthorize("@ss.hasPermission('bse:template-instance:create-version')")
|
||||
public CommonResult<TemplateInstanceRespVO> createVersion(@Valid @NotEmpty(message = "模版实例id不能为空") String id) {
|
||||
return success(templateInstanceService.createVersion(id));
|
||||
}
|
||||
|
||||
//通过模版编码查看历史版本
|
||||
@GetMapping("/list-by-template-cdg")
|
||||
@Operation(summary = "通过模版编码(cdg)查看历史版本",description = "通过模版编码查看历史版本,已按照发布时间和创建时间降序排序")
|
||||
public CommonResult<List<TemplateInstanceRespVO>> listByTemplateCode(@RequestParam("cdg") @Valid @NotEmpty(message = "模版编号不能为空") String templateCode) {
|
||||
return success(templateInstanceService.listByCdg(templateCode));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.zt.plat.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 实例启用与禁用 Request VO")
|
||||
@Data
|
||||
public class DisableEnableReqVO {
|
||||
@Schema(description = "实例主键(id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "实例主键不能为空")
|
||||
private List<String> ids;
|
||||
@Schema(description = "操作类型;操作类型type,type的值启用为enable,禁用为disable", requiredMode = Schema.RequiredMode.REQUIRED, example = "enable")
|
||||
@NotEmpty(message = "实例操作类型不能为空")
|
||||
private String type;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.zt.plat.module.base.controller.admin.templtp.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 实例发布 Request VO")
|
||||
@Data
|
||||
public class PublishTemplateInstanceReqVO {
|
||||
@Schema(description = "主键;需要发布的模版实例id,类型是长整型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotEmpty(message = "id不能为空")
|
||||
private String id;
|
||||
@Schema(description = "当前状态;对应模版状态字段sts。需要传当前记录的状态,非必传。类型是字符串", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private String currentStatus;
|
||||
}
|
||||
@@ -31,5 +31,4 @@ public class TemplateInstanceDataRespVO {
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -32,4 +32,8 @@ public class TemplateInstanceItemRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDate createTime;
|
||||
|
||||
@Schema(description = "条款名", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("条款名")
|
||||
private String itmName;
|
||||
|
||||
}
|
||||
|
||||
@@ -56,6 +56,15 @@ public class TemplateInstanceRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "使用部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@Schema(description = "发布时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("发布时间")
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
|
||||
@Schema(description = "使用部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
|
||||
private List<String> deptIds;
|
||||
@Schema(description = "实例字段;这个是实例字段绑定的字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
|
||||
private List<TemplateInstanceDataRespVO> templateInstanceDataRespVOS;
|
||||
@Schema(description = "实例条款;这个是实例条款绑定的条款;", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
|
||||
private List<TemplateInstanceItemRespVO> instanceItemRespVOS;
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ public class TemplateInstanceSaveReqVO {
|
||||
@NotEmpty(message = "模板名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "模板编码不能为空")
|
||||
private String cdg;
|
||||
// @Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
// @NotEmpty(message = "模板编码不能为空")
|
||||
// private String cdg;
|
||||
|
||||
@Schema(description = "模板描述")
|
||||
private String dsp;
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 账户条款 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_acct")
|
||||
@KeySequence("sply_acct_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class AccountDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
/**
|
||||
* 户名
|
||||
*/
|
||||
@TableField("ACCT_NAME")
|
||||
private String accountName;
|
||||
/**
|
||||
* 开户行
|
||||
*/
|
||||
@TableField("BNK_ACCT")
|
||||
private String bankAccount;
|
||||
/**
|
||||
* 户号
|
||||
*/
|
||||
@TableField("ACCT_NUM")
|
||||
private String accountNumber;
|
||||
/**
|
||||
* 税号/社会信用代码
|
||||
*/
|
||||
@TableField("TAX_NUM")
|
||||
private String taxNumber;
|
||||
/**
|
||||
* 公司编号
|
||||
*/
|
||||
@TableField("COMPANY_ID")
|
||||
private Long companyId;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField("COMPANY_NAME")
|
||||
private String companyName;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
@TableField("DEPT_ID")
|
||||
private Long deptId;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@TableField("DEPT_NAME")
|
||||
private String deptName;
|
||||
/**
|
||||
* 岗位编号
|
||||
*/
|
||||
@TableField("POST_ID")
|
||||
private Long postId;
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
@TableField("CREATOR_NAME")
|
||||
private String creatorName;
|
||||
/**
|
||||
* 更新人名称
|
||||
*/
|
||||
@TableField("UPDATER_NAME")
|
||||
private String updaterName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 公司关系 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_cpn_rel")
|
||||
@KeySequence("sply_cpn_rel_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class CompanyRelativityDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* ERP公司编码;一个供应链公司,可以关联多个ERP公司
|
||||
*/
|
||||
@TableField("ERP_NUM")
|
||||
private String erpNumber;
|
||||
|
||||
// erp名称
|
||||
private String erpName;
|
||||
|
||||
/**
|
||||
* 供应链公司编码
|
||||
*/
|
||||
@TableField("NUM")
|
||||
private String number;
|
||||
/**
|
||||
* 公司编号
|
||||
*/
|
||||
@TableField("COMPANY_ID")
|
||||
private Long companyId;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField("COMPANY_NAME")
|
||||
private String companyName;
|
||||
|
||||
// 负责人id
|
||||
private String leaderUserId;
|
||||
// 是否公司
|
||||
private String isCompany;
|
||||
//是否集团
|
||||
private String isGroup;
|
||||
//电话
|
||||
private String phone;
|
||||
//邮箱
|
||||
private String email;
|
||||
//部门状态
|
||||
private String status;
|
||||
//创建人
|
||||
private String creator;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
@TableField("DEPT_ID")
|
||||
private Long deptId;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@TableField("DEPT_NAME")
|
||||
private String deptName;
|
||||
/**
|
||||
* 岗位编号
|
||||
*/
|
||||
@TableField("POST_ID")
|
||||
private Long postId;
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
@TableField("CREATOR_NAME")
|
||||
private String creatorName;
|
||||
/**
|
||||
* 更新人名称
|
||||
*/
|
||||
@TableField("UPDATER_NAME")
|
||||
private String updaterName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 联系人信息 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_ctct")
|
||||
@KeySequence("sply_ctct_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ContactDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 类型甲方/乙方
|
||||
*/
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@TableField("CTCT")
|
||||
private String contact;
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@TableField("TEL")
|
||||
private String tel;
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@TableField("EM")
|
||||
private String email;
|
||||
/**
|
||||
* 传真
|
||||
*/
|
||||
@TableField("FAX")
|
||||
private String fax;
|
||||
/**
|
||||
* 联系地址
|
||||
*/
|
||||
@TableField("ADR")
|
||||
private String address;
|
||||
/**
|
||||
* 公司编号
|
||||
*/
|
||||
@TableField("COMPANY_ID")
|
||||
private Long companyId;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField("COMPANY_NAME")
|
||||
private String companyName;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
@TableField("DEPT_ID")
|
||||
private Long deptId;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@TableField("DEPT_NAME")
|
||||
private String deptName;
|
||||
/**
|
||||
* 岗位编号
|
||||
*/
|
||||
@TableField("POST_ID")
|
||||
private Long postId;
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
@TableField("CREATOR_NAME")
|
||||
private String creatorName;
|
||||
/**
|
||||
* 更新人名称
|
||||
*/
|
||||
@TableField("UPDATER_NAME")
|
||||
private String updaterName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 金属元素 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_elem")
|
||||
@KeySequence("sply_elem_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ElementDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
@TableField("ABBR")
|
||||
private String abbreviation;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
@TableField("CDG")
|
||||
private String coding;
|
||||
/**
|
||||
* 品位单位
|
||||
*/
|
||||
@TableField("GRD_UNT")
|
||||
private String gradeUnit;
|
||||
/**
|
||||
* 公司编号
|
||||
*/
|
||||
@TableField("COMPANY_ID")
|
||||
private Long companyId;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField("COMPANY_NAME")
|
||||
private String companyName;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
@TableField("DEPT_ID")
|
||||
private Long deptId;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@TableField("DEPT_NAME")
|
||||
private String deptName;
|
||||
/**
|
||||
* 岗位编号
|
||||
*/
|
||||
@TableField("POST_ID")
|
||||
private Long postId;
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
@TableField("CREATOR_NAME")
|
||||
private String creatorName;
|
||||
/**
|
||||
* 更新人名称
|
||||
*/
|
||||
@TableField("UPDATER_NAME")
|
||||
private String updaterName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 工厂 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_fact")
|
||||
@KeySequence("sply_fact_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class FactoryDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 公司编码
|
||||
*/
|
||||
@TableField("CPN_NUM")
|
||||
private String companyNumber;
|
||||
/**
|
||||
* 工厂名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 工厂编码
|
||||
*/
|
||||
@TableField("NUM")
|
||||
private String number;
|
||||
/**
|
||||
* 公司编号
|
||||
*/
|
||||
@TableField("COMPANY_ID")
|
||||
private Long companyId;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField("COMPANY_NAME")
|
||||
private String companyName;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
@TableField("DEPT_ID")
|
||||
private Long deptId;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@TableField("DEPT_NAME")
|
||||
private String deptName;
|
||||
/**
|
||||
* 岗位编号
|
||||
*/
|
||||
@TableField("POST_ID")
|
||||
private Long postId;
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
@TableField("CREATOR_NAME")
|
||||
private String creatorName;
|
||||
/**
|
||||
* 更新人名称
|
||||
*/
|
||||
@TableField("UPDATER_NAME")
|
||||
private String updaterName;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@TableField("IS_ENB")
|
||||
private String isEnable;
|
||||
/**
|
||||
* ERP工厂名称
|
||||
*/
|
||||
@TableField("ERP_NAME")
|
||||
private String erpName;
|
||||
/**
|
||||
* ERP工厂编码
|
||||
*/
|
||||
@TableField("ERP_NUM")
|
||||
private String erpNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
/**
|
||||
* 物料回收率 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_mtrl_dstr")
|
||||
@KeySequence("sply_mtrl_dstr_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class MaterialDestroyDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 原料物料编码
|
||||
*/
|
||||
@TableField("UP_NUM")
|
||||
private String upNumber;
|
||||
/**
|
||||
* 返产品物料编码
|
||||
*/
|
||||
@TableField("DOWN_NUM")
|
||||
private String downNumber;
|
||||
/**
|
||||
* 回收率
|
||||
*/
|
||||
@TableField("RTIO")
|
||||
private BigDecimal ratio;
|
||||
/**
|
||||
* 是否使用该物料核销
|
||||
*/
|
||||
@TableField("OPTN")
|
||||
private String operation;
|
||||
/**
|
||||
* 公司编号
|
||||
*/
|
||||
@TableField("COMPANY_ID")
|
||||
private Long companyId;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField("COMPANY_NAME")
|
||||
private String companyName;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
@TableField("DEPT_ID")
|
||||
private Long deptId;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@TableField("DEPT_NAME")
|
||||
private String deptName;
|
||||
/**
|
||||
* 岗位编号
|
||||
*/
|
||||
@TableField("POST_ID")
|
||||
private Long postId;
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
@TableField("CREATOR_NAME")
|
||||
private String creatorName;
|
||||
/**
|
||||
* 更新人名称
|
||||
*/
|
||||
@TableField("UPDATER_NAME")
|
||||
private String updaterName;
|
||||
/**
|
||||
* 供应商编码
|
||||
*/
|
||||
@TableField("SPLR_NUM")
|
||||
private String supplierNumber;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@TableField("SPLR_NAME")
|
||||
private String supplierName;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@TableField("IS_ENB")
|
||||
private String isEnable;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 物料信息 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("bse_mtrl_inf")
|
||||
@KeySequence("bse_mtrl_inf_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class MaterialInfomationDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@TableField("CD")
|
||||
private String code;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("RMK")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 物料拓展数据 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_mtrl_oth")
|
||||
@KeySequence("sply_mtrl_oth_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class MaterialOtherDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@TableField("MTRL_NUM")
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField("MTRL_NAME")
|
||||
private String materialName;
|
||||
/**
|
||||
* ERP物料编码
|
||||
*/
|
||||
@TableField("ERP_MTRL_NUM")
|
||||
private String erpMaterialNumber;
|
||||
/**
|
||||
* ERP物料名称
|
||||
*/
|
||||
@TableField("ERP_MTRL_NAME")
|
||||
private String erpMaterialName;
|
||||
/**
|
||||
* ERP物料计量单位
|
||||
*/
|
||||
@TableField("UNT")
|
||||
private String unit;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
@TableField("ABBR")
|
||||
private String abbreviation;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
@TableField("CDG")
|
||||
private String coding;
|
||||
/**
|
||||
* 品位单位
|
||||
*/
|
||||
@TableField("GRD_UNT")
|
||||
private String gradeUnit;
|
||||
/**
|
||||
* 公司编号
|
||||
*/
|
||||
@TableField("COMPANY_ID")
|
||||
private Long companyId;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField("COMPANY_NAME")
|
||||
private String companyName;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
@TableField("DEPT_ID")
|
||||
private Long deptId;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@TableField("DEPT_NAME")
|
||||
private String deptName;
|
||||
/**
|
||||
* 岗位编号
|
||||
*/
|
||||
@TableField("POST_ID")
|
||||
private Long postId;
|
||||
/**
|
||||
* 小数位数
|
||||
*/
|
||||
@TableField("DEC")
|
||||
private Long decimal;
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
@TableField("CREATOR_NAME")
|
||||
private String creatorName;
|
||||
/**
|
||||
* 更新人名称
|
||||
*/
|
||||
@TableField("UPDATER_NAME")
|
||||
private String updaterName;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@TableField("IS_ENB")
|
||||
private String isEnable;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.base;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 仓库 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("sply_wrh")
|
||||
@KeySequence("sply_wrh_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class WarehouseDO extends BaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 工厂编码
|
||||
*/
|
||||
@TableField("FACT_NUM")
|
||||
private String factoryNumber;
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 仓库编码
|
||||
*/
|
||||
@TableField("CDG")
|
||||
private String coding;
|
||||
/**
|
||||
* 公司编号
|
||||
*/
|
||||
@TableField("COMPANY_ID")
|
||||
private Long companyId;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField("COMPANY_NAME")
|
||||
private String companyName;
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
@TableField("DEPT_ID")
|
||||
private Long deptId;
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@TableField("DEPT_NAME")
|
||||
private String deptName;
|
||||
/**
|
||||
* 岗位编号
|
||||
*/
|
||||
@TableField("POST_ID")
|
||||
private Long postId;
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
@TableField("CREATOR_NAME")
|
||||
private String creatorName;
|
||||
/**
|
||||
* 更新人名称
|
||||
*/
|
||||
@TableField("UPDATER_NAME")
|
||||
private String updaterName;
|
||||
/**
|
||||
* 工厂名称
|
||||
*/
|
||||
@TableField("FACT_NAME")
|
||||
private String factoryName;
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@TableField("IS_ENB")
|
||||
private String isEnable;
|
||||
/**
|
||||
* 公司编码
|
||||
*/
|
||||
@TableField("CPN_NUM")
|
||||
private String companyNumber;
|
||||
/**
|
||||
* ERP库位编码
|
||||
*/
|
||||
@TableField("ERP_CDG")
|
||||
private String erpCoding;
|
||||
/**
|
||||
* ERP库位名称
|
||||
*/
|
||||
@TableField("ERP_NAME")
|
||||
private String erpName;
|
||||
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.tmpltp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 部门与实例关联 DO
|
||||
*
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.tmpltp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 模板实例 DO
|
||||
*
|
||||
@@ -68,6 +70,12 @@ public class TemplateInstanceDO extends BusinessBaseDO {
|
||||
* 状态
|
||||
*/
|
||||
private String sts;
|
||||
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private LocalDateTime publishTime;
|
||||
// /**
|
||||
// * 公司编号
|
||||
// */
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.tmpltp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 实例字段值 DO
|
||||
*
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.tmpltp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 实例条款值 DO
|
||||
*
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.tmpltp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import lombok.*;
|
||||
|
||||
@TableName("BSE_TMPL_FLD_REL")
|
||||
@KeySequence("BSE_TMPL_FLD_REL_SEQ")
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.tmpltp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import lombok.*;
|
||||
|
||||
@TableName("BSE_TMPL_ITM")
|
||||
@KeySequence("BSE_TMPL_ITM_SEQ")
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.tmpltp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import lombok.*;
|
||||
|
||||
@TableName("BSE_TMPL_ITM_REL")
|
||||
@KeySequence("BSE_TMPL_ITM_REL_SEQ")
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.tmpltp;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 模板分类 DO
|
||||
*
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package com.zt.plat.module.base.dal.dataobject.tmpltp;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 字段库 DO
|
||||
* 对应数据库表:BIZ_TMPL_TP_FLD
|
||||
* 对应数据库表:BSE_TMPL_TP_FLD
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zt.plat.module.base.dal.mysql.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.AccountDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 账户条款 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface AccountMapper extends BaseMapperX<AccountDO> {
|
||||
|
||||
default PageResult<AccountDO> selectPage(AccountPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<AccountDO>()
|
||||
.eqIfPresent(AccountDO::getType, reqVO.getType())
|
||||
.likeIfPresent(AccountDO::getAccountName, reqVO.getAccountName())
|
||||
.eqIfPresent(AccountDO::getBankAccount, reqVO.getBankAccount())
|
||||
.eqIfPresent(AccountDO::getAccountNumber, reqVO.getAccountNumber())
|
||||
.eqIfPresent(AccountDO::getTaxNumber, reqVO.getTaxNumber())
|
||||
.betweenIfPresent(AccountDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(AccountDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zt.plat.module.base.dal.mysql.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.CompanyRelativityPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.CompanyRelativityDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司关系 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface CompanyRelativityMapper extends BaseMapperX<CompanyRelativityDO> {
|
||||
|
||||
default PageResult<CompanyRelativityDO> selectPage(CompanyRelativityPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<CompanyRelativityDO>()
|
||||
.eqIfPresent(CompanyRelativityDO::getErpNumber, reqVO.getErpNumber())
|
||||
.eqIfPresent(CompanyRelativityDO::getNumber, reqVO.getNumber())
|
||||
.betweenIfPresent(CompanyRelativityDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(CompanyRelativityDO::getId));
|
||||
}
|
||||
|
||||
List<CompanyRelativityDO> getPageByReq(CompanyRelativityPageReqVO pageReqVO);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.zt.plat.module.base.dal.mysql.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ContactPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.ContactDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 联系人信息 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ContactMapper extends BaseMapperX<ContactDO> {
|
||||
|
||||
default PageResult<ContactDO> selectPage(ContactPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ContactDO>()
|
||||
.eqIfPresent(ContactDO::getType, reqVO.getType())
|
||||
.eqIfPresent(ContactDO::getContact, reqVO.getContact())
|
||||
.eqIfPresent(ContactDO::getTel, reqVO.getTel())
|
||||
.eqIfPresent(ContactDO::getEmail, reqVO.getEmail())
|
||||
.eqIfPresent(ContactDO::getFax, reqVO.getFax())
|
||||
.eqIfPresent(ContactDO::getAddress, reqVO.getAddress())
|
||||
.betweenIfPresent(ContactDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(ContactDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zt.plat.module.base.dal.mysql.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ElementPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.ElementDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 金属元素 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ElementMapper extends BaseMapperX<ElementDO> {
|
||||
|
||||
default PageResult<ElementDO> selectPage(ElementPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ElementDO>()
|
||||
.eqIfPresent(ElementDO::getAbbreviation, reqVO.getAbbreviation())
|
||||
.likeIfPresent(ElementDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ElementDO::getCoding, reqVO.getCoding())
|
||||
.eqIfPresent(ElementDO::getGradeUnit, reqVO.getGradeUnit())
|
||||
.betweenIfPresent(ElementDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(ElementDO::getId));
|
||||
}
|
||||
|
||||
String selectMaxCode();
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.zt.plat.module.base.dal.mysql.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.FactoryPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.FactoryDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 工厂 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface FactoryMapper extends BaseMapperX<FactoryDO> {
|
||||
|
||||
default PageResult<FactoryDO> selectPage(FactoryPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<FactoryDO>()
|
||||
.eqIfPresent(FactoryDO::getCompanyNumber, reqVO.getCompanyNumber())
|
||||
.likeIfPresent(FactoryDO::getName, reqVO.getName())
|
||||
.eqIfPresent(FactoryDO::getNumber, reqVO.getNumber())
|
||||
.betweenIfPresent(FactoryDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(FactoryDO::getIsEnable, reqVO.getIsEnable())
|
||||
.likeIfPresent(FactoryDO::getErpName, reqVO.getErpName())
|
||||
.eqIfPresent(FactoryDO::getErpNumber, reqVO.getErpNumber())
|
||||
.orderByDesc(FactoryDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.zt.plat.module.base.dal.mysql.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialDestroyPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialDestroyDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 物料回收率 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface MaterialDestroyMapper extends BaseMapperX<MaterialDestroyDO> {
|
||||
|
||||
default PageResult<MaterialDestroyDO> selectPage(MaterialDestroyPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<MaterialDestroyDO>()
|
||||
.eqIfPresent(MaterialDestroyDO::getUpNumber, reqVO.getUpNumber())
|
||||
.eqIfPresent(MaterialDestroyDO::getDownNumber, reqVO.getDownNumber())
|
||||
.eqIfPresent(MaterialDestroyDO::getRatio, reqVO.getRatio())
|
||||
.eqIfPresent(MaterialDestroyDO::getOperation, reqVO.getOperation())
|
||||
.betweenIfPresent(MaterialDestroyDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(MaterialDestroyDO::getSupplierNumber, reqVO.getSupplierNumber())
|
||||
.likeIfPresent(MaterialDestroyDO::getSupplierName, reqVO.getSupplierName())
|
||||
.eqIfPresent(MaterialDestroyDO::getIsEnable, reqVO.getIsEnable())
|
||||
.orderByDesc(MaterialDestroyDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.zt.plat.module.base.dal.mysql.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialInfomationDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 物料信息 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface MaterialInfomationMapper extends BaseMapperX<MaterialInfomationDO> {
|
||||
|
||||
default PageResult<MaterialInfomationDO> selectPage(MaterialInfomationPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<MaterialInfomationDO>()
|
||||
.eqIfPresent(MaterialInfomationDO::getCode, reqVO.getCode())
|
||||
.likeIfPresent(MaterialInfomationDO::getName, reqVO.getName())
|
||||
.eqIfPresent(MaterialInfomationDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(MaterialInfomationDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(MaterialInfomationDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zt.plat.module.base.dal.mysql.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialOtherPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialOtherDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 物料拓展数据 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface MaterialOtherMapper extends BaseMapperX<MaterialOtherDO> {
|
||||
|
||||
default PageResult<MaterialOtherDO> selectPage(MaterialOtherPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<MaterialOtherDO>()
|
||||
.eqIfPresent(MaterialOtherDO::getMaterialNumber, reqVO.getMaterialNumber())
|
||||
.likeIfPresent(MaterialOtherDO::getMaterialName, reqVO.getMaterialName())
|
||||
.eqIfPresent(MaterialOtherDO::getErpMaterialNumber, reqVO.getErpMaterialNumber())
|
||||
.likeIfPresent(MaterialOtherDO::getErpMaterialName, reqVO.getErpMaterialName())
|
||||
.eqIfPresent(MaterialOtherDO::getUnit, reqVO.getUnit())
|
||||
.eqIfPresent(MaterialOtherDO::getAbbreviation, reqVO.getAbbreviation())
|
||||
.likeIfPresent(MaterialOtherDO::getName, reqVO.getName())
|
||||
.eqIfPresent(MaterialOtherDO::getCoding, reqVO.getCoding())
|
||||
.eqIfPresent(MaterialOtherDO::getGradeUnit, reqVO.getGradeUnit())
|
||||
.betweenIfPresent(MaterialOtherDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(MaterialOtherDO::getDecimal, reqVO.getDecimal())
|
||||
.eqIfPresent(MaterialOtherDO::getIsEnable, reqVO.getIsEnable())
|
||||
.orderByDesc(MaterialOtherDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.base.dal.mysql.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.WarehousePageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.WarehouseDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 仓库 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface WarehouseMapper extends BaseMapperX<WarehouseDO> {
|
||||
|
||||
default PageResult<WarehouseDO> selectPage(WarehousePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<WarehouseDO>()
|
||||
.eqIfPresent(WarehouseDO::getFactoryNumber, reqVO.getFactoryNumber())
|
||||
.likeIfPresent(WarehouseDO::getName, reqVO.getName())
|
||||
.eqIfPresent(WarehouseDO::getCoding, reqVO.getCoding())
|
||||
.betweenIfPresent(WarehouseDO::getCreateTime, reqVO.getCreateTime())
|
||||
.likeIfPresent(WarehouseDO::getFactoryName, reqVO.getFactoryName())
|
||||
.eqIfPresent(WarehouseDO::getIsEnable, reqVO.getIsEnable())
|
||||
.eqIfPresent(WarehouseDO::getCompanyNumber, reqVO.getCompanyNumber())
|
||||
.eqIfPresent(WarehouseDO::getErpCoding, reqVO.getErpCoding())
|
||||
.likeIfPresent(WarehouseDO::getErpName, reqVO.getErpName())
|
||||
.orderByDesc(WarehouseDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
package com.zt.plat.module.base.dal.mysql.tmpltp;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.DepartmentInstanceRelativityPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.tmpltp.DepartmentInstanceRelativityDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package com.zt.plat.module.base.dal.mysql.tmpltp;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceDataPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.tmpltp.TemplateInstanceDataDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package com.zt.plat.module.base.dal.mysql.tmpltp;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstanceItemPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.tmpltp.TemplateInstanceItemDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
package com.zt.plat.module.base.dal.mysql.tmpltp;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TemplateInstancePageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.tmpltp.TemplateInstanceDO;
|
||||
import com.zt.plat.module.tmpltp.enums.TmplStsEnum;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
@@ -33,5 +31,20 @@ public interface TemplateInstanceMapper extends BaseMapperX<TemplateInstanceDO>
|
||||
.betweenIfPresent(TemplateInstanceDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(TemplateInstanceDO::getId));
|
||||
}
|
||||
default PageResult<TemplateInstanceDO> listExcludingDisabled(TemplateInstancePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<TemplateInstanceDO>()
|
||||
.eqIfPresent(TemplateInstanceDO::getTpId, reqVO.getTpId())
|
||||
.likeIfPresent(TemplateInstanceDO::getName, reqVO.getName())
|
||||
.eqIfPresent(TemplateInstanceDO::getCdg, reqVO.getCdg())
|
||||
.eqIfPresent(TemplateInstanceDO::getDsp, reqVO.getDsp())
|
||||
.eqIfPresent(TemplateInstanceDO::getCntt, reqVO.getCntt())
|
||||
.eqIfPresent(TemplateInstanceDO::getOrigCntt, reqVO.getOrigCntt())
|
||||
.eqIfPresent(TemplateInstanceDO::getFileTp, reqVO.getFileTp())
|
||||
.eqIfPresent(TemplateInstanceDO::getVer, reqVO.getVer())
|
||||
.eqIfPresent(TemplateInstanceDO::getSts, reqVO.getSts())
|
||||
.betweenIfPresent(TemplateInstanceDO::getCreateTime, reqVO.getCreateTime())
|
||||
.ne(TemplateInstanceDO::getSts, TmplStsEnum.STOPPED.getCode()) // 不包含停用状态(不等于停用状态)
|
||||
.orderByDesc(TemplateInstanceDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.zt.plat.module.base.dal.mysql.tmpltp;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import com.zt.plat.module.base.dal.dataobject.tmpltp.TmplFldRelDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.zt.plat.module.base.dal.mysql.tmpltp;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TmpItmPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.tmpltp.TmplItmDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.zt.plat.module.base.dal.mysql.tmpltp;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import com.zt.plat.module.base.dal.dataobject.tmpltp.TmplItmRelDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.zt.plat.module.base.dal.mysql.tmpltp;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplFldPageReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.tmpltp.TmplTpFldDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package com.zt.plat.module.base.dal.mysql.tmpltp;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplFldRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplItmRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplTpPageReqVO;
|
||||
@@ -12,10 +10,8 @@ import com.zt.plat.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;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.AccountDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 账户条款 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface AccountService {
|
||||
|
||||
/**
|
||||
* 创建账户条款
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
AccountRespVO createAccount(@Valid AccountSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新账户条款
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateAccount(@Valid AccountSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除账户条款
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteAccount(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除账户条款
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteAccountListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得账户条款
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 账户条款
|
||||
*/
|
||||
AccountDO getAccount(Long id);
|
||||
|
||||
/**
|
||||
* 获得账户条款分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 账户条款分页
|
||||
*/
|
||||
PageResult<AccountDO> getAccountPage(AccountPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.AccountDO;
|
||||
import com.zt.plat.module.base.dal.mysql.base.AccountMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.base.enums.ErrorCodeConstants.ACCOUNT_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 账户条款 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class AccountServiceImpl implements AccountService {
|
||||
|
||||
@Resource
|
||||
private AccountMapper accountMapper;
|
||||
|
||||
@Override
|
||||
public AccountRespVO createAccount(AccountSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
AccountDO account = BeanUtils.toBean(createReqVO, AccountDO.class);
|
||||
accountMapper.insert(account);
|
||||
// 返回
|
||||
return BeanUtils.toBean(account, AccountRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAccount(AccountSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateAccountExists(updateReqVO.getId());
|
||||
// 更新
|
||||
AccountDO updateObj = BeanUtils.toBean(updateReqVO, AccountDO.class);
|
||||
accountMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAccount(Long id) {
|
||||
// 校验存在
|
||||
validateAccountExists(id);
|
||||
// 删除
|
||||
accountMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAccountListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateAccountExists(ids);
|
||||
// 删除
|
||||
accountMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateAccountExists(List<Long> ids) {
|
||||
List<AccountDO> list = accountMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(ACCOUNT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateAccountExists(Long id) {
|
||||
if (accountMapper.selectById(id) == null) {
|
||||
throw exception(ACCOUNT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountDO getAccount(Long id) {
|
||||
return accountMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<AccountDO> getAccountPage(AccountPageReqVO pageReqVO) {
|
||||
return accountMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.CompanyRelativityPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.CompanyRelativityRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.CompanyRelativitySaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.CompanyRelativityDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司关系 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface CompanyRelativityService {
|
||||
|
||||
/**
|
||||
* 创建公司关系
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
CompanyRelativityRespVO createCompanyRelativity(@Valid CompanyRelativitySaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新公司关系
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateCompanyRelativity(@Valid CompanyRelativitySaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除公司关系
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteCompanyRelativity(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除公司关系
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteCompanyRelativityListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得公司关系
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 公司关系
|
||||
*/
|
||||
CompanyRelativityDO getCompanyRelativity(Long id);
|
||||
|
||||
/**
|
||||
* 获得公司关系分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 公司关系分页
|
||||
*/
|
||||
PageResult<CompanyRelativityDO> getCompanyRelativityPage(CompanyRelativityPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.CompanyRelativityPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.CompanyRelativityRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.CompanyRelativitySaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.CompanyRelativityDO;
|
||||
import com.zt.plat.module.base.dal.mysql.base.CompanyRelativityMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.base.enums.ErrorCodeConstants.COMPANY_RELATIVITY_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 公司关系 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class CompanyRelativityServiceImpl implements CompanyRelativityService {
|
||||
|
||||
@Resource
|
||||
private CompanyRelativityMapper companyRelativityMapper;
|
||||
|
||||
@Override
|
||||
public CompanyRelativityRespVO createCompanyRelativity(CompanyRelativitySaveReqVO createReqVO) {
|
||||
// 插入
|
||||
CompanyRelativityDO companyRelativity = BeanUtils.toBean(createReqVO, CompanyRelativityDO.class);
|
||||
companyRelativityMapper.insert(companyRelativity);
|
||||
// 返回
|
||||
return BeanUtils.toBean(companyRelativity, CompanyRelativityRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateCompanyRelativity(CompanyRelativitySaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateCompanyRelativityExists(updateReqVO.getId());
|
||||
// 更新
|
||||
CompanyRelativityDO updateObj = BeanUtils.toBean(updateReqVO, CompanyRelativityDO.class);
|
||||
companyRelativityMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteCompanyRelativity(Long id) {
|
||||
// 校验存在
|
||||
validateCompanyRelativityExists(id);
|
||||
// 删除
|
||||
companyRelativityMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteCompanyRelativityListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateCompanyRelativityExists(ids);
|
||||
// 删除
|
||||
companyRelativityMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateCompanyRelativityExists(List<Long> ids) {
|
||||
List<CompanyRelativityDO> list = companyRelativityMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(COMPANY_RELATIVITY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateCompanyRelativityExists(Long id) {
|
||||
if (companyRelativityMapper.selectById(id) == null) {
|
||||
throw exception(COMPANY_RELATIVITY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompanyRelativityDO getCompanyRelativity(Long id) {
|
||||
return companyRelativityMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<CompanyRelativityDO> getCompanyRelativityPage(CompanyRelativityPageReqVO pageReqVO) {
|
||||
List<CompanyRelativityDO> list = companyRelativityMapper.getPageByReq(pageReqVO);
|
||||
if (list == null) {
|
||||
list = CollUtil.newArrayList();
|
||||
}
|
||||
return new PageResult<>(list, (long) list.size());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ContactPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ContactRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ContactSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.ContactDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 联系人信息 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ContactService {
|
||||
|
||||
/**
|
||||
* 创建联系人信息
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ContactRespVO createContact(@Valid ContactSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新联系人信息
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateContact(@Valid ContactSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除联系人信息
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteContact(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除联系人信息
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteContactListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得联系人信息
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 联系人信息
|
||||
*/
|
||||
ContactDO getContact(Long id);
|
||||
|
||||
/**
|
||||
* 获得联系人信息分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 联系人信息分页
|
||||
*/
|
||||
PageResult<ContactDO> getContactPage(ContactPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ContactPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ContactRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ContactSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.ContactDO;
|
||||
import com.zt.plat.module.base.dal.mysql.base.ContactMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.base.enums.ErrorCodeConstants.CONTACT_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 联系人信息 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ContactServiceImpl implements ContactService {
|
||||
|
||||
@Resource
|
||||
private ContactMapper contactMapper;
|
||||
|
||||
@Override
|
||||
public ContactRespVO createContact(ContactSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ContactDO contact = BeanUtils.toBean(createReqVO, ContactDO.class);
|
||||
contactMapper.insert(contact);
|
||||
// 返回
|
||||
return BeanUtils.toBean(contact, ContactRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateContact(ContactSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateContactExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ContactDO updateObj = BeanUtils.toBean(updateReqVO, ContactDO.class);
|
||||
contactMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteContact(Long id) {
|
||||
// 校验存在
|
||||
validateContactExists(id);
|
||||
// 删除
|
||||
contactMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteContactListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateContactExists(ids);
|
||||
// 删除
|
||||
contactMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateContactExists(List<Long> ids) {
|
||||
List<ContactDO> list = contactMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(CONTACT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateContactExists(Long id) {
|
||||
if (contactMapper.selectById(id) == null) {
|
||||
throw exception(CONTACT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContactDO getContact(Long id) {
|
||||
return contactMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ContactDO> getContactPage(ContactPageReqVO pageReqVO) {
|
||||
return contactMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ElementPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ElementRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ElementSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.ElementDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 金属元素 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface ElementService {
|
||||
|
||||
/**
|
||||
* 创建金属元素
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
ElementRespVO createElement(@Valid ElementSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新金属元素
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateElement(@Valid ElementSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除金属元素
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteElement(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除金属元素
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteElementListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得金属元素
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 金属元素
|
||||
*/
|
||||
ElementDO getElement(Long id);
|
||||
|
||||
/**
|
||||
* 获得金属元素分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 金属元素分页
|
||||
*/
|
||||
PageResult<ElementDO> getElementPage(ElementPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ElementPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ElementRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.ElementSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.ElementDO;
|
||||
import com.zt.plat.module.base.dal.mysql.base.ElementMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.base.enums.ErrorCodeConstants.ELEMENT_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 金属元素 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class ElementServiceImpl implements ElementService {
|
||||
|
||||
@Resource
|
||||
private ElementMapper elementMapper;
|
||||
|
||||
@Override
|
||||
public ElementRespVO createElement(ElementSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ElementDO element = BeanUtils.toBean(createReqVO, ElementDO.class);
|
||||
//金属编码自动生成,格式 JSYS-00001,依次新增
|
||||
String maxCode = elementMapper.selectMaxCode();
|
||||
if (maxCode == null) {
|
||||
element.setCoding("JSYS-00001");
|
||||
} else {
|
||||
String prefix = "JSYS-";
|
||||
String numberPart = maxCode.substring(prefix.length());
|
||||
int nextNumber = Integer.parseInt(numberPart) + 1;
|
||||
String nextCode = prefix + String.format("%05d", nextNumber);
|
||||
element.setCoding(nextCode);
|
||||
}
|
||||
elementMapper.insert(element);
|
||||
// 返回
|
||||
return BeanUtils.toBean(element, ElementRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateElement(ElementSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateElementExists(updateReqVO.getId());
|
||||
// 更新
|
||||
ElementDO updateObj = BeanUtils.toBean(updateReqVO, ElementDO.class);
|
||||
elementMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteElement(Long id) {
|
||||
// 校验存在
|
||||
validateElementExists(id);
|
||||
// 删除
|
||||
elementMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteElementListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateElementExists(ids);
|
||||
// 删除
|
||||
elementMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateElementExists(List<Long> ids) {
|
||||
List<ElementDO> list = elementMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(ELEMENT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateElementExists(Long id) {
|
||||
if (elementMapper.selectById(id) == null) {
|
||||
throw exception(ELEMENT_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ElementDO getElement(Long id) {
|
||||
return elementMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ElementDO> getElementPage(ElementPageReqVO pageReqVO) {
|
||||
return elementMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.FactoryPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.FactoryRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.FactorySaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.FactoryDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工厂 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface FactoryService {
|
||||
|
||||
/**
|
||||
* 创建工厂
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
FactoryRespVO createFactory(@Valid FactorySaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新工厂
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateFactory(@Valid FactorySaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除工厂
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteFactory(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除工厂
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteFactoryListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得工厂
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 工厂
|
||||
*/
|
||||
FactoryDO getFactory(Long id);
|
||||
|
||||
/**
|
||||
* 获得工厂分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 工厂分页
|
||||
*/
|
||||
PageResult<FactoryDO> getFactoryPage(FactoryPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.FactoryPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.FactoryRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.FactorySaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.FactoryDO;
|
||||
import com.zt.plat.module.base.dal.mysql.base.FactoryMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.base.enums.ErrorCodeConstants.FACTORY_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 工厂 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class FactoryServiceImpl implements FactoryService {
|
||||
|
||||
@Resource
|
||||
private FactoryMapper factoryMapper;
|
||||
|
||||
@Override
|
||||
public FactoryRespVO createFactory(FactorySaveReqVO createReqVO) {
|
||||
// 插入
|
||||
FactoryDO factory = BeanUtils.toBean(createReqVO, FactoryDO.class);
|
||||
factoryMapper.insert(factory);
|
||||
// 返回
|
||||
return BeanUtils.toBean(factory, FactoryRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFactory(FactorySaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateFactoryExists(updateReqVO.getId());
|
||||
// 更新
|
||||
FactoryDO updateObj = BeanUtils.toBean(updateReqVO, FactoryDO.class);
|
||||
factoryMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteFactory(Long id) {
|
||||
// 校验存在
|
||||
validateFactoryExists(id);
|
||||
// 删除
|
||||
factoryMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteFactoryListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateFactoryExists(ids);
|
||||
// 删除
|
||||
factoryMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateFactoryExists(List<Long> ids) {
|
||||
List<FactoryDO> list = factoryMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(FACTORY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateFactoryExists(Long id) {
|
||||
if (factoryMapper.selectById(id) == null) {
|
||||
throw exception(FACTORY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FactoryDO getFactory(Long id) {
|
||||
return factoryMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<FactoryDO> getFactoryPage(FactoryPageReqVO pageReqVO) {
|
||||
return factoryMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialDestroyPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialDestroyRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialDestroySaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialDestroyDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料回收率 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface MaterialDestroyService {
|
||||
|
||||
/**
|
||||
* 创建物料回收率
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
MaterialDestroyRespVO createMaterialDestroy(@Valid MaterialDestroySaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新物料回收率
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateMaterialDestroy(@Valid MaterialDestroySaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除物料回收率
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteMaterialDestroy(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除物料回收率
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteMaterialDestroyListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得物料回收率
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 物料回收率
|
||||
*/
|
||||
MaterialDestroyDO getMaterialDestroy(Long id);
|
||||
|
||||
/**
|
||||
* 获得物料回收率分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 物料回收率分页
|
||||
*/
|
||||
PageResult<MaterialDestroyDO> getMaterialDestroyPage(MaterialDestroyPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialDestroyPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialDestroyRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialDestroySaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialDestroyDO;
|
||||
import com.zt.plat.module.base.dal.mysql.base.MaterialDestroyMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.base.enums.ErrorCodeConstants.MATERIAL_DESTROY_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 物料回收率 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class MaterialDestroyServiceImpl implements MaterialDestroyService {
|
||||
|
||||
@Resource
|
||||
private MaterialDestroyMapper materialDestroyMapper;
|
||||
|
||||
@Override
|
||||
public MaterialDestroyRespVO createMaterialDestroy(MaterialDestroySaveReqVO createReqVO) {
|
||||
// 插入
|
||||
MaterialDestroyDO materialDestroy = BeanUtils.toBean(createReqVO, MaterialDestroyDO.class);
|
||||
materialDestroyMapper.insert(materialDestroy);
|
||||
// 返回
|
||||
return BeanUtils.toBean(materialDestroy, MaterialDestroyRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMaterialDestroy(MaterialDestroySaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateMaterialDestroyExists(updateReqVO.getId());
|
||||
// 更新
|
||||
MaterialDestroyDO updateObj = BeanUtils.toBean(updateReqVO, MaterialDestroyDO.class);
|
||||
materialDestroyMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteMaterialDestroy(Long id) {
|
||||
// 校验存在
|
||||
validateMaterialDestroyExists(id);
|
||||
// 删除
|
||||
materialDestroyMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteMaterialDestroyListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateMaterialDestroyExists(ids);
|
||||
// 删除
|
||||
materialDestroyMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateMaterialDestroyExists(List<Long> ids) {
|
||||
List<MaterialDestroyDO> list = materialDestroyMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(MATERIAL_DESTROY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateMaterialDestroyExists(Long id) {
|
||||
if (materialDestroyMapper.selectById(id) == null) {
|
||||
throw exception(MATERIAL_DESTROY_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaterialDestroyDO getMaterialDestroy(Long id) {
|
||||
return materialDestroyMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<MaterialDestroyDO> getMaterialDestroyPage(MaterialDestroyPageReqVO pageReqVO) {
|
||||
return materialDestroyMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.MaterialInfomationSaveReqVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.MaterialInfomationDO;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料信息 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface MaterialInfomationService {
|
||||
|
||||
/**
|
||||
* 创建物料信息
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
MaterialInfomationRespVO createMaterialInfomation(@Valid MaterialInfomationSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新物料信息
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateMaterialInfomation(@Valid MaterialInfomationSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除物料信息
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteMaterialInfomation(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除物料信息
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteMaterialInfomationListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得物料信息
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 物料信息
|
||||
*/
|
||||
MaterialInfomationDO getMaterialInfomation(Long id);
|
||||
|
||||
/**
|
||||
* 获得物料信息分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 物料信息分页
|
||||
*/
|
||||
PageResult<MaterialInfomationDO> getMaterialInfomationPage(MaterialInfomationPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user