审批流程预测审批人提醒

This commit is contained in:
zhangzhiguo 2025-03-28 18:07:26 +08:00
parent 483b2fc098
commit 28002f5310
2 changed files with 13 additions and 4 deletions

View File

@ -65,7 +65,11 @@ public class EmpTravelRptDetailListPlugin extends AbstractFormPlugin implements
for (Row row : tripreimbursebillHome) {
DynamicObject dynamicObject = zcgjKccbList.addNew();
dynamicObject.set("zcgj_bill_type","差旅报销单");
dynamicObject.set("zcgj_type","往来居家");
if(row.getBoolean("ishome")){
dynamicObject.set("zcgj_type","往来居家");
}else{
dynamicObject.set("zcgj_type","差旅报销");
}
dynamicObject.set("zcgj_billno",row.getString("billno"));
Date startdate = row.getDate("startdate");
dynamicObject.set("zcgj_start_date",startdate);
@ -166,14 +170,15 @@ public class EmpTravelRptDetailListPlugin extends AbstractFormPlugin implements
//查询申请人下的今年的探亲差旅单据
List<QFilter> searchFilterList = new ArrayList<>();
searchFilterList.add(new QFilter("applier", QCP.equals, applierId));
searchFilterList.add(new QFilter( "zcgj_is_include_home", QCP.equals, true));
//searchFilterList.add(new QFilter( "zcgj_is_include_home", QCP.equals, true));
searchFilterList.add(new QFilter( "zcgj_kccbdays", QCP.large_than, 0));
searchFilterList.add(new QFilter("billstatus", QCP.in, billStatuslist));
searchFilterList.add( new QFilter("bizdate", QCP.large_equals, firstDayOfMonth));
searchFilterList.add( new QFilter("bizdate", QCP.less_equals, lastDayOfMonth));
DataSet dateSet = QueryServiceHelper.queryDataSet(
this.getClass().getName(),
"er_tripreimbursebill",
"id,applier,billno,zcgj_homeentity.zcgj_startdate as startdate,zcgj_homeentity.zcgj_enddate as enddate,zcgj_homeentity.zcgj_kccbdaycount as kccbdaycount" ,
"id,applier,billno,zcgj_is_include_home as ishome,zcgj_homeentity.zcgj_startdate as startdate,zcgj_homeentity.zcgj_enddate as enddate,zcgj_homeentity.zcgj_kccbdaycount as kccbdaycount" ,
searchFilterList.toArray(new QFilter [] {}), null
);
return dateSet;

View File

@ -12,6 +12,7 @@ import kd.bos.logging.LogFactory;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.QueryServiceHelper;
import kd.bos.servicehelper.org.OrgUnitServiceHelper;
import kd.bos.servicehelper.user.UserServiceHelper;
import java.math.BigDecimal;
@ -89,6 +90,8 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin {
//获取公司下的所有人
List<Long> orgIds = new ArrayList<>();
orgIds.add(orgId);
//获取当前组织的所有下级组织
List<Long> subOrgIds = OrgUnitServiceHelper.getAllSubordinateOrgs(1L, orgIds, true);
List<Long> allUsersOfOrg = UserServiceHelper.getAllUsersOfOrg(orgIds);
if(!applierId.isEmpty()){
//通过查询用户过滤组织下的人
@ -193,7 +196,8 @@ public class EmpTravelRptQueryPlugin extends AbstractReportListDataPlugin {
//查询申请人下的今年的探亲差旅单据
List<QFilter> searchFilterList = new ArrayList<>();
searchFilterList.add(new QFilter("applier", QCP.equals, applierId));
searchFilterList.add(new QFilter( "zcgj_is_include_home", QCP.equals, true));
//searchFilterList.add(new QFilter( "zcgj_is_include_home", QCP.equals, true));
searchFilterList.add(new QFilter( "zcgj_kccbdays", QCP.large_than, 0));
searchFilterList.add(new QFilter("billstatus", QCP.in, billStatuslist));
searchFilterList.add( new QFilter("bizdate", QCP.large_equals, firstDay));
searchFilterList.add( new QFilter("bizdate", QCP.less_equals, lastDay));