feat(pbom): 添加导入SAP失败的数量显示和列表

This commit is contained in:
曹鹏飞 2024-06-07 15:26:48 +08:00
parent e1367525e5
commit 511f8c2a3a
3 changed files with 13 additions and 3 deletions

View File

@ -67,4 +67,8 @@ public interface BomNewPbomParentMapper extends BaseMapper<BomNewPbomParentEntit
List<BomNewPbomParentEntity> getLatestParents(Set<String> materialNos, String facCode); List<BomNewPbomParentEntity> getLatestParents(Set<String> materialNos, String facCode);
Page<BomNewPbomParentVO> getSapErrorWorksheet(Page<BomNewPbomParentQuery> page, String userCode);
Integer getSapErrorNum(String userCode);
} }

View File

@ -342,10 +342,11 @@ public class BomNewPbomParentEntity implements Serializable {
private LocalDateTime modifyTime; private LocalDateTime modifyTime;
/** /**
* 导入SAP状态1-未导入3-已导入 * 导入SAP状态1-未导入2-导入中3-全部导入成功4-部分导入失败5全部导入失败
* @see com.nflg.product.bomnew.constant.SapStatusEnum
*/ */
@TableField(value = "sap_state") @TableField(value = "sap_state")
@ApiModelProperty(value = "导入SAP状态1-未导入;3-已导入") @ApiModelProperty(value = "导入SAP状态1-未导入;2-导入中3-全部导入成功4-部分导入失败5全部导入失败")
private Integer sapState; private Integer sapState;
/** /**

View File

@ -216,7 +216,12 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
* @return * @return
*/ */
public IPage<BomNewPbomParentVO> releaseListByPage(BomNewPbomParentQuery query) { public IPage<BomNewPbomParentVO> releaseListByPage(BomNewPbomParentQuery query) {
Page<BomNewPbomParentVO> result = this.getBaseMapper().releaseListByPage(new Page<>(query.getPage(), query.getPageSize()), query); Page<BomNewPbomParentVO> result;
if (StrUtil.equals(query.getMaterialNo(), "0")) {
result = this.getBaseMapper().getSapErrorWorksheet(new Page<>(query.getPage(), query.getPageSize()), SessionUtil.getUserCode());
} else {
result = this.getBaseMapper().releaseListByPage(new Page<>(query.getPage(), query.getPageSize()), query);
}
materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); materialMainService.intiMaterialInfo(result.getRecords(), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT);
return result; return result;
} }