/**
 * Created by Zhong on 2017/8/22.
 */

import express from "express";
import GljController from "../controllers/gljController";
import CompleRationController from '../../complementary_ration_lib/controllers/compleRationController';

let router = express.Router();
let gljController = new GljController();
let compleRationController = new CompleRationController();

module.exports = function (app) {
    app.get('/complementaryGlj', gljController.init, gljController.redirectGlj);

   /* router.post("/updateRationBasePrc",gljController.init, gljController.updateRationBasePrc);//更新定额单价
    router.post("/getRationGljIds", gljController.init, gljController.getRationGljIds);
    router.post("/createNewGljTypeNode", gljController.init, gljController.createNewGljTypeNode);
    router.post("/updateGljNodes", gljController.init, gljController.updateGljNodes);
    router.post("/deleteGljNodes", gljController.init, gljController.deleteGljNodes);*/
    router.post("/getGljDistType", gljController.init, gljController.getGljDistType);
    router.post("/getGljTree", gljController.init, gljController.getGljTree);
    router.post("/getGljItems", gljController.init, gljController.getGljItems);
    router.post('/getStdItems', gljController.init, gljController.getStdItems);
    router.post("/updateComponent", gljController.init, gljController.updateComponent);
    router.post("/mixUpdateGljItems", gljController.init, gljController.mixUpdateGljItems);
    router.post("/updateRationBasePrc",compleRationController.init, compleRationController.updateRationBasePrc);//更新定额单价
    //router.post("/getGljItemsByIds", gljController.init, gljController.getGljItemsByIds);
    //router.post("/getGljItemsByCodes", gljController.init, gljController.getGljItemsByCodes);
    router.post('/getMixedTree', gljController.init, gljController.getMixedTree);

    app.use("/complementartGlj/api", router);

};
