/**
 * 项目工料机相关路由
 *
 * @author CaiAoLin
 * @date 2017/6/22
 * @version
 */
import Express from "express";
import GLJController from "../controllers/glj_controller";

module.exports = function (app) {
const router = Express.Router();
let gljController = new GLJController();

// action定义区域
router.post('/getData', gljController.init, gljController.getGljList);
router.post('/update', gljController.init, gljController.updateData);
router.post('/get-ratio', gljController.init, gljController.getRatio);
router.post('/delete-ratio', gljController.init, gljController.deleteMixRatio);
router.post('/add-ratio', gljController.init, gljController.addMixRatio);
router.post('/get-project-info', gljController.init, gljController.getProjectInfo);
router.post('/change-file', gljController.init, gljController.changeUnitPriceFile);
router.post('/checkUnitFileName', gljController.init, gljController.checkUnitFileName);
router.post('/save-as', gljController.init, gljController.unitPriceSaveAs);
router.post('/get-composition', gljController.init, gljController.getComposition);
router.post('/updatePrice', gljController.init, gljController.updateUnitPrice);
router.post('/batchUpdatePrices', gljController.init, gljController.batchUpdatePrices);
router.post('/batchUpdateGLJProperty', gljController.init, gljController.batchUpdateGLJProperty);
router.post('/batchUpdateConsumption', gljController.init, gljController.batchUpdateConsumption);
router.post('/modifyKeyValue',gljController.init, gljController.modifyKeyValue);

router.get('/test', gljController.init, gljController.test);
router.get('/testModify', gljController.init, gljController.testModify);
router.get('/testDelete', gljController.init, gljController.delete);

app.use('/glj',router);
};
