|
|
|
@ -17,6 +17,7 @@ import cn.estsh.i3plus.pojo.mes.bean.edi.cd.MesCimVolvoJisRackId;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.edi.cd.MesCimVolvoJisRackIdDetail;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagement;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagementDetail;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.model.ChengDuVolvoShippingPrintDetailModel;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.model.ChengDuVolvoShippingPrintModel;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.repository.MesPartRepository;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.repository.MesShippingOrderManagementDetailRepository;
|
|
|
|
@ -31,7 +32,9 @@ import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Comparator;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Description : 成都volvo发运单打印策略
|
|
|
|
@ -189,6 +192,23 @@ public class ChengDuVolvoShippingPrintStrategyService extends SortShippingDispat
|
|
|
|
|
model.setProcess("LDJIS");
|
|
|
|
|
model.setDate("P" + (StringUtils.isEmpty(productionDate) ? "" : productionDate.substring(2, 8)));
|
|
|
|
|
|
|
|
|
|
List<ChengDuVolvoShippingPrintDetailModel> detailModels = new ArrayList<>();
|
|
|
|
|
for (MesShippingOrderManagementDetail detail : shippingDetails) {
|
|
|
|
|
ChengDuVolvoShippingPrintDetailModel detailModel = new ChengDuVolvoShippingPrintDetailModel();
|
|
|
|
|
detailModel.setPartNo(detail.getPartNo());
|
|
|
|
|
detailModel.setPartName(detail.getPartName());
|
|
|
|
|
detailModel.setCustPartNo(detail.getCustPartNo());
|
|
|
|
|
if (detail.getSourceId() != null) {
|
|
|
|
|
for (MesCimVolvoJisRackIdDetail rackIdDetail : rackIdDetails) {
|
|
|
|
|
if (Objects.equals(detail.getSourceId(), rackIdDetail.getId())) {
|
|
|
|
|
detailModel.setPartPosition(rackIdDetail.getPosition());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
detailModels.sort(Comparator.comparing(ChengDuVolvoShippingPrintDetailModel::getPartPosition));
|
|
|
|
|
detailModels.add(detailModel);
|
|
|
|
|
}
|
|
|
|
|
model.setDetails(detailModels);
|
|
|
|
|
return model;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|