1.专项任务页面展示及新增修改查询
2.国际化
This commit is contained in:
@@ -30,6 +30,16 @@ public class TaskInfo extends BaseEntity<TaskInfo> {
|
||||
private Integer auditorId;
|
||||
|
||||
private Date auditTime;
|
||||
|
||||
//自定义 创建人员 修改人员 审核人员
|
||||
private String creatorName;
|
||||
private String editorName;
|
||||
private String auditorName;
|
||||
private Date beginDate;//来函开始时间
|
||||
private Date endDate;//来函结束时间
|
||||
private String seltype;//选中类型
|
||||
private Date dobeginDate;//操作开始时间
|
||||
private Date doendDate;//操作结束时间
|
||||
|
||||
public String getTaskName() {
|
||||
return taskName;
|
||||
@@ -127,5 +137,69 @@ public class TaskInfo extends BaseEntity<TaskInfo> {
|
||||
this.auditTime = auditTime;
|
||||
}
|
||||
|
||||
public String getCreatorName() {
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName) {
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getEditorName() {
|
||||
return editorName;
|
||||
}
|
||||
|
||||
public void setEditorName(String editorName) {
|
||||
this.editorName = editorName;
|
||||
}
|
||||
|
||||
public String getAuditorName() {
|
||||
return auditorName;
|
||||
}
|
||||
|
||||
public void setAuditorName(String auditorName) {
|
||||
this.auditorName = auditorName;
|
||||
}
|
||||
|
||||
public Date getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(Date beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public Date getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Date endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getSeltype() {
|
||||
return seltype;
|
||||
}
|
||||
|
||||
public void setSeltype(String seltype) {
|
||||
this.seltype = seltype;
|
||||
}
|
||||
|
||||
public Date getDobeginDate() {
|
||||
return dobeginDate;
|
||||
}
|
||||
|
||||
public void setDobeginDate(Date dobeginDate) {
|
||||
this.dobeginDate = dobeginDate;
|
||||
}
|
||||
|
||||
public Date getDoendDate() {
|
||||
return doendDate;
|
||||
}
|
||||
|
||||
public void setDoendDate(Date doendDate) {
|
||||
this.doendDate = doendDate;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
package com.nis.web.controller.basics;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.TaskInfo;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.service.basics.TaskInfoService;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/basics/taskInfo")
|
||||
public class TaskInfoController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
private TaskInfoService taskInfoService;
|
||||
|
||||
|
||||
/**
|
||||
*来函列表
|
||||
*/
|
||||
@RequestMapping(value = {"list",""})
|
||||
public String list(TaskInfo taskInfo, HttpServletRequest request, HttpServletResponse response, Model model) {
|
||||
Page<TaskInfo> page = taskInfoService.findTaskInfo(new Page<TaskInfo>(request, response), taskInfo);
|
||||
model.addAttribute("page", page);
|
||||
return "/basics/taskInfoList";
|
||||
}
|
||||
/**
|
||||
* 进入用户添加或修改页面
|
||||
*/
|
||||
@RequestMapping(value={"form"})
|
||||
public String form(TaskInfo taskInfo, Model model) {
|
||||
if(taskInfo.getId()!=null){
|
||||
taskInfo = taskInfoService.getTaskInfoById(taskInfo.getId());
|
||||
model.addAttribute("taskInfo", taskInfo);
|
||||
}else{
|
||||
model.addAttribute("taskInfo", taskInfo);
|
||||
}
|
||||
return "/basics/taskInfoForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增/修改
|
||||
*/
|
||||
@RequestMapping(value = "saveOrUpdate")
|
||||
public String saveOrUpdate(TaskInfo taskInfo, HttpServletRequest request, Model model, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
if(taskInfo.getId()!=null){
|
||||
// 保存用户信息
|
||||
logger.info(taskInfo.getId()+"修改成功");
|
||||
taskInfoService.saveOrUpdate(taskInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
}else{
|
||||
if (!"true".equals(checkTaskName(taskInfo.getTaskName()))){
|
||||
logger.info(taskInfo.getTaskName()+"重复数据");
|
||||
addMessage(model, "error");
|
||||
return form(taskInfo, model);
|
||||
}
|
||||
// 保存用户信息
|
||||
taskInfoService.saveOrUpdate(taskInfo);
|
||||
addMessage(redirectAttributes, "success");
|
||||
logger.info(taskInfo.getId()+"保存成功");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage());
|
||||
e.printStackTrace();
|
||||
addMessage(model, "error");
|
||||
}
|
||||
return "redirect:" + adminPath + "/basics/taskInfo/list?repage";
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证是否有效
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "checkTaskName")
|
||||
public String checkTaskName(String taskName) {
|
||||
if (taskName !=null && taskInfoService.getTaskInfoByTaskName(taskName) == null) {
|
||||
return "true";
|
||||
}
|
||||
return "false";
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核通过
|
||||
* @param taskInfo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "taskExamine")
|
||||
public String taskExamine(String ids, Model model,RedirectAttributes redirectAttributes){
|
||||
String[] exId = ids.split(",");
|
||||
taskInfoService.taskExamine(exId);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/basics/taskInfo/list?repage";
|
||||
|
||||
}
|
||||
/**
|
||||
* 审核未通过
|
||||
* @param taskInfo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "taskExamineNo")
|
||||
public String taskExamineNo(String ids, Model model,RedirectAttributes redirectAttributes){
|
||||
String[] noId = ids.split(",");
|
||||
taskInfoService.taskExamineNo(noId);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/basics/taskInfo/list?repage";
|
||||
|
||||
}
|
||||
/**
|
||||
* 取消审核
|
||||
* @param taskInfo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "taskCancelExamine")
|
||||
public String taskCancelExamine(String ids, Model model,RedirectAttributes redirectAttributes){
|
||||
String[] canclelId = ids.split(",");
|
||||
taskInfoService.taskCancelExamine(canclelId);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/basics/taskInfo/list?repage";
|
||||
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
* @param taskInfo
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "delete")
|
||||
public String delete(String ids, Model model,RedirectAttributes redirectAttributes){
|
||||
String[] delId = ids.split(",");
|
||||
taskInfoService.delete(delId);
|
||||
addMessage(redirectAttributes, "success");
|
||||
return "redirect:" + adminPath + "/basics/taskInfo/list?repage";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.nis.web.service.basics;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.TaskInfo;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.TaskInfoDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class TaskInfoService extends BaseService{
|
||||
|
||||
@Autowired
|
||||
private TaskInfoDao taskInfoDao;
|
||||
|
||||
public Page<TaskInfo> findTaskInfo(Page<TaskInfo> page, TaskInfo taskInfo) {
|
||||
// 设置分页参数
|
||||
taskInfo.setPage(page);
|
||||
// 执行分页查询
|
||||
page.setList(taskInfoDao.findTaskInfo(taskInfo));
|
||||
return page;
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public void saveOrUpdate(TaskInfo taskInfo) {
|
||||
if (StringUtil.isEmpty(taskInfo.getId())) {
|
||||
//设置默认参数值
|
||||
taskInfo.setIsValid(1);//有效
|
||||
taskInfo.setIsAudit(0);//未审核
|
||||
taskInfo.setCreatorId((UserUtils.getUser().getId()).intValue());//创建人员
|
||||
taskInfo.setCreateTime(new Date());//创建时间
|
||||
taskInfoDao.insert(taskInfo);
|
||||
}else{
|
||||
taskInfo.setEditorId((UserUtils.getUser().getId()).intValue());//修改人员
|
||||
taskInfo.setEditTime(new Date());//修改时间
|
||||
taskInfoDao.update(taskInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public TaskInfo getTaskInfoByTaskName(String taskName) {
|
||||
|
||||
return taskInfoDao.getTaskInfoByTaskName(taskName);
|
||||
}
|
||||
public TaskInfo getTaskInfoById(Long id) {
|
||||
|
||||
return taskInfoDao.getTaskInfoById(id);
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public void taskExamine(String[] exId){
|
||||
TaskInfo taskInfo = new TaskInfo();
|
||||
for (int i = 0; i < exId.length; i++) {
|
||||
taskInfo.setId(Long.valueOf(exId[i]));
|
||||
taskInfo.setIsAudit(1);//审核通过
|
||||
taskInfo.setAuditTime(new Date());
|
||||
taskInfo.setAuditorId((UserUtils.getUser().getId()).intValue());//审核人员
|
||||
taskInfoDao.update(taskInfo);
|
||||
}
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public void taskExamineNo(String[] noId){
|
||||
TaskInfo taskInfo = new TaskInfo();
|
||||
for (int i = 0; i < noId.length; i++) {
|
||||
taskInfo.setId(Long.valueOf(noId[i]));
|
||||
taskInfo.setIsAudit(2);//审核未通过
|
||||
taskInfo.setAuditTime(new Date());
|
||||
taskInfo.setAuditorId((UserUtils.getUser().getId()).intValue());//审核人员
|
||||
taskInfoDao.update(taskInfo);
|
||||
}
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public void taskCancelExamine(String[] cancelId){
|
||||
TaskInfo taskInfo = new TaskInfo();
|
||||
for (int i = 0; i < cancelId.length; i++) {
|
||||
taskInfo.setId(Long.valueOf(cancelId[i]));
|
||||
taskInfo.setIsAudit(3);//取消审核通过
|
||||
taskInfo.setAuditTime(new Date());
|
||||
taskInfo.setAuditorId((UserUtils.getUser().getId()).intValue());//审核人员
|
||||
taskInfoDao.update(taskInfo);
|
||||
}
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=DataAccessException.class)
|
||||
public void delete(String[] delId){
|
||||
for (int i = 0; i < delId.length; i++) {
|
||||
taskInfoDao.delete(Long.valueOf(delId[i]));//删除
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,8 @@ public class RequestInfoService extends BaseService{
|
||||
for (int i = 0; i < exId.length; i++) {
|
||||
requestInfo.setId(Long.valueOf(exId[i]));
|
||||
requestInfo.setIsAudit(1);//审核通过
|
||||
requestInfo.setAuditTime(new Date());
|
||||
requestInfo.setAuditorId((UserUtils.getUser().getId()).intValue());//审核人员
|
||||
requestInfoDao.update(requestInfo);
|
||||
}
|
||||
}
|
||||
@@ -76,6 +78,8 @@ public class RequestInfoService extends BaseService{
|
||||
for (int i = 0; i < noId.length; i++) {
|
||||
requestInfo.setId(Long.valueOf(noId[i]));
|
||||
requestInfo.setIsAudit(2);//审核未通过
|
||||
requestInfo.setAuditTime(new Date());
|
||||
requestInfo.setAuditorId((UserUtils.getUser().getId()).intValue());//审核人员
|
||||
requestInfoDao.update(requestInfo);
|
||||
}
|
||||
}
|
||||
@@ -85,6 +89,8 @@ public class RequestInfoService extends BaseService{
|
||||
for (int i = 0; i < cancelId.length; i++) {
|
||||
requestInfo.setId(Long.valueOf(cancelId[i]));
|
||||
requestInfo.setIsAudit(3);//取消审核通过
|
||||
requestInfo.setAuditTime(new Date());
|
||||
requestInfo.setAuditorId((UserUtils.getUser().getId()).intValue());//审核人员
|
||||
requestInfoDao.update(requestInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,6 +138,9 @@ end_date=end date
|
||||
delete=delete
|
||||
special_task=special task
|
||||
cancel_approved=cancel approved
|
||||
task_name=task name
|
||||
task_org=task organization
|
||||
task_time=task time
|
||||
#============laihan end======================
|
||||
|
||||
|
||||
|
||||
@@ -138,6 +138,9 @@ end_date=\u7ed3\u675f\u65f6\u95f4
|
||||
delete=\u5220\u9664
|
||||
special_task=\u4e13\u9879\u4efb\u52a1
|
||||
cancel_approved=\u914d\u7f6e\u53d6\u6d88
|
||||
task_name=\u4e13\u9879\u540d\u79f0
|
||||
task_org=\u62a5\u9001\u5355\u4f4d
|
||||
task_time=\u62a5\u9001\u65f6\u95f4
|
||||
#==========laihan end=====================
|
||||
|
||||
#==========message begin=====================
|
||||
|
||||
113
src/main/webapp/WEB-INF/views/basics/taskInfoForm.jsp
Normal file
113
src/main/webapp/WEB-INF/views/basics/taskInfoForm.jsp
Normal file
@@ -0,0 +1,113 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>专项任务</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i><c:if test="${not empty taskInfo.id}"><spring:message code="edit"/></c:if><c:if test="${empty taskInfo.id}"><spring:message code="add"/></c:if></div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form action="${ctx}/basics/taskInfo/saveOrUpdate" modelAttribute="taskInfo" class="form-horizontal" id="inputForm" method="post" >
|
||||
<sys:message content="${message}"/>
|
||||
<input type="hidden" name="id" value="${taskInfo.id}"/>
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code="task_name"></spring:message>:</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" name="taskName" value="${taskInfo.taskName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code="task_org"></spring:message>:</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" name="taskOrg" value="${taskInfo.taskOrg}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code="task_time"></spring:message>:</label>
|
||||
<div class="col-md-4">
|
||||
<input id="taskTime" name="taskTime" type="text" readonly="readonly" maxlength="20" class="form-control input-medium Wdate"
|
||||
value="<fmt:formatDate value="${taskInfo.taskTime}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group last">
|
||||
<label class="col-md-3 control-label"><th><spring:message code="desc"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" name="taskDesc" value="${taskInfo.taskDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button type="submit" class="btn btn-circle green"><spring:message code="submit"></spring:message></button>
|
||||
<button type="button" class="btn btn-circle grey-salsa btn-outline" onclick="history.go(-1)"><spring:message code="cancel"></spring:message></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.input-medium {
|
||||
width: 200px !important;
|
||||
}
|
||||
.Wdate {
|
||||
border: #c2cad8 1px solid;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#inputForm").validate({
|
||||
rules: {
|
||||
taskName: {
|
||||
required: true,
|
||||
},
|
||||
taskOrg: {
|
||||
required: true,
|
||||
},
|
||||
taskTime: {
|
||||
required: true,
|
||||
},
|
||||
|
||||
},
|
||||
messages: {
|
||||
taskName: {
|
||||
required: '<spring:message code="required"/>',
|
||||
},
|
||||
taskOrg: {
|
||||
required: '<spring:message code="required"/>',
|
||||
},
|
||||
taskTime: {
|
||||
required: '<spring:message code="required"/>',
|
||||
},
|
||||
},
|
||||
submitHandler: function(form){
|
||||
//loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
267
src/main/webapp/WEB-INF/views/basics/taskInfoList.jsp
Normal file
267
src/main/webapp/WEB-INF/views/basics/taskInfoList.jsp
Normal file
@@ -0,0 +1,267 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>专项任务</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/basics/taskInfo/form'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"/></button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="special_task"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="taskInfo" action="${ctx}/basics/taskInfo/list" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${taskInfo.isFilterAction }"/>
|
||||
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="pull-left">
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<input id="taskName" name="taskName" class="form-control input-medium" placeholder=<spring:message code="input_title"/> type="text" value="${taskInfo.taskName }">
|
||||
</div>
|
||||
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default btn-search" type="button" onclick="page()"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"></spring:message> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
|
||||
<button type="button" class="btn btn-default" onclick="edit()">
|
||||
<i class="fa fa-edit"></i> <spring:message code="edit"></spring:message></button>
|
||||
<sys:delRow url="${ctx}/basics/taskInfo/delete" id="contentTable" label="delete"></sys:delRow>
|
||||
<!-- <button type="button" class="btn btn-default">
|
||||
<i class="fa fa-download"></i> 导出</button> -->
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/basics/taskInfo/taskExamine" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/taskInfo/taskExamineNo" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/taskInfo/taskCancelExamine" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏-->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="pull-left">
|
||||
<label><spring:message code="task_time"/>:</label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate" data-options="buttons:buttons"
|
||||
value="<fmt:formatDate value="${taskInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<label><spring:message code="to"/></label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${taskInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="pull-left">
|
||||
<label><spring:message code="operate_time"/>:</label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="dobeginDate" name="dobeginDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${taskInfo.dobeginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<label><spring:message code="to"/></label>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<input id="doendDate" name="doendDate" type="text" readonly="readonly" maxlength="20" class="form-control input-small Wdate"
|
||||
value="<fmt:formatDate value="${taskInfo.doendDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onclick="page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" onclick="resetx()"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
|
||||
</form:form>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <div class="table-responsive"> -->
|
||||
<sys:message content="${message}"/>
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th><spring:message code="seq"></spring:message></th>
|
||||
<th><spring:message code="task_name"></spring:message></th>
|
||||
<th><spring:message code="task_org"></spring:message></th>
|
||||
<th><spring:message code="task_time"></spring:message></th>
|
||||
<th><spring:message code="state"></spring:message></th>
|
||||
<th><spring:message code="operator"></spring:message></th>
|
||||
<th><spring:message code="operate_time"></spring:message></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="taskInfo">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks" id="${taskInfo.id}" value="${taskInfo.isAudit}"></td>
|
||||
<td>${taskInfo.id }</td>
|
||||
<td>${taskInfo.taskName }</td>
|
||||
<td>${taskInfo.taskOrg }</td>
|
||||
<td><fmt:formatDate value="${taskInfo.taskTime }" pattern="yyyy-MM-dd"/></td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${taskInfo.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${taskInfo.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${taskInfo.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td>${taskInfo.creatorName }</td>
|
||||
<td>
|
||||
<!-- 编辑时间为空则显示创建时间 -->
|
||||
<c:choose>
|
||||
<c:when test="${empty taskInfo.editTime}">
|
||||
<fmt:formatDate value="${taskInfo.createTime }" pattern="yyyy-MM-dd"/>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<fmt:formatDate value="${taskInfo.editTime }" pattern="yyyy-MM-dd"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
if("${taskInfo.taskName}"){
|
||||
$("#intype").val("${taskInfo.taskName}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/>"+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
|
||||
$("#taskName").attr("placeholder","<spring:message code='input'/> "+"<spring:message code='task_name'/>");
|
||||
//全选及取消
|
||||
$("#checkAll").change(function(){
|
||||
if($("#checkAll").prop("checked")){
|
||||
$("input.i-checks").prop("checked",true);
|
||||
}else{
|
||||
$("input.i-checks").prop("checked",false);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
function resetx(){
|
||||
// $("#searchForm").reset();
|
||||
$(':input','#searchForm')
|
||||
.not(':button,:submit,:reset,:hidden')
|
||||
.val('')
|
||||
.removeAttr('checked')
|
||||
.removeAttr('selected');
|
||||
}
|
||||
|
||||
|
||||
//查询
|
||||
function page(n,s){
|
||||
|
||||
$("#pageNo").val(n);
|
||||
$("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/basics/taskInfo/list");
|
||||
$("#searchForm").submit();
|
||||
return false;
|
||||
}
|
||||
//编辑
|
||||
function edit(){
|
||||
var cked = $('tbody tr td input.i-checks:checkbox:checked');
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
if(cked.length==1){
|
||||
window.location = "${ctx}/basics/taskInfo/form?id="+cked.attr("id");
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -57,7 +57,7 @@
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" placeholder=<spring:message code="input_title"/> type="text" value="">
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default btn-search" type="button" onclick="page()"><i class="fa fa-search"></i></button>
|
||||
@@ -180,7 +180,7 @@
|
||||
<th><spring:message code="title"></spring:message></th>
|
||||
<th><spring:message code="content"></spring:message></th>
|
||||
<th><spring:message code="special_task"></spring:message></th>
|
||||
<th><spring:message code="operation"></spring:message></th>
|
||||
<%-- <th><spring:message code="operation"></spring:message></th> --%>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -213,8 +213,6 @@
|
||||
<td>${requestInfo.requestTitle }</td>
|
||||
<td>${requestInfo.requestContent }</td>
|
||||
<td>${requestInfo.taskName }</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
@@ -229,7 +227,6 @@
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
if("${requestInfo.requestTitle}"){
|
||||
$("#intype").val("${requestInfo.requestTitle}");
|
||||
@@ -240,7 +237,7 @@
|
||||
if("${requestInfo.requestContent}"){
|
||||
$("#intype").val("${requestInfo.requestContent}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/>"+$("#seltype").find("option:selected").text());
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
@@ -250,7 +247,7 @@
|
||||
});
|
||||
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/>"+$(this).find("option:selected").text());
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//全选及取消
|
||||
$("#checkAll").change(function(){
|
||||
|
||||
Reference in New Issue
Block a user