优化企业成本核算
This commit is contained in:
parent
b412b5f31c
commit
c260c57ac7
|
|
@ -160,27 +160,17 @@ public class EntCostSplitBillPlugin extends AbstractBillPlugIn implements Before
|
|||
String secTypeName = "";
|
||||
String costTypeName = "";
|
||||
if (secType != null) {
|
||||
if (secType instanceof DynamicObject) {
|
||||
DynamicObject secTypeObj = (DynamicObject) secType;
|
||||
secTypeName = secTypeObj.getString("name");
|
||||
} else {
|
||||
secTypeName = secType.toString();
|
||||
}
|
||||
}
|
||||
if (costType != null) {
|
||||
if (costType instanceof DynamicObject) {
|
||||
DynamicObject costTypeObj = (DynamicObject) costType;
|
||||
costTypeName = costTypeObj.getString("name");
|
||||
} else {
|
||||
costTypeName = costType.toString();
|
||||
}
|
||||
}
|
||||
|
||||
// 如果二级分类为"70.55"且成本项为"70",则对该行的成本金额进行扣减
|
||||
if ("70.55".equals(secTypeName) && "70.".equals(costTypeName)) {
|
||||
QFilter filter5 = new QFilter("billstatus", QCP.equals, "C");//单据状态
|
||||
filter5.and(new QFilter("zcgj_entryentity.zcgj_assperiod", QCP.equals, period1.getPkValue()));//折旧期间
|
||||
filter5.and(new QFilter("zcgj_entryentity.zcgj_headusedept", QCP.equals, org1.getPkValue()));//使用部门
|
||||
filter5.and(new QFilter("zcgj_entryentity.zcgj_zjuseorg", QCP.equals, org1.getPkValue()));//使用组织
|
||||
DynamicObject eceq_equipinfo = QueryServiceHelper.queryOne("eceq_equipinfo",
|
||||
"id,zcgj_entryentity.zcgj_shareamount",
|
||||
new QFilter[]{filter5});//"设备详情"
|
||||
|
|
@ -306,6 +296,7 @@ public class EntCostSplitBillPlugin extends AbstractBillPlugIn implements Before
|
|||
if (costtype == null) {
|
||||
continue;
|
||||
}
|
||||
entry.set("comment", costtype);
|
||||
entryCollection.add(entry);
|
||||
}
|
||||
|
||||
|
|
@ -335,15 +326,21 @@ public class EntCostSplitBillPlugin extends AbstractBillPlugIn implements Before
|
|||
private static final Map<String, Integer> COST_TYPE_SORT_MAP = new HashMap<>();
|
||||
|
||||
static {
|
||||
COST_TYPE_SORT_MAP.put("10.", 10);//人工成本
|
||||
COST_TYPE_SORT_MAP.put("10", 10); // 支持无点的情况
|
||||
COST_TYPE_SORT_MAP.put("10.0", 10);
|
||||
COST_TYPE_SORT_MAP.put("10.00", 10);
|
||||
COST_TYPE_SORT_MAP.put("10. ", 10); // 带空格
|
||||
COST_TYPE_SORT_MAP.put("10 .", 10);
|
||||
COST_TYPE_SORT_MAP.put("20.", 20);
|
||||
COST_TYPE_SORT_MAP.put("30.", 30);
|
||||
COST_TYPE_SORT_MAP.put("40.", 40);
|
||||
COST_TYPE_SORT_MAP.put("50.", 50);
|
||||
COST_TYPE_SORT_MAP.put("60.", 60);
|
||||
COST_TYPE_SORT_MAP.put("70.", 70);
|
||||
COST_TYPE_SORT_MAP.put("80.", 80);
|
||||
COST_TYPE_SORT_MAP.put("90.", 90);
|
||||
COST_TYPE_SORT_MAP.put("100.", 100);
|
||||
|
||||
COST_TYPE_SORT_MAP.put("20.", 20);//材料成本
|
||||
COST_TYPE_SORT_MAP.put("30.", 30);//机械设备
|
||||
COST_TYPE_SORT_MAP.put("40.", 40);//分包成本
|
||||
COST_TYPE_SORT_MAP.put("50.", 50);//劳务成本
|
||||
COST_TYPE_SORT_MAP.put("60.", 60);//安全支出
|
||||
COST_TYPE_SORT_MAP.put("70.", 70);//期间费用
|
||||
COST_TYPE_SORT_MAP.put("80.", 80);//税金及附加
|
||||
COST_TYPE_SORT_MAP.put("90.", 90);//财务费用
|
||||
COST_TYPE_SORT_MAP.put("100.", 100);//研发支出
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue