Browse Source

Merge remote-tracking branch 'origin/dev' into dev

training
pref_mail@163.com 1 year ago
parent
commit
b7c1a24776
  1. 18
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java
  2. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionParcelListDTO.java

18
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java

@ -135,19 +135,25 @@ public class DistributionParcelListController extends BladeController {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distributionParcelList")
public R update(@Valid @RequestBody DistributionParcelListDTO distributionParcelListDTO) {
if(ObjectUtils.isNotNull(distributionParcelListDTO.getMaterialId())){
BasicMaterialEntity materialOwnId = basicMaterialClient.getMaterialOwnId(distributionParcelListDTO.getMaterialId());
if(ObjectUtils.isNotNull(materialOwnId)){
distributionParcelListDTO.setMaterialCode(materialOwnId.getProductCode());
distributionParcelListDTO.setMaterialName(materialOwnId.getName());
distributionParcelListDTO.setMaterialUnit(DictBizCache.getValue(DictBizConstant.LOGPM_UNIT,materialOwnId.getLogpmUnit()));
distributionParcelListDTO.setSku(materialOwnId.getSku());
distributionParcelListDTO.getIds().forEach( i ->{
distributionParcelListDTO.setId(Long.parseLong(i));
distributionParcelListDTO.setMaterialCode(materialOwnId.getProductCode());
distributionParcelListDTO.setMaterialName(materialOwnId.getName());
distributionParcelListDTO.setMaterialUnit(DictBizCache.getValue(DictBizConstant.LOGPM_UNIT,materialOwnId.getLogpmUnit()));
distributionParcelListDTO.setSku(materialOwnId.getSku());
distributionParcelListService.updateById(distributionParcelListDTO);
});
return R.status(true);
}else{
return R.fail("操作失败!!");
}
}else{
return R.fail("数据不存在!!");
}
return R.status(distributionParcelListService.updateById(distributionParcelListDTO));
}
/**

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionParcelListDTO.java

@ -20,6 +20,8 @@ import com.logpm.distribution.entity.DistributionParcelListEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 在库订单包件清单 数据传输对象实体类
*
@ -36,5 +38,6 @@ public class DistributionParcelListDTO extends DistributionParcelListEntity {
private String materialCode;
private String materialUnit;
private String sku;
private List<String> ids;
}

Loading…
Cancel
Save