共享模块问题处理

This commit is contained in:
zhangzhiguo 2025-07-10 13:51:58 +08:00
parent 8a588d1ad0
commit a6e469197d
3 changed files with 41 additions and 28 deletions

View File

@ -71,9 +71,14 @@ public class TaskApproveFormCkPlugin extends AbstractFormPlugin {
log.info("TaskApproveFormCkPluginsscid "+customParams.get("sscid")); log.info("TaskApproveFormCkPluginsscid "+customParams.get("sscid"));
log.info("TaskApproveFormCkPluginbillnumber "+customParams.get("billnumber")); log.info("TaskApproveFormCkPluginbillnumber "+customParams.get("billnumber"));
log.info("TaskApproveFormCkPluginbillid "+customParams.get("billid")); log.info("TaskApproveFormCkPluginbillid "+customParams.get("billid"));
billtypeid = (Long)customParams.get("billtypeid");//单据类型id //billtypeid = (Long)customParams.get("billtypeid");//单据类型id
tasktypeid = (Long)customParams.get("tasktypeid");//任务类型id tasktypeid = (Long)customParams.get("tasktypeid");//任务类型id
Object sscidObj = customParams.get("sscid");
if(sscidObj instanceof Long) {
sscid = (Long)sscidObj;
}else if(sscidObj instanceof String) {
sscid = Long.valueOf((String)customParams.get("sscid"));//任务类型id sscid = Long.valueOf((String)customParams.get("sscid"));//任务类型id
}
billnumber = (String)customParams.get("billnumber");//单据编码单据标识 entityName billnumber = (String)customParams.get("billnumber");//单据编码单据标识 entityName
billid = (String)customParams.get("billid");//业务单据id billid = (String)customParams.get("billid");//业务单据id
billNo = VoucherUtil.getTaskBillNo(billid);//业务单据编号 billNo = VoucherUtil.getTaskBillNo(billid);//业务单据编号

View File

@ -235,11 +235,16 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
} }
public static Set<LocalDate> getWorkingDays(LocalDate startDate, LocalDate endDate) { public static Set<LocalDate> getWorkingDays(LocalDate startDate, LocalDate endDate) {
Set<LocalDate> workingDays = new HashSet<>();
if (startDate.equals(endDate)) {
if (!isWeekend(startDate)) {
workingDays.add(startDate);
}
return workingDays;
}else{
if (startDate.isAfter(endDate)) { if (startDate.isAfter(endDate)) {
throw new IllegalArgumentException("开始日期不能晚于结束日期"); throw new IllegalArgumentException("开始日期不能晚于结束日期");
} }
Set<LocalDate> workingDays = new HashSet<>();
LocalDate currentDate = startDate; LocalDate currentDate = startDate;
while (!currentDate.isAfter(endDate)) { while (!currentDate.isAfter(endDate)) {
@ -248,10 +253,11 @@ public class TriprAutoCalWorkingDaysPlugin extends AbstractBillPlugIn implements
} }
currentDate = currentDate.plusDays(1); currentDate = currentDate.plusDays(1);
} }
return workingDays; return workingDays;
} }
}
private static boolean isWeekend(LocalDate date) { private static boolean isWeekend(LocalDate date) {
return date.getDayOfWeek() == DayOfWeek.SATURDAY || date.getDayOfWeek() == DayOfWeek.SUNDAY; return date.getDayOfWeek() == DayOfWeek.SATURDAY || date.getDayOfWeek() == DayOfWeek.SUNDAY;
} }

View File

@ -65,6 +65,7 @@ public class TripreimbursebillUpOp extends AbstractOperationServicePlugIn {
DynamicObjectCollection dynamicObjectCollection = dynamicObject.getDynamicObjectCollection("entryentity"); DynamicObjectCollection dynamicObjectCollection = dynamicObject.getDynamicObjectCollection("entryentity");
for (DynamicObject dy : dynamicObjectCollection) { for (DynamicObject dy : dynamicObjectCollection) {
DynamicObject expenseObj = dy.getDynamicObject("expenseitem"); DynamicObject expenseObj = dy.getDynamicObject("expenseitem");
if(expenseObj!=null){
String expenseitem = expenseObj.getString("number"); String expenseitem = expenseObj.getString("number");
if(zskey.equals(expenseitem)){ if(zskey.equals(expenseitem)){
BigDecimal orientryamount = dy.getBigDecimal("orientryamount");//报销金额 BigDecimal orientryamount = dy.getBigDecimal("orientryamount");//报销金额
@ -84,6 +85,7 @@ public class TripreimbursebillUpOp extends AbstractOperationServicePlugIn {
} }
} }
} }
}
trip++; trip++;
} }
} }