|
@@ -41,16 +41,28 @@ class ReportingWork extends Api
|
|
|
$this->error('设备信息');
|
|
$this->error('设备信息');
|
|
|
}
|
|
}
|
|
|
//小组信息
|
|
//小组信息
|
|
|
- $person = db('人员_小组资料')
|
|
|
|
|
- ->where('team_name', $majorprocess['设备编组'])
|
|
|
|
|
- ->where('status', 1)
|
|
|
|
|
- ->field('team_name as 小组名称,staff_no as 员工编号,staff_name as 员工姓名')
|
|
|
|
|
|
|
+// $person = db('人员_小组资料')
|
|
|
|
|
+// ->where('team_name', $majorprocess['设备编组'])
|
|
|
|
|
+// ->where('status', 1)
|
|
|
|
|
+// ->field('team_name as 小组名称,staff_no as 员工编号,staff_name as 员工姓名')
|
|
|
|
|
+// ->select();
|
|
|
|
|
+ $person = Db::name('人员_小组资料')->alias('a')
|
|
|
|
|
+ ->field('
|
|
|
|
|
+ b.staff_no as 员工编号,
|
|
|
|
|
+ b.staff_name as 员工姓名,
|
|
|
|
|
+ a.team_name as 小组名称
|
|
|
|
|
+ ')
|
|
|
|
|
+ ->join('人员_基本资料 b', 'a.staff_no = b.staff_no')
|
|
|
|
|
+ ->where('a.team_name', $majorprocess['设备编组'])
|
|
|
|
|
+ ->whereNull('a.mod_rq')
|
|
|
|
|
+ ->whereNull('b.mod_rq')
|
|
|
|
|
+ ->order('a.id asc')
|
|
|
->select();
|
|
->select();
|
|
|
if (empty($person)) {
|
|
if (empty($person)) {
|
|
|
$this->error('未找到人员信息');
|
|
$this->error('未找到人员信息');
|
|
|
}
|
|
}
|
|
|
$data['majorprocess'] = $majorprocess;
|
|
$data['majorprocess'] = $majorprocess;
|
|
|
- $data['person'] = $person;
|
|
|
|
|
|
|
+ $data['person'] = $person;
|
|
|
$this->success('成功', $data);
|
|
$this->success('成功', $data);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -64,7 +76,7 @@ class ReportingWork extends Api
|
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
* @throws \think\exception\DbException
|
|
* @throws \think\exception\DbException
|
|
|
- *
|
|
|
|
|
|
|
+ *
|
|
|
*/
|
|
*/
|
|
|
public function GetOrderProcess()
|
|
public function GetOrderProcess()
|
|
|
{
|
|
{
|
|
@@ -289,7 +301,7 @@ class ReportingWork extends Api
|
|
|
->field('machine,date')
|
|
->field('machine,date')
|
|
|
->order('machine asc,date desc')
|
|
->order('machine asc,date desc')
|
|
|
->select();
|
|
->select();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$menuMap = [];
|
|
$menuMap = [];
|
|
|
foreach ($list as $row) {
|
|
foreach ($list as $row) {
|
|
|
$machine = $row['machine'];
|
|
$machine = $row['machine'];
|