物料相关

This commit is contained in:
潘荣晟
2026-01-21 17:22:59 +08:00
parent 41634a720a
commit 8bb76b85ab
11 changed files with 31 additions and 12 deletions

View File

@@ -130,7 +130,7 @@ public class ErpMaterialController implements BusinessControllerMarker {
@DeleteMapping("/deleteErpMaterialCorr")
@Operation(summary = "删除ERP物料关系")
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:delete','basic:material-config:delete'})")
public CommonResult<Boolean> deleteErpMaterialCorr(@RequestBody BatchDeleteReqVO req) {
public CommonResult<Boolean> deleteErpMaterialCorr(@RequestBody DeleteErpMaterialCorrVO req) {
erpMaterialService.deleteErpMaterialCorr(req);
return success(true);
}

View File

@@ -0,0 +1,15 @@
package com.zt.plat.module.erp.controller.admin.erp.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Data
@Schema(description = "删除ErpMaterialCorr请求参数")
public class DeleteErpMaterialCorrVO {
@Schema(description = "ids")
private List<Long> materialIds;
@Schema(description = "主物料Id")
private Long materialParentId;
}

View File

@@ -23,7 +23,7 @@ public class WarehouseFactoryPageReqVO extends PageParam {
private String operationType;
@Schema(description = "业务类型", example = "2")
private String mMSIType;
private String mmsiType;
@Schema(description = "erp源工厂名称", example = "赵六")
private String erpSourceFactoryName;

View File

@@ -30,7 +30,7 @@ public class WarehouseFactoryRespVO {
@Schema(description = "业务类型", example = "2")
@ExcelProperty("业务类型")
private String mMSIType;
private String mmsiType;
@Schema(description = "erp源工厂名称", example = "赵六")
@ExcelProperty("erp源工厂名称")

View File

@@ -24,7 +24,7 @@ public class WarehouseFactorySaveReqVO {
private String operationType;
@Schema(description = "业务类型", example = "2")
private String mMSIType;
private String mmsiType;
@Schema(description = "erp源工厂名称", example = "赵六")
private String erpSourceFactoryName;

View File

@@ -48,7 +48,7 @@ public class WarehouseFactoryDO extends BusinessBaseDO {
* 业务类型
*/
@TableField("MMSI_TP")
private String mMSIType;
private String mmsiType;
/**
* erp源工厂名称
*/

View File

@@ -21,7 +21,7 @@ public interface WarehouseFactoryMapper extends BaseMapperX<WarehouseFactoryDO>
.eqIfPresent(WarehouseFactoryDO::getCompanyNameCustom, reqVO.getCompanyNameCustom())
.eqIfPresent(WarehouseFactoryDO::getCompanyIdCustom, reqVO.getCompanyIdCustom())
.eqIfPresent(WarehouseFactoryDO::getOperationType, reqVO.getOperationType())
.eqIfPresent(WarehouseFactoryDO::getMMSIType, reqVO.getMMSIType())
.eqIfPresent(WarehouseFactoryDO::getMmsiType, reqVO.getMmsiType())
.likeIfPresent(WarehouseFactoryDO::getErpSourceFactoryName, reqVO.getErpSourceFactoryName())
.eqIfPresent(WarehouseFactoryDO::getErpSourceFactoryNumber, reqVO.getErpSourceFactoryNumber())
.likeIfPresent(WarehouseFactoryDO::getErpSourceWarehouseName, reqVO.getErpSourceWarehouseName())

View File

@@ -1,6 +1,7 @@
package com.zt.plat.module.erp.service.erp;
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
import com.zt.plat.module.erp.controller.admin.erp.vo.DeleteErpMaterialCorrVO;
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialCorrRspVO;
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialCorrSaveReqVO;
import jakarta.validation.Valid;
@@ -14,7 +15,7 @@ import java.util.List;
*/
public interface ErpErpMaterialCorrService {
List<ErpMaterialCorrRspVO> create(@Valid ErpMaterialCorrSaveReqVO reqVO);
void deleteBatch(BatchDeleteReqVO reqVO);
void deleteBatch(DeleteErpMaterialCorrVO reqVO);
List<ErpMaterialCorrRspVO> getErpMaterialByMainMaterial(List<Long> mainMaterialIds);

View File

@@ -2,6 +2,8 @@ package com.zt.plat.module.erp.service.erp;
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.module.erp.controller.admin.erp.vo.DeleteErpMaterialCorrVO;
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialCorrRspVO;
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialCorrSaveReqVO;
import com.zt.plat.module.erp.dal.dataobject.erp.ErpMaterialCorrDO;
@@ -39,8 +41,10 @@ public class ErpErpMaterialCorrServiceImpl implements ErpErpMaterialCorrService{
}
@Override
public void deleteBatch(BatchDeleteReqVO reqVO) {
erpErpMaterialCorrMapper.deleteByIds(reqVO.getIds());
public void deleteBatch(DeleteErpMaterialCorrVO reqVO) {
erpErpMaterialCorrMapper.delete(new LambdaQueryWrapperX<ErpMaterialCorrDO>()
.eq(ErpMaterialCorrDO::getMaterialParentId, reqVO.getMaterialParentId())
.in(ErpMaterialCorrDO::getMaterialId, reqVO.getMaterialIds()));
}
@Override

View File

@@ -71,7 +71,7 @@ public interface ErpMaterialService {
List<ErpMaterialRespVO> createErpMaterialCorr(ErpMaterialCorrSaveReqVO erpMaterialCorrSaveReqVO);
void deleteErpMaterialCorr(BatchDeleteReqVO reqVO);
void deleteErpMaterialCorr(DeleteErpMaterialCorrVO reqVO);
ErpMaterialDO getErpMaterialById(Long id);

View File

@@ -255,7 +255,7 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
@Override
public void deleteErpMaterialCorr(BatchDeleteReqVO reqVO) {
public void deleteErpMaterialCorr(DeleteErpMaterialCorrVO reqVO) {
erpMaterialCorrService.deleteBatch(reqVO);
}
@@ -325,7 +325,6 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
erpMaterialDOList.add(erpMaterialDO);
});
}
System.out.println("==============查询物料数据耗时:============"+String.valueOf(System.currentTimeMillis() - startTime));
return new PageResult<>(erpMaterialDOList, departmentMaterialPage.getData().getTotal());
}