Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
潘荣晟
2025-10-11 18:01:55 +08:00
46 changed files with 719 additions and 456 deletions

View File

@@ -1,5 +1,6 @@
package com.zt.plat.module.erp.api;
import com.zt.plat.module.erp.api.dto.ErpQueryReqDTO;
import com.zt.plat.module.erp.api.dto.ErpSubmitReqDTO;
import com.zt.plat.module.erp.utils.ErpConfig;
import jakarta.annotation.Resource;
@@ -7,6 +8,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
/**
* ERP Api 实现类
@@ -25,4 +27,11 @@ public class ErpExternalApiImpl implements ErpExternalApi {
public HashMap<String, String> submitDataToErp(ErpSubmitReqDTO reqDTO) {
return erpConfig.pushDataToErp(reqDTO);
}
@Override
public HashMap<String, Object> queryDataToErp(ErpQueryReqDTO reqDTO) {
String funcnr = reqDTO.getFuncnr();
Map<String, Object> req = new HashMap<>();
return erpConfig.fetchDataFromERP(funcnr, req);
}
}

View File

@@ -88,14 +88,6 @@ public class ErpFactoryController {
return success(BeanUtils.toBean(pageResult, ErpFactoryRespVO.class));
}
@GetMapping("/pageByCpn")
@Operation(summary = "获得ERP工厂分页")
@PreAuthorize("@ss.hasPermission('base:erp-factory:query')")
public CommonResult<PageResult<ErpFactoryRespVO>> getErpFactoryPageByCpn(@Valid ErpFactoryPageReqVO pageReqVO) {
PageResult<ErpFactoryDO> pageResult = erpFactoryService.getErpFactoryPageByCpn(pageReqVO);
return success(BeanUtils.toBean(pageResult, ErpFactoryRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出ERP工厂 Excel")
@PreAuthorize("@ss.hasPermission('base:erp-factory:export')")

View File

@@ -101,6 +101,14 @@ public class ErpWarehouseController {
BeanUtils.toBean(list, ErpWarehouseRespVO.class));
}
@PutMapping("/enable-list")
@Operation(summary = "批量更新")
@PreAuthorize("@ss.hasPermission('base:warehouse:update')")
public CommonResult<Boolean> enableWarehouseList(@RequestBody List<ErpWarehouseSaveReqVO> saveReqVOS) {
erpWarehouseService.enableWarehouseList(saveReqVOS);
return success(true);
}
@PostMapping("/getErpWarehouseTask")
@Operation(summary = "定时获得erp更新库位")
@PreAuthorize("@ss.hasPermission('sply:erp-warehouse:create')")

View File

@@ -16,10 +16,10 @@ public class ErpFactoryPageReqVO extends PageParam {
private String number;
@Schema(description = "公司编号")
private String companyNumber;
private String erpCompanyNumber;
@Schema(description = "公司名称")
private String companyName;
private String erpCompanyName;
@Schema(description = "类型")
private String type;

View File

@@ -23,7 +23,10 @@ public class ErpFactoryRespVO {
private String number;
@Schema(description = "公司编号")
private String companyNumber;
private String erpCompanyNumber;
@Schema(description = "公司编号")
private String erpCompanyName;
@Schema(description = "类型")
private String type;

View File

@@ -20,10 +20,7 @@ public class ErpFactorySaveReqVO {
private String number;
@Schema(description = "公司编号")
private String companyNumber;
@Schema(description = "公司编号")
private String companyName;
private String erpCompanyNumber;
@Schema(description = "类型")
private String type;

View File

@@ -8,6 +8,9 @@ import lombok.Data;
@Data
public class ErpWarehousePageReqVO extends PageParam {
@Schema(description = "工厂名称")
private String factoryName;
@Schema(description = "工厂编码;将查询参数存入")
private String factoryNumber;
@@ -17,4 +20,8 @@ public class ErpWarehousePageReqVO extends PageParam {
@Schema(description = "库位编码")
private String number;
@Schema(description = "类型")
private String type;
}

View File

@@ -2,6 +2,7 @@ package com.zt.plat.module.erp.controller.admin.erp.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -18,6 +19,9 @@ public class ErpWarehouseRespVO {
@ExcelProperty("工厂编码;将查询参数存入")
private String factoryNumber;
@Schema(description = "工厂名称")
private String factoryName;
@Schema(description = "库位描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
@ExcelProperty("库位描述")
private String name;
@@ -26,4 +30,16 @@ public class ErpWarehouseRespVO {
@ExcelProperty("库位编码")
private String number;
@Schema(description = "类别")
private String type;
@Schema(description = "绑定库位名")
private String relName;
@Schema(description = "绑定库位编码")
private String relnumber;
@Schema(description = "是否启用")
private String isEnable;
}

View File

@@ -22,4 +22,16 @@ public class ErpWarehouseSaveReqVO {
@NotEmpty(message = "库位编码不能为空")
private String number;
@Schema(description = "类别")
private String type;
@Schema(description = "绑定库位名")
private String relName;
@Schema(description = "绑定库位编码")
private String relnumber;
@Schema(description = "是否启用")
private String isEnable;
}

View File

@@ -41,13 +41,13 @@ public class ErpFactoryDO extends BusinessBaseDO {
* 公司编号
*/
@TableField("CPN_ID")
private String companyNumber;
private String erpCompanyNumber;
/**
* 公司名称
*/
@TableField(exist = false)
private String companyName;
private String erpCompanyName;
/**
* 类型

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