|
|
@@ -72,13 +72,13 @@ namespace UAS_MES_NEW.Special
|
|
|
if (dt.Rows.Count == 0) { OperateResult.AppendText(">>工序不在所选途程中\n"); return; }
|
|
|
string stepno = dh.getFieldDataByCondition("craft left join craftdetail on cd_crid=cr_id", "cd_stepno", "cr_prodcode='" + ms_prodcode + "' and cr_code='" + ms_craftcode + "' and cd_stepcode='" + cd_stepcode.Text + "'").ToString();
|
|
|
StringBuilder sql = new StringBuilder();
|
|
|
- sql.Append("update craftmaterial set cm_status=-1,CM_DROPMAN='" + User.UserName + "' where cm_stepcode in (select cd_stepcode from craft left join ");
|
|
|
+ sql.Append("update craftmaterial set cm_status=-1,CM_DROPMAN='" + User.UserName + "',CM_DROPDATE=sysdate,CM_DROPSTEP='" + User.CurrentStepCode + "', CM_DROPSCCODE='" + User.UserSourceCode + "',cm_remark='抽检回流,回流工序序号" + stepno + "' where cm_stepcode in (select cd_stepcode from craft left join ");
|
|
|
sql.Append("craftdetail on cd_crid = cr_id where cr_prodcode = '" + ms_prodcode + "' and cd_detno >= " + stepno + ") ");
|
|
|
sql.Append("and cm_firstsn='" + ms_firstsn + "' and cm_makecode='" + ms_makecode + "'");
|
|
|
dh.ExecuteSql(sql.ToString(), "update");
|
|
|
|
|
|
dh.ExecuteSql("delete from labelprintlog where lpl_value='" + SN.Text + "' and lpl_makecode='" + ms_makecode + "' and LPL_STEPCODE in (select cd_stepcode from craft left join craftdetail" +
|
|
|
- " on cd_crid = cr_id where cr_prodcode = '" + ms_prodcode + "' and cd_detno >= " + stepno + ")", "delete");
|
|
|
+ " on cd_crid = cr_id where cr_prodcode = '" + ms_prodcode + "' and cr_code='"+ ms_craftcode + "' and cd_detno >= " + stepno + ")", "delete");
|
|
|
|
|
|
dh.ExecuteSql("update makeserial set ms_status=1,ms_qctest=3,ms_nextstepcode='" + cd_stepcode.Text + "',ms_checkno='' where ms_id='" + ms_id + "'", "update");
|
|
|
|