fix:
1.外销合同签订日期默认当前时间
This commit is contained in:
parent
245796ff51
commit
54877d0c88
@ -24,7 +24,6 @@ import static com.yem.rf.utils.RFUtils.*;
|
||||
|
||||
/**
|
||||
* @Description: 整机发运明细表
|
||||
* @link: <a href="https://docs.qq.com/sheet/DTEd5V2hGZU1MWW13?tab=000002">https://docs.qq.com/sheet/DTEd5V2hGZU1MWW13?tab=000002</>
|
||||
* @Date: 2024/7/26 10:30
|
||||
* @Created: by ZZSLL
|
||||
*/
|
||||
@ -45,11 +44,11 @@ public class CompleteShipDetailReportPlugin extends AbstractReportListDataPlugin
|
||||
.finish();
|
||||
dataSet = dataSet.where("yem_salesorderno IS NOT NULL AND yem_salesorderno != ''");
|
||||
|
||||
DataSet declaredocx = queryDeclareDocx(param);
|
||||
dataSet = dataSet.leftJoin(declaredocx)
|
||||
.on("yem_dnbillno", "main_detail_id_declaredocx_fk")
|
||||
.select(RptUtil.getDataSetFiledAlias(dataSet), RptUtil.getDataSetFiledAlias(declaredocx))
|
||||
.finish();
|
||||
// DataSet declaredocx = queryDeclareDocx(param);
|
||||
// dataSet = dataSet.leftJoin(declaredocx)
|
||||
// .on("main_detail_id", "main_detail_id_decl-aredocx_fk")
|
||||
// .select(RptUtil.getDataSetFiledAlias(dataSet), RptUtil.getDataSetFiledAlias(declaredocx))
|
||||
// .finish();
|
||||
|
||||
DataSet storagetrans = queryStorageTrans(param);
|
||||
dataSet = dataSet.leftJoin(storagetrans)
|
||||
@ -128,7 +127,6 @@ public class CompleteShipDetailReportPlugin extends AbstractReportListDataPlugin
|
||||
selectfields.add("yem_es_materialinfo.id main_detail_id");
|
||||
selectfields.add("id main_id");
|
||||
selectfields.add("billno yem_salesorderno");
|
||||
selectfields.add("yem_operator");
|
||||
selectfields.add("yem_customer yem_custom");
|
||||
selectfields.add("yem_currency yem_currency");
|
||||
selectfields.add("yem_es_materialinfo.yem_productmodel.yem_products.id yem_product");//产品机型
|
||||
@ -579,13 +577,10 @@ public class CompleteShipDetailReportPlugin extends AbstractReportListDataPlugin
|
||||
private DataSet queryDeclareDocx(ReportQueryParam param) {
|
||||
QFilter qFilter = getBaseQFilter(new String[]{"B", "C"});
|
||||
ArrayList<String> selectfields = Lists.newArrayList();
|
||||
// selectfields.add("yem_es_materialinfo.yem_coreentryid main_detail_id_declaredocx_fk");
|
||||
selectfields.add("yem_es_materialinfo.yem_sgnenumber main_detail_id_declaredocx_fk");
|
||||
selectfields.add("yem_es_materialinfo.yem_coreentryid main_detail_id_declaredocx_fk");
|
||||
selectfields.add("TO_CHAR(yem_invoicedate, 'yyyy-MM-dd') yem_invoicedate");//开票日期
|
||||
|
||||
DataSet yemEsDeclaredocx = ORM.create().queryDataSet(algoKey, "yem_es_declaredocx", String.join(",", selectfields), qFilter.toArray());
|
||||
yemEsDeclaredocx = yemEsDeclaredocx.distinct();
|
||||
return yemEsDeclaredocx;
|
||||
return ORM.create().queryDataSet(algoKey, "yem_es_declaredocx", String.join(",", selectfields), qFilter.toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,9 @@
|
||||
package com.yem.wm.es.xsalesorder.from;
|
||||
|
||||
import com.yem.wm.utils.DynamicObjectUtil;
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.entity.botp.runtime.BFRow;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.entity.datamodel.IDataModel;
|
||||
import kd.bos.entity.datamodel.RowDataEntity;
|
||||
import kd.bos.entity.datamodel.events.AfterAddRowEventArgs;
|
||||
@ -13,10 +14,8 @@ import kd.bos.form.events.AfterDoOperationEventArgs;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.botp.BFTrackerServiceHelper;
|
||||
|
||||
import java.util.EventObject;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhouc
|
||||
@ -93,13 +92,29 @@ public class XSalesOrderFromEdit extends AbstractBillPlugIn {
|
||||
String name = e.getEntryProp().getName();
|
||||
int[] rowIndexs = e.getRowIndexs();
|
||||
if ("yem_es_materialinfo".equals(name)) {
|
||||
for (int rowIndex : rowIndexs) {
|
||||
Long yem_sourceentryid = (Long) model.getValue("yem_sourceentryid", rowIndex);
|
||||
List<BFRow> loadSourceRowIds = BFTrackerServiceHelper.loadSourceRowIds("yem_es_salesorder", name, new Long[]{yem_sourceentryid});
|
||||
List<BFRow> loadTargetRowIds = BFTrackerServiceHelper.loadTargetRowIds("yem_es_salesorder", name, new Long[]{yem_sourceentryid});
|
||||
if (loadTargetRowIds.size() > 0) {
|
||||
e.setCancel(true);//阻断增行
|
||||
view.showTipNotification("该分录已存在下游,禁止删除。");
|
||||
for(int rowIndex : rowIndexs){
|
||||
Long yem_sourceentryid = (Long)model.getValue("yem_sourceentryid",rowIndex);
|
||||
// List<BFRow> loadSourceRowIds = BFTrackerServiceHelper.loadSourceRowIds("yem_es_salesorder", name,new Long[]{yem_sourceentryid} );
|
||||
// List<BFRow> loadTargetRowIds = BFTrackerServiceHelper.loadTargetRowIds("yem_es_salesorder"
|
||||
// , name,new Long[]{(long)model.getValue("yem_masterid")},new Long[]{yem_sourceentryid} ,null);
|
||||
String selectfield = DynamicObjectUtil.getSelectfields("yem_es_salesorder", false);
|
||||
String selectfields = DynamicObjectUtil.getEntrySelectfields(selectfield, "yem_es_salesorder", "yem_es_materialinfo", false);
|
||||
DynamicObject loadSingle = BusinessDataServiceHelper.loadSingle("yem_es_salesorder", selectfields
|
||||
, new QFilter[]{new QFilter("id", QCP.equals, model.getValue("yem_masterid"))});
|
||||
if (loadSingle!=null) {
|
||||
DynamicObjectCollection yemEsMaterialinfo = loadSingle.getDynamicObjectCollection("yem_es_materialinfo");
|
||||
if (!yemEsMaterialinfo.isEmpty()){
|
||||
for (DynamicObject dynamicObject : yemEsMaterialinfo) {
|
||||
long aLong = dynamicObject.getLong("id");
|
||||
if (aLong == yem_sourceentryid){
|
||||
String yemIntauditbusano = dynamicObject.getString("yem_intauditbusano");
|
||||
if (!"".equals(yemIntauditbusano)){
|
||||
e.setCancel(true);//阻断增行
|
||||
view.showTipNotification("第"+(rowIndex+1)+"行分录已存在下游,禁止删除。");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user