权限标识相关功能修复
This commit is contained in:
@@ -8,10 +8,7 @@ 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.api.materialinfomation.dto.MaterialInfomationPageReqDTO;
|
||||
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialCorrSaveReqVO;
|
||||
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialPageReqVO;
|
||||
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialRespVO;
|
||||
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialSaveReqVO;
|
||||
import com.zt.plat.module.erp.controller.admin.erp.vo.*;
|
||||
import com.zt.plat.module.erp.dal.dataobject.erp.ErpMaterialDO;
|
||||
import com.zt.plat.module.erp.service.erp.ErpMaterialService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -155,10 +152,15 @@ public class ErpMaterialController {
|
||||
}
|
||||
|
||||
//查询物料
|
||||
@GetMapping("/api-erp-material")
|
||||
@PostMapping("/api-erp-material")
|
||||
@Operation(summary = "通过接口查询物料")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:query')")
|
||||
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByApi(@RequestBody MaterialInfomationPageReqDTO material) {
|
||||
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByApi(@RequestBody MaterialInfomationApiVO vo) {
|
||||
MaterialInfomationPageReqDTO material = new MaterialInfomationPageReqDTO();
|
||||
material.setCode(vo.getMaterialNumber());
|
||||
material.setName(vo.getMaterialName());
|
||||
material.setPageSize(vo.getPageSize());
|
||||
material.setPageNo(vo.getPageNo());
|
||||
List<ErpMaterialDO> erpMaterial = erpMaterialService.getErpMaterialByApi(material);
|
||||
return success(BeanUtils.toBean(erpMaterial, ErpMaterialRespVO.class));
|
||||
}
|
||||
@@ -168,7 +170,7 @@ public class ErpMaterialController {
|
||||
@GetMapping("/erpMaterial-mainMaterial-code")
|
||||
@Operation(summary = "通过主物料编号查询子物料信息")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:query')")
|
||||
public CommonResult<ErpMaterialRespVO> getErpMaterialByMainMaterialByCode(String code) {
|
||||
public CommonResult<ErpMaterialRespVO> getErpMaterialByMainMaterialByCode(@RequestParam("materialNumber") String code) {
|
||||
return success(BeanUtils.toBean(erpMaterialService.getErpMaterialByMainMaterialByCode(code), ErpMaterialRespVO.class));
|
||||
}
|
||||
|
||||
@@ -176,7 +178,7 @@ public class ErpMaterialController {
|
||||
@GetMapping("/api-erp-material-code")
|
||||
@Operation(summary = "通过编号接口查询物料")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:query')")
|
||||
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByApiByCode(String code) {
|
||||
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByApiByCode(@RequestParam("materialNumber")String code) {
|
||||
|
||||
return success(BeanUtils.toBean(erpMaterialService.getErpMaterialByApiByCode(code), ErpMaterialRespVO.class));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.zt.plat.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MaterialInfomationApiVO extends PageParam {
|
||||
@Schema(description = "物料编号")
|
||||
private String materialNumber;
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
}
|
||||
@@ -126,4 +126,7 @@ public class ErpMaterialDO extends BusinessBaseDO {
|
||||
@TableField("DEC")
|
||||
private Long decimalValue;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String materialNumber;
|
||||
|
||||
}
|
||||
@@ -221,6 +221,7 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
|
||||
MaterialInfomationRespDTO data = materialInfomation.getData();
|
||||
MaterialAttributeUtils.MaterialAttribute materialAttribute = MaterialAttributeUtils.safeExtractAllAttributes(data);
|
||||
// 有对应关系的字段赋值
|
||||
erpMaterialDO.setMaterialNumber(data.getCode());//物料编码
|
||||
erpMaterialDO.setId(data.getId()); // 主键
|
||||
erpMaterialDO.setMaterialName(data.getName()); // 物料名称
|
||||
erpMaterialDO.setDownCenterNumber(materialAttribute.mtrlZhongtongCode()); // 中铜物料编码
|
||||
@@ -233,7 +234,6 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
|
||||
}
|
||||
erpMaterialDO.setAbbreviation(materialAttribute.mtrlElement()); // 金属元素缩写
|
||||
erpMaterialDO.setCreateDate(materialAttribute.mtrlRecordTime()); // 创建日期(物料记录时间)
|
||||
|
||||
// 无对应关系的字段(暂未赋值,需根据业务补充映射规则)
|
||||
// erpMaterialDO.setMaterialType(null); // 物料类型
|
||||
// erpMaterialDO.setMaterialGroupDate(null); // 物料大类组
|
||||
|
||||
Reference in New Issue
Block a user