12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\api\controller;
- use app\common\constant\ApplyConstant;
- use app\common\constant\CommonConstant;
- use app\common\constant\ContractConstant;
- use app\common\constant\EvectionConstant;
- use app\common\constant\LeaveConstant;
- use app\common\constant\MaintainConstant;
- use app\common\constant\OfferConstant;
- use hg\apidoc\annotation as Apidoc;
- /**
- * @Apidoc\Title("公用")
- * @Apidoc\Group("api")
- * @Apidoc\Sort("4")
- */
- class Common extends Base
- {
- public function initialize()
- {
- parent::initialize();
- }
- /**
- * 类型列表
- *
- * @Apidoc\Method("POST")
- * @Apidoc\Returned("module_list", type="array", desc="模块列表")
- * @Apidoc\Returned("degree_list", type="array", desc="缓急程度列表")
- * @Apidoc\Returned("pay_type_list", type="array", desc="采购支付方式列表")
- * @Apidoc\Returned("data1", type="array", desc="采购类型列表")
- * @Apidoc\Returned("data2", type="array", desc="呈批类型列表")
- * @Apidoc\Returned("data5", type="array", desc="出差类型列表")
- * @Apidoc\Returned("data6", type="array", desc="请假类型列表")
- * @Apidoc\Returned("data8", type="array", desc="维修类型列表")
- * @Apidoc\Returned("data9", type="array", desc="合同类型列表")
- */
- public function get_type_list()
- {
- $module_list = get_one_two_array(CommonConstant::get_module_list(), 'id', 'name');
- $degree_list = get_one_two_array(OfferConstant::get_degree_list(), 'id', 'name');
- $pay_type_list = get_one_two_array(ApplyConstant::get_pay_type_list(), 'id', 'name');
- $data1 = get_one_two_array(ApplyConstant::get_type_list(), 'id', 'name');
- $data2 = get_one_two_array(OfferConstant::get_type_list(), 'id', 'name');
- $data5 = get_one_two_array(EvectionConstant::get_type_list(), 'id', 'name');
- $data6 = get_one_two_array(LeaveConstant::get_type_list(), 'id', 'name');
- $data8 = get_one_two_array(MaintainConstant::get_type_list(), 'id', 'name');
- $data9 = get_one_two_array(ContractConstant::get_type_list(), 'id', 'name');
- $data = compact("module_list","degree_list","pay_type_list","data1","data2","data5","data6","data8","data9");
- $this->success('类型列表', $data);
- }
- }
|