fix:
合同获取标准价优化
This commit is contained in:
parent
8d350dd25e
commit
857e1b9458
@ -46,11 +46,25 @@ public class ClientUtils {
|
|||||||
int rowInfo = 0;
|
int rowInfo = 0;
|
||||||
// boolean flag = false;
|
// boolean flag = false;
|
||||||
for (DynamicObject temp : detailedinfor) {
|
for (DynamicObject temp : detailedinfor) {
|
||||||
|
String yem_linetype = "";
|
||||||
|
|
||||||
if (Entityname.equals("yem_es_xsalesorder")) {
|
if (Entityname.equals("yem_es_xsalesorder")) {
|
||||||
String yem_linetype = temp.getString("yem_linetype");
|
yem_linetype = temp.getString("yem_linetype");
|
||||||
if (!yem_linetype.equals("add")) {
|
if (!yem_linetype.equals("add")) {
|
||||||
rowInfo++;
|
boolean tor = true;
|
||||||
continue;
|
DynamicObjectCollection yemMulticonfig = temp.getDynamicObjectCollection("yem_multiconfig");
|
||||||
|
if (!yemMulticonfig.isEmpty()){
|
||||||
|
for (DynamicObject dynamicObject : yemMulticonfig) {
|
||||||
|
String yemLinetypes = dynamicObject.getString("yem_linetypes");
|
||||||
|
if ("add".equals(yemLinetypes)){
|
||||||
|
tor= false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tor){
|
||||||
|
rowInfo++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//多功能配置分录行获取
|
//多功能配置分录行获取
|
||||||
@ -104,7 +118,8 @@ public class ClientUtils {
|
|||||||
//客户需求单整机 -整机分录行
|
//客户需求单整机 -整机分录行
|
||||||
// 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)) && "Z".equals(businesssort)) {
|
// 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)) && "Z".equals(businesssort)) {
|
||||||
if (("yem_im_clientdeman_zj".equals(yem_billtype) || "yem_im_inclientdeman_zj".equals(yem_billtype) || ("yem_es_salesorder_ZJ".equals(yem_billtype))
|
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)) && "Z".equals(businesssort)) {
|
|| "yem_es_salesorder_nmzj".equals(yem_billtype) || "yem_es_xsalesorder_zj".equals(yem_billtype)
|
||||||
|
|| "yem_es_xsalesorder_nmzj".equals(yem_billtype)) && "Z".equals(businesssort)) {
|
||||||
list.add(new QFilter("yem_bd_products.id", QCP.equals, products));
|
list.add(new QFilter("yem_bd_products.id", QCP.equals, products));
|
||||||
list.add(new QFilter("billstatus", QCP.equals, "C"));
|
list.add(new QFilter("billstatus", QCP.equals, "C"));
|
||||||
list.add(new QFilter("yem_billtype.number", QCP.equals, "yem_pricelibrary_ZJ"));
|
list.add(new QFilter("yem_billtype.number", QCP.equals, "yem_pricelibrary_ZJ"));
|
||||||
@ -143,7 +158,21 @@ public class ClientUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setPriceNow(multiconfig, dataMap, rowInfo, models);
|
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"))){
|
||||||
|
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 {
|
||||||
|
setPriceNow(multiconfig, dataMap, rowInfo, models);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
DynamicObjectCollection yem_basicmodel = yem_pricelibrary.getDynamicObjectCollection("yem_basicmodel");
|
DynamicObjectCollection yem_basicmodel = yem_pricelibrary.getDynamicObjectCollection("yem_basicmodel");
|
||||||
if (yem_basicmodel != null && !yem_basicmodel.isEmpty()) {
|
if (yem_basicmodel != null && !yem_basicmodel.isEmpty()) {
|
||||||
@ -170,14 +199,20 @@ 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)) {
|
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")) {
|
||||||
// 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)) {
|
// 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);
|
pjFindPrice(yem_exrate, info, pjDatas, rowInfo, list, materials, models, yemBdProductsid);
|
||||||
}
|
}
|
||||||
//客户需求单配件
|
//客户需求单配件
|
||||||
|
|
||||||
// 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)) && "P".equals(businesssort)) {
|
// 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)) && "P".equals(businesssort)) {
|
||||||
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)) {
|
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")) {
|
||||||
pjFindPrice(yem_exrate, info, pjDatas, rowInfo, list, materials, models, yemBdProductsid);
|
pjFindPrice(yem_exrate, info, pjDatas, rowInfo, list, materials, models, yemBdProductsid);
|
||||||
}
|
}
|
||||||
rowInfo++;
|
rowInfo++;
|
||||||
@ -331,15 +366,7 @@ 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 != null && multiconfig.size() > 0) {
|
|
||||||
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++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user