Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
88dd902f21
|
|
@ -406,9 +406,13 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn impl
|
|||
|
||||
this.addItemClickListeners("receiveentrytoolbar");//收款信息 增行
|
||||
|
||||
EntryGrid entryGrid = this.getView().getControl("zcgj_materialinbillentry");//入库单分录
|
||||
if (entryGrid != null) {
|
||||
entryGrid.addHyperClickListener(this);
|
||||
EntryGrid zcgj_materialinbillentry = this.getView().getControl("zcgj_materialinbillentry");//入库单分录
|
||||
if (zcgj_materialinbillentry != null) {
|
||||
zcgj_materialinbillentry.addHyperClickListener(this);
|
||||
}
|
||||
EntryGrid zcgj_maintenanceackentry = this.getView().getControl("zcgj_maintenanceackentry");//维修确认单分录
|
||||
if (zcgj_maintenanceackentry != null) {
|
||||
zcgj_maintenanceackentry.addHyperClickListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -417,12 +421,21 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn impl
|
|||
public void hyperLinkClick(HyperLinkClickEvent hyperLinkClickEvent) {
|
||||
String fieldName = hyperLinkClickEvent.getFieldName();
|
||||
if (StringUtils.equals(fieldName, "zcgj_materialinbill") || StringUtils.equals(fieldName, "zcgj_materialinbillname")) {
|
||||
//打开入库单
|
||||
int rowIndex = hyperLinkClickEvent.getRowIndex();
|
||||
DynamicObjectCollection materialInBillEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("zcgj_materialinbillentry");//入库单分录
|
||||
DynamicObject materialInBillEntry = materialInBillEntryCollection.get(rowIndex);
|
||||
Object zcgj_purchaseapply_f7 = materialInBillEntry.getDynamicObject("zcgj_materialinbill").getPkValue();
|
||||
BillShowParameter billShowParameter = OpenPageUtils.buildBillShowParam(zcgj_purchaseapply_f7, "ecma_materialinbill");//入库单
|
||||
this.getView().showForm(billShowParameter);//打开入库单
|
||||
}else if (StringUtils.equals(fieldName, "zcgj_maintenanceack") || StringUtils.equals(fieldName, "zcgj_maintenanceackname")) {
|
||||
//打开设备维修确认单
|
||||
int rowIndex = hyperLinkClickEvent.getRowIndex();
|
||||
DynamicObjectCollection maintenanceAckEntryCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("zcgj_maintenanceackentry");//设备维修确认单分录
|
||||
DynamicObject maintenanceAckEntry = maintenanceAckEntryCollection.get(rowIndex);
|
||||
Object zcgj_maintenanceack_f7 = maintenanceAckEntry.getDynamicObject("zcgj_maintenanceack").getPkValue();
|
||||
BillShowParameter billShowParameter = OpenPageUtils.buildBillShowParam(zcgj_maintenanceack_f7, "zcgj_maintenanceackbill");//设备维修确认单
|
||||
this.getView().showForm(billShowParameter);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -259,19 +259,21 @@ public class EntCostSplitBillPlugin extends AbstractBillPlugIn {
|
|||
Object costType1 = entry1.get("costtype");
|
||||
Object costType2 = entry2.get("costtype");
|
||||
|
||||
// 处理null值情况 - 将null值放在前面
|
||||
if (costType1 == null && costType2 == null) return 0;
|
||||
if (costType1 == null) return -1; // null值排在前面
|
||||
if (costType2 == null) return 1; // null值排在前面
|
||||
if (costType1 == null) return -1;
|
||||
if (costType2 == null) return 1;
|
||||
|
||||
// 提取数值部分进行比较
|
||||
String value1 = costType1.toString().replaceAll("[^0-9]", "");
|
||||
String value2 = costType2.toString().replaceAll("[^0-9]", "");
|
||||
String str1 = costType1.toString().trim();
|
||||
String str2 = costType2.toString().trim();
|
||||
|
||||
int num1 = value1.isEmpty() ? 0 : Integer.parseInt(value1);
|
||||
int num2 = value2.isEmpty() ? 0 : Integer.parseInt(value2);
|
||||
Integer sortValue1 = COST_TYPE_SORT_MAP.get(str1);
|
||||
Integer sortValue2 = COST_TYPE_SORT_MAP.get(str2);
|
||||
|
||||
return Integer.compare(num1, num2);
|
||||
if (sortValue1 == null && sortValue2 == null) return 0;
|
||||
if (sortValue1 == null) return 1;
|
||||
if (sortValue2 == null) return -1;
|
||||
|
||||
return sortValue1.compareTo(sortValue2);
|
||||
});
|
||||
|
||||
// 按排序后的顺序添加数据
|
||||
|
|
@ -301,4 +303,19 @@ public class EntCostSplitBillPlugin extends AbstractBillPlugIn {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final Map<String, Integer> COST_TYPE_SORT_MAP = new HashMap<>();
|
||||
|
||||
static {
|
||||
COST_TYPE_SORT_MAP.put("10.", 10);
|
||||
COST_TYPE_SORT_MAP.put("20.", 20);
|
||||
COST_TYPE_SORT_MAP.put("30.", 30);
|
||||
COST_TYPE_SORT_MAP.put("40.", 40);
|
||||
COST_TYPE_SORT_MAP.put("50.", 50);
|
||||
COST_TYPE_SORT_MAP.put("60.", 60);
|
||||
COST_TYPE_SORT_MAP.put("70.", 70);
|
||||
COST_TYPE_SORT_MAP.put("80.", 80);
|
||||
COST_TYPE_SORT_MAP.put("90.", 90);
|
||||
COST_TYPE_SORT_MAP.put("100.", 100);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ import kd.bos.orm.query.QFilter;
|
|||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.QueryServiceHelper;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -67,9 +69,13 @@ public class MaterialInBillDateSubValidatorOp extends AbstractOperationServicePl
|
|||
DynamicObject ecma_purchaseapply = BusinessDataServiceHelper.loadSingle("ecma_purchaseapply", "auditdate", qFilters);//采购申请
|
||||
Date auditdate = ecma_purchaseapply.getDate("auditdate");//采购申请-审核时间
|
||||
Date bizdate = ecma_MaterialInBill.getDate("bizdate");//业务日期
|
||||
if (auditdate != null && bizdate != null && auditdate.after(bizdate)) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "采购申请单:" + zcgj_number + "的审批日期不能晚于业务日期!");
|
||||
continue;
|
||||
if (auditdate != null && bizdate != null) {
|
||||
LocalDate auditLocalDate = auditdate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
LocalDate bizLocalDate = bizdate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
if (auditLocalDate.isAfter(bizLocalDate)) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "采购申请单" + zcgj_number + "的审批日期不能晚于业务日期!");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
DynamicObjectCollection zcgj_entryentityCollection = ecma_MaterialInBill.getDynamicObjectCollection("zcgj_entryentity");//合同进项发票信息
|
||||
if (zcgj_entryentityCollection.size() > 0) {
|
||||
|
|
@ -78,8 +84,12 @@ public class MaterialInBillDateSubValidatorOp extends AbstractOperationServicePl
|
|||
if (zcgj_invoice != null) {
|
||||
Date invoicedate = zcgj_invoice.getDate("invoicedate");//发票号码-开票日期
|
||||
String billno = zcgj_invoice.getString("billno");
|
||||
if (invoicedate != null && auditdate != null && auditdate.after(invoicedate)) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "采购申请单:" + zcgj_number + "的审批日期不能晚于发票:" + billno + "的开票日期!");
|
||||
if (auditdate != null && invoicedate != null) {
|
||||
LocalDate auditLocalDate = auditdate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
LocalDate bizLocalDate = invoicedate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
if (auditLocalDate.isAfter(bizLocalDate)) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "采购申请单" + zcgj_number + "的审批日期不能晚于发票" + billno + "的开票日期!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -95,9 +105,13 @@ public class MaterialInBillDateSubValidatorOp extends AbstractOperationServicePl
|
|||
DynamicObject ecma_purchaseapply = BusinessDataServiceHelper.loadSingle("ecma_purchaseapply", "auditdate", qFilters);//采购申请
|
||||
Date auditdate = ecma_purchaseapply.getDate("auditdate");//采购申请-审核时间
|
||||
Date bizdate = ecma_MaterialInBill.getDate("bizdate");//业务日期
|
||||
if (auditdate != null && bizdate != null && auditdate.after(bizdate)) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "采购申请的审批日期不能晚于业务日期!");
|
||||
continue;
|
||||
if (auditdate != null && bizdate != null) {
|
||||
LocalDate auditLocalDate = auditdate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
LocalDate bizLocalDate = bizdate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
if (auditLocalDate.isAfter(bizLocalDate)) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "采购申请的审批日期不能晚于业务日期!");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
DynamicObjectCollection zcgj_entryentityCollection = ecma_MaterialInBill.getDynamicObjectCollection("zcgj_entryentity");//合同进项发票信息
|
||||
if (zcgj_entryentityCollection.size() > 0) {
|
||||
|
|
@ -106,8 +120,12 @@ public class MaterialInBillDateSubValidatorOp extends AbstractOperationServicePl
|
|||
if (zcgj_invoice != null) {
|
||||
Date invoicedate = zcgj_invoice.getDate("invoicedate");//发票号码-开票日期
|
||||
String billno = zcgj_invoice.getString("billno");
|
||||
if (invoicedate != null && auditdate != null && auditdate.after(invoicedate)) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "采购申请的审批日期不能晚于发票:" + billno + "的开票日期!");
|
||||
if (auditdate != null && invoicedate != null) {
|
||||
LocalDate auditLocalDate = auditdate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
LocalDate bizLocalDate = invoicedate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
if (auditLocalDate.isAfter(bizLocalDate)) {
|
||||
this.addFatalErrorMessage(extendedDataEntity, "采购申请的审批日期不能晚于发票" + billno + "的开票日期!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue