Commit 73e3c637 by dengshichuan

Merge branch 'lal' into 'develop'

提交考勤

See merge request 8timerv2/8timerapiv200!24
parents edd5a22c 7e8ed885
{ {
...@@ -1137,7 +1137,7 @@ ...@@ -1137,7 +1137,7 @@
"OrderNo": 11, "OrderNo": 11,
"GraphDesc": "Left=661.40\r\nTop=311.30", "GraphDesc": "Left=661.40\r\nTop=311.30",
"MetaFields": { "MetaFields": {
"Count": 4, "Count": 5,
"items": [ "items": [
{ {
"ID": 1, "ID": 1,
...@@ -1180,6 +1180,16 @@ ...@@ -1180,6 +1180,16 @@
"DataType": 2, "DataType": 2,
"KeyFieldType": 3, "KeyFieldType": 3,
"Nullable": true "Nullable": true
},
{
"ID": 16,
"Name": "is_gly",
"Memo": "0:否;1:是",
"CreateDate": "2020/4/10 15:03:44",
"OrderNo": 5,
"DisplayName": "是否为管理员",
"DataType": 2,
"Nullable": true
} }
] ]
} }
...@@ -1190,7 +1200,7 @@ ...@@ -1190,7 +1200,7 @@
"OrderNo": 12, "OrderNo": 12,
"GraphDesc": "Left=758.00\r\nTop=929.00", "GraphDesc": "Left=758.00\r\nTop=929.00",
"MetaFields": { "MetaFields": {
"Count": 19, "Count": 21,
"items": [ "items": [
{ {
"ID": 1, "ID": 1,
...@@ -1370,6 +1380,25 @@ ...@@ -1370,6 +1380,25 @@
"DataType": 2, "DataType": 2,
"KeyFieldType": 3, "KeyFieldType": 3,
"Nullable": true "Nullable": true
},
{
"ID": 42,
"Name": "punchmode",
"Memo": "==>1:指紋;2:人脸;3:密码;4:ID卡",
"CreateDate": "2020/4/10 15:01:03",
"OrderNo": 20,
"DisplayName": "考勤机打卡方式",
"DataType": 2,
"Nullable": true
},
{
"ID": 43,
"Name": "punchequipment",
"CreateDate": "2020/4/10 15:01:03",
"OrderNo": 21,
"DisplayName": "打卡设备",
"DataType": 1,
"Nullable": true
} }
] ]
} }
......
...@@ -19,7 +19,7 @@ public class InitializeSetting implements ApplicationRunner { ...@@ -19,7 +19,7 @@ public class InitializeSetting implements ApplicationRunner {
@Override @Override
public void run(ApplicationArguments args) throws Exception { public void run(ApplicationArguments args) throws Exception {
StaticVariable.mac_command = "http://192.168.172.116:8088/cmd";//考勤机执行命令 StaticVariable.mac_command = "http://192.168.3.143:8088/cmd";//考勤机执行命令
} }
} }
...@@ -34,6 +34,7 @@ import org.springframework.web.client.RestClientException; ...@@ -34,6 +34,7 @@ import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
...@@ -5885,9 +5886,11 @@ public class AttController { ...@@ -5885,9 +5886,11 @@ public class AttController {
String asIOMode = "0"; String asIOMode = "0";
String sStdIoTime = jsonArray.get("sStdIoTime").toString(); String sStdIoTime = jsonArray.get("sStdIoTime").toString();
AttendanceMachine kqjdev = attendancemachineservice.selectByQyidDev(asDevId);
/***********************************************************考勤机打卡(开始)********************************************************************************************/ /***********************************************************考勤机打卡(开始)********************************************************************************************/
YgglMainEmp user = new LambdaQueryChainWrapper<YgglMainEmp>(ygglmainempmapper).eq(YgglMainEmp::getEmpNum, asUserId).one(); YgglMainEmp user = new LambdaQueryChainWrapper<YgglMainEmp>(ygglmainempmapper).eq(YgglMainEmp::getEmpNum, asUserId).eq(YgglMainEmp::getOrgCode, kqjdev.getQyid()).one();
if(user != null) { if(user != null) {
int qyid = user.getOrgCode();//坏小孩【企业id】 int qyid = user.getOrgCode();//坏小孩【企业id】
int userid = user.getEmpNum();//用户id int userid = user.getEmpNum();//用户id
......
package cn.timer.api.dao.kqgl; package cn.timer.api.dao.kqgl;
import java.util.List; import java.util.List;
import cn.timer.api.bean.kqgl.AttendanceMachine; import cn.timer.api.bean.kqgl.AttendanceMachine;
public interface AttendanceMachineMapper { public interface AttendanceMachineMapper {
int deleteByPrimaryKey(Integer id); int deleteByPrimaryKey(Integer id);
int insert(AttendanceMachine record); int insert(AttendanceMachine record);
int insertSelective(AttendanceMachine record); int insertSelective(AttendanceMachine record);
AttendanceMachine selectByPrimaryKey(Integer id); AttendanceMachine selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(AttendanceMachine record); int updateByPrimaryKeySelective(AttendanceMachine record);
int updateByPrimaryKey(AttendanceMachine record); int updateByPrimaryKey(AttendanceMachine record);
List<AttendanceMachine> selectByPrimaryByQyid(Integer qyid); List<AttendanceMachine> selectByPrimaryByQyid(Integer qyid);
int updateByPrimaryByid(String name,int id); int updateByPrimaryByid(String name,int id);
AttendanceMachine selectByQyidDev(String code);
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?> <?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" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.timer.api.dao.kqgl.AttendanceMachineMapper" > <mapper namespace="cn.timer.api.dao.kqgl.AttendanceMachineMapper" >
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqgl.AttendanceMachine" > <resultMap id="BaseResultMap" type="cn.timer.api.bean.kqgl.AttendanceMachine" >
<id column="id" property="id" jdbcType="INTEGER" /> <id column="id" property="id" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" /> <result column="name" property="name" jdbcType="VARCHAR" />
<result column="code" property="code" jdbcType="VARCHAR" /> <result column="code" property="code" jdbcType="VARCHAR" />
<result column="qyid" property="qyid" jdbcType="INTEGER" /> <result column="qyid" property="qyid" jdbcType="INTEGER" />
<result column="lusj_time" property="lusjTime" jdbcType="BIGINT" /> <result column="lusj_time" property="lusjTime" jdbcType="BIGINT" />
<result column="luryid" property="luryid" jdbcType="INTEGER" /> <result column="luryid" property="luryid" jdbcType="INTEGER" />
<result column="type" property="type" jdbcType="INTEGER" /> <result column="type" property="type" jdbcType="INTEGER" />
</resultMap> </resultMap>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
id, name, code, qyid, lusj_time, luryid, type id, name, code, qyid, lusj_time, luryid, type
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from kqgl_asso_kqj from kqgl_asso_kqj
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from kqgl_asso_kqj delete from kqgl_asso_kqj
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" useGeneratedKeys="true" keyProperty="id">
insert into kqgl_asso_kqj (name, code, insert into kqgl_asso_kqj (name, code,
qyid, lusj_time, luryid, qyid, lusj_time, luryid,
type) type)
values (#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, values (#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
#{qyid,jdbcType=INTEGER}, #{lusjTime,jdbcType=BIGINT}, #{luryid,jdbcType=INTEGER}, #{qyid,jdbcType=INTEGER}, #{lusjTime,jdbcType=BIGINT}, #{luryid,jdbcType=INTEGER},
#{type,jdbcType=INTEGER}) #{type,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" useGeneratedKeys="true" keyProperty="id"> <insert id="insertSelective" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" useGeneratedKeys="true" keyProperty="id">
insert into kqgl_asso_kqj insert into kqgl_asso_kqj
<trim prefix="(" suffix=")" suffixOverrides="," > <trim prefix="(" suffix=")" suffixOverrides="," >
<if test="name != null" > <if test="name != null" >
name, name,
</if> </if>
<if test="code != null" > <if test="code != null" >
code, code,
</if> </if>
<if test="qyid != null" > <if test="qyid != null" >
qyid, qyid,
</if> </if>
<if test="lusjTime != null" > <if test="lusjTime != null" >
lusj_time, lusj_time,
</if> </if>
<if test="luryid != null" > <if test="luryid != null" >
luryid, luryid,
</if> </if>
<if test="type != null" > <if test="type != null" >
type, type,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides="," > <trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="name != null" > <if test="name != null" >
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
<if test="code != null" > <if test="code != null" >
#{code,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
</if> </if>
<if test="qyid != null" > <if test="qyid != null" >
#{qyid,jdbcType=INTEGER}, #{qyid,jdbcType=INTEGER},
</if> </if>
<if test="lusjTime != null" > <if test="lusjTime != null" >
#{lusjTime,jdbcType=BIGINT}, #{lusjTime,jdbcType=BIGINT},
</if> </if>
<if test="luryid != null" > <if test="luryid != null" >
#{luryid,jdbcType=INTEGER}, #{luryid,jdbcType=INTEGER},
</if> </if>
<if test="type != null" > <if test="type != null" >
#{type,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" > <update id="updateByPrimaryKeySelective" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" >
update kqgl_asso_kqj update kqgl_asso_kqj
<set > <set >
<if test="name != null" > <if test="name != null" >
name = #{name,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR},
</if> </if>
<if test="code != null" > <if test="code != null" >
code = #{code,jdbcType=VARCHAR}, code = #{code,jdbcType=VARCHAR},
</if> </if>
<if test="qyid != null" > <if test="qyid != null" >
qyid = #{qyid,jdbcType=INTEGER}, qyid = #{qyid,jdbcType=INTEGER},
</if> </if>
<if test="lusjTime != null" > <if test="lusjTime != null" >
lusj_time = #{lusjTime,jdbcType=BIGINT}, lusj_time = #{lusjTime,jdbcType=BIGINT},
</if> </if>
<if test="luryid != null" > <if test="luryid != null" >
luryid = #{luryid,jdbcType=INTEGER}, luryid = #{luryid,jdbcType=INTEGER},
</if> </if>
<if test="type != null" > <if test="type != null" >
type = #{type,jdbcType=INTEGER}, type = #{type,jdbcType=INTEGER},
</if> </if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" > <update id="updateByPrimaryKey" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" >
update kqgl_asso_kqj update kqgl_asso_kqj
set name = #{name,jdbcType=VARCHAR}, set name = #{name,jdbcType=VARCHAR},
code = #{code,jdbcType=VARCHAR}, code = #{code,jdbcType=VARCHAR},
qyid = #{qyid,jdbcType=INTEGER}, qyid = #{qyid,jdbcType=INTEGER},
lusj_time = #{lusjTime,jdbcType=BIGINT}, lusj_time = #{lusjTime,jdbcType=BIGINT},
luryid = #{luryid,jdbcType=INTEGER}, luryid = #{luryid,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER} type = #{type,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<select id="selectByPrimaryByQyid" resultMap="BaseResultMap" parameterType="java.lang.Integer" > <select id="selectByPrimaryByQyid" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from kqgl_asso_kqj from kqgl_asso_kqj
where qyid = #{qyid,jdbcType=INTEGER} where qyid = #{qyid,jdbcType=INTEGER}
</select> </select>
<update id="updateByPrimaryByid" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" > <update id="updateByPrimaryByid" parameterType="cn.timer.api.bean.kqgl.AttendanceMachine" >
update kqgl_asso_kqj update kqgl_asso_kqj
set name = #{name,jdbcType=VARCHAR} set name = #{name,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<select id="selectByQyidDev" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from kqgl_asso_kqj
where code = #{code,jdbcType=VARCHAR}
</select>
</mapper> </mapper>
\ No newline at end of file
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