• 大小: 38.47MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-22
  • 语言: 其他
  • 标签: SSM  

资源简介

人力资源管理系统,Spring+SpringMvc+MyBatis,毕业设计,web页面简单,逻辑清晰

资源截图

代码片段和文件信息

package com.iotek.controller;

import com.iotek.entity.Checkon;
import com.iotek.entity.Employee;
import com.iotek.service.CheckonService;
import com.iotek.service.EmployeeService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;


/**
 * Created by Mbenben on 2017/4/21.
 */
@Controller(“checkAction“)
public class CheckAction {
    @Resource(name = “empolyeeService“)
    private EmployeeService employeeService;
    @Resource(name = “checkonService“)
    private CheckonService checkonService;

    //上班签到
    @RequestMapping(“/addCheckon.action“)
    public String addCheckon(HttpSession session ModelMap map) throws ParseException {
        Employee employee = (Employee) session.getAttribute(“employee“);
        SimpleDateFormat sdf = new SimpleDateFormat(“HH:mm“);
        SimpleDateFormat sdf1 = new SimpleDateFormat(“yyyy-MM-dd“);
        String source = “9:00“;//上班规定时间
        double h = 0;
        Date date = null;
        Date date1 = null;
        try {
            date = sdf.parse(source);
            date1 = sdf.parse(sdf.format(new Date()));
            h = (date1.getTime() - date.getTime()) / 1000 / 3600.0;

        } catch (ParseException e) {
            e.printStackTrace();
        }

        List checkonList = checkonService.getCheckonByEid(employee.getEid());
        if (checkonList.size() != 0) {
            Checkon checkon = checkonList.get(checkonList.size() - 1);
            Date date2 = sdf1.parse(sdf1.format(checkon.getStarttime()));
            Date date3 = sdf1.parse(sdf1.format(new Date()));
            if (!date2.equals(date3)) {
                Checkon checkon1 = new Checkon();
                checkon1.setStarttime(new Date());
                checkon.setGowork_state(“正常“);
                if (0 < h && h <= 3) {
                    checkon1.setGowork_state(“迟到“);
                } else if (h > 3) {
                    checkon1.setGowork_state(“旷工“);
                }

                checkon1.setEmployee(employee);
                checkonService.addChechon(checkon1);
                Checkon checkon2 = checkonService.getCheckonByTid(checkon1.getKid());
                session.setAttribute(“checkon2“ checkon2);
                map.addAttribute(“success“ “签到成功“);
            } else {

                map.addAttribute(“defeated“ “你已经打过卡了“);
            }

            return “showCheckon.jsp“;
        }

        Checkon checkon = new Checkon();
        checkon.setStarttime(new Date());
        checkon.setGowork_state(“正常“);
        if (0 < h && h <= 3) {
            checkon.setGowork_state(“迟到“);
        }
        if (h > 3) {
            checkon.set

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       6054  2017-04-12 12:42  HRSSM\.idea\artifacts\HRSSM_war_exploded.xml

     文件        449  2017-04-11 10:44  HRSSM\.idea\compiler.xml

     文件        124  2017-04-25 10:57  HRSSM\.idea\dataSources\0c37aae9-2238-47ff-8af5-8e31bda37bb1\storage.xml

     文件      65536  2017-04-25 18:03  HRSSM\.idea\dataSources\0c37aae9-2238-47ff-8af5-8e31bda37bb1\_metadata_\metadata

     文件       4096  2017-04-25 18:03  HRSSM\.idea\dataSources\0c37aae9-2238-47ff-8af5-8e31bda37bb1\_metadata_\metadata.keystream

     文件          8  2017-04-25 18:03  HRSSM\.idea\dataSources\0c37aae9-2238-47ff-8af5-8e31bda37bb1\_metadata_\metadata.keystream.len

     文件          8  2017-04-25 18:03  HRSSM\.idea\dataSources\0c37aae9-2238-47ff-8af5-8e31bda37bb1\_metadata_\metadata.len

     文件         76  2017-04-25 18:03  HRSSM\.idea\dataSources\0c37aae9-2238-47ff-8af5-8e31bda37bb1\_metadata_\metadata.values.at

     文件      32768  2017-04-25 18:03  HRSSM\.idea\dataSources\0c37aae9-2238-47ff-8af5-8e31bda37bb1\_metadata_\metadata_i

     文件          8  2017-04-25 18:03  HRSSM\.idea\dataSources\0c37aae9-2238-47ff-8af5-8e31bda37bb1\_metadata_\metadata_i.len

     文件        476  2017-04-25 10:57  HRSSM\.idea\dataSources\0c37aae9-2238-47ff-8af5-8e31bda37bb1\_src_\schema\hr.zip

     文件      19027  2017-04-26 10:07  HRSSM\.idea\dataSources\0c37aae9-2238-47ff-8af5-8e31bda37bb1.xml

     文件       2323  2017-04-12 13:36  HRSSM\.idea\dataSources\5f5165b9-55e5-49cf-b6e5-8d3a0becc359.xml

     文件       1437  2017-04-12 13:43  HRSSM\.idea\dataSources.local.xml

     文件       1592  2017-04-12 13:35  HRSSM\.idea\dataSources.xml

     文件         88  2017-04-11 11:03  HRSSM\.idea\dictionaries\Mbenben.xml

     文件        282  2017-04-12 12:32  HRSSM\.idea\encodings.xml

     文件        232  2017-04-12 13:43  HRSSM\.idea\kotlinc.xml

     文件        273  2017-04-11 11:03  HRSSM\.idea\misc.xml

     文件        250  2017-04-11 10:44  HRSSM\.idea\modules.xml

     文件       8792  2017-04-12 13:52  HRSSM\.idea\uiDesigner.xml

     文件     108340  2017-05-05 10:31  HRSSM\.idea\workspace.xml

     文件       1537  2017-04-12 13:43  HRSSM\HRSSM.iml

     文件       1559  2017-04-28 01:43  HRSSM\out\artifacts\HRSSM_war_exploded\addDept.jsp

     文件       2535  2017-04-20 17:23  HRSSM\out\artifacts\HRSSM_war_exploded\addEmployee.jsp

     文件       2212  2017-04-28 01:43  HRSSM\out\artifacts\HRSSM_war_exploded\addPost.jsp

     文件       3196  2017-04-28 01:43  HRSSM\out\artifacts\HRSSM_war_exploded\addRecruit.jsp

     文件       5855  2017-04-28 02:10  HRSSM\out\artifacts\HRSSM_war_exploded\addResume.jsp

     文件       2036  2017-04-28 01:43  HRSSM\out\artifacts\HRSSM_war_exploded\addRwandph.jsp

     文件       2347  2017-04-28 01:43  HRSSM\out\artifacts\HRSSM_war_exploded\addSalary.jsp

............此处省略570个文件信息

评论

共有 条评论