Merge remote-tracking branch 'origin/dev' into test
This commit is contained in:
@@ -37,14 +37,20 @@ spring:
|
|||||||
primary: master
|
primary: master
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||||
|
#username: SYSDBA
|
||||||
|
#password: pgbsci6ddJ6Sqj@e
|
||||||
|
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||||
username: SYSDBA
|
username: SYSDBA
|
||||||
password: pgbsci6ddJ6Sqj@e
|
password: P@ssword25
|
||||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||||
|
#username: SYSDBA
|
||||||
|
#password: pgbsci6ddJ6Sqj@e
|
||||||
|
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||||
username: SYSDBA
|
username: SYSDBA
|
||||||
password: pgbsci6ddJ6Sqj@e
|
password: P@ssword25
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -39,14 +39,20 @@ spring:
|
|||||||
primary: master
|
primary: master
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||||
|
#username: SYSDBA
|
||||||
|
#password: pgbsci6ddJ6Sqj@e
|
||||||
|
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||||
username: SYSDBA
|
username: SYSDBA
|
||||||
password: pgbsci6ddJ6Sqj@e
|
password: P@ssword25
|
||||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||||
|
#username: SYSDBA
|
||||||
|
#password: pgbsci6ddJ6Sqj@e
|
||||||
|
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||||
username: SYSDBA
|
username: SYSDBA
|
||||||
password: pgbsci6ddJ6Sqj@e
|
password: P@ssword25
|
||||||
|
|
||||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.zt.plat.module.api;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.module.api.dto.internalsupplyfactory.InternalSupplyFactoryDTO;
|
||||||
|
import com.zt.plat.module.base.enums.ApiConstants;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@FeignClient(name = ApiConstants.NAME)
|
||||||
|
@Tag(name = "RPC 服务 - base")
|
||||||
|
public interface InternalSupplyFactoryApi {
|
||||||
|
String PREFIX = ApiConstants.PREFIX + "/internal-supply-factory";
|
||||||
|
//批量创建
|
||||||
|
@PostMapping(PREFIX + "/batch-create")
|
||||||
|
CommonResult<List<InternalSupplyFactoryDTO>> batchCreate(@Valid @RequestBody List<InternalSupplyFactoryDTO> reqVO);
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.zt.plat.module.api.dto.internalsupplyfactory;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 内部工厂新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class InternalSupplyFactoryDTO {
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9235")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "工厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||||
|
@NotEmpty(message = "工厂名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "工厂编码不能为空")
|
||||||
|
private String number;
|
||||||
|
|
||||||
|
@Schema(description = "公司编号")
|
||||||
|
private String erpCompanyNumber;
|
||||||
|
|
||||||
|
@Schema(description = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Schema(description = "绑定工厂名")
|
||||||
|
private String relName;
|
||||||
|
|
||||||
|
@Schema(description = "绑定工厂编码")
|
||||||
|
private String relnumber;
|
||||||
|
|
||||||
|
@Schema(description = "是否启用")
|
||||||
|
private String isEnable;
|
||||||
|
|
||||||
|
@Schema(description = "操作类型")
|
||||||
|
private String operationType;
|
||||||
|
|
||||||
|
@Schema(description = "公司名称-业务")
|
||||||
|
private String erpCompanyName;
|
||||||
|
}
|
||||||
@@ -34,6 +34,9 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode TMPL_INSC_DAT_BSN_NOT_EXISTS = new ErrorCode(1_027_000_530, "业务实例字段不存在");
|
ErrorCode TMPL_INSC_DAT_BSN_NOT_EXISTS = new ErrorCode(1_027_000_530, "业务实例字段不存在");
|
||||||
ErrorCode TMPL_INSC_ITM_BSN_EXISTS = new ErrorCode(1_027_000_540, "业务实例条款已存在");
|
ErrorCode TMPL_INSC_ITM_BSN_EXISTS = new ErrorCode(1_027_000_540, "业务实例条款已存在");
|
||||||
ErrorCode TMPL_INSC_DAT_BSN_EXISTS = new ErrorCode(1_027_000_541, "业务实例字段已存在");
|
ErrorCode TMPL_INSC_DAT_BSN_EXISTS = new ErrorCode(1_027_000_541, "业务实例字段已存在");
|
||||||
|
|
||||||
|
ErrorCode INTERNAL_SUPPLY_FACTORY_NOT_EXISTS=new ErrorCode(1_027_000_580, "自定义工厂不存在");
|
||||||
|
ErrorCode INTERNAL_SUPPLY_FACTORY_DONT_DELETE=new ErrorCode(1_027_000_581, "自定义工厂不能删除");
|
||||||
//Illegal operation type
|
//Illegal operation type
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.zt.plat.module.base.api.internalsupplyfactory;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||||
|
import com.zt.plat.module.api.InternalSupplyFactoryApi;
|
||||||
|
import com.zt.plat.module.api.dto.internalsupplyfactory.InternalSupplyFactoryDTO;
|
||||||
|
import com.zt.plat.module.base.dal.dataobject.internalsupplyfactory.InternalSupplyFactoryDO;
|
||||||
|
import com.zt.plat.module.base.service.internalsupplyfactory.InternalSupplyFactoryService;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Validated
|
||||||
|
public class InternalSupplyFactoryImpl implements InternalSupplyFactoryApi {
|
||||||
|
@Resource
|
||||||
|
private InternalSupplyFactoryService internalSupplyFactoryService;
|
||||||
|
@Override
|
||||||
|
public CommonResult<List<InternalSupplyFactoryDTO>> batchCreate(List<InternalSupplyFactoryDTO> reqVOS) {
|
||||||
|
List<InternalSupplyFactoryDO> factoryDOS =new ArrayList<>();
|
||||||
|
for (InternalSupplyFactoryDTO reqVO : reqVOS) {
|
||||||
|
InternalSupplyFactoryDO factoryDO = BeanUtils.toBean(reqVO, InternalSupplyFactoryDO.class);
|
||||||
|
factoryDO.setCompanyIdCustom(reqVO.getErpCompanyNumber());
|
||||||
|
factoryDO.setCompanyNameCustom(reqVO.getErpCompanyName());
|
||||||
|
factoryDOS.add(factoryDO);
|
||||||
|
}
|
||||||
|
internalSupplyFactoryService.bindFactory(factoryDOS);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
|||||||
|
package com.zt.plat.module.base.controller.admin.internalsupplyfactory.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
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 InternalSupplyFactoryPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "工厂名称", example = "张三")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "工厂编码")
|
||||||
|
private String number;
|
||||||
|
|
||||||
|
@Schema(description = "类型;数据字典(SPLY_FACT_TP)", example = "2")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Schema(description = "绑定工厂名称", example = "赵六")
|
||||||
|
private String relativityName;
|
||||||
|
|
||||||
|
@Schema(description = "绑定工厂编码")
|
||||||
|
private String relativityNumber;
|
||||||
|
|
||||||
|
@Schema(description = "是否启用")
|
||||||
|
private String isEnable;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
@Schema(description = "操作类型", example = "2")
|
||||||
|
private String operationType;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.zt.plat.module.base.controller.admin.internalsupplyfactory.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 供应链内部工厂 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class InternalSupplyFactoryRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25522")
|
||||||
|
@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 = "类型;数据字典(SPLY_FACT_TP)", example = "2")
|
||||||
|
@ExcelProperty("类型;数据字典(SPLY_FACT_TP)")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Schema(description = "绑定工厂名称", example = "赵六")
|
||||||
|
@ExcelProperty("绑定工厂名称")
|
||||||
|
private String relativityName;
|
||||||
|
|
||||||
|
@Schema(description = "绑定工厂编码")
|
||||||
|
@ExcelProperty("绑定工厂编码")
|
||||||
|
private String relativityNumber;
|
||||||
|
|
||||||
|
@Schema(description = "是否启用")
|
||||||
|
@ExcelProperty("是否启用")
|
||||||
|
private String isEnable;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "操作类型", example = "2")
|
||||||
|
@ExcelProperty("操作类型")
|
||||||
|
private String operationType;
|
||||||
|
|
||||||
|
@Schema(description = "公司名称-业务")
|
||||||
|
private String companyNameCustom;
|
||||||
|
@Schema(description = "公司编号-业务")
|
||||||
|
private String companyIdCustom;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.zt.plat.module.base.controller.admin.internalsupplyfactory.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 供应链内部工厂新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class InternalSupplyFactorySaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25522")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "工厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||||
|
@NotEmpty(message = "工厂名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "工厂编码不能为空")
|
||||||
|
private String number;
|
||||||
|
|
||||||
|
@Schema(description = "类型;数据字典(SPLY_FACT_TP)", example = "2")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Schema(description = "绑定工厂名称", example = "赵六")
|
||||||
|
private String relativityName;
|
||||||
|
|
||||||
|
@Schema(description = "绑定工厂编码")
|
||||||
|
private String relativityNumber;
|
||||||
|
|
||||||
|
@Schema(description = "是否启用")
|
||||||
|
private String isEnable;
|
||||||
|
|
||||||
|
@Schema(description = "操作类型", example = "2")
|
||||||
|
private String operationType;
|
||||||
|
@Schema(description = "公司名称-业务")
|
||||||
|
private String companyNameCustom;
|
||||||
|
@Schema(description = "公司编号-业务")
|
||||||
|
private String companyIdCustom;
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user