|
|
|
|
@ -819,27 +819,6 @@ VALUES
|
|
|
|
|
double rate = Convert.ToDouble(workCount) / Convert.ToDouble(orderQuntity);//workCount是报工数量,orderQuntity是母单数量
|
|
|
|
|
double subOrderQty = 0;
|
|
|
|
|
LogHelper.instance.log.Info("rate>>>" + rate);
|
|
|
|
|
//根据base_product_attach表里的报工比例,计算子单数量,又取消了
|
|
|
|
|
string sqlGetReportRate = $@"select isnull(report_rate,0) as report_rate from base_product where product_code = '{selectRow["product_code"]}'";
|
|
|
|
|
//DataSet dtReportRate = Utils.netClientDBHelper.getDataSet(sqlGetReportRate);
|
|
|
|
|
|
|
|
|
|
//string reportRate = "0";
|
|
|
|
|
//if (dtReportRate != null && dtReportRate.Tables.Count > 0 && dtReportRate.Tables[0].Rows.Count > 0)
|
|
|
|
|
//{
|
|
|
|
|
// reportRate = dtReportRate.Tables[0].Rows[0][0].ToString();
|
|
|
|
|
// LogHelper.instance.log.Info("获取到报工效率为:" + reportRate+",产品编码为:"+ selectRow["product_code"]+",子单数量为:"+ subQuntity);
|
|
|
|
|
//}
|
|
|
|
|
//if (sortNo < 3)
|
|
|
|
|
//{
|
|
|
|
|
// if (reportRate.Equals("0"))
|
|
|
|
|
// {
|
|
|
|
|
// subOrderQty = rate * Convert.ToDouble(subQuntity);
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// subOrderQty = Convert.ToDouble(reportRate) * Convert.ToDouble(subQuntity);
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
if (sortNo < 3)
|
|
|
|
|
{
|
|
|
|
|
subOrderQty = rate * Convert.ToDouble(subQuntity);
|
|
|
|
|
@ -863,7 +842,8 @@ VALUES
|
|
|
|
|
{userCountDic[sortNo]}, '{costCenter}','0','{batchCode}','{isEndReport}','{orderId}','{LoginUser.CurrDeviceIP}','{LoginUser.Version}');";
|
|
|
|
|
workReports.Add(subOrderSql);
|
|
|
|
|
sortNo++;
|
|
|
|
|
GetAllWorkReportsForOrderAndChildren(subOrder, selectRow, orderQuntity, reportCode, costCenter, batchCode, isEndReport, deviceCode, lineName, subQuntity, workTimeDic, userCountDic, sortNo);
|
|
|
|
|
//GetAllWorkReportsForOrderAndChildren(subOrder, selectRow, orderQuntity, reportCode, costCenter, batchCode, isEndReport, deviceCode, lineName, subQuntity, workTimeDic, userCountDic, sortNo);
|
|
|
|
|
GetAllWorkReportsForOrderAndChildren(subOrder, selectRow, orderQuntity, reportCode, costCenter, batchCode, isEndReport, deviceCode, lineName, workCount, workTimeDic, userCountDic, sortNo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|