From d0b3bc0463f6707abb1019ccb5982b699bc52f1a Mon Sep 17 00:00:00 2001 From: xuhaihui <2098865055@qq.com> Date: Tue, 23 Dec 2025 14:27:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=90=E6=96=99=E6=94=B6=E5=8F=91=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E8=A1=A8=E4=BC=98=E5=8C=96=E7=B3=BB=E7=BB=9F=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/WarehouseReportQueryPluginExt.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/report/WarehouseReportQueryPluginExt.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/report/WarehouseReportQueryPluginExt.java index 5cd4462..adbd63c 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/report/WarehouseReportQueryPluginExt.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/report/WarehouseReportQueryPluginExt.java @@ -32,6 +32,9 @@ import kd.bos.servicehelper.org.OrgUnitServiceHelper; import kd.ec.basedata.common.utils.CurrencyHelper; import org.jetbrains.annotations.NotNull; +/** + * 材料收发统计表二开系统查询插件,源插件:kd.ec.material.report.WarehouseReportQueryPlugin + */ public class WarehouseReportQueryPluginExt extends AbstractReportListDataPlugin { private static final String[] sumFieldArr = new String[]{"initqty", "initamtoftax", "initamtofnotax", "inqty", "inamtofnotax", "inamtoftax", "outqty", "outamtoftax", "outamtofnotax", "stockqty", "stockamtoftax", "stockamtofnotax"}; private static final List commonSelectFieldList = (List) Stream.of("materialnumber", " modelnum", "calculateunit", "lotnum", "initqty", "initamtoftax", "initamtofnotax", "inqty", "inamtofnotax", "inamtoftax", "outqty", "outamtoftax", "outamtofnotax", "stockqty", "stockamtoftax", "stockamtofnotax", "project", "unitproject", "warehouse").collect(Collectors.toList()); @@ -382,7 +385,9 @@ public class WarehouseReportQueryPluginExt extends AbstractReportListDataPlugin } private DataSet getMaterialInitDataSet(List inFilter, DynamicObject orgCurrency, DynamicObject exRateTable) { - String materialInString = "billno,project,warehouse,entryentity.material.resource.name as resourcename,entryentity.material.resource as resource,entryentity.material as materialnumber,entryentity.modelnum as modelnum,entryentity.measureunit as calculateunit,entryentity.lot as lotnum,case when transtype.type='INCREASE' then entryentity.qty when transtype.type='REDUCE' then 0-entryentity.qty else 0 end as initqty,case when transtype.type='INCREASE' then entryentity.oftaxamount when transtype.type='REDUCE' then 0-entryentity.oftaxamount else 0 end as initamtoftax,case when transtype.type='INCREASE' then entryentity.notaxamount when transtype.type='REDUCE' then 0-entryentity.notaxamount else 0 end as initamtofnotax,currency,unitprojectpro as unitproject"; + //entryentity.notaxamount更换为entryentity.amount + String materialInString = "billno,project,warehouse,entryentity.material.resource.name as resourcename,entryentity.material.resource as resource,entryentity.material as materialnumber,entryentity.modelnum as modelnum,entryentity.measureunit as calculateunit,entryentity.lot as lotnum,case when transtype.type='INCREASE' then entryentity.qty when transtype.type='REDUCE' then 0-entryentity.qty else 0 end as initqty,case when transtype.type='INCREASE' then entryentity.oftaxamount when transtype.type='REDUCE' then 0-entryentity.oftaxamount else 0 end as initamtoftax,case when transtype.type='INCREASE' then entryentity.amount when transtype.type='REDUCE' then 0-entryentity.amount else 0 end as initamtofnotax,currency,unitprojectpro as unitproject";//二开替代 +// String materialInString = "billno,project,warehouse,entryentity.material.resource.name as resourcename,entryentity.material.resource as resource,entryentity.material as materialnumber,entryentity.modelnum as modelnum,entryentity.measureunit as calculateunit,entryentity.lot as lotnum,case when transtype.type='INCREASE' then entryentity.qty when transtype.type='REDUCE' then 0-entryentity.qty else 0 end as initqty,case when transtype.type='INCREASE' then entryentity.oftaxamount when transtype.type='REDUCE' then 0-entryentity.oftaxamount else 0 end as initamtoftax,case when transtype.type='INCREASE' then entryentity.notaxamount when transtype.type='REDUCE' then 0-entryentity.notaxamount else 0 end as initamtofnotax,currency,unitprojectpro as unitproject";//源码 inFilter.add(new QFilter("matbilltype", "=", "materialin")); inFilter.add(new QFilter("transtype.type", "!=", "UNIMPACT")); DataSet materialInDataSet = QueryServiceHelper.queryDataSet(this.getClass().getName(), "ecma_materialinbill", materialInString, (QFilter[]) inFilter.toArray(new QFilter[inFilter.size()]), ""); @@ -511,7 +516,9 @@ public class WarehouseReportQueryPluginExt extends AbstractReportListDataPlugin } private DataSet getMaterialInInOutDataSet(List inFilter, DynamicObject orgCurrency, DynamicObject exRateTable) { - String materialInString = "billno,project,warehouse,entryentity.material.resource.name as resourcename,entryentity.material.resource as resource,entryentity.material as materialnumber,entryentity.modelnum as modelnum,entryentity.measureunit as calculateunit,entryentity.lot as lotnum,case when transtype.type='INCREASE' then entryentity.qty when transtype.type='REDUCE' then 0-entryentity.qty else 0 end as inqty,0 as outqty,case when transtype.type='INCREASE' then entryentity.oftaxamount when transtype.type='REDUCE' then 0-entryentity.oftaxamount else 0 end as inamtoftax,case when transtype.type='INCREASE' then entryentity.notaxamount when transtype.type='REDUCE' then 0-entryentity.notaxamount else 0 end as inamtofnotax,0 as outamtoftax,0 as outamtofnotax,currency,unitprojectpro as unitproject"; + //entryentity.notaxamount更换为entryentity.amount + String materialInString = "billno,project,warehouse,entryentity.material.resource.name as resourcename,entryentity.material.resource as resource,entryentity.material as materialnumber,entryentity.modelnum as modelnum,entryentity.measureunit as calculateunit,entryentity.lot as lotnum,case when transtype.type='INCREASE' then entryentity.qty when transtype.type='REDUCE' then 0-entryentity.qty else 0 end as inqty,0 as outqty,case when transtype.type='INCREASE' then entryentity.oftaxamount when transtype.type='REDUCE' then 0-entryentity.oftaxamount else 0 end as inamtoftax,case when transtype.type='INCREASE' then entryentity.amount when transtype.type='REDUCE' then 0-entryentity.amount else 0 end as inamtofnotax,0 as outamtoftax,0 as outamtofnotax,currency,unitprojectpro as unitproject";//二开替代 +// String materialInString = "billno,project,warehouse,entryentity.material.resource.name as resourcename,entryentity.material.resource as resource,entryentity.material as materialnumber,entryentity.modelnum as modelnum,entryentity.measureunit as calculateunit,entryentity.lot as lotnum,case when transtype.type='INCREASE' then entryentity.qty when transtype.type='REDUCE' then 0-entryentity.qty else 0 end as inqty,0 as outqty,case when transtype.type='INCREASE' then entryentity.oftaxamount when transtype.type='REDUCE' then 0-entryentity.oftaxamount else 0 end as inamtoftax,case when transtype.type='INCREASE' then entryentity.notaxamount when transtype.type='REDUCE' then 0-entryentity.notaxamount else 0 end as inamtofnotax,0 as outamtoftax,0 as outamtofnotax,currency,unitprojectpro as unitproject";//源码 inFilter.add(new QFilter("matbilltype", "=", "materialin")); inFilter.add(new QFilter("transtype.type", "!=", "UNIMPACT")); DataSet materialInDataSet = QueryServiceHelper.queryDataSet(this.getClass().getName(), "ecma_materialinbill", materialInString, (QFilter[]) inFilter.toArray(new QFilter[inFilter.size()]), ""); @@ -582,7 +589,9 @@ public class WarehouseReportQueryPluginExt extends AbstractReportListDataPlugin } private DataSet getMaterialInStockDataSet(List inFilter, DynamicObject orgCurrency, DynamicObject exRateTable) { - String materialInString = "billno,project,warehouse,entryentity.material.resource.name as resourcename,entryentity.material.resource as resource,entryentity.material as materialnumber,entryentity.modelnum as modelnum,entryentity.measureunit as calculateunit,entryentity.lot as lotnum,case when transtype.type='INCREASE' then entryentity.qty when transtype.type='REDUCE' then 0-entryentity.qty else 0 end as stockqty,case when transtype.type='INCREASE' then entryentity.oftaxamount when transtype.type='REDUCE' then 0-entryentity.oftaxamount else 0 end as stockamtoftax,case when transtype.type='INCREASE' then entryentity.notaxamount when transtype.type='REDUCE' then 0-entryentity.notaxamount else 0 end as stockamtofnotax,currency,unitprojectpro as unitproject"; + //entryentity.notaxamount更换为entryentity.amount + String materialInString = "billno,project,warehouse,entryentity.material.resource.name as resourcename,entryentity.material.resource as resource,entryentity.material as materialnumber,entryentity.modelnum as modelnum,entryentity.measureunit as calculateunit,entryentity.lot as lotnum,case when transtype.type='INCREASE' then entryentity.qty when transtype.type='REDUCE' then 0-entryentity.qty else 0 end as stockqty,case when transtype.type='INCREASE' then entryentity.oftaxamount when transtype.type='REDUCE' then 0-entryentity.oftaxamount else 0 end as stockamtoftax,case when transtype.type='INCREASE' then entryentity.amount when transtype.type='REDUCE' then 0-entryentity.amount else 0 end as stockamtofnotax,currency,unitprojectpro as unitproject";//二开替代 +// String materialInString = "billno,project,warehouse,entryentity.material.resource.name as resourcename,entryentity.material.resource as resource,entryentity.material as materialnumber,entryentity.modelnum as modelnum,entryentity.measureunit as calculateunit,entryentity.lot as lotnum,case when transtype.type='INCREASE' then entryentity.qty when transtype.type='REDUCE' then 0-entryentity.qty else 0 end as stockqty,case when transtype.type='INCREASE' then entryentity.oftaxamount when transtype.type='REDUCE' then 0-entryentity.oftaxamount else 0 end as stockamtoftax,case when transtype.type='INCREASE' then entryentity.notaxamount when transtype.type='REDUCE' then 0-entryentity.notaxamount else 0 end as stockamtofnotax,currency,unitprojectpro as unitproject";//源码 inFilter.add(new QFilter("matbilltype", "=", "materialin")); inFilter.add(new QFilter("transtype.type", "!=", "UNIMPACT")); DataSet materialInDataSet = QueryServiceHelper.queryDataSet(this.getClass().getName(), "ecma_materialinbill", materialInString, (QFilter[]) inFilter.toArray(new QFilter[inFilter.size()]), "");