|
|
|
@ -97,7 +97,47 @@ class ComboItemGroupService
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return \Yz::Return(true, '操作完成', ['success_count' => $successCount, 'combos_count' => count($combos)]);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(isset($res['变更收费项目'])){
|
|
|
|
|
|
|
|
$items=$res['变更收费项目'];
|
|
|
|
|
|
|
|
foreach ($items as $item){
|
|
|
|
|
|
|
|
if($item['变更类别']=='删除'){
|
|
|
|
|
|
|
|
DB::table('items')->where(['item_id'=>$item['Id']])->delete();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if($item['变更类别']=='修改' || $item['变更类别']=='新增'){
|
|
|
|
|
|
|
|
$item_sex=null;
|
|
|
|
|
|
|
|
if (isset($v['性别限制'])) {
|
|
|
|
|
|
|
|
$item_sex_array = ['全部' => 0, '男' => 1, '女' => 2];
|
|
|
|
|
|
|
|
$item_sex = $item_sex_array[$item['性别限制']] >= 0 ? $item_sex_array[$item['性别限制']] : null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$ItemData=[
|
|
|
|
|
|
|
|
'item_id'=>$item['Id'],
|
|
|
|
|
|
|
|
'sex'=>$item_sex,
|
|
|
|
|
|
|
|
'can_qian_hou'=>$item['餐前餐后'],
|
|
|
|
|
|
|
|
'name'=>$item['名称'],
|
|
|
|
|
|
|
|
'pinyin'=>$item['拼音'],
|
|
|
|
|
|
|
|
'price'=>$item['价格'],
|
|
|
|
|
|
|
|
'is_choose'=>$item['可选']===false ? "0" : "1",
|
|
|
|
|
|
|
|
'keshi_id'=>$item['科室Id'],
|
|
|
|
|
|
|
|
'keshi_name'=>$item['科室名称'],
|
|
|
|
|
|
|
|
'beizhu'=>$item['备注'],
|
|
|
|
|
|
|
|
'jianjie'=>$item['简介'],
|
|
|
|
|
|
|
|
'status'=>1,
|
|
|
|
|
|
|
|
'updated_at'=>date('Y-m-d H:i:s'),
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
$cha= DB::table('items')->where(['item_id'=>$item['Id']])->get();
|
|
|
|
|
|
|
|
if(count($cha)>0){
|
|
|
|
|
|
|
|
DB::table('items')->where(['item_id'=>$item['Id']])->update($ItemData);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
DB::table('items')->insert($ItemData);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return \Yz::Return(true, '操作完成', []);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|