|
|
@@ -479,28 +479,27 @@ namespace UAS_MES_NEW.Packing
|
|
|
double ActualWeight = double.Parse(weight.Text == "" ? "0" : weight.Text.Replace("kg", "").Replace("g", "").Trim());
|
|
|
double palletWeightErrorValue = double.Parse(dh.GetConfig("palletWeightErrorValue", "MESSetting").ToString());
|
|
|
double totalweight = double.Parse(sumpalletweight.Text);
|
|
|
- if (PR_CHECKCARTONW != "0")
|
|
|
+
|
|
|
+ if (palletWeightErrorValue == 0)
|
|
|
{
|
|
|
- if (palletWeightErrorValue == 0)
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>产品" + pr_code.Text + "未维护栈板偏差值\n", Color.Red);
|
|
|
- return;
|
|
|
- }
|
|
|
- if ((ActualWeight >= totalweight - palletWeightErrorValue) && (ActualWeight <= totalweight + palletWeightErrorValue))
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "重量检测检测合格\n", Color.Green);
|
|
|
- LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "栈板称重:" + weight.Text, "称量合格", pa_outboxcode.Text, "");
|
|
|
- LogicHandler.RecordProdWeight(pa_outboxcode.Text, "SN", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
|
|
|
- dh.ExecuteSql("update package set PA_WEIGHT='" + ActualWeight + "',pa_roundweight=round('" + ActualWeight + "') where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "重量检测未通过\n", Color.Red);
|
|
|
- LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "栈板称重:" + weight.Text, "称量不合格", pa_outboxcode.Text, "");
|
|
|
- LogicHandler.RecordProdWeight(pa_outboxcode.Text, "SN", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
|
|
|
- return;
|
|
|
- }
|
|
|
+ OperateResult.AppendText(">>产品" + pr_code.Text + "未维护栈板偏差值\n", Color.Red);
|
|
|
+ return;
|
|
|
}
|
|
|
+ if ((ActualWeight >= totalweight - palletWeightErrorValue) && (ActualWeight <= totalweight + palletWeightErrorValue))
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "重量检测检测合格\n", Color.Green);
|
|
|
+ LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "栈板称重:" + weight.Text, "称量合格", pa_outboxcode.Text, "");
|
|
|
+ LogicHandler.RecordProdWeight(pa_outboxcode.Text, "SN", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
|
|
|
+ dh.ExecuteSql("update package set PA_WEIGHT='" + ActualWeight + "',pa_roundweight=round('" + ActualWeight + "') where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "重量检测未通过\n", Color.Red);
|
|
|
+ LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "栈板称重:" + weight.Text, "称量不合格", pa_outboxcode.Text, "");
|
|
|
+ LogicHandler.RecordProdWeight(pa_outboxcode.Text, "SN", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (dh.getFieldDataByCondition("package", "PA_PALLETNO", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString() == "")
|
|
|
{
|
|
|
OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "未绑定卡板号,不允许封箱\n", Color.Black, sn_code);
|