费用报销单往来家居检查操作

This commit is contained in:
zhangzhiguo 2025-09-29 13:49:10 +08:00
parent a87f8845cf
commit 5bf3fff630
1 changed files with 93 additions and 84 deletions

View File

@ -35,6 +35,7 @@ public class DailyreimbursHomeCheckOp extends AbstractOperationServicePlugIn {
e.getFieldKeys().add("zcgj_is_home");
e.getFieldKeys().add("applier");
e.getFieldKeys().add("zcgj_homeentity");
e.getFieldKeys().add("costcompany");
}
@Override
@ -46,9 +47,9 @@ public class DailyreimbursHomeCheckOp extends AbstractOperationServicePlugIn {
//当前切换选择的组织
Long currentOrgId = RequestContext.get().getOrgId();
//当前所在的组织是属于矿山下的
if(OrgCheckUtils.isKS(currentOrgId)){
//if(OrgCheckUtils.isKS(currentOrgId)){
e.getValidators().add(new ValidatorExt());
}
// }
}
class ValidatorExt extends AbstractValidator {
@ -59,10 +60,13 @@ public class DailyreimbursHomeCheckOp extends AbstractOperationServicePlugIn {
Map<Long,Map<String,Object>> allMap = new HashMap<>();
//当前提交的探亲单据id集合
Map<Long,List<Long>> currentBillIdListMap = new HashMap<>();
for (ExtendedDataEntity extendedDataEntity : extendedDataEntities) {
DynamicObject dataEntity = extendedDataEntity.getDataEntity();
long aLong = dataEntity.getLong("id");
DynamicObject companyObj = (DynamicObject) dataEntity.get("costcompany");//核算组织(费用承担公司)
if (companyObj != null) {
Long companyId = companyObj.getLong("id");
if (OrgCheckUtils.isKS(companyId)) {
//获取报销人
DynamicObject applier = dataEntity.getDynamicObject("applier");
long applierId = applier.getLong("id");
@ -92,7 +96,10 @@ public class DailyreimbursHomeCheckOp extends AbstractOperationServicePlugIn {
monthTime = row.getInteger("monthTime");
}
if(monthTime != 0){
DynamicObjectCollection tripentry = dataEntity.getDynamicObjectCollection("zcgj_homeentity");//oa流程分录
DynamicObjectCollection tripentry = dataEntity.getDynamicObjectCollection("zcgj_homeentity");//
if(tripentry==null || tripentry.isEmpty()){
this.addFatalErrorMessage(extendedDataEntity, String.format("请录入往来居家明细!"));
}
Map<String,Integer> homeentityCountMap = new HashMap<>();
int i = 1;
boolean isOk=true;
@ -165,6 +172,8 @@ public class DailyreimbursHomeCheckOp extends AbstractOperationServicePlugIn {
}
}
}
}
}
// 判断归属月份是否与开始时间或结束时间的月份相同
public static boolean checkBelongMonth(String belongMonth, String startDate, String endDate) {
// 比较归属月份是否与开始时间或结束时间的月份相同