|
|
@ -5,34 +5,53 @@
|
|
|
|
<mapper namespace="com.os.mes.record.mapper.RecordStaffAttendanceMapper">
|
|
|
|
<mapper namespace="com.os.mes.record.mapper.RecordStaffAttendanceMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="RecordStaffAttendance" id="RecordStaffAttendanceResult">
|
|
|
|
<resultMap type="RecordStaffAttendance" id="RecordStaffAttendanceResult">
|
|
|
|
<result property="objId" column="obj_id" />
|
|
|
|
<result property="objId" column="obj_id"/>
|
|
|
|
<result property="staffId" column="staff_id" />
|
|
|
|
<result property="staffId" column="staff_id"/>
|
|
|
|
<result property="attendanceType" column="attendance_type" />
|
|
|
|
<result property="staffName" column="staff_name"/>
|
|
|
|
<result property="teamCode" column="team_code" />
|
|
|
|
<result property="attendanceType" column="attendance_type"/>
|
|
|
|
<result property="classes" column="classes" />
|
|
|
|
<result property="teamCode" column="team_code"/>
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
<result property="teamName" column="team_name"/>
|
|
|
|
<result property="isFlag" column="is_flag" />
|
|
|
|
<result property="classes" column="classes"/>
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
<result property="isFlag" column="is_flag"/>
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
<result property="machineCode" column="machine_code" />
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
|
|
|
<result property="machineCode" column="machine_code"/>
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectRecordStaffAttendanceVo">
|
|
|
|
<sql id="selectRecordStaffAttendanceVo">
|
|
|
|
select obj_id, staff_id, attendance_type, team_code, classes, remark, is_flag, create_by, create_time, update_by, update_time, machine_code from record_staff_attendance
|
|
|
|
select rsa.obj_id,
|
|
|
|
|
|
|
|
rsa.staff_id,
|
|
|
|
|
|
|
|
bsi.staff_name,
|
|
|
|
|
|
|
|
rsa.attendance_type,
|
|
|
|
|
|
|
|
rsa.team_code,
|
|
|
|
|
|
|
|
btm.team_name,
|
|
|
|
|
|
|
|
rsa.classes,
|
|
|
|
|
|
|
|
rsa.remark,
|
|
|
|
|
|
|
|
rsa.is_flag,
|
|
|
|
|
|
|
|
rsa.create_by,
|
|
|
|
|
|
|
|
rsa.create_time,
|
|
|
|
|
|
|
|
rsa.update_by,
|
|
|
|
|
|
|
|
rsa.update_time,
|
|
|
|
|
|
|
|
rsa.machine_code
|
|
|
|
|
|
|
|
from record_staff_attendance rsa
|
|
|
|
|
|
|
|
left join base_team_members btm on btm.team_code = rsa.team_code
|
|
|
|
|
|
|
|
left join base_staff_info bsi on bsi.staff_id = rsa.staff_id
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectRecordStaffAttendanceList" parameterType="RecordStaffAttendance" resultMap="RecordStaffAttendanceResult">
|
|
|
|
<select id="selectRecordStaffAttendanceList" parameterType="RecordStaffAttendance"
|
|
|
|
|
|
|
|
resultMap="RecordStaffAttendanceResult">
|
|
|
|
<include refid="selectRecordStaffAttendanceVo"/>
|
|
|
|
<include refid="selectRecordStaffAttendanceVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="staffId != null and staffId != ''"> and staff_id = #{staffId}</if>
|
|
|
|
<if test="staffId != null and staffId != ''">and staff_id = #{staffId}</if>
|
|
|
|
<if test="attendanceType != null and attendanceType != ''"> and attendance_type = #{attendanceType}</if>
|
|
|
|
<if test="attendanceType != null and attendanceType != ''">and attendance_type = #{attendanceType}</if>
|
|
|
|
<if test="teamCode != null and teamCode != ''"> and team_code = #{teamCode}</if>
|
|
|
|
<if test="teamCode != null and teamCode != ''">and team_code = #{teamCode}</if>
|
|
|
|
<if test="classes != null and classes != ''"> and classes = #{classes}</if>
|
|
|
|
<if test="classes != null and classes != ''">and classes = #{classes}</if>
|
|
|
|
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
|
|
|
|
<if test="isFlag != null and isFlag != ''">and is_flag = #{isFlag}</if>
|
|
|
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
|
|
|
<if test="createTime != null ">and create_time = #{createTime}</if>
|
|
|
|
<if test="machineCode != null and machineCode != ''"> and machine_code = #{machineCode}</if>
|
|
|
|
<if test="machineCode != null and machineCode != ''">and machine_code = #{machineCode}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
@ -41,7 +60,8 @@
|
|
|
|
where obj_id = #{objId}
|
|
|
|
where obj_id = #{objId}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertRecordStaffAttendance" parameterType="RecordStaffAttendance" useGeneratedKeys="true" keyProperty="objId">
|
|
|
|
<insert id="insertRecordStaffAttendance" parameterType="RecordStaffAttendance" useGeneratedKeys="true"
|
|
|
|
|
|
|
|
keyProperty="objId">
|
|
|
|
insert into record_staff_attendance
|
|
|
|
insert into record_staff_attendance
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="staffId != null">staff_id,</if>
|
|
|
|
<if test="staffId != null">staff_id,</if>
|
|
|
@ -90,7 +110,9 @@
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteRecordStaffAttendanceByObjId" parameterType="Long">
|
|
|
|
<delete id="deleteRecordStaffAttendanceByObjId" parameterType="Long">
|
|
|
|
delete from record_staff_attendance where obj_id = #{objId}
|
|
|
|
delete
|
|
|
|
|
|
|
|
from record_staff_attendance
|
|
|
|
|
|
|
|
where obj_id = #{objId}
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteRecordStaffAttendanceByObjIds" parameterType="String">
|
|
|
|
<delete id="deleteRecordStaffAttendanceByObjIds" parameterType="String">
|
|
|
|