1.专项任务页面展示及新增修改查询

2.国际化
This commit is contained in:
zhanghongqing
2018-03-13 10:14:23 +08:00
parent a14cfe9e71
commit b779cc33f5
11 changed files with 790 additions and 111 deletions

View File

@@ -1,8 +1,20 @@
package com.nis.web.dao.configuration;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.configuration.TaskInfo;
import com.nis.web.dao.CrudDao;
import com.nis.web.dao.MyBatisDao;
@MyBatisDao
public interface TaskInfoDao extends CrudDao<TaskInfo>{
List<TaskInfo> findTaskInfo(TaskInfo requestInfo);
TaskInfo getTaskInfoByTaskName(@Param("taskName") String taskName);
TaskInfo getTaskInfoById(@Param("id") Long id);
void delete(@Param("id") Long id);
}

View File

@@ -30,10 +30,55 @@
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from task_info
<!-- 查询列表 -->
<select id="findTaskInfo" resultMap="BaseResultMap">
select
r.id AS id,
r.task_name AS taskName,
r.task_org AS taskOrg,
r.task_time AS taskTime,
r.is_valid AS isValid,
r.is_audit AS isAudit,
s.name AS creatorName,
r.create_time AS createTime,
u.name AS editorName,
r.edit_time AS editTime,
e.name AS currentName,
r.audit_time AS auditTime
from task_info r
left join sys_user s on r.creator_id=s.id
left join sys_user u on r.editor_id=u.id
left join sys_user e on r.auditor_id=e.id
where r.is_valid=1 and r.is_audit !=3
<if test="taskName != null and taskName != ''">
AND r.task_name like
<if test="dbName == 'mysql'">CONCAT('%',#{taskName}, '%')</if>
</if>
<if test="isAudit != null">
AND r.is_audit=${isAudit}
</if>
<if test="beginDate!=null and beginDate!='' and endDate!=null and endDate!=''">
AND r.task_time between #{beginDate} and #{endDate}
</if>
<if test="dobeginDate!=null and dobeginDate!='' and doendDate!=null and doendDate!=''">
AND (r.create_time between #{dobeginDate} and #{doendDate}) or (r.audit_time between #{dobeginDate} and #{doendDate})
</if>
order by r.task_time desc
</select>
<!-- 根据来函号查询 -->
<select id="getTaskInfoByTaskName" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from task_info
where task_name = #{taskName,jdbcType=VARCHAR}
</select>
<!-- 根据来id查询 -->
<select id="getTaskInfoById" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from task_info
where id = #{id,jdbcType=BIGINT}
</delete>
</select>
<insert id="insert" parameterType="com.nis.domain.configuration.TaskInfo">
insert into task_info (id, task_name, task_org,
task_time, task_desc, is_valid,
@@ -46,92 +91,8 @@
#{editorId,jdbcType=INTEGER}, #{editTime,jdbcType=DATE}, #{auditorId,jdbcType=INTEGER},
#{auditTime,jdbcType=DATE})
</insert>
<insert id="insertSelective" parameterType="com.nis.domain.configuration.TaskInfo">
insert into task_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="taskName != null">
task_name,
</if>
<if test="taskOrg != null">
task_org,
</if>
<if test="taskTime != null">
task_time,
</if>
<if test="taskDesc != null">
task_desc,
</if>
<if test="isValid != null">
is_valid,
</if>
<if test="isAudit != null">
is_audit,
</if>
<if test="creatorId != null">
creator_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="editorId != null">
editor_id,
</if>
<if test="editTime != null">
edit_time,
</if>
<if test="auditorId != null">
auditor_id,
</if>
<if test="auditTime != null">
audit_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="taskName != null">
#{taskName,jdbcType=VARCHAR},
</if>
<if test="taskOrg != null">
#{taskOrg,jdbcType=VARCHAR},
</if>
<if test="taskTime != null">
#{taskTime,jdbcType=DATE},
</if>
<if test="taskDesc != null">
#{taskDesc,jdbcType=VARCHAR},
</if>
<if test="isValid != null">
#{isValid,jdbcType=INTEGER},
</if>
<if test="isAudit != null">
#{isAudit,jdbcType=INTEGER},
</if>
<if test="creatorId != null">
#{creatorId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=DATE},
</if>
<if test="editorId != null">
#{editorId,jdbcType=INTEGER},
</if>
<if test="editTime != null">
#{editTime,jdbcType=DATE},
</if>
<if test="auditorId != null">
#{auditorId,jdbcType=INTEGER},
</if>
<if test="auditTime != null">
#{auditTime,jdbcType=DATE},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.configuration.TaskInfo">
<update id="update" parameterType="com.nis.domain.configuration.TaskInfo">
update task_info
<set>
<if test="taskName != null">
@@ -173,20 +134,14 @@
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.nis.domain.configuration.TaskInfo">
update task_info
set task_name = #{taskName,jdbcType=VARCHAR},
task_org = #{taskOrg,jdbcType=VARCHAR},
task_time = #{taskTime,jdbcType=DATE},
task_desc = #{taskDesc,jdbcType=VARCHAR},
is_valid = #{isValid,jdbcType=INTEGER},
is_audit = #{isAudit,jdbcType=INTEGER},
creator_id = #{creatorId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=DATE},
editor_id = #{editorId,jdbcType=INTEGER},
edit_time = #{editTime,jdbcType=DATE},
auditor_id = #{auditorId,jdbcType=INTEGER},
audit_time = #{auditTime,jdbcType=DATE}
where id = #{id,jdbcType=BIGINT}
<!--删除 -->
<update id="delete" parameterType="long">
update task_info
<set>
<if test="id != null and id != ''">
is_valid=-1
</if>
</set>
where id = #{id,jdbcType=BIGINT} and is_audit !=1
</update>
</mapper>