设备成本核算和材料成本核算添加成本期间范围过滤条件
This commit is contained in:
parent
c81122c3ab
commit
e6d0ff8bca
|
|
@ -390,21 +390,12 @@ public class EntCostSplitBillPlugin extends AbstractBillPlugIn implements Before
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
entryCollection.clear();
|
|
||||||
StringBuilder costTypeBuilder = new StringBuilder();
|
|
||||||
for (int i = 0; i < sortedEntries.size(); i++) {
|
|
||||||
DynamicObject dynamicObject = sortedEntries.get(i);
|
|
||||||
String costtype = dynamicObject.getString("costtype");
|
|
||||||
|
|
||||||
if (i > 0) {
|
|
||||||
costTypeBuilder.append("+");
|
|
||||||
}
|
|
||||||
costTypeBuilder.append(costtype);
|
|
||||||
}
|
|
||||||
String mergedCostTypes = costTypeBuilder.toString();
|
|
||||||
this.getModel().setValue("description", mergedCostTypes);
|
|
||||||
// 按排序后的顺序添加数据
|
// 按排序后的顺序添加数据
|
||||||
entryCollection.addAll(sortedEntries);
|
for (int i = 0; i < sortedEntries.size(); i++) {
|
||||||
|
DynamicObject entry = sortedEntries.get(i);
|
||||||
|
entry.set("seq", i + 1);
|
||||||
|
entryCollection.add(entry);
|
||||||
|
}
|
||||||
|
|
||||||
this.getModel().endInit();
|
this.getModel().endInit();
|
||||||
OperateOption option = OperateOption.create();
|
OperateOption option = OperateOption.create();
|
||||||
|
|
@ -414,34 +405,4 @@ public class EntCostSplitBillPlugin extends AbstractBillPlugIn implements Before
|
||||||
this.getView().showSuccessNotification("已完成取数");
|
this.getView().showSuccessNotification("已完成取数");
|
||||||
this.getView().invokeOperation("refresh");//刷新全局页面
|
this.getView().invokeOperation("refresh");//刷新全局页面
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Integer getSortValue(String type) {
|
|
||||||
if ("10.".equals(type)) return 10;
|
|
||||||
if ("20.".equals(type)) return 20;
|
|
||||||
if ("30.".equals(type)) return 30;
|
|
||||||
if ("40.".equals(type)) return 40;
|
|
||||||
if ("50.".equals(type)) return 50;
|
|
||||||
if ("60.".equals(type)) return 60;
|
|
||||||
if ("70.".equals(type)) return 70;
|
|
||||||
if ("80.".equals(type)) return 80;
|
|
||||||
if ("90.".equals(type)) return 90;
|
|
||||||
if ("100.".equals(type)) return 100;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void comboItemFor(List<ValueMapItem> comboItems, List<String> item, List<ComboItem> comboItemss) {
|
|
||||||
//下拉字段过滤逻辑
|
|
||||||
ComboItem comboItem;
|
|
||||||
for (ValueMapItem valueMapItem : comboItems) {
|
|
||||||
String value = valueMapItem.getValue();
|
|
||||||
//将item1包含的key设置为可见
|
|
||||||
if (item.contains(value)) {
|
|
||||||
valueMapItem.setItemVisible(true);
|
|
||||||
comboItem = new ComboItem();
|
|
||||||
comboItem.setCaption(valueMapItem.getName());
|
|
||||||
comboItem.setValue(value);
|
|
||||||
comboItemss.add(comboItem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import kd.bos.orm.ORM;
|
||||||
import kd.bos.orm.query.QCP;
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import kd.bos.servicehelper.QueryServiceHelper;
|
||||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
import kd.bos.servicehelper.user.UserServiceHelper;
|
import kd.bos.servicehelper.user.UserServiceHelper;
|
||||||
import kd.ec.eceq.business.model.BaseConstant;
|
import kd.ec.eceq.business.model.BaseConstant;
|
||||||
|
|
@ -101,6 +102,17 @@ public class EquipmentCostSplitFormPluginExt extends EquipmentCardListPlugin{
|
||||||
|
|
||||||
settleSplit.set("contract", settleList[i].getDynamicObject("contract"));
|
settleSplit.set("contract", settleList[i].getDynamicObject("contract"));
|
||||||
settleSplit.set("period", settleList[i].getDynamicObject("period"));
|
settleSplit.set("period", settleList[i].getDynamicObject("period"));
|
||||||
|
//二开添加↓
|
||||||
|
DynamicObject period1 = settleList[i].getDynamicObject("period");
|
||||||
|
if (period1 != null) {
|
||||||
|
QFilter filter = new QFilter("zcgj_notinperiod.fbasedataid", QCP.in, period1.getPkValue());
|
||||||
|
filter.and(new QFilter("number", QCP.equals, "001"));
|
||||||
|
DynamicObject zcgj_costperiod = QueryServiceHelper.queryOne("zcgj_costperiod", "id", new QFilter[]{filter});//成本期间范围
|
||||||
|
if (zcgj_costperiod != null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//二开添加↑
|
||||||
settleSplit.set("curamount", settleList[i].get("curamount"));
|
settleSplit.set("curamount", settleList[i].get("curamount"));
|
||||||
settleSplit.set("settleid", settleList[i].getPkValue());
|
settleSplit.set("settleid", settleList[i].getPkValue());
|
||||||
QFilter settleFilter = new QFilter("settlesplitentity.settleno", "=", settleList[i].get("billno"));
|
QFilter settleFilter = new QFilter("settlesplitentity.settleno", "=", settleList[i].get("billno"));
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,10 @@ import kd.bos.list.ListFilterParameter;
|
||||||
import kd.bos.list.ListShowParameter;
|
import kd.bos.list.ListShowParameter;
|
||||||
import kd.bos.logging.Log;
|
import kd.bos.logging.Log;
|
||||||
import kd.bos.logging.LogFactory;
|
import kd.bos.logging.LogFactory;
|
||||||
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import kd.bos.servicehelper.QueryServiceHelper;
|
||||||
import kd.ec.contract.common.utils.CurrencyHelper;
|
import kd.ec.contract.common.utils.CurrencyHelper;
|
||||||
import kd.ec.cost.common.enums.BillStatusEnum;
|
import kd.ec.cost.common.enums.BillStatusEnum;
|
||||||
import kd.ec.cost.common.enums.PayDirectionEnum;
|
import kd.ec.cost.common.enums.PayDirectionEnum;
|
||||||
|
|
@ -666,6 +668,17 @@ public class MaterialCostBillPluginExt extends AbstractEccoBillPlugin implements
|
||||||
|
|
||||||
for (int var6 = 0; var6 < var5; ++var6) {
|
for (int var6 = 0; var6 < var5; ++var6) {
|
||||||
DynamicObject materialInfo = var4[var6];
|
DynamicObject materialInfo = var4[var6];
|
||||||
|
//二开添加↓
|
||||||
|
DynamicObject period1 = materialInfo.getDynamicObject("period");
|
||||||
|
if (period1 != null) {
|
||||||
|
QFilter filter = new QFilter("zcgj_notinperiod.fbasedataid", QCP.in, period1.getPkValue());
|
||||||
|
filter.and(new QFilter("number", QCP.equals, "001"));
|
||||||
|
DynamicObject zcgj_costperiod = QueryServiceHelper.queryOne("zcgj_costperiod", "id", new QFilter[]{filter});//成本期间范围
|
||||||
|
if (zcgj_costperiod != null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//二开添加↑
|
||||||
boolean isMultiCurrency = materialInfo.getBoolean("ismulticurrency");
|
boolean isMultiCurrency = materialInfo.getBoolean("ismulticurrency");
|
||||||
DynamicObjectCollection entryEntity = materialInfo.getDynamicObjectCollection("entryentity");
|
DynamicObjectCollection entryEntity = materialInfo.getDynamicObjectCollection("entryentity");
|
||||||
logger.info("创建的出/入库单: " + materialInfo.getString("billname") + "," + materialInfo.getPkValue().toString());
|
logger.info("创建的出/入库单: " + materialInfo.getString("billname") + "," + materialInfo.getPkValue().toString());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue