commit
d62d1a1243
@ -0,0 +1,175 @@
|
||||
package com.esms.controller;
|
||||
|
||||
import com.esms.service.IEchartsService;
|
||||
import com.esms.service.impl.EchartsServiceImpl;
|
||||
import com.esms.vo.EchDepartmentSalary;
|
||||
import com.esms.vo.EchEmployeeNums;
|
||||
import com.esms.vo.EchMonthSalary;
|
||||
import com.esms.vo.EchSalaryPercent;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
/**
|
||||
* @Description: 图表制作类
|
||||
**/
|
||||
@Controller
|
||||
public class EchartsController {
|
||||
@Autowired
|
||||
private IEchartsService echartsService;
|
||||
|
||||
@RequestMapping(value = "/showEmployeeNums.do")
|
||||
@ResponseBody
|
||||
public Map<String,List<EchEmployeeNums>> showEmployeeNums(){
|
||||
/**
|
||||
* 各部门的员工数量柱状图的数据
|
||||
* json格式{"list":[{"department":"人事部","num":480},{"department":"行政部","num":380}]}
|
||||
*/
|
||||
/*
|
||||
List<EchEmployeeNums> echEmployeeNumsList = new ArrayList();
|
||||
Map<String,List<EchEmployeeNums>> map = new HashMap<String,List<EchEmployeeNums>>();
|
||||
EchEmployeeNums e1 = new EchEmployeeNums();
|
||||
e1.setDepartment("人事部");
|
||||
e1.setNum(123);
|
||||
EchEmployeeNums e2 = new EchEmployeeNums();
|
||||
e2.setDepartment("行政部");
|
||||
e2.setNum(123);
|
||||
echEmployeeNumsList.add(e1);
|
||||
echEmployeeNumsList.add(e2);
|
||||
map.put("list",echEmployeeNumsList);*/
|
||||
return echartsService.getEmployeeNums();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/showDepartmentSalary.do")
|
||||
@ResponseBody
|
||||
public Map<String,List<EchDepartmentSalary>> showDepartmentSalary(String date){
|
||||
/**
|
||||
*各年月工资对比图的数据
|
||||
* json格式{"list":[{"year":"1","salary":[480,500,600,..]},{"year":"2","salary":[480,500,600...]}]}
|
||||
*/
|
||||
/*
|
||||
List<EchDepartmentSalary> echDepartmentSalaryList = new ArrayList<EchDepartmentSalary>();
|
||||
Map<String,List<EchDepartmentSalary>> stringListMap = new HashMap<String, List<EchDepartmentSalary>>();
|
||||
|
||||
EchDepartmentSalary e1 = new EchDepartmentSalary();
|
||||
e1.setDepartment("人事部");
|
||||
List<Double> salary1 = new ArrayList<Double>();
|
||||
salary1.add(5000.00);
|
||||
salary1.add(8000.00);
|
||||
salary1.add(20000.00);
|
||||
e1.setSalary(salary1);
|
||||
|
||||
EchDepartmentSalary e2 = new EchDepartmentSalary();
|
||||
e2.setDepartment("科研部");
|
||||
List<Double> salary2 = new ArrayList<Double>();
|
||||
salary2.add(6000.00);
|
||||
salary2.add(8500.00);
|
||||
salary2.add(25000.00);
|
||||
e2.setSalary(salary2);
|
||||
|
||||
EchDepartmentSalary e3 = new EchDepartmentSalary();
|
||||
e3.setDepartment("策划部");
|
||||
List<Double> salary3 = new ArrayList<Double>();
|
||||
salary3.add(6000.00);
|
||||
salary3.add(8800.00);
|
||||
salary3.add(23000.00);
|
||||
e3.setSalary(salary3);
|
||||
|
||||
echDepartmentSalaryList.add(e1);
|
||||
echDepartmentSalaryList.add(e2);
|
||||
echDepartmentSalaryList.add(e3);
|
||||
stringListMap.put("list",echDepartmentSalaryList);
|
||||
return stringListMap;*/
|
||||
return echartsService.getDepartmentSalary(date);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/showSalaryPercent.do")
|
||||
@ResponseBody
|
||||
public Map<String,List<EchSalaryPercent>> showSalaryPercent(String date,int state){
|
||||
/*List<EchSalaryPercent> echSalaryPercentList = new ArrayList<EchSalaryPercent>();
|
||||
Map<String,List<EchSalaryPercent>> map = new HashMap<String,List<EchSalaryPercent>>();
|
||||
EchSalaryPercent s1 = new EchSalaryPercent();
|
||||
EchSalaryPercent s2 = new EchSalaryPercent();
|
||||
s1.setDepartment("人事部");
|
||||
s1.setSalary(1010010.00);
|
||||
s2.setDepartment("科研部");
|
||||
s2.setSalary(1510010.00);
|
||||
echSalaryPercentList.add(s1);
|
||||
echSalaryPercentList.add(s2);
|
||||
map.put("list",echSalaryPercentList);*/
|
||||
|
||||
return echartsService.getSalaryPercent(date,state);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/showMonthSalary.do")
|
||||
@ResponseBody
|
||||
public Map<String,List<EchMonthSalary>> showMonthSalary(){
|
||||
/*
|
||||
List<EchMonthSalary> echMonthSalaryList = new ArrayList<EchMonthSalary>();
|
||||
Map<String,List<EchMonthSalary>> stringListMap = new HashMap<String, List<EchMonthSalary>>();
|
||||
|
||||
EchMonthSalary e1 = new EchMonthSalary();
|
||||
e1.setYear("2015年");
|
||||
List<Double> salary1 = new ArrayList<Double>();
|
||||
salary1.add(5000.00);
|
||||
salary1.add(8000.00);
|
||||
salary1.add(20000.00);
|
||||
salary1.add(5000.00);
|
||||
salary1.add(8000.00);
|
||||
salary1.add(20000.00);
|
||||
salary1.add(5000.00);
|
||||
salary1.add(8000.00);
|
||||
salary1.add(20000.00);
|
||||
salary1.add(5000.00);
|
||||
salary1.add(8000.00);
|
||||
salary1.add(20000.00);
|
||||
e1.setSalary(salary1);
|
||||
|
||||
EchMonthSalary e2 = new EchMonthSalary();
|
||||
e2.setYear("2016年");
|
||||
List<Double> salary2 = new ArrayList<Double>();
|
||||
salary2.add(5800.00);
|
||||
salary2.add(8080.00);
|
||||
salary2.add(20800.00);
|
||||
salary2.add(5080.00);
|
||||
salary2.add(8800.00);
|
||||
salary2.add(20800.00);
|
||||
salary2.add(5080.00);
|
||||
salary2.add(8080.00);
|
||||
salary2.add(20800.00);
|
||||
salary2.add(5080.00);
|
||||
salary2.add(8080.00);
|
||||
salary2.add(20080.00);
|
||||
e2.setSalary(salary2);
|
||||
|
||||
EchMonthSalary e3 = new EchMonthSalary();
|
||||
e3.setYear("2017年");
|
||||
List<Double> salary3 = new ArrayList<Double>();
|
||||
salary3.add(6000.00);
|
||||
salary3.add(8800.00);
|
||||
salary3.add(23000.00);
|
||||
salary3.add(6000.00);
|
||||
salary3.add(8800.00);
|
||||
salary3.add(23000.00);
|
||||
salary3.add(6000.00);
|
||||
salary3.add(8800.00);
|
||||
salary3.add(23000.00);
|
||||
salary3.add(6000.00);
|
||||
salary3.add(8800.00);
|
||||
salary3.add(23000.00);
|
||||
e3.setSalary(salary3);
|
||||
|
||||
echMonthSalaryList.add(e1);
|
||||
echMonthSalaryList.add(e2);
|
||||
echMonthSalaryList.add(e3);
|
||||
stringListMap.put("list",echMonthSalaryList);
|
||||
return stringListMap;*/
|
||||
return echartsService.getMonthSalary();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
package com.esms.controller;
|
||||
|
||||
import com.esms.service.IImportDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
||||
* @Description: 考勤表和补发金额表数据导入
|
||||
**/
|
||||
@Controller
|
||||
public class ImportDataController {
|
||||
@Autowired
|
||||
private IImportDataService importDataService;
|
||||
/**
|
||||
* 跳转到importAttendanceTeable.jsp
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("toImportAttendance.do")
|
||||
public String toImportAttendance(){
|
||||
return "admin/importData/importAttendanceTable.jsp";
|
||||
}
|
||||
/**
|
||||
* 跳转到importReissueTable.jsp
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("toImportReissue.do")
|
||||
public String toImportReissue(){
|
||||
return "admin/importData/importReissueTable.jsp";
|
||||
}
|
||||
|
||||
/**
|
||||
*上传月出勤表
|
||||
* @param excel 考勤表文件
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/importAttendance.do")
|
||||
@ResponseBody
|
||||
public Map<String,String> importAttendanceTable(@RequestParam("file") MultipartFile excel) throws Exception{
|
||||
Map<String,String> map = new HashMap<String, String>();
|
||||
if (!excel.isEmpty()) {
|
||||
String result = importDataService.insertMATable(excel);
|
||||
map.put("result",result);
|
||||
return map;
|
||||
/*if (importDataService.insertMATable(excel)) {
|
||||
//return "admin/importData/success.jsp";
|
||||
map.put("result","导入成功");
|
||||
return map;
|
||||
}
|
||||
else{
|
||||
map.put("result","只能导入Microsoft Excel 97-2003 工作表 (.xls),请检查文件是否正确");
|
||||
return map;
|
||||
}*/
|
||||
} else {
|
||||
map.put("result","导入的文件不存在,请重新选择文件");
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param excel 补发金额表excel
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/importReissue.do")
|
||||
@ResponseBody
|
||||
public Map<String,String> importReissueTable(@RequestParam("file") MultipartFile excel) throws Exception{
|
||||
Map<String,String> map = new HashMap<String, String>();
|
||||
if (!excel.isEmpty()) {
|
||||
String result = importDataService.insertReissueTable(excel);
|
||||
map.put("result",result);
|
||||
return map;
|
||||
}
|
||||
else {
|
||||
map.put("result","导入的文件不存在,请重新选择文件");
|
||||
return map;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,127 @@
|
||||
package com.esms.controller;
|
||||
|
||||
import com.esms.po.KeyValue;
|
||||
import com.esms.service.impl.KeyValueServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
@Controller
|
||||
public class KeyValueController {
|
||||
@Autowired
|
||||
private KeyValueServiceImpl keyValueService = null;
|
||||
|
||||
// 测试
|
||||
@RequestMapping("/getKeyValueById.do")
|
||||
public @ResponseBody String getKeyValueById(Model model, Integer id_id)throws Exception{
|
||||
return "error.jsp";
|
||||
}
|
||||
@RequestMapping("/changeWageItem.do")
|
||||
@ResponseBody
|
||||
public int changeWageItem(double late_buckle_pay,double early_buckle_pay,double missionallowance,double full_attendance_pay,double food_pay,double traffic_pay)throws Exception{
|
||||
/*return late_buckle_pay;*/
|
||||
int count=0;
|
||||
|
||||
KeyValue kv1=new KeyValue();
|
||||
kv1.setKvKey("food_pay");
|
||||
kv1.setKvId(1);
|
||||
kv1.setKvValue(food_pay);
|
||||
count+=keyValueService.updateByPrimaryKey(kv1);
|
||||
|
||||
KeyValue kv2=new KeyValue();
|
||||
kv2.setKvId(2);
|
||||
kv2.setKvKey("traffic_pay");
|
||||
kv2.setKvValue(traffic_pay);
|
||||
count+=keyValueService.updateByPrimaryKey(kv2);
|
||||
|
||||
KeyValue kv3=new KeyValue();
|
||||
kv3.setKvId(3);
|
||||
kv3.setKvKey("late_buckle_pay");
|
||||
kv3.setKvValue(late_buckle_pay);
|
||||
count+=keyValueService.updateByPrimaryKey(kv3);
|
||||
|
||||
KeyValue kv4=new KeyValue();
|
||||
kv4.setKvId(4);
|
||||
kv4.setKvKey("early_buckle_pay");
|
||||
kv4.setKvValue(early_buckle_pay);
|
||||
count+=keyValueService.updateByPrimaryKey(kv4);
|
||||
|
||||
KeyValue kv5=new KeyValue();
|
||||
kv5.setKvId(5);
|
||||
kv5.setKvKey("missionallowance");
|
||||
kv5.setKvValue(missionallowance);
|
||||
count+=keyValueService.updateByPrimaryKey(kv5);
|
||||
|
||||
KeyValue kv6=new KeyValue();
|
||||
kv6.setKvId(6);
|
||||
kv6.setKvKey("full_attendance_pay");
|
||||
kv6.setKvValue(full_attendance_pay);
|
||||
count+=keyValueService.updateByPrimaryKey(kv6);
|
||||
|
||||
return count;
|
||||
}
|
||||
@RequestMapping("/get_late_buckle_pay.do")
|
||||
public @ResponseBody KeyValue get_late_buckle_pay(){
|
||||
KeyValue keyValue=new KeyValue();
|
||||
try {
|
||||
keyValue=keyValueService.selectBykvKey("late_buckle_pay");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return keyValue;
|
||||
}
|
||||
@RequestMapping("/get_food_pay.do")
|
||||
public @ResponseBody KeyValue get_food_pay(){
|
||||
KeyValue keyValue=new KeyValue();
|
||||
try {
|
||||
keyValue=keyValueService.selectBykvKey("food_pay");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return keyValue;
|
||||
}
|
||||
@RequestMapping("/get_traffic_pay.do")
|
||||
public @ResponseBody KeyValue get_traffic_pay(){
|
||||
KeyValue keyValue=new KeyValue();
|
||||
try {
|
||||
keyValue=keyValueService.selectBykvKey("traffic_pay");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return keyValue;
|
||||
}
|
||||
@RequestMapping("/get_early_buckle_pay.do")
|
||||
public @ResponseBody KeyValue get_early_buckle_pay(){
|
||||
KeyValue keyValue=new KeyValue();
|
||||
try {
|
||||
keyValue=keyValueService.selectBykvKey("early_buckle_pay");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return keyValue;
|
||||
}
|
||||
@RequestMapping("/get_missionallowance.do")
|
||||
public @ResponseBody KeyValue get_missionallowance(){
|
||||
KeyValue keyValue=new KeyValue();
|
||||
try {
|
||||
keyValue=keyValueService.selectBykvKey("missionallowance");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return keyValue;
|
||||
}
|
||||
@RequestMapping("/get_full_attendance_pay.do")
|
||||
public @ResponseBody KeyValue get_full_attendance_pay(){
|
||||
KeyValue keyValue=new KeyValue();
|
||||
try {
|
||||
keyValue=keyValueService.selectBykvKey("full_attendance_pay");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return keyValue;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.esms.dao;
|
||||
|
||||
import com.esms.po.Department;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DepartmentMapper {
|
||||
int deleteByPrimaryKey(Integer dId);
|
||||
|
||||
int insert(Department record);
|
||||
|
||||
int insertSelective(Department record);
|
||||
|
||||
Department selectByPrimaryKey(Integer dId);
|
||||
|
||||
List<Department> selectAll();
|
||||
|
||||
int updateByPrimaryKeySelective(Department record);
|
||||
|
||||
int updateByPrimaryKey(Department record);
|
||||
|
||||
List<Department> findSelective(Department department);
|
||||
|
||||
void deleteByQuery(int[] ids);
|
||||
|
||||
Department findByDname(String d_name);
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package com.esms.dao;
|
||||
|
||||
import com.esms.vo.EmployeeCustomVo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public interface EmployeeCustomVoMapper {
|
||||
public EmployeeCustomVo selectEmployeeById(int eId);
|
||||
|
||||
List<EmployeeCustomVo> selectEmployeeSelective(HashMap<String, Object> map);
|
||||
|
||||
EmployeeCustomVo selectVoByPrimaryKey(int id);
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package com.esms.dao;
|
||||
|
||||
import com.esms.po.Employee;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface EmployeeMapper {
|
||||
int deleteByPrimaryKey(Integer eId);
|
||||
|
||||
int insert(Employee record);
|
||||
|
||||
int insertSelective(Employee record);
|
||||
|
||||
Employee selectByPrimaryKey(Integer eId);
|
||||
|
||||
int updateByPrimaryKeySelective(Employee record);
|
||||
|
||||
int updateByPrimaryKey(Employee record);
|
||||
|
||||
Employee selectByAccountAndPassword(Employee employee);
|
||||
|
||||
int countByDid(Integer eId);
|
||||
|
||||
int countByRbid(Integer eRank);
|
||||
|
||||
Employee selectByAccount(String eAcount);
|
||||
|
||||
// void deleteByQuery(int[] ids);
|
||||
|
||||
Employee findByeAccount(String eAccount);
|
||||
|
||||
List<Employee> selectAll();
|
||||
|
||||
int isExistEmployee(String eAccount);
|
||||
|
||||
int selectEidByEaccount(String eAccount);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.esms.dao;
|
||||
|
||||
import com.esms.po.KeyValue;
|
||||
|
||||
public interface KeyValueMapper {
|
||||
int deleteByPrimaryKey(Integer kvId);
|
||||
|
||||
int insert(KeyValue record);
|
||||
|
||||
int insertSelective(KeyValue record);
|
||||
|
||||
KeyValue selectByPrimaryKey(Integer kvId);
|
||||
|
||||
int updateByPrimaryKeySelective(KeyValue record);
|
||||
|
||||
int updateByPrimaryKey(KeyValue record);
|
||||
|
||||
KeyValue selectBykvKey(String kvKey);
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.esms.dao;
|
||||
|
||||
import com.esms.po.MonthlyAttendance;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface MonthlyAttendanceMapper {
|
||||
int deleteByPrimaryKey(Integer maId);
|
||||
|
||||
int insert(MonthlyAttendance record);
|
||||
|
||||
int insertSelective(MonthlyAttendance record);
|
||||
|
||||
MonthlyAttendance selectByPrimaryKey(Integer maId);
|
||||
|
||||
int updateByPrimaryKeySelective(MonthlyAttendance record);
|
||||
|
||||
int updateByPrimaryKey(MonthlyAttendance record);
|
||||
|
||||
MonthlyAttendance selectByeIdAndDate(int eId, String date);
|
||||
|
||||
void deleteByQuery(int[] ids);
|
||||
|
||||
List<MonthlyAttendance> selectMonthlyAttendanceMapperByeEidAndTime (Map<String, Object> map);
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.esms.dao;
|
||||
|
||||
import com.esms.po.Position;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PositionMapper {
|
||||
int deleteByPrimaryKey(Integer pId);
|
||||
|
||||
int insert(Position record);
|
||||
|
||||
int insertSelective(Position record);
|
||||
|
||||
Position selectByPrimaryKey(Integer pId);
|
||||
|
||||
int updateByPrimaryKeySelective(Position record);
|
||||
|
||||
int updateByPrimaryKey(Position record);
|
||||
|
||||
List<Position> findSelective(Position position);
|
||||
|
||||
void deleteByQuery(int[] ids);
|
||||
|
||||
Position findByDname(String p_name);
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.esms.dao;
|
||||
|
||||
import com.esms.po.RankBonus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RankBonusMapper {
|
||||
|
||||
int deleteByPrimaryKey(Integer rbId);
|
||||
|
||||
int insert(RankBonus record);
|
||||
|
||||
int insertSelective(RankBonus record);
|
||||
|
||||
RankBonus selectByPrimaryKey(Integer rbId);
|
||||
|
||||
List<RankBonus> selectAll();
|
||||
|
||||
int updateByPrimaryKeySelective(RankBonus record);
|
||||
|
||||
int updateByPrimaryKey(RankBonus record);
|
||||
|
||||
int CountByRankName(String name);
|
||||
|
||||
List<RankBonus> findSelective(RankBonus record);
|
||||
|
||||
RankBonus findByname(String name);
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.esms.dao;
|
||||
|
||||
import com.esms.po.Salary;
|
||||
import com.esms.vo.EchSalary;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface SalaryMapper {
|
||||
int deleteByPrimaryKey(Integer sId);
|
||||
|
||||
int insert(Salary record);
|
||||
|
||||
int insertSelective(Salary record);
|
||||
|
||||
Salary selectByPrimaryKey(Integer sId);
|
||||
|
||||
int updateByPrimaryKeySelective(Salary record);
|
||||
|
||||
int updateByPrimaryKey(Salary record);
|
||||
|
||||
Salary selectByEidAndTime(Integer eId, String time);
|
||||
|
||||
Double selectMaxSalaryByDepartment(Integer dId,String date);
|
||||
//查每个最低,平均,最高工资
|
||||
EchSalary selectSalaryByDepartment(Integer dId, String date);
|
||||
//查每个工资总数,时间年月
|
||||
Double selectAllSalaryByDepartment(Integer dId,String date);
|
||||
//查每个工资总数,时间年
|
||||
Double selectAllSalaryByDepAndYear(Integer dId,String date);
|
||||
// 查找员工个人的某年工资记录
|
||||
List<Salary> selectEmployeeSalaryList(Integer eId, String data);
|
||||
List<Salary> selectByeId(Integer eId);
|
||||
//根据年月时间查工资总数
|
||||
Double selectAllSalaryByDate(String date);
|
||||
List<Salary> test(String eAccount);
|
||||
List<Salary> selectByEaccountDIdDate(Map<String,Object> map);
|
||||
|
||||
List<Salary> selectByeTimeAndStatus(String date, int status);
|
||||
Salary selectByEidAndTimeAndStatus(Integer eId, String time, int status);
|
||||
|
||||
List<Salary> selectByEaccountDIdDateState(Map<String,Object> map);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.esms.dao;
|
||||
|
||||
import com.esms.po.SystemManager;
|
||||
|
||||
public interface SystemManagerMapper {
|
||||
int deleteByPrimaryKey(Integer smId);
|
||||
|
||||
int insert(SystemManager record);
|
||||
|
||||
int insertSelective(SystemManager record);
|
||||
|
||||
SystemManager selectByPrimaryKey(Integer smId);
|
||||
|
||||
int updateByPrimaryKeySelective(SystemManager record);
|
||||
|
||||
int updateByPrimaryKey(SystemManager record);
|
||||
|
||||
SystemManager selectByAccountAndPassword(SystemManager systemManager);
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.esms.dao;
|
||||
|
||||
import com.esms.po.WorkingYearsBonus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface WorkingYearsBonusMapper {
|
||||
int deleteByPrimaryKey(Integer wybId);
|
||||
|
||||
int insert(WorkingYearsBonus record);
|
||||
|
||||
int insertSelective(WorkingYearsBonus record);
|
||||
|
||||
WorkingYearsBonus selectByPrimaryKey(Integer wybId);
|
||||
|
||||
int updateByPrimaryKeySelective(WorkingYearsBonus record);
|
||||
|
||||
int updateByPrimaryKey(WorkingYearsBonus record);
|
||||
|
||||
List<WorkingYearsBonus> selectAll();
|
||||
|
||||
int countByYear(Integer year);
|
||||
|
||||
List<WorkingYearsBonus> findSelective(WorkingYearsBonus record);
|
||||
|
||||
WorkingYearsBonus findByYear(int year);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.esms.exception;
|
||||
|
||||
public class CustomException extends Exception{
|
||||
private String message;
|
||||
|
||||
public CustomException(String message) {
|
||||
super(message);
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.esms.exception;
|
||||
|
||||
import org.springframework.web.servlet.HandlerExceptionResolver;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class CustomExceptionResolver implements HandlerExceptionResolver {
|
||||
public ModelAndView resolveException(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) {
|
||||
CustomException customException = null;
|
||||
if (e instanceof CustomException) {
|
||||
customException = (CustomException) e;
|
||||
}else{
|
||||
customException = new CustomException("系统出现未知错误!");
|
||||
}
|
||||
|
||||
String message = customException.getMessage();
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.addObject("message",message);
|
||||
modelAndView.setViewName("error/error.jsp");
|
||||
|
||||
return modelAndView;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package com.esms.po;
|
||||
|
||||
public class Department {
|
||||
private Integer dId;
|
||||
|
||||
private String dName;
|
||||
|
||||
private String dRemark;
|
||||
|
||||
private Integer dIsdel;
|
||||
|
||||
public Integer getdId() {
|
||||
return dId;
|
||||
}
|
||||
|
||||
public void setdId(Integer dId) {
|
||||
this.dId = dId;
|
||||
}
|
||||
|
||||
public String getdName() {
|
||||
return dName;
|
||||
}
|
||||
|
||||
public void setdName(String dName) {
|
||||
this.dName = dName == null ? null : dName.trim();
|
||||
}
|
||||
|
||||
public String getdRemark() {
|
||||
return dRemark;
|
||||
}
|
||||
|
||||
public void setdRemark(String dRemark) {
|
||||
this.dRemark = dRemark == null ? null : dRemark.trim();
|
||||
}
|
||||
|
||||
public Integer getdIsdel() {
|
||||
return dIsdel;
|
||||
}
|
||||
|
||||
public void setdIsdel(Integer dIsdel) {
|
||||
this.dIsdel = dIsdel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Department{" +
|
||||
"dId=" + dId +
|
||||
", dName='" + dName + '\'' +
|
||||
", dRemark='" + dRemark + '\'' +
|
||||
", dIsdel=" + dIsdel +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,273 @@
|
||||
package com.esms.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class Employee {
|
||||
private Integer eId;
|
||||
|
||||
private String eAccount;
|
||||
|
||||
private String ePassword;
|
||||
|
||||
private String eName;
|
||||
|
||||
private String eIdcard;
|
||||
|
||||
private String eSex;
|
||||
|
||||
private String eDagree;
|
||||
|
||||
private Date eBirthday;
|
||||
|
||||
private String eEmail;
|
||||
|
||||
private String ePhone;
|
||||
|
||||
private String eHometown;
|
||||
|
||||
private Integer eRank;
|
||||
// private RankBonus rankBonus;
|
||||
|
||||
private String eHeadPath;
|
||||
|
||||
private String eUrgentPerson;
|
||||
|
||||
private String eUrgentPhone;
|
||||
|
||||
private Integer pId;
|
||||
// private Position position;
|
||||
private Integer dId;
|
||||
// private Department department;
|
||||
|
||||
private Double eBasePay;
|
||||
|
||||
private Integer eIsdel;
|
||||
|
||||
private Date eEntryTime;
|
||||
|
||||
private Date eLeaveTime;
|
||||
|
||||
public Integer geteId() {
|
||||
return eId;
|
||||
}
|
||||
|
||||
public void seteId(Integer eId) {
|
||||
this.eId = eId;
|
||||
}
|
||||
|
||||
public String geteAccount() {
|
||||
return eAccount;
|
||||
}
|
||||
|
||||
public void seteAccount(String eAccount) {
|
||||
this.eAccount = eAccount == null ? null : eAccount.trim();
|
||||
}
|
||||
|
||||
public String getePassword() {
|
||||
return ePassword;
|
||||
}
|
||||
|
||||
public void setePassword(String ePassword) {
|
||||
this.ePassword = ePassword == null ? null : ePassword.trim();
|
||||
}
|
||||
|
||||
public String geteName() {
|
||||
return eName;
|
||||
}
|
||||
|
||||
public void seteName(String eName) {
|
||||
this.eName = eName == null ? null : eName.trim();
|
||||
}
|
||||
|
||||
public String geteIdcard() {
|
||||
return eIdcard;
|
||||
}
|
||||
|
||||
public void seteIdcard(String eIdcard) {
|
||||
this.eIdcard = eIdcard == null ? null : eIdcard.trim();
|
||||
}
|
||||
|
||||
public String geteSex() {
|
||||
return eSex;
|
||||
}
|
||||
|
||||
public void seteSex(String eSex) {
|
||||
this.eSex = eSex;
|
||||
}
|
||||
|
||||
public String geteDagree() {
|
||||
return eDagree;
|
||||
}
|
||||
|
||||
public void seteDagree(String eDagree) {
|
||||
this.eDagree = eDagree == null ? null : eDagree.trim();
|
||||
}
|
||||
|
||||
@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
|
||||
public Date geteBirthday() {
|
||||
return eBirthday;
|
||||
}
|
||||
|
||||
public void seteBirthday(Date eBirthday) {
|
||||
this.eBirthday = eBirthday;
|
||||
}
|
||||
|
||||
public String geteEmail() {
|
||||
return eEmail;
|
||||
}
|
||||
|
||||
public void seteEmail(String eEmail) {
|
||||
this.eEmail = eEmail == null ? null : eEmail.trim();
|
||||
}
|
||||
|
||||
public String getePhone() {
|
||||
return ePhone;
|
||||
}
|
||||
|
||||
public void setePhone(String ePhone) {
|
||||
this.ePhone = ePhone == null ? null : ePhone.trim();
|
||||
}
|
||||
|
||||
public String geteHometown() {
|
||||
return eHometown;
|
||||
}
|
||||
|
||||
public void seteHometown(String eHometown) {
|
||||
this.eHometown = eHometown == null ? null : eHometown.trim();
|
||||
}
|
||||
|
||||
public Integer geteRank() {
|
||||
return eRank;
|
||||
}
|
||||
|
||||
public void seteRank(Integer eRank) {
|
||||
this.eRank = eRank;
|
||||
}
|
||||
|
||||
public String geteHeadPath() {
|
||||
return eHeadPath;
|
||||
}
|
||||
|
||||
public void seteHeadPath(String eHeadPath) {
|
||||
this.eHeadPath = eHeadPath == null ? null : eHeadPath.trim();
|
||||
}
|
||||
|
||||
public String geteUrgentPerson() {
|
||||
return eUrgentPerson;
|
||||
}
|
||||
|
||||
public void seteUrgentPerson(String eUrgentPerson) {
|
||||
this.eUrgentPerson = eUrgentPerson == null ? null : eUrgentPerson.trim();
|
||||
}
|
||||
|
||||
public String geteUrgentPhone() {
|
||||
return eUrgentPhone;
|
||||
}
|
||||
|
||||
public void seteUrgentPhone(String eUrgentPhone) {
|
||||
this.eUrgentPhone = eUrgentPhone == null ? null : eUrgentPhone.trim();
|
||||
}
|
||||
|
||||
public Integer getpId() {
|
||||
return pId;
|
||||
}
|
||||
|
||||
public void setpId(Integer pId) {
|
||||
this.pId = pId;
|
||||
}
|
||||
|
||||
public Integer getdId() {
|
||||
return dId;
|
||||
}
|
||||
|
||||
public void setdId(Integer dId) {
|
||||
this.dId = dId;
|
||||
}
|
||||
|
||||
// public RankBonus getRankBonus() {
|
||||
// return rankBonus;
|
||||
// }
|
||||
//
|
||||
// public void setRankBonus(RankBonus rankBonus) {
|
||||
// this.rankBonus = rankBonus;
|
||||
// }
|
||||
//
|
||||
// public Position getPosition() {
|
||||
// return position;
|
||||
// }
|
||||
//
|
||||
// public void setPosition(Position position) {
|
||||
// this.position = position;
|
||||
// }
|
||||
//
|
||||
// public Department getDepartment() {
|
||||
// return department;
|
||||
// }
|
||||
//
|
||||
// public void setDepartment(Department department) {
|
||||
// this.department = department;
|
||||
// }
|
||||
|
||||
public Double geteBasePay() {
|
||||
return eBasePay;
|
||||
}
|
||||
|
||||
public void seteBasePay(Double eBasePay) {
|
||||
this.eBasePay = eBasePay;
|
||||
}
|
||||
|
||||
public Integer geteIsdel() {
|
||||
return eIsdel;
|
||||
}
|
||||
|
||||
public void seteIsdel(Integer eIsdel) {
|
||||
this.eIsdel = eIsdel;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
|
||||
public Date geteEntryTime() {
|
||||
return eEntryTime;
|
||||
}
|
||||
|
||||
public void seteEntryTime(Date eEntryTime) {
|
||||
this.eEntryTime = eEntryTime;
|
||||
}
|
||||
|
||||
public Date geteLeaveTime() {
|
||||
return eLeaveTime;
|
||||
}
|
||||
|
||||
public void seteLeaveTime(Date eLeaveTime) {
|
||||
this.eLeaveTime = eLeaveTime;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Employee{" +
|
||||
"eId=" + eId +
|
||||
", eAccount='" + eAccount + '\'' +
|
||||
", ePassword='" + ePassword + '\'' +
|
||||
", eName='" + eName + '\'' +
|
||||
", eIdcard='" + eIdcard + '\'' +
|
||||
", eSex=" + eSex +
|
||||
", eDagree='" + eDagree + '\'' +
|
||||
", eBirthday=" + eBirthday +
|
||||
", eEmail='" + eEmail + '\'' +
|
||||
", ePhone='" + ePhone + '\'' +
|
||||
", eHometown='" + eHometown + '\'' +
|
||||
", eRank=" + eRank +
|
||||
", eHeadPath='" + eHeadPath + '\'' +
|
||||
", eUrgentPerson='" + eUrgentPerson + '\'' +
|
||||
", eUrgentPhone='" + eUrgentPhone + '\'' +
|
||||
", pId=" + pId +
|
||||
", dId=" + dId +
|
||||
", eBasePay=" + eBasePay +
|
||||
", eIsdel=" + eIsdel +
|
||||
", eEntryTime=" + eEntryTime +
|
||||
", eLeaveTime=" + eLeaveTime +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.esms.po;
|
||||
|
||||
public class KeyValue {
|
||||
private Integer kvId;
|
||||
|
||||
private String kvKey;
|
||||
|
||||
private double kvValue;
|
||||
|
||||
public Integer getKvId() {
|
||||
return kvId;
|
||||
}
|
||||
|
||||
public void setKvId(Integer kvId) {
|
||||
this.kvId = kvId;
|
||||
}
|
||||
|
||||
public String getKvKey() {
|
||||
return kvKey;
|
||||
}
|
||||
|
||||
public void setKvKey(String kvKey) {
|
||||
this.kvKey = kvKey == null ? null : kvKey.trim();
|
||||
}
|
||||
|
||||
public double getKvValue() {
|
||||
return kvValue;
|
||||
}
|
||||
|
||||
public void setKvValue(double kvValue) {
|
||||
this.kvValue = kvValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "KeyValue{" +
|
||||
"kvId=" + kvId +
|
||||
", kvKey='" + kvKey + '\'' +
|
||||
", kvValue='" + kvValue + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,156 @@
|
||||
package com.esms.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class MonthlyAttendance {
|
||||
private Integer maId;
|
||||
|
||||
private Integer eId;
|
||||
private Employee employee;
|
||||
|
||||
private Date attendanceTime;
|
||||
|
||||
private Integer sickLeaveNum;
|
||||
|
||||
private Double overtimeHour;
|
||||
|
||||
private Double weekendHour;
|
||||
|
||||
private Double holidayHour;
|
||||
|
||||
private Integer lateNum;
|
||||
|
||||
private Integer earlyNum;
|
||||
|
||||
private Integer absenceNum;
|
||||
|
||||
private Integer businessTravelNum;
|
||||
|
||||
private Integer compassionateLeaveNum;
|
||||
|
||||
public Integer getMaId() {
|
||||
return maId;
|
||||
}
|
||||
|
||||
public void setMaId(Integer maId) {
|
||||
this.maId = maId;
|
||||
}
|
||||
|
||||
public Integer geteId() {
|
||||
return eId;
|
||||
}
|
||||
|
||||
public void seteId(Integer eId) {
|
||||
this.eId = eId;
|
||||
}
|
||||
|
||||
public Employee getEmployee() {
|
||||
return employee;
|
||||
}
|
||||
|
||||
public void setEmployee(Employee employee) {
|
||||
this.employee = employee;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern="yyyy-MM",timezone = "GMT+8")
|
||||
public Date getAttendanceTime() {
|
||||
return attendanceTime;
|
||||
}
|
||||
|
||||
public void setAttendanceTime(Date attendanceTime) {
|
||||
this.attendanceTime = attendanceTime;
|
||||
}
|
||||
|
||||
public Integer getSickLeaveNum() {
|
||||
return sickLeaveNum;
|
||||
}
|
||||
|
||||
public void setSickLeaveNum(Integer sickLeaveNum) {
|
||||
this.sickLeaveNum = sickLeaveNum;
|
||||
}
|
||||
|
||||
public Double getOvertimeHour() {
|
||||
return overtimeHour;
|
||||
}
|
||||
|
||||
public void setOvertimeHour(Double overtimeHour) {
|
||||
this.overtimeHour = overtimeHour;
|
||||
}
|
||||
|
||||
public Double getWeekendHour() {
|
||||
return weekendHour;
|
||||
}
|
||||
|
||||
public void setWeekendHour(Double weekendHour) {
|
||||
this.weekendHour = weekendHour;
|
||||
}
|
||||
|
||||
public Double getHolidayHour() {
|
||||
return holidayHour;
|
||||
}
|
||||
|
||||
public void setHolidayHour(Double holidayHour) {
|
||||
this.holidayHour = holidayHour;
|
||||
}
|
||||
|
||||
public Integer getLateNum() {
|
||||
return lateNum;
|
||||
}
|
||||
|
||||
public void setLateNum(Integer lateNum) {
|
||||
this.lateNum = lateNum;
|
||||
}
|
||||
|
||||
public Integer getEarlyNum() {
|
||||
return earlyNum;
|
||||
}
|
||||
|
||||
public void setEarlyNum(Integer earlyNum) {
|
||||
this.earlyNum = earlyNum;
|
||||
}
|
||||
|
||||
public Integer getAbsenceNum() {
|
||||
return absenceNum;
|
||||
}
|
||||
|
||||
public void setAbsenceNum(Integer absenceNum) {
|
||||
this.absenceNum = absenceNum;
|
||||
}
|
||||
|
||||
public Integer getBusinessTravelNum() {
|
||||
return businessTravelNum;
|
||||
}
|
||||
|
||||
public void setBusinessTravelNum(Integer businessTravelNum) {
|
||||
this.businessTravelNum = businessTravelNum;
|
||||
}
|
||||
|
||||
public Integer getCompassionateLeaveNum() {
|
||||
return compassionateLeaveNum;
|
||||
}
|
||||
|
||||
public void setCompassionateLeaveNum(Integer compassionateLeaveNum) {
|
||||
this.compassionateLeaveNum = compassionateLeaveNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MonthlyAttendance{" +
|
||||
"maId=" + maId +
|
||||
", eId=" + eId +
|
||||
", employee=" + employee +
|
||||
", attendanceTime=" + attendanceTime +
|
||||
", sickLeaveNum=" + sickLeaveNum +
|
||||
", overtimeHour=" + overtimeHour +
|
||||
", weekendHour=" + weekendHour +
|
||||
", holidayHour=" + holidayHour +
|
||||
", lateNum=" + lateNum +
|
||||
", earlyNum=" + earlyNum +
|
||||
", absenceNum=" + absenceNum +
|
||||
", businessTravelNum=" + businessTravelNum +
|
||||
", compassionateLeaveNum=" + compassionateLeaveNum +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.esms.po;
|
||||
|
||||
public class Position {
|
||||
private Integer pId;
|
||||
|
||||
private String pName;
|
||||
|
||||
private String pDuty;
|
||||
|
||||
private Double pPostPay;
|
||||
|
||||
private Integer pIsdel;
|
||||
|
||||
public Integer getpId() {
|
||||
return pId;
|
||||
}
|
||||
|
||||
public void setpId(Integer pId) {
|
||||
this.pId = pId;
|
||||
}
|
||||
|
||||
public String getpName() {
|
||||
return pName;
|
||||
}
|
||||
|
||||
public void setpName(String pName) {
|
||||
this.pName = pName == null ? null : pName.trim();
|
||||
}
|
||||
|
||||
public String getpDuty() {
|
||||
return pDuty;
|
||||
}
|
||||
|
||||
public void setpDuty(String pDuty) {
|
||||
this.pDuty = pDuty == null ? null : pDuty.trim();
|
||||
}
|
||||
|
||||
public Double getpPostPay() {
|
||||
return pPostPay;
|
||||
}
|
||||
|
||||
public void setpPostPay(Double pPostPay) {
|
||||
this.pPostPay = pPostPay;
|
||||
}
|
||||
|
||||
public Integer getpIsdel() {
|
||||
return pIsdel;
|
||||
}
|
||||
|
||||
public void setpIsdel(Integer pIsdel) {
|
||||
this.pIsdel = pIsdel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Position{" +
|
||||
"pId=" + pId +
|
||||
", pName='" + pName + '\'' +
|
||||
", pDuty='" + pDuty + '\'' +
|
||||
", pPostPay=" + pPostPay +
|
||||
", pIsdel=" + pIsdel +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.esms.po;
|
||||
|
||||
public class RankBonus {
|
||||
private Integer rbId;
|
||||
|
||||
private String rankName;
|
||||
|
||||
private Integer rbBonus;
|
||||
|
||||
public Integer getRbId() {
|
||||
return rbId;
|
||||
}
|
||||
|
||||
public void setRbId(Integer rbId) {
|
||||
this.rbId = rbId;
|
||||
}
|
||||
|
||||
public String getRankName() {
|
||||
return rankName;
|
||||
}
|
||||
|
||||
public void setRankName(String rankName) {
|
||||
this.rankName = rankName == null ? null : rankName.trim();
|
||||
}
|
||||
|
||||
public Integer getRbBonus() {
|
||||
return rbBonus;
|
||||
}
|
||||
|
||||
public void setRbBonus(Integer rbBonus) {
|
||||
this.rbBonus = rbBonus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RankBonus{" +
|
||||
"rbId=" + rbId +
|
||||
", rankName='" + rankName + '\'' +
|
||||
", rbBonus=" + rbBonus +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,342 @@
|
||||
package com.esms.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class Salary {
|
||||
private Integer sId;
|
||||
|
||||
private Integer eId;
|
||||
private Employee employee;
|
||||
private Integer dId;
|
||||
private Department department;
|
||||
|
||||
private Date sTime;
|
||||
|
||||
|
||||
private Integer sState;
|
||||
|
||||
private Double basePay;
|
||||
|
||||
private Double foodPay;
|
||||
|
||||
private Double postPay;
|
||||
|
||||
private Double workingYearPay;
|
||||
|
||||
private Double rankPay;
|
||||
|
||||
private Double trafficPay;
|
||||
|
||||
private Double persionPay;
|
||||
|
||||
private Double medicalPay;
|
||||
|
||||
private Double unemploymentPay;
|
||||
|
||||
private Double injuryPay;
|
||||
|
||||
private Double birthPay;
|
||||
|
||||
private Double housingPay;
|
||||
|
||||
private Double latePay;
|
||||
|
||||
private Double earlyPay;
|
||||
|
||||
private Double overtimePay;
|
||||
|
||||
private Double sickPay;
|
||||
|
||||
private Double thingPay;
|
||||
|
||||
private Double businessTravelPay;
|
||||
|
||||
private Double fullAttendancePay;
|
||||
|
||||
private Double rissuePay;
|
||||
|
||||
private Double individualIncomeTax;
|
||||
|
||||
private Double shouldPay;
|
||||
|
||||
private Double actualPay;
|
||||
|
||||
public Integer getsId() {
|
||||
return sId;
|
||||
}
|
||||
|
||||
public void setsId(Integer sId) {
|
||||
this.sId = sId;
|
||||
}
|
||||
|
||||
public Integer geteId() {
|
||||
return eId;
|
||||
}
|
||||
|
||||
public void seteId(Integer eId) {
|
||||
this.eId = eId;
|
||||
}
|
||||
|
||||
public Integer getdId() {
|
||||
return dId;
|
||||
}
|
||||
|
||||
public void setdId(Integer dId) {
|
||||
this.dId = dId;
|
||||
}
|
||||
|
||||
public Department getDepartment() {
|
||||
return department;
|
||||
}
|
||||
|
||||
public void setDepartment(Department department) {
|
||||
this.department = department;
|
||||
}
|
||||
|
||||
public Employee getEmployee() {
|
||||
return employee;
|
||||
}
|
||||
|
||||
public void setEmployee(Employee employee) {
|
||||
this.employee = employee;
|
||||
}
|
||||
|
||||
@JsonFormat(pattern="yyyy-MM",timezone = "GMT+8")
|
||||
public Date getsTime() {
|
||||
return sTime;
|
||||
}
|
||||
|
||||
public void setsTime(Date sTime) {
|
||||
this.sTime = sTime;
|
||||
}
|
||||
|
||||
public Integer getsState() {
|
||||
return sState;
|
||||
}
|
||||
|
||||
public void setsState(Integer sState) {
|
||||
this.sState = sState;
|
||||
}
|
||||
|
||||
public Double getBasePay() {
|
||||
return basePay;
|
||||
}
|
||||
|
||||
public void setBasePay(Double basePay) {
|
||||
this.basePay = basePay;
|
||||
}
|
||||
|
||||
public Double getFoodPay() {
|
||||
return foodPay;
|
||||
}
|
||||
|
||||
public void setFoodPay(Double foodPay) {
|
||||
this.foodPay = foodPay;
|
||||
}
|
||||
|
||||
public Double getPostPay() {
|
||||
return postPay;
|
||||
}
|
||||
|
||||
public void setPostPay(Double postPay) {
|
||||
this.postPay = postPay;
|
||||
}
|
||||
|
||||
public Double getWorkingYearPay() {
|
||||
return workingYearPay;
|
||||
}
|
||||
|
||||
public void setWorkingYearPay(Double workingYearPay) {
|
||||
this.workingYearPay = workingYearPay;
|
||||
}
|
||||
|
||||
public Double getRankPay() {
|
||||
return rankPay;
|
||||
}
|
||||
|
||||
public void setRankPay(Double rankPay) {
|
||||
this.rankPay = rankPay;
|
||||
}
|
||||
|
||||
public Double getTrafficPay() {
|
||||
return trafficPay;
|
||||
}
|
||||
|
||||
public void setTrafficPay(Double trafficPay) {
|
||||
this.trafficPay = trafficPay;
|
||||
}
|
||||
|
||||
public Double getPersionPay() {
|
||||
return persionPay;
|
||||
}
|
||||
|
||||
public void setPersionPay(Double persionPay) {
|
||||
this.persionPay = persionPay;
|
||||
}
|
||||
|
||||
public Double getMedicalPay() {
|
||||
return medicalPay;
|
||||
}
|
||||
|
||||
public void setMedicalPay(Double medicalPay) {
|
||||
this.medicalPay = medicalPay;
|
||||
}
|
||||
|
||||
public Double getUnemploymentPay() {
|
||||
return unemploymentPay;
|
||||
}
|
||||
|
||||
public void setUnemploymentPay(Double unemploymentPay) {
|
||||
this.unemploymentPay = unemploymentPay;
|
||||
}
|
||||
|
||||
public Double getInjuryPay() {
|
||||
return injuryPay;
|
||||
}
|
||||
|
||||
public void setInjuryPay(Double injuryPay) {
|
||||
this.injuryPay = injuryPay;
|
||||
}
|
||||
|
||||
public Double getBirthPay() {
|
||||
return birthPay;
|
||||
}
|
||||
|
||||
public void setBirthPay(Double birthPay) {
|
||||
this.birthPay = birthPay;
|
||||
}
|
||||
|
||||
public Double getHousingPay() {
|
||||
return housingPay;
|
||||
}
|
||||
|
||||
public void setHousingPay(Double housingPay) {
|
||||
this.housingPay = housingPay;
|
||||
}
|
||||
|
||||
public Double getLatePay() {
|
||||
return latePay;
|
||||
}
|
||||
|
||||
public void setLatePay(Double latePay) {
|
||||
this.latePay = latePay;
|
||||
}
|
||||
|
||||
public Double getEarlyPay() {
|
||||
return earlyPay;
|
||||
}
|
||||
|
||||
public void setEarlyPay(Double earlyPay) {
|
||||
this.earlyPay = earlyPay;
|
||||
}
|
||||
|
||||
public Double getOvertimePay() {
|
||||
return overtimePay;
|
||||
}
|
||||
|
||||
public void setOvertimePay(Double overtimePay) {
|
||||
this.overtimePay = overtimePay;
|
||||
}
|
||||
|
||||
public Double getSickPay() {
|
||||
return sickPay;
|
||||
}
|
||||
|
||||
public void setSickPay(Double sickPay) {
|
||||
this.sickPay = sickPay;
|
||||
}
|
||||
|
||||
public Double getThingPay() {
|
||||
return thingPay;
|
||||
}
|
||||
|
||||
public void setThingPay(Double thingPay) {
|
||||
this.thingPay = thingPay;
|
||||
}
|
||||
|
||||
public Double getBusinessTravelPay() {
|
||||
return businessTravelPay;
|
||||
}
|
||||
|
||||
public void setBusinessTravelPay(Double businessTravelPay) {
|
||||
this.businessTravelPay = businessTravelPay;
|
||||
}
|
||||
|
||||
public Double getFullAttendancePay() {
|
||||
return fullAttendancePay;
|
||||
}
|
||||
|
||||
public void setFullAttendancePay(Double fullAttendancePay) {
|
||||
this.fullAttendancePay = fullAttendancePay;
|
||||
}
|
||||
|
||||
public Double getRissuePay() {
|
||||
return rissuePay;
|
||||
}
|
||||
|
||||
public void setRissuePay(Double rissuePay) {
|
||||
this.rissuePay = rissuePay;
|
||||
}
|
||||
|
||||
public Double getIndividualIncomeTax() {
|
||||
return individualIncomeTax;
|
||||
}
|
||||
|
||||
public void setIndividualIncomeTax(Double individualIncomeTax) {
|
||||
this.individualIncomeTax = individualIncomeTax;
|
||||
}
|
||||
|
||||
public Double getShouldPay() {
|
||||
return shouldPay;
|
||||
}
|
||||
|
||||
public void setShouldPay(Double shouldPay) {
|
||||
this.shouldPay = shouldPay;
|
||||
}
|
||||
|
||||
public Double getActualPay() {
|
||||
return actualPay;
|
||||
}
|
||||
|
||||
public void setActualPay(Double actualPay) {
|
||||
this.actualPay = actualPay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Salary{" +
|
||||
"sId=" + sId +
|
||||
", eId=" + eId +
|
||||
", employee=" + employee +
|
||||
", dId=" + dId +
|
||||
", department=" + department +
|
||||
", sTime=" + sTime +
|
||||
", sState=" + sState +
|
||||
", basePay=" + basePay +
|
||||
", foodPay=" + foodPay +
|
||||
", postPay=" + postPay +
|
||||
", workingYearPay=" + workingYearPay +
|
||||
", rankPay=" + rankPay +
|
||||
", trafficPay=" + trafficPay +
|
||||
", persionPay=" + persionPay +
|
||||
", medicalPay=" + medicalPay +
|
||||
", unemploymentPay=" + unemploymentPay +
|
||||
", injuryPay=" + injuryPay +
|
||||
", birthPay=" + birthPay +
|
||||
", housingPay=" + housingPay +
|
||||
", latePay=" + latePay +
|
||||
", earlyPay=" + earlyPay +
|
||||
", overtimePay=" + overtimePay +
|
||||
", sickPay=" + sickPay +
|
||||
", thingPay=" + thingPay +
|
||||
", businessTravelPay=" + businessTravelPay +
|
||||
", fullAttendancePay=" + fullAttendancePay +
|
||||
", rissuePay=" + rissuePay +
|
||||
", individualIncomeTax=" + individualIncomeTax +
|
||||
", shouldPay=" + shouldPay +
|
||||
", actualPay=" + actualPay +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.esms.po;
|
||||
|
||||
public class SystemManager {
|
||||
private Integer smId;
|
||||
|
||||
private String smAccount;
|
||||
|
||||
|
||||
private String smPassword;
|
||||
|
||||
public Integer getSmId() {
|
||||
return smId;
|
||||
}
|
||||
|
||||
public void setSmId(Integer smId) {
|
||||
this.smId = smId;
|
||||
}
|
||||
|
||||
public String getSmAccount() {
|
||||
return smAccount;
|
||||
}
|
||||
|
||||
public void setSmAccount(String smAccount) {
|
||||
this.smAccount = smAccount == null ? null : smAccount.trim();
|
||||
}
|
||||
|
||||
public String getSmPassword() {
|
||||
return smPassword;
|
||||
}
|
||||
|
||||
public void setSmPassword(String smPassword) {
|
||||
this.smPassword = smPassword == null ? null : smPassword.trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SystemManager{" +
|
||||
"smId=" + smId +
|
||||
", smAccount='" + smAccount + '\'' +
|
||||
", smPassword='" + smPassword + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.esms.po;
|
||||
|
||||
public class WorkingYearsBonus {
|
||||
private Integer wybId;
|
||||
|
||||
private Integer wybYear;
|
||||
|
||||
private Double wybBonus;
|
||||
|
||||
public Integer getWybId() {
|
||||
return wybId;
|
||||
}
|
||||
|
||||
public void setWybId(Integer wybId) {
|
||||
this.wybId = wybId;
|
||||
}
|
||||
|
||||
public Integer getWybYear() {
|
||||
return wybYear;
|
||||
}
|
||||
|
||||
public void setWybYear(Integer wybYear) {
|
||||
this.wybYear = wybYear;
|
||||
}
|
||||
|
||||
public Double getWybBonus() {
|
||||
return wybBonus;
|
||||
}
|
||||
|
||||
public void setWybBonus(Double wybBonus) {
|
||||
this.wybBonus = wybBonus;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WorkingYearsBonus{" +
|
||||
"wybId=" + wybId +
|
||||
", wybYear=" + wybYear +
|
||||
", wybBonus=" + wybBonus +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.esms.service;
|
||||
|
||||
import com.esms.po.Department;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DepartmentService {
|
||||
public Department selectByPrimaryKey(int id) throws Exception;
|
||||
|
||||
int insertSelective(Department department) throws Exception;
|
||||
|
||||
void updateByPrimaryKeySelective(Department department) throws Exception;
|
||||
|
||||
void deleteByPrimaryKey(int id) throws Exception;
|
||||
|
||||
List<Department> findSelective(Department department) throws Exception;
|
||||
|
||||
void deleteByQuery(int[] ids);
|
||||
|
||||
Department findByDname(String d_name);
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.esms.service;
|
||||
|
||||
import com.esms.po.Employee; /**
|
||||
*
|
||||
* 2020/02/10 15:20
|
||||
*/
|
||||
public interface EmployeeService {
|
||||
void deleteByPrimaryKey(int id);
|
||||
|
||||
void deleteByQuery(int[] ids);
|
||||
|
||||
void insert(Employee employee);
|
||||
|
||||
Employee findByeAccount(String eAccount);
|
||||
|
||||
void updateByPrimaryKeySelective(Employee employee);
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package com.esms.service;
|
||||
|
||||
import com.esms.exception.CustomException;
|
||||
import jxl.write.WriteException;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
public interface IDownloadExcelService {
|
||||
void getSalaryExcel(HttpServletRequest request, HttpServletResponse response,String eAccount,Integer dId,String sTime) throws Exception;
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.esms.service;
|
||||
|
||||
import com.esms.po.Department;
|
||||
import com.esms.vo.EchDepartmentSalary;
|
||||
import com.esms.vo.EchEmployeeNums;
|
||||
import com.esms.vo.EchMonthSalary;
|
||||
import com.esms.vo.EchSalaryPercent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IEchartsService {
|
||||
Map<String,List<EchEmployeeNums>> getEmployeeNums();
|
||||
Map<String,List<EchDepartmentSalary>> getDepartmentSalary(String date);
|
||||
Map<String,List<EchSalaryPercent>> getSalaryPercent(String date,int state);
|
||||
Map<String,List<EchMonthSalary>> getMonthSalary();
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.esms.service;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
public interface IImportDataService {
|
||||
String insertMATable(MultipartFile excel) throws Exception;
|
||||
String insertReissueTable(MultipartFile excel) throws Exception;
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.esms.service;
|
||||
|
||||
import com.esms.po.KeyValue;
|
||||
|
||||
public interface IKeyValueService {
|
||||
public KeyValue getKeyValueById(int id) throws Exception;
|
||||
public KeyValue selectBykvKey(String key)throws Exception;
|
||||
public int updateByPrimaryKey(KeyValue kv)throws Exception;
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package com.esms.service.impl;
|
||||
|
||||
import com.esms.dao.DepartmentMapper;
|
||||
import com.esms.po.Department;
|
||||
import com.esms.service.DepartmentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class DepartmentServiceImpl implements DepartmentService {
|
||||
@Autowired
|
||||
public DepartmentMapper departmentMapper = null;
|
||||
|
||||
public Department selectByPrimaryKey(int id) {
|
||||
return departmentMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public int insertSelective(Department department) {
|
||||
return departmentMapper.insertSelective(department);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateByPrimaryKeySelective(Department department) {
|
||||
departmentMapper.updateByPrimaryKeySelective(department);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByPrimaryKey(int id) {
|
||||
departmentMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Department> findSelective(Department department) {
|
||||
return departmentMapper.findSelective(department);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByQuery(int[] ids) {
|
||||
departmentMapper.deleteByQuery(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Department findByDname(String d_name) {
|
||||
return departmentMapper.findByDname(d_name);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.esms.service.impl;
|
||||
|
||||
import com.esms.dao.KeyValueMapper;
|
||||
import com.esms.po.KeyValue;
|
||||
import com.esms.service.IKeyValueService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class KeyValueServiceImpl implements IKeyValueService {
|
||||
@Autowired
|
||||
private KeyValueMapper keyValueMapper = null;
|
||||
|
||||
public KeyValue getKeyValueById(int id) throws Exception{
|
||||
return keyValueMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KeyValue selectBykvKey(String key) throws Exception {
|
||||
return keyValueMapper.selectBykvKey(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(KeyValue kv) throws Exception {
|
||||
return keyValueMapper.updateByPrimaryKey(kv);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
package com.esms.utils;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.util.Random;
|
||||
|
||||
public final class CaptchaUtil
|
||||
{
|
||||
private CaptchaUtil(){}
|
||||
|
||||
/*
|
||||
* 随机字符字典
|
||||
*/
|
||||
private static final char[] CHARS = { '2', '3', '4', '5', '6', '7', '8',
|
||||
'9' };
|
||||
|
||||
/*
|
||||
* 随机数
|
||||
*/
|
||||
private static Random random = new Random();
|
||||
|
||||
/*
|
||||
* 获取4位随机数
|
||||
*/
|
||||
private static String getRandomString()
|
||||
{
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
buffer.append(CHARS[random.nextInt(CHARS.length)]);
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
/*
|
||||
* 获取随机数颜色
|
||||
*/
|
||||
private static Color getRandomColor()
|
||||
{
|
||||
return new Color(random.nextInt(255),random.nextInt(255),
|
||||
random.nextInt(255));
|
||||
}
|
||||
|
||||
/*
|
||||
* 返回某颜色的反色
|
||||
*/
|
||||
private static Color getReverseColor(Color c)
|
||||
{
|
||||
return new Color(255 - c.getRed(), 255 - c.getGreen(),255 - c.getBlue());
|
||||
}
|
||||
|
||||
public static void outputCaptcha(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException
|
||||
{
|
||||
response.setContentType("image/jpeg");
|
||||
// 获取验证码字符串
|
||||
String identifyingCode = getRandomString();
|
||||
request.getSession(true).setAttribute("identifyingCode", identifyingCode);
|
||||
|
||||
int width = 100;
|
||||
int height = 30;
|
||||
|
||||
Color color = getRandomColor();
|
||||
Color reverse = getReverseColor(color);
|
||||
|
||||
BufferedImage bi = new BufferedImage(width, height,
|
||||
BufferedImage.TYPE_INT_RGB);
|
||||
Graphics2D g = bi.createGraphics();
|
||||
g.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 16));
|
||||
g.setColor(color);
|
||||
g.fillRect(0, 0, width, height);
|
||||
g.setColor(reverse);
|
||||
g.drawString(identifyingCode, 18, 20);
|
||||
for (int i = 0, n = random.nextInt(100); i < n; i++)
|
||||
{
|
||||
g.drawRect(random.nextInt(width), random.nextInt(height), 1, 1);
|
||||
}
|
||||
|
||||
// 转成JPEG格式
|
||||
ServletOutputStream out = response.getOutputStream();
|
||||
// JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
|
||||
// encoder.encode(bi);
|
||||
ImageIO.write(bi, "jpeg", out);
|
||||
out.flush();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package com.esms.utils;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
|
||||
public class MD5Utils {
|
||||
/** 十六进制下数字到字符的映射数组 */
|
||||
private final static String[] hexDigits = { "0", "1", "2", "3", "4", "5",
|
||||
"6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };
|
||||
|
||||
/**
|
||||
* 对字符串进行MD5编码
|
||||
* @param originString
|
||||
* @return
|
||||
*/
|
||||
|
||||
public static String encodeByMD5(String originString) {
|
||||
if (originString != null){
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append(originString);
|
||||
//BookSharingPlatform MD5加密后的32位数字作为秘钥
|
||||
stringBuffer.append("esms");
|
||||
//加入秘钥后的字符串在进行MD5加密
|
||||
originString = String.valueOf(stringBuffer);
|
||||
try {
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
byte[] results = md.digest(originString .getBytes());
|
||||
String resultString = byteArrayToHexString(results);
|
||||
return resultString.toUpperCase();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换字节数组为16进制字串
|
||||
*
|
||||
* @param b 字节数组
|
||||
* @return 十六进制字串
|
||||
*/
|
||||
private static String byteArrayToHexString(byte[] b) {
|
||||
StringBuffer resultSb = new StringBuffer();
|
||||
for (int i = 0; i < b.length; i++) {
|
||||
resultSb.append(byteToHexString(b[i]));
|
||||
}
|
||||
return resultSb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 将一个字节转化成16进制形式的字符串
|
||||
* @param b
|
||||
* @return
|
||||
*/
|
||||
private static String byteToHexString(byte b) {
|
||||
int n = b;
|
||||
if (n < 0)
|
||||
n = 256 + n;
|
||||
int d1 = n / 16;
|
||||
int d2 = n % 16;
|
||||
return hexDigits[d1] + hexDigits[d2];
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(encodeByMD5("admin"));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.esms.utils;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
|
||||
@Controller
|
||||
public class PageUtils {
|
||||
@RequestMapping("/toPage.do")
|
||||
public String toPage(String url) {
|
||||
return url;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.esms.vo;
|
||||
|
||||
import com.esms.po.Department;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class DepartmentPages {
|
||||
Integer code;
|
||||
String msg;
|
||||
Integer count;
|
||||
List<Department> data;
|
||||
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Integer getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setCount(Integer count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public List<Department> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<Department> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DepartmentPages{" +
|
||||
"code=" + code +
|
||||
", msg='" + msg + '\'' +
|
||||
", count=" + count +
|
||||
", data=" + data +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
jdbc.jdbcUrl=jdbc:mysql://127.0.0.1:3306/ssm_esms?useSSL=false&useUnicode=true&characterEncoding=utf8&serverTimezone=UTC
|
||||
jdbc.driverClass=com.mysql.jdbc.Driver
|
||||
jdbc.user=root
|
||||
jdbc.password=123456
|
||||
@ -0,0 +1,14 @@
|
||||
#1.\u539F\u7248\uFF08\u8BE6\u7EC6\uFF09
|
||||
#log4j.rootLogger=DEBUG,myConsole
|
||||
#log4j.appender.myConsole=org.apache.log4j.ConsoleAppender
|
||||
#log4j.appender.myConsole.ImmediateFlush=true
|
||||
#log4j.appender.myConsole.Target=System.out
|
||||
#log4j.appender.myConsole.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.myConsole.layout.ConversionPattern=[%-5p] %d(%r) --> [%t] %l: %m %x %n
|
||||
#
|
||||
#log4j.logger.com.mchange.v2=ERROR
|
||||
#2.\u7B80\u7565\u7248
|
||||
log4j.rootLogger=DEBUG, stdout
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
|
||||
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.esms.dao.DepartmentMapper">
|
||||
<resultMap id="BaseResultMap" type="com.esms.po.Department">
|
||||
<id column="d_id" jdbcType="INTEGER" property="dId" />
|
||||
<result column="d_name" jdbcType="VARCHAR" property="dName" />
|
||||
<result column="d_remark" jdbcType="VARCHAR" property="dRemark" />
|
||||
<result column="d_isdel" jdbcType="INTEGER" property="dIsdel" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
d_id, d_name, d_remark, d_isdel
|
||||
</sql>
|
||||
|
||||
<select id="findSelective" parameterType="com.esms.po.Department" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from department
|
||||
<where>
|
||||
<if test="dName != '' and dName != null">
|
||||
and d_name like concat('%',#{dName,jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
<if test="true">
|
||||
and d_isdel = 1
|
||||
</if>
|
||||
</where>
|
||||
order by d_id DESC
|
||||
|
||||
</select>
|
||||
|
||||
<select id="findByDname" parameterType="String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from department where d_name = #{dName,jdbcType=VARCHAR} and d_isdel = 1
|
||||
</select>
|
||||
|
||||
<update id="deleteByQuery" parameterType="java.util.ArrayList">
|
||||
update department set d_isdel = 0 where d_id in
|
||||
<foreach collection="array" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from department
|
||||
where d_id = #{dId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectAll" resultType="com.esms.po.Department">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from department
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from department
|
||||
where d_id = #{dId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.esms.po.Department">
|
||||
<selectKey keyProperty="dId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into department (d_name, d_remark, d_isdel
|
||||
)
|
||||
values (#{dName,jdbcType=VARCHAR}, #{dRemark,jdbcType=VARCHAR}, #{dIsdel,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.esms.po.Department">
|
||||
<selectKey keyProperty="dId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into department
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="dName != null">
|
||||
d_name,
|
||||
</if>
|
||||
<if test="dRemark != null">
|
||||
d_remark,
|
||||
</if>
|
||||
<if test="dIsdel != null">
|
||||
d_isdel,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="dName != null">
|
||||
#{dName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dRemark != null">
|
||||
#{dRemark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dIsdel != null">
|
||||
#{dIsdel,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.esms.po.Department">
|
||||
update department
|
||||
<set>
|
||||
<if test="dName != null">
|
||||
d_name = #{dName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dRemark != null">
|
||||
d_remark = #{dRemark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dIsdel != null">
|
||||
d_isdel = #{dIsdel,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where d_id = #{dId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.esms.po.Department">
|
||||
update department
|
||||
set d_name = #{dName,jdbcType=VARCHAR},
|
||||
d_remark = #{dRemark,jdbcType=VARCHAR},
|
||||
d_isdel = #{dIsdel,jdbcType=INTEGER}
|
||||
where d_id = #{dId,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.esms.dao.EmployeeCustomVoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.esms.vo.EmployeeCustomVo">
|
||||
<result column="e_id" jdbcType="INTEGER" property="employee.eId"/>
|
||||
<result column="e_account" jdbcType="VARCHAR" property="employee.eAccount"/>
|
||||
<result column="e_password" jdbcType="VARCHAR" property="employee.ePassword"/>
|
||||
<result column="e_name" jdbcType="VARCHAR" property="employee.eName"/>
|
||||
<result column="e_idcard" jdbcType="VARCHAR" property="employee.eIdcard"/>
|
||||
<result column="e_sex" jdbcType="VARCHAR" property="employee.eSex"/>
|
||||
<result column="e_dagree" jdbcType="VARCHAR" property="employee.eDagree"/>
|
||||
<result column="e_birthday" jdbcType="DATE" property="employee.eBirthday"/>
|
||||
<result column="e_email" jdbcType="VARCHAR" property="employee.eEmail"/>
|
||||
<result column="e_phone" jdbcType="VARCHAR" property="employee.ePhone"/>
|
||||
<result column="e_hometown" jdbcType="VARCHAR" property="employee.eHometown"/>
|
||||
<result column="e_rank" jdbcType="INTEGER" property="employee.eRank"/>
|
||||
<result column="e_head_path" jdbcType="VARCHAR" property="employee.eHeadPath"/>
|
||||
<result column="e_urgent_person" jdbcType="VARCHAR" property="employee.eUrgentPerson"/>
|
||||
<result column="e_urgent_phone" jdbcType="VARCHAR" property="employee.eUrgentPhone"/>
|
||||
<result column="p_id" jdbcType="INTEGER" property="employee.pId"/>
|
||||
<result column="d_id" jdbcType="INTEGER" property="employee.dId"/>
|
||||
<result column="e_base_pay" jdbcType="DOUBLE" property="employee.eBasePay"/>
|
||||
<result column="e_isdel" jdbcType="INTEGER" property="employee.eIsdel"/>
|
||||
<result column="e_entry_time" jdbcType="DATE" property="employee.eEntryTime"/>
|
||||
<result column="e_leave_time" jdbcType="DATE" property="employee.eLeaveTime"/>
|
||||
|
||||
<result column="p_id" jdbcType="INTEGER" property="position.pId"/>
|
||||
<result column="p_name" jdbcType="VARCHAR" property="position.pName"/>
|
||||
<result column="p_duty" jdbcType="VARCHAR" property="position.pDuty"/>
|
||||
<result column="p_post_pay" jdbcType="DOUBLE" property="position.pPostPay"/>
|
||||
<result column="p_isdel" jdbcType="INTEGER" property="position.pIsdel"/>
|
||||
|
||||
<result column="rb_id" jdbcType="INTEGER" property="rankBonus.rbId"/>
|
||||
<result column="rank_name" jdbcType="VARCHAR" property="rankBonus.rankName"/>
|
||||
<result column="rb_bonus" jdbcType="INTEGER" property="rankBonus.rbBonus"/>
|
||||
|
||||
<result column="d_id" jdbcType="INTEGER" property="department.dId"/>
|
||||
<result column="d_name" jdbcType="VARCHAR" property="department.dName"/>
|
||||
<result column="d_remark" jdbcType="VARCHAR" property="department.dRemark"/>
|
||||
<result column="d_isdel" jdbcType="INTEGER" property="department.dIsdel"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectEmployeeById" resultMap="BaseResultMap">
|
||||
select * from employee e, department d,position p,rank_bonus rb
|
||||
where e.e_id = #{arg0} and d.d_id = e.d_id and p.p_id = e.p_id and e_rank = rb_id
|
||||
</select>
|
||||
|
||||
|
||||
<!--条件查找 工号 员工姓名 部门id By xjx-->
|
||||
<select id="selectEmployeeSelective" parameterType="map" resultMap="BaseResultMap" >
|
||||
select *
|
||||
from
|
||||
employee e
|
||||
left join department d on e.d_id = d.d_id
|
||||
left join position p on e.p_id = p.p_id
|
||||
left join rank_bonus rb on e.e_rank = rb.rb_id
|
||||
<where>
|
||||
<if test="e_account != ''">
|
||||
and e_account like concat('%',#{e_account},'%')
|
||||
</if>
|
||||
<if test="e_name != ''">
|
||||
and e_name like concat('%',#{e_name},'%')
|
||||
</if>
|
||||
<if test="d_id != 0">
|
||||
and d.d_id = #{d_id}
|
||||
</if>
|
||||
<if test="true">
|
||||
and e.e_isdel = 1
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY e.e_id DESC
|
||||
|
||||
</select>
|
||||
<!-- 查找一个 By xjx-->
|
||||
<select id="selectVoByPrimaryKey" parameterType="int" resultMap="BaseResultMap" >
|
||||
select *
|
||||
from
|
||||
employee e
|
||||
left join department d on e.d_id = d.d_id
|
||||
left join position p on e.p_id = p.p_id
|
||||
left join rank_bonus rb on e.e_rank = rb.rb_id
|
||||
where e_id = #{id, jdbcType=INTEGER} and e_isdel = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,348 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.esms.dao.EmployeeMapper">
|
||||
<resultMap id="BaseResultMap" type="com.esms.po.Employee">
|
||||
<id column="e_id" jdbcType="INTEGER" property="eId" />
|
||||
<result column="e_account" jdbcType="VARCHAR" property="eAccount" />
|
||||
<result column="e_password" jdbcType="VARCHAR" property="ePassword" />
|
||||
<result column="e_name" jdbcType="VARCHAR" property="eName" />
|
||||
<result column="e_idcard" jdbcType="VARCHAR" property="eIdcard" />
|
||||
<result column="e_sex" jdbcType="VARCHAR" property="eSex" />
|
||||
<result column="e_dagree" jdbcType="VARCHAR" property="eDagree" />
|
||||
<result column="e_birthday" jdbcType="DATE" property="eBirthday" />
|
||||
<result column="e_email" jdbcType="VARCHAR" property="eEmail" />
|
||||
<result column="e_phone" jdbcType="VARCHAR" property="ePhone" />
|
||||
<result column="e_hometown" jdbcType="VARCHAR" property="eHometown" />
|
||||
<result column="e_rank" jdbcType="INTEGER" property="eRank" />
|
||||
<result column="e_head_path" jdbcType="VARCHAR" property="eHeadPath" />
|
||||
<result column="e_urgent_person" jdbcType="VARCHAR" property="eUrgentPerson" />
|
||||
<result column="e_urgent_phone" jdbcType="VARCHAR" property="eUrgentPhone" />
|
||||
<result column="p_id" jdbcType="INTEGER" property="pId" />
|
||||
<result column="d_id" jdbcType="INTEGER" property="dId" />
|
||||
<result column="e_base_pay" jdbcType="DOUBLE" property="eBasePay" />
|
||||
<result column="e_isdel" jdbcType="INTEGER" property="eIsdel" />
|
||||
<result column="e_entry_time" jdbcType="DATE" property="eEntryTime" />
|
||||
<result column="e_leave_time" jdbcType="DATE" property="eLeaveTime" />
|
||||
<!--<association property="rankBonus" javaType="com.esms.po.RankBonus"-->
|
||||
<!--select="com.esms.dao.RankBonusMapper.selectByPrimaryKey" column="e_rank">-->
|
||||
<!--</association>-->
|
||||
<!--<association property="position" javaType="com.esms.po.Position"-->
|
||||
<!--select="com.esms.dao.PositionMapper.selectByPrimaryKey" column="p_id">-->
|
||||
<!--</association>-->
|
||||
<!--<association property="department" javaType="com.esms.po.Department"-->
|
||||
<!--select="com.esms.dao.DepartmentMapper.selectByPrimaryKey" column="d_id">-->
|
||||
<!--</association>-->
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
e_id, e_account, e_password, e_name, e_idcard, e_sex, e_dagree, e_birthday, e_email,
|
||||
e_phone, e_hometown, e_rank, e_head_path, e_urgent_person, e_urgent_phone, p_id,
|
||||
d_id, e_base_pay, e_isdel, e_entry_time, e_leave_time
|
||||
</sql>
|
||||
|
||||
<!--删除与批量删除 添加 By xjx -->
|
||||
<update id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
update employee set e_isdel = 0 where e_id = #{eId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<!--<update id="deleteByQuery" parameterType="java.util.ArrayList">-->
|
||||
<!--update employee set e_isdel = 0 where e_id in-->
|
||||
<!--<foreach collection="array" item="id" separator="," open="(" close=")">-->
|
||||
<!--#{id}-->
|
||||
<!--</foreach>-->
|
||||
<!--</update>-->
|
||||
<select id="findByeAccount" parameterType="String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from employee where e_account = #{eAccount,jdbcType=VARCHAR} and e_isdel = 1
|
||||
</select>
|
||||
|
||||
<select id="selectByAccount" resultType="com.esms.po.Employee">
|
||||
select * from employee where e_account = #{arg0} and e_isdel = 1
|
||||
</select>
|
||||
|
||||
<select id="selectByAccountAndPassword" parameterType="com.esms.po.Employee" resultType="com.esms.po.Employee">
|
||||
select * from employee where e_account = #{eAccount} and e_password = #{ePassword} and e_isdel = #{eIsdel}
|
||||
</select>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from employee
|
||||
where e_id = #{eId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<!--统计部门拥有员工数 by 方宏泰-->
|
||||
<select id="countByDid" parameterType="java.lang.Integer" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from employee
|
||||
where d_id = #{dId}
|
||||
</select>
|
||||
<!--<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">-->
|
||||
<!--delete from employee-->
|
||||
<!--where e_id = #{eId,jdbcType=INTEGER}-->
|
||||
<!--</delete>-->
|
||||
<insert id="insert" parameterType="com.esms.po.Employee">
|
||||
<selectKey keyProperty="eId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into employee (e_account, e_password, e_name,
|
||||
e_idcard, e_sex, e_dagree,
|
||||
e_birthday, e_email, e_phone,
|
||||
e_hometown, e_rank, e_head_path,
|
||||
e_urgent_person, e_urgent_phone, p_id,
|
||||
d_id, e_base_pay, e_isdel,
|
||||
e_entry_time, e_leave_time)
|
||||
values (#{eAccount,jdbcType=VARCHAR}, #{ePassword,jdbcType=VARCHAR}, #{eName,jdbcType=VARCHAR},
|
||||
#{eIdcard,jdbcType=VARCHAR}, #{eSex,jdbcType=VARCHAR}, #{eDagree,jdbcType=VARCHAR},
|
||||
#{eBirthday,jdbcType=DATE}, #{eEmail,jdbcType=VARCHAR}, #{ePhone,jdbcType=VARCHAR},
|
||||
#{eHometown,jdbcType=VARCHAR}, #{eRank,jdbcType=INTEGER}, #{eHeadPath,jdbcType=VARCHAR},
|
||||
#{eUrgentPerson,jdbcType=VARCHAR}, #{eUrgentPhone,jdbcType=VARCHAR}, #{pId,jdbcType=INTEGER},
|
||||
#{dId,jdbcType=INTEGER}, #{eBasePay,jdbcType=DOUBLE}, #{eIsdel,jdbcType=INTEGER},
|
||||
#{eEntryTime,jdbcType=DATE}, #{eLeaveTime,jdbcType=DATE})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.esms.po.Employee">
|
||||
<selectKey keyProperty="eId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into employee
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="eAccount != null">
|
||||
e_account,
|
||||
</if>
|
||||
<if test="ePassword != null">
|
||||
e_password,
|
||||
</if>
|
||||
<if test="eName != null">
|
||||
e_name,
|
||||
</if>
|
||||
<if test="eIdcard != null">
|
||||
e_idcard,
|
||||
</if>
|
||||
<if test="eSex != null">
|
||||
e_sex,
|
||||
</if>
|
||||
<if test="eDagree != null">
|
||||
e_dagree,
|
||||
</if>
|
||||
<if test="eBirthday != null">
|
||||
e_birthday,
|
||||
</if>
|
||||
<if test="eEmail != null">
|
||||
e_email,
|
||||
</if>
|
||||
<if test="ePhone != null">
|
||||
e_phone,
|
||||
</if>
|
||||
<if test="eHometown != null">
|
||||
e_hometown,
|
||||
</if>
|
||||
<if test="eRank != null">
|
||||
e_rank,
|
||||
</if>
|
||||
<if test="eHeadPath != null">
|
||||
e_head_path,
|
||||
</if>
|
||||
<if test="eUrgentPerson != null">
|
||||
e_urgent_person,
|
||||
</if>
|
||||
<if test="eUrgentPhone != null">
|
||||
e_urgent_phone,
|
||||
</if>
|
||||
<if test="pId != null">
|
||||
p_id,
|
||||
</if>
|
||||
<if test="dId != null">
|
||||
d_id,
|
||||
</if>
|
||||
<if test="eBasePay != null">
|
||||
e_base_pay,
|
||||
</if>
|
||||
<if test="eIsdel != null">
|
||||
e_isdel,
|
||||
</if>
|
||||
<if test="eEntryTime != null">
|
||||
e_entry_time,
|
||||
</if>
|
||||
<if test="eLeaveTime != null">
|
||||
e_leave_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="eAccount != null">
|
||||
#{eAccount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ePassword != null">
|
||||
#{ePassword,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eName != null">
|
||||
#{eName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eIdcard != null">
|
||||
#{eIdcard,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eSex != null">
|
||||
#{eSex,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="eDagree != null">
|
||||
#{eDagree,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eBirthday != null">
|
||||
#{eBirthday,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="eEmail != null">
|
||||
#{eEmail,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ePhone != null">
|
||||
#{ePhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eHometown != null">
|
||||
#{eHometown,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eRank != null">
|
||||
#{eRank,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="eHeadPath != null">
|
||||
#{eHeadPath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eUrgentPerson != null">
|
||||
#{eUrgentPerson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eUrgentPhone != null">
|
||||
#{eUrgentPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pId != null">
|
||||
#{pId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="dId != null">
|
||||
#{dId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="eBasePay != null">
|
||||
#{eBasePay,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="eIsdel != null">
|
||||
#{eIsdel,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="eEntryTime != null">
|
||||
#{eEntryTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="eLeaveTime != null">
|
||||
#{eLeaveTime,jdbcType=DATE},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.esms.po.Employee">
|
||||
update employee
|
||||
<set>
|
||||
<if test="eAccount != null">
|
||||
e_account = #{eAccount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ePassword != null">
|
||||
e_password = #{ePassword,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eName != null">
|
||||
e_name = #{eName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eIdcard != null">
|
||||
e_idcard = #{eIdcard,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eSex != null">
|
||||
e_sex = #{eSex,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eDagree != null">
|
||||
e_dagree = #{eDagree,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eBirthday != null">
|
||||
e_birthday = #{eBirthday,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="eEmail != null">
|
||||
e_email = #{eEmail,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ePhone != null">
|
||||
e_phone = #{ePhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eHometown != null">
|
||||
e_hometown = #{eHometown,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eRank != null">
|
||||
e_rank = #{eRank,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="eHeadPath != null">
|
||||
e_head_path = #{eHeadPath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eUrgentPerson != null">
|
||||
e_urgent_person = #{eUrgentPerson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="eUrgentPhone != null">
|
||||
e_urgent_phone = #{eUrgentPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pId != null">
|
||||
p_id = #{pId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="dId != null">
|
||||
d_id = #{dId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="eBasePay != null">
|
||||
e_base_pay = #{eBasePay,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="eIsdel != null">
|
||||
e_isdel = #{eIsdel,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="eEntryTime != null">
|
||||
e_entry_time = #{eEntryTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="eLeaveTime != null">
|
||||
e_leave_time = #{eLeaveTime,jdbcType=DATE},
|
||||
</if>
|
||||
</set>
|
||||
where e_id = #{eId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.esms.po.Employee">
|
||||
update employee
|
||||
set e_account = #{eAccount,jdbcType=VARCHAR},
|
||||
e_password = #{ePassword,jdbcType=VARCHAR},
|
||||
e_name = #{eName,jdbcType=VARCHAR},
|
||||
e_idcard = #{eIdcard,jdbcType=VARCHAR},
|
||||
e_sex = #{eSex,jdbcType=VARCHAR},
|
||||
e_dagree = #{eDagree,jdbcType=VARCHAR},
|
||||
e_birthday = #{eBirthday,jdbcType=DATE},
|
||||
e_email = #{eEmail,jdbcType=VARCHAR},
|
||||
e_phone = #{ePhone,jdbcType=VARCHAR},
|
||||
e_hometown = #{eHometown,jdbcType=VARCHAR},
|
||||
e_rank = #{eRank,jdbcType=INTEGER},
|
||||
e_head_path = #{eHeadPath,jdbcType=VARCHAR},
|
||||
e_urgent_person = #{eUrgentPerson,jdbcType=VARCHAR},
|
||||
e_urgent_phone = #{eUrgentPhone,jdbcType=VARCHAR},
|
||||
p_id = #{pId,jdbcType=INTEGER},
|
||||
d_id = #{dId,jdbcType=INTEGER},
|
||||
e_base_pay = #{eBasePay,jdbcType=DOUBLE},
|
||||
e_isdel = #{eIsdel,jdbcType=INTEGER},
|
||||
e_entry_time = #{eEntryTime,jdbcType=DATE},
|
||||
e_leave_time = #{eLeaveTime,jdbcType=DATE}
|
||||
where e_id = #{eId,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
|
||||
<!--根据rank_bonus表的rb_id统计是否有员工依赖-->
|
||||
<select id="countByRbid" parameterType="java.lang.Integer" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from employee
|
||||
where e_rank = #{eRank}
|
||||
</select>
|
||||
|
||||
<!--根据rank_bonus表的rb_id统计是否有员工依赖-->
|
||||
<select id="selectAll" resultType="com.esms.po.Employee">
|
||||
select *
|
||||
from employee
|
||||
where e_isdel = 1
|
||||
</select>
|
||||
<!--根据员工号检查是否存在此员工 by方宏泰-->
|
||||
<select id="isExistEmployee" parameterType="java.lang.String" resultType="java.lang.Integer">
|
||||
SELECT count(*)
|
||||
from employee
|
||||
where e_account = #{e_account}
|
||||
</select>
|
||||
<!--根据员工工号查找员工ID by方宏泰-->
|
||||
<select id="selectEidByEaccount" parameterType="java.lang.String" resultType="java.lang.Integer">
|
||||
select e_id
|
||||
from employee
|
||||
where e_account = #{e_account}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.esms.dao.KeyValueMapper">
|
||||
<resultMap id="BaseResultMap" type="com.esms.po.KeyValue">
|
||||
<id column="kv_id" jdbcType="INTEGER" property="kvId" />
|
||||
<result column="kv_key" jdbcType="VARCHAR" property="kvKey" />
|
||||
<result column="kv_value" jdbcType="DOUBLE" property="kvValue" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
kv_id, kv_key, kv_value
|
||||
</sql>
|
||||
<select id="selectBykvKey" resultMap="BaseResultMap">
|
||||
select *
|
||||
from key_value
|
||||
where kv_key = #{arg0}
|
||||
</select>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from key_value
|
||||
where kv_id = #{kvId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from key_value
|
||||
where kv_id = #{kvId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.esms.po.KeyValue">
|
||||
<selectKey keyProperty="kvId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into key_value (kv_key, kv_value)
|
||||
values (#{kvKey,jdbcType=VARCHAR}, #{kvValue,jdbcType=DOUBLE})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.esms.po.KeyValue">
|
||||
<selectKey keyProperty="kvId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into key_value
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="kvKey != null">
|
||||
kv_key,
|
||||
</if>
|
||||
<if test="kvValue != null">
|
||||
kv_value,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="kvKey != null">
|
||||
#{kvKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="kvValue != null">
|
||||
#{kvValue,jdbcType=DOUBLE},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.esms.po.KeyValue">
|
||||
update key_value
|
||||
<set>
|
||||
<if test="kvKey != null">
|
||||
kv_key = #{kvKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="kvValue != null">
|
||||
kv_value = #{kvValue,jdbcType=DOUBLE},
|
||||
</if>
|
||||
</set>
|
||||
where kv_id = #{kvId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.esms.po.KeyValue">
|
||||
update key_value
|
||||
set kv_key = #{kvKey,jdbcType=VARCHAR},
|
||||
kv_value = #{kvValue,jdbcType=DOUBLE}
|
||||
where kv_id = #{kvId,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.esms.dao.MonthlyAttendanceCustomVoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.esms.vo.MonthlyAttendanceCustomVo">
|
||||
<result column="ma_id" jdbcType="INTEGER" property="monthlyAttendance.maId"/>
|
||||
<result column="e_id" jdbcType="INTEGER" property="monthlyAttendance.eId" />
|
||||
<result column="attendance_time" jdbcType="DATE" property="monthlyAttendance.attendanceTime"/>
|
||||
<result column="sick_leave_num" jdbcType="INTEGER" property="monthlyAttendance.sickLeaveNum"/>
|
||||
<result column="overtime_hour" jdbcType="DOUBLE" property="monthlyAttendance.overtimeHour"/>
|
||||
<result column="weekend_hour" jdbcType="DOUBLE" property="monthlyAttendance.weekendHour"/>
|
||||
<result column="holiday_hour" jdbcType="DOUBLE" property="monthlyAttendance.holidayHour"/>
|
||||
<result column="late_num" jdbcType="INTEGER" property="monthlyAttendance.lateNum"/>
|
||||
<result column="early_num" jdbcType="INTEGER" property="monthlyAttendance.earlyNum"/>
|
||||
<result column="absence_num" jdbcType="INTEGER" property="monthlyAttendance.absenceNum"/>
|
||||
<result column="business_travel_num" jdbcType="INTEGER" property="monthlyAttendance.businessTravelNum"/>
|
||||
<result column="compassionate_leave_num" jdbcType="INTEGER" property="monthlyAttendance.compassionateLeaveNum"/>
|
||||
|
||||
<result column="e_id" jdbcType="INTEGER" property="employee.eId"/>
|
||||
<result column="e_account" jdbcType="VARCHAR" property="employee.eAccount"/>
|
||||
<result column="e_password" jdbcType="VARCHAR" property="employee.ePassword"/>
|
||||
<result column="e_name" jdbcType="VARCHAR" property="employee.eName"/>
|
||||
<result column="e_idcard" jdbcType="VARCHAR" property="employee.eIdcard"/>
|
||||
<result column="e_sex" jdbcType="VARCHAR" property="employee.eSex"/>
|
||||
<result column="e_dagree" jdbcType="VARCHAR" property="employee.eDagree"/>
|
||||
<result column="e_birthday" jdbcType="DATE" property="employee.eBirthday"/>
|
||||
<result column="e_email" jdbcType="VARCHAR" property="employee.eEmail"/>
|
||||
<result column="e_phone" jdbcType="VARCHAR" property="employee.ePhone"/>
|
||||
<result column="e_hometown" jdbcType="VARCHAR" property="employee.eHometown"/>
|
||||
<result column="e_rank" jdbcType="INTEGER" property="employee.eRank"/>
|
||||
<result column="e_head_path" jdbcType="VARCHAR" property="employee.eHeadPath"/>
|
||||
<result column="e_urgent_person" jdbcType="VARCHAR" property="employee.eUrgentPerson"/>
|
||||
<result column="e_urgent_phone" jdbcType="VARCHAR" property="employee.eUrgentPhone"/>
|
||||
<result column="p_id" jdbcType="INTEGER" property="employee.pId"/>
|
||||
<result column="d_id" jdbcType="INTEGER" property="employee.dId"/>
|
||||
<result column="e_base_pay" jdbcType="DOUBLE" property="employee.eBasePay"/>
|
||||
<result column="e_isdel" jdbcType="INTEGER" property="employee.eIsdel"/>
|
||||
<result column="e_entry_time" jdbcType="DATE" property="employee.eEntryTime"/>
|
||||
<result column="e_leave_time" jdbcType="DATE" property="employee.eLeaveTime"/>
|
||||
|
||||
<result column="d_id" jdbcType="INTEGER" property="department.dId"/>
|
||||
<result column="d_name" jdbcType="VARCHAR" property="department.dName"/>
|
||||
<result column="d_remark" jdbcType="VARCHAR" property="department.dRemark"/>
|
||||
<result column="d_isdel" jdbcType="INTEGER" property="department.dIsdel"/>
|
||||
</resultMap>
|
||||
<select id="selectMonthlyAttendanceCustomVoMapperByeAccountAnddIdAndTime" parameterType="map" resultMap="BaseResultMap" >
|
||||
select *
|
||||
-- ma.ma_id, ma.attendance_time, ma.sick_leave_num, ma.overtime_hour, ma.weekend_hour, ma.holiday_hour, ma.late_num, ma.early_num, ma.absence_num, ma.business_travel_num, ma.compassionate_leave_num,
|
||||
-- e.e_id, e.e_account, e.e_password, e.e_name, e.e_idcard, e_sex, e.e_dagree, e.e_birthday, e.e_email, e.e_phone, e.e_hometown, e.e_rank, e.e_head_path, e.e_urgent_person, e.e_urgent_phone, e.p_id, e.e_base_pay, e.e_isdel, e.e_entry_time, e.e_leave_time,
|
||||
-- d.d_id, d.d_name, d.d_remark, d.d_isdel
|
||||
from
|
||||
monthly_attendance ma
|
||||
left join employee e on e.e_id = ma.e_id
|
||||
left join department d on d.d_id = e.d_id
|
||||
<where>
|
||||
<if test="e_account != ''">
|
||||
and e_account like concat('%',#{e_account},'%')
|
||||
</if>
|
||||
<if test="d_id != 0">
|
||||
and d.d_id = #{d_id}
|
||||
</if>
|
||||
<if test="attendance_time != ''">
|
||||
and attendance_time like concat('%',#{attendance_time},'%')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY attendance_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectVoByPrimaryKey" parameterType="int" resultMap="BaseResultMap" >
|
||||
select *
|
||||
from
|
||||
monthly_attendance ma
|
||||
left join employee e on e.e_id = ma.e_id
|
||||
left join department d on d.d_id = e.e_id
|
||||
where ma_id = #{id, jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,207 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.esms.dao.MonthlyAttendanceMapper">
|
||||
<resultMap id="BaseResultMap" type="com.esms.po.MonthlyAttendance">
|
||||
<id column="ma_id" jdbcType="INTEGER" property="maId" />
|
||||
<result column="e_id" jdbcType="INTEGER" property="eId" />
|
||||
<result column="attendance_time" jdbcType="DATE" property="attendanceTime" />
|
||||
<result column="sick_leave_num" jdbcType="INTEGER" property="sickLeaveNum" />
|
||||
<result column="overtime_hour" jdbcType="DOUBLE" property="overtimeHour" />
|
||||
<result column="weekend_hour" jdbcType="DOUBLE" property="weekendHour" />
|
||||
<result column="holiday_hour" jdbcType="DOUBLE" property="holidayHour" />
|
||||
<result column="late_num" jdbcType="INTEGER" property="lateNum" />
|
||||
<result column="early_num" jdbcType="INTEGER" property="earlyNum" />
|
||||
<result column="absence_num" jdbcType="INTEGER" property="absenceNum" />
|
||||
<result column="business_travel_num" jdbcType="INTEGER" property="businessTravelNum" />
|
||||
<result column="compassionate_leave_num" jdbcType="INTEGER" property="compassionateLeaveNum" />
|
||||
<association property="employee" javaType="com.esms.po.Employee"
|
||||
select="com.esms.dao.EmployeeMapper.selectByPrimaryKey" column="e_id">
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteByQuery" parameterType="java.util.ArrayList">
|
||||
delete from monthly_attendance where ma_id in
|
||||
<foreach collection="array" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
ma_id, e_id, attendance_time, sick_leave_num, overtime_hour, weekend_hour, holiday_hour,
|
||||
late_num, early_num, absence_num, business_travel_num, compassionate_leave_num
|
||||
</sql>
|
||||
<select id="selectByeIdAndDate" resultMap="BaseResultMap">
|
||||
select *
|
||||
from monthly_attendance
|
||||
where e_id = #{arg0} and strcmp(date_format(attendance_time,'%Y-%m'),#{arg1}) = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from monthly_attendance
|
||||
where ma_id = #{maId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from monthly_attendance
|
||||
where ma_id = #{maId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.esms.po.MonthlyAttendance">
|
||||
<selectKey keyProperty="maId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into monthly_attendance (e_id, attendance_time, sick_leave_num,
|
||||
overtime_hour, weekend_hour, holiday_hour,
|
||||
late_num, early_num, absence_num,
|
||||
business_travel_num, compassionate_leave_num
|
||||
)
|
||||
values (#{employee.eId,jdbcType=INTEGER}, #{attendanceTime,jdbcType=DATE}, #{sickLeaveNum,jdbcType=INTEGER},
|
||||
#{overtimeHour,jdbcType=DOUBLE}, #{weekendHour,jdbcType=DOUBLE}, #{holidayHour,jdbcType=DOUBLE},
|
||||
#{lateNum,jdbcType=INTEGER}, #{earlyNum,jdbcType=INTEGER}, #{absenceNum,jdbcType=INTEGER},
|
||||
#{businessTravelNum,jdbcType=INTEGER}, #{compassionateLeaveNum,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.esms.po.MonthlyAttendance">
|
||||
<selectKey keyProperty="maId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into monthly_attendance
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="employee != null">
|
||||
e_id,
|
||||
</if>
|
||||
<if test="attendanceTime != null">
|
||||
attendance_time,
|
||||
</if>
|
||||
<if test="sickLeaveNum != null">
|
||||
sick_leave_num,
|
||||
</if>
|
||||
<if test="overtimeHour != null">
|
||||
overtime_hour,
|
||||
</if>
|
||||
<if test="weekendHour != null">
|
||||
weekend_hour,
|
||||
</if>
|
||||
<if test="holidayHour != null">
|
||||
holiday_hour,
|
||||
</if>
|
||||
<if test="lateNum != null">
|
||||
late_num,
|
||||
</if>
|
||||
<if test="earlyNum != null">
|
||||
early_num,
|
||||
</if>
|
||||
<if test="absenceNum != null">
|
||||
absence_num,
|
||||
</if>
|
||||
<if test="businessTravelNum != null">
|
||||
business_travel_num,
|
||||
</if>
|
||||
<if test="compassionateLeaveNum != null">
|
||||
compassionate_leave_num,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="employee != null">
|
||||
#{employee.eId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="attendanceTime != null">
|
||||
#{attendanceTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="sickLeaveNum != null">
|
||||
#{sickLeaveNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="overtimeHour != null">
|
||||
#{overtimeHour,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="weekendHour != null">
|
||||
#{weekendHour,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="holidayHour != null">
|
||||
#{holidayHour,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="lateNum != null">
|
||||
#{lateNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="earlyNum != null">
|
||||
#{earlyNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="absenceNum != null">
|
||||
#{absenceNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="businessTravelNum != null">
|
||||
#{businessTravelNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compassionateLeaveNum != null">
|
||||
#{compassionateLeaveNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.esms.po.MonthlyAttendance">
|
||||
update monthly_attendance
|
||||
<set>
|
||||
<if test="employee != null">
|
||||
e_id = #{employee.eId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="attendanceTime != null">
|
||||
attendance_time = #{attendanceTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="sickLeaveNum != null">
|
||||
sick_leave_num = #{sickLeaveNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="overtimeHour != null">
|
||||
overtime_hour = #{overtimeHour,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="weekendHour != null">
|
||||
weekend_hour = #{weekendHour,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="holidayHour != null">
|
||||
holiday_hour = #{holidayHour,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="lateNum != null">
|
||||
late_num = #{lateNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="earlyNum != null">
|
||||
early_num = #{earlyNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="absenceNum != null">
|
||||
absence_num = #{absenceNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="businessTravelNum != null">
|
||||
business_travel_num = #{businessTravelNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compassionateLeaveNum != null">
|
||||
compassionate_leave_num = #{compassionateLeaveNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where ma_id = #{maId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.esms.po.MonthlyAttendance">
|
||||
update monthly_attendance
|
||||
set e_id = #{employee.eId,jdbcType=INTEGER},
|
||||
attendance_time = #{attendanceTime,jdbcType=DATE},
|
||||
sick_leave_num = #{sickLeaveNum,jdbcType=INTEGER},
|
||||
overtime_hour = #{overtimeHour,jdbcType=DOUBLE},
|
||||
weekend_hour = #{weekendHour,jdbcType=DOUBLE},
|
||||
holiday_hour = #{holidayHour,jdbcType=DOUBLE},
|
||||
late_num = #{lateNum,jdbcType=INTEGER},
|
||||
early_num = #{earlyNum,jdbcType=INTEGER},
|
||||
absence_num = #{absenceNum,jdbcType=INTEGER},
|
||||
business_travel_num = #{businessTravelNum,jdbcType=INTEGER},
|
||||
compassionate_leave_num = #{compassionateLeaveNum,jdbcType=INTEGER}
|
||||
where ma_id = #{maId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<!--by admin 按员工id和年份查询考勤-->
|
||||
<select id="selectMonthlyAttendanceMapperByeEidAndTime" parameterType="map" resultType="com.esms.po.MonthlyAttendance">
|
||||
select *
|
||||
from
|
||||
monthly_attendance ma
|
||||
<where>
|
||||
ma.e_id = #{e_id}
|
||||
<if test="attendanceTime!=''">
|
||||
and attendance_time like concat('%',#{attendance_time},'%')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY attendance_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.esms.dao.PositionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.esms.po.Position">
|
||||
<id column="p_id" jdbcType="INTEGER" property="pId" />
|
||||
<result column="p_name" jdbcType="VARCHAR" property="pName" />
|
||||
<result column="p_duty" jdbcType="VARCHAR" property="pDuty" />
|
||||
<result column="p_post_pay" jdbcType="DOUBLE" property="pPostPay" />
|
||||
<result column="p_isdel" jdbcType="INTEGER" property="pIsdel" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
p_id, p_name, p_duty, p_post_pay, p_isdel
|
||||
</sql>
|
||||
|
||||
<select id="findSelective" parameterType="com.esms.po.Position" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from position
|
||||
<where>
|
||||
<if test="pName != '' and pName != null">
|
||||
and p_name like concat('%',#{pName,jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
<if test="true">
|
||||
and p_isdel = 1
|
||||
</if>
|
||||
</where>
|
||||
order by p_id DESC
|
||||
|
||||
</select>
|
||||
|
||||
<select id="findByDname" parameterType="String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from position where p_name = #{pName,jdbcType=VARCHAR} and p_isdel = 1
|
||||
</select>
|
||||
|
||||
<update id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
update position set p_isdel = 0 where p_id = #{pId,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<update id="deleteByQuery" parameterType="java.util.ArrayList">
|
||||
update position set p_isdel = 0 where p_id in
|
||||
<foreach collection="array" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from position
|
||||
where p_id = #{pId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<insert id="insert" parameterType="com.esms.po.Position">
|
||||
<selectKey keyProperty="pId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into position (p_name, p_duty, p_post_pay,
|
||||
p_isdel)
|
||||
values (#{pName,jdbcType=VARCHAR}, #{pDuty,jdbcType=VARCHAR}, #{pPostPay,jdbcType=DOUBLE},
|
||||
#{pIsdel,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.esms.po.Position">
|
||||
<selectKey keyProperty="pId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into position
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="pName != null">
|
||||
p_name,
|
||||
</if>
|
||||
<if test="pDuty != null">
|
||||
p_duty,
|
||||
</if>
|
||||
<if test="pPostPay != null">
|
||||
p_post_pay,
|
||||
</if>
|
||||
<if test="pIsdel != null">
|
||||
p_isdel,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="pName != null">
|
||||
#{pName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pDuty != null">
|
||||
#{pDuty,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pPostPay != null">
|
||||
#{pPostPay,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="pIsdel != null">
|
||||
#{pIsdel,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.esms.po.Position">
|
||||
update position
|
||||
<set>
|
||||
<if test="pName != null">
|
||||
p_name = #{pName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pDuty != null">
|
||||
p_duty = #{pDuty,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pPostPay != null">
|
||||
p_post_pay = #{pPostPay,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="pIsdel != null">
|
||||
p_isdel = #{pIsdel,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where p_id = #{pId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.esms.po.Position">
|
||||
update position
|
||||
set p_name = #{pName,jdbcType=VARCHAR},
|
||||
p_duty = #{pDuty,jdbcType=VARCHAR},
|
||||
p_post_pay = #{pPostPay,jdbcType=DOUBLE},
|
||||
p_isdel = #{pIsdel,jdbcType=INTEGER}
|
||||
where p_id = #{pId,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.esms.dao.RankBonusMapper">
|
||||
<resultMap id="BaseResultMap" type="com.esms.po.RankBonus">
|
||||
<id column="rb_id" jdbcType="INTEGER" property="rbId" />
|
||||
<result column="rank_name" jdbcType="VARCHAR" property="rankName" />
|
||||
<result column="rb_bonus" jdbcType="INTEGER" property="rbBonus" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
rb_id, rank_name, rb_bonus
|
||||
</sql>
|
||||
<select id="findSelective" parameterType="com.esms.po.RankBonus" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from rank_bonus
|
||||
<where>
|
||||
<if test="rankName != '' and rankName != null">
|
||||
and rank_name like concat('%',#{rankName,jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by rb_id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectAll" resultType="com.esms.po.RankBonus">
|
||||
select * from rank_bonus order by rb_id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from rank_bonus
|
||||
where rb_id = #{rbId,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from rank_bonus
|
||||
where rb_id = #{rbId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
|
||||
<insert id="insert" parameterType="com.esms.po.RankBonus">
|
||||
<selectKey keyProperty="rbId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into rank_bonus (rank_name, rb_bonus)
|
||||
values (#{rankName,jdbcType=VARCHAR}, #{rbBonus,jdbcType=INTEGER})
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="insertSelective" parameterType="com.esms.po.RankBonus">
|
||||
<selectKey keyProperty="rbId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into rank_bonus
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="rankName != null">
|
||||
rank_name,
|
||||
</if>
|
||||
<if test="rbBonus != null">
|
||||
rb_bonus,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="rankName != null">
|
||||
#{rankName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="rbBonus != null">
|
||||
#{rbBonus,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.esms.po.RankBonus">
|
||||
update rank_bonus
|
||||
<set>
|
||||
<if test="rankName != null">
|
||||
rank_name = #{rankName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="rbBonus != null">
|
||||
rb_bonus = #{rbBonus,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where rb_id = #{rbId,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="com.esms.po.RankBonus">
|
||||
update rank_bonus
|
||||
set rank_name = #{rankName,jdbcType=VARCHAR},
|
||||
rb_bonus = #{rbBonus,jdbcType=INTEGER}
|
||||
where rb_id = #{rbId,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
<select id="CountByRankName" parameterType="java.lang.String" resultType="java.lang.Integer">
|
||||
select count(*) from rank_bonus
|
||||
where rank_name=#{ooo}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findByname" parameterType="String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from rank_bonus where rank_name = #{rankName,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.esms.dao.SystemManagerMapper">
|
||||
<resultMap id="BaseResultMap" type="com.esms.po.SystemManager">
|
||||
<id column="sm_id" jdbcType="INTEGER" property="smId" />
|
||||
<result column="sm_account" jdbcType="VARCHAR" property="smAccount" />
|
||||
<result column="sm_password" jdbcType="VARCHAR" property="smPassword" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
sm_id, sm_account, sm_password
|
||||
</sql>
|
||||
|
||||
<select id="selectByAccountAndPassword" parameterType="com.esms.po.SystemManager" resultType="com.esms.po.SystemManager">
|
||||
select * from system_manager where sm_account = #{smAccount} and sm_password = #{smPassword}
|
||||
</select>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from system_manager
|
||||
where sm_id = #{smId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from system_manager
|
||||
where sm_id = #{smId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.esms.po.SystemManager">
|
||||
<selectKey keyProperty="smId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into system_manager (sm_account, sm_password)
|
||||
values (#{smAccount,jdbcType=VARCHAR}, #{smPassword,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.esms.po.SystemManager">
|
||||
<selectKey keyProperty="smId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into system_manager
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="smAccount != null">
|
||||
sm_account,
|
||||
</if>
|
||||
<if test="smPassword != null">
|
||||
sm_password,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="smAccount != null">
|
||||
#{smAccount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="smPassword != null">
|
||||
#{smPassword,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.esms.po.SystemManager">
|
||||
update system_manager
|
||||
<set>
|
||||
<if test="smAccount != null">
|
||||
sm_account = #{smAccount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="smPassword != null">
|
||||
sm_password = #{smPassword,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where sm_id = #{smId,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.esms.po.SystemManager">
|
||||
update system_manager
|
||||
set sm_account = #{smAccount,jdbcType=VARCHAR},
|
||||
sm_password = #{smPassword,jdbcType=VARCHAR}
|
||||
where sm_id = #{smId,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.esms.dao.WorkingYearsBonusMapper">
|
||||
<resultMap id="BaseResultMap" type="com.esms.po.WorkingYearsBonus">
|
||||
<id column="wyb_id" jdbcType="INTEGER" property="wybId" />
|
||||
<result column="wyb_year" jdbcType="INTEGER" property="wybYear" />
|
||||
<result column="wyb_bonus" jdbcType="DOUBLE" property="wybBonus" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
wyb_id, wyb_year, wyb_bonus
|
||||
</sql>
|
||||
<select id="findSelective" parameterType="com.esms.po.WorkingYearsBonus" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from working_years_bonus
|
||||
<where>
|
||||
<if test="wybYear >0">
|
||||
and wyb_year =#{wybYear,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by wyb_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectAll" resultType="com.esms.po.WorkingYearsBonus">
|
||||
select * from working_years_bonus order by wyb_id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<select id="countByYear" resultType="java.lang.Integer">
|
||||
select count(*)from working_years_bonus
|
||||
where wyb_year=#{ooo}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from working_years_bonus
|
||||
where wyb_id = #{wybId,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from working_years_bonus
|
||||
where wyb_id = #{wybId,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
|
||||
<insert id="insert" parameterType="com.esms.po.WorkingYearsBonus">
|
||||
<selectKey keyProperty="wybId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into working_years_bonus (wyb_year, wyb_bonus)
|
||||
values (#{wybYear,jdbcType=INTEGER}, #{wybBonus,jdbcType=DOUBLE})
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="insertSelective" parameterType="com.esms.po.WorkingYearsBonus">
|
||||
<selectKey keyProperty="wybId" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into working_years_bonus
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="wybYear != null">
|
||||
wyb_year,
|
||||
</if>
|
||||
<if test="wybBonus != null">
|
||||
wyb_bonus,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="wybYear != null">
|
||||
#{wybYear,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="wybBonus != null">
|
||||
#{wybBonus,jdbcType=DOUBLE},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.esms.po.WorkingYearsBonus">
|
||||
update working_years_bonus
|
||||
<set>
|
||||
<if test="wybYear != null">
|
||||
wyb_year = #{wybYear,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="wybBonus != null">
|
||||
wyb_bonus = #{wybBonus,jdbcType=DOUBLE},
|
||||
</if>
|
||||
</set>
|
||||
where wyb_id = #{wybId,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="com.esms.po.WorkingYearsBonus">
|
||||
update working_years_bonus
|
||||
set wyb_year = #{wybYear,jdbcType=INTEGER},
|
||||
wyb_bonus = #{wybBonus,jdbcType=DOUBLE}
|
||||
where wyb_id = #{wybId,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<select id="findByYear" parameterType="int" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from working_years_bonus where wyb_year = #{wybYear,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue