|
|
@@ -6353,8 +6353,9 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
return actionResult;
|
|
|
}
|
|
|
|
|
|
+ string returnMessage = "";
|
|
|
int returnValue = ServiceInvoker.Invoke<int>(this,
|
|
|
- () => PMModuleLogicDAL.SaveBarCodeLogo(barcode, logoid, sUserInfo));
|
|
|
+ () => PMModuleLogicDAL.SaveBarCodeLogo(barcode, logoid, sUserInfo, out returnMessage));
|
|
|
actionResult.Result = JsonHelper.ToJson(returnValue);
|
|
|
if (returnValue > 0)
|
|
|
{
|
|
|
@@ -6376,6 +6377,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ actionResult.Message = returnMessage;
|
|
|
actionResult.Status = (int)Constant.PDAResult.Fail;
|
|
|
}
|
|
|
}
|
|
|
@@ -6409,8 +6411,9 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
return actionResult;
|
|
|
}
|
|
|
|
|
|
+ string returnMessage = "";
|
|
|
int returnValue = ServiceInvoker.Invoke<int>(this,
|
|
|
- () => PMModuleLogicDAL.SaveBarCodeLogoAndGlazetype(barcode, logoid, glazetypeid, sUserInfo));
|
|
|
+ () => PMModuleLogicDAL.SaveBarCodeLogoAndGlazetype(barcode, logoid, glazetypeid, sUserInfo,out returnMessage));
|
|
|
actionResult.Result = JsonHelper.ToJson(returnValue);
|
|
|
if (returnValue > 0)
|
|
|
{
|
|
|
@@ -6419,7 +6422,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
else
|
|
|
{
|
|
|
actionResult.Status = (int)Constant.PDAResult.Fail;
|
|
|
- actionResult.Message = "条码不存在";
|
|
|
+ actionResult.Message = returnMessage;
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
@@ -6450,9 +6453,9 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
{
|
|
|
return actionResult;
|
|
|
}
|
|
|
-
|
|
|
+ string returnMessage = "";
|
|
|
int returnValue = ServiceInvoker.Invoke<int>(this,
|
|
|
- () => PMModuleLogicDAL.SaveBarCodesLogoAndGlazetype(barcodes, logoid, glazetypeid, procedureID, sUserInfo));
|
|
|
+ () => PMModuleLogicDAL.SaveBarCodesLogoAndGlazetype(barcodes, logoid, glazetypeid, procedureID, sUserInfo, out returnMessage));
|
|
|
actionResult.Result = JsonHelper.ToJson(returnValue);
|
|
|
if (returnValue > 0)
|
|
|
{
|
|
|
@@ -6461,7 +6464,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
else
|
|
|
{
|
|
|
actionResult.Status = (int)Constant.PDAResult.Fail;
|
|
|
- actionResult.Message = "条码不存在";
|
|
|
+ actionResult.Message = returnMessage;
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
@@ -10080,13 +10083,14 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
#endregion
|
|
|
|
|
|
#region 包装装板限制
|
|
|
- if (module == "FinishedLoadingCar")
|
|
|
+ if (module == "FinishedLoadingCar")
|
|
|
{
|
|
|
if (action == "GetSetting")
|
|
|
{
|
|
|
ClientRequestEntity cre = new ClientRequestEntity();
|
|
|
cre.Properties["GoodsID"] = data["GoodsID"];
|
|
|
- if (data.ContainsKey("logoID")) {
|
|
|
+ if (data.ContainsKey("logoID"))
|
|
|
+ {
|
|
|
cre.Properties["logoID"] = data["logoID"] + "";
|
|
|
}
|
|
|
else
|
|
|
@@ -10652,12 +10656,14 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
int logoid = Convert.ToInt32(data["logoid"]);
|
|
|
string[] barcodes = data["barcodes"].ToString().Split(',');
|
|
|
|
|
|
- int result = PMModuleLogicDAL.SetFinishedLogo(barcodes, logoid, sUserInfo);
|
|
|
+ string returnMessage = "";
|
|
|
+ int result = PMModuleLogicDAL.SetFinishedLogo(barcodes, logoid, sUserInfo,out returnMessage);
|
|
|
|
|
|
//actionResult.Result = JsonHelper.ToJson(Convert.ToInt32(resultEntity.Result));
|
|
|
if (result < 0)
|
|
|
{
|
|
|
actionResult.Status = (int)Constant.PDAResult.Fail;
|
|
|
+ actionResult.Message = returnMessage;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -11613,7 +11619,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
int procedureID = Convert.ToInt32(sre.Data.Tables[0].Rows[0]["finishedcheckprocedureid"]);
|
|
|
|
|
|
|
|
|
- sre = Service.PCModuleService.FinishedCheckLogic.CheckBarcode(procedureID,barcode,sUserInfo);
|
|
|
+ sre = Service.PCModuleService.FinishedCheckLogic.CheckBarcode(procedureID, barcode, sUserInfo);
|
|
|
|
|
|
|
|
|
//actionResult.Result = JsonHelper.ToJson(Convert.ToInt32(resultEntity.Result));
|
|
|
@@ -11631,13 +11637,13 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
}
|
|
|
return actionResult;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//撤销查询
|
|
|
if (action == "GetFinishedCancleData")
|
|
|
{
|
|
|
string barcode = data["barcode"] + "";
|
|
|
|
|
|
- ServiceResultEntity sre = Service.PCModuleService.FinishedCheckLogic.GetFinishedCancleData( barcode, sUserInfo);
|
|
|
+ ServiceResultEntity sre = Service.PCModuleService.FinishedCheckLogic.GetFinishedCancleData(barcode, sUserInfo);
|
|
|
|
|
|
//actionResult.Result = JsonHelper.ToJson(Convert.ToInt32(resultEntity.Result));
|
|
|
if (Convert.ToInt32(sre.Result) < 0)
|
|
|
@@ -11654,7 +11660,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
}
|
|
|
return actionResult;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//保存成品检验
|
|
|
if (action == "AddCheckBarcode")
|
|
|
{
|
|
|
@@ -11670,206 +11676,206 @@ namespace Dongke.IBOSS.PRD.WCF.Services
|
|
|
//DataTable DSTableImage = JsonHelper.FromJson<DataTable>(data["dSTableImage"] + "");
|
|
|
|
|
|
//ProductionDataEntity[] productionDataEntitys = new ProductionDataEntity[TableProductionData.Rows.Count];
|
|
|
- #region 转换实体
|
|
|
- //for (int i = 0; i < TableProductionData.Rows.Count; i++)
|
|
|
- //{
|
|
|
- // if (TableProductionData.Rows[i]["ReadOnly"].ToString() == "1") //只读数据不进行保存
|
|
|
- // {
|
|
|
- // continue;
|
|
|
- // }
|
|
|
-
|
|
|
- // ProductionDataEntity productionDataEntity = new ProductionDataEntity();
|
|
|
- // if (TableProductionData.Rows[i]["ProductionDataID"].ToString() != "")
|
|
|
- // {
|
|
|
- // productionDataEntity.ProductionDataID = Convert.ToInt32(TableProductionData.Rows[i]["ProductionDataID"]);
|
|
|
- // }
|
|
|
- // productionDataEntity.Barcode = TableProductionData.Rows[i]["BarCode"].ToString();
|
|
|
- // productionDataEntity.UserID = sUserInfo.UserID;
|
|
|
- // productionDataEntity.UserCode = sUserInfo.UserCode;
|
|
|
- // productionDataEntity.UserName = sUserInfo.UserName; ;
|
|
|
- // productionDataEntity.DefectFlag = Convert.ToInt32(TableProductionData.Rows[i]["GoodsLevelTypeID"]) == 4 ? 1 : 2;
|
|
|
- // productionDataEntity.GoodsLevelID = Convert.ToInt32(TableProductionData.Rows[i]["DefectFlagID"]);
|
|
|
- // productionDataEntity.GoodsLevelTypeID = Convert.ToInt32(TableProductionData.Rows[i]["GoodsLevelTypeID"]);
|
|
|
- // productionDataEntity.Remarks = TableProductionData.Rows[i]["Remarks"].ToString();
|
|
|
- // if (TableProductionData.Rows[i]["LogoID"].ToString() != "")
|
|
|
- // {
|
|
|
- // productionDataEntity.LogoID = Convert.ToInt32(TableProductionData.Rows[i]["LogoID"]);
|
|
|
- // }
|
|
|
-
|
|
|
- // if (TableProductionData.Rows[i]["OPTimeStamp"].ToString() != "")
|
|
|
- // {
|
|
|
- // productionDataEntity.OPTimeStamp = Convert.ToDateTime(TableProductionData.Rows[i]["OPTimeStamp"]);
|
|
|
- // }
|
|
|
-
|
|
|
- // if (TableProductionData.Rows[i]["CheckTime"].ToString() != "")
|
|
|
- // {
|
|
|
- // productionDataEntity.CheckTime = Convert.ToDateTime(TableProductionData.Rows[i]["CheckTime"]);
|
|
|
- // }
|
|
|
- // if (TableProductionData.Rows[i]["OrgGoodsLevelTypeID"].ToString() != "-1")
|
|
|
- // {
|
|
|
- // productionDataEntity.OrgGoodsLevelTypeID = Convert.ToInt32(TableProductionData.Rows[i]["OrgGoodsLevelTypeID"]);
|
|
|
- // }
|
|
|
- // if (!string.IsNullOrEmpty(TableProductionData.Rows[i]["ReworkProcedureID"].ToString()))
|
|
|
- // {
|
|
|
- // productionDataEntity.ReworkProcedureID = int.Parse(TableProductionData.Rows[i]["ReworkProcedureID"].ToString());
|
|
|
- // productionDataEntity.IsReworked = 1;
|
|
|
- // }
|
|
|
- // productionDataEntitys[i] = productionDataEntity;
|
|
|
-
|
|
|
- // List<ProductionDefectEntity> productionDefectEntitys = new List<ProductionDefectEntity>();
|
|
|
- // ProductionDefectEntity productionDefectEntity = null;
|
|
|
- // for (int j = 0; j < productionDefectTable.Rows.Count; j++) //缺陷列表
|
|
|
- // {
|
|
|
- // productionDefectEntity = new ProductionDefectEntity();
|
|
|
- // productionDefectEntity.SpecialDefect = productionDefectTable.Rows[j]["IsOtherDefect"].ToString();
|
|
|
- // //if (productionDefectTable.Rows[j]["DefectDeductionID"].ToString() != "-1"
|
|
|
- // // && productionDefectTable.Rows[j]["DefectDeductionID"].ToString() != string.Empty)
|
|
|
- // //{
|
|
|
- // // productionDefectEntity.DefectDeductionNum = Convert.ToDecimal(productionDefectTable.Rows[j]["DefectDeductionNum"]);
|
|
|
- // //}
|
|
|
- // if (!string.IsNullOrEmpty(productionDefectTable.Rows[j]["DefectDeductionNum"] + ""))
|
|
|
- // {
|
|
|
- // productionDefectEntity.DefectDeductionNum = Convert.ToDecimal(productionDefectTable.Rows[j]["DefectDeductionNum"]);
|
|
|
- // }
|
|
|
- // productionDefectEntity.ScrapResponFlag = "0";
|
|
|
- // productionDefectEntity.DefectID =
|
|
|
- // Convert.ToInt32(productionDefectTable.Rows[j]["DefectID"]);
|
|
|
- // productionDefectEntity.DefectCode =
|
|
|
- // productionDefectTable.Rows[j]["DefectCode"].ToString();
|
|
|
- // productionDefectEntity.DefectName =
|
|
|
- // productionDefectTable.Rows[j]["DefectName"].ToString().Replace(productionDefectEntity.DefectCode + "->", "");
|
|
|
- // productionDefectEntity.DefectPositionID =
|
|
|
- // Convert.ToInt32(productionDefectTable.Rows[j]["DefectPositionID"]);
|
|
|
- // productionDefectEntity.DefectPositionCode =
|
|
|
- // productionDefectTable.Rows[j]["DefectPositionCode"].ToString();
|
|
|
- // productionDefectEntity.DefectPositionName =
|
|
|
- // productionDefectTable.Rows[j]["DefectPositionName"].ToString().Replace(productionDefectEntity.DefectPositionCode + "->", "");
|
|
|
- // productionDefectEntity.DefectProductionDataID =
|
|
|
- // Convert.ToInt32(productionDefectTable.Rows[j]["ProductionDataID"] + "");
|
|
|
-
|
|
|
- // if (productionDefectEntity.DefectProductionDataID == 0)
|
|
|
- // {
|
|
|
- // productionDefectEntity.DefectProductionDataID = null;
|
|
|
- // }
|
|
|
- // if (productionDefectTable.Rows[j]["DefectProcedureID"].ToString() != string.Empty &&
|
|
|
- // Convert.ToInt32(productionDefectTable.Rows[j]["DefectProcedureID"] + "") > Constant.INT_IS_ZERO)
|
|
|
- // {
|
|
|
- // productionDefectEntity.DefectProcedureID =
|
|
|
- // Convert.ToInt32(productionDefectTable.Rows[j]["DefectProcedureID"]);
|
|
|
- // }
|
|
|
- // productionDefectEntity.DefectProcedureCode =
|
|
|
- // productionDefectTable.Rows[j]["DefectProcedureCode"].ToString();
|
|
|
- // productionDefectEntity.DefectProcedureName =
|
|
|
- // productionDefectTable.Rows[j]["DefectProcedureName"].ToString();
|
|
|
- // productionDefectEntity.DefectUserID =
|
|
|
- // Convert.ToInt32(productionDefectTable.Rows[j]["DefectUserID"]);
|
|
|
- // productionDefectEntity.DefectUserCode =
|
|
|
- // productionDefectTable.Rows[j]["DefectUserCode"].ToString();
|
|
|
- // productionDefectEntity.DefectUserName =
|
|
|
- // productionDefectTable.Rows[j]["DefectUserName"].ToString();
|
|
|
- // productionDefectEntity.DefectJobs =
|
|
|
- // Convert.ToInt32(productionDefectTable.Rows[j]["Jobs"].ToString());
|
|
|
- // productionDefectEntity.Remarks =
|
|
|
- // productionDefectTable.Rows[j]["DefectRemarks"].ToString();
|
|
|
- // productionDefectEntity.Remarks =
|
|
|
- // productionDefectTable.Rows[j]["DefectRemarks"].ToString();
|
|
|
- // if (productionDefectTable.Rows[j]["DefectFineID"].ToString() != "-1"
|
|
|
- // && productionDefectTable.Rows[j]["DefectFineID"].ToString() != string.Empty)
|
|
|
- // {
|
|
|
- // productionDefectEntity.DefectFine = Convert.ToInt32(productionDefectTable.Rows[j]["DefectFineID"]);
|
|
|
- // }
|
|
|
-
|
|
|
-
|
|
|
- // if (productionDefectTable.Rows[j]["CheckTime"].ToString() != string.Empty)
|
|
|
- // {
|
|
|
- // //if (Convert.ToInt32(this.TableProductionData.Rows[i]["OrgGoodsLevelTypeID"]) == Convert.ToInt32(this.TableProductionData.Rows[i]["GoodsLevelTypeID"]))
|
|
|
- // //{
|
|
|
- // productionDefectEntity.CheckTime = Convert.ToDateTime(productionDefectTable.Rows[j]["CheckTime"]);
|
|
|
- // //}
|
|
|
-
|
|
|
- // }
|
|
|
-
|
|
|
- // if (productionDefectTable.Rows[j]["MissedUserID"].ToString() != "-1"
|
|
|
- // && productionDefectTable.Rows[j]["MissedUserID"].ToString() != string.Empty)
|
|
|
- // {
|
|
|
- // productionDefectEntity.MissedUserID = Convert.ToInt32(productionDefectTable.Rows[j]["MissedUserID"]);
|
|
|
- // productionDefectEntity.MissedUserCode = productionDefectTable.Rows[j]["MissedUserCode"].ToString();
|
|
|
- // productionDefectEntity.MissedUserName = productionDefectTable.Rows[j]["MissedUserName"].ToString();
|
|
|
- // }
|
|
|
- // // 遍历责任员工
|
|
|
- // List<DefectResponsibleEntity> DefectResponsibles = new List<DefectResponsibleEntity>();
|
|
|
- // if (DSTableStaff != null && DSTableStaff.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // DefectResponsibleEntity defectResponsibleEntity = null;
|
|
|
- // foreach (DataRow drStaff in DSTableStaff.Rows)
|
|
|
- // {
|
|
|
- // if (Convert.ToInt32(drStaff["IsSelected"]) == Constant.INT_IS_ONE)
|
|
|
- // {
|
|
|
- // defectResponsibleEntity = new DefectResponsibleEntity();
|
|
|
- // defectResponsibleEntity.StaffID = Convert.ToInt32(drStaff["StaffID"]);
|
|
|
- // defectResponsibleEntity.UserID = Convert.ToInt32(productionDefectEntity.DefectUserID);
|
|
|
- // defectResponsibleEntity.UserCode = productionDefectEntity.DefectUserCode;
|
|
|
- // defectResponsibleEntity.UJobsID =
|
|
|
- // Convert.ToInt32(productionDefectTable.Rows[j]["Jobs"].ToString());
|
|
|
- // defectResponsibleEntity.SJobsID =
|
|
|
- // Convert.ToInt32(productionDefectTable.Rows[j]["Jobs"].ToString());
|
|
|
- // defectResponsibleEntity.StaffStatus = Convert.ToInt32(drStaff["StaffStatus"]);
|
|
|
- // DefectResponsibles.Add(defectResponsibleEntity);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // //productionDefectEntity.DefectResponsibles = DefectResponsibles.ToArray();//每个缺陷对应的责任员工
|
|
|
- // productionDefectEntity.DefectResponsibles = DefectResponsibles;//每个缺陷对应的责任员工
|
|
|
- // }
|
|
|
- // // 遍历漏检责任员工
|
|
|
- // List<DefectMissedResponsibleEntity> DefectMissedResponsibles = new List<DefectMissedResponsibleEntity>();
|
|
|
- // if (DSTableMissedStaff != null && DSTableMissedStaff.Rows.Count > 0)
|
|
|
- // {
|
|
|
- // DefectMissedResponsibleEntity defectMissedResponsibleEntity = null;
|
|
|
- // foreach (DataRow drStaff in DSTableMissedStaff.Rows)
|
|
|
- // {
|
|
|
- // if (Convert.ToInt32(drStaff["IsSelected"]) == Constant.INT_IS_ONE)
|
|
|
- // {
|
|
|
- // defectMissedResponsibleEntity = new DefectMissedResponsibleEntity();
|
|
|
- // defectMissedResponsibleEntity.StaffID = Convert.ToInt32(drStaff["StaffID"]);
|
|
|
- // defectMissedResponsibleEntity.UserID = Convert.ToInt32(productionDefectEntity.DefectUserID);
|
|
|
- // defectMissedResponsibleEntity.UserCode = productionDefectEntity.DefectUserCode;
|
|
|
- // defectMissedResponsibleEntity.UJobsID = Convert.ToInt32(drStaff["UJobsID"]);
|
|
|
- // defectMissedResponsibleEntity.SJobsID = Convert.ToInt32(drStaff["SJobsID"]);
|
|
|
- // defectMissedResponsibleEntity.StaffStatus = Convert.ToInt32(drStaff["StaffStatus"]);
|
|
|
- // DefectMissedResponsibles.Add(defectMissedResponsibleEntity);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // //productionDefectEntity.DefectMissedResponsibles = DefectMissedResponsibles.ToArray();
|
|
|
- // productionDefectEntity.DefectMissedResponsibles = DefectMissedResponsibles;
|
|
|
- // }
|
|
|
- // // 遍历缺陷图片
|
|
|
- // if (DSTableImage != null && DSTableImage.Rows.Count > 0)
|
|
|
- // {
|
|
|
-
|
|
|
- // List<DefectImageEntity> defectImageEntitys = new List<DefectImageEntity>();
|
|
|
- // DefectImageEntity defectImageEntity = null;
|
|
|
- // foreach (DataRow drImage in DSTableImage.Rows)
|
|
|
- // {
|
|
|
- // defectImageEntity = new DefectImageEntity();
|
|
|
- // defectImageEntity.Thumbnail = (byte[])drImage["ImageByte"];
|
|
|
- // defectImageEntity.Image = (byte[])drImage["orgImageByte"];
|
|
|
- // defectImageEntitys.Add(defectImageEntity);
|
|
|
- // }
|
|
|
- // productionDefectEntity.DefectImages = defectImageEntitys;
|
|
|
- // }
|
|
|
- // productionDefectEntitys.Add(productionDefectEntity);
|
|
|
- // }
|
|
|
- // productionDataEntitys[i].ProductionDefects = productionDefectEntitys;
|
|
|
- // }
|
|
|
- #endregion
|
|
|
-
|
|
|
- ProductionDataEntity[] productionDataEntitys = JsonHelper.FromJson<ProductionDataEntity[]>(data["productionDataEntitys"] + "");
|
|
|
-
|
|
|
- DataTable bomDetailTable = new DataTable();
|
|
|
+ #region 转换实体
|
|
|
+ //for (int i = 0; i < TableProductionData.Rows.Count; i++)
|
|
|
+ //{
|
|
|
+ // if (TableProductionData.Rows[i]["ReadOnly"].ToString() == "1") //只读数据不进行保存
|
|
|
+ // {
|
|
|
+ // continue;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // ProductionDataEntity productionDataEntity = new ProductionDataEntity();
|
|
|
+ // if (TableProductionData.Rows[i]["ProductionDataID"].ToString() != "")
|
|
|
+ // {
|
|
|
+ // productionDataEntity.ProductionDataID = Convert.ToInt32(TableProductionData.Rows[i]["ProductionDataID"]);
|
|
|
+ // }
|
|
|
+ // productionDataEntity.Barcode = TableProductionData.Rows[i]["BarCode"].ToString();
|
|
|
+ // productionDataEntity.UserID = sUserInfo.UserID;
|
|
|
+ // productionDataEntity.UserCode = sUserInfo.UserCode;
|
|
|
+ // productionDataEntity.UserName = sUserInfo.UserName; ;
|
|
|
+ // productionDataEntity.DefectFlag = Convert.ToInt32(TableProductionData.Rows[i]["GoodsLevelTypeID"]) == 4 ? 1 : 2;
|
|
|
+ // productionDataEntity.GoodsLevelID = Convert.ToInt32(TableProductionData.Rows[i]["DefectFlagID"]);
|
|
|
+ // productionDataEntity.GoodsLevelTypeID = Convert.ToInt32(TableProductionData.Rows[i]["GoodsLevelTypeID"]);
|
|
|
+ // productionDataEntity.Remarks = TableProductionData.Rows[i]["Remarks"].ToString();
|
|
|
+ // if (TableProductionData.Rows[i]["LogoID"].ToString() != "")
|
|
|
+ // {
|
|
|
+ // productionDataEntity.LogoID = Convert.ToInt32(TableProductionData.Rows[i]["LogoID"]);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if (TableProductionData.Rows[i]["OPTimeStamp"].ToString() != "")
|
|
|
+ // {
|
|
|
+ // productionDataEntity.OPTimeStamp = Convert.ToDateTime(TableProductionData.Rows[i]["OPTimeStamp"]);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if (TableProductionData.Rows[i]["CheckTime"].ToString() != "")
|
|
|
+ // {
|
|
|
+ // productionDataEntity.CheckTime = Convert.ToDateTime(TableProductionData.Rows[i]["CheckTime"]);
|
|
|
+ // }
|
|
|
+ // if (TableProductionData.Rows[i]["OrgGoodsLevelTypeID"].ToString() != "-1")
|
|
|
+ // {
|
|
|
+ // productionDataEntity.OrgGoodsLevelTypeID = Convert.ToInt32(TableProductionData.Rows[i]["OrgGoodsLevelTypeID"]);
|
|
|
+ // }
|
|
|
+ // if (!string.IsNullOrEmpty(TableProductionData.Rows[i]["ReworkProcedureID"].ToString()))
|
|
|
+ // {
|
|
|
+ // productionDataEntity.ReworkProcedureID = int.Parse(TableProductionData.Rows[i]["ReworkProcedureID"].ToString());
|
|
|
+ // productionDataEntity.IsReworked = 1;
|
|
|
+ // }
|
|
|
+ // productionDataEntitys[i] = productionDataEntity;
|
|
|
+
|
|
|
+ // List<ProductionDefectEntity> productionDefectEntitys = new List<ProductionDefectEntity>();
|
|
|
+ // ProductionDefectEntity productionDefectEntity = null;
|
|
|
+ // for (int j = 0; j < productionDefectTable.Rows.Count; j++) //缺陷列表
|
|
|
+ // {
|
|
|
+ // productionDefectEntity = new ProductionDefectEntity();
|
|
|
+ // productionDefectEntity.SpecialDefect = productionDefectTable.Rows[j]["IsOtherDefect"].ToString();
|
|
|
+ // //if (productionDefectTable.Rows[j]["DefectDeductionID"].ToString() != "-1"
|
|
|
+ // // && productionDefectTable.Rows[j]["DefectDeductionID"].ToString() != string.Empty)
|
|
|
+ // //{
|
|
|
+ // // productionDefectEntity.DefectDeductionNum = Convert.ToDecimal(productionDefectTable.Rows[j]["DefectDeductionNum"]);
|
|
|
+ // //}
|
|
|
+ // if (!string.IsNullOrEmpty(productionDefectTable.Rows[j]["DefectDeductionNum"] + ""))
|
|
|
+ // {
|
|
|
+ // productionDefectEntity.DefectDeductionNum = Convert.ToDecimal(productionDefectTable.Rows[j]["DefectDeductionNum"]);
|
|
|
+ // }
|
|
|
+ // productionDefectEntity.ScrapResponFlag = "0";
|
|
|
+ // productionDefectEntity.DefectID =
|
|
|
+ // Convert.ToInt32(productionDefectTable.Rows[j]["DefectID"]);
|
|
|
+ // productionDefectEntity.DefectCode =
|
|
|
+ // productionDefectTable.Rows[j]["DefectCode"].ToString();
|
|
|
+ // productionDefectEntity.DefectName =
|
|
|
+ // productionDefectTable.Rows[j]["DefectName"].ToString().Replace(productionDefectEntity.DefectCode + "->", "");
|
|
|
+ // productionDefectEntity.DefectPositionID =
|
|
|
+ // Convert.ToInt32(productionDefectTable.Rows[j]["DefectPositionID"]);
|
|
|
+ // productionDefectEntity.DefectPositionCode =
|
|
|
+ // productionDefectTable.Rows[j]["DefectPositionCode"].ToString();
|
|
|
+ // productionDefectEntity.DefectPositionName =
|
|
|
+ // productionDefectTable.Rows[j]["DefectPositionName"].ToString().Replace(productionDefectEntity.DefectPositionCode + "->", "");
|
|
|
+ // productionDefectEntity.DefectProductionDataID =
|
|
|
+ // Convert.ToInt32(productionDefectTable.Rows[j]["ProductionDataID"] + "");
|
|
|
+
|
|
|
+ // if (productionDefectEntity.DefectProductionDataID == 0)
|
|
|
+ // {
|
|
|
+ // productionDefectEntity.DefectProductionDataID = null;
|
|
|
+ // }
|
|
|
+ // if (productionDefectTable.Rows[j]["DefectProcedureID"].ToString() != string.Empty &&
|
|
|
+ // Convert.ToInt32(productionDefectTable.Rows[j]["DefectProcedureID"] + "") > Constant.INT_IS_ZERO)
|
|
|
+ // {
|
|
|
+ // productionDefectEntity.DefectProcedureID =
|
|
|
+ // Convert.ToInt32(productionDefectTable.Rows[j]["DefectProcedureID"]);
|
|
|
+ // }
|
|
|
+ // productionDefectEntity.DefectProcedureCode =
|
|
|
+ // productionDefectTable.Rows[j]["DefectProcedureCode"].ToString();
|
|
|
+ // productionDefectEntity.DefectProcedureName =
|
|
|
+ // productionDefectTable.Rows[j]["DefectProcedureName"].ToString();
|
|
|
+ // productionDefectEntity.DefectUserID =
|
|
|
+ // Convert.ToInt32(productionDefectTable.Rows[j]["DefectUserID"]);
|
|
|
+ // productionDefectEntity.DefectUserCode =
|
|
|
+ // productionDefectTable.Rows[j]["DefectUserCode"].ToString();
|
|
|
+ // productionDefectEntity.DefectUserName =
|
|
|
+ // productionDefectTable.Rows[j]["DefectUserName"].ToString();
|
|
|
+ // productionDefectEntity.DefectJobs =
|
|
|
+ // Convert.ToInt32(productionDefectTable.Rows[j]["Jobs"].ToString());
|
|
|
+ // productionDefectEntity.Remarks =
|
|
|
+ // productionDefectTable.Rows[j]["DefectRemarks"].ToString();
|
|
|
+ // productionDefectEntity.Remarks =
|
|
|
+ // productionDefectTable.Rows[j]["DefectRemarks"].ToString();
|
|
|
+ // if (productionDefectTable.Rows[j]["DefectFineID"].ToString() != "-1"
|
|
|
+ // && productionDefectTable.Rows[j]["DefectFineID"].ToString() != string.Empty)
|
|
|
+ // {
|
|
|
+ // productionDefectEntity.DefectFine = Convert.ToInt32(productionDefectTable.Rows[j]["DefectFineID"]);
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+ // if (productionDefectTable.Rows[j]["CheckTime"].ToString() != string.Empty)
|
|
|
+ // {
|
|
|
+ // //if (Convert.ToInt32(this.TableProductionData.Rows[i]["OrgGoodsLevelTypeID"]) == Convert.ToInt32(this.TableProductionData.Rows[i]["GoodsLevelTypeID"]))
|
|
|
+ // //{
|
|
|
+ // productionDefectEntity.CheckTime = Convert.ToDateTime(productionDefectTable.Rows[j]["CheckTime"]);
|
|
|
+ // //}
|
|
|
+
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if (productionDefectTable.Rows[j]["MissedUserID"].ToString() != "-1"
|
|
|
+ // && productionDefectTable.Rows[j]["MissedUserID"].ToString() != string.Empty)
|
|
|
+ // {
|
|
|
+ // productionDefectEntity.MissedUserID = Convert.ToInt32(productionDefectTable.Rows[j]["MissedUserID"]);
|
|
|
+ // productionDefectEntity.MissedUserCode = productionDefectTable.Rows[j]["MissedUserCode"].ToString();
|
|
|
+ // productionDefectEntity.MissedUserName = productionDefectTable.Rows[j]["MissedUserName"].ToString();
|
|
|
+ // }
|
|
|
+ // // 遍历责任员工
|
|
|
+ // List<DefectResponsibleEntity> DefectResponsibles = new List<DefectResponsibleEntity>();
|
|
|
+ // if (DSTableStaff != null && DSTableStaff.Rows.Count > 0)
|
|
|
+ // {
|
|
|
+ // DefectResponsibleEntity defectResponsibleEntity = null;
|
|
|
+ // foreach (DataRow drStaff in DSTableStaff.Rows)
|
|
|
+ // {
|
|
|
+ // if (Convert.ToInt32(drStaff["IsSelected"]) == Constant.INT_IS_ONE)
|
|
|
+ // {
|
|
|
+ // defectResponsibleEntity = new DefectResponsibleEntity();
|
|
|
+ // defectResponsibleEntity.StaffID = Convert.ToInt32(drStaff["StaffID"]);
|
|
|
+ // defectResponsibleEntity.UserID = Convert.ToInt32(productionDefectEntity.DefectUserID);
|
|
|
+ // defectResponsibleEntity.UserCode = productionDefectEntity.DefectUserCode;
|
|
|
+ // defectResponsibleEntity.UJobsID =
|
|
|
+ // Convert.ToInt32(productionDefectTable.Rows[j]["Jobs"].ToString());
|
|
|
+ // defectResponsibleEntity.SJobsID =
|
|
|
+ // Convert.ToInt32(productionDefectTable.Rows[j]["Jobs"].ToString());
|
|
|
+ // defectResponsibleEntity.StaffStatus = Convert.ToInt32(drStaff["StaffStatus"]);
|
|
|
+ // DefectResponsibles.Add(defectResponsibleEntity);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // //productionDefectEntity.DefectResponsibles = DefectResponsibles.ToArray();//每个缺陷对应的责任员工
|
|
|
+ // productionDefectEntity.DefectResponsibles = DefectResponsibles;//每个缺陷对应的责任员工
|
|
|
+ // }
|
|
|
+ // // 遍历漏检责任员工
|
|
|
+ // List<DefectMissedResponsibleEntity> DefectMissedResponsibles = new List<DefectMissedResponsibleEntity>();
|
|
|
+ // if (DSTableMissedStaff != null && DSTableMissedStaff.Rows.Count > 0)
|
|
|
+ // {
|
|
|
+ // DefectMissedResponsibleEntity defectMissedResponsibleEntity = null;
|
|
|
+ // foreach (DataRow drStaff in DSTableMissedStaff.Rows)
|
|
|
+ // {
|
|
|
+ // if (Convert.ToInt32(drStaff["IsSelected"]) == Constant.INT_IS_ONE)
|
|
|
+ // {
|
|
|
+ // defectMissedResponsibleEntity = new DefectMissedResponsibleEntity();
|
|
|
+ // defectMissedResponsibleEntity.StaffID = Convert.ToInt32(drStaff["StaffID"]);
|
|
|
+ // defectMissedResponsibleEntity.UserID = Convert.ToInt32(productionDefectEntity.DefectUserID);
|
|
|
+ // defectMissedResponsibleEntity.UserCode = productionDefectEntity.DefectUserCode;
|
|
|
+ // defectMissedResponsibleEntity.UJobsID = Convert.ToInt32(drStaff["UJobsID"]);
|
|
|
+ // defectMissedResponsibleEntity.SJobsID = Convert.ToInt32(drStaff["SJobsID"]);
|
|
|
+ // defectMissedResponsibleEntity.StaffStatus = Convert.ToInt32(drStaff["StaffStatus"]);
|
|
|
+ // DefectMissedResponsibles.Add(defectMissedResponsibleEntity);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // //productionDefectEntity.DefectMissedResponsibles = DefectMissedResponsibles.ToArray();
|
|
|
+ // productionDefectEntity.DefectMissedResponsibles = DefectMissedResponsibles;
|
|
|
+ // }
|
|
|
+ // // 遍历缺陷图片
|
|
|
+ // if (DSTableImage != null && DSTableImage.Rows.Count > 0)
|
|
|
+ // {
|
|
|
+
|
|
|
+ // List<DefectImageEntity> defectImageEntitys = new List<DefectImageEntity>();
|
|
|
+ // DefectImageEntity defectImageEntity = null;
|
|
|
+ // foreach (DataRow drImage in DSTableImage.Rows)
|
|
|
+ // {
|
|
|
+ // defectImageEntity = new DefectImageEntity();
|
|
|
+ // defectImageEntity.Thumbnail = (byte[])drImage["ImageByte"];
|
|
|
+ // defectImageEntity.Image = (byte[])drImage["orgImageByte"];
|
|
|
+ // defectImageEntitys.Add(defectImageEntity);
|
|
|
+ // }
|
|
|
+ // productionDefectEntity.DefectImages = defectImageEntitys;
|
|
|
+ // }
|
|
|
+ // productionDefectEntitys.Add(productionDefectEntity);
|
|
|
+ // }
|
|
|
+ // productionDataEntitys[i].ProductionDefects = productionDefectEntitys;
|
|
|
+ // }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ ProductionDataEntity[] productionDataEntitys = JsonHelper.FromJson<ProductionDataEntity[]>(data["productionDataEntitys"] + "");
|
|
|
+
|
|
|
+ DataTable bomDetailTable = new DataTable();
|
|
|
|
|
|
if (data["bomDetailTable"] != null)
|
|
|
{
|
|
|
- bomDetailTable = JsonHelper.FromJson<DataTable>(data["bomDetailTable"]+"");
|
|
|
+ bomDetailTable = JsonHelper.FromJson<DataTable>(data["bomDetailTable"] + "");
|
|
|
}
|
|
|
ServiceResultEntity sre = Service.PCModuleService.FinishedCheckLogic.AddCheckBarcode(procedureID, productionDataEntitys, bomDetailTable, sUserInfo);
|
|
|
|