添加修改物料去除货主校验;
This commit is contained in:
+3
@@ -157,6 +157,8 @@ public class MaterialBaseInfoApplicationService {
|
||||
* @param materialBaseInfoDO
|
||||
*/
|
||||
private void shipperParam(MaterialBaseInfoDO materialBaseInfoDO){
|
||||
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("获取货主信息失败");
|
||||
@@ -168,6 +170,7 @@ public class MaterialBaseInfoApplicationService {
|
||||
materialBaseInfoDO.setShipperName(userPo.getUserName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<MaterialStockInfoVo> getMaterialStockList(String shipperName, String materialName,
|
||||
String machineCode, Integer pageNum, Integer pageSize) {
|
||||
|
||||
+5
@@ -257,6 +257,7 @@ public class MaterialBaseInfoApplicationService {
|
||||
}
|
||||
}
|
||||
Long shipperId = materialBaseInfoDO.getShipperId();
|
||||
if (shipperId != null&&shipperId != 0L) {
|
||||
String customerCodeNcJson = null;
|
||||
if (shipperId != null) {
|
||||
customerCodeNcJson = materialBaseInfoMapper.getCustomerCodeNcJson(shipperId.toString());
|
||||
@@ -284,6 +285,7 @@ public class MaterialBaseInfoApplicationService {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Long materialBaseInfoId = materialBaseInfoDomainService.insert(materialBaseInfoDO);
|
||||
materialBaseInfoDO.setMaterialBaseInfoId(materialBaseInfoId);
|
||||
//商品规则
|
||||
@@ -316,6 +318,7 @@ public class MaterialBaseInfoApplicationService {
|
||||
*/
|
||||
public Boolean update(MaterialBaseInfoDO materialBaseInfoDO) {
|
||||
Long shipperId = materialBaseInfoDO.getShipperId();
|
||||
if (shipperId != null&&shipperId!=0l) {
|
||||
String customerCodeNcJson = materialBaseInfoMapper.getCustomerCodeNcJson(shipperId.toString());
|
||||
if (customerCodeNcJson != null && !customerCodeNcJson.isEmpty()) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
@@ -340,6 +343,8 @@ public class MaterialBaseInfoApplicationService {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
materialBaseInfoDomainService.update(materialBaseInfoDO);
|
||||
Long materialBaseInfoId = materialBaseInfoDO.getMaterialBaseInfoId();
|
||||
// 商品/公共/仓控 子表:Feign/前端常只带业务字段、未带子表主键,需按 material_base_info_id 补全后再 update,否则 WHERE xxx_id=? 为 null 导致 Updates: 0
|
||||
|
||||
Reference in New Issue
Block a user