考勤系统迁移
parent
ea06236cf9
commit
b29e602186
|
@ -50,7 +50,26 @@ public class AttendanceCfg extends BaseEntity
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
private Long deptId;
|
||||
private String deptName;
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<resultMap type="AttendanceCfg" id="AttendanceCfgResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="vendorsCode" column="vendors_code" />
|
||||
<result property="vendorsParameter" column="vendors_parameter" />
|
||||
|
@ -19,16 +20,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="compName" column="comp_name"/>
|
||||
<result property="deptName" column="dept_name"/>
|
||||
<result property="projectName" column="project_name"/>
|
||||
<result property="vendorsName" column="vendors_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAttendanceCfgVo">
|
||||
SELECT ac.id, ac.com_id, ac.project_id, ac.vendors_code, ac.vendors_parameter, ac.enabled, ac.state, ac.remark, ac.is_del, ac.create_by, ac.create_time, ac.update_by
|
||||
, ac.update_time,dp.`dept_name` comp_name,pp.`project_name`,dic.`dict_label` vendors_name
|
||||
, ac.update_time,dp.`dept_name` comp_name,pp.`project_name`,dic.`dict_label` vendors_name,sd.sub_dept_name dept_name,ac.dept_id
|
||||
FROM attendance_cfg ac
|
||||
LEFT JOIN sys_dept dp ON ac.`com_id`=dp.`dept_id`
|
||||
LEFT JOIN pro_project_info pp ON ac.`project_id`=pp.`id`
|
||||
left join pro_project_info_subdepts sd on ac.dept_id=sd.id
|
||||
LEFT JOIN sys_dict_data dic ON ac.`vendors_code`=dic.`dict_value` AND dic.`dict_type`='attendance_vendors'
|
||||
</sql>
|
||||
|
||||
|
@ -54,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
insert into attendance_cfg
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="vendorsCode != null">vendors_code,</if>
|
||||
<if test="vendorsParameter != null">vendors_parameter,</if>
|
||||
|
@ -68,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="vendorsCode != null">#{vendorsCode},</if>
|
||||
<if test="vendorsParameter != null">#{vendorsParameter},</if>
|
||||
|
@ -86,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update attendance_cfg
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="vendorsCode != null">vendors_code = #{vendorsCode},</if>
|
||||
<if test="vendorsParameter != null">vendors_parameter = #{vendorsParameter},</if>
|
||||
|
|
|
@ -43,6 +43,26 @@ public class QuartzProjectAttendanceCfg extends BaseEntity
|
|||
@Excel(name = "状态")
|
||||
private Long state;
|
||||
|
||||
private Long deptId;
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
private String deptName;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long isDel;
|
||||
|
|
|
@ -234,9 +234,9 @@ public class QuartzProjectAttendanceDataServiceImpl implements IQuartzProjectAtt
|
|||
}
|
||||
QuartzProjectAttendanceCfg cfg=cfgList.get(0);
|
||||
sdata.setProjectId(cfg.getProjectId());
|
||||
sdata.setDeptId(cfg.getComId());
|
||||
sdata.setDeptId(cfg.getDeptId());
|
||||
sdata.setProjectName(cfg.getProjectName());
|
||||
sdata.setDeptName(cfg.getCompName());
|
||||
sdata.setDeptName(cfg.getDeptName());
|
||||
if(sdata.getCompanyTypeId()==null){
|
||||
sdata.setCompanyTypeId("0");
|
||||
}
|
||||
|
@ -471,7 +471,7 @@ public class QuartzProjectAttendanceDataServiceImpl implements IQuartzProjectAtt
|
|||
}
|
||||
QuartzProjectAttendanceCfg cfg=cfgList.get(0);
|
||||
sdata.setProjectId(cfg.getProjectId());
|
||||
sdata.setDeptId(cfg.getSubDeptId());
|
||||
sdata.setDeptId(cfg.getDeptId());
|
||||
sdata.setProjectName(cfg.getProjectName());
|
||||
sdata.setDeptName(cfg.getDeptName());
|
||||
if(sdata.getCompanyTypeId()==null){
|
||||
|
|
|
@ -217,7 +217,7 @@ public class QuartzProjectAttendanceUserServiceImpl implements IQuartzProjectAtt
|
|||
public long countAttendance(QuartzProjectAttendanceUser user) {
|
||||
QuartzProjectAttendanceCfg where=new QuartzProjectAttendanceCfg();
|
||||
where.setCreateBy(user.getCreateBy());
|
||||
where.setSubDeptId(user.getSubDeptId());
|
||||
where.setDeptId(user.getSubDeptId());
|
||||
where.setProjectId(user.getProjectId());
|
||||
return quartzProjectAttendanceUserMapper.countAttendance(where);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="id" column="id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="vendorsCode" column="vendors_code" />
|
||||
<result property="vendorsParameter" column="vendors_parameter" />
|
||||
<result property="enabled" column="enabled" />
|
||||
|
@ -19,16 +20,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="compName" column="comp_name"/>
|
||||
<result property="deptName" column="dept_name"/>
|
||||
<result property="projectName" column="project_name"/>
|
||||
<result property="vendorsName" column="vendors_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAttendanceCfgVo">
|
||||
SELECT ac.id, ac.com_id, ac.project_id, ac.vendors_code, ac.vendors_parameter, ac.enabled, ac.state, ac.remark, ac.is_del, ac.create_by, ac.create_time, ac.update_by
|
||||
, ac.update_time,dp.`dept_name` comp_name,pp.`project_name`,dic.`dict_label` vendors_name
|
||||
, ac.update_time,dp.`dept_name` comp_name,pp.`project_name`,dic.`dict_label` vendors_name,sd.sub_dept_name dept_name,ac.dept_id
|
||||
FROM attendance_cfg ac
|
||||
LEFT JOIN sys_dept dp ON ac.`com_id`=dp.`dept_id`
|
||||
LEFT JOIN pro_project_info pp ON ac.`project_id`=pp.`id`
|
||||
left join pro_project_info_subdepts sd on ac.dept_id=sd.id
|
||||
LEFT JOIN sys_dict_data dic ON ac.`vendors_code`=dic.`dict_value` AND dic.`dict_type`='attendance_vendors'
|
||||
</sql>
|
||||
|
||||
|
|
|
@ -499,7 +499,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where u.cfgid=c.id and u.state=0 and u.companyId=g.companyId
|
||||
and u.workerid in(
|
||||
SELECT workerid FROM sur_project_attendance_data WHERE DATE(attendance_time)=date(#{createBy}) AND cfgid IN (
|
||||
SELECT id FROM sur_project_attendance_cfg WHERE project_id=#{projectId} AND sub_dept_id=#{subDeptId}
|
||||
SELECT id FROM sur_project_attendance_cfg WHERE project_id=#{projectId} AND sub_dept_id=#{deptId}
|
||||
) group by workerid
|
||||
)
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue