fix:
合同获取标准价优化
This commit is contained in:
parent
8107d90fb1
commit
440a05d4a6
@ -53,21 +53,21 @@ public class ClientUtils {
|
|||||||
if (!yem_linetype.equals("add")) {
|
if (!yem_linetype.equals("add")) {
|
||||||
boolean tor = true;
|
boolean tor = true;
|
||||||
DynamicObjectCollection yemMulticonfig = temp.getDynamicObjectCollection("yem_multiconfig");
|
DynamicObjectCollection yemMulticonfig = temp.getDynamicObjectCollection("yem_multiconfig");
|
||||||
if (!yemMulticonfig.isEmpty()){
|
if (!yemMulticonfig.isEmpty()) {
|
||||||
for (DynamicObject dynamicObject : yemMulticonfig) {
|
for (DynamicObject dynamicObject : yemMulticonfig) {
|
||||||
String yemLinetypes = dynamicObject.getString("yem_linetypes");
|
String yemLinetypes = dynamicObject.getString("yem_linetypes");
|
||||||
if ("add".equals(yemLinetypes)){
|
if ("add".equals(yemLinetypes)) {
|
||||||
tor= false;
|
tor = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tor){
|
if (tor) {
|
||||||
rowInfo++;
|
rowInfo++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
yem_linetype="add";
|
yem_linetype = "add";
|
||||||
}
|
}
|
||||||
//多功能配置分录行获取
|
//多功能配置分录行获取
|
||||||
DynamicObjectCollection multiconfig = null;
|
DynamicObjectCollection multiconfig = null;
|
||||||
@ -160,11 +160,11 @@ public class ClientUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ("yem_es_xsalesorder".equals(models.getDataEntityType().getName())){
|
if ("yem_es_xsalesorder".equals(models.getDataEntityType().getName())) {
|
||||||
int multiconfigIndex = 0;
|
int multiconfigIndex = 0;
|
||||||
if (!multiconfig.isEmpty()) {
|
if (!multiconfig.isEmpty()) {
|
||||||
for (DynamicObject dc : multiconfig) {
|
for (DynamicObject dc : multiconfig) {
|
||||||
if ("add".equals(dc.getString("yem_linetypes"))){
|
if ("add".equals(dc.getString("yem_linetypes"))) {
|
||||||
long configentryid = dc.getLong("yem_configentryid");
|
long configentryid = dc.getLong("yem_configentryid");
|
||||||
BigDecimal configentry = dataMap.get(configentryid) == null ? BigDecimal.ZERO : dataMap.get(configentryid).setScale(2);
|
BigDecimal configentry = dataMap.get(configentryid) == null ? BigDecimal.ZERO : dataMap.get(configentryid).setScale(2);
|
||||||
models.setValue("yem_marketraisepribase", configentry, multiconfigIndex, rowInfo);
|
models.setValue("yem_marketraisepribase", configentry, multiconfigIndex, rowInfo);
|
||||||
@ -172,7 +172,7 @@ public class ClientUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
setPriceNow(multiconfig, dataMap, rowInfo, models);
|
setPriceNow(multiconfig, dataMap, rowInfo, models);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -214,7 +214,7 @@ public class ClientUtils {
|
|||||||
else if (("yem_im_clientdema_pj".equals(yem_billtype) || "yem_im_inclientdema_pj".equals(yem_billtype)
|
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_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))
|
|| "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);
|
pjFindPrice(yem_exrate, info, pjDatas, rowInfo, list, materials, models, yemBdProductsid);
|
||||||
}
|
}
|
||||||
rowInfo++;
|
rowInfo++;
|
||||||
@ -368,7 +368,15 @@ public class ClientUtils {
|
|||||||
* 获取标准价中 给当前行标准销售加价赋值
|
* 获取标准价中 给当前行标准销售加价赋值
|
||||||
*/
|
*/
|
||||||
public static void setPriceNow(DynamicObjectCollection multiconfig, Map<Long, BigDecimal> dataMap, int rowInfo, IDataModel models) {
|
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++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2001,13 +2009,13 @@ public class ClientUtils {
|
|||||||
int rowCount = model.getEntryRowCount("yem_es_materialinfo");
|
int rowCount = model.getEntryRowCount("yem_es_materialinfo");
|
||||||
for (int i = 0; i < rowCount; i++) {
|
for (int i = 0; i < rowCount; i++) {
|
||||||
DynamicObject d = c.get(i);
|
DynamicObject d = c.get(i);
|
||||||
if (string.equals("yem_es_xsalesorder")){
|
if (string.equals("yem_es_xsalesorder")) {
|
||||||
String yemLinetype = d.getString("yem_linetype");
|
String yemLinetype = d.getString("yem_linetype");
|
||||||
if (!"add".equals(yemLinetype)){
|
if (!"add".equals(yemLinetype)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!"Z".equals(d.getString("yem_businesssort"))){
|
if (!"Z".equals(d.getString("yem_businesssort"))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
DynamicObjectCollection subC = d.getDynamicObjectCollection("yem_multiconfig");
|
DynamicObjectCollection subC = d.getDynamicObjectCollection("yem_multiconfig");
|
||||||
|
Loading…
Reference in New Issue
Block a user