935090232@qq.com
2021-01-15 e971ea090aa1f320f3c3f78c3a2a8d50f16dd4d0
zq-erp/src/main/resources/mybatis/mapper/hive/SysWorkBeatuistaffDao.xml
@@ -16,6 +16,16 @@
         <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">
@@ -82,17 +92,13 @@
   
   
   <!-- 根据时间查询当天上班的人 -->
   <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>
   
   <!-- 根据排班编号查询 -->