/**
 * Created by jimiz on 2017/4/7.
 */
let express = require('express');
let ss_middleware = require("../middleware/index");

module.exports = function (app) {
    let rationRouter = express.Router();
    let rationController = require('../controllers/ration_controller');
    rationRouter.post('/getData', rationController.getData);
    rationRouter.post('/getItemTemplate', rationController.getItemTemplate);
    rationRouter.post('/allocIDs', rationController.allocIDs);
    rationRouter.post('/insertGLJAsRation', rationController.action);
    rationRouter.post('/replaceRations', rationController.action);
    rationRouter.post('/addNewRation', ss_middleware.rationNumberChecking,rationController.action);
    rationRouter.post('/updateMaterialRation', ss_middleware.rationNumberChecking,rationController.action);
    rationRouter.post('/addMultiRation', rationController.action);
    rationRouter.post('/getSameSectionRations', rationController.action);
    rationRouter.post('/getDefaultProgramID', rationController.action);
    rationRouter.post('/applyTemplate', rationController.action);
    rationRouter.post('/updateRationAss', rationController.action);
    rationRouter.post('/updateCoeAdjust', rationController.action);
    app.use('/ration', rationRouter);
};
