|
@@ -208,7 +208,7 @@ namespace UAS_MES_NEW.Query
|
|
|
|
|
|
|
|
private void SystemSetting_PrinterTest_Load(object sender, EventArgs e)
|
|
private void SystemSetting_PrinterTest_Load(object sender, EventArgs e)
|
|
|
{
|
|
{
|
|
|
- engine.Start();
|
|
|
|
|
|
|
+ //engine.Start();
|
|
|
|
|
|
|
|
|
|
|
|
|
ma_code.TableName = " make left join product on ma_prodcode=pr_code";
|
|
ma_code.TableName = " make left join product on ma_prodcode=pr_code";
|
|
@@ -355,8 +355,8 @@ namespace UAS_MES_NEW.Query
|
|
|
custbarcode.Add(data);
|
|
custbarcode.Add(data);
|
|
|
}
|
|
}
|
|
|
string sql = "insert into makesnlist(MSL_ID, MSL_INDATE, MSL_MAKECODE, MSL_SNCODE, MSL_TYPE,msl_status)" +
|
|
string sql = "insert into makesnlist(MSL_ID, MSL_INDATE, MSL_MAKECODE, MSL_SNCODE, MSL_TYPE,msl_status)" +
|
|
|
- "select makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "',:custbarcode,'before',0 from dual where :custbarcode not in " +
|
|
|
|
|
- "(select msl_sncode from makesnlist)";
|
|
|
|
|
|
|
+ "select makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "',:custbarcode,'before',0 from dual where not EXISTS " +
|
|
|
|
|
+ "(select 1 from makesnlist where msl_sncode=:custbarcode)";
|
|
|
dh.BatchInsert(sql, new string[] { "custbarcode", "custbarcode" }, custbarcode.ToArray(), custbarcode.ToArray());
|
|
dh.BatchInsert(sql, new string[] { "custbarcode", "custbarcode" }, custbarcode.ToArray(), custbarcode.ToArray());
|
|
|
//更新最大流水号
|
|
//更新最大流水号
|
|
|
dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + pr_exbarcode + "' and rmn_prefix='" + Prefix + "'");
|
|
dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + pr_exbarcode + "' and rmn_prefix='" + Prefix + "'");
|
|
@@ -440,8 +440,8 @@ namespace UAS_MES_NEW.Query
|
|
|
custbarcode.Add(data);
|
|
custbarcode.Add(data);
|
|
|
}
|
|
}
|
|
|
string sql = "insert into makesnlist(MSL_ID, MSL_INDATE, MSL_MAKECODE, MSL_SNCODE, MSL_TYPE,msl_status)" +
|
|
string sql = "insert into makesnlist(MSL_ID, MSL_INDATE, MSL_MAKECODE, MSL_SNCODE, MSL_TYPE,msl_status)" +
|
|
|
- "select makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "',:custbarcode,'before',0 from dual where :custbarcode not in " +
|
|
|
|
|
- "(select msl_sncode from makesnlist)";
|
|
|
|
|
|
|
+ "select makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "',:custbarcode,'before',0 from dual where not EXISTS " +
|
|
|
|
|
+ "(select 1 from makesnlist where msl_sncode=:custbarcode)";
|
|
|
dh.BatchInsert(sql, new string[] { "custbarcode", "custbarcode" }, custbarcode.ToArray(), custbarcode.ToArray());
|
|
dh.BatchInsert(sql, new string[] { "custbarcode", "custbarcode" }, custbarcode.ToArray(), custbarcode.ToArray());
|
|
|
//更新最大流水号
|
|
//更新最大流水号
|
|
|
dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + pr_exbarcode + "'");
|
|
dh.UpdateByCondition("RuleMaxNum", "rmn_maxnumber='" + custserialnum + "'", "rmn_nrcode='" + pr_exbarcode + "'");
|