|
|
@@ -28,10 +28,10 @@ namespace UAS_MES.OQC
|
|
|
asc.controllInitializeSize(this);
|
|
|
dh = new DataHelper();
|
|
|
|
|
|
- ob_projectcode.TableName = "QUA_Project";
|
|
|
- ob_projectcode.SelectField = "pr_code # 方案编号,pr_name # 方案名称,pr_class # 检验单类型,pr_standard # 方案标准,pr_startdate # 生效日期,pr_enddate #失效日期 ,pr_status # 状态";
|
|
|
- ob_projectcode.SetValueField = new string[] { "ob_projectcode" };
|
|
|
- ob_projectcode.FormName = Name;
|
|
|
+ pr_code.TableName = "QUA_Project";
|
|
|
+ pr_code.SelectField = "pr_code # 方案编号,pr_name # 方案名称,pr_class # 检验单类型,pr_standard # 方案标准,pr_startdate # 生效日期,pr_enddate #失效日期 ,pr_status # 状态";
|
|
|
+ pr_code.SetValueField = new string[] { "ob_projectcode" };
|
|
|
+ pr_code.FormName = Name;
|
|
|
|
|
|
al_code.TableName = "QUA_AQL";
|
|
|
al_code.DBTitle = "抽样标准查询";
|
|
|
@@ -150,9 +150,9 @@ namespace UAS_MES.OQC
|
|
|
{
|
|
|
sql.Clear();
|
|
|
sql.Append("insert into OQCItems(oi_id,oi_checkno, oi_projectcode,oi_batchqty ,oi_checkkind,oi_sampleqty,oi_itemcode) select ");
|
|
|
- sql.Append("OQCItems_seq.nextval,'" + ob_checkno.Text + "','" + ob_projectcode.Text + "','" + ob_nowcheckqty.Text + "',:ci_kind,");
|
|
|
+ sql.Append("OQCItems_seq.nextval,'" + ob_checkno.Text + "','" + pr_code.Text + "','" + ob_nowcheckqty.Text + "',:ci_kind,");
|
|
|
sql.Append(":oi_sampleqty,ci_code from QUA_PROJECT left join QUA_PROJECTDETAIL on pd_prid=pr_id ");
|
|
|
- sql.Append("LEFT JOIN QUA_CHECKITEM ON PD_CIID=CI_ID where pr_code='" + ob_projectcode.Text + "' and ci_kind=:ci_kind1");
|
|
|
+ sql.Append("LEFT JOIN QUA_CHECKITEM ON PD_CIID=CI_ID where pr_code='" + pr_code.Text + "' and ci_kind=:ci_kind1");
|
|
|
dh.BatchInsert(sql.GetString(), new string[] { "ci_kind", "oi_sampleqty", "ci_kind1" }, ci_kind.ToArray(), oi_sampleqty.ToArray(), ci_kind.ToArray());
|
|
|
LogicHandler.DoCommandLog(User.UserCode, "", User.UserLineCode, User.UserSourceCode, "OQC抽样计划采集保存抽样计划", "成功", ms_sncode.Text, ob_checkno.Text);
|
|
|
}
|
|
|
@@ -185,7 +185,7 @@ namespace UAS_MES.OQC
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- int result = (int)dh.ExecuteSql("update OQCBatch set ob_projectcode='" + ob_projectcode.Text + "',ob_remark = '" + ob_remark.Text + "',ob_aqlcode='" + al_code.Text + "',ob_maxngacceptqty='" + ob_maxngacceptqty.Text + "',ob_actsampleqty='" + ob_sampleqty.Text + "' where ob_checkno='" + ob_checkno.Text + "' ", "update");
|
|
|
+ int result = (int)dh.ExecuteSql("update OQCBatch set ob_projectcode='" + pr_code.Text + "',ob_remark = '" + ob_remark.Text + "',ob_aqlcode='" + al_code.Text + "',ob_maxngacceptqty='" + ob_maxngacceptqty.Text + "',ob_actsampleqty='" + ob_sampleqty.Text + "' where ob_checkno='" + ob_checkno.Text + "' ", "update");
|
|
|
return result > 0;
|
|
|
}
|
|
|
}
|
|
|
@@ -255,8 +255,8 @@ namespace UAS_MES.OQC
|
|
|
sql.Clear();
|
|
|
sql.Append("select nvl(max(oi_id),0)oi_id,ci_kind,nvl(max(oi_sampleqty),0) oi_sampleqty from QUA_PROJECT left join ");
|
|
|
sql.Append(" QUA_ProjectDetail on pd_prid=pr_id left join QUA_CheckItem on pd_ciid=ci_id ");
|
|
|
- sql.Append("left join OQCITEMS on oi_checkno ='" + ob_checkno.Text + "' and oi_projectcode='" + ob_projectcode.Text + "' ");
|
|
|
- sql.Append("and oi_projectcode = pr_code and oi_checkkind = ci_kind where pr_code='" + ob_projectcode.Text + "' group by ci_kind");
|
|
|
+ sql.Append("left join OQCITEMS on oi_checkno ='" + ob_checkno.Text + "' and oi_projectcode='" + pr_code.Text + "' ");
|
|
|
+ sql.Append("and oi_projectcode = pr_code and oi_checkkind = ci_kind where pr_code='" + pr_code.Text + "' group by ci_kind");
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|
|
|
BaseUtil.FillDgvWithDataTable(CheckTypeDGV, dt);
|
|
|
}
|