|
@@ -95,14 +95,14 @@ class Worklocation extends Model
|
|
|
public function getPartsNameAttr()
|
|
|
{
|
|
|
$parts = $this->parts;
|
|
|
- $value = $this->get_dict_data(11,$parts);
|
|
|
+ $value = $this->get_dict_data(1,$parts);
|
|
|
return $value;
|
|
|
}
|
|
|
//获取工作位置型号
|
|
|
public function getWorkLocalNameAttr()
|
|
|
{
|
|
|
$code = $this->work_local;
|
|
|
- $value = $this->get_dict_data(12,$code);
|
|
|
+ $value = $this->get_dict_data(2,$code);
|
|
|
return $value;
|
|
|
}
|
|
|
/**
|
|
@@ -114,7 +114,7 @@ class Worklocation extends Model
|
|
|
{
|
|
|
|
|
|
$code = $this->bolt_style;
|
|
|
- $value = $this->get_dict_data(13,$code);
|
|
|
+ $value = $this->get_dict_data(3,$code);
|
|
|
return $value;
|
|
|
}
|
|
|
/**
|
|
@@ -125,27 +125,24 @@ class Worklocation extends Model
|
|
|
public function getBoitTypeNameAttr()
|
|
|
{
|
|
|
$code = $this->boit_type;
|
|
|
- $value = $this->get_dict_data(14,$code);
|
|
|
+ $value = $this->get_dict_data(4,$code);
|
|
|
return $value;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 查询字典 获取value
|
|
|
+ *
|
|
|
* @param [type] $type 类型
|
|
|
- * @param [type] $code 唯一code
|
|
|
+ * @param [type] $value 唯一value
|
|
|
* @return void
|
|
|
*/
|
|
|
- public function get_dict_data($type,$code)
|
|
|
+ public function get_dict_data($type,$value)
|
|
|
{
|
|
|
- $where[]=['type_id',"=",$type];
|
|
|
- $where[] = ['code','=',$code];
|
|
|
- $value = Db::name('sys_dict_data')->where($where)->value('value');
|
|
|
- return $value;
|
|
|
- }
|
|
|
- public function test()
|
|
|
- {
|
|
|
- return null;
|
|
|
+ $where[]=['device_type',"=",$type];
|
|
|
+ $where[] = ['value','=',$value];
|
|
|
+ $name = Db::name('maintenancemapper')->where($where)->value('name');
|
|
|
+ return $name;
|
|
|
}
|
|
|
+
|
|
|
//搜索
|
|
|
|
|
|
// public function searchNumberAttr($query, $value, $data)
|