From 9812f31d6402a268fa6fd35e8c3a2a59582b720d Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期三, 22 二月 2023 15:57:58 +0800
Subject: [PATCH] 增加service
---
src/main/java/com/wgcloud/mapper/InspectionTaskMapper.java | 2
src/main/java/com/wgcloud/mapper/TaskInfoMapper.java | 4
src/main/java/com/wgcloud/service/InspectionTaskService.java | 50 ++
src/main/resources/templates/failurelogging/list.html | 1
src/main/resources/templates/common/aside.html | 4
src/main/java/com/wgcloud/controller/FailureLoggingController.java | 6
src/main/resources/templates/login/login.html | 2
src/main/resources/templates/inspectiontask/add.html | 173 ++++++++
src/main/resources/templates/inspectiontask/infoedit.html | 110 +++++
src/main/java/com/wgcloud/controller/InspectionTaskController.java | 289 ++++++++++++++
src/main/resources/templates/common/footer.html | 4
src/main/java/com/wgcloud/entity/TaskInfo.java | 5
src/main/resources/mybatis/mapper/InspectionTaskMapper.xml | 30 +
src/main/resources/templates/inspectiontask/list.html | 117 +++++
src/main/java/com/wgcloud/service/TaskInfoService.java | 25 +
src/main/resources/mybatis/mapper/TaskInfoMapper.xml | 22 +
src/main/resources/static/js/inspectiontask.js | 39 +
wgcloud-server.iml | 5
src/main/resources/templates/inspectiontask/view.html | 131 ++++++
src/main/java/com/wgcloud/entity/WorkLogging.java | 2
src/main/java/com/wgcloud/service/WorkLoggingService.java | 36 +
src/main/resources/templates/inspectiontask/taskinfo.html | 100 +++++
src/main/resources/mybatis/mapper/WorkLoggingMapper.xml | 8
23 files changed, 1,142 insertions(+), 23 deletions(-)
diff --git a/src/main/java/com/wgcloud/controller/FailureLoggingController.java b/src/main/java/com/wgcloud/controller/FailureLoggingController.java
index 1ec1615..5e8529d 100644
--- a/src/main/java/com/wgcloud/controller/FailureLoggingController.java
+++ b/src/main/java/com/wgcloud/controller/FailureLoggingController.java
@@ -6,6 +6,7 @@
import com.wgcloud.entity.FailureLogging;
import com.wgcloud.service.FailureLoggingService;
import com.wgcloud.service.LogInfoService;
+import com.wgcloud.service.WorkLoggingService;
import com.wgcloud.util.HostUtil;
import com.wgcloud.util.PageUtil;
import com.wgcloud.util.staticvar.StaticKeys;
@@ -40,7 +41,8 @@
private FailureLoggingService failureLoggingService;
@Resource
private LogInfoService logInfoService;
-
+ @Resource
+ private WorkLoggingService workLoggingService;
/**
* 鏍规嵁鏉′欢鏌ヨ璁惧鍒楄〃
*
@@ -76,9 +78,11 @@
if (StringUtils.isEmpty(failureLogging.getId())) {
failureLoggingService.save(failureLogging);
failureLoggingService.saveLog(request, StaticKeys.LOG_ADD, failureLogging);
+ workLoggingService.save(failureLogging);
} else {
failureLoggingService.updateById(failureLogging);
failureLoggingService.saveLog(request, StaticKeys.LOG_UPDATE, failureLogging);
+ workLoggingService.update(failureLogging);
}
} catch (Exception e) {
logger.error("淇濆瓨璁惧鏇存崲鏁版嵁閿欒", e);
diff --git a/src/main/java/com/wgcloud/controller/InspectionTaskController.java b/src/main/java/com/wgcloud/controller/InspectionTaskController.java
new file mode 100644
index 0000000..59ac372
--- /dev/null
+++ b/src/main/java/com/wgcloud/controller/InspectionTaskController.java
@@ -0,0 +1,289 @@
+package com.wgcloud.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.wgcloud.entity.InspectionTask;
+import com.wgcloud.entity.TaskInfo;
+import com.wgcloud.service.InspectionTaskService;
+import com.wgcloud.service.LogInfoService;
+import com.wgcloud.service.TaskInfoService;
+import com.wgcloud.service.WorkLoggingService;
+import com.wgcloud.util.DateUtil;
+import com.wgcloud.util.PageUtil;
+import com.wgcloud.util.staticvar.StaticKeys;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
+import java.util.*;
+
+/**
+ * @author kdq
+ * @version 1.0.0
+ * @ClassName InspectionTaskController.java
+ * @Description TODO
+ * @createTime 2023骞�02鏈�16鏃� 14:22:00
+ */
+@Controller
+@RequestMapping("/inspectionTask")
+public class InspectionTaskController {
+
+ private static final Logger logger = LoggerFactory.getLogger(InspectionTaskController.class);
+
+ @Resource
+ private InspectionTaskService inspectionTaskService;
+ @Resource
+ private LogInfoService logInfoService;
+ @Resource
+ private WorkLoggingService workLoggingService;
+ @Resource
+ private TaskInfoService taskInfoService;
+ /**
+ * 鏍规嵁鏉′欢鏌ヨ璁惧鍒楄〃
+ *
+ * @param model
+ * @param request
+ * @return
+ */
+ @RequestMapping(value = "list")
+ public String failureList(InspectionTask inspectionTask, Model model, HttpServletRequest request) {
+ Map<String, Object> params = new HashMap<String, Object>();
+ try {
+ StringBuffer url = new StringBuffer();
+// if (!StringUtils.isEmpty(InspectionTask.getOldDeviceName())) {
+// url.append("&oldDeviceName=").append(InspectionTask.getOldDeviceName());
+// }
+ PageInfo pageInfo = inspectionTaskService.selectByParams(params, inspectionTask.getPage(), inspectionTask.getPageSize());
+ PageUtil.initPageNumber(pageInfo, model);
+
+
+ model.addAttribute("pageUrl", "/inspectionTask/list?1=1" + url.toString());
+ model.addAttribute("page", pageInfo);
+ model.addAttribute("inspectionTask", inspectionTask);
+ }catch (Exception e){
+ logger.error("鏌ヨ璁惧鏇存崲鍒楄〃閿欒", e);
+ logInfoService.save("鏌ヨ璧勪骇淇℃伅閿欒", e.toString(), StaticKeys.LOG_XTCZ);
+ }
+ return "inspectionTask/list";
+ }
+
+ @RequestMapping(value = "save")
+ public String saveInspectionTask(InspectionTask inspectionTask, Model model, HttpServletRequest request) {
+ try {
+ if (StringUtils.isEmpty(inspectionTask.getId())) {
+ inspectionTaskService.save(inspectionTask);
+ inspectionTaskService.saveLog(request, StaticKeys.LOG_ADD, inspectionTask);
+ workLoggingService.save(inspectionTask);
+ long l = subDaysByDate2(inspectionTask.getStartDate(), inspectionTask.getEndDate());
+ if(l>0){
+ for (long i = 0; i < l; i++) {
+ TaskInfo taskInfo = new TaskInfo();
+ taskInfo.setTaskId(inspectionTask.getId());
+ if(i == 0){
+ taskInfo.setTaskDate(inspectionTask.getStartDate());
+ }else {
+ String s = daysAgoOrAfter(inspectionTask.getStartDate(), new Long(i).intValue());
+ taskInfo.setTaskDate(s);
+ }
+ taskInfo.setIsOk(0);
+ taskInfoService.save(taskInfo);
+ }
+ }
+ } else {
+ inspectionTaskService.updateById(inspectionTask);
+ inspectionTaskService.saveLog(request, StaticKeys.LOG_UPDATE, inspectionTask);
+ workLoggingService.update(inspectionTask);
+ }
+ } catch (Exception e) {
+ logger.error("淇濆瓨璁惧鏇存崲鏁版嵁閿欒", e);
+ logInfoService.save("淇濆瓨璁惧鏇存崲鏁版嵁閿欒", e.toString(), StaticKeys.LOG_XTCZ);
+ }
+ return "redirect:/inspectionTask/list";
+ }
+
+ @RequestMapping(value = "save2")
+ public String save2(TaskInfo taskInfo) {
+ try {
+ taskInfoService.updateById(taskInfo);
+ } catch (Exception e) {
+ logger.error("淇敼浠诲姟璇︽儏閿欒", e);
+ logInfoService.save("淇敼浠诲姟璇︽儏閿欒", e.toString(), StaticKeys.LOG_XTCZ);
+ }
+ return "redirect:/inspectionTask/detail?id="+taskInfo.getTaskId();
+ }
+
+ /**
+ * 娣诲姞
+ *
+ * @param model
+ * @param request
+ * @return
+ */
+ @RequestMapping(value = "edit")
+ public String edit(Model model, HttpServletRequest request) {
+ String errorMsg = "娣诲姞璁惧";
+ String id = request.getParameter("id");
+ InspectionTask inspectionTask = new InspectionTask();
+ try {
+ if (StringUtils.isEmpty(id)) {
+ model.addAttribute("inspectionTask", inspectionTask);
+ return "inspectionTask/add";
+ }
+ inspectionTask = inspectionTaskService.selectById(id);
+ model.addAttribute("inspectionTask", inspectionTask);
+ } catch (Exception e) {
+ logger.error(errorMsg, e);
+ logInfoService.save(errorMsg, e.toString(), StaticKeys.LOG_XTCZ);
+ }
+ return "inspectionTask/add";
+ }
+
+ /**
+ * 娣诲姞
+ *
+ * @param model
+ * @param request
+ * @return
+ */
+ @RequestMapping(value = "edit2")
+ public String edit2(Model model, HttpServletRequest request) {
+ String errorMsg = "淇敼浠诲姟璇︽儏";
+ String id = request.getParameter("id");
+ TaskInfo taskInfo = new TaskInfo();
+ try {
+ if (StringUtils.isEmpty(id)) {
+ model.addAttribute("taskInfo", taskInfo);
+ return "inspectionTask/infoedit";
+ }
+ taskInfo = taskInfoService.selectById(id);
+ model.addAttribute("taskInfo", taskInfo);
+ } catch (Exception e) {
+ logger.error(errorMsg, e);
+ logInfoService.save(errorMsg, e.toString(), StaticKeys.LOG_XTCZ);
+ }
+ return "inspectionTask/infoedit";
+ }
+
+ /**
+ * 鏌ョ湅璇ュ簲鐢ㄧ粺璁″浘
+ *
+ * @param model
+ * @param request
+ * @return
+ */
+ @RequestMapping(value = "view")
+ public String viewChart(Model model, HttpServletRequest request) {
+ String errorMsg = "鏌ョ湅璁惧鏇存崲閿欒";
+ String id = request.getParameter("id");
+ InspectionTask inspectionTask = new InspectionTask();
+ try {
+ inspectionTask = inspectionTaskService.selectById(id);
+ model.addAttribute("inspectionTask", inspectionTask);
+ } catch (Exception e) {
+ logger.error(errorMsg, e);
+ logInfoService.save(errorMsg, e.toString(), StaticKeys.LOG_XTCZ);
+ }
+ return "inspectionTask/view";
+ }
+
+
+ /**
+ * 鍒犻櫎璁惧
+ *
+ * @param
+ * @param model
+ * @param request
+ * @param redirectAttributes
+ * @return
+ */
+ @RequestMapping(value = "del")
+ public String delete(Model model, HttpServletRequest request, RedirectAttributes redirectAttributes) {
+ String errorMsg = "鍒犻櫎鏇存崲璁惧閿欒";
+ InspectionTask inspectionTask = new InspectionTask();
+ try {
+ if (!StringUtils.isEmpty(request.getParameter("id"))) {
+ String[] ids = request.getParameter("id").split(",");
+ for (String id : ids) {
+ inspectionTask = inspectionTaskService.selectById(id);
+ inspectionTaskService.saveLog(request, StaticKeys.LOG_DEL, inspectionTask);
+ }
+ inspectionTaskService.deleteById(ids);
+ }
+ } catch (Exception e) {
+ logger.error(errorMsg, e);
+ logInfoService.save(errorMsg, e.toString(), StaticKeys.LOG_XTCZ);
+ }
+ return "redirect:/inspectionTask/list";
+ }
+
+ /**
+ * 鏌ョ湅浠诲姟璇︽儏
+ *
+ * @param model
+ * @param request
+ * @return
+ */
+ @RequestMapping(value = "detail")
+ public String detail(Model model, HttpServletRequest request) {
+
+ try {
+ String id = request.getParameter("id");
+ List<TaskInfo> allByTaskId = taskInfoService.getAllByTaskId(id);
+ model.addAttribute("taskInfos", allByTaskId);
+ }catch (Exception e){
+ logger.error("鏌ヨ浠诲姟璇︽儏閿欒", e);
+ logInfoService.save("鏌ヨ浠诲姟璇︽儏閿欒", e.toString(), StaticKeys.LOG_XTCZ);
+ }
+ return "inspectionTask/taskinfo";
+ }
+
+ /**
+ * 鑾峰彇涓や釜鏃ユ湡鐩稿樊鐨勫ぉ鏁� 鏂规硶浜�
+ *
+ * @param startDate 寮�濮嬫棩鏈熺殑瀛楃涓�
+ * @param endDate 缁撴潫鏃ユ湡鐨勫瓧绗︿覆
+ * @return 鐩稿樊澶╂暟锛屽鏋滆В鏋愬け璐ュ垯杩斿洖-1
+ **/
+ private long subDaysByDate2(String startDate, String endDate) {
+ long sub;
+ try {
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+ LocalDate start = LocalDate.parse(startDate, dateTimeFormatter);
+ LocalDate end = LocalDate.parse(endDate, dateTimeFormatter);
+
+ sub = end.toEpochDay() - start.toEpochDay();
+ } catch (DateTimeParseException e) {
+ sub = -1;
+ }
+ return sub;
+ }
+
+ private String daysAgoOrAfter(String startDate,int amount){
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Date d = new Date();
+ try {
+ d= sdf.parse(startDate);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ Calendar mon = Calendar.getInstance();
+ mon.setTime(d);
+ mon.add(Calendar.DATE,amount);
+ Date time = mon.getTime();
+ String format = sdf.format(time);
+ return format;
+ }
+
+
+
+}
diff --git a/src/main/java/com/wgcloud/entity/TaskInfo.java b/src/main/java/com/wgcloud/entity/TaskInfo.java
index 0ef838c..2916a8b 100644
--- a/src/main/java/com/wgcloud/entity/TaskInfo.java
+++ b/src/main/java/com/wgcloud/entity/TaskInfo.java
@@ -1,5 +1,7 @@
package com.wgcloud.entity;
+import lombok.Data;
+
/**
* @author kdq
* @version 1.0.0
@@ -7,6 +9,7 @@
* @Description TODO
* @createTime 2022骞�12鏈�12鏃� 15:33:00
*/
+@Data
public class TaskInfo extends BaseEntity{
/**
@@ -31,7 +34,7 @@
/**
- * 浠诲姟瀹屾垚璇︽儏
+ * 浠诲姟璇︽儏
*/
private String content;
diff --git a/src/main/java/com/wgcloud/entity/WorkLogging.java b/src/main/java/com/wgcloud/entity/WorkLogging.java
index c2e83d5..f941015 100644
--- a/src/main/java/com/wgcloud/entity/WorkLogging.java
+++ b/src/main/java/com/wgcloud/entity/WorkLogging.java
@@ -32,6 +32,6 @@
/**
* 鎿嶄綔鏃ュ織
*/
- private String content;
+ private String contentText;
}
diff --git a/src/main/java/com/wgcloud/mapper/InspectionTaskMapper.java b/src/main/java/com/wgcloud/mapper/InspectionTaskMapper.java
index 00c9b3f..b6a02c0 100644
--- a/src/main/java/com/wgcloud/mapper/InspectionTaskMapper.java
+++ b/src/main/java/com/wgcloud/mapper/InspectionTaskMapper.java
@@ -35,4 +35,6 @@
public void insertList(List<InspectionTask> recordList) throws Exception;
public int deleteById(String[] id) throws Exception;
+
+ void updateById(InspectionTask inspectionTask);
}
diff --git a/src/main/java/com/wgcloud/mapper/TaskInfoMapper.java b/src/main/java/com/wgcloud/mapper/TaskInfoMapper.java
index 05548b8..1da85b6 100644
--- a/src/main/java/com/wgcloud/mapper/TaskInfoMapper.java
+++ b/src/main/java/com/wgcloud/mapper/TaskInfoMapper.java
@@ -32,4 +32,8 @@
public int deleteById(String[] id) throws Exception;
+
+ List<TaskInfo> getAllByTaskId(String id);
+
+ void updateById(TaskInfo taskInfo);
}
diff --git a/src/main/java/com/wgcloud/service/InspectionTaskService.java b/src/main/java/com/wgcloud/service/InspectionTaskService.java
index 3579f98..04a34f9 100644
--- a/src/main/java/com/wgcloud/service/InspectionTaskService.java
+++ b/src/main/java/com/wgcloud/service/InspectionTaskService.java
@@ -1,10 +1,22 @@
package com.wgcloud.service;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.wgcloud.entity.FailureLogging;
import com.wgcloud.entity.InspectionTask;
import com.wgcloud.entity.TaskInfo;
import com.wgcloud.mapper.InspectionTaskMapper;
+import com.wgcloud.util.DateUtil;
+import com.wgcloud.util.HostUtil;
+import com.wgcloud.util.UUIDUtil;
+import com.wgcloud.util.staticvar.StaticKeys;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
/**
* @author kdq
@@ -18,8 +30,46 @@
@Autowired
private InspectionTaskMapper inspectionTaskMapper;
+ @Autowired
+ private LogInfoService logInfoService;
public void save(InspectionTask inspectionTask) throws Exception {
+ inspectionTask.setId(UUIDUtil.getUUID());
+ inspectionTask.setCreateTime(DateUtil.getCurrentDateTime());
inspectionTaskMapper.save(inspectionTask);
}
+
+ public PageInfo selectByParams(Map<String, Object> params, Integer currPage, Integer pageSize)throws Exception {
+ PageHelper.startPage(currPage, pageSize);
+ List<InspectionTask> list = inspectionTaskMapper.selectByParams(params);
+ PageInfo<InspectionTask> pageInfo = new PageInfo<InspectionTask>(list);
+ return pageInfo;
+ }
+
+ /**
+ * 淇濆瓨鎿嶄綔鏃ュ織
+ *
+ * @param request 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛
+ * @param action 鎿嶄綔鏍囪瘑
+ */
+ public void saveLog(HttpServletRequest request, String action, InspectionTask inspectionTask) {
+ if (null == inspectionTask) {
+ return;
+ }
+ logInfoService.save(HostUtil.getAccountByRequest(request).getAccount() + action + "宸℃浠诲姟锛�" + inspectionTask.getTitle(),
+ "鍒涘缓鏃堕棿锛�" + inspectionTask.getCreateTime()+",鍛ㄦ湡:"+inspectionTask.getStartDate()+"-"+inspectionTask.getEndDate(), StaticKeys.LOG_XTCZ);
+ }
+
+ public InspectionTask selectById(String id)throws Exception {
+ return inspectionTaskMapper.selectById(id);
+ }
+
+ public void deleteById(String[] ids)throws Exception {
+ inspectionTaskMapper.deleteById(ids);
+ }
+
+ public void updateById(InspectionTask inspectionTask)
+ throws Exception {
+ inspectionTaskMapper.updateById(inspectionTask);
+ }
}
diff --git a/src/main/java/com/wgcloud/service/TaskInfoService.java b/src/main/java/com/wgcloud/service/TaskInfoService.java
index 11706e8..843c4eb 100644
--- a/src/main/java/com/wgcloud/service/TaskInfoService.java
+++ b/src/main/java/com/wgcloud/service/TaskInfoService.java
@@ -1,12 +1,17 @@
package com.wgcloud.service;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
import com.wgcloud.entity.FailureLogging;
+import com.wgcloud.entity.InspectionTask;
import com.wgcloud.entity.TaskInfo;
import com.wgcloud.mapper.TaskInfoMapper;
+import com.wgcloud.util.UUIDUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
+import java.util.Map;
/**
* @author kdq
@@ -22,10 +27,30 @@
private TaskInfoMapper taskInfoMapper;
public void save(TaskInfo taskInfo) throws Exception {
+ taskInfo.setId(UUIDUtil.getUUID());
taskInfoMapper.save(taskInfo);
}
public void saveAll(List<TaskInfo> taskInfos) throws Exception {
taskInfoMapper.insertList(taskInfos);
}
+
+ public List<TaskInfo> getAllByTaskId(String id) {
+ return taskInfoMapper.getAllByTaskId(id);
+ }
+
+ public PageInfo selectByParams(Map<String, Object> params, Integer currPage, Integer pageSize) throws Exception {
+ PageHelper.startPage(currPage, pageSize);
+ List<TaskInfo> list = taskInfoMapper.selectByParams(params);
+ PageInfo<TaskInfo> pageInfo = new PageInfo<TaskInfo>(list);
+ return pageInfo;
+ }
+
+ public TaskInfo selectById(String id) throws Exception {
+ return taskInfoMapper.selectById(id);
+ }
+
+ public void updateById(TaskInfo taskInfo) {
+ taskInfoMapper.updateById(taskInfo);
+ }
}
diff --git a/src/main/java/com/wgcloud/service/WorkLoggingService.java b/src/main/java/com/wgcloud/service/WorkLoggingService.java
index 609fcf6..163975b 100644
--- a/src/main/java/com/wgcloud/service/WorkLoggingService.java
+++ b/src/main/java/com/wgcloud/service/WorkLoggingService.java
@@ -37,9 +37,23 @@
public void save(FailureLogging failureLogging) throws Exception {
WorkLogging workLogging = new WorkLogging();
workLogging.setId(UUIDUtil.getUUID());
- workLogging.setWorkDate(failureLogging.getPersonDate());
+ workLogging.setWorkDate(DateUtil.getCurrentDate());
workLogging.setUsername(failureLogging.getPersonName());
- workLogging.setContent("鏇存崲ip涓�"+failureLogging.getOldDeviceIp()+"鐨�"+failureLogging.getOldDeviceModel()+",鏇挎崲涓�"+failureLogging.getNewDeviceIp()+"鐨�"+failureLogging.getNewDeviceModel());
+ workLogging.setContentText("鏇存崲ip涓�"+failureLogging.getOldDeviceIp()+"鐨�"+failureLogging.getOldDeviceModel()+",鏇挎崲涓�"+failureLogging.getNewDeviceIp()+"鐨�"+failureLogging.getNewDeviceModel());
+ workLoggingMapper.save(workLogging);
+ }
+
+ /**
+ * 淇濆瓨鏇存崲璁惧鏃ュ織
+ * @param failureLogging
+ * @throws Exception
+ */
+ public void update(FailureLogging failureLogging) throws Exception {
+ WorkLogging workLogging = new WorkLogging();
+ workLogging.setId(UUIDUtil.getUUID());
+ workLogging.setWorkDate(DateUtil.getCurrentDate());
+ workLogging.setUsername(failureLogging.getPersonName());
+ workLogging.setContentText("淇敼ip涓�"+failureLogging.getOldDeviceIp()+"鐨�"+failureLogging.getOldDeviceModel()+"璁惧,淇敼涓�"+failureLogging.getNewDeviceIp()+"鐨�"+failureLogging.getNewDeviceModel());
workLoggingMapper.save(workLogging);
}
@@ -51,9 +65,23 @@
public void save(InspectionTask inspectionTask) throws Exception {
WorkLogging workLogging = new WorkLogging();
workLogging.setId(UUIDUtil.getUUID());
- workLogging.setWorkDate(inspectionTask.getCreateTime());
+ workLogging.setWorkDate(DateUtil.getCurrentDate());
workLogging.setUsername("绠$悊鍛�");
- workLogging.setContent("鍒涚珛"+inspectionTask.getStartDate()+"-"+inspectionTask.getEndDate()+"鐨勪换鍔★紝鏍囬涓�"+inspectionTask.getTitle());
+ workLogging.setContentText("鍒涚珛"+inspectionTask.getStartDate()+"鍒�"+inspectionTask.getEndDate()+"鐨勪换鍔★紝鏍囬涓�"+inspectionTask.getTitle());
+ workLoggingMapper.save(workLogging);
+ }
+
+ /**
+ * 淇濆瓨鍒涚珛浠诲姟鏃ュ織
+ * @param
+ * @throws Exception
+ */
+ public void update(InspectionTask inspectionTask) throws Exception {
+ WorkLogging workLogging = new WorkLogging();
+ workLogging.setId(UUIDUtil.getUUID());
+ workLogging.setWorkDate(DateUtil.getCurrentDate());
+ workLogging.setUsername("绠$悊鍛�");
+ workLogging.setContentText("淇敼"+inspectionTask.getStartDate()+"鍒�"+inspectionTask.getEndDate()+"鐨勪换鍔�");
workLoggingMapper.save(workLogging);
}
}
diff --git a/src/main/resources/mybatis/mapper/InspectionTaskMapper.xml b/src/main/resources/mybatis/mapper/InspectionTaskMapper.xml
index ee8b284..0672d2f 100644
--- a/src/main/resources/mybatis/mapper/InspectionTaskMapper.xml
+++ b/src/main/resources/mybatis/mapper/InspectionTaskMapper.xml
@@ -22,8 +22,36 @@
</if>
</sql>
+ <update id="updateById" parameterType="com.wgcloud.entity.InspectionTask">
+ UPDATE INSPECTION_TASK
+ <set>
+ <if test="title != null">
+ TITLE = #{title},
+ </if>
+ <if test="type != null">
+ TYPE = #{type},
+ </if>
+ <if test="period != null">
+ PERIOD = #{period},
+ </if>
+ <if test="scope != null">
+ SCOPE = #{scope},
+ </if>
+ <if test="startDate != null">
+ START_DATE = #{startDate},
+ </if>
+ <if test="endDate != null">
+ END_DATE = #{endDate},
+ </if>
+ <if test="createTime != null">
+ CREATE_TIME = #{createTime},
+ </if>
+ </set>
+ WHERE ID = #{id}
+ </update>
- <select id="selectById" resultMap="resultMap" parameterType="java.lang.String">
+
+ <select id="selectById" resultMap="resultMap" parameterType="java.lang.String">
SELECT
<include refid="tableColumnList" />
FROM INSPECTION_TASK WHERE ID=#{id}
diff --git a/src/main/resources/mybatis/mapper/TaskInfoMapper.xml b/src/main/resources/mybatis/mapper/TaskInfoMapper.xml
index d7d0024..2cfe149 100644
--- a/src/main/resources/mybatis/mapper/TaskInfoMapper.xml
+++ b/src/main/resources/mybatis/mapper/TaskInfoMapper.xml
@@ -18,6 +18,21 @@
<![CDATA[ AND TASK_ID = #{taskId} ]]>
</if>
</sql>
+ <update id="updateById" parameterType="com.wgcloud.entity.TaskInfo">
+ update TASK_INFO
+ <set>
+ <if test="taskDate != null">
+ TASK_DATE = #{taskDate},
+ </if>
+ <if test="isOk != null">
+ IS_OK = #{isOk},
+ </if>
+ <if test="content != null">
+ CONTENT = #{content},
+ </if>
+ </set>
+ WHERE ID = #{id}
+ </update>
<select id="selectById" resultMap="resultMap" parameterType="java.lang.String">
SELECT
@@ -87,5 +102,12 @@
</where>
</select>
+ <select id="getAllByTaskId" resultMap="resultMap">
+ SELECT
+ <include refid="tableColumnList" />
+ FROM TASK_INFO
+ WHERE TASK_ID=#{id}
+ </select>
+
</mapper>
diff --git a/src/main/resources/mybatis/mapper/WorkLoggingMapper.xml b/src/main/resources/mybatis/mapper/WorkLoggingMapper.xml
index cbfcacd..f6d1a27 100644
--- a/src/main/resources/mybatis/mapper/WorkLoggingMapper.xml
+++ b/src/main/resources/mybatis/mapper/WorkLoggingMapper.xml
@@ -5,7 +5,7 @@
<id column="ID" property="id" jdbcType="CHAR" />
<result column="USERNAME" property="username" jdbcType="CHAR" />
<result column="WORK_DATE" property="workDate" jdbcType="TIMESTAMP" />
- <result column="CONTENT" property="content" jdbcType="CHAR" />
+ <result column="CONTENT_TEXT" property="contentText" jdbcType="CHAR" />
</resultMap>
<sql id="tableColumnList">
@@ -69,14 +69,14 @@
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >ID,</if>
<if test="username != null" >USERNAME,</if>
- <if test="workDate != null" >WORK_DATE</if>
- <if test="content != null" >CONTENT</if>
+ <if test="workDate != null" >WORK_DATE,</if>
+ <if test="contentText != null" >CONTENT_TEXT</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >#{id},</if>
<if test="username != null" >#{username},</if>
<if test="workDate != null" >#{workDate},</if>
- <if test="content != null" >#{content}</if>
+ <if test="contentText != null" >#{contentText}</if>
</trim>
</insert>
diff --git a/src/main/resources/static/js/inspectiontask.js b/src/main/resources/static/js/inspectiontask.js
new file mode 100644
index 0000000..fabe70d
--- /dev/null
+++ b/src/main/resources/static/js/inspectiontask.js
@@ -0,0 +1,39 @@
+
+function add() {
+ window.location.href = "/tssw/inspectionTask/edit";
+}
+
+function add2() {
+ window.location.href = "/tssw/inspectionTask/infoEdit";
+}
+
+function searchByAccount() {
+ window.location.href = "/tssw/inspectionTask/list";
+}
+
+function view(id) {
+ window.location.href = "/tssw/inspectionTask/view?id="+id;
+}
+
+function edit(id){
+ window.location.href = "/tssw/inspectionTask/edit?id="+id;
+}
+
+function edit2(id){
+ window.location.href = "/tssw/inspectionTask/edit2?id="+id;
+}
+
+function del(id) {
+ if(confirm('浣犵‘瀹氳鍒犻櫎鍚楋紵')) {
+ window.location.href = "/tssw/inspectionTask/del?id=" + id;
+ }
+}
+
+function detail(id) {
+ window.location.href = "/tssw/inspectionTask/detail?id="+id;
+}
+
+
+function cancel(){
+ history.back();
+}
diff --git a/src/main/resources/templates/common/aside.html b/src/main/resources/templates/common/aside.html
index eb2263b..cf47d75 100644
--- a/src/main/resources/templates/common/aside.html
+++ b/src/main/resources/templates/common/aside.html
@@ -431,10 +431,10 @@
<ul class="nav nav-treeview">
<li class="nav-item">
<th:block th:if="${session.menuActive eq '81'}">
- <a th:href="@{'/failurelogging/tuopuListHost'}" class="nav-link active">
+ <a th:href="@{'/inspectionTask/list'}" class="nav-link active">
</th:block>
<th:block th:unless="${session.menuActive eq '81'}">
- <a th:href="@{'/failurelogging/tuopuListHost'}" class="nav-link">
+ <a th:href="@{'/inspectionTask/list'}" class="nav-link">
</th:block>
<i class="nav-icon far fa-circle text-info"></i>
<p>宸℃璁″垝</p>
diff --git a/src/main/resources/templates/common/footer.html b/src/main/resources/templates/common/footer.html
index 4f21304..8e9c1c3 100644
--- a/src/main/resources/templates/common/footer.html
+++ b/src/main/resources/templates/common/footer.html
@@ -2,7 +2,7 @@
<footer class="main-footer">
<input type="hidden" id="serverInfoIdentify" th:value="${application.serverInfoId}"/>
<th:block th:if="${application.copyRight eq 'true'}">
- <strong>Copyright ©2017-<span id="copyyear">now</span> <a target="_blank" href="http://www.wgstart.com">www.wgstart.com</a>.</strong>
+ <strong>Copyright ©2017-<span id="copyyear">now</span> <a target="_blank" href="http://www.10086.cn/">涓浗绉诲姩</a></strong>
All Rights Reserved.
</th:block>
<th:block th:if="${application.copyRight eq 'false'}"> </th:block>
@@ -110,4 +110,4 @@
//鍚敤寮瑰嚭妗唒opover
$("[data-toggle='popover']").popover();
-</script>
\ No newline at end of file
+</script>
diff --git a/src/main/resources/templates/failurelogging/list.html b/src/main/resources/templates/failurelogging/list.html
index 20412ec..465c3c3 100644
--- a/src/main/resources/templates/failurelogging/list.html
+++ b/src/main/resources/templates/failurelogging/list.html
@@ -96,7 +96,6 @@
<button type="button" th:onclick="edit([[${item.id}]])" class="btn bg-gradient-primary btn-sm">缂栬緫</button>
<button type="button" th:onclick="del([[${item.id}]])" class="btn bg-gradient-danger btn-sm">鍒犻櫎</button>
</th:block>
- <button type="button" th:onclick="view([[${item.id}]])" class="btn bg-gradient-primary btn-sm">鏌ョ湅</button></td>
</tr>
</th:block>
diff --git a/src/main/resources/templates/inspectiontask/add.html b/src/main/resources/templates/inspectiontask/add.html
new file mode 100644
index 0000000..a834b1d
--- /dev/null
+++ b/src/main/resources/templates/inspectiontask/add.html
@@ -0,0 +1,173 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <div th:replace="common/header.html"></div>
+
+</head>
+<body th:class="${application.sidebarCollapse}">
+<div th:replace="common/chart.html"></div>
+
+<div class="wrapper">
+
+ <div th:replace="common/navbar.html"></div>
+
+ <div th:replace="common/aside.html"></div>
+
+ <!-- Content Wrapper. Contains page content -->
+ <div class="content-wrapper" style="font-size:0.90rem">
+ <!-- Content Header (Page header) -->
+ <section class="content-header">
+ <div class="container-fluid">
+ <div class="row mb-2">
+ <div class="col-sm-6">
+ <h1></h1>
+ </div>
+ <div class="col-sm-6">
+ <ol class="breadcrumb float-sm-right">
+ <li class="breadcrumb-item active"></li>
+ </ol>
+ </div>
+ </div>
+ </div><!-- /.container-fluid -->
+ </section>
+
+ <!-- Main content -->
+ <section class="content">
+ <div class="container-fluid">
+ <div class="row">
+
+ <div class="col-md-10">
+ <div class="card card-primary">
+ <div class="card-header">
+ <h3 class="card-title">娣诲姞宸℃璁″垝</h3>
+ <div class=" float-sm-right">
+ <a href="javascript:history.back()">杩斿洖</a>
+ </div>
+ </div>
+ <!-- /.card-header -->
+ <!-- form start -->
+ <form role="form" id="form1" th:action="@{'/inspectionTask/save'}">
+ <input type="hidden" name="id" th:value="${inspectionTask.id}"/>
+ <div class="card-body">
+ <div class="row">
+ <div class="col-md-6">
+ <div class="form-group">
+ <label><font color="red">*</font>鏍囬</label>
+ <input type="text" autocomplete="off" th:value="${inspectionTask.title}" class="validate[required,maxSize[50]] form-control" name="title" id="title" placeholder="">
+ </div>
+ <div class="form-group">
+ <label>绫诲瀷</label>
+ <input type="text" autocomplete="off" th:value="${inspectionTask.type}" class="validate[maxSize[50]] form-control" name="type" id="type" placeholder="">
+ </div>
+ <div class="form-group">
+ <label>鍛ㄦ湡</label>
+ <input type="text" autocomplete="off" th:value="${inspectionTask.period}" class="validate[maxSize[50]] form-control" name="period" id="period" placeholder="">
+ </div>
+
+
+ </div>
+ <div class="col-md-6">
+ <div class="form-group">
+ <label>寮�濮嬫椂闂�</label>
+ <input type="text" autocomplete="off" th:value="${inspectionTask.startDate}" class="validate[maxSize[50]] form-control" name="startDate" id="startDate" placeholder="">
+ </div>
+
+ <div class="form-group">
+ <label>缁撴潫鏃堕棿</label>
+ <input type="text" autocomplete="off" th:value="${inspectionTask.endDate}" class="validate[maxSize[50]] form-control" name="endDate" id="endDate" placeholder="">
+ </div>
+ <div class="form-group">
+ <label>浠诲姟鑼冨洿</label>
+ <input type="text" autocomplete="off" th:value="${inspectionTask.scope}" class="validate[maxSize[50]] form-control" name="scope" id="scope" placeholder="">
+ </div>
+ </div>
+
+ </div>
+
+ </div>
+ <!-- /.card-body -->
+
+ <div class="card-footer">
+ <button type="submit" class="btn btn-primary btn-sm" style="margin-right:10px;">淇� 瀛�</button>
+ <button type="button" th:onclick="goback()" class="btn bg-gradient-danger btn-sm">杩� 鍥�</button>
+ </div>
+
+ </form>
+ <!-- /.card-body -->
+ </div>
+ <!-- /.card -->
+
+
+ </div>
+
+ </div>
+ </div>
+ </section>
+ </div>
+
+
+ <div th:replace="common/footer.html"></div>
+
+</div>
+<!-- ./wrapper -->
+<link rel="stylesheet" th:href="@{'/static/js/jQuery/validationEngine.jquery.css'}" type="text/css"/>
+<script th:src="@{'/static/js/jQuery/jquery.validationEngine-zh_CN.js'}" type="text/javascript" charset="utf-8"></script>
+<script th:src="@{'/static/js/jQuery/jquery.validationEngine.js'}" type="text/javascript" charset="utf-8"></script>
+<script th:inline="javascript">
+ $(document).ready(function(){
+ $("#form1").validationEngine();
+ var caigouDateResponse =[[${inspectionTask.startDate}]];
+ var caigouDateResponse2 =[[${inspectionTask.endDate}]];
+ var caigouDate = $('#startDate');
+ var caigouDate2 = $('#endDate');
+ if(caigouDate!=null && caigouDate != undefined){
+ caigouDate.daterangepicker({
+ singleDatePicker: true,
+ showDropdowns: true,
+ // timePicker: true,
+ // timePicker24Hour : true,
+ // autoUpdateInput: false,
+ "opens": "center",
+ "locale": {
+ format: 'YYYY-MM-DD',
+ applyLabel: "搴旂敤",
+ cancelLabel: "鍙栨秷",
+ daysOfWeek: ['鏃�', '涓�', '浜�', '涓�', '鍥�', '浜�', '鍏�'],
+ monthNames: ['涓�鏈�', '浜屾湀', '涓夋湀', '鍥涙湀', '浜旀湀', '鍏湀', '涓冩湀', '鍏湀', '涔濇湀', '鍗佹湀', '鍗佷竴鏈�', '鍗佷簩鏈�'],
+ }
+ });
+ if(caigouDateResponse=='' || caigouDateResponse==null){
+ caigouDate.val("");
+ }
+ }
+
+ if(caigouDate2!=null && caigouDate2 != undefined){
+ caigouDate2.daterangepicker({
+ singleDatePicker: true,
+ showDropdowns: true,
+ // timePicker: true,
+ // timePicker24Hour : true,
+ // autoUpdateInput: false,
+ "opens": "center",
+ "locale": {
+ format: 'YYYY-MM-DD',
+ applyLabel: "搴旂敤",
+ cancelLabel: "鍙栨秷",
+ daysOfWeek: ['鏃�', '涓�', '浜�', '涓�', '鍥�', '浜�', '鍏�'],
+ monthNames: ['涓�鏈�', '浜屾湀', '涓夋湀', '鍥涙湀', '浜旀湀', '鍏湀', '涓冩湀', '鍏湀', '涔濇湀', '鍗佹湀', '鍗佷竴鏈�', '鍗佷簩鏈�'],
+ }
+ });
+ if(caigouDateResponse2=='' || caigouDateResponse2==null){
+ caigouDate2.val("");
+ }
+ }
+
+ });
+
+
+ function goback() {
+ history.back();
+ }
+</script>
+</body>
+</html>
diff --git a/src/main/resources/templates/inspectiontask/infoedit.html b/src/main/resources/templates/inspectiontask/infoedit.html
new file mode 100644
index 0000000..c1723b2
--- /dev/null
+++ b/src/main/resources/templates/inspectiontask/infoedit.html
@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <div th:replace="common/header.html"></div>
+
+</head>
+<body th:class="${application.sidebarCollapse}">
+<div th:replace="common/chart.html"></div>
+
+<div class="wrapper">
+
+ <div th:replace="common/navbar.html"></div>
+
+ <div th:replace="common/aside.html"></div>
+
+ <!-- Content Wrapper. Contains page content -->
+ <div class="content-wrapper" style="font-size:0.90rem">
+ <!-- Content Header (Page header) -->
+ <section class="content-header">
+ <div class="container-fluid">
+ <div class="row mb-2">
+ <div class="col-sm-6">
+ <h1></h1>
+ </div>
+ <div class="col-sm-6">
+ <ol class="breadcrumb float-sm-right">
+ <li class="breadcrumb-item active"></li>
+ </ol>
+ </div>
+ </div>
+ </div><!-- /.container-fluid -->
+ </section>
+
+ <!-- Main content -->
+ <section class="content">
+ <div class="container-fluid">
+ <div class="row">
+
+ <div class="col-md-10">
+ <div class="card card-primary">
+ <div class="card-header">
+ <h3 class="card-title">淇敼浠诲姟</h3>
+ <div class=" float-sm-right">
+ <a href="javascript:history.back()">杩斿洖</a>
+ </div>
+ </div>
+ <!-- /.card-header -->
+ <!-- form start -->
+ <form role="form" id="form1" th:action="@{'/inspectionTask/save2'}">
+ <input type="hidden" name="id" th:value="${taskInfo.id}"/>
+ <input type="hidden" name="taskId" th:value="${taskInfo.taskId}"/>
+ <div class="card-body">
+ <div class="row">
+ <div class="col-md-6">
+ <div class="form-group">
+ <label><font color="red">*</font>浠诲姟鏃堕棿</label>
+ <input type="text" autocomplete="off" th:value="${taskInfo.taskDate}" class="validate[required,maxSize[50]] form-control" name="taskDate" id="taskDate" placeholder="">
+ </div>
+ <div class="form-group">
+ <label>鏄惁瀹屾垚</label>
+ <select class="validate[required] form-control" name="isOk" id="isOk">
+ <option value="0">鏈畬鎴�</option>
+ <option value="1">瀹屾垚</option>
+ </select>
+ </div>
+ <div class="form-group">
+ <label>浠诲姟璇︽儏</label>
+ <input type="text" autocomplete="off" th:value="${taskInfo.content}" class="validate[maxSize[50]] form-control" name="content" id="content" placeholder="">
+ </div>
+
+
+ </div>
+ </div>
+
+ </div>
+ <!-- /.card-body -->
+
+ <div class="card-footer">
+ <button type="submit" class="btn btn-primary btn-sm" style="margin-right:10px;">淇� 瀛�</button>
+ <button type="button" th:onclick="goback()" class="btn bg-gradient-danger btn-sm">杩� 鍥�</button>
+ </div>
+
+ </form>
+ <!-- /.card-body -->
+ </div>
+ <!-- /.card -->
+
+
+ </div>
+
+ </div>
+ </div>
+ </section>
+ </div>
+
+
+ <div th:replace="common/footer.html"></div>
+
+</div>
+<!-- ./wrapper -->
+<link rel="stylesheet" th:href="@{'/static/js/jQuery/validationEngine.jquery.css'}" type="text/css"/>
+<script th:src="@{'/static/js/jQuery/jquery.validationEngine-zh_CN.js'}" type="text/javascript" charset="utf-8"></script>
+<script th:src="@{'/static/js/jQuery/jquery.validationEngine.js'}" type="text/javascript" charset="utf-8"></script>
+<script th:inline="javascript">
+ function goback() {
+ history.back();
+ }
+</script>
+</body>
+</html>
diff --git a/src/main/resources/templates/inspectiontask/list.html b/src/main/resources/templates/inspectiontask/list.html
new file mode 100644
index 0000000..9e1e6de
--- /dev/null
+++ b/src/main/resources/templates/inspectiontask/list.html
@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <div th:replace="common/header.html"></div>
+
+
+</head>
+<body th:class="${application.sidebarCollapse}">
+<div th:replace="common/chart.html"></div>
+
+<div class="wrapper">
+
+ <div th:replace="common/navbar.html"></div>
+
+ <div th:replace="common/aside.html"></div>
+
+ <!-- Content Wrapper. Contains page content -->
+ <div class="content-wrapper" style="font-size:0.90rem">
+ <!-- Content Header (Page header) -->
+ <section class="content-header" style="height:38px">
+ <div class="container-fluid">
+ <div class="row mb-2" style="margin-top: -7px;">
+ <div class="col-sm-6"></div>
+ <div class="col-sm-6">
+ <ol class="breadcrumb float-sm-right">
+ <li class="breadcrumb-item"><a href="javascript:history.back()">杩斿洖涓婄骇</a></li>
+ </ol>
+ </div>
+ </div>
+ </div><!-- /.container-fluid -->
+ </section>
+
+ <!-- Main content -->
+ <section class="content">
+ <div class="container-fluid">
+ <div class="row">
+
+ <div class="col-md-12">
+ <div class="card">
+ <div class="card-header">
+ <h3 class="card-title"><i class="nav-icon fas fa-server"></i> 宸℃浠诲姟鍒楄〃</h3>
+ <div class=" float-sm-right">
+ <!-- SEARCH FORM -->
+ <form class="form-inline ml-3" th:action="@{'/inspectionTask/list'}">
+ <th:block th:if="${session.LOGIN_KEY.role != 'guest'}">
+ <button type="button" onclick="delChecks('/inspectionTask/del')" class="btn bg-danger btn-sm" style="margin-right:5px;">鍒犻櫎</button>
+ <button type="button" onclick="add()" class="btn btn-primary btn-sm" style="margin-right:5px;">娣诲姞</button>
+ </th:block>
+ </form>
+
+ </div>
+ </div>
+ <!-- /.card-header -->
+ <div class="card-body">
+ <table class="table table-bordered table-hover">
+ <thead>
+ <tr>
+ <th style="width: 20px"> <input type="checkbox" value="" name="checkall" id="checkall"></th>
+ <th style="width: 60px">搴忓彿</th>
+ <th>鏍囬</th>
+ <th>绫诲瀷</th>
+ <th>鍛ㄦ湡</th>
+ <th>浠诲姟鑼冨洿</th>
+ <th>寮�濮嬫椂闂�</th>
+ <th>缁撴潫鏃堕棿</th>
+ <th>鎿嶄綔</th>
+ </tr>
+ </thead>
+ <tbody>
+ <th:block th:each="item,iterStat : ${page.list}">
+ <tr>
+ <td><input type="checkbox" th:value="${item.id}" name="todo2" th:id="${item.id}+'_check'"/></td>
+ <td th:text="${iterStat.index+1}">1</td>
+ <td th:text="${item.title}">Update software</td>
+ <td th:text="${item.type}">Update software</td>
+ <td th:text="${item.period}">Update software</td>
+ <td th:text="${item.scope}">Update software</td>
+ <td th:text="${item.startDate}">Update software</td>
+ <td th:text="${item.endDate}">Update software</td>
+ <td>
+ <th:block th:if="${session.LOGIN_KEY.role != 'guest'}">
+ <button type="button" th:onclick="edit([[${item.id}]])" class="btn bg-gradient-primary btn-sm">缂栬緫</button>
+ <button type="button" th:onclick="del([[${item.id}]])" class="btn bg-gradient-danger btn-sm">鍒犻櫎</button>
+ <button type="button" th:onclick="detail([[${item.id}]])" class="btn bg-gradient-primary btn-sm">浠诲姟璇︽儏</button>
+ </th:block>
+ </tr>
+ </th:block>
+
+ </tbody>
+ </table>
+ </div>
+ <!-- /.card-body -->
+ <div th:replace="common/page.html"></div>
+ </div>
+ <!-- /.card -->
+
+
+ </div>
+
+ </div>
+ </div>
+ </section>
+ </div>
+
+
+ <div th:replace="common/footer.html"></div>
+
+</div>
+<!-- ./wrapper -->
+
+<script th:src="@{'/static/js/inspectiontask.js?v=3.3.9'}"></script>
+
+<script th:inline="javascript">
+</script>
+
+</body>
+</html>
diff --git a/src/main/resources/templates/inspectiontask/taskinfo.html b/src/main/resources/templates/inspectiontask/taskinfo.html
new file mode 100644
index 0000000..7866b3a
--- /dev/null
+++ b/src/main/resources/templates/inspectiontask/taskinfo.html
@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <div th:replace="common/header.html"></div>
+
+
+</head>
+<body th:class="${application.sidebarCollapse}">
+<div th:replace="common/chart.html"></div>
+
+<div class="wrapper">
+
+ <div th:replace="common/navbar.html"></div>
+
+ <div th:replace="common/aside.html"></div>
+
+ <!-- Content Wrapper. Contains page content -->
+ <div class="content-wrapper" style="font-size:0.90rem">
+ <!-- Content Header (Page header) -->
+ <section class="content-header" style="height:38px">
+ <div class="container-fluid">
+ <div class="row mb-2" style="margin-top: -7px;">
+ <div class="col-sm-6"></div>
+ <div class="col-sm-6">
+ <ol class="breadcrumb float-sm-right">
+ <li class="breadcrumb-item"><a href="javascript:history.back()">杩斿洖涓婄骇</a></li>
+ </ol>
+ </div>
+ </div>
+ </div><!-- /.container-fluid -->
+ </section>
+
+ <!-- Main content -->
+ <section class="content">
+ <div class="container-fluid">
+ <div class="row">
+
+ <div class="col-md-12">
+ <div class="card">
+ <div class="card-body">
+ <table class="table table-bordered table-hover">
+ <thead>
+ <tr>
+ <th style="width: 20px"> <input type="checkbox" value="" name="checkall" id="checkall"></th>
+ <th style="width: 60px">搴忓彿</th>
+ <th title="浠诲姟鏃堕棿">浠诲姟鏃堕棿</th>
+ <th title="鏄惁瀹屾垚">鏄惁瀹屾垚</th>
+ <th title="浠诲姟璇︽儏">浠诲姟璇︽儏</th>
+ <th title="鎿嶄綔">鎿嶄綔</th>
+ </tr>
+ </thead>
+ <tbody>
+ <th:block th:each="item,iterStat : ${taskInfos}">
+ <tr>
+ <td><input type="checkbox" th:value="${item.id}" name="todo2" th:id="${item.id}+'_check'"/></td>
+ <td th:text="${iterStat.index+1}" >1</td>
+ <td th:text="${item.taskDate}" width="180px"></td>
+ <td width="100px">
+ <th:block th:if="${item.isOk == 1}">
+ <span class="badge bg-primary">瀹屾垚</span>
+ </th:block>
+ <th:block th:if="${item.isOk == 0}">
+ <span class="badge bg-danger">鏈畬鎴�</span>
+ </th:block>
+ </td>
+ <td th:text="${item.content}"></td>
+ <td width="200px">
+ <th:block th:if="${session.LOGIN_KEY.role != 'guest'}">
+ <button type="button" th:onclick="edit2([[${item.id}]])" class="btn bg-gradient-primary btn-sm">缂栬緫</button>
+ </th:block>
+ </tr>
+ </th:block>
+
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <!-- /.card -->
+
+
+ </div>
+
+ </div>
+ </div>
+ </section>
+ </div>
+
+
+ <div th:replace="common/footer.html"></div>
+
+</div>
+<!-- ./wrapper -->
+
+<script th:src="@{'/static/js/inspectiontask.js?v=3.3.9'}"></script>
+<script th:inline="javascript">
+
+</script>
+
+</body>
+</html>
diff --git a/src/main/resources/templates/inspectiontask/view.html b/src/main/resources/templates/inspectiontask/view.html
new file mode 100644
index 0000000..b239ad1
--- /dev/null
+++ b/src/main/resources/templates/inspectiontask/view.html
@@ -0,0 +1,131 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <div th:replace="common/header.html"></div>
+
+</head>
+<body th:class="${application.sidebarCollapse}">
+<div th:replace="common/chart.html"></div>
+
+<div class="wrapper">
+
+ <div th:replace="common/navbar.html"></div>
+
+ <div th:replace="common/aside.html"></div>
+
+ <!-- Content Wrapper. Contains page content -->
+ <div class="content-wrapper" style="font-size:0.90rem">
+ <!-- Content Header (Page header) -->
+ <section class="content-header">
+ <div class="container-fluid">
+ <div class="row mb-2">
+ <div class="col-sm-6">
+ <h1></h1>
+ </div>
+ <div class="col-sm-6">
+ <ol class="breadcrumb float-sm-right">
+ <li class="breadcrumb-item active"></li>
+ </ol>
+ </div>
+ </div>
+ </div><!-- /.container-fluid -->
+ </section>
+
+ <!-- Main content -->
+ <section class="content">
+ <div class="container-fluid">
+ <div class="row">
+
+ <div class="col-md-10">
+ <div class="card card-primary">
+ <div class="card-header">
+ <h3 class="card-title">鏌ョ湅璧勪骇</h3>
+ <div class=" float-sm-right">
+ <a href="javascript:history.back()">杩斿洖</a>
+ </div>
+ </div>
+ <!-- /.card-header -->
+ <!-- form start -->
+ <form role="form" id="form1" th:action="@{'/equipment/save'}">
+ <input type="hidden" name="id" th:value="${equipment.id}"/>
+ <div class="card-body">
+ <div class="row">
+ <div class="col-md-6">
+ <div class="form-group">
+ <label><font color="red">*</font>璁惧鍚嶇О</label>
+ <div th:text="${equipment.name}" ></div>
+ </div>
+ <div class="form-group">
+ <label>瑙勬牸鍨嬪彿</label>
+ <div th:text="${equipment.xinghao}" ></div>
+ </div>
+ <div class="form-group">
+ <label>浣跨敤浜哄憳</label>
+ <div th:text="${equipment.person}" ></div>
+ </div>
+ <div class="form-group">
+ <label>渚涘簲鍟�</label>
+ <div th:text="${equipment.gongyingshang}" ></div>
+ </div>
+
+ </div>
+ <div class="col-md-6">
+ <div class="form-group">
+ <label><font color="red">*</font>璁惧缂栧彿</label>
+ <div th:text="${equipment.code}" ></div>
+ </div>
+
+ <div class="form-group">
+ <label>浣跨敤閮ㄩ棬</label>
+ <div th:text="${equipment.dept}" ></div>
+ </div>
+ <div class="form-group">
+ <label>閲囪喘鏃ユ湡</label>
+ <div th:text="${equipment.caigouDate}" ></div>
+ </div>
+ <div class="form-group">
+ <label>閲囪喘浠锋牸(鍏�)</label>
+ <div th:text="${equipment.price}" ></div>
+ </div>
+
+ </div>
+
+ </div>
+ <div class="form-group">
+ <label>澶囨敞</label>
+ <div th:text="${equipment.remark}" ></div>
+ </div>
+
+
+ </div>
+ <!-- /.card-body -->
+
+ </form>
+ <!-- /.card-body -->
+ </div>
+ <!-- /.card -->
+
+
+ </div>
+
+ </div>
+ </div>
+ </section>
+ </div>
+
+
+ <div th:replace="common/footer.html"></div>
+
+</div>
+<!-- ./wrapper -->
+<link rel="stylesheet" th:href="@{'/static/js/jQuery/validationEngine.jquery.css'}" type="text/css"/>
+<script th:src="@{'/static/js/jQuery/jquery.validationEngine-zh_CN.js'}" type="text/javascript" charset="utf-8"></script>
+<script th:src="@{'/static/js/jQuery/jquery.validationEngine.js'}" type="text/javascript" charset="utf-8"></script>
+<script th:inline="javascript">
+
+ function goback() {
+ history.back();
+ }
+</script>
+</body>
+</html>
diff --git a/src/main/resources/templates/login/login.html b/src/main/resources/templates/login/login.html
index 36cda5d..8ba6f32 100644
--- a/src/main/resources/templates/login/login.html
+++ b/src/main/resources/templates/login/login.html
@@ -60,7 +60,7 @@
<th:block th:if="${application.copyRight eq 'true'}">
<center>
- <div style="color:#2196f3">漏2017-<span id="copyyear">now</span> <a target="_blank" href='http://www.wgstart.com'> www.wgstart.com</a> . All Rights Reserved. Version 3.4.2</div>
+ <div style="color:#2196f3">漏2017-<span id="copyyear">now</span> <a target="_blank" href='http://www.10086.cn/'> 涓浗绉诲姩</a> All Rights Reserved. Version 3.4.2</div>
</center>
</th:block>
<link rel="stylesheet" th:href="@{'/static/js/jQuery/validationEngine.jquery.css'}" type="text/css"/>
diff --git a/wgcloud-server.iml b/wgcloud-server.iml
index c02789d..96f7083 100644
--- a/wgcloud-server.iml
+++ b/wgcloud-server.iml
@@ -4,10 +4,6 @@
<facet type="web" name="Web">
<configuration>
<webroots />
- <sourceRoots>
- <root url="file://$MODULE_DIR$/src/main/java" />
- <root url="file://$MODULE_DIR$/src/main/resources" />
- </sourceRoots>
</configuration>
</facet>
<facet type="Spring" name="Spring">
@@ -20,7 +16,6 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
- <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
--
Gitblit v1.9.1