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()]), "");