/**
 * 项目工料机相关路由
 *
 * @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('/updateCalcMaterial', gljController.init, gljController.updateCalcMaterial);
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.post('/changeVvTaxFile',gljController.init, gljController.changeVvTaxFile);
router.post('/changeAssistProductionFeeRate',gljController.init, gljController.changeAssistProductionFeeRate);
router.post('/updateMaterialCalc',gljController.init, gljController.updateMaterialCalc);
router.post('/updateMaterialCalcTasks',gljController.init, gljController.updateMaterialCalcTasks);
router.post('/insertElectrovalence',gljController.init, gljController.insertElectrovalence);
router.post('/updateElectrovalence',gljController.init, gljController.updateElectrovalence);
router.post('/updateUserFreight',gljController.init, gljController.updateUserFreight);

router.get('/getVvTaxList', gljController.init, gljController.getVvTaxList);
router.get('/getUserFreights', gljController.init, gljController.getUserFreights);
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);
};
