|
|
@@ -8936,13 +8936,18 @@ namespace Dongke.IBOSS.PRD.Service.ReportModuleLogic
|
|
|
" ,decode(gid, 3, '合计【' || t.procedurename || '】', t.procedurename) procedurename\n" +
|
|
|
" ,t.Goodstypeid2\n" +
|
|
|
" ,t.Goodstypecode2\n" +
|
|
|
- " ,decode(gid, 1, '小计【' || t.Goodstypename2 || '】', t.Goodstypename2) Goodstypename2\n" +
|
|
|
+ " ,t.Goodstypename2\n" +
|
|
|
+ //" ,decode(gid, 1, '小计【' || t.Goodstypename2 || '】', t.Goodstypename2) Goodstypename2\n" +
|
|
|
+ " ,t.userid\n" +
|
|
|
+ " ,t.usercode\n" +
|
|
|
" ,t.Goodsid\n" +
|
|
|
" ,t.Goodscode\n" +
|
|
|
" ,t.InCount\n" +
|
|
|
" from (select grouping_id(inp.productionlineid\n" +
|
|
|
" ,inp.ProcedureID\n" +
|
|
|
- " ,gt2.Goodstypeid\n" +
|
|
|
+ //" ,gt2.Goodstypeid\n" +
|
|
|
+ //" ,gt.Goodstypeid\n" +
|
|
|
+ " ,inp.userid\n" +
|
|
|
" ,inp.Goodsid) gid\n" +
|
|
|
" ,inp.productionlineid\n" +
|
|
|
" ,pline.productionlinecode\n" +
|
|
|
@@ -8950,10 +8955,15 @@ namespace Dongke.IBOSS.PRD.Service.ReportModuleLogic
|
|
|
" ,inp.ProcedureID\n" +
|
|
|
" ,p.procedurecode\n" +
|
|
|
" ,p.procedurename\n" +
|
|
|
- " ,gt2.GoodstypeID GoodstypeID2\n" +
|
|
|
- " ,gt2.Goodstypecode Goodstypecode2\n" +
|
|
|
- " ,gt2.Goodstypename Goodstypename2\n" +
|
|
|
+ //" ,gt2.GoodstypeID GoodstypeID2\n" +
|
|
|
+ //" ,gt2.Goodstypecode Goodstypecode2\n" +
|
|
|
+ //" ,gt2.Goodstypename Goodstypename2\n" +
|
|
|
+ " ,gt.GoodstypeID GoodstypeID2\n" +
|
|
|
+ " ,gt.Goodstypecode Goodstypecode2\n" +
|
|
|
+ " ,gt.Goodstypename Goodstypename2\n" +
|
|
|
" ,inp.Goodsid\n" +
|
|
|
+ " ,inp.userid\n" +
|
|
|
+ " ,u.usercode\n" +
|
|
|
" ,g.Goodscode\n" +
|
|
|
" ,count(barcode) as InCount\n" +
|
|
|
" from tp_pm_inproduction inp\n" +
|
|
|
@@ -8967,9 +8977,9 @@ namespace Dongke.IBOSS.PRD.Service.ReportModuleLogic
|
|
|
" on inp.goodsid = g.Goodsid\n" +
|
|
|
" inner join TP_MST_GoodsType gt\n" +
|
|
|
" on g.GoodsTypeID = gt.GoodsTypeID\n" +
|
|
|
- " inner join TP_MST_GoodsType gt2\n" +
|
|
|
- " on gt.accountid = gt2.accountid\n" +
|
|
|
- " and substr(gt.Goodstypecode, 0, 6) = gt2.Goodstypecode\n" +
|
|
|
+ //" inner join TP_MST_GoodsType gt2\n" +
|
|
|
+ //" on gt.accountid = gt2.accountid\n" +
|
|
|
+ //" and substr(gt.Goodstypecode, 0, 6) = gt2.Goodstypecode\n" +
|
|
|
" where inp.AccountID = 1\n" +
|
|
|
" and inp.valueflag = '1'\n";
|
|
|
|
|
|
@@ -8995,8 +9005,10 @@ namespace Dongke.IBOSS.PRD.Service.ReportModuleLogic
|
|
|
parameters.Add(new OracleParameter(":GoodsCode", OracleDbType.NVarchar2, se.GoodsCode, ParameterDirection.Input));
|
|
|
}
|
|
|
|
|
|
- sqlString += " group by grouping sets((inp.productionlineid, pline.productionlinecode, pline.productionlinename, inp.ProcedureID, p.procedurecode, p.procedurename, gt2.Goodstypeid, gt2.Goodstypecode, gt2.Goodstypename, inp.Goodsid, g.Goodscode),(inp.productionlineid, pline.productionlinecode, pline.productionlinename, inp.ProcedureID, p.procedurecode, p.procedurename, gt2.Goodstypeid, gt2.Goodstypecode, gt2.Goodstypename),(inp.productionlineid, pline.productionlinecode, pline.productionlinename, inp.ProcedureID, p.procedurecode, p.procedurename),())) t";
|
|
|
-
|
|
|
+ //sqlString += " group by grouping sets((inp.productionlineid, pline.productionlinecode, pline.productionlinename, inp.ProcedureID, p.procedurecode, p.procedurename, gt2.Goodstypeid, gt2.Goodstypecode, gt2.Goodstypename, inp.Goodsid, g.Goodscode),(inp.productionlineid, pline.productionlinecode, pline.productionlinename, inp.ProcedureID, p.procedurecode, p.procedurename, gt2.Goodstypeid, gt2.Goodstypecode, gt2.Goodstypename),(inp.productionlineid, pline.productionlinecode, pline.productionlinename, inp.ProcedureID, p.procedurecode, p.procedurename),())) t";
|
|
|
+ //sqlString += " group by grouping sets((inp.productionlineid, pline.productionlinecode, pline.productionlinename, inp.ProcedureID, p.procedurecode, p.procedurename, gt.Goodstypeid, gt.Goodstypecode, gt.Goodstypename, inp.Goodsid, g.Goodscode),(inp.productionlineid, pline.productionlinecode, pline.productionlinename, inp.ProcedureID, p.procedurecode, p.procedurename, gt.Goodstypeid, gt.Goodstypecode, gt.Goodstypename),(inp.productionlineid, pline.productionlinecode, pline.productionlinename, inp.ProcedureID, p.procedurecode, p.procedurename),())) t";
|
|
|
+ sqlString += " group by grouping sets((inp.productionlineid, pline.productionlinecode, pline.productionlinename, inp.ProcedureID, p.procedurecode, p.procedurename,inp.userid,u.usercode, gt.Goodstypeid, gt.Goodstypecode, gt.Goodstypename, inp.Goodsid, g.Goodscode),(inp.productionlineid, pline.productionlinecode, pline.productionlinename, inp.ProcedureID, p.procedurecode, p.procedurename),())) t";
|
|
|
+ sqlString += " order by t.procedurename, t.usercode, t.Goodstypecode2, t.Goodscode";
|
|
|
return sqlString;
|
|
|
}
|
|
|
|
|
|
@@ -9144,8 +9156,7 @@ namespace Dongke.IBOSS.PRD.Service.ReportModuleLogic
|
|
|
" left join TP_MST_Logo on TP_PM_InProduction.logoid=TP_MST_Logo.logoid " +
|
|
|
" left join TP_MST_Goods on tp_pm_inproduction.goodsid=TP_MST_Goods.Goodsid " +
|
|
|
" left join TP_MST_GoodsType on TP_MST_Goods.GoodsTypeID=TP_MST_GoodsType.GoodsTypeID" +
|
|
|
- " Where 1=1 and TP_PM_InProduction.ValueFlag = 1 " +
|
|
|
- " and TP_PM_InProduction.AccountID=:AccountID ";
|
|
|
+ " Where TP_PM_InProduction.AccountID=:AccountID ";
|
|
|
|
|
|
return selSql;
|
|
|
}
|