erp公司、物料、客商定时任务接口

This commit is contained in:
liss
2025-09-18 16:28:47 +08:00
parent 65249fe9d4
commit ee18a70745
18 changed files with 770 additions and 111 deletions

View File

@@ -13,32 +13,60 @@ public class OftenEnum {
//接口编号枚举 //接口编号枚举
public enum FuncnrEnum { public enum FuncnrEnum {
公司代码("001"), 公司代码("001", "BUKRS", ""),
工厂信息("002"), 工厂信息("002", "", ""),
客商信息("003"), 客商信息("003", "PARTNER", "DATUM"),
成本中心("004"), 成本中心("004", "", ""),
内部订单("005"), 内部订单("005", "", ""),
库位信息("006"), 库位信息("006", "", ""),
采购组织("007"), 采购组织("007", "", ""),
销售组织("008"), 销售组织("008", "", ""),
合同信息("009"), 合同信息("009", "", ""),
资产卡片("010"), 资产卡片("010", "", ""),
库存信息("011"), 库存信息("011", "", ""),
辅组编码("012"), 辅组编码("012", "", ""),
生产订单("013"), 生产订单("013", "", ""),
BOM清单("014"), BOM清单("014", "", ""),
工艺路线("015"), 工艺路线("015", "", ""),
生产版本("016"), 生产版本("016", "", ""),
生产投料("017"), 生产投料("017", "", ""),
生产订单明细("018"), 生产订单明细("018", "", ""),
库存明细("019"), 库存明细("019", "", ""),
发票状态("020"), 发票状态("020", "", ""),
物料数据("021"); 物料数据("021", "", "ERSDA");
public String funcnr = null; private final String funcnr;
private final String datakey;
private final String datekey;
FuncnrEnum(String funcnr) { FuncnrEnum(String funcnr, String datakey,String datekey) {
this.funcnr = funcnr; this.funcnr = funcnr;
this.datakey = datakey;
this.datekey = datekey;
}
public String getFuncnr() {
return funcnr;
}
public String getDatakey() {
return datakey;
}
public String getDatekey() {
return datekey;
}
}
//接口编号枚举
public enum ModeTypeEnum {
供应商("K"),
客户("D");
public String modetype = null;
ModeTypeEnum(String modetype) {
this.modetype = modetype;
} }
} }
} }

View File

@@ -15,7 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
**/ **/
@Configuration @Configuration
@EnableScheduling @EnableScheduling
public class statisticsTask { public class statisticstask {
@Resource @Resource
private ErpCompanyService erpCompanyService; private ErpCompanyService erpCompanyService;

View File

@@ -104,4 +104,18 @@ public class ErpCustomerController {
BeanUtils.toBean(list, ErpCustomerRespVO.class)); BeanUtils.toBean(list, ErpCustomerRespVO.class));
} }
@PostMapping("/getErpCustomerTask")
@Operation(summary = "定时获得erp更新客商主数据")
@PreAuthorize("@ss.hasPermission('sply:erp-customer:create')")
public void getErpCustomerTask() {
erpCustomerService.callErpRfcInterface();
}
@PostMapping("/initialize")
@Operation(summary = "把数据库数据number搞到redis")
@PreAuthorize("@ss.hasPermission('sply:erp-customer:create')")
public void initialize() {
erpCustomerService.initialize();
}
} }

View File

@@ -104,4 +104,18 @@ public class ErpMaterialController {
BeanUtils.toBean(list, ErpMaterialRespVO.class)); BeanUtils.toBean(list, ErpMaterialRespVO.class));
} }
@PostMapping("/callErpRfcInterface")
@Operation(summary = "定时获得erp更新公司")
@PreAuthorize("@ss.hasPermission('sply:erp-material:create')")
public void callErpRfcInterface() {
erpMaterialService.callErpRfcInterface();
}
@PostMapping("/initialize")
@Operation(summary = "把数据库数据number搞到redis")
@PreAuthorize("@ss.hasPermission('sply:erp-material:create')")
public void initialize() {
erpMaterialService.initialize();
}
} }

View File

@@ -41,7 +41,4 @@ public class ErpCustomerPageReqVO extends PageParam {
@Schema(description = "冻结标识") @Schema(description = "冻结标识")
private String isProvisional; private String isProvisional;
@Schema(description = "类型", example = "2")
private String type;
} }

View File

@@ -51,8 +51,4 @@ public class ErpCustomerRespVO {
@ExcelProperty("冻结标识") @ExcelProperty("冻结标识")
private String isProvisional; private String isProvisional;
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("类型")
private String type;
} }

View File

@@ -45,8 +45,4 @@ public class ErpCustomerSaveReqVO {
@Schema(description = "冻结标识") @Schema(description = "冻结标识")
private String isProvisional; private String isProvisional;
@Schema(description = "类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotEmpty(message = "类型不能为空")
private String type;
} }

View File

@@ -12,7 +12,8 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
@TableName("sply_erp_cpn") @TableName("sply_erp_cpn")
@KeySequence("sply_erp_cpn_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @KeySequence("sply_erp_cpn_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data @Data
@EqualsAndHashCode(callSuper = true) //@EqualsAndHashCode(callSuper = true)
@EqualsAndHashCode
@ToString(callSuper = true) @ToString(callSuper = true)
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@@ -20,9 +21,8 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/** /**
* 支持业务基类继承isBusiness=true 时继承 BusinessBaseDO否则继承 BaseDO * 支持业务基类继承isBusiness=true 时继承 BusinessBaseDO否则继承 BaseDO
*/ */
public class ErpCompanyDO extends BaseDO { //public class ErpCompanyDO extends BaseDO {
public class ErpCompanyDO{
/** /**
* 主键 * 主键
@@ -45,4 +45,7 @@ public class ErpCompanyDO extends BaseDO {
@TableField("CUR") @TableField("CUR")
private String currency; private String currency;
@TableField(exist = false)
private Integer TENANT_ID;
} }

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