|
@@ -25,6 +25,7 @@ import org.jeecg.modules.geke.shift.entity.Shift;
|
|
|
import org.jeecg.modules.geke.shift.service.IShiftService;
|
|
|
import org.jeecg.modules.geke.statutoryleave.entity.StatutoryLeave;
|
|
|
import org.jeecg.modules.geke.statutoryleave.service.IStatutoryLeaveService;
|
|
|
+import org.jeecg.modules.quartz.entity.QuartzJob;
|
|
|
import org.jeecg.modules.system.entity.SysDepart;
|
|
|
import org.jeecg.modules.system.entity.SysUser;
|
|
|
import org.jeecg.modules.system.service.ISysUserService;
|
|
@@ -88,6 +89,7 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
|
|
|
*/
|
|
|
@RequestMapping(value = "/handleInfo", method = RequestMethod.PUT)
|
|
|
public Result<?> handleInfo(@RequestBody JSONObject jsonObject) throws ParseException {
|
|
|
+ String multiple = jsonObject.getString("multiple");
|
|
|
String viewDates = jsonObject.getString("viewDate");
|
|
|
String username = jsonObject.getString("username");
|
|
|
String st = jsonObject.getString("st");
|
|
@@ -135,9 +137,10 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
|
|
|
}else{
|
|
|
st = "忽略";
|
|
|
}
|
|
|
+ LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
for(String a:viewDateArr){
|
|
|
|
|
|
- viewClockInService.fuXinInfo(st,username,a,sysUser.getUsername());
|
|
|
+ viewClockInService.fuXinInfo(multiple,st,username,a,user.getUsername());
|
|
|
|
|
|
}
|
|
|
|
|
@@ -158,36 +161,37 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
|
|
|
@RequestMapping(value = "/fuXinInfo", method = RequestMethod.PUT)
|
|
|
public Result<?> fuXinInfo(@RequestBody JSONObject jsonObject) throws ParseException {
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ String multiple = jsonObject.get("multiple").toString();
|
|
|
String st = jsonObject.get("st").toString();
|
|
|
String w = jsonObject.get("w").toString();
|
|
|
String userId = jsonObject.get("userId").toString();
|
|
|
- SysUser sysUser = iSysUserService.getUserByName(userId);
|
|
|
- if(sysUser != null){
|
|
|
- //正式工 101 实习生 103 劳务工 104 劳务外包5+2 105 劳务外包6+1 106 顾问 102
|
|
|
- //员工为正式,实习,劳务加班付薪时,如果没匹配到工资倍数,则默认两倍;匹配到工资倍数则按照倍数算薪;其他员工除非能匹配到工资倍数,否则不能付薪只能调休
|
|
|
- int userType = sysUser.getCategory();
|
|
|
- if(userType != 101 && userType != 103 && userType != 104){
|
|
|
- DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- String thisDate = null;
|
|
|
- if(w.equals("1")){
|
|
|
- thisDate = jsonObject.get("viewDate1").toString();
|
|
|
- }else{
|
|
|
- thisDate = jsonObject.get("viewDate").toString();
|
|
|
- }
|
|
|
- List<StatutoryLeave> list = statutoryLeaveService.list();
|
|
|
- for(StatutoryLeave o:list){
|
|
|
- if(o.getType().equals("1")){//班
|
|
|
- Date begin = o.getStartDate();
|
|
|
- Date end = o.getEndDate();
|
|
|
- if(!isEffectiveDate(sdf.parse(thisDate),begin,end) ){
|
|
|
- return Result.error("当前用户的加班,只能用于累计调休");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+// SysUser sysUser = iSysUserService.getUserByName(userId);
|
|
|
+// if(sysUser != null){
|
|
|
+// //正式工 101 实习生 103 劳务工 104 劳务外包5+2 105 劳务外包6+1 106 顾问 102
|
|
|
+// //员工为正式,实习,劳务加班付薪时,如果没匹配到工资倍数,则默认两倍;匹配到工资倍数则按照倍数算薪;其他员工除非能匹配到工资倍数,否则不能付薪只能调休
|
|
|
+// int userType = sysUser.getCategory();
|
|
|
+// if(userType != 101 && userType != 103 && userType != 104){
|
|
|
+// DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+// String thisDate = null;
|
|
|
+// if(w.equals("1")){
|
|
|
+// thisDate = jsonObject.get("viewDate1").toString();
|
|
|
+// }else{
|
|
|
+// thisDate = jsonObject.get("viewDate").toString();
|
|
|
+// }
|
|
|
+// List<StatutoryLeave> list = statutoryLeaveService.list();
|
|
|
+// for(StatutoryLeave o:list){
|
|
|
+// if(o.getType().equals("1")){//班
|
|
|
+// Date begin = o.getStartDate();
|
|
|
+// Date end = o.getEndDate();
|
|
|
+// if(!isEffectiveDate(sdf.parse(thisDate),begin,end) ){
|
|
|
+// return Result.error("当前用户的加班,只能用于累计调休");
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
if(st.equals("1")){
|
|
|
st = "付薪";
|
|
|
}else if(st.equals("2")){
|
|
@@ -204,7 +208,7 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
|
|
|
if(!bdClockinMonthService.ifClose(viewDate1)){
|
|
|
return Result.error("当前月份已关账,无法此操作");
|
|
|
}
|
|
|
- viewClockInService.updateOvertime(st,pkId,user.getUsername());
|
|
|
+ viewClockInService.updateOvertime(multiple,st,pkId,user.getUsername());
|
|
|
}else{
|
|
|
|
|
|
String viewDate = jsonObject.get("viewDate").toString();
|
|
@@ -213,7 +217,7 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
|
|
|
if(!bdClockinMonthService.ifClose(viewDate)){
|
|
|
return Result.error("当前月份已关账,无法此操作");
|
|
|
}
|
|
|
- viewClockInService.fuXinInfo(st,userId,viewDate,user.getUsername());
|
|
|
+ viewClockInService.fuXinInfo(multiple,st,userId,viewDate,user.getUsername());
|
|
|
}
|
|
|
|
|
|
return Result.OK("true");
|
|
@@ -456,7 +460,7 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
|
|
|
* @param req
|
|
|
* @return
|
|
|
*/
|
|
|
- @AutoLog(value = "员工考勤日报-分页列表查询")
|
|
|
+// @AutoLog(value = "员工考勤信息,点击左侧树形菜单时调用")
|
|
|
@ApiOperation(value="员工考勤日报-分页列表查询", notes="员工考勤日报-分页列表查询")
|
|
|
@GetMapping(value = "/list")
|
|
|
public Result<?> queryPageList(ViewClockIn viewClockIn,
|
|
@@ -513,7 +517,80 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
|
|
|
IPage<ViewClockIn> pageList = viewClockInService.page(page, query);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页列表查询
|
|
|
+ *
|
|
|
+ * @param viewClockIn
|
|
|
+ * @param pageNo
|
|
|
+ * @param pageSize
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "员工考勤日报-分页列表查询")
|
|
|
+ @ApiOperation(value="员工考勤日报-分页列表查询", notes="员工考勤日报-分页列表查询")
|
|
|
+ @GetMapping(value = "/list1")
|
|
|
+ public Result<?> queryPageList1(ViewClockIn viewClockIn,
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
+ @RequestParam(name="beginViewDate", defaultValue="1") String beginViewDate,
|
|
|
+ @RequestParam(name="endViewDate", defaultValue="1") String endViewDate,
|
|
|
+ String userName,String mDate,
|
|
|
+ HttpServletRequest req) {
|
|
|
+
|
|
|
+// LambdaQueryWrapper<ViewClockIn> query = new LambdaQueryWrapper<ViewClockIn>();
|
|
|
+ String dpet = viewClockIn.getDepartIds();
|
|
|
+ viewClockIn.setDepartIds(null);
|
|
|
+ QueryWrapper<ViewClockIn> query = QueryGenerator.initQueryWrapper(viewClockIn, req.getParameterMap());
|
|
|
+// if(userName != null && userName != ""){
|
|
|
+// String[] s = userName.split("(");
|
|
|
+// query.eq(ViewClockIn::getRealname,s[0]);//姓名
|
|
|
+// }
|
|
|
+// if(mDate != null && mDate != ""){
|
|
|
+// query.eq(ViewClockIn::getHeadMonth,mDate);//月份
|
|
|
+// }
|
|
|
+
|
|
|
+// if(viewClockIn.getDuration() != null && viewClockIn.getDuration() != ""){
|
|
|
+// query.isNotNull(ViewClockIn::getDuration);//加班信息
|
|
|
+// }
|
|
|
+// if(viewClockIn.getShowState() != null && viewClockIn.getShowState() != ""){
|
|
|
+// query.like(ViewClockIn::getShowState,viewClockIn.getShowState());//异常状态
|
|
|
+// }
|
|
|
+// if(viewClockIn.getRealname() != null && viewClockIn.getRealname() != ""){
|
|
|
+// query.like(ViewClockIn::getRealname,viewClockIn.getRealname());//姓名
|
|
|
+// }
|
|
|
+// if(viewClockIn.getDepartNames() != null && viewClockIn.getDepartNames() != ""){
|
|
|
+// query.like(ViewClockIn::getDepartNames,viewClockIn.getDepartNames());//部门
|
|
|
+// }
|
|
|
+// if(viewClockIn.getDepartIds() != null && viewClockIn.getDepartIds() != ""){
|
|
|
+//// query.apply("org_code"+" like {0}", viewClockIn.getDepartIds()+"%");
|
|
|
+// query.apply("FIND_IN_SET({0},depart_ids)", viewClockIn.getDepartIds());
|
|
|
+// }
|
|
|
+// if(viewClockIn.getWorkNo() != null && viewClockIn.getWorkNo() != ""){
|
|
|
+// query.eq(ViewClockIn::getWorkNo,viewClockIn.getWorkNo());//工号
|
|
|
+// }
|
|
|
+// if(viewClockIn.getName() != null && viewClockIn.getName() != ""){
|
|
|
+// query.eq(ViewClockIn::getName,viewClockIn.getName());//班次
|
|
|
+// }
|
|
|
+// if(viewClockIn.getViewDate() != null && viewClockIn.getViewDate() != ""){
|
|
|
+// query.eq(ViewClockIn::getViewDate,viewClockIn.getViewDate());//日期
|
|
|
+// }
|
|
|
+ if(dpet != null && dpet != ""){
|
|
|
+// query.apply("org_code"+" like {0}", viewClockIn.getDepartIds()+"%");
|
|
|
+ query.apply("FIND_IN_SET({0},depart_ids)",dpet);
|
|
|
+ }
|
|
|
+ if(beginViewDate != null && beginViewDate != "" && !beginViewDate.equals("1")){
|
|
|
+ query.between("view_Date",beginViewDate,endViewDate);
|
|
|
+ }
|
|
|
+ if(beginViewDate.equals("1") && mDate == null && viewClockIn.getViewDate() == null){
|
|
|
+ query.eq("head_Month",DateUtils.getNYTime());//月份
|
|
|
+ }
|
|
|
+// query.orderByAsc(ViewClockIn::getViewDate);
|
|
|
+ Page<ViewClockIn> page = new Page<ViewClockIn>(pageNo, pageSize);
|
|
|
+ IPage<ViewClockIn> pageList = viewClockInService.page(page, query);
|
|
|
+ return Result.OK(pageList);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 添加
|
|
|
*
|