添加修改物料去除货主校验;

This commit is contained in:
王奎兴
2026-08-18 09:53:30 +08:00
parent 070cdcd5de
commit 1d96322370
2 changed files with 63 additions and 55 deletions
@@ -157,15 +157,18 @@ public class MaterialBaseInfoApplicationService {
* @param materialBaseInfoDO
*/
private void shipperParam(MaterialBaseInfoDO materialBaseInfoDO){
AjaxResult ajaxResult = userServiceFeign.getInfo(materialBaseInfoDO.getShipperId());
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
throw new ServiceException("获取货主信息失败");
}
UserPo userPo = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), UserPo.class);
// 如果原始shipperName不为空,保留原始值(导入或手动输入时应该保留完整名称)
// 只有在原始shipperName为空时,才使用查询到的userName
if (materialBaseInfoDO.getShipperName() == null || materialBaseInfoDO.getShipperName().trim().isEmpty()) {
materialBaseInfoDO.setShipperName(userPo.getUserName());
Long shipperId = materialBaseInfoDO.getShipperId();
if (shipperId != null && shipperId != 0l) {
AjaxResult ajaxResult = userServiceFeign.getInfo(materialBaseInfoDO.getShipperId());
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
throw new ServiceException("获取货主信息失败");
}
UserPo userPo = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), UserPo.class);
// 如果原始shipperName不为空,保留原始值(导入或手动输入时应该保留完整名称)
// 只有在原始shipperName为空时,才使用查询到的userName
if (materialBaseInfoDO.getShipperName() == null || materialBaseInfoDO.getShipperName().trim().isEmpty()) {
materialBaseInfoDO.setShipperName(userPo.getUserName());
}
}
}
@@ -182,4 +185,4 @@ public class MaterialBaseInfoApplicationService {
//return materialBaseInfoDomainService.getMaterialStockList(shipperName,materialName,machineCode,topOrganizationId,pageNum,pageSize);/**/
return null;
}
}
}