1.取消日期计算差判断
This commit is contained in:
parent
41634c7726
commit
02efc0db6d
@ -43,9 +43,12 @@ public class CsrCreditLineTask extends AbstractTask {
|
||||
for (DynamicObject object : collection) {
|
||||
Date receivableDate = object.getDate("yem_paydate1");
|
||||
if (receivableDate == null) continue;
|
||||
BigDecimal yem_amountowed = object.getBigDecimal("yem_amountowed");
|
||||
if(yem_amountowed.compareTo(BigDecimal.ZERO)>0){
|
||||
data(object, receivableDate, "yem_countpayback");
|
||||
}
|
||||
}
|
||||
}
|
||||
SaveServiceHelper.save(csrcreditlines);
|
||||
|
||||
DynamicObject[] storagetrans = BusinessDataServiceHelper.load("yem_es_storagetrans", "id, billno, yem_creditdetail, yem_creditdetail.yem_paydate1, yem_creditdetail.yem_countpayback", null);
|
||||
@ -86,7 +89,7 @@ public class CsrCreditLineTask extends AbstractTask {
|
||||
*/
|
||||
private static void data(DynamicObject object, Date receivableDate, String yemCountpayback) {
|
||||
Date date = new Date();
|
||||
if (date.after(receivableDate)) {
|
||||
// if (receivableDate.after(date)) {
|
||||
// 计算它们之间的时间差(毫秒),然后转换为天
|
||||
// long diffInMillis = receivableDate.getTime() - date.getTime();
|
||||
// long diffInDays = TimeUnit.DAYS.convert(diffInMillis, TimeUnit.MILLISECONDS);
|
||||
@ -95,6 +98,6 @@ public class CsrCreditLineTask extends AbstractTask {
|
||||
LocalDate over = receivableDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
long diffInDays = over.toEpochDay() - start.toEpochDay();
|
||||
object.set(yemCountpayback, diffInDays);
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user