insert into project_daily( id, tenant_id, project_id, project_name, task_id, task_desc, begin_date, end_date, task_name, daily_type, daily_content, daily_status, daily_date, supplementary_flag, is_commit, commit_user_id, commit_user_name, commit_time, is_confirm, confirm_user_id, confirm_user_name, confirm_time, confirm_content, estimated_hours, actual_hours, remark, create_user_id, create_user_name, create_time, update_user_id, update_user_name, update_time, is_deleted, delete_user_id, delete_user_name, delete_time ) values ( #{item.id}, #{item.tenantId}, #{item.projectId}, #{item.projectName}, #{item.taskId}, #{item.taskDesc}, #{item.beginDate}, #{item.endDate}, #{item.taskName}, #{item.dailyType}, #{item.dailyContent}, #{item.dailyStatus}, #{item.dailyDate}, #{item.supplementaryFlag}, #{item.isCommit}, #{item.commitUserId}, #{item.commitUserName}, #{item.commitTime}, #{item.isConfirm}, #{item.confirmUserId}, #{item.confirmUserName}, #{item.confirmTime}, #{item.confirmContent}, #{item.estimatedHours}, #{item.actualHours}, #{item.remark}, #{item.createUserId}, #{item.createUserName}, #{item.createTime}, #{item.updateUserId}, #{item.updateUserName}, #{item.updateTime}, #{item.isDeleted}, #{item.deleteUserId}, #{item.deleteUserName}, #{item.deleteTime} ) delete from project_daily where create_user_id= #{createUserId} and daily_date= #{dailyDate} select t.* from ( select d.* , i.project_name as project_name2, pm.module_name as module_name2, pt.`name` as task_name2, pt.description as task_desc2, pt.plan_begin_date as task_plan_begin_date, pt.plan_end_date as task_plan_end_date, daily_status.label as daily_status_name, daily_type.label as daily_type_name, daily_commit.label as daily_commit_name, daily_confirm.label as daily_confirm_name, daily_process_state.label as daily_process_state_name from project_daily d left join project_info i on d.project_id = i.id left join project_module pm on d.module_id=pm.id left join project_task pt on d.task_id =pt.id left join ( select id,label,value from sys_dict_item where dict_type='daily_status' and is_deleted=0 ) daily_status on d.daily_status=daily_status.`value` left join ( select id,label,value from sys_dict_item where dict_type='daily_type' and is_deleted=0 ) daily_type on d.daily_type=daily_type.`value` left join ( select id,label,value from sys_dict_item where dict_type='daily_commit' and is_deleted=0 ) daily_commit on d.is_commit=daily_commit.`value` left join ( select id,label,value from sys_dict_item where dict_type='daily_confirm' and is_deleted=0 ) daily_confirm on d.is_confirm=daily_confirm.`value` left join ( select id,label,value from sys_dict_item where dict_type='daily_process_state' and is_deleted=0 ) daily_process_state on d.daily_process_state=daily_process_state.`value` )t where t.is_deleted=0 and t.daily_date >= #{startDate} and t.daily_date <= #{endDate} and t.daily_date= #{dailyDate} and t.project_id= #{projectId} and t.create_user_id= #{createUserId} where t.is_deleted=0 and t.daily_date >= #{startDate} and t.daily_date <= #{endDate} and t.daily_date= #{dailyDate} and t.project_id= #{projectId} and t.create_user_id= #{createUserId} and ( t.daily_content like concat('%',#{keyword},'%') or t.remark like concat('%',#{keyword},'%') ) and t.daily_type= #{dailyType} and t.daily_status= #{dailyStatus} and t.is_commit= #{isCommit} and t.is_confirm= #{isConfirm} WHERE p.is_deleted = 0 AND p.daily_status != 3 and p.project_id= #{projectId} and DATE_FORMAT(p.daily_date,'%Y-%m-%d') >= #{startDate} and DATE_FORMAT(p.daily_date,'%Y-%m-%d') <= #{endDate} and p.is_confirm = #{confirmState} and p.create_user_id = #{createUserId}