Package com.mossle.workcal.domain

Examples of com.mossle.workcal.domain.WorkcalPart


    @RequestMapping("workcal-part-input")
    public String input(@RequestParam(value = "id", required = false) Long id,
            Model model) {
        if (id != null) {
            WorkcalPart workcalPart = workcalPartManager.get(id);
            model.addAttribute("model", workcalPart);
        }

        model.addAttribute("workcalRules", workcalRuleManager.getAll());
View Full Code Here


    @RequestMapping("workcal-part-save")
    public String save(@ModelAttribute WorkcalPart workcalPart,
            @RequestParam("workcalRuleId") Long workcalRuleId,
            RedirectAttributes redirectAttributes) {
        Long id = workcalPart.getId();
        WorkcalPart dest = null;

        if (id != null) {
            dest = workcalPartManager.get(id);
            beanMapper.copy(workcalPart, dest);
        } else {
            dest = workcalPart;
        }

        dest.setWorkcalRule(workcalRuleManager.get(workcalRuleId));

        workcalPartManager.save(dest);
        messageHelper.addFlashMessage(redirectAttributes, "core.success.save",
                "保存成功");
View Full Code Here

        if (id != null) {
            hql = "from WorkcalPart where name=? and id<>?";
            params = new Object[] { name, id };
        }

        WorkcalPart workcalPart = workcalPartManager.findUnique(hql, params);

        boolean result = (workcalPart == null);

        return result;
    }
View Full Code Here

TOP

Related Classes of com.mossle.workcal.domain.WorkcalPart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.