Commit bf0abf9c by Administrator

Merge branch 'lal' into 'develop'

Lal

See merge request 8timerv2/8timerapiv200!88
parents cb98fecd 83f9450c
......@@ -47,7 +47,7 @@ public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
private Integer leaveType;
@ApiModelProperty(value = "适用范围 ", example = "0:全公司 >0:考勤组id")
private String apply;
private Integer apply;
@ApiModelProperty(value = "创建时间 创建时间", example = "101")
private Long createTime;
......@@ -64,4 +64,6 @@ public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
@ApiModelProperty(value = "假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)", example = "101")
private Integer leaveBalance;
}
\ No newline at end of file
......@@ -40,8 +40,8 @@ public class KqglAssoOvertimeRules extends Model<KqglAssoOvertimeRules> {
@ApiModelProperty(value = "规则名称 ", example = "以审批时间计算加班")
private String name;
@ApiModelProperty(value = "应用范围", example = "1")
private String appliedScope;
@ApiModelProperty(value = "应用范围", example = "(0:全公司 >0:考勤组id)")
private Integer appliedScope;
@ApiModelProperty(value = "工作日是否允许加班 0:否;1:是", example = "1")
private Integer isWorkovertime;
......
package cn.timer.api.bean.kqmk;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author LAL 2020-05-12
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_yhkqz")
@ApiModel("用户和考勤组关系表")
public class KqglAssoYhkqz extends Model<KqglAssoYhkqz> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "考勤组id 考勤组id", example = "101")
private Integer kqzid;
@ApiModelProperty(value = "用户id 用户id", example = "101")
private Integer userid;
@ApiModelProperty(value = "企业id 企业id", example = "101")
private Integer qyid;
}
\ No newline at end of file
......@@ -94,4 +94,7 @@ public class KqglMainKqz extends Model<KqglMainKqz> {
@ApiModelProperty(value = "外勤 外勤", example = "101")
private Integer isWq;
@ApiModelProperty(value="加班规则 加班规则",example="101")
private Integer overtimeRulesId;
}
\ No newline at end of file
......@@ -19,7 +19,7 @@ public class InitializeSetting implements ApplicationRunner {
@Override
public void run(ApplicationArguments args) throws Exception {
StaticVariable.mac_command = "http://192.168.3.143:8088/cmd";//考勤机执行命令
StaticVariable.mac_command = "http://120.24.24.239:8095/cmd";//考勤机执行命令
}
}
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoYhkqz;
/**
* 用户和考勤组关系表
*
* @author LAL 2020-05-12
*/
@Repository
public interface KqglAssoYhkqzMapper extends BaseMapper<KqglAssoYhkqz> {
}
......@@ -2,11 +2,14 @@ package cn.timer.api.dao.kqmk;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.kqmk.KqglMainKqz;
import cn.timer.api.dto.kqmk.AttqueryCriteriaDto;
import cn.timer.api.dto.kqmk.KqglMainKqzDto;
/**
......@@ -20,4 +23,7 @@ public interface KqglMainKqzMapper extends BaseMapper<KqglMainKqz> {
List<KqglMainKqzDto> selectAttGroupMachineByQyid(int qyid);
KqglMainKqz getAttendanceGroupInformationByUserid(int userid,int qyid);
IPage<KqglMainKqzDto> selectPageByQueryKqglMain(IPage<KqglMainKqzDto> page,@Param("param") AttqueryCriteriaDto attquerycriteriadto);
}
......@@ -14,7 +14,7 @@ import lombok.NoArgsConstructor;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AttendanceGroupDto implements Serializable{
public class AttendanceGroupDto implements Serializable {
private static final long serialVersionUID = -5573272776427338217L;
......@@ -45,9 +45,9 @@ public class AttendanceGroupDto implements Serializable{
private String pbfsnm;// 排班方式
private String dkfs;// 打卡方式
private Integer isWq;//外勤
private Integer isWq;// 外勤
private Integer kqjid;
private List<AttGroupBinPunchMode> kqzdkfslist = new ArrayList<AttGroupBinPunchMode>();
private List<AttGroupBinPunchMode> kqzdkfslist;
}
\ No newline at end of file
......@@ -28,7 +28,7 @@ public class KqglAssoLeaveRulesDto {
private Integer leaveType;
@ApiModelProperty(value = "适用范围 ", example = "0:全公司 -1:考勤组id")
private String apply;
private Integer apply;
@ApiModelProperty(value = "创建时间 创建时间", example = "101")
private Long createTime;
......@@ -48,4 +48,7 @@ public class KqglAssoLeaveRulesDto {
@ApiModelProperty(value = "适用范围集合", example = "101")
private String[] range;
@ApiModelProperty(value = "适用范围名称", example = "101")
private String[] applyrange;
}
\ No newline at end of file
......@@ -20,8 +20,8 @@ public class KqglAssoOvertimeRulesDto {
@ApiModelProperty(value = "规则名称 ", example = "以审批时间计算加班")
private String name;
@ApiModelProperty(value = "应用范围", example = "1")
private String appliedScope;
@ApiModelProperty(value = "应用范围", example = "(0:全公司 >0:考勤组id)")
private Integer appliedScope;
@ApiModelProperty(value = "工作日是否允许加班 0:否;1:是", example = "1")
private Integer isWorkovertime;
......
......@@ -75,6 +75,9 @@ public class KqglMainKqzDto {
@ApiModelProperty(value = "外勤 外勤", example = "101")
private Integer isWq;
@ApiModelProperty(value="加班规则 加班规则",example="101")
private Integer overtimeRulesId;
@ApiModelProperty(value = "考勤组人员数", example = "100")
private Integer kqznum;
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.timer.api.dao.kqmk.KqglAssoYhkqzMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoYhkqz" >
<id column="id" property="id" />
<result column="kqzid" property="kqzid" />
<result column="userid" property="userid" />
<result column="qyid" property="qyid" />
</resultMap>
<sql id="Base_Column_List">
id,
kqzid,
userid,
qyid
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoYhkqz_id,
kqzid KqglAssoYhkqz_kqzid,
userid KqglAssoYhkqz_userid,
qyid KqglAssoYhkqz_qyid
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoYhkqz">
INSERT INTO kqgl_asso_yhkqz
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != kqzid'>
kqzid,
</if>
<if test ='null != userid'>
userid,
</if>
<if test ='null != qyid'>
qyid
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != kqzid'>
#{kqzid},
</if>
<if test ='null != userid'>
#{userid},
</if>
<if test ='null != qyid'>
#{qyid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_yhkqz
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoYhkqz">
UPDATE kqgl_asso_yhkqz
<set>
<if test ='null != kqzid'>kqzid = #{kqzid},</if>
<if test ='null != userid'>userid = #{userid},</if>
<if test ='null != qyid'>qyid = #{qyid}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_yhkqz
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_yhkqz
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_yhkqz
</select>
-->
</mapper>
\ No newline at end of file
......@@ -24,6 +24,7 @@
<result column="sybc" property="sybc" />
<result column="is_xzbcdk" property="isXzbcdk" />
<result column="is_wq" property="isWq" />
<result column="overtime_rules_id" property="overtimeRulesId" />
</resultMap>
<resultMap id="AuxiliaryMap" type="cn.timer.api.dto.kqmk.KqglMainKqzDto" >
......@@ -47,6 +48,7 @@
<result column="sybc" property="sybc" />
<result column="is_xzbcdk" property="isXzbcdk" />
<result column="is_wq" property="isWq" />
<result column="overtime_rules_id" property="overtimeRulesId" />
<result column="kqznum" property="kqznum" />
<result column="pbfsnm" property="pbfsnm" />
......@@ -74,7 +76,8 @@
is_wpbsdk,
sybc,
is_xzbcdk,
is_wq
is_wq,
overtime_rules_id
</sql>
<sql id="Base_Column_List_Alias">
......@@ -97,7 +100,8 @@
is_wpbsdk KqglMainKqz_is_wpbsdk,
sybc KqglMainKqz_sybc,
is_xzbcdk KqglMainKqz_is_xzbcdk,
is_wq KqglMainKqz_is_wq
is_wq KqglMainKqz_is_wq,
overtime_rules_id KqglMainKqz_overtime_rules_id
</sql>
<sql id="Base_Column_List_a">
......@@ -120,7 +124,8 @@
a.is_wpbsdk,
a.sybc,
a.is_xzbcdk,
a.is_wq
a.is_wq,
a.overtime_rules_id
</sql>
<select id="selectAttGroupMachineByQyid" resultMap="AuxiliaryMap">
......@@ -138,6 +143,31 @@
where yhkqz.userid = #{userid,jdbcType=INTEGER} and yhkqz.qyid = #{qyid,jdbcType=INTEGER})
</select>
<select id="selectPageByQueryKqglMain" resultMap="AuxiliaryMap">
select kqz.*,
case kqz.pbfs
WHEN '1' then '固定排班'
WHEN '2' then '排班制'
else '自由工时'
end as pbfsnm,
znm.kqznum,
dkfs.type
from kqgl_main_kqz kqz
LEFT JOIN (select count(yhkqz.kqzid) as kqznum,
yhkqz.kqzid as kqzid
from kqgl_asso_yhkqz yhkqz
where yhkqz.qyid = #{param.orgCode}
GROUP BY yhkqz.kqzid) as znm on znm.kqzid = kqz.id
LEFT JOIN (select kqzdkfs.kqz_id as kqzId,kqzdkfs.type as type from kqgl_asso_kqzdkfs kqzdkfs
where kqzdkfs.qyid = #{param.orgCode} ) as dkfs on dkfs.kqzId = kqz.id
where 1=1
and kqz.qyid = #{param.orgCode}
<if test="param.query != null and param.query != ''">
and kqz.`name` like CONCAT('%',#{param.query},'%')
</if>
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglMainKqz">
......@@ -198,7 +228,10 @@
is_xzbcdk,
</if>
<if test ='null != isWq'>
is_wq
is_wq,
</if>
<if test ='null != overtimeRulesId'>
overtime_rules_id
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -257,7 +290,10 @@
#{isXzbcdk},
</if>
<if test ='null != isWq'>
#{isWq}
#{isWq},
</if>
<if test ='null != overtimeRulesId'>
#{overtimeRulesId}
</if>
</trim>
</insert>
......@@ -288,7 +324,8 @@
<if test ='null != isWpbsdk'>is_wpbsdk = #{isWpbsdk},</if>
<if test ='null != sybc'>sybc = #{sybc},</if>
<if test ='null != isXzbcdk'>is_xzbcdk = #{isXzbcdk},</if>
<if test ='null != isWq'>is_wq = #{isWq}</if>
<if test ='null != isWq'>is_wq = #{isWq},</if>
<if test ='null != overtimeRulesId'>overtime_rules_id = #{overtimeRulesId}</if>
</set>
WHERE id = #{id}
</update>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment