|
@@ -8,6 +8,7 @@ class Model_logic_whlabel extends Lin_Model {
|
|
$this->load->_model('Model_typeclass','typeclass');
|
|
$this->load->_model('Model_typeclass','typeclass');
|
|
$this->load->_model('Model_classid','classid');
|
|
$this->load->_model('Model_classid','classid');
|
|
$this->load->_model('Model_logic_weight','logic_weight');
|
|
$this->load->_model('Model_logic_weight','logic_weight');
|
|
|
|
+ $this->load->_model("Model_logic_u9tools","logic_u9tools");
|
|
}
|
|
}
|
|
|
|
|
|
protected $pmList = [];//品名匹配的数据
|
|
protected $pmList = [];//品名匹配的数据
|
|
@@ -21,14 +22,20 @@ class Model_logic_whlabel extends Lin_Model {
|
|
*/
|
|
*/
|
|
public function dataTran($list,$condition){
|
|
public function dataTran($list,$condition){
|
|
foreach($condition as $v){
|
|
foreach($condition as $v){
|
|
- if($v == 'pm'){
|
|
|
|
|
|
+ if($v == 'pm' ){
|
|
$this->pmData();
|
|
$this->pmData();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ if(in_array('pm',$condition)){
|
|
|
|
+ $classid = $this->pm;
|
|
|
|
+ $typeclass = $this->pmList;
|
|
|
|
+ }
|
|
foreach($list as $k=>$v){
|
|
foreach($list as $k=>$v){
|
|
if(in_array('pm',$condition)){
|
|
if(in_array('pm',$condition)){
|
|
- $list[$k]['pm'] = $this->getPm($v['features']);
|
|
|
|
|
|
+ $r = $this->logic_u9tools->getOneU9bm($v['features'],$classid,$typeclass);
|
|
|
|
+ $list[$k]['pm'] = $r['zh'];
|
|
|
|
+ $list[$k]['jm'] = $r['jm'];
|
|
|
|
+ $list[$k]['bm'] = $r['bm'];
|
|
}
|
|
}
|
|
if(in_array('weight',$condition)){
|
|
if(in_array('weight',$condition)){
|
|
$list[$k]['weight'] = $this->getWeight($v['features']);
|
|
$list[$k]['weight'] = $this->getWeight($v['features']);
|
|
@@ -64,6 +71,7 @@ class Model_logic_whlabel extends Lin_Model {
|
|
|
|
|
|
return $zh;
|
|
return $zh;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
|
|
protected function getWeight($features){
|
|
protected function getWeight($features){
|
|
$features = explode("-",trim($features,"-"));
|
|
$features = explode("-",trim($features,"-"));
|