| | |
| | | <association property="sysWorktime" column="id=WORK_ID" select="com.matrix.system.hive.dao.SysWorktimeDao.selectById" ></association> |
| | | |
| | | </resultMap> |
| | | |
| | | <resultMap type="SysWorkBeatuistaff" id="SysWorkBeatuistaffSimpleMap"> |
| | | <id property="id" column="ID" /> |
| | | <result property="staffId" column="STAFF_ID" /> |
| | | <result property="paibanCode" column="PAIBAN_CODE" /> |
| | | <result property="workId" column="WORK_ID" /> |
| | | <result property="signOrder" column="signOrder" /> |
| | | <result property="workStaffName" column="WORK_STAFF_NAME" /> |
| | | |
| | | </resultMap> |
| | | <!-- 插入方法 --> |
| | | <insert id="insert" parameterType="SysWorkBeatuistaff" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | |
| | | |
| | | |
| | | <!-- 根据时间查询当天上班的人 --> |
| | | <select id="selectByDateStr" resultMap="SysWorkBeatuistaffMap"> |
| | | select |
| | | ID, |
| | | STAFF_ID, |
| | | PAIBAN_CODE, |
| | | SHOP_ID, |
| | | WORK_ID, |
| | | (select su_name FROM sys_users t where t.su_id=STAFF_ID) AS WORK_STAFF_NAME |
| | | from sys_work_beatuistaff |
| | | where PAIBAN_CODE = #{timeStr} |
| | | and SHOP_ID=#{shopId} |
| | | <select id="selectByDateStr" resultMap="SysWorkBeatuistaffSimpleMap"> |
| | | select |
| | | distinct a.STAFF_ID, PAIBAN_CODE, a.SHOP_ID, b.su_name as WORK_STAFF_NAME |
| | | from sys_work_beatuistaff a |
| | | left join sys_users b on b.su_id=a.STAFF_ID |
| | | where a.PAIBAN_CODE = #{timeStr} |
| | | and a.SHOP_ID=#{shopId} |
| | | </select> |
| | | |
| | | <!-- 根据排班编号查询 --> |