|
@@ -76,6 +76,76 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
|
|
|
@Autowired
|
|
|
private IStatutoryLeaveService statutoryLeaveService;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ * 批量人员考勤页面,1付薪,2累计调休,3忽略
|
|
|
+ * @param jsonObject
|
|
|
+ * @return
|
|
|
+ * @throws ParseException
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/handleInfo", method = RequestMethod.PUT)
|
|
|
+ public Result<?> handleInfo(@RequestBody JSONObject jsonObject) throws ParseException {
|
|
|
+ String viewDates = jsonObject.getString("viewDate");
|
|
|
+ String username = jsonObject.getString("username");
|
|
|
+ String st = jsonObject.getString("st");
|
|
|
+ String[] viewDateArr = viewDates.split(",");
|
|
|
+ if(StringUtil.isNullOrEmpty(viewDates)){
|
|
|
+ return Result.error("您没有选择任何数据");
|
|
|
+ }
|
|
|
+ if(StringUtil.isNullOrEmpty(username)){
|
|
|
+ return Result.error("您没有选择任何数据");
|
|
|
+ }
|
|
|
+ if(viewDateArr.length < 1){
|
|
|
+ return Result.error("您没有选择任何数据");
|
|
|
+ }
|
|
|
+ if(!bdClockinMonthService.ifClose(viewDateArr[0])){
|
|
|
+ return Result.error("当前月份已关账,无法此操作");
|
|
|
+ }
|
|
|
+ SysUser sysUser = iSysUserService.getUserByName(username);
|
|
|
+ if(sysUser != null){
|
|
|
+
|
|
|
+
|
|
|
+ int userType = sysUser.getCategory();
|
|
|
+ if(userType != 101 && userType != 103 && userType != 104){
|
|
|
+ DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+
|
|
|
+ List<StatutoryLeave> list = statutoryLeaveService.list();
|
|
|
+ for(String a:viewDateArr){
|
|
|
+
|
|
|
+ for(StatutoryLeave o:list){
|
|
|
+ if(o.getType().equals("1")){
|
|
|
+ Date begin = o.getStartDate();
|
|
|
+ Date end = o.getEndDate();
|
|
|
+ if(!isEffectiveDate(sdf.parse(a),begin,end) ){
|
|
|
+ return Result.error("当前用户的加班,只能用于累计调休");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ if(st.equals("1")){
|
|
|
+ st = "付薪";
|
|
|
+ }else if(st.equals("2")){
|
|
|
+ st = "累计调休";
|
|
|
+ }else{
|
|
|
+ st = "忽略";
|
|
|
+ }
|
|
|
+ for(String a:viewDateArr){
|
|
|
+
|
|
|
+ viewClockInService.fuXinInfo(st,username,a,sysUser.getUsername());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return Result.OK("OK");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
* 人员考勤页面,1付薪,2累计调休,3忽略
|
|
|
* @param jsonObject
|
|
@@ -90,13 +160,8 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
|
|
|
String userId = jsonObject.get("userId").toString();
|
|
|
SysUser sysUser = iSysUserService.getUserByName(userId);
|
|
|
if(sysUser != null){
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
int userType = sysUser.getCategory();
|
|
|
if(userType != 101 && userType != 103 && userType != 104){
|
|
|
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
@@ -466,12 +531,22 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
|
|
|
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("FIND_IN_SET({0},depart_ids)", viewClockIn.getDepartIds());
|
|
|
+ }
|
|
|
if(viewClockIn.getWorkNo() != null && viewClockIn.getWorkNo() != ""){
|
|
|
query.eq(ViewClockIn::getWorkNo,viewClockIn.getWorkNo());
|
|
|
}
|