| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectWeighingBoxVo"> |
| | | select id, name, code, weight, unit, location, calib_cycle_days, remind_days, last_calib_date, next_calib_date, active_status, description, del_flag, create_by, create_time, update_by, update_time from qm_weighing_box |
| | | select id, name, code, weight, unit, location, calib_cycle_days, remind_days, last_calib_date, next_calib_date, active_status, description, del_flag, create_by, create_time, update_by, update_time from md_weighing_box |
| | | </sql> |
| | | |
| | | <select id="selectPageList" resultType="org.dromara.qa.md.domain.WeighingBox"> |
| | |
| | | </select> |
| | | |
| | | <update id="batchUpdateStatus"> |
| | | update qm_weighing_box set active_status = #{activeStatus} where id in |
| | | update md_weighing_box set active_status = #{activeStatus} where id in |
| | | <foreach collection="boxIds" item="id" open="(" separator="," close=")"> |
| | | ${id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <update id="batchUpdateCalibConfig"> |
| | | update qm_weighing_box set calib_cycle_days = #{calibCycleDays}, remind_days = #{remindDays} where id in |
| | | update md_weighing_box set calib_cycle_days = #{calibCycleDays}, remind_days = #{remindDays} where id in |
| | | <foreach collection="boxIds" item="id" open="(" separator="," close=")"> |
| | | ${id} |
| | | </foreach> |
| | |
| | | when current_date + interval '1 day' * remind_days >= next_calib_date then 'warning' |
| | | else 'normal' |
| | | end as calib_status |
| | | from qm_weighing_box |
| | | from md_weighing_box |
| | | where del_flag = 0 |
| | | ) as box |
| | | where 1=1 |
| | |
| | | when current_date + interval '1 day' * remind_days >= next_calib_date then 'warning' |
| | | else 'normal' |
| | | end as calib_status |
| | | from qm_weighing_box |
| | | from md_weighing_box |
| | | where del_flag = 0 |
| | | ) as box |
| | | where 1=1 |