|
|
|
@ -280,8 +280,15 @@ VALUES
|
|
|
|
/// <param name="bdt"></param>
|
|
|
|
/// <param name="bdt"></param>
|
|
|
|
/// <param name="edt"></param>
|
|
|
|
/// <param name="edt"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public bool ExecuteReportWork(DataRowView selectRow,string reportCode, string workTime, string userCount, string costCenter, string deviceCode)
|
|
|
|
public bool ExecuteReportWork(DataRowView selectRow,string workCount, string reportCode, string workTime, string userCount, string costCenter, string deviceCode)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
string getReportCodeSql = $@"SELECT equipment_code,equipment_name FROM [dbo].[base_equipment] WHERE equipment_code='{deviceCode}'";
|
|
|
|
|
|
|
|
string lineName = "";
|
|
|
|
|
|
|
|
DataSet dtset = Utils.netClientDBHelper.getDataSet(getReportCodeSql);
|
|
|
|
|
|
|
|
if (dtset != null && dtset.Tables.Count > 0 && dtset.Tables[0].Rows.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
lineName = dtset.Tables[0].Rows[0]["equipment_name"].ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
List<string> sqlList = new List<string>();
|
|
|
|
List<string> sqlList = new List<string>();
|
|
|
|
string sql = $@"INSERT INTO [dbo].[mes_report_work]
|
|
|
|
string sql = $@"INSERT INTO [dbo].[mes_report_work]
|
|
|
|
([id], [report_type], [report_code], [workorder_code], [product_code], [product_name],
|
|
|
|
([id], [report_type], [report_code], [workorder_code], [product_code], [product_name],
|
|
|
|
@ -293,9 +300,9 @@ VALUES
|
|
|
|
[use_man], [work_center])
|
|
|
|
[use_man], [work_center])
|
|
|
|
VALUES
|
|
|
|
VALUES
|
|
|
|
('{Common.GetUUID()}', 'SELF', '{reportCode}', '{selectRow["workorder_code"]}', '{selectRow["product_code"]}', '{selectRow["product_name"]}',
|
|
|
|
('{Common.GetUUID()}', 'SELF', '{reportCode}', '{selectRow["workorder_code"]}', '{selectRow["product_code"]}', '{selectRow["product_name"]}',
|
|
|
|
'{selectRow["product_spc"]}', '{selectRow["unit"]}', {selectRow["quantity_split"]}, {selectRow["quantity_split"]}, 0, 0,
|
|
|
|
'{selectRow["product_spc"]}', '{selectRow["unit"]}', {workCount}, {workCount}, 0, 0,
|
|
|
|
'{LoginUser.UserCode}', '{LoginUser.UserName}', 'PC', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}', 'PREPARE',
|
|
|
|
'{LoginUser.UserCode}', '{LoginUser.UserName}', 'PC', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}', 'PREPARE',
|
|
|
|
'无', '{workTime}', '{deviceCode}', N'线体2', N'A01', '{selectRow["shift_id"]}',
|
|
|
|
'无', '{workTime}', '{deviceCode}', '{lineName}', N'{LoginUser.TeamCode}', '{selectRow["shift_id"]}',
|
|
|
|
NULL, NULL, NULL, NULL, '{LoginUser.UserName}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}',
|
|
|
|
NULL, NULL, NULL, NULL, '{LoginUser.UserName}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}',
|
|
|
|
'{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}',GetDate(), '0', NULL, 'prod',
|
|
|
|
'{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', '{LoginUser.UserName}',GetDate(), '0', NULL, 'prod',
|
|
|
|
{userCount}, '{costCenter}');";
|
|
|
|
{userCount}, '{costCenter}');";
|
|
|
|
@ -309,6 +316,7 @@ VALUES
|
|
|
|
return issucc;//> 0 ? true : false;
|
|
|
|
return issucc;//> 0 ? true : false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 根据设备编码获取当前机台最新的吊满的RFID信息
|
|
|
|
/// 根据设备编码获取当前机台最新的吊满的RFID信息
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
|