|
|
@@ -260,13 +260,13 @@ namespace UAS_MES_NEW.Make
|
|
|
|
|
|
|
|
|
//如果称重到了50个,则重量信息重新自动设置到产品信息
|
|
|
- int weight_count = dh.getRowCount("makeserial", " ms_makecode='" + ma_code.Text + "' and ms_midboxweight is not null");
|
|
|
- if (weight_count == 50)
|
|
|
- {
|
|
|
- double pr_miderror = double.Parse(dh.getFieldDataByCondition("product", "nvl(pr_miderror,0)", "pr_code='" + ma_prodcode.Text + "'").ToString());
|
|
|
- double avgweight = double.Parse(dh.getFieldDataByCondition("makeserial", "sum(ms_midboxweight)/50", " ms_makecode='" + ma_code.Text + "' and ms_outboxcode is not null").ToString());
|
|
|
- dh.ExecuteSql("update product set PR_MIDBOXMINWEIGHT=(" + avgweight + "-" + pr_miderror + "), PR_MIDBOXMAXWEIGHT=(" + avgweight + "+" + pr_miderror + ") where pr_code=v_ms_prodcode", "update");
|
|
|
- }
|
|
|
+ //int weight_count = dh.getRowCount("makeserial", " ms_makecode='" + ma_code.Text + "' and ms_midboxweight is not null");
|
|
|
+ //if (weight_count == 50)
|
|
|
+ //{
|
|
|
+ // double pr_miderror = double.Parse(dh.getFieldDataByCondition("product", "nvl(pr_miderror,0)", "pr_code='" + ma_prodcode.Text + "'").ToString());
|
|
|
+ // double avgweight = double.Parse(dh.getFieldDataByCondition("makeserial", "sum(ms_midboxweight)/50", " ms_makecode='" + ma_code.Text + "' and ms_outboxcode is not null").ToString());
|
|
|
+ // dh.ExecuteSql("update product set PR_MIDBOXMINWEIGHT=(" + avgweight + "-" + pr_miderror + "), PR_MIDBOXMAXWEIGHT=(" + avgweight + "+" + pr_miderror + ") where pr_code=v_ms_prodcode", "update");
|
|
|
+ //}
|
|
|
sql.Clear();
|
|
|
sql.Append("insert into labelchecklog(LCL_ID, LCL_SN, LCL_LABELTYPE, lcl_prefix,lcl_length, LCL_LABELVALUE, LCL_STEPCODE, LCL_SOURCECODE," +
|
|
|
" LCL_INMAN, LCL_DATE)" +
|
|
|
@@ -373,7 +373,7 @@ namespace UAS_MES_NEW.Make
|
|
|
sn_code.Text = code.Text;
|
|
|
code.Str = "";
|
|
|
sql.Clear();
|
|
|
- sql.Append("select PR_MIDBOXMINWEIGHT, PR_MIDBOXMAXWEIGHT,ma_prodcode,ma_ecncode,ma_softversion,ms_firstsn,ma_bomversion,ma_qty,ma_code,pr_spec,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
|
|
|
+ sql.Append("select nvl(PR_MIDBOXMINWEIGHT,0)PR_MIDBOXMINWEIGHT, nvl(PR_MIDBOXMAXWEIGHT,0)PR_MIDBOXMAXWEIGHT,ma_prodcode,ma_ecncode,ma_softversion,ms_firstsn,ma_bomversion,ma_qty,ma_code,pr_spec,ms_status,ms_id,ms_craftcode,ms_nextstepcode");
|
|
|
sql.Append(",ms_prodcode,ms_makecode,ms_code,ms_stepname from makeserial left join make on ma_code=ms_makecode ");
|
|
|
sql.Append("left join product on ms_prodcode=pr_code where ms_sncode='" + code.Text + "' order by ms_id desc");
|
|
|
dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
|