报销单发票乘车日期校验
This commit is contained in:
parent
e1e19e03d8
commit
f3453565e9
|
@ -18,7 +18,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 无合同付款申请单(对公报销单)合同必录校验
|
||||
* 无合同付款申请单(对公报销单)入库单和
|
||||
*/
|
||||
public class PublicBillContractCkOp extends AbstractOperationServicePlugIn {
|
||||
|
||||
|
@ -31,6 +31,8 @@ public class PublicBillContractCkOp extends AbstractOperationServicePlugIn {
|
|||
e.getFieldKeys().add("zcgj_nocontract");//合同付款类型 无合同付款 NOCONTRACT , 合同付款 CONTRACT
|
||||
e.getFieldKeys().add("contractentry");//关联合同
|
||||
e.getFieldKeys().add("zcgj_bizype");//业务类型
|
||||
e.getFieldKeys().add("zcgj_maintenanceackentry");//设备维修
|
||||
e.getFieldKeys().add("zcgj_materialinbillentry");//入库单
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -87,8 +87,8 @@ public class TripreimbursebillIsInvoiceDateCheckOp extends AbstractOperationServ
|
|||
for (DynamicObject invoice : invoiceentry) {
|
||||
i++;
|
||||
String invoicetype = invoice.getString("invoicetype");
|
||||
if("9".equals(invoicetype) || "10".equals(invoicetype)){ // 火车/飞机发票
|
||||
Date carrierDate = invoice.getDate("carrierdate"); // 乘车日期
|
||||
Date carrierDate = invoice.getDate("carrierdate"); // 乘车日期
|
||||
if(carrierDate != null){
|
||||
// 校验1: 是否在行程时间范围内
|
||||
boolean inTripRange = false;
|
||||
for (DynamicObject trip : tripentry) {
|
||||
|
@ -116,28 +116,6 @@ public class TripreimbursebillIsInvoiceDateCheckOp extends AbstractOperationServ
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*if(writeoffapply!=null&&writeoffapply.size()==1){
|
||||
DynamicObject writeoffapplyObj = writeoffapply.get(0);
|
||||
Date zcgjGlsqAuditdate = writeoffapplyObj.getDate("zcgj_glsq_auditdate");
|
||||
DynamicObjectCollection invoiceentry = dataEntity.getDynamicObjectCollection("invoiceentry");
|
||||
Map<String, LocalDate> invoiceDateMap = new HashMap<>();
|
||||
for (DynamicObject invoiceentryObject : invoiceentry) {
|
||||
if (invoiceentryObject.getDate("invoicedate") != null && invoiceentryObject.getString("invoiceno") != null &&
|
||||
!StringUtils.isEmpty(invoiceentryObject.getString("invoiceno"))) {
|
||||
invoiceDateMap.put(invoiceentryObject.getString("invoiceno"),dateToLocalDate(invoiceentryObject.getDate("invoicedate")));
|
||||
}
|
||||
}
|
||||
for (String invoiceno : invoiceDateMap.keySet()) {
|
||||
LocalDate invoiceDate = invoiceDateMap.get(invoiceno);
|
||||
if (zcgjGlsqAuditdate!=null && invoiceDate.isBefore(dateToLocalDate(zcgjGlsqAuditdate))) {
|
||||
// System.out.println("date1 比 date2 早");
|
||||
this.addFatalErrorMessage(extendedDataEntity, String.format("发票号码为:%s的发票,开票日期不能早于关联申请的审核时间!",invoiceno));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue