Merge branch 'fix-report-zzs' into test
This commit is contained in:
commit
0c6187c580
@ -60,6 +60,8 @@ public class CompleteShipDetailReportPlugin extends AbstractReportListDataPlugin
|
||||
Date start = filter.getDate("yem_fshipdate_start");
|
||||
Date end = filter.getDate("yem_fshipdate_end");
|
||||
|
||||
String fisshiped = filter.getString("yem_fisshiped");
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("1=1");
|
||||
if (YEM.isNotEmpty(start)) {
|
||||
@ -68,6 +70,14 @@ public class CompleteShipDetailReportPlugin extends AbstractReportListDataPlugin
|
||||
if (YEM.isNotEmpty(end)) {
|
||||
sb.append(" AND TO_DATE(yem_shipdate, 'yyyy-MM-dd') <= ").append(String.format("TO_DATE('%s','yyyy-MM-dd')", formatDate(end)));
|
||||
}
|
||||
if (YEM.isNotEmpty(fisshiped)) {
|
||||
if ("A".equals(fisshiped)) {//已发货
|
||||
sb.append(" AND yem_dnbillno IS NOT NULL AND yem_dnbillno != '' ");
|
||||
}
|
||||
if ("B".equals(fisshiped)) {//未发货
|
||||
sb.append(" AND yem_dnbillno IS NULL OR yem_dnbillno = ''");
|
||||
}
|
||||
}
|
||||
|
||||
dataSet = dataSet.where(sb.toString());
|
||||
|
||||
|
@ -95,7 +95,7 @@ public class ShipmentsChedulePlugin extends AbstractReportListDataPlugin {
|
||||
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("yem_customsdeclaration1 = 'A'");
|
||||
sb.append("yem_customsdeclaration1 = 'B'");
|
||||
if (YEM.isNotEmpty(yemContract)) {
|
||||
sb.append(" AND yem_contractnumber like '").append("%").append(yemContract).append("%").append("'");
|
||||
}
|
||||
|
@ -0,0 +1,74 @@
|
||||
package com.yem.wm.im.materialpriceing;
|
||||
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.entity.datamodel.IDataModel;
|
||||
import kd.bos.entity.datamodel.events.ChangeData;
|
||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author ljw
|
||||
* @date 2024/9/6 10:05
|
||||
* @description materialPriceingPlugin
|
||||
*/
|
||||
public class materialPriceingPlugin extends AbstractBillPlugIn {
|
||||
@Override
|
||||
public void propertyChanged(PropertyChangedArgs e) {
|
||||
super.propertyChanged(e);
|
||||
super.propertyChanged(e);
|
||||
String name = e.getProperty().getName();
|
||||
ChangeData[] changeSet = e.getChangeSet();
|
||||
switch (name) {
|
||||
case "yem_from":
|
||||
yemFrom(e);
|
||||
break;
|
||||
case "yem_reach":
|
||||
yemReach(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 至不允许小于等于从
|
||||
*
|
||||
* @param e
|
||||
*/
|
||||
private void yemReach(PropertyChangedArgs e) {
|
||||
ChangeData changeData = e.getChangeSet()[0];
|
||||
int rowIndex = changeData.getRowIndex();
|
||||
int parentRowIndex = changeData.getParentRowIndex();
|
||||
BigDecimal newValue = (BigDecimal) changeData.getNewValue();
|
||||
DynamicObjectCollection yemBdLogistics = this.getModel().getEntryEntity("yem_entryentity");
|
||||
BigDecimal bigDecimal = yemBdLogistics.get(parentRowIndex).getDynamicObjectCollection("yem_subentryentity").get(rowIndex).getBigDecimal("yem_from");
|
||||
if (bigDecimal.compareTo(newValue) >= 0) {
|
||||
|
||||
this.getModel().setValue("yem_reach",0,rowIndex,parentRowIndex);
|
||||
|
||||
this.getView().showMessage("至不允许小于等于从!!!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从不能小于前一行的至
|
||||
*
|
||||
* @param e
|
||||
*/
|
||||
private void yemFrom(PropertyChangedArgs e) {
|
||||
ChangeData changeData = e.getChangeSet()[0];
|
||||
int rowIndex = changeData.getRowIndex();
|
||||
if (rowIndex - 1 < 0) {
|
||||
return;
|
||||
}
|
||||
int parentRowIndex = changeData.getParentRowIndex();
|
||||
BigDecimal newValue = (BigDecimal) changeData.getNewValue();
|
||||
DynamicObjectCollection yemBdLogistics = this.getModel().getEntryEntity("yem_entryentity");
|
||||
BigDecimal bigDecimal = yemBdLogistics.get(parentRowIndex).getDynamicObjectCollection("yem_subentryentity").get(rowIndex - 1).getBigDecimal("yem_reach");
|
||||
if (bigDecimal.compareTo(newValue) > 0) {
|
||||
|
||||
this.getModel().setValue("yem_from",0,rowIndex,parentRowIndex);
|
||||
this.getView().showMessage("从不能小于前一行的至!!!");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user