wip:整机价格
This commit is contained in:
parent
51e0d68059
commit
e04dd91174
@ -2,6 +2,7 @@ package com.yem.wm.im.clientdemand.utils;
|
||||
|
||||
import com.sun.tools.doclets.formats.html.resources.standard;
|
||||
import com.yem.tws.common1.BigDecimalUtils;
|
||||
import com.yem.wm.utils.DynamicObjectUtil;
|
||||
import com.yem.wm.utils.YEM;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
@ -11,6 +12,7 @@ import kd.bos.form.IFormView;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.QueryServiceHelper;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@ -1875,6 +1877,45 @@ public class ClientUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物流价格核算表
|
||||
*
|
||||
* @param transportStyle 运输方式
|
||||
* @param port 港口
|
||||
* @param billingMethod 计费方式
|
||||
* @return
|
||||
*/
|
||||
public static BigDecimal queryLogisticsCosts(long transportStyle, long port, long billingMethod) {
|
||||
QFilter qFilter = new QFilter("status", "=", "C");
|
||||
qFilter.and("yem_entryentity.yem_shippingmethod.id", "=", transportStyle);
|
||||
qFilter.and("yem_entryentity.yem_port.id", "=", port);
|
||||
qFilter.and("yem_entryentity.yem_billingmethod.id", "=", billingMethod);
|
||||
DynamicObject single = BusinessDataServiceHelper.loadSingle("yem_materialpriceing", qFilter.toArray());
|
||||
DynamicObjectCollection entry = single.getDynamicObjectCollection("yem_entryentity");
|
||||
for (DynamicObject d : entry) {
|
||||
long e_transportStyle = d.getLong("yem_shippingmethod");
|
||||
long e_port = d.getLong("yem_port");
|
||||
long e_billingMethod = d.getLong("yem_billingmethod");
|
||||
|
||||
if (e_transportStyle == transportStyle && e_port == port && e_billingMethod == billingMethod) {
|
||||
return d.getBigDecimal("yem_price");
|
||||
}
|
||||
}
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
public static BigDecimal queryLogisticsCosts(IDataModel model, int idx) {
|
||||
return queryLogisticsCosts(model.getDataEntity(true), idx);
|
||||
}
|
||||
|
||||
private static BigDecimal queryLogisticsCosts(DynamicObject dataEntity, int idx) {
|
||||
DynamicObjectCollection materialinfo = dataEntity.getDynamicObjectCollection("yem_es_materialinfo");
|
||||
for (DynamicObject d : materialinfo) {
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user