瀏覽代碼

添加已稽查任务

minitiger 9 年之前
父節點
當前提交
a44c6d8aaf

+ 3 - 3
VisualInspection/js/menu/menu.js

@@ -150,11 +150,11 @@ function queryMenu(id){
     }
     var cols = [
                 {width: 80, text: '菜单名称', type: 'number', flex: false, field: 'menuname'},
-                {width: 160, text: '地址', type: 'date', flex: false, field: 'url'},
+                {width: 160, text: '地址', type: 'string', flex: false, field: 'url'},
                 // {width: 80, text: '字典名称', type: 'string', flex: true, field: 'parentId'},
-                {width: 60, text: '图标', type: 'date', flex: false, field: 'iconClass'},
+                {width: 60, text: '图标', type: 'string', flex: false, field: 'iconClass'},
                 {width: 50, text: '类型', type: 'string', flex: false, field: 'type'},
-                {width: 50, text: '排序号', type: 'date', flex: false, field: 'sortNo'},
+                {width: 50, text: '排序号', type: 'number', flex: false, field: 'sortNo'},
                 {width: 60, text: '操作', type: 'string', flex: false, field: 'id',
                     oper:[
                         {func:'showEditMenu',text:'修改',icon_class:'icon-edit'},

+ 2 - 2
VisualInspection/js/mytask/check.js

@@ -5,8 +5,8 @@ function initCheck() {
     document.dispatchEvent(event);
 
     $('#ex1').slider();
-    $("#ex1").on("slide", function(slideEvt) {
-        console.log(slideEvt.value);
+    $("#ex1").on("slideStop", function(slideEvt) {
+        setProcessValue(slideEvt.value);
     });
 
     // 仅选择日期

+ 38 - 0
VisualInspection/js/mytask/checked.js

@@ -0,0 +1,38 @@
+// var page_size=10;
+function queryCheckedTask(){
+    var data = {
+        "start_time": $("#start_time").val(),
+        "end_time": $("#end_time").val(),
+        "dept": $("#dept").val(),
+        "status_search_type":1,
+        "check_status":4
+    }
+    var cols = [
+                {width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
+                {width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down',field: 'name'},
+                {width: 80, text: '考核人员', type: 'string', flex: true, colClass: '',field: 'checked_person_name'},
+                {width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
+                {width: 80, text: '稽查人员', type: 'string', flex: true, colClass: '',field: 'checkman_name'},
+                {width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down',field: 'start_time'},
+                {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
+                {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
+                    oper:[
+                        {func:'showTaskDetail',text:'任务详情',icon_class:'icon-tasks'}
+                    ]
+                }
+            ];
+    
+    // var pager = {
+    //     page_size:10
+    // }
+    $('#checked_datatable').mytable({'cols':cols,
+                            'url':"/task/getTaskList/",
+                            'param':data}
+                            );
+}
+
+function showTaskDetail(id){
+    var rowData=getItemByIdFromArr(id,$('#checked_datatable').mytable('getTableData'));
+    $.checkTask = rowData;
+    changePage("/view/mytask/taskDetail.html");
+}

+ 5 - 6
VisualInspection/js/mytask/unchecked.js

@@ -16,7 +16,7 @@ function queryUncheckedTask(){
                 {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
                 {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
                     oper:[
-                        {func:'showCheck',text:'稽查',icon_class:'icon-edit'}
+                        {func:'showCheck',text:'稽查',icon_class:'icon-eye-open'}
                     ]
                 }
             ];
@@ -53,7 +53,7 @@ function queryUnexaminedTask(){
                 {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
                 {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
                     oper:[
-                        {func:'showApplyDetail',text:'处理',icon_class:'icon-edit'}
+                        {func:'showApplyDetail',text:'处理',icon_class:'icon-hand-up'}
                     ]
                 }
             ];
@@ -131,8 +131,8 @@ function queryUndispatchedTask(){
                 {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
                 {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
                     oper:[
-                        {func:'showTaskDetail',text:'任务详情',icon_class:'icon-edit'},
-                        {func:'dispatchTaskById',text:'下发',icon_class:'icon-edit'}
+                        {func:'showTaskDetail',text:'任务详情',icon_class:'icon-tasks'},
+                        {func:'dispatchTaskById',text:'下发',icon_class:'icon-signin'}
                     ]
                 }
             ];
@@ -199,7 +199,7 @@ function queryDispatchedTask(){
                 {width: 80, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'},
                 {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
                     oper:[
-                        {func:'showTaskDetail1',text:'任务详情',icon_class:'icon-edit'}
+                        {func:'showTaskDetail1',text:'任务详情',icon_class:'icon-tasks'}
                     ]
                 }
             ];
@@ -216,6 +216,5 @@ function queryDispatchedTask(){
 function showTaskDetail1(id){
     var rowData=getItemByIdFromArr(id,$('#dispatched_datatable').mytable('getTableData'));
     $.checkTask = rowData;
-    console.log(rowData);
     changePage("/view/mytask/taskDetail.html");
 }

+ 10 - 1
VisualInspection/js/util/video.js

@@ -30,7 +30,16 @@ function queryVideoList(){
 }
 
 function playVideo(id){
-    
+    callFunc("playvideo", id);
+}
+
+function setProcessValue(max){
+    console.log(value);
+    $("#ex11").slider({step: 5, min: 0, max: max});
+}
+
+function setVideoProcess(value){
+    console.log(value);
     callFunc("playvideo", id);
 }
 

+ 1 - 1
VisualInspection/view/mytask/check.html

@@ -51,7 +51,7 @@
                             </div>
                         </div>
                         <div class="row" class="col-md-12" style="padding:5px;margin-top:5px;text-align:center">
-                            <input id="ex1" class="col-md-12"  type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="3"/>
+                            <input id="ex1" class="col-md-12"  type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="0"/>
                         </div>
                         <div class="row" style="padding:0 10px;margin-top:5px;text-align:center">
                             <select class="form-control" id="video_list" style="width:200px;float:left;"></select>

+ 59 - 0
VisualInspection/view/mytask/checked.html

@@ -0,0 +1,59 @@
+<script src="/js/mytask/checked.js"></script> 
+<div class="container-fluid ">
+    <div class="row">
+        <form  class="form-horizontal">
+            <div class="form-group">
+                <label for="exampleInputAccount1" class="col-sm-1">稽查日期</label>
+                <div class="col-sm-2">
+                    <input type="text" id="start-time" class="form-control form-date" placeholder="开始时间">
+                </div>
+                <div class="col-sm-2">
+                    <input type="text" id="end-time" class="form-control form-date" placeholder="截止时间">
+                </div>
+                <label for="exampleInputAccount1" class="col-sm-1">考核部门</label>
+                <div class="col-sm-2">
+                    <select class="form-control" id="fsList">
+                    </select>
+                </div>
+                <div class="col-sm-2">
+                    <button class="btn btn-primary " type="button" onclick="queryUncheckedTask()">查询</button>
+                </div>
+            </div>
+        </form>
+    </div>
+    <br>
+
+    <div class="datatable" id="checked_datatable"></div>
+</div>
+<script>
+    $(document).ready(function() {
+        // 仅选择日期
+        $("#start-time").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+        // 仅选择日期
+        $("#end-time").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+        setFeSelect("#fsList");
+        queryCheckedTask();
+    });
+</script>

+ 1 - 1
VisualInspection/view/mytask/taskDetail.html

@@ -31,7 +31,7 @@
             <button type="button" class="btn btn-warning" onclick="submitCheck()">提交</button>
         </div>
         <div class="btn-group">
-            <button type="button" class="btn btn-warning" onclick="showAppeal()">申诉</button>
+            <button type="button" class="btn btn-danger" onclick="showAppeal()">申诉</button>
         </div>
     </div>
 </div>

+ 2 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Task.java

@@ -61,4 +61,6 @@ public class Task{
     private String remark;
     //用户班次
     private String user_class_id;
+    
+    private Integer status_search_type;
 }

+ 1 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/TaskDao.java

@@ -16,6 +16,7 @@ public interface TaskDao  {
     public List<Task> getAll();
     public Task getOne(Long id);
     public List<Task> getList(Task task);
+    public List<Task> getListByChecked(Task task);
     public void insert(Task task);
     public void insertStatus(TaskStatus taskStatus);
     public void update(Task task);

+ 13 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TaskMapper.xml

@@ -60,6 +60,19 @@
         	<if test="checkman != null">AND checkman = #{checkman}</if>
         	<if test="checked_person != null">AND checked_person = #{checked_person}</if>
     </select>
+    
+    <select id="getListByChecked" parameterType="com.xintong.visualinspection.bean.Task" resultMap="BaseResultMap" >
+        SELECT *,
+              (select a.code_name from sys_code a where a.code_flag='task_status' and a.code_value=check_status) as check_status_name
+        FROM check_task
+        WHERE 1=1
+        	<if test="check_status != null">AND check_status >= #{check_status}</if>
+        	<if test="start_time != null">AND create_time &gt;= #{start_time}</if>
+        	<if test="end_time != null">AND create_time &lt;= #{end_time}</if>
+        	<if test="checked_dept != null">AND checked_dept = #{checked_dept}</if>
+        	<if test="checkman != null">AND checkman = #{checkman}</if>
+        	<if test="checked_person != null">AND checked_person = #{checked_person}</if>
+    </select>
 
     <insert id="insert" parameterType="com.xintong.visualinspection.bean.Task" >
         INSERT INTO check_task

+ 7 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java

@@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.github.pagehelper.util.StringUtil;
 import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.bean.Task;
@@ -44,7 +45,12 @@ public class TaskServiceImpl extends BaseService implements TaskService {
 	@Override
 	public List<Task> getTaskList(Task task) {
 		// TODO Auto-generated method stub
-		List<Task> taskList = taskDao.getList(task);
+		List<Task> taskList;
+		if(task.getStatus_search_type()!=null && task.getStatus_search_type()==1){
+			taskList = taskDao.getListByChecked(task);
+		}else{
+			taskList = taskDao.getList(task);
+		}
 		for(Task t : taskList) {
 			if(t.getCheckman() != null){
 				t.setCheckman_name(((User)CacheUtil.userMap.get(t.getCheckman())).getTruename());