ysh 2 năm trước cách đây
mục cha
commit
0e7ffbb224

+ 1 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/viewClockIn/controller/bdClockinMonthController.java

@@ -80,6 +80,7 @@ public class bdClockinMonthController extends JeecgController<bdClockinMonth, Ib
 	  * @return
 	  * @throws ParseException
 	  */
+	 @AutoLog(value = "考勤月报closeDate-系统关账")
 	 @RequestMapping(value = "/closeDate", method = RequestMethod.PUT)
 	 public Result<?> closeDate(@RequestBody JSONObject jsonObject) throws ParseException {
 		 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();

+ 14 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/viewClockIn/controller/viewClockInController.java

@@ -87,6 +87,7 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 	  * @return
 	  * @throws ParseException
 	  */
+	 @AutoLog(value = "员工考勤信息handleInfo-1付薪,2累计调休,3忽略")
 	 @RequestMapping(value = "/handleInfo", method = RequestMethod.PUT)
 	 public Result<?> handleInfo(@RequestBody JSONObject jsonObject) throws ParseException {
 		String multiple = jsonObject.getString("multiple");
@@ -158,6 +159,7 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 	  * @return
 	  * @throws ParseException
 	  */
+	 @AutoLog(value = "员工考勤信息fuXinInfo-1付薪,2累计调休,3忽略")
 	 @RequestMapping(value = "/fuXinInfo", method = RequestMethod.PUT)
 	 public Result<?> fuXinInfo(@RequestBody JSONObject jsonObject) throws ParseException {
 		 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -229,6 +231,7 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 	  * @return
 	  * @throws ParseException
 	  */
+	 @AutoLog(value = "员工考勤信息errorInfo-异常信息校准")
 	 @RequestMapping(value = "/errorInfo", method = RequestMethod.PUT)
 	 public Result<?> errorInfo(@RequestBody JSONObject jsonObject) throws ParseException {
 		 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@@ -237,8 +240,16 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 		 if(!bdClockinMonthService.ifClose(viewDate)){
 			 return Result.error(viewDate+"当前月份已关账,无法此操作");
 		 }
+		 String deptCode = user.getOrgCode();
+		 String loginId = user.getId();
 
 		 String userId = jsonObject.get("userId").toString();//用户
+
+		 //二级部门负责人不能校准自己的考勤,需一级负责人校准
+		 if(deptCode.length() > 2 && userId.equals(loginId)){
+			 return Result.error("请等待本部门上级负责人进行校准");
+		 }
+
 		 BdErrorInfo bdErrorInfo = new BdErrorInfo();
 		 if(jsonObject.get("errorText")!= null){
 			 String errorText = jsonObject.get("errorText").toString();//忽略原因
@@ -343,6 +354,7 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 	  * @param jsonObject
 	  * @return
 	  */
+	 @AutoLog(value = "员工考勤信息syMonthReport-同步考勤月报至U8")
 	 @RequestMapping(value = "/syMonthReport", method = RequestMethod.PUT)
 	 public Result<?> syMonthReport(@RequestBody JSONObject jsonObject) {
 
@@ -374,6 +386,7 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 	  * @param jsonObject
 	  * @return
 	  */
+	 @AutoLog(value = "员工考勤信息monthReport-生成考勤月报")
 	 @RequestMapping(value = "/monthReport", method = RequestMethod.PUT)
 	 public Result<?> monthReport(@RequestBody JSONObject jsonObject) {
 
@@ -733,6 +746,7 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 	   * @param request
 	   * @param viewClockIn
 	   */
+	  @AutoLog(value = "员工考勤信息-exportXlsDay")
 	  @RequestMapping(value = "/exportXlsDay")
 	  public ModelAndView exportXlsDay(HttpServletRequest request, ExportClockDay viewClockIn) {
 //	  	  List<ExportClockInfo> list = viewClockInService.exportErrotInfo(userName,mDate,userType);

+ 8 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/viewClockIn/mapper/xml/viewClockInMapper.xml

@@ -160,6 +160,7 @@
         select b.username,b.depart_names from view_clock_in_1 b
         where DATE_FORMAT(b.view_date,'%Y-%m') = #{viewDate}
         and (b.employment_status = 10 or date_format(b.term_date,'%Y-%m') >= #{viewDate} or b.term_date is null )
+        and (date_format(b.entry_date,'%Y-%m') &lt;= #{viewDate} or b.entry_date is null )
         <!--and (
                 b.lateTime_s &lt; 0 or b.lateTime_x > 0
                 || (b.ifwork !=0 and attendance_Count &lt; 2 and b.name is not null)
@@ -168,8 +169,8 @@
           and (b.set_info > 0 ) and (b.error_State != 0 or b.error_State is null)
             )-->
        and (b.latetime_s &lt; 0 or b.latetime_x > 0 <!-- 是否迟到早退-->
-        or (b.rule_type = 1 and b.ifwork > 0 and b.attendance_count &lt; 2 and b.shift_real_time_s is not null) <!-- 固定班,需要打卡(固定班时休息日),打卡次数不足,当天有排班-->
-        or (b.rule_type = 1 and b.ifwork > 0 and b.shift_real_time_s is not null and b.goto_time is null) <!-- 固定班,需要打卡,当天有排班,没有打卡记录-->
+        or (b.rule_type = 1 and b.ifwork > 0 and b.attendance_count &lt; 2 and b.shift_real_time_s is not null and b.leave_type != 2) <!-- 固定班,需要打卡(固定班时休息日),打卡次数不足,当天有排班,且当天不是假期-->
+        or (b.rule_type = 1 and b.ifwork > 0 and b.shift_real_time_s is not null and b.goto_time is null and b.leave_type != 2) <!-- 固定班,需要打卡,当天有排班,没有打卡记录,且当天不是假期-->
         or (b.rule_type = 2 and b.attendance_count &lt; 2 and b.shift_real_time_s is not null) <!-- 班次上下班,需要打卡(固定班时休息日),打卡次数不足,当天有排班-->
         or (b.rule_type = 2 and b.shift_real_time_s is not null and b.goto_time is null) <!-- 班次上下班,需要打卡,当天有排班,没有打卡记录-->
         or (duration is not null and (work_overtime > 0 or work_overtime is null))  <!-- 有加班信息,打卡时间早于加班申请时间-->
@@ -208,8 +209,8 @@
                     )
         -->
                 and (b.latetime_s &lt; 0 or b.latetime_x > 0 <!-- 是否迟到早退-->
-                or (b.rule_type = 1 and b.ifwork > 0 and b.attendance_count &lt; 2 and b.shift_real_time_s is not null) <!-- 固定班,需要打卡(固定班时休息日),打卡次数不足,当天有排班-->
-                or (b.rule_type = 1 and b.ifwork > 0 and b.shift_real_time_s is not null and b.goto_time is null) <!-- 固定班,需要打卡,当天有排班,没有打卡记录-->
+                or (b.rule_type = 1 and b.ifwork > 0 and b.attendance_count &lt; 2 and b.shift_real_time_s is not null and b.leave_type != 2) <!-- 固定班,需要打卡(固定班时休息日),打卡次数不足,当天有排班-->
+                or (b.rule_type = 1 and b.ifwork > 0 and b.shift_real_time_s is not null and b.goto_time is null and b.leave_type != 2) <!-- 固定班,需要打卡,当天有排班,没有打卡记录-->
                 or (b.rule_type = 2 and b.attendance_count &lt; 2 and b.shift_real_time_s is not null) <!-- 班次上下班,需要打卡(固定班时休息日),打卡次数不足,当天有排班-->
                 or (b.rule_type = 2 and b.shift_real_time_s is not null and b.goto_time is null) <!-- 班次上下班,需要打卡,当天有排班,没有打卡记录-->
                 or (duration is not null and (work_overtime > 0 or work_overtime is null))  <!-- 有加班信息,打卡时间早于加班申请时间-->
@@ -217,6 +218,9 @@
 
                 and b.set_info > 0 ) and b.error_state is null
                 and b.holiday_type is null -- 请假信息(有值时表示当天有请假记录)
+
+                and (date_format(b.entry_date,'%Y-%m') &lt;= #{viewDate} or b.entry_date is null ) -- 离职人员和没入职人员过滤掉
+
                 group by b.username
             ) B on a.id = b.user_id
 

+ 6 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/viewClockIn/service/IviewClockInService.java

@@ -17,6 +17,12 @@ import java.util.Map;
  */
 public interface IviewClockInService extends IService<ViewClockIn> {
 
+    /**
+     * 暂未使用
+     * @param page
+     * @param map
+     * @return
+     */
     Page<ViewClockIn> selectByPage(Page<ViewClockIn> page, Map<String,String> map);
 
     public int fuXinInfo(String multiple, String st, String userId, String viewDate,String username);