fix:
合同获取标准价优化
This commit is contained in:
parent
aeb01e979c
commit
4f4270e97e
@ -53,21 +53,19 @@ public class ClientUtils {
|
||||
if (!yem_linetype.equals("add")) {
|
||||
boolean tor = true;
|
||||
DynamicObjectCollection yemMulticonfig = temp.getDynamicObjectCollection("yem_multiconfig");
|
||||
if (!yemMulticonfig.isEmpty()) {
|
||||
if (!yemMulticonfig.isEmpty()){
|
||||
for (DynamicObject dynamicObject : yemMulticonfig) {
|
||||
String yemLinetypes = dynamicObject.getString("yem_linetypes");
|
||||
if ("add".equals(yemLinetypes)) {
|
||||
tor = false;
|
||||
if ("add".equals(yemLinetypes)){
|
||||
tor= false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tor) {
|
||||
if (tor){
|
||||
rowInfo++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
yem_linetype = "add";
|
||||
}
|
||||
//多功能配置分录行获取
|
||||
DynamicObjectCollection multiconfig = null;
|
||||
@ -160,21 +158,19 @@ public class ClientUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("yem_es_xsalesorder".equals(models.getDataEntityType().getName())) {
|
||||
if ("yem_es_xsalesorder".equals(models.getDataEntityType().getName())){
|
||||
int multiconfigIndex = 0;
|
||||
if (!multiconfig.isEmpty()) {
|
||||
for (DynamicObject dc : multiconfig) {
|
||||
if ("add".equals(dc.getString("yem_linetypes"))) {
|
||||
if ("add".equals(dc.getString("yem_linetypes"))){
|
||||
long configentryid = dc.getLong("yem_configentryid");
|
||||
BigDecimal configentry = dataMap.get(configentryid) == null ? BigDecimal.ZERO : dataMap.get(configentryid).setScale(2);
|
||||
models.setValue("yem_marketraisepribase", configentry, multiconfigIndex, rowInfo);
|
||||
multiconfigIndex++;
|
||||
} else {
|
||||
multiconfigIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}else {
|
||||
setPriceNow(multiconfig, dataMap, rowInfo, models);
|
||||
}
|
||||
}
|
||||
@ -206,7 +202,7 @@ public class ClientUtils {
|
||||
else if (("yem_im_clientdeman_zj".equals(yem_billtype) || "yem_im_inclientdeman_zj".equals(yem_billtype)
|
||||
|| ("yem_es_salesorder_ZJ".equals(yem_billtype)) || "yem_es_salesorder_nmzj".equals(yem_billtype)
|
||||
|| "yem_es_xsalesorder_zj".equals(yem_billtype) || "yem_es_xsalesorder_nmzj".equals(yem_billtype))
|
||||
&& "P".equals(businesssort) && yem_linetype.equals("add")) {
|
||||
&& "P".equals(businesssort) && !yem_linetype.equals("add")) {
|
||||
// else if (("yem_im_clientdeman_zj".equals(yem_billtype) || "yem_im_inclientdeman_zj".equals(yem_billtype) || ("yem_es_salesorder_ZJ".equals(yem_billtype)) || "yem_es_salesorder_nmzj".equals(yem_billtype)) && "P".equals(businesssort)) {
|
||||
pjFindPrice(yem_exrate, info, pjDatas, rowInfo, list, materials, models, yemBdProductsid);
|
||||
}
|
||||
@ -216,7 +212,7 @@ public class ClientUtils {
|
||||
else if (("yem_im_clientdema_pj".equals(yem_billtype) || "yem_im_inclientdema_pj".equals(yem_billtype)
|
||||
|| "yem_es_salesorder_PJ".equals(yem_billtype) || "yem_es_salesorder_nmpj".equals(yem_billtype)
|
||||
|| "yem_es_xsalesorder_pj".equals(yem_billtype) || "yem_es_xsalesorder_nmpj".equals(yem_billtype))
|
||||
&& "P".equals(businesssort) && yem_linetype.equals("add")) {
|
||||
&& "P".equals(businesssort)&& !yem_linetype.equals("add")) {
|
||||
pjFindPrice(yem_exrate, info, pjDatas, rowInfo, list, materials, models, yemBdProductsid);
|
||||
}
|
||||
rowInfo++;
|
||||
@ -370,15 +366,7 @@ public class ClientUtils {
|
||||
* 获取标准价中 给当前行标准销售加价赋值
|
||||
*/
|
||||
public static void setPriceNow(DynamicObjectCollection multiconfig, Map<Long, BigDecimal> dataMap, int rowInfo, IDataModel models) {
|
||||
int multiconfigIndex = 0;
|
||||
if (!multiconfig.isEmpty()) {
|
||||
for (DynamicObject dc : multiconfig) {
|
||||
long configentryid = dc.getLong("yem_configentryid");
|
||||
BigDecimal configentry = dataMap.get(configentryid) == null ? BigDecimal.ZERO : dataMap.get(configentryid).setScale(2);
|
||||
models.setValue("yem_marketraisepribase", configentry, multiconfigIndex, rowInfo);
|
||||
multiconfigIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2011,13 +1999,13 @@ public class ClientUtils {
|
||||
int rowCount = model.getEntryRowCount("yem_es_materialinfo");
|
||||
for (int i = 0; i < rowCount; i++) {
|
||||
DynamicObject d = c.get(i);
|
||||
if (string.equals("yem_es_xsalesorder")) {
|
||||
if (string.equals("yem_es_xsalesorder")){
|
||||
String yemLinetype = d.getString("yem_linetype");
|
||||
if (!"add".equals(yemLinetype)) {
|
||||
if (!"add".equals(yemLinetype)){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (!"Z".equals(d.getString("yem_businesssort"))) {
|
||||
if (!"Z".equals(d.getString("yem_businesssort"))){
|
||||
continue;
|
||||
}
|
||||
DynamicObjectCollection subC = d.getDynamicObjectCollection("yem_multiconfig");
|
||||
|
Loading…
Reference in New Issue
Block a user