ysh 3 年之前
父节点
当前提交
24ff845601

+ 3 - 3
jeecg-boot-module-demo/src/main/java/org/jeecg/modules/geke/attendance/entity/Attendance.java

@@ -37,9 +37,9 @@ public class Attendance {
     @ApiModelProperty(value = "用户id")
 	private java.lang.String userId;
 	/**用户签到时间*/
-	@Excel(name = "用户签到时间", width = 20, format = "HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "HH:mm:ss")
-    @DateTimeFormat(pattern="HH:mm:ss")
+	@Excel(name = "用户签到时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "用户签到时间")
 	private java.util.Date userDate;
 

+ 3 - 2
jeecg-boot-module-demo/target/classes/org/jeecg/modules/geke/salary/mapper/xml/SalaryMapper.xml

@@ -2,13 +2,14 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.geke.salary.mapper.SalaryMapper">
     <insert id="addSalaryByU8">
-        insert into geke_gz_body(header_id, sr_wages, sr_jx_wages,sr_bonus, sr_subsidy, sr_jb_wages, sr_quit,
+        insert into geke_gz_body(id,header_id, sr_wages, sr_jx_wages,sr_bonus, sr_subsidy, sr_jb_wages, sr_quit,
         sr_gd_bonus, sr_year_bonus, sr_other, kk_lack, kk_other, gr_pension, gr_cause, gr_medical, gr_fund,
         gs_pension, gs_cause, gs_fund, gs_injury, gs_birth, sd_personal, sd_bonus, sd_other, yingfa, shifa,
         wages_date, create_by, create_time, update_by, update_time, gs_medical, user_id,kq_wages,kq_count,bj_count
         ,jb_count,sr_gw_wages) VALUES
         <foreach collection="list" item="item" index="index" separator=",">
-            (#{item.headerId},
+            (#{item.id},
+             #{item.headerId},
              #{item.srWages},
              #{item.srJxWages},
              #{item.srBonus},

+ 12 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java

@@ -123,9 +123,18 @@ public class SysDepartController {
 	public Result<List<SysDepartTreeModel>> queryTreeList2() {
 		Result<List<SysDepartTreeModel>> result = new Result<>();
 		try {
-			List<SysDepartTreeModel> list = sysDepartService.queryTreeList2();
-			result.setResult(list);
-			result.setSuccess(true);
+			LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+			if(oConvertUtils.isNotEmpty(user.getUserIdentity()) && user.getUserIdentity().equals( CommonConstant.USER_IDENTITY_2 )){
+				List<SysDepartTreeModel> list = sysDepartService.queryTreeList2();
+				result.setResult(list);
+				result.setMessage(CommonConstant.USER_IDENTITY_2.toString());
+				result.setSuccess(true);
+			}else{
+				result.setMessage(CommonConstant.USER_IDENTITY_1.toString());
+				result.setSuccess(true);
+			}
+
 		} catch (Exception e) {
 			log.error(e.getMessage(),e);
 		}

+ 3 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysDictItemMapper.java

@@ -17,4 +17,7 @@ import java.util.List;
 public interface SysDictItemMapper extends BaseMapper<SysDictItem> {
     @Select("SELECT * FROM sys_dict_item WHERE DICT_ID = #{mainId} order by sort_order asc, item_value asc")
     public List<SysDictItem> selectItemsByMainId(String mainId);
+
+    @Select("select b.item_Text,b.item_Value from sys_dict a left join sys_dict_item b on a.id = b.DICT_ID where a.del_flag='0' and dict_code=#{mainCode} ")
+    public List<SysDictItem> selectItemsByMainCode(String mainCode);
 }

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/ISysDictItemService.java

@@ -15,4 +15,6 @@ import java.util.List;
  */
 public interface ISysDictItemService extends IService<SysDictItem> {
     public List<SysDictItem> selectItemsByMainId(String mainId);
+
+    public List<SysDictItem> selectItemsByMainCode(String mainCode);
 }

+ 20 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java

@@ -54,6 +54,8 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
 	private  SysDepartMapper sysDepartMapper;
 	@Autowired
 	private  SysUserServiceImpl sysUserServiceImpl;
+	@Autowired
+	private  SysDictItemMapper sysDictItemMapper;
 
 	@Override
 	public List<SysDepartTreeModel> queryMyDeptTreeList(String departIds) {
@@ -104,20 +106,38 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
 		query.eq(SysDepart::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
 		query.orderByAsc(SysDepart::getDepartOrder);
 		List<SysDepart> list = this.list(query);
+		int aa = 1;
+		for(SysDepart o:list){
+			aa++;
+			o.setDepartName(o.getDepartName()+" ("+aa+"/81)");
+		}
+		//获取人员类型
+		List<SysDictItem> dictList = sysDictItemMapper.selectItemsByMainCode("category");
 
 		LambdaQueryWrapper<SysUser> query1 = new LambdaQueryWrapper<SysUser>();
 		query1.eq(SysUser::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
 		List<SysUser> list1 = sysUserServiceImpl.list(query1);
 		List<SysDepart> list3 = new ArrayList<SysDepart>();
+
 		for(SysUser o:list1){
 			if(o.getDepartIds() != null){
 				String[] dep = o.getDepartIds().split(",");
 				for(String a:dep){
+
 					SysDepart sysDepart = new SysDepart();
 					sysDepart.setId(o.getId());
 					sysDepart.setParentId(a);
 					sysDepart.setDepartName(o.getRealname());
+
+					for(SysDictItem i:dictList){
+
+						if(o.getCategory() != null && i.getItemValue().equals(o.getCategory().toString())){
+							sysDepart.setOrgCode(i.getItemValue());
+							sysDepart.setOrgType(i.getItemText());
+						}
+					}
 					list3.add(sysDepart);
+
 				}
 			}
 		}

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDictItemServiceImpl.java

@@ -27,4 +27,9 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
     public List<SysDictItem> selectItemsByMainId(String mainId) {
         return sysDictItemMapper.selectItemsByMainId(mainId);
     }
+
+    @Override
+    public List<SysDictItem> selectItemsByMainCode(String mainCode) {
+        return sysDictItemMapper.selectItemsByMainCode(mainCode);
+    }
 }

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

@@ -64,6 +64,26 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 //		 shiftService.getMap(query);
 //	 }
 
+
+	 ////人员考勤页面,1付薪,2累计调休,3忽略
+	 @RequestMapping(value = "/fuXinInfo", method = RequestMethod.PUT)
+	 public String fuXinInfo(@RequestBody JSONObject jsonObject) throws ParseException {
+		 String viewDate = jsonObject.get("viewDate").toString();
+		 String st = jsonObject.get("st").toString();
+		 String userId = jsonObject.get("userId").toString();
+			if(st.equals("1")){
+				st = "付薪";
+			}else if(st.equals("2")){
+				st = "累计调休";
+			}else{
+				st = "忽略";
+			}
+
+		 viewClockInService.fuXinInfo(st,userId,viewDate);
+
+		 return "设置成功";
+	 }
+
 	 @RequestMapping(value = "/jiaozhun", method = RequestMethod.PUT)
 	 public String jiaozhun(@RequestBody JSONObject jsonObject) throws ParseException {
 
@@ -136,9 +156,18 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 								   @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>();
+
+		if(userName != null && userName != ""){
+			query.eq(ViewClockIn::getRealname,userName);//姓名
+		}
+		if(mDate != null && mDate != ""){
+			query.eq(ViewClockIn::getHeadMonth,mDate);//月份
+		}
+
 		if(viewClockIn.getRealname() != null && viewClockIn.getRealname() != ""){
 			query.like(ViewClockIn::getRealname,viewClockIn.getRealname());//姓名
 		}

+ 18 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/viewClockIn/entity/ViewClockIn.java

@@ -60,11 +60,12 @@ public class ViewClockIn {
 	 * 班次中的下班时间
 	 */
 	private String shiftRealTimeX;
-	/**latetimeS*/
+
+	/**latetimeS 实际上班打卡时间 与 要求上班时间相差的分钟数,为负数,则表示打卡时间比上班时间晚,正数则表示比上班时间早 */
 	@Excel(name = "迟到分钟数", width = 15)
     @ApiModelProperty(value = "latetimeS")
 	private Integer latetimeS;
-	/**latetimeX*/
+	/**早退分钟数 实际下班打卡时间 与 要求下班时间相差的分钟数,为负数,则表示打卡时间比下班时间晚,正数则表示比下班时间早 */
 	@Excel(name = "早退分钟数", width = 15)
     @ApiModelProperty(value = "latetimeX")
 	private Integer latetimeX;
@@ -76,6 +77,16 @@ public class ViewClockIn {
     @ApiModelProperty(value = "viewDate")
 	private String viewDate;
 
+	/**月份 2021-12*/
+	@Excel(name = "月份", width = 15)
+    @ApiModelProperty(value = "headMonth")
+	private String headMonth;
+
+	/**weekDate*/
+	@Excel(name = "星期", width = 15)
+    @ApiModelProperty(value = "weekDate")
+	private String weekDate;
+
 	/**gotoTime*/
 	@Excel(name = "上班打卡时间", width = 15)
     @ApiModelProperty(value = "gotoTime")
@@ -134,4 +145,9 @@ public class ViewClockIn {
 	 */
 	private String departIds;
 
+	/**
+	 * 1付薪,2累计调休,3忽略
+	 */
+	private String setInfo;
+
 }

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

@@ -13,5 +13,6 @@ import java.util.List;
  */
 public interface viewClockInMapper extends BaseMapper<ViewClockIn> {
 
+    int fuXinInfo(String st,String userId,String viewDate);
 
 }

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

@@ -2,4 +2,9 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.viewClockIn.mapper.viewClockInMapper">
 
+    <update id="fuXinInfo">
+        update geke_attendance set set_info = #{st}
+        where user_id =#{userId} and date_format( user_date, '%Y-%m-%d' ) = #{viewDate}
+
+    </update>
 </mapper>

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

@@ -3,8 +3,6 @@ package org.jeecg.modules.viewClockIn.service;
 import org.jeecg.modules.viewClockIn.entity.ViewClockIn;
 import com.baomidou.mybatisplus.extension.service.IService;
 
-import java.util.List;
-
 /**
  * @Description: 员工考勤日报
  * @Author: jeecg-boot
@@ -13,4 +11,5 @@ import java.util.List;
  */
 public interface IviewClockInService extends IService<ViewClockIn> {
 
+    public int fuXinInfo(String st, String userId, String viewDate);
 }

+ 6 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/viewClockIn/service/impl/viewClockInServiceImpl.java

@@ -8,8 +8,6 @@ import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
-import java.util.List;
-
 /**
  * @Description: 员工考勤日报
  * @Author: jeecg-boot
@@ -19,5 +17,11 @@ import java.util.List;
 @Service
 public class viewClockInServiceImpl extends ServiceImpl<viewClockInMapper, ViewClockIn> implements IviewClockInService {
 
+    @Autowired
+    private viewClockInMapper viewClockInMapper1;
+
+    public int fuXinInfo(String st,String userId,String viewDate) {
+        return viewClockInMapper1.fuXinInfo(st,userId,viewDate);
+    }
 
 }