|
|
@@ -725,10 +725,13 @@ class MachineProductionReport extends Api
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 查询定额代号
|
|
|
- * @ApiMethod (GET)
|
|
|
+ * 检品机定额代号获取
|
|
|
+ * @return void
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ * @throws \think\exception\DbException
|
|
|
*/
|
|
|
- public function getDedh()
|
|
|
+ public function JPgetDedh()
|
|
|
{
|
|
|
//get请求
|
|
|
if(!$this->request->isGet()){
|
|
|
@@ -740,11 +743,11 @@ class MachineProductionReport extends Api
|
|
|
}
|
|
|
if(!empty($req['sczl_jtbh'])){
|
|
|
$row = db('dic_lzde')
|
|
|
- ->field('sys_bh,Key_')
|
|
|
- ->where('适用机型',$req['sczl_jtbh'])
|
|
|
- ->find();
|
|
|
+ ->field('sys_bh,Key_')
|
|
|
+ ->where('适用机型',$req['sczl_jtbh'])
|
|
|
+ ->find();
|
|
|
$list = db('dic_lzde')
|
|
|
- ->field('sys_bh')
|
|
|
+ ->field('sys_bh,rtrim(sys_mc)')
|
|
|
->where('Parent',$row['Key_'])
|
|
|
->select();
|
|
|
if (empty($list)){
|
|
|
@@ -754,6 +757,38 @@ class MachineProductionReport extends Api
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询定额代号
|
|
|
+ * @ApiMethod (GET)
|
|
|
+ */
|
|
|
+ public function getDedh()
|
|
|
+ {
|
|
|
+ //get请求
|
|
|
+ if(!$this->request->isGet()){
|
|
|
+ $this->error('请求方式错误');
|
|
|
+ }
|
|
|
+ $req = $this->request->param();
|
|
|
+ if (!isset($req['sczl_jtbh'])){
|
|
|
+ $this->error('参数错误');
|
|
|
+ }
|
|
|
+ if(!empty($req['sczl_jtbh'])){
|
|
|
+ $row = db('dic_lzde')
|
|
|
+ ->field('sys_bh,Key_,rtrim(sys_mc)')
|
|
|
+ ->where('适用机型',$req['sczl_jtbh'])
|
|
|
+ ->find();
|
|
|
+// $list = db('dic_lzde')
|
|
|
+// ->field('sys_bh')
|
|
|
+// ->where('Parent',$row['Key_'])
|
|
|
+// ->select();
|
|
|
+// if (empty($list)){
|
|
|
+ $this->success('成功',$row);
|
|
|
+// }else{
|
|
|
+// $this->success('成功',$list);
|
|
|
+// }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
$row = db('dic_lzde')
|
|
|
->field('Key_, sys_bh, rtrim(sys_mc) as sys_mc')
|