erp公司、物料、客商代码生成

This commit is contained in:
liss
2025-09-17 09:22:40 +08:00
parent d18a6463b2
commit 017468603c
39 changed files with 2146 additions and 38 deletions

View File

@@ -0,0 +1,11 @@
package cn.iocoder.yudao.module.erp.enums;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;// TODO 待办:请将下面的错误码复制到 yudao-module-sply 模块的 ErrorCodeConstants 类中。注意请给“TODO 补充编号”设置一个错误码编号!!!
// ========== ERP客商主数据 TODO 补充编号 ==========
public interface ErrorCodeConstants {
// ========== 示例模块 1-001-000-000 ==========
ErrorCode ERP_CUSTOMER_NOT_EXISTS = new ErrorCode(1_001_000_001, "ERP客商主数据不存在");
ErrorCode ERP_MATERIAL_NOT_EXISTS = new ErrorCode(1_001_000_002, "ERP物料数据不存在");
ErrorCode ERP_COMPANY_NOT_EXISTS = new ErrorCode(1_001_000_003, "ERP物料数据不存在");
}

View File

@@ -0,0 +1,18 @@
package cn.iocoder.yudao.module.erp;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* ContractOrder 模块的启动类
*
* @author ZT
*/
//@SpringBootApplication
public class ErpServerApplication {
public static void main(String[] args) {
SpringApplication.run(ErpServerApplication.class, args);
}
}

View File

@@ -0,0 +1,44 @@
package cn.iocoder.yudao.module.erp.common.enums;
import lombok.Data;
/**
* @ClassName oftenEnum
* @Description TODO
* @Author chen
* @Date 2023/9/5
**/
@Data
public class OftenEnum {
//接口编号枚举
public enum FuncnrEnum {
公司代码("001"),
工厂信息("002"),
客商信息("003"),
成本中心("004"),
内部订单("005"),
库位信息("006"),
采购组织("007"),
销售组织("008"),
合同信息("009"),
资产卡片("010"),
库存信息("011"),
辅组编码("012"),
生产订单("013"),
BOM清单("014"),
工艺路线("015"),
生产版本("016"),
生产投料("017"),
生产订单明细("018"),
库存明细("019"),
发票状态("020"),
物料数据("021");
public String funcnr = null;
FuncnrEnum(String funcnr) {
this.funcnr = funcnr;
}
}
}

View File

@@ -0,0 +1,32 @@
package cn.iocoder.yudao.module.erp.common.task;
import cn.iocoder.yudao.module.erp.service.erp.ErpCompanyService;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.transaction.annotation.Transactional;
/**
* @ClassName energyTask
* @Description TODO
* @Author chen
* @Date 2023/9/25
**/
@Configuration
@EnableScheduling
public class statisticsTask {
@Resource
private ErpCompanyService erpCompanyService;
//能源定时每日获取成本配置机台水电数据
@Scheduled(cron = "0 0 12 * * ?")
@Transactional
public void erpCompany(){
erpCompanyService.callErpRfcInterface();
}
}

View File

@@ -1,35 +0,0 @@
package cn.iocoder.yudao.module.erp.controller.admin.erp;
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 cn.iocoder.yudao.framework.common.pojo.CommonResult;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
/**
* ERP 控制器
*
* @author ERP Module
*/
@Tag(name = "管理后台 - ERP")
@RestController
@RequestMapping("/admin/erp/erp")
public class ErpController {
@GetMapping("/hello")
@Operation(summary = "Hello ERP")
public CommonResult<String> hello() {
return success("Hello, ERP!");
}
@GetMapping("/info")
@Operation(summary = "ERP 模块信息")
public CommonResult<String> info() {
return success("ERP 模块已成功创建并运行");
}
}

View File

@@ -0,0 +1,21 @@
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
@Schema(description = "管理后台 - ERP公司分页 Request VO")
@Data
public class ErpCompanyPageReqVO extends PageParam {
@Schema(description = "公司名称", example = "王五")
private String name;
@Schema(description = "公司编码;唯一")
private String number;
@Schema(description = "本位币")
private String currency;
}

View File

@@ -0,0 +1,29 @@
package cn.iocoder.yudao.module.erp.controller.admin.erp.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - ERP公司 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ErpCompanyRespVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4807")
@ExcelProperty("主键")
private Long id;
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
@ExcelProperty("公司名称")
private String name;
@Schema(description = "公司编码;唯一", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("公司编码;唯一")
private String number;
@Schema(description = "本位币", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("本位币")
private String currency;
}

Some files were not shown because too many files have changed in this diff Show More