资金计划参考数和实际数日期范围修改为三个月
This commit is contained in:
parent
71a5e81a17
commit
e3b8498afa
|
|
@ -138,17 +138,17 @@ public class FundPlanCollectionTask extends AbstractTask implements Plugin {
|
|||
Calendar cal = Calendar.getInstance();
|
||||
//设置日期为本月1号
|
||||
cal.set(Calendar.DAY_OF_MONTH, 1);
|
||||
//将日期减去一月份得到上月1号
|
||||
cal.add(Calendar.MONTH, -1);
|
||||
//获取上月1号的日期
|
||||
//将日期减去二月份得到上上月1号
|
||||
cal.add(Calendar.MONTH, -2);
|
||||
//获取上上月1号的日期
|
||||
Date lastMonthFirstDay = cal.getTime();
|
||||
//日期格式
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
||||
JSONArray IT_LIST = new JSONArray();
|
||||
String duedate_starts = sdf.format(lastMonthFirstDay);//TODO 上月1号-取出纳模块的当前期间的1号
|
||||
String duedate_starts = sdf.format(lastMonthFirstDay);//上月1号-后续考虑取出纳模块的当前期间的1号
|
||||
String duedate_ends = sdf.format(new Date());//系统当前日期
|
||||
// addFilterCondition(IT_LIST, "BUDAT", duedate_starts, duedate_ends);//过账日期-上月和当前月
|
||||
addFilterCondition(IT_LIST, "BUDAT", "20240101", "20241231");//TODO 测试指定日期
|
||||
addFilterCondition(IT_LIST, "BUDAT", duedate_starts, duedate_ends);//过账日期-上月和当前月
|
||||
// addFilterCondition(IT_LIST, "BUDAT", "20240101", "20241231");//测试指定日期
|
||||
JSONObject sapresult = SapUtils.sapARClearedDataAPI(IT_LIST, "FundPlanCollectionTask");
|
||||
if(sapresult != null){
|
||||
JSONObject data = sapresult.getJSONObject("data");
|
||||
|
|
|
|||
|
|
@ -82,11 +82,11 @@ public class FundPlanPaymentTask extends AbstractTask implements Plugin {
|
|||
//自动触发调用保存操作,现在测试出来,前台保存后,才会有这个维度分录
|
||||
doinfo = BusinessDataServiceHelper.loadSingle(doinfo.getPkValue(),entityName);
|
||||
OperationServiceHelper.executeOperate("save", entityName, new DynamicObject[]{doinfo}, option);
|
||||
try {
|
||||
Thread.sleep(1000);//休眠1秒后再去加载对象
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
// try {
|
||||
// Thread.sleep(1000);//休眠1秒后再去加载对象
|
||||
// } catch (InterruptedException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
doinfo = BusinessDataServiceHelper.loadSingle(doinfo.getPkValue(),entityName);
|
||||
maindimentrys = doinfo.getDynamicObjectCollection("maindimentry");//主维度分录
|
||||
if(maindimentrys.isEmpty()){
|
||||
|
|
@ -165,8 +165,8 @@ public class FundPlanPaymentTask extends AbstractTask implements Plugin {
|
|||
//将日期加三月份得到一个季度后的1号
|
||||
cal.add(Calendar.MONTH, 3);
|
||||
String duedate_ends = sdf.format(cal.getTime());
|
||||
// addFilterCondition(IT_LIST, "FAEDT", duedate_starts, duedate_ends);//到期日
|
||||
addFilterCondition(IT_LIST, "FAEDT", "20241101", duedate_ends);//到期日
|
||||
addFilterCondition(IT_LIST, "FAEDT", duedate_starts, duedate_ends);//到期日
|
||||
// addFilterCondition(IT_LIST, "FAEDT", "20241101", duedate_ends);//到期日
|
||||
// addFilterCondition(IT_LIST, "BELNR", "1900000004", "1900000004");//测试debug 增加科目编号过滤
|
||||
JSONObject sapresult = SapUtils.vouchers_payable(IT_LIST, "FundPlanPaymentTask");
|
||||
if(sapresult != null){
|
||||
|
|
|
|||
Loading…
Reference in New Issue