|
|
@@ -1450,42 +1450,276 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
|
|
|
try
|
|
|
{
|
|
|
oracleConn.Open();
|
|
|
-
|
|
|
- //2020-03-10 chenxy fix 中陶出现非必须首节点 提示 未进入生产流程,应在开始工序输入
|
|
|
- string sql1 = "select NodeType from tp_pc_procedure where procedureid=:procedureid";
|
|
|
- string NodeType1 = oracleConn.GetSqlResultToObj(sql1, new OracleParameter[] { new OracleParameter(":procedureid", procedureID) }) + "";
|
|
|
- if (NodeType1 == "1")
|
|
|
+ DataSet returnDs = new DataSet();
|
|
|
+ #region 判断是否事装具条码
|
|
|
+ #region 查询出所有Barcode
|
|
|
+ string sqlKindCar = "SELECT BARCODE FROM TP_PM_ENTRUCKINGDETAIL WHERE ENTRUCKINGCODE = :ENTRUCKINGCODE";
|
|
|
+ DataTable dtkindGoods = oracleConn.GetSqlResultToDt(sqlKindCar, new OracleParameter[] { new OracleParameter(":ENTRUCKINGCODE", barcode) });
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ if (barcode.Length != 11 || dtkindGoods != null && dtkindGoods.Rows.Count > 0)
|
|
|
{
|
|
|
- int isNodeBegin = PMModuleLogicDAL.IsNodeBegin<IDBConnection>(oracleConn, barcode);
|
|
|
- if (isNodeBegin == 1)
|
|
|
+ #region 循环调用 CheckBarcodePDA 方法内的方法
|
|
|
+ //fix end
|
|
|
+ DataTable dtBarCode = PMModuleLogic.CreateBarCodeResultTable();
|
|
|
+ foreach (DataRow drKind in dtkindGoods.Rows)
|
|
|
{
|
|
|
- return CheckBarcodeDeliverMud(procedureID, barcode, sUserInfo, true);
|
|
|
- }
|
|
|
- }
|
|
|
- //fix end
|
|
|
+ //2020-03-10 chenxy fix 中陶出现非必须首节点 提示 未进入生产流程,应在开始工序输入
|
|
|
+ string sql1 = "select NodeType from tp_pc_procedure where procedureid=:procedureid";
|
|
|
+ string NodeType1 = oracleConn.GetSqlResultToObj(sql1, new OracleParameter[] { new OracleParameter(":procedureid", procedureID) }) + "";
|
|
|
+ if (NodeType1 == "1")
|
|
|
+ {
|
|
|
+ int isNodeBegin = PMModuleLogicDAL.IsNodeBegin<IDBConnection>(oracleConn, drKind["BARCODE"].ToString());
|
|
|
+ if (isNodeBegin == 1)
|
|
|
+ {
|
|
|
+ return CheckBarcodeDeliverMud(procedureID, drKind["BARCODE"].ToString(), sUserInfo, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- DataTable dtBarCode = PMModuleLogic.CreateBarCodeResultTable();
|
|
|
- DataSet returnDs = new DataSet();
|
|
|
- DataRow dr = dtBarCode.NewRow();
|
|
|
- #region 查出工序条码类型 wangx 2017-3-13
|
|
|
|
|
|
- string sqlBarcode = GetConvertBarCode(oracleConn, barcode, procedureID, sUserInfo);
|
|
|
- if (sqlBarcode == string.Empty)
|
|
|
- {
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_errMsg.ToString()] = "无效条码";
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_missFlag.ToString()] = 0;
|
|
|
- dtBarCode.Rows.Add(dr);
|
|
|
+ DataRow dr = dtBarCode.NewRow();
|
|
|
+ #region 查出工序条码类型 wangx 2017-3-13
|
|
|
+
|
|
|
+ string sqlBarcode = GetConvertBarCode(oracleConn, drKind["BARCODE"].ToString(), procedureID, sUserInfo);
|
|
|
+ if (sqlBarcode == string.Empty)
|
|
|
+ {
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_errMsg.ToString()] = "无效条码";
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_missFlag.ToString()] = 0;
|
|
|
+ dtBarCode.Rows.Add(dr);
|
|
|
+ returnDs.Tables.Add(dtBarCode);
|
|
|
+ return returnDs;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_barcode.ToString()] = sqlBarcode;
|
|
|
+ barcode = sqlBarcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+ OracleParameter[] paras = new OracleParameter[]{
|
|
|
+ new OracleParameter("in_procedureid",OracleDbType.Int32,procedureID,ParameterDirection.Input),
|
|
|
+ new OracleParameter("in_barcode",OracleDbType.NVarchar2,drKind["BARCODE"].ToString(),ParameterDirection.Input),
|
|
|
+ new OracleParameter("out_errMsg",OracleDbType.NVarchar2,2000,null,ParameterDirection.Output),
|
|
|
+ new OracleParameter("out_goodsID",OracleDbType.Int32,ParameterDirection.Output),
|
|
|
+ new OracleParameter("out_goodsCode",OracleDbType.NVarchar2,50,null,ParameterDirection.Output),
|
|
|
+ new OracleParameter("out_goodsName",OracleDbType.NVarchar2,50,null,ParameterDirection.Output),
|
|
|
+ new OracleParameter("out_groutingUserCode",OracleDbType.NVarchar2,50,null,ParameterDirection.Output),
|
|
|
+ new OracleParameter("out_errMsg_Status",OracleDbType.Varchar2,50,"",ParameterDirection.Output),
|
|
|
+ };
|
|
|
+ oracleConn.ExecStoredProcedure("PRO_PM_CheckBarcode", paras);
|
|
|
+
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_errMsg.ToString()]
|
|
|
+ = paras[2].Value.ToString() == "null" ? "" : paras[2].Value.ToString().Replace("\\n\\r", "\n\r");
|
|
|
+
|
|
|
+ //if (!string.IsNullOrEmpty(paras[2].Value.ToString() == "null" ? "" : paras[2].Value.ToString().Replace("\\n\\r", "\n\r")))
|
|
|
+ //{
|
|
|
+ // AddBarCodeMissing(oracleConn, barcode, procedureID, sUserInfo);
|
|
|
+ //}
|
|
|
+ int missFlag = 0;
|
|
|
+ if (paras[7].Value != null && paras[7].Value.ToString() == "1")
|
|
|
+ {
|
|
|
+ missFlag = AddBarCodeMissing(oracleConn, barcode, procedureID, sUserInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_goodsID.ToString()] = paras[3].Value.ToString() == "null" ? 0 : paras[3].Value;
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_goodsCode.ToString()] = paras[4].Value.ToString() == "null" ? "" : paras[4].Value;
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_goodsName.ToString()] = paras[5].Value.ToString() == "null" ? "" : paras[5].Value;
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingUserCode.ToString()] = paras[6].Value.ToString() == "null" ? 0 : paras[6].Value;
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_missFlag.ToString()] = missFlag;
|
|
|
+ if (paras[7].Value.ToString() == "null") //只有正确的条码,读注浆信息
|
|
|
+ {
|
|
|
+ string sql = "select NodeType from tp_pc_procedure where procedureid=:procedureid";
|
|
|
+ paras = new OracleParameter[]{
|
|
|
+ new OracleParameter(":procedureid",procedureID),
|
|
|
+ };
|
|
|
+ DataSet ds = oracleConn.GetSqlResultToDs(sql, paras);
|
|
|
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
|
|
|
+ {
|
|
|
+ string sqlString = "";
|
|
|
+ int NodeType = Convert.ToInt32(ds.Tables[0].Rows[0]["NodeType"]);
|
|
|
+ //xuwei fix 2019-09-26 使用通用方法判定
|
|
|
+ // 2019-1016
|
|
|
+ //if (PMModuleLogicDAL.IsNodeBegin<IDBConnection>(oracleConn, barcode) == 1)
|
|
|
+ //{
|
|
|
+ // NodeType = (int)Constant.ProcedureNodeType.Begin;
|
|
|
+ //}
|
|
|
+ if (NodeType == (int)Constant.ProcedureNodeType.Begin)
|
|
|
+ {
|
|
|
+ int isNodeBegin = PMModuleLogicDAL.IsNodeBegin<IDBConnection>(oracleConn, drKind["BARCODE"].ToString());
|
|
|
+ if (isNodeBegin == 0)
|
|
|
+ {
|
|
|
+ NodeType = (int)Constant.ProcedureNodeType.Middle;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (NodeType == (int)Constant.ProcedureNodeType.Begin) //开始节点
|
|
|
+ {
|
|
|
+ sqlString = @"select
|
|
|
+ TP_PM_GroutingDailyDetail.UserCode as GroutingUserCode,
|
|
|
+ tp_pm_groutingdailydetail.groutingcount as GroutingNum,
|
|
|
+ tp_pm_groutingdailydetail.GroutingMouldCode as MouldCode,
|
|
|
+ 0 as ispublicbody,
|
|
|
+ tp_pm_groutingdailydetail.Groutingdate,
|
|
|
+ tp_pm_groutingdailydetail.SpecialRepairFlag,
|
|
|
+ tp_mst_logo.logoid,
|
|
|
+ tp_mst_logo.logocode,
|
|
|
+ tp_mst_logo.logoname
|
|
|
+ from tp_pm_groutingdailydetail
|
|
|
+ left join tp_mst_logo
|
|
|
+ on tp_pm_groutingdailydetail.logoid=tp_mst_logo.logoid
|
|
|
+ where tp_pm_groutingdailydetail.BarCode=:barcode";
|
|
|
+ paras = new OracleParameter[]{
|
|
|
+ new OracleParameter(":barcode",drKind["BARCODE"].ToString()),
|
|
|
+ };
|
|
|
+ ds = oracleConn.GetSqlResultToDs(sqlString, paras);
|
|
|
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
|
|
|
+ {
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingUserCode.ToString()] = ds.Tables[0].Rows[0]["GroutingUserCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingNum.ToString()] = ds.Tables[0].Rows[0]["GroutingNum"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_mouldCode.ToString()] = ds.Tables[0].Rows[0]["MouldCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_ispublicbody.ToString()] = ds.Tables[0].Rows[0]["ispublicbody"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_ispublicbodyTrach.ToString()] = "0";
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingdate.ToString()] = ds.Tables[0].Rows[0]["Groutingdate"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_specialRepairFlag.ToString()] = ds.Tables[0].Rows[0]["SpecialRepairFlag"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_isReFire.ToString()] = "0";
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoID.ToString()] = ds.Tables[0].Rows[0]["logoid"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoCode.ToString()] = ds.Tables[0].Rows[0]["logoCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoName.ToString()] = ds.Tables[0].Rows[0]["logoName"].ToString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ sqlString = @"select
|
|
|
+ TP_PM_InProduction.GroutingUserCode,
|
|
|
+ TP_PM_InProduction.GroutingNum,
|
|
|
+ TP_PM_InProduction.GroutingMouldCode as MouldCode,
|
|
|
+ TP_PM_InProduction.ispublicbody,
|
|
|
+ (select tp_pm_inproductiontrash.ispublicbody from
|
|
|
+ tp_pm_inproductiontrash where tp_pm_inproductiontrash.BarCode=:barcode) as ispublicbodyTrach,
|
|
|
+ TP_PM_InProduction.Groutingdate,
|
|
|
+ TP_PM_InProduction.SpecialRepairFlag,
|
|
|
+ TP_PM_InProduction.IsReFire,
|
|
|
+ tp_mst_logo.logoid, g.goodsid,g.goodscode,g.PlateLimitNum,
|
|
|
+ --nvl(g.MaterialCode,g.GoodsCode) as GOODSMODELforCheck, -- 用物料编码验证产品型号是否一致
|
|
|
+ nvl(gdd.MaterialCode, nvl(g.MaterialCode,g.GoodsCode)) ||'#'|| to_char(g.GOODS_LINE_TYPE) as GOODSMODELforCheck, -- 用物料编码验证产品型号是否一致
|
|
|
+ --nvl(gdd.MaterialCode, g.GoodsCode) as GOODSMODELforCheck, -- 用物料编码验证产品型号是否一致
|
|
|
+ tp_mst_logo.logocode,
|
|
|
+ tp_mst_logo.logoname,
|
|
|
+ glaze.DICTIONARYVALUE AS GLAZENAME,
|
|
|
+ --xuwei add 2020-06-11 漏气 内漏 标识
|
|
|
+ gdd.LEAKFLAG1,
|
|
|
+ gdd.LEAKFLAG2,
|
|
|
+ gdd.LEAKFLAG3,
|
|
|
+ decode(TP_PM_InProduction.SpecialRepairFlag,'1','是','0','否') as SpecialRepairflagName,
|
|
|
+ decode(TP_PM_InProduction.IsReFire,'6','是','0','否') as IsReFireName,
|
|
|
+ decode(gdd.LEAKFLAG1,'1','合格','0','不合格','未检测') as LEAKFLAG1Name,
|
|
|
+ decode(gdd.LEAKFLAG2,'1','合格','0','不合格','未检测') as LEAKFLAG2Name,
|
|
|
+ decode(gdd.LEAKFLAG3,'1','合格','0','不合格','未检测') as LEAKFLAG3Name
|
|
|
+ from TP_PM_InProduction left join TP_PM_GroutingDailyDetail gdd on gdd.GroutingDailyDetailID = tp_pm_inproduction.GroutingDailyDetailID
|
|
|
+ left join tp_mst_logo
|
|
|
+ on gdd.logoid=tp_mst_logo.logoid
|
|
|
+ LEFT JOIN TP_MST_GOODS G ON G.GoodsID = tp_pm_inproduction.goodsid
|
|
|
+ LEFT JOIN TP_MST_DataDictionary glaze ON glaze.DICTIONARYID = gdd.GLAZETYPEID
|
|
|
+ where TP_PM_InProduction.BarCode=:barcode";
|
|
|
+ paras = new OracleParameter[]{
|
|
|
+ new OracleParameter(":barcode",drKind["BARCODE"].ToString()),
|
|
|
+ };
|
|
|
+ ds = oracleConn.GetSqlResultToDs(sqlString, paras);
|
|
|
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
|
|
|
+ {
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingUserCode.ToString()] = ds.Tables[0].Rows[0]["GroutingUserCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingNum.ToString()] = ds.Tables[0].Rows[0]["GroutingNum"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_mouldCode.ToString()] = ds.Tables[0].Rows[0]["MouldCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_ispublicbody.ToString()] = ds.Tables[0].Rows[0]["ispublicbody"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_ispublicbodyTrach.ToString()] = ds.Tables[0].Rows[0]["ispublicbodyTrach"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingdate.ToString()] = ds.Tables[0].Rows[0]["Groutingdate"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_specialRepairFlag.ToString()] = ds.Tables[0].Rows[0]["SpecialRepairFlag"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_isReFire.ToString()] = ds.Tables[0].Rows[0]["IsReFire"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoID.ToString()] = ds.Tables[0].Rows[0]["logoid"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoCode.ToString()] = ds.Tables[0].Rows[0]["logoCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoName.ToString()] = ds.Tables[0].Rows[0]["logoName"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_glazeName.ToString()] = ds.Tables[0].Rows[0]["glazename"].ToString();
|
|
|
+
|
|
|
+ //增加漏气标识内漏标识 xuwei add 2020-06-11
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag1.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG1"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag2.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG2"].ToString();
|
|
|
+
|
|
|
+ // 增加干补、重烧、内漏等相关字段名称 fubin add 2020-06-30
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag3.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG3"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_specialRepairFlagName.ToString()] = ds.Tables[0].Rows[0]["SpecialRepairFlagName"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_isReFireName.ToString()] = ds.Tables[0].Rows[0]["IsReFireName"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag1Name.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG1Name"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag2Name.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG2Name"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag3Name.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG3Name"].ToString();
|
|
|
+
|
|
|
+ dr["GOODSMODELforCheck"] = ds.Tables[0].Rows[0]["GOODSMODELforCheck"].ToString();
|
|
|
+ dr["PlateLimitNum"] = ds.Tables[0].Rows[0]["PlateLimitNum"];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ dtBarCode.Rows.Add(dr);
|
|
|
+
|
|
|
+ // 获取plc重量 add by fubin 2020-7-20
|
|
|
+ if (!dtBarCode.Columns.Contains("PLCWeight"))
|
|
|
+ {
|
|
|
+ dtBarCode.Columns.Add("PLCWeight", typeof(decimal));
|
|
|
+ dtBarCode.Rows[0]["PLCWeight"] = 0;
|
|
|
+ }
|
|
|
+ // 成检交接(二检) 获取重量
|
|
|
+ if (procedureID == 104)
|
|
|
+ {
|
|
|
+ dtBarCode.Rows[0]["PLCWeight"] = Get3PLCWeight(sUserInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!dtBarCode.Columns.Contains("OtherStatus"))
|
|
|
+ {
|
|
|
+ dtBarCode.Columns.Add("OtherStatus", typeof(decimal));
|
|
|
+ dtBarCode.Rows[0]["OtherStatus"] = 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
returnDs.Tables.Add(dtBarCode);
|
|
|
- return returnDs;
|
|
|
+
|
|
|
+ #endregion
|
|
|
}
|
|
|
+ #endregion
|
|
|
else
|
|
|
{
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_barcode.ToString()] = sqlBarcode;
|
|
|
- barcode = sqlBarcode;
|
|
|
- }
|
|
|
+ //2020-03-10 chenxy fix 中陶出现非必须首节点 提示 未进入生产流程,应在开始工序输入
|
|
|
+ string sql1 = "select NodeType from tp_pc_procedure where procedureid=:procedureid";
|
|
|
+ string NodeType1 = oracleConn.GetSqlResultToObj(sql1, new OracleParameter[] { new OracleParameter(":procedureid", procedureID) }) + "";
|
|
|
+ if (NodeType1 == "1")
|
|
|
+ {
|
|
|
+ int isNodeBegin = PMModuleLogicDAL.IsNodeBegin<IDBConnection>(oracleConn, barcode);
|
|
|
+ if (isNodeBegin == 1)
|
|
|
+ {
|
|
|
+ return CheckBarcodeDeliverMud(procedureID, barcode, sUserInfo, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //fix end
|
|
|
+ DataTable dtBarCode = PMModuleLogic.CreateBarCodeResultTable();
|
|
|
|
|
|
- #endregion
|
|
|
- OracleParameter[] paras = new OracleParameter[]{
|
|
|
+ DataRow dr = dtBarCode.NewRow();
|
|
|
+ #region 查出工序条码类型 wangx 2017-3-13
|
|
|
+
|
|
|
+ string sqlBarcode = GetConvertBarCode(oracleConn, barcode, procedureID, sUserInfo);
|
|
|
+ if (sqlBarcode == string.Empty)
|
|
|
+ {
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_errMsg.ToString()] = "无效条码";
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_missFlag.ToString()] = 0;
|
|
|
+ dtBarCode.Rows.Add(dr);
|
|
|
+ returnDs.Tables.Add(dtBarCode);
|
|
|
+ return returnDs;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_barcode.ToString()] = sqlBarcode;
|
|
|
+ barcode = sqlBarcode;
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+ OracleParameter[] paras = new OracleParameter[]{
|
|
|
new OracleParameter("in_procedureid",OracleDbType.Int32,procedureID,ParameterDirection.Input),
|
|
|
new OracleParameter("in_barcode",OracleDbType.NVarchar2,barcode,ParameterDirection.Input),
|
|
|
new OracleParameter("out_errMsg",OracleDbType.NVarchar2,2000,null,ParameterDirection.Output),
|
|
|
@@ -1495,55 +1729,55 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
|
|
|
new OracleParameter("out_groutingUserCode",OracleDbType.NVarchar2,50,null,ParameterDirection.Output),
|
|
|
new OracleParameter("out_errMsg_Status",OracleDbType.Varchar2,50,"",ParameterDirection.Output),
|
|
|
};
|
|
|
- oracleConn.ExecStoredProcedure("PRO_PM_CheckBarcode", paras);
|
|
|
+ oracleConn.ExecStoredProcedure("PRO_PM_CheckBarcode", paras);
|
|
|
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_errMsg.ToString()]
|
|
|
- = paras[2].Value.ToString() == "null" ? "" : paras[2].Value.ToString().Replace("\\n\\r", "\n\r");
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_errMsg.ToString()]
|
|
|
+ = paras[2].Value.ToString() == "null" ? "" : paras[2].Value.ToString().Replace("\\n\\r", "\n\r");
|
|
|
|
|
|
- //if (!string.IsNullOrEmpty(paras[2].Value.ToString() == "null" ? "" : paras[2].Value.ToString().Replace("\\n\\r", "\n\r")))
|
|
|
- //{
|
|
|
- // AddBarCodeMissing(oracleConn, barcode, procedureID, sUserInfo);
|
|
|
- //}
|
|
|
- int missFlag = 0;
|
|
|
- if (paras[7].Value != null && paras[7].Value.ToString() == "1")
|
|
|
- {
|
|
|
- missFlag = AddBarCodeMissing(oracleConn, barcode, procedureID, sUserInfo);
|
|
|
- }
|
|
|
+ //if (!string.IsNullOrEmpty(paras[2].Value.ToString() == "null" ? "" : paras[2].Value.ToString().Replace("\\n\\r", "\n\r")))
|
|
|
+ //{
|
|
|
+ // AddBarCodeMissing(oracleConn, barcode, procedureID, sUserInfo);
|
|
|
+ //}
|
|
|
+ int missFlag = 0;
|
|
|
+ if (paras[7].Value != null && paras[7].Value.ToString() == "1")
|
|
|
+ {
|
|
|
+ missFlag = AddBarCodeMissing(oracleConn, barcode, procedureID, sUserInfo);
|
|
|
+ }
|
|
|
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_goodsID.ToString()] = paras[3].Value.ToString() == "null" ? 0 : paras[3].Value;
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_goodsCode.ToString()] = paras[4].Value.ToString() == "null" ? "" : paras[4].Value;
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_goodsName.ToString()] = paras[5].Value.ToString() == "null" ? "" : paras[5].Value;
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_groutingUserCode.ToString()] = paras[6].Value.ToString() == "null" ? 0 : paras[6].Value;
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_missFlag.ToString()] = missFlag;
|
|
|
- if (paras[7].Value.ToString() == "null") //只有正确的条码,读注浆信息
|
|
|
- {
|
|
|
- string sql = "select NodeType from tp_pc_procedure where procedureid=:procedureid";
|
|
|
- paras = new OracleParameter[]{
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_goodsID.ToString()] = paras[3].Value.ToString() == "null" ? 0 : paras[3].Value;
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_goodsCode.ToString()] = paras[4].Value.ToString() == "null" ? "" : paras[4].Value;
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_goodsName.ToString()] = paras[5].Value.ToString() == "null" ? "" : paras[5].Value;
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingUserCode.ToString()] = paras[6].Value.ToString() == "null" ? 0 : paras[6].Value;
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_missFlag.ToString()] = missFlag;
|
|
|
+ if (paras[7].Value.ToString() == "null") //只有正确的条码,读注浆信息
|
|
|
+ {
|
|
|
+ string sql = "select NodeType from tp_pc_procedure where procedureid=:procedureid";
|
|
|
+ paras = new OracleParameter[]{
|
|
|
new OracleParameter(":procedureid",procedureID),
|
|
|
};
|
|
|
- DataSet ds = oracleConn.GetSqlResultToDs(sql, paras);
|
|
|
- if (ds != null && ds.Tables[0].Rows.Count > 0)
|
|
|
- {
|
|
|
- string sqlString = "";
|
|
|
- int NodeType = Convert.ToInt32(ds.Tables[0].Rows[0]["NodeType"]);
|
|
|
- //xuwei fix 2019-09-26 使用通用方法判定
|
|
|
- // 2019-1016
|
|
|
- //if (PMModuleLogicDAL.IsNodeBegin<IDBConnection>(oracleConn, barcode) == 1)
|
|
|
- //{
|
|
|
- // NodeType = (int)Constant.ProcedureNodeType.Begin;
|
|
|
- //}
|
|
|
- if (NodeType == (int)Constant.ProcedureNodeType.Begin)
|
|
|
+ DataSet ds = oracleConn.GetSqlResultToDs(sql, paras);
|
|
|
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
|
|
|
{
|
|
|
- int isNodeBegin = PMModuleLogicDAL.IsNodeBegin<IDBConnection>(oracleConn, barcode);
|
|
|
- if (isNodeBegin == 0)
|
|
|
+ string sqlString = "";
|
|
|
+ int NodeType = Convert.ToInt32(ds.Tables[0].Rows[0]["NodeType"]);
|
|
|
+ //xuwei fix 2019-09-26 使用通用方法判定
|
|
|
+ // 2019-1016
|
|
|
+ //if (PMModuleLogicDAL.IsNodeBegin<IDBConnection>(oracleConn, barcode) == 1)
|
|
|
+ //{
|
|
|
+ // NodeType = (int)Constant.ProcedureNodeType.Begin;
|
|
|
+ //}
|
|
|
+ if (NodeType == (int)Constant.ProcedureNodeType.Begin)
|
|
|
{
|
|
|
- NodeType = (int)Constant.ProcedureNodeType.Middle;
|
|
|
+ int isNodeBegin = PMModuleLogicDAL.IsNodeBegin<IDBConnection>(oracleConn, barcode);
|
|
|
+ if (isNodeBegin == 0)
|
|
|
+ {
|
|
|
+ NodeType = (int)Constant.ProcedureNodeType.Middle;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (NodeType == (int)Constant.ProcedureNodeType.Begin) //开始节点
|
|
|
- {
|
|
|
- sqlString = @"select
|
|
|
+ if (NodeType == (int)Constant.ProcedureNodeType.Begin) //开始节点
|
|
|
+ {
|
|
|
+ sqlString = @"select
|
|
|
TP_PM_GroutingDailyDetail.UserCode as GroutingUserCode,
|
|
|
tp_pm_groutingdailydetail.groutingcount as GroutingNum,
|
|
|
tp_pm_groutingdailydetail.GroutingMouldCode as MouldCode,
|
|
|
@@ -1557,28 +1791,28 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
|
|
|
left join tp_mst_logo
|
|
|
on tp_pm_groutingdailydetail.logoid=tp_mst_logo.logoid
|
|
|
where tp_pm_groutingdailydetail.BarCode=:barcode";
|
|
|
- paras = new OracleParameter[]{
|
|
|
+ paras = new OracleParameter[]{
|
|
|
new OracleParameter(":barcode",barcode),
|
|
|
};
|
|
|
- ds = oracleConn.GetSqlResultToDs(sqlString, paras);
|
|
|
- if (ds != null && ds.Tables[0].Rows.Count > 0)
|
|
|
- {
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_groutingUserCode.ToString()] = ds.Tables[0].Rows[0]["GroutingUserCode"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_groutingNum.ToString()] = ds.Tables[0].Rows[0]["GroutingNum"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_mouldCode.ToString()] = ds.Tables[0].Rows[0]["MouldCode"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_ispublicbody.ToString()] = ds.Tables[0].Rows[0]["ispublicbody"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_ispublicbodyTrach.ToString()] = "0";
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_groutingdate.ToString()] = ds.Tables[0].Rows[0]["Groutingdate"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_specialRepairFlag.ToString()] = ds.Tables[0].Rows[0]["SpecialRepairFlag"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_isReFire.ToString()] = "0";
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_logoID.ToString()] = ds.Tables[0].Rows[0]["logoid"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_logoCode.ToString()] = ds.Tables[0].Rows[0]["logoCode"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_logoName.ToString()] = ds.Tables[0].Rows[0]["logoName"].ToString();
|
|
|
+ ds = oracleConn.GetSqlResultToDs(sqlString, paras);
|
|
|
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
|
|
|
+ {
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingUserCode.ToString()] = ds.Tables[0].Rows[0]["GroutingUserCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingNum.ToString()] = ds.Tables[0].Rows[0]["GroutingNum"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_mouldCode.ToString()] = ds.Tables[0].Rows[0]["MouldCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_ispublicbody.ToString()] = ds.Tables[0].Rows[0]["ispublicbody"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_ispublicbodyTrach.ToString()] = "0";
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingdate.ToString()] = ds.Tables[0].Rows[0]["Groutingdate"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_specialRepairFlag.ToString()] = ds.Tables[0].Rows[0]["SpecialRepairFlag"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_isReFire.ToString()] = "0";
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoID.ToString()] = ds.Tables[0].Rows[0]["logoid"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoCode.ToString()] = ds.Tables[0].Rows[0]["logoCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoName.ToString()] = ds.Tables[0].Rows[0]["logoName"].ToString();
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- sqlString = @"select
|
|
|
+ else
|
|
|
+ {
|
|
|
+ sqlString = @"select
|
|
|
TP_PM_InProduction.GroutingUserCode,
|
|
|
TP_PM_InProduction.GroutingNum,
|
|
|
TP_PM_InProduction.GroutingMouldCode as MouldCode,
|
|
|
@@ -1610,58 +1844,59 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
|
|
|
LEFT JOIN TP_MST_GOODS G ON G.GoodsID = tp_pm_inproduction.goodsid
|
|
|
LEFT JOIN TP_MST_DataDictionary glaze ON glaze.DICTIONARYID = gdd.GLAZETYPEID
|
|
|
where TP_PM_InProduction.BarCode=:barcode";
|
|
|
- paras = new OracleParameter[]{
|
|
|
+ paras = new OracleParameter[]{
|
|
|
new OracleParameter(":barcode",barcode),
|
|
|
};
|
|
|
- ds = oracleConn.GetSqlResultToDs(sqlString, paras);
|
|
|
- if (ds != null && ds.Tables[0].Rows.Count > 0)
|
|
|
- {
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_groutingUserCode.ToString()] = ds.Tables[0].Rows[0]["GroutingUserCode"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_groutingNum.ToString()] = ds.Tables[0].Rows[0]["GroutingNum"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_mouldCode.ToString()] = ds.Tables[0].Rows[0]["MouldCode"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_ispublicbody.ToString()] = ds.Tables[0].Rows[0]["ispublicbody"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_ispublicbodyTrach.ToString()] = ds.Tables[0].Rows[0]["ispublicbodyTrach"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_groutingdate.ToString()] = ds.Tables[0].Rows[0]["Groutingdate"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_specialRepairFlag.ToString()] = ds.Tables[0].Rows[0]["SpecialRepairFlag"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_isReFire.ToString()] = ds.Tables[0].Rows[0]["IsReFire"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_logoID.ToString()] = ds.Tables[0].Rows[0]["logoid"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_logoCode.ToString()] = ds.Tables[0].Rows[0]["logoCode"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_logoName.ToString()] = ds.Tables[0].Rows[0]["logoName"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_glazeName.ToString()] = ds.Tables[0].Rows[0]["glazename"].ToString();
|
|
|
-
|
|
|
- //增加漏气标识内漏标识 xuwei add 2020-06-11
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_LeakFlag1.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG1"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_LeakFlag2.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG2"].ToString();
|
|
|
-
|
|
|
- // 增加干补、重烧、内漏等相关字段名称 fubin add 2020-06-30
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_LeakFlag3.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG3"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_specialRepairFlagName.ToString()] = ds.Tables[0].Rows[0]["SpecialRepairFlagName"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_isReFireName.ToString()] = ds.Tables[0].Rows[0]["IsReFireName"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_LeakFlag1Name.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG1Name"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_LeakFlag2Name.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG2Name"].ToString();
|
|
|
- dr[Constant.BarCodeResultTableColumns.out_LeakFlag3Name.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG3Name"].ToString();
|
|
|
-
|
|
|
- dr["GOODSMODELforCheck"] = ds.Tables[0].Rows[0]["GOODSMODELforCheck"].ToString();
|
|
|
- dr["PlateLimitNum"] = ds.Tables[0].Rows[0]["PlateLimitNum"];
|
|
|
+ ds = oracleConn.GetSqlResultToDs(sqlString, paras);
|
|
|
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
|
|
|
+ {
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingUserCode.ToString()] = ds.Tables[0].Rows[0]["GroutingUserCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingNum.ToString()] = ds.Tables[0].Rows[0]["GroutingNum"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_mouldCode.ToString()] = ds.Tables[0].Rows[0]["MouldCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_ispublicbody.ToString()] = ds.Tables[0].Rows[0]["ispublicbody"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_ispublicbodyTrach.ToString()] = ds.Tables[0].Rows[0]["ispublicbodyTrach"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_groutingdate.ToString()] = ds.Tables[0].Rows[0]["Groutingdate"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_specialRepairFlag.ToString()] = ds.Tables[0].Rows[0]["SpecialRepairFlag"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_isReFire.ToString()] = ds.Tables[0].Rows[0]["IsReFire"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoID.ToString()] = ds.Tables[0].Rows[0]["logoid"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoCode.ToString()] = ds.Tables[0].Rows[0]["logoCode"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_logoName.ToString()] = ds.Tables[0].Rows[0]["logoName"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_glazeName.ToString()] = ds.Tables[0].Rows[0]["glazename"].ToString();
|
|
|
+
|
|
|
+ //增加漏气标识内漏标识 xuwei add 2020-06-11
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag1.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG1"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag2.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG2"].ToString();
|
|
|
+
|
|
|
+ // 增加干补、重烧、内漏等相关字段名称 fubin add 2020-06-30
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag3.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG3"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_specialRepairFlagName.ToString()] = ds.Tables[0].Rows[0]["SpecialRepairFlagName"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_isReFireName.ToString()] = ds.Tables[0].Rows[0]["IsReFireName"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag1Name.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG1Name"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag2Name.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG2Name"].ToString();
|
|
|
+ dr[Constant.BarCodeResultTableColumns.out_LeakFlag3Name.ToString()] = ds.Tables[0].Rows[0]["LEAKFLAG3Name"].ToString();
|
|
|
+
|
|
|
+ dr["GOODSMODELforCheck"] = ds.Tables[0].Rows[0]["GOODSMODELforCheck"].ToString();
|
|
|
+ dr["PlateLimitNum"] = ds.Tables[0].Rows[0]["PlateLimitNum"];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- dtBarCode.Rows.Add(dr);
|
|
|
-
|
|
|
- // 获取plc重量 add by fubin 2020-7-20
|
|
|
- if (!dtBarCode.Columns.Contains("PLCWeight"))
|
|
|
- {
|
|
|
- dtBarCode.Columns.Add("PLCWeight", typeof(decimal));
|
|
|
- dtBarCode.Rows[0]["PLCWeight"] = 0;
|
|
|
- }
|
|
|
- // 成检交接(二检) 获取重量
|
|
|
- if (procedureID == 104)
|
|
|
- {
|
|
|
- dtBarCode.Rows[0]["PLCWeight"] = Get3PLCWeight(sUserInfo);
|
|
|
- }
|
|
|
+ dtBarCode.Rows.Add(dr);
|
|
|
|
|
|
- returnDs.Tables.Add(dtBarCode);
|
|
|
+ // 获取plc重量 add by fubin 2020-7-20
|
|
|
+ if (!dtBarCode.Columns.Contains("PLCWeight"))
|
|
|
+ {
|
|
|
+ dtBarCode.Columns.Add("PLCWeight", typeof(decimal));
|
|
|
+ dtBarCode.Rows[0]["PLCWeight"] = 0;
|
|
|
+ }
|
|
|
+ // 成检交接(二检) 获取重量
|
|
|
+ if (procedureID == 104)
|
|
|
+ {
|
|
|
+ dtBarCode.Rows[0]["PLCWeight"] = Get3PLCWeight(sUserInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ returnDs.Tables.Add(dtBarCode);
|
|
|
+ }
|
|
|
return returnDs;
|
|
|
}
|
|
|
catch (Exception ex)
|