企业成本核算表单自动取数逻辑优化
This commit is contained in:
parent
645588997d
commit
e4c5e0cdc5
|
|
@ -105,6 +105,34 @@ public class EntCostSplitBillPlugin extends AbstractBillPlugIn {
|
||||||
Object costType = zcgj_accountcost != null ? zcgj_accountcost.get("zcgj_acccostentry.zcgj_costtype") : null; // 成本项
|
Object costType = zcgj_accountcost != null ? zcgj_accountcost.get("zcgj_acccostentry.zcgj_costtype") : null; // 成本项
|
||||||
Object secType = zcgj_accountcost != null ? zcgj_accountcost.get("zcgj_acccostentry.zcgj_sectype") : null; // 二级分类
|
Object secType = zcgj_accountcost != null ? zcgj_accountcost.get("zcgj_acccostentry.zcgj_sectype") : null; // 二级分类
|
||||||
|
|
||||||
|
// 替换原有的单一条件检查代码,使用以下代码块:
|
||||||
|
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)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
String uniqueKey = "";
|
String uniqueKey = "";
|
||||||
if (processName != null && !processName.isEmpty()) {
|
if (processName != null && !processName.isEmpty()) {
|
||||||
// 存在工序时,按照工序+成本项+二级分类去重
|
// 存在工序时,按照工序+成本项+二级分类去重
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue