|
|
@@ -30,7 +30,9 @@ namespace UAS_MES_NEW.Query
|
|
|
li_code.SelectField = "li_code # 线别编号,li_name # 线别名称";
|
|
|
li_code.FormName = Name;
|
|
|
li_code.SetValueField = new string[] { "li_code" };
|
|
|
- li_code.Condition = "li_statuscode='AUDITED' and instr('" + User.UserCtCode + "',li_longline)>0";
|
|
|
+ //ctcode 为 ALL 时不限线别,放大镜列出全部已审核线别;否则只列出登录人长线下的线别
|
|
|
+ li_code.Condition = User.UserCtCode == "ALL" ? "li_statuscode='AUDITED'"
|
|
|
+ : "li_statuscode='AUDITED' and instr('" + User.UserCtCode + "',li_longline)>0";
|
|
|
li_code.DbChange += Li_code_DbChange;
|
|
|
//初始提示
|
|
|
OperateResult.AppendText(">>请选择线别,输入人员工号后回车执行" + (UpLoadMan.Checked ? "上线" : "下线") + ";下线也可勾选列表后点\"确认下线\"批量处理\n", Color.Black);
|
|
|
@@ -125,7 +127,8 @@ namespace UAS_MES_NEW.Query
|
|
|
return;
|
|
|
}
|
|
|
//所选线别必须属于登录人长线(line.li_longline)下的线别,否则上/下线都不允许
|
|
|
- if (dh.getFieldDataByCondition("line", "count(1)",
|
|
|
+ //ctcode 为 ALL 时不限线别,任何线别都可操作
|
|
|
+ if (User.UserCtCode != "ALL" && dh.getFieldDataByCondition("line", "count(1)",
|
|
|
"instr('" + User.UserCtCode + "',li_longline)>0 and li_code='" + linecode + "' and li_statuscode='AUDITED'").ToString() == "0")
|
|
|
{
|
|
|
OperateResult.AppendText("<<线别" + linecode + "不在" + User.UserCtCode + "范围内,不允许扫码\n", Color.Red, li_code);
|
|
|
@@ -175,9 +178,9 @@ namespace UAS_MES_NEW.Query
|
|
|
em_code.Focus();
|
|
|
return;
|
|
|
}
|
|
|
- //人员当前在线线体也必须在登录人长线范围内,否则不允许下线
|
|
|
+ //人员当前在线线体也必须在登录人长线范围内,否则不允许下线;ctcode 为 ALL 时不限
|
|
|
string onLineCode = dtOn.Rows[0]["lm_linecode"].ToString();
|
|
|
- if (dh.getFieldDataByCondition("line", "count(1)",
|
|
|
+ if (User.UserCtCode != "ALL" && dh.getFieldDataByCondition("line", "count(1)",
|
|
|
"instr('" + User.UserCtCode + "',li_longline)>0 and li_code='" + onLineCode + "' and li_statuscode='AUDITED'").ToString() == "0")
|
|
|
{
|
|
|
OperateResult.AppendText("<<" + emcode + "当前在" + onLineCode + "上线,该线别不在" + User.UserCtCode + "范围内,不允许下线\n", Color.Red, em_code);
|