Ver código fonte

任务详情功能

温红权 8 anos atrás
pai
commit
ff960fa429

+ 15 - 0
VisualInspection/fwq/js/task/add.js

@@ -369,6 +369,21 @@ function addTask() {
     var tasklist = selectedData.array;
     var start_time = $("#starttime").val();
     var end_time = $("#endtime").val();
+
+    if (start_time == "" || end_time == "") {
+        layer.msg('须选择稽查时间段!', {
+            time: 2000, //20s后自动关闭
+        });
+        return;
+    }
+    if (moment("2018-01-01 " + end_time).valueOf() - moment("2018-01-01 " + start_time).valueOf() < 15 * 60 * 1000) {
+        layer.msg('稽查时间段需满足15分钟以上!', {
+            time: 2000, //20s后自动关闭
+        });
+        return;
+    }
+
+
     var check_user_list = checkusersselect.getSelectedItemsId();
     tasklist.forEach(t => {
         t.start_time = t.time + " " + start_time;

+ 11 - 0
VisualInspection/fwq/js/task/task_list.js

@@ -96,4 +96,15 @@ function showCheck(id) {
     no_return_common_service('/f/task/update', { "id": $.checkTask.id, "check_status": 3 });
 
     changePage("/fwq/view/task/check.html", taskTableObj);
+}
+
+//任务详情页面
+function showTaskDetail(id) {
+    var rowData = getItemByIdFromArr(id, $('#task_list_table').mytable('getTableData'));
+    $.checkTask = rowData;
+    if (typeof($.checkTask) != "undefined" && typeof($.checkTask.appeal) != "undefined") {
+        $.checkTask.appeal = null;
+    }
+
+    changePage("/fwq/view/task/taskDetail.html", taskTableObj);
 }

+ 561 - 0
VisualInspection/fwq/view/task/taskDetail.html

@@ -0,0 +1,561 @@
+<div class="container-fluid ">
+    <div class="row">
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">考核基本信息</h3>
+        <div>
+            <table style="width:100%;">
+                <tr>
+                    <td width="20%">考核任务名:<label id="name"></label></td>
+                    <td width="20%">考核时间: <label id="checktime"></label></td>
+                    <td width="20%">考核部门:<label id="checked_dept"></label></td>
+                </tr>
+            </table>
+        </div>
+    </div>
+    <hr>
+    <div class="row">
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">考核任务流程</h3>
+        <div id="flow_div">
+        </div>
+    </div>
+    <hr>
+    <div class="row">
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">考核详细内容</h3>
+        <div>
+            <div id="score_datatable" data-checkable="true" data-sortable="true"></div>
+        </div>
+    </div>
+    <hr>
+    <div class="row" id="appeal_div">
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">申诉基本信息</h3>
+        <div>
+            <table style="width:100%;">
+                <tr>
+                    <td width="20%">申诉时间:<label id="appeal_time"></label></td>
+                    <td width="20%">申诉原因:<label id="appeal_reason"></label></td>
+                </tr>
+                <tr>
+                    <td width="20%">附件:
+                        <div class="file-list" id="appeal_file_list">
+                        </div>
+                    </td>
+                    <td>
+                    </td>
+                </tr>
+                <tr>
+                    <td width="20%">复核结果:
+                        <label id="recheck_result"></label>
+                    </td>
+                    <td>
+                    </td>
+                </tr>
+            </table>
+        </div>
+    </div>
+    <div class="row" style="margin-top:5px;text-align:center">
+        <div>
+            <button id="submitBtn" style="display:none" type="button" class="btn btn-warning" onclick="submitCheck()">提交</button>
+            <button id="confirmBtn" style="display:none" type="button" class="btn btn-warning" onclick="confirmCheck()">确认</button>
+            <button id="submitAppealBtn" style="display:none" type="button" class="btn btn-warning" onclick="submitCheck4Appeal()">复核提交</button>
+            <button id="confirmAppealBtn" style="display:none" type="button" class="btn btn-warning" onclick="confirmCheck4Appeal()">申诉结果确认</button>
+            <button id="appealBtn" style="display:none" type="button" class="btn btn-danger" onclick="showAppeal()">申诉</button>
+            <button id="assignBtn" style="display:none" type="button" class="btn btn-danger" onclick="showAssign()">分配</button>
+            <button id="backBtn" style="display:none" type="button" class="btn btn-danger" onclick="back2Check()">退回重新稽查</button>
+            <button id="backAppealBtn" style="display:none" type="button" class="btn btn-danger" onclick="back2AppealCheck()">退回重新复查</button>
+            <button id="backConfirmBtn" style="display:none" type="button" class="btn btn-danger" onclick="back2Confirm()">退回重新确认</button>
+        </div>
+    </div>
+</div>
+<div id="form-div" style="display:none;text-align:center;height:300px;padding:5px;">
+    <div class="row">
+        <div id="img_container" class="cards cards-borderless col-sm-12">
+        </div>
+    </div>
+</div>
+<div id="appealDetail-div" style="display:none;text-align:center;">
+    <link rel="import" href="/view/appeal_management/appealDetail.html?__inline">
+</div>
+<div id="chooseCheckman-div" style="display:none;text-align:center;">
+    <link rel="import" href="/view/mytask/chooseCheckman.html?__inline">
+</div>
+<style>
+    .line {
+        text-align: center;
+        font-size: 20px;
+        height: 5px;
+        margin: 15px 0px;
+        width: 100%;
+        background: #1296db;
+        overflow: hidden;
+    }
+    
+    .timeline_item_station {
+        left: 42%;
+        /* margin-left: 55px; */
+        margin-top: 18px;
+        width: 25px;
+        height: 25px;
+        padding: 15px;
+        border-width: 6px;
+        background-color: rgb(50, 141, 199);
+        position: absolute;
+        border-radius: 50%;
+        padding: 10px;
+        top: 0;
+        -webkit-transition: all .3s ease-out;
+        transition: all .3s ease-out;
+    }
+</style>
+<script>
+    $(document).ready(function() {
+        addBreadMenu("/fwq/view/task/taskDetail.html", "稽查详情");
+        checkAuth();
+        $("#name").html($.checkTask.name);
+        $("#checkman").html($.checkTask.checkman_name);
+        $("#checktime").html($.checkTask.start_time);
+        $("#checked_dept").html($.checkTask.checked_dept_name);
+
+
+
+        if ($.checkTask.appeal) {
+            $("#appeal_div").show();
+            $("#appeal_time").html($.checkTask.appeal.appeal_time);
+            $("#appeal_reason").html($.checkTask.appeal.appeal_reason);
+            $("#appeal_file_list").html(genAppeaFiles($.checkTask.appeal.file_src));
+            $("#recheck_result").html($.checkTask.appeal.recheck_result);
+        } else {
+            $("#appeal_div").hide();
+        }
+
+        genFlow();
+        queryScores();
+    });
+
+    //初始化表行按钮
+    function initBtns() {
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_2", ["#submitBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_3", ["#submitBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_7", ["#submitBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_12", ["#submitAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_13", ["#submitAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_17", ["#submitAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_4", ["#backBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_6", ["#backConfirmBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_14", ["#backAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_11", ["#assignBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_STATION_ADMIN + "_5", ["#confirmBtn", "#appealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_STATION_ADMIN + "_15", ["#confirmAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_STATION_AGENT + "_5", ["#confirmBtn", "#appealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_STATION_AGENT + "_15", ["#confirmAppealBtn"]);
+    }
+
+    function checkAuth() {
+        initBtns();
+        showBtn(ROLE_JICHA, $.checkTask.check_status);
+        showBtn(ROLE_JICHA_ADMIN, $.checkTask.check_status);
+        showBtn(ROLE_STATION_ADMIN, $.checkTask.check_status);
+        showBtn(ROLE_STATION_AGENT, $.checkTask.check_status);
+    }
+
+    function showBtn(role, status) {
+        if (hasRole(role)) {
+            var btnArr = $.zui.store.get("task_detail_btn_" + role + "_" + status);
+            if (btnArr) {
+                for (var i in btnArr) {
+                    $(btnArr[i]).show();
+                }
+            }
+        }
+    }
+
+    function queryScores() {
+        // 使用data参数更新数据:
+        var data = {
+            "task_id": $.checkTask.id
+        }
+
+        var cols = [{
+            width: 80,
+            text: '序号',
+            type: 'number',
+            flex: true,
+            colClass: 'text-center',
+            field: 'num'
+        }, {
+            width: 60,
+            text: '评分记录',
+            type: 'string',
+            flex: true,
+            sort: 'down',
+            field: 'content'
+        }, {
+            width: 80,
+            text: '分数',
+            type: 'string',
+            flex: true,
+            colClass: '',
+            field: 'check_item_score'
+        }, {
+            width: 80,
+            text: '扣分人',
+            type: 'string',
+            flex: true,
+            colClass: '',
+            field: 'checked_person_name'
+        }, {
+            width: 80,
+            text: '备注',
+            type: 'string',
+            flex: true,
+            colClass: '',
+            field: 'remark'
+        }, {
+            width: 200,
+            text: '图片',
+            type: 'imagedd',
+            flex: true,
+            colClass: '',
+            field: 'pics'
+        }];
+        if (hasRole(ROLE_JICHA) && ($.checkTask.check_status == 2 || $.checkTask.check_status == 2 || $.checkTask.check_status == 12 ||
+                $.checkTask.check_status == 13)) {
+            var oper = {
+                width: 160,
+                text: '操作',
+                type: 'string',
+                flex: true,
+                field: 'id',
+                oper: [{
+                    func: 'showEditScore',
+                    text: '修改',
+                    icon_class: 'icon-edit'
+                }, {
+                    func: 'deleteScore',
+                    text: '删除',
+                    icon_class: 'icon-remove-circle'
+                }]
+            }
+            cols.push(oper);
+        }
+        $('#score_datatable').mytable({
+            'cols': cols,
+            'url': "/score/getScoreList/",
+            'param': data
+        });
+        $('a.lightbox-toggle').lightbox();
+    }
+    var curScoreId;
+
+    function showEditScore(id) {
+
+        var rowData = getItemByIdFromArr(id, $('#score_datatable').mytable('getTableData'));
+        // alert(rowData.pics);
+        curScoreId = rowData.id;
+        scoreImageLayer = showPopup4Common('修改图片', updateImg, '600px');
+        showTaskDetailPics(rowData.pics);
+    }
+
+    function showTaskDetailPics(pics, divId) {
+        var picStr = '';
+        if (!divId) divId = '#img_container';
+        $(divId).html(picStr);
+        if (pics) {
+            var picArr = pics.split(',');
+            for (var i in picArr) {
+
+                var ispic = true;
+                var src = picArr[i];
+                if (!src.startWith("http"))
+                    src = base_image_server_url + src;
+
+                var videosrc = src;
+                if (src.indexOf('.avi') != -1) {
+                    src = src.split('.avi')[0] + "_screen_0.png"
+                    ispic = false;
+                }
+                if (src.indexOf('.mov') != -1) {
+                    src = src.split('.mov')[0] + "_screen_0.png"
+                    ispic = false;
+                }
+                if (src.indexOf('.mp4') != -1) {
+                    src = src.split('.mp4')[0] + "_screen_0.png"
+                    ispic = false;
+                }
+
+
+                var pic = '<div id="img_item_' + i + '" class="col-md-4 col-sm-6 col-lg-3">' +
+                    '<a href="javascript:void(0)" onclick="removeImg(\'#img_item_' + i + '\')" style="float:right;position:absolute;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
+                    (ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="position:absolute">') +
+                    '<img class="pic-class img-thumbnail" style="width:200px;height:150px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 40px;left:80px;color: white;"></i>') +
+                    '</a>' +
+                    '</div>';
+                picStr += pic;
+            }
+            $(divId).html(picStr);
+            $('a.lightbox-toggle').lightbox();
+        }
+    }
+
+    function updateImg() {
+
+        var imgArr = $("#img_container .pic-class");
+        var picsStr = "";
+        if (imgArr && imgArr.length > 0) {
+            for (var i = 0; i < imgArr.length; i++) {
+                picsStr += imgArr[i].src + ","
+            }
+            picsStr = picsStr.substr(0, picsStr.length - 1);
+        }
+        var param = {
+                'id': curScoreId,
+                'pics': picsStr
+            }
+            // alert("dddd");
+        addOrUpdateItem4Common(param, "/score/update", queryScores);
+        curScoreId = "";
+    }
+
+    function deleteScore(id) {
+        deleteItem4Common(id, "/score/delete/", queryScores);
+    }
+
+    function genFlow() {
+        var data = {
+            "id": $.checkTask.id
+        };
+        post_common_service("/f/task/getStatusById/", data, function(data) {
+            if (data) {
+                // console.log(data)
+                var flowStr = "";
+
+                var color_t = new $.zui.Color("#63B8FF");
+                for (var i in data) {
+                    var color = new $.zui.Color(color_t.r - i * 10, color_t.g - i * 10, color_t.b - i * 10);
+
+                    var startcolor = new $.zui.Color(color_t.r - i * 10 + 5, color_t.g - i * 10 + 5, color_t.b - i * 10 + 5);
+
+                    var endcolor = new $.zui.Color(color_t.r - i * 10 - 5, color_t.g - i * 10 - 5, color_t.b - i * 10 - 5);
+
+                    var background = "background:-webkit-gradient(linear, 0 % 0 % , 0 % 100 % , from(" + startcolor.hexStr() + "), to(" + endcolor.hexStr() + "));" +
+                        "background:-webkit-linear-gradient(top, " + startcolor.hexStr() + ", " + endcolor.hexStr() + ");" + "background:-moz-linear-gradient(top," + startcolor.hexStr() + "," + endcolor.hexStr() + ");"
+
+
+
+                    var str = "";
+                    if (i == 0) {
+                        str = '<div class="col-sm-2" style="text-align:center;padding:0px;width: 87px;margin-left:-60px;">' +
+                            '<img src="/images/start.png" style="width: 28px;right:-1px; position: absolute; top:16px;">' +
+                            '</div>'
+                    }
+                    str +=
+                        // '<div class="col-sm-2" style="text-align:center;padding:0px;width: 87px;margin-left:-88px;">' +
+
+                        // '   <img src="/images/end.png" style="width: 35px;margin-left: 36px;margin-top: 25px;">' +
+                        // '</div>' +
+
+                        '<div class="col-sm-2" style="text-align:center;padding:0px;width: 140px;margin-bottom: 33px;">' +
+                        '<div class="row">' +
+                        '   <label>' + data[i].check_status_name + '</label>' +
+                        '</div>' +
+                        '<div class="row line" style="margin-top: 3px;' + background + '">' +
+                        '    <div class="timeline_item_station" style="background:' + color.hexStr() + '"></div>' +
+                        '</div>' +
+                        '<div class="row" style="margin-top: -5px;">' +
+                        '   <label style="    font-weight: 400;">' + data[i].update_time + '</label>' +
+                        '</div>' +
+                        (i == data.length - 1 ? (
+                            '<i class="icon icon-angle-right" style="font-size: 45px;right: -5px;position: absolute;top: 6px;color:' + endcolor.hexStr() + '"></i>'
+                            // '   <img src="/images/end.png" style="width: 28px;right:-10px; position: absolute; top:16px;">'
+                        ) : "") +
+                        '</div>';
+
+
+                    flowStr += str;
+
+
+                }
+                $("#flow_div").html(flowStr);
+            }
+        })
+    }
+
+    function submitCheck() {
+        var param = {
+            "id": $.checkTask.id,
+            "check_status": 4
+        }
+        no_return_common_service("/task/taskEnd/", param, function(data) {
+            layer.msg("提交成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+
+    }
+
+    function submitCheck4Appeal() {
+        var appeal_result = 1;
+        //询问框
+        layer.confirm('该申诉是否成功?', {
+            btn: ['成功', '失败'] //按钮
+        }, function() {
+            appeal_result = 1;
+            submitAppealResult(appeal_result);
+        }, function() {
+            appeal_result = 2;
+            submitAppealResult(appeal_result);
+        });
+    }
+
+    function submitAppealResult(appeal_result) {
+        var param = {
+            "id": $.checkTask.id,
+            "check_status": 14,
+            "appeal_id": $.checkTask.appeal.id,
+            "appeal_result": appeal_result
+        }
+        no_return_common_service("/task/update/", param, function(data) {
+            layer.msg("提交成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+    }
+    var appealLayer;
+
+    function showAppeal() {
+        // appealLayer = showPopup4Common('申诉',saveAppeal,'600px','#appealDetail-div');
+        layer.open({
+            type: 1,
+            area: '600px',
+            title: '申诉',
+            closeBtn: 1,
+            shadeClose: true,
+            skin: 'layui-layer-lan',
+            content: $('#appealDetail-div'),
+            btn: '保存',
+            btnAlign: 'c', //按钮居中
+            shade: 0, //不显示遮罩
+            yes: function(index) {
+                saveAppeal();
+            }
+        });
+    }
+
+    function confirmCheck() {
+        layer.confirm('是否确认该稽查结果?', {
+            btn: ['确认', '取消'], //按钮
+            offset: 'auto'
+        }, function() {
+            var param = {
+                "id": $.checkTask.id,
+                "check_status": 6
+            }
+            no_return_common_service("/task/update/", param, function(data) {
+                layer.msg("确认成功", {
+                    time: 2000 //20s后自动关闭
+                });
+                redirectLastPage();
+            });
+        }, function(index) {
+            layer.close(index);
+        });
+
+    }
+
+    function confirmCheck4Appeal() {
+        layer.confirm('是否确认该申诉结果?', {
+            btn: ['确认', '取消'], //按钮
+            offset: 'auto'
+        }, function() {
+            var param = {
+                "id": $.checkTask.id,
+                "check_status": 16
+            }
+            no_return_common_service("/task/update/", param, function(data) {
+                layer.msg("确认成功", {
+                    time: 2000 //20s后自动关闭
+                });
+                redirectLastPage();
+            });
+        }, function(index) {
+            layer.close(index);
+        });
+
+    }
+
+    function showAssign() {
+        showPopup4Common('分配稽查员', function() {
+            saveAssign();
+        }, '400px', '#chooseCheckman-div');
+        setCheckmanSelect('#choseCheckmanList', null, $.checkTask.checkman,
+            function() {
+                $('#choseCheckmanList').chosen({
+                    // width:'200px',
+                    height: '100px',
+                    no_results_text: '没有找到', // 当检索时没有找到匹配项时显示的提示文本
+                    disable_search_threshold: 10, // 10 个以下的选择项则不显示检索框
+                    search_contains: true // 从任意位置开始检索
+                });
+            });
+
+    }
+
+    function saveAssign() {
+        var param = {
+            "id": $.checkTask.id,
+            "recheckman": $('#choseCheckmanList').val(),
+            "check_status": 12
+        }
+        no_return_common_service("/task/update/", param, function(data) {
+            layer.msg("分配成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+    }
+
+    function back2Check() {
+        //退回到待提交页面
+        var param = {
+            "id": $.checkTask.id,
+            "check_status": 3,
+            "check_status_name": "退回"
+        }
+        no_return_common_service("/task/update/", param, function(data) {
+            layer.msg("退回成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+    }
+
+    function back2Confirm() {
+        //退回到待提交页面
+        var param = {
+            "id": $.checkTask.id,
+            "check_status": 5,
+            "check_status_name": "退回重新确认"
+        }
+        no_return_common_service("/task/update/", param, function(data) {
+            layer.msg("退回成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+    }
+
+    function back2AppealCheck() {
+        //退回到待提交页面
+        var param = {
+            "id": $.checkTask.id,
+            "check_status": 13,
+            "check_status_name": "退回"
+        }
+        no_return_common_service("/task/update/", param, function(data) {
+            layer.msg("退回成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
+        });
+    }
+</script>

+ 9 - 4
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/TaskController_F.java

@@ -4,10 +4,7 @@ import com.alibaba.dubbo.config.annotation.Reference;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.xintong.system.err.BusinessException;
-import com.xintong.visualinspection.bean.CheckAppeal;
-import com.xintong.visualinspection.bean.FwqCheckTask;
-import com.xintong.visualinspection.bean.Task;
-import com.xintong.visualinspection.bean.User;
+import com.xintong.visualinspection.bean.*;
 import com.xintong.visualinspection.controller.BaseController;
 import com.xintong.visualinspection.pojo.fwq.TaskData_F;
 import com.xintong.visualinspection.service.TaskService_F;
@@ -80,4 +77,12 @@ public class TaskController_F extends BaseController {
         taskService_f.addTask(taskData_f);
         return super.returnSuccessResult("添加成功",null);
     }
+    @RequestMapping(value = "/getStatusById")
+    public String getStatusById(@RequestBody Task task){
+        if(task.getId()==null){
+            throw new BusinessException(20002);
+        }
+        List<TaskStatus> tList = taskService_f.getTaskStatusList(task.getId());
+        return super.returnSuccessResult(tList);
+    }
 }

+ 4 - 0
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/dao/FwqTaskDao.java

@@ -1,6 +1,7 @@
 package com.xintong.visualinspection.visuallnspection_fjq.dao;
 
 import com.xintong.visualinspection.bean.FwqCheckTask;
+import com.xintong.visualinspection.bean.TaskStatus;
 import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
@@ -15,4 +16,7 @@ public interface FwqTaskDao {
     public List<FwqCheckTask> getall(FwqCheckTask fwqCheckTask);
     public void updateStatus(FwqCheckTask fwqCheckTask);
     public FwqCheckTask getone(FwqCheckTask fwqCheckTask);
+    public void insertStatus(TaskStatus taskStatus);
+    public void insertStatusBatch(List<TaskStatus> taskStatusList);
+    public List<TaskStatus> getTaskStatusList(Long id);
 }

+ 46 - 1
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/mapper/master/TaskMapper.xml

@@ -1,8 +1,17 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xintong.visualinspection.visuallnspection_fjq.dao.FwqTaskDao">
+    <resultMap id="taskStatusMap" type="com.xintong.visualinspection.bean.TaskStatus">
+        <id property="id" column="ID"/>
+        <result property="task_id" column="task_id"/>
+        <result property="update_time" column="update_time"/>
+        <result property="update_user" column="update_user"/>
+        <result property="update_username" column="update_username"/>
+        <result property="check_status" column="check_status"/>
+        <result property="check_status_name" column="check_status_name"/>
+    </resultMap>
 
-    <insert id="addtask" parameterType="com.xintong.visualinspection.bean.FwqCheckTask">
+    <insert id="addtask" useGeneratedKeys="true"  keyProperty="id"  parameterType="com.xintong.visualinspection.bean.FwqCheckTask">
         INSERT INTO check_task
         (name,check_status,area_id,create_time,update_time,start_time,
         	end_time,checkman,checked_dept,rule_id,remark,period_id
@@ -38,6 +47,42 @@
         id = #{id}
     </update>
 
+
+
+
+
+
+    <insert id="insertStatus" parameterType="com.xintong.visualinspection.bean.TaskStatus">
+        INSERT INTO check_task_status
+        (task_id,update_time,update_user,update_username,check_status,
+        	check_status_name
+        )
+        VALUES
+        (#{task_id}, now(),#{update_user},#{update_username},#{check_status},
+        	#{check_status_name}
+        )
+    </insert>
+
+    <select id="getTaskStatusList" parameterType="java.lang.Long" resultMap="taskStatusMap">
+        SELECT *
+        FROM check_task_status
+        WHERE task_id = #{id}
+        order by update_time
+    </select>
+
+    <insert id="insertStatusBatch" parameterType="java.util.List">
+        INSERT INTO check_task_status
+        (task_id,update_time,update_user,update_username,check_status,
+        check_status_name
+        )
+        VALUES
+        <foreach collection="list" item="item" index="index" separator=",">
+            (#{item.task_id}, #{item.update_time},#{item.update_user},#{item.update_username},#{item.check_status},
+            #{item.check_status_name}
+            )
+        </foreach>
+    </insert>
+
 </mapper>
 
 

+ 143 - 151
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/CheckOtherServiceImpl.java

@@ -44,10 +44,10 @@ public class CheckOtherServiceImpl implements CheckOtherService_F {
     @Autowired
     private FwqCheckOtherDao fwqCheckOtherDao;
 
-    @Reference(version = "1.0.0",
-            application = "${dubbo.application.id}",
-            registry = "${dubbo.registry.address}")
-    private CommonService commonService;
+//    @Reference(version = "1.0.0",
+//            application = "${dubbo.application.id}",
+//            registry = "${dubbo.registry.address}")
+//    private CommonService commonService;
 
     /**
      * 第三方暗访稽查查询(查询条件:时间,道管,服务区)
@@ -63,30 +63,30 @@ public class CheckOtherServiceImpl implements CheckOtherService_F {
             PageHelper.startPage(page, size);
         }
         List<FwqCheckOther> checkOtherList = fwqCheckOtherDao.getAllCheckOther(fwqCheckOther == null ? new FwqCheckOther() : fwqCheckOther);
-        Map<Long, Organ> deptMap = commonService.getDeptMap();
-        Map<Long, Item> itemMap = commonService.getItemMap();
-        Map<String, Constant> codeMap = commonService.getCodeMap();
-        for (FwqCheckOther data : checkOtherList) {
-            if (deptMap.get(data.getDept_id()) != null) {
-                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
-            }
-            if (itemMap.get(data.getCheck_item_id()) != null) {
-                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
-                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
-                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
-                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
-                    } else {
-                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
-                    }
-                }
-            }
-            if (codeMap.get(data.getWrecker_check_type()) != null) {
-                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
-            }
-            if (codeMap.get(data.getSpecial_check_type()) != null) {
-                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
-            }
-        }
+//        Map<Long, Organ> deptMap = commonService.getDeptMap();
+//        Map<Long, Item> itemMap = commonService.getItemMap();
+//        Map<String, Constant> codeMap = commonService.getCodeMap();
+//        for (FwqCheckOther data : checkOtherList) {
+//            if (deptMap.get(data.getDept_id()) != null) {
+//                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
+//            }
+//            if (itemMap.get(data.getCheck_item_id()) != null) {
+//                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
+//                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
+//                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
+//                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
+//                    } else {
+//                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
+//                    }
+//                }
+//            }
+//            if (codeMap.get(data.getWrecker_check_type()) != null) {
+//                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
+//            }
+//            if (codeMap.get(data.getSpecial_check_type()) != null) {
+//                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
+//            }
+//        }
         if (!(page.equals(0) && size.equals(0))) {
             return new PageInfo<FwqCheckOther>(checkOtherList);
         }
@@ -102,30 +102,30 @@ public class CheckOtherServiceImpl implements CheckOtherService_F {
     private Object getAllCheckOther(FwqCheckOther fwqCheckOther) {
 
         List<FwqCheckOther> checkOtherList = fwqCheckOtherDao.getAllCheckOther(fwqCheckOther == null ? new FwqCheckOther() : fwqCheckOther);
-        Map<Long, Organ> deptMap = commonService.getDeptMap();
-        Map<Long, Item> itemMap = commonService.getItemMap();
-        Map<String, Constant> codeMap = commonService.getCodeMap();
-        for (FwqCheckOther data : checkOtherList) {
-            if (deptMap.get(data.getDept_id()) != null) {
-                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
-            }
-            if (itemMap.get(data.getCheck_item_id()) != null) {
-                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
-                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
-                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
-                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
-                    } else {
-                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
-                    }
-                }
-            }
-            if (codeMap.get(data.getWrecker_check_type()) != null) {
-                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
-            }
-            if (codeMap.get(data.getSpecial_check_type()) != null) {
-                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
-            }
-        }
+//        Map<Long, Organ> deptMap = commonService.getDeptMap();
+//        Map<Long, Item> itemMap = commonService.getItemMap();
+//        Map<String, Constant> codeMap = commonService.getCodeMap();
+//        for (FwqCheckOther data : checkOtherList) {
+//            if (deptMap.get(data.getDept_id()) != null) {
+//                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
+//            }
+//            if (itemMap.get(data.getCheck_item_id()) != null) {
+//                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
+//                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
+//                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
+//                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
+//                    } else {
+//                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
+//                    }
+//                }
+//            }
+//            if (codeMap.get(data.getWrecker_check_type()) != null) {
+//                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
+//            }
+//            if (codeMap.get(data.getSpecial_check_type()) != null) {
+//                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
+//            }
+//        }
         return checkOtherList;
     }
 
@@ -152,8 +152,8 @@ public class CheckOtherServiceImpl implements CheckOtherService_F {
     @Override
     public FwqCheckOther selectCheckById(Long id) {
         FwqCheckOther fwqCheckOther = fwqCheckOtherDao.selectCheckById(id);
-        Map<Long, Item> itemMap = commonService.getItemMap();
-        fwqCheckOther.setCheck_item_name(itemMap.get(fwqCheckOther.getCheck_item_id()).getName());
+//        Map<Long, Item> itemMap = commonService.getItemMap();
+//        fwqCheckOther.setCheck_item_name(itemMap.get(fwqCheckOther.getCheck_item_id()).getName());
         return fwqCheckOther;
     }
 
@@ -171,108 +171,100 @@ public class CheckOtherServiceImpl implements CheckOtherService_F {
 
         fwqCheckOther.setCheck_time_name(fwqCheckOther.getCheck_period());
         List<FwqCheckOther> checkOtherList = fwqCheckOtherDao.getAllCheckOther(fwqCheckOther);
-        Map<Long, Organ> deptMap = commonService.getDeptMap();
-        Map<Long, Item> itemMap = commonService.getItemMap();
-        Map<String, Constant> codeMap = commonService.getCodeMap();
-        for (FwqCheckOther data : checkOtherList) {
-            if (deptMap.get(data.getDept_id()) != null) {
-                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
-            }
-            if (itemMap.get(data.getCheck_item_id()) != null) {
-                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
-                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
-                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
-                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
-                    } else {
-                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
-                    }
-                }
-            }
-            if (codeMap.get(data.getWrecker_check_type()) != null) {
-                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
-            }
-            if (codeMap.get(data.getSpecial_check_type()) != null) {
-                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
-            }
-        }
-
-        // 获得所有服务区数据
-        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
-        // 获得所有道管中心数据
-        List<FeeStation> rmList = commonService.getAllDeptByLayer("RM");
-
-        int checkType = fwqCheckOther.getCheck_type();
-        if (checkType == 8 || checkType == 9) {
-            Long id = 26L;
-            if (checkType == 8) {
-                id = 26L;
-            }
-            if (checkType == 9) {
-                id = 27L;
-            }
-            //获取考核办法对应的考核项
-            List<String> itemName = commonService.getCheckItemName(id);
-
-            for (FwqCheckOther c : checkOtherList) {
-                if (!itemName.contains(c.getPcheckname())) {
-                    itemName.add(c.getPcheckname());
-                }
-            }
-
-            for (FeeStation station : saList) {
-                FwqCheckOtherStatistics fwqCheckOtherStatistics = new FwqCheckOtherStatistics();
-                fwqCheckOtherStatistics.setDeptid(station.getDeptid());
-                fwqCheckOtherStatistics.setDeptname(station.getName().replaceAll("服务区", ""));
-                fwqCheckOtherStatistics.setPdeptid(station.getParentid());
-                HashMap<String, Integer> s = new HashMap<>();
-                for (String i : itemName) {
-                    s.put(i, 0);
-                }
-                for (FwqCheckOther c : checkOtherList) {
-                    if (c.getDept_id().toString().equals(station.getDeptid())) {
-                        Integer i = s.get(c.getPcheckname());
-                        if (i == null) {
-                            i = 0;
-                        }
-//                        if (checkType == 2) {
-                        s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
-//                        } else {
-//                            if (c.getOrgan_name() == null || "".equals(c.getOrgan_name())) {
-//                                s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
-//                            } else {
-//                                s.put(c.getPcheckname(), i);
-//                            }
+//        Map<Long, Organ> deptMap = commonService.getDeptMap();
+//        Map<Long, Item> itemMap = commonService.getItemMap();
+//        Map<String, Constant> codeMap = commonService.getCodeMap();
+//        for (FwqCheckOther data : checkOtherList) {
+//            if (deptMap.get(data.getDept_id()) != null) {
+//                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
+//            }
+//            if (itemMap.get(data.getCheck_item_id()) != null) {
+//                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
+//                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
+//                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
+//                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
+//                    } else {
+//                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
+//                    }
+//                }
+//            }
+//            if (codeMap.get(data.getWrecker_check_type()) != null) {
+//                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
+//            }
+//            if (codeMap.get(data.getSpecial_check_type()) != null) {
+//                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
+//            }
+//        }
+//
+//        // 获得所有服务区数据
+//        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+//        // 获得所有道管中心数据
+//        List<FeeStation> rmList = commonService.getAllDeptByLayer("RM");
+//
+//        int checkType = fwqCheckOther.getCheck_type();
+//        if (checkType == 8 || checkType == 9) {
+//            Long id = 26L;
+//            if (checkType == 8) {
+//                id = 26L;
+//            }
+//            if (checkType == 9) {
+//                id = 27L;
+//            }
+//            //获取考核办法对应的考核项
+//            List<String> itemName = commonService.getCheckItemName(id);
+//
+//            for (FwqCheckOther c : checkOtherList) {
+//                if (!itemName.contains(c.getPcheckname())) {
+//                    itemName.add(c.getPcheckname());
+//                }
+//            }
+//
+//            for (FeeStation station : saList) {
+//                FwqCheckOtherStatistics fwqCheckOtherStatistics = new FwqCheckOtherStatistics();
+//                fwqCheckOtherStatistics.setDeptid(station.getDeptid());
+//                fwqCheckOtherStatistics.setDeptname(station.getName().replaceAll("服务区", ""));
+//                fwqCheckOtherStatistics.setPdeptid(station.getParentid());
+//                HashMap<String, Integer> s = new HashMap<>();
+//                for (String i : itemName) {
+//                    s.put(i, 0);
+//                }
+//                for (FwqCheckOther c : checkOtherList) {
+//                    if (c.getDept_id().toString().equals(station.getDeptid())) {
+//                        Integer i = s.get(c.getPcheckname());
+//                        if (i == null) {
+//                            i = 0;
 //                        }
-                    }
-                }
-                fwqCheckOtherStatistics.setScoremap(s);
-                fwqCheckOtherStatisticses.add(fwqCheckOtherStatistics);
-            }
-
-            for (FeeStation a : rmList) {
-                List<FwqCheckOtherStatistics> s = new ArrayList<>();
-                for (FwqCheckOtherStatistics o : fwqCheckOtherStatisticses) {
-                    if (o.getPdeptid().equals(a.getDeptid())) {
-                        o.setPdeptname(a.getName());
-                        s.add(o);
-                    }
-                }
-                datas.put(a.getName().replaceAll("道管中心", ""), s);
-            }
-
-        }
+////                        if (checkType == 2) {
+//                        s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
+////                        } else {
+////                            if (c.getOrgan_name() == null || "".equals(c.getOrgan_name())) {
+////                                s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
+////                            } else {
+////                                s.put(c.getPcheckname(), i);
+////                            }
+////                        }
+//                    }
+//                }
+//                fwqCheckOtherStatistics.setScoremap(s);
+//                fwqCheckOtherStatisticses.add(fwqCheckOtherStatistics);
+//            }
+//
+//            for (FeeStation a : rmList) {
+//                List<FwqCheckOtherStatistics> s = new ArrayList<>();
+//                for (FwqCheckOtherStatistics o : fwqCheckOtherStatisticses) {
+//                    if (o.getPdeptid().equals(a.getDeptid())) {
+//                        o.setPdeptname(a.getName());
+//                        s.add(o);
+//                    }
+//                }
+//                datas.put(a.getName().replaceAll("道管中心", ""), s);
+//            }
+//
+//        }
 
         return datas;
     }
 
-    @Override
-    public void getExcel(FwqCheckOther fwqOtherCheck, HttpServletRequest req, HttpServletResponse resp) {
-
-    }
-
-    @Override
-    public void getOtherCheckExcel(FwqCheckOther fwqOtherCheck, HttpServletRequest req, HttpServletResponse resp) {
 
-    }
 
 }

+ 62 - 38
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/TaskServiceImpl.java

@@ -7,19 +7,19 @@ package com.xintong.visualinspection.visuallnspection_fjq.service.impl;
  * @date 2018/04/11
  */
 
+import com.alibaba.dubbo.common.utils.LogUtil;
 import com.alibaba.dubbo.config.annotation.Reference;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
-import com.xintong.visualinspection.bean.CheckTaskPeriod;
-import com.xintong.visualinspection.bean.FwqCheckTask;
-import com.xintong.visualinspection.bean.Organ;
-import com.xintong.visualinspection.bean.User;
+import com.xintong.visualinspection.bean.*;
 import com.xintong.visualinspection.pojo.fwq.CheckAreaData;
 import com.xintong.visualinspection.pojo.fwq.TaskData_F;
 import com.xintong.visualinspection.service.CommonService;
 import com.xintong.visualinspection.service.TaskService_F;
+import com.xintong.visualinspection.util.CacheUtil;
 import com.xintong.visualinspection.util.Constants;
 import com.xintong.visualinspection.visuallnspection_fjq.dao.FwqTaskDao;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
 import java.util.*;
@@ -31,10 +31,12 @@ import java.util.*;
         registry = "${dubbo.registry.id}"
 )
 public class TaskServiceImpl implements TaskService_F {
+    private static final org.slf4j.Logger logger = LoggerFactory.getLogger(TaskServiceImpl.class);
 
     @Autowired
     private FwqTaskDao fwqTaskDao;
 
+
     @Reference(version = "1.0.0",
             application = "${dubbo.application.id}",
             registry = "${dubbo.registry.address}")
@@ -42,27 +44,27 @@ public class TaskServiceImpl implements TaskService_F {
 
     @Override
     public Object getAllTask(Integer page,Integer size,FwqCheckTask fwqCheckTasktemp) {
-        if(!(page.equals(0) && size.equals(0))){
-            PageHelper.startPage(page, size);
-        }
-        List<FwqCheckTask> fwqCheckTaskList = fwqTaskDao.getall(fwqCheckTasktemp==null?new FwqCheckTask():fwqCheckTasktemp);
-
-        Map<Long,Organ> deptMap = commonService.getDeptMap();
-        Map<Long,User> userMap = commonService.getUserMap();
-        for (FwqCheckTask fwqCheckTask:fwqCheckTaskList
-             ) {
-            if(deptMap.get(fwqCheckTask.getChecked_dept())!=null){
-                fwqCheckTask.setChecked_dept_name(deptMap.get(fwqCheckTask.getChecked_dept()).getOrganname());
+            if (!(page.equals(0) && size.equals(0))) {
+                PageHelper.startPage(page, size);
             }
-            if(userMap.get(fwqCheckTask.getCheckman())!=null){
-                fwqCheckTask.setCheckman_name(userMap.get(fwqCheckTask.getCheckman()).getTruename());
+            List<FwqCheckTask> fwqCheckTaskList = fwqTaskDao.getall(fwqCheckTasktemp == null ? new FwqCheckTask() : fwqCheckTasktemp);
+
+            Map<Long, Organ> deptMap = commonService.getDeptMap();
+            Map<Long, User> userMap = commonService.getUserMap();
+            for (FwqCheckTask fwqCheckTask : fwqCheckTaskList
+                    ) {
+                if (deptMap.get(fwqCheckTask.getChecked_dept()) != null) {
+                    fwqCheckTask.setChecked_dept_name(deptMap.get(fwqCheckTask.getChecked_dept()).getOrganname());
+                }
+                if (userMap.get(fwqCheckTask.getCheckman()) != null) {
+                    fwqCheckTask.setCheckman_name(userMap.get(fwqCheckTask.getCheckman()).getTruename());
+                }
             }
-        }
 
-        if(!(page.equals(0) && size.equals(0))){
-            return new PageInfo<FwqCheckTask>(fwqCheckTaskList);
-        }
-        return fwqCheckTaskList;
+            if (!(page.equals(0) && size.equals(0))) {
+                return new PageInfo<FwqCheckTask>(fwqCheckTaskList);
+            }
+            return fwqCheckTaskList;
     }
 
     @Override
@@ -102,28 +104,50 @@ public class TaskServiceImpl implements TaskService_F {
                         u_index--;
                     }
                 }
-                FwqCheckTask t = new FwqCheckTask();
-                t.setName(s.getDeptInfo().getName() + s.getAreaInfo().getName());
-                t.setCheck_status(Constants.STATUS_ASSIGN);
-                t.setArea_id(s.getAreaInfo().getId());
-                t.setStart_time(s.getStart_time());
-                t.setEnd_time(s.getEnd_time());
-                t.setCheckman((long) users.get(u_index).getId());
-                t.setCheckman_name(users.get(u_index).getTruename());
-                t.setChecked_dept((long) s.getAreaInfo().getDept_id());
-                t.setUpdate_user((long) taskData_f.getUser_id());
-                //服务区视频稽查考核办法 id
-                t.setRule_id(10);
-                if (p != null && p.getEndtime().getTime() > s.getStart_time().getTime()) {
-                    t.setPeriod_id(p.getId());
+                try {
+                    FwqCheckTask t = new FwqCheckTask();
+                    t.setName(s.getDeptInfo().getName() + s.getAreaInfo().getName());
+                    t.setCheck_status(Constants.STATUS_ASSIGN);
+                    t.setArea_id(s.getAreaInfo().getId());
+                    t.setStart_time(s.getStart_time());
+                    t.setEnd_time(s.getEnd_time());
+                    t.setCheckman((long) users.get(u_index).getId());
+                    t.setCheckman_name(users.get(u_index).getTruename());
+                    t.setChecked_dept((long) s.getAreaInfo().getDept_id());
+                    t.setUpdate_user((long) taskData_f.getUser_id());
+                    //服务区视频稽查考核办法 id
+                    t.setRule_id(10);
+                    if (p != null && p.getEndtime().getTime() > s.getStart_time().getTime()) {
+                        t.setPeriod_id(p.getId());
+                    }
+                    fwqTaskDao.addtask(t);
+                    TaskStatus taskStatus = new TaskStatus();
+                    taskStatus.setCheck_status(t.getCheck_status());
+                    taskStatus.setCheck_status_name((commonService.getCodeMap().get("task_status_"+t.getCheck_status())).getCode_name());
+                    User u = commonService.getUserMap().get((long)taskData_f.getUser_id());
+                    if(u!=null){
+                        taskStatus.setUpdate_username(u.getTruename());
+                    }
+                    taskStatus.setTask_id((long)t.getId());
+                    fwqTaskDao.insertStatus(taskStatus);
+
+                }catch (Exception e){
+                    logger.error(e.getMessage());
                 }
-                fwqTaskDao.addtask(t);
+
+
+
 
             }
         }catch (Exception e){
-            System.out.println(e.getStackTrace());
+            logger.error(e.getMessage());
         }
     }
 
+    @Override
+    public List<TaskStatus> getTaskStatusList(Long id) {
+        return fwqTaskDao.getTaskStatusList(id);
+    }
+
 
 }

+ 9 - 1
Visuallnspection_fjq/visuallnspection_fjq/src/main/resources/application.properties

@@ -17,7 +17,9 @@ dubbo.protocol.status = server
 
 ## RegistryConfig Bean
 dubbo.registry.id = fjq_service
-dubbo.registry.address = zookeeper://git.topm.win:9994
+#dubbo.registry.address = zookeeper://git.topm.win:9994
+dubbo.registry.address = zookeeper://localhost:2181
+dubbo.registry.file = ./output/dubbo1.cache
 dubbo.reference.check=false
 dubbo.consumer.check=false
 
@@ -32,3 +34,9 @@ master.datasource.password = root
 master.datasource.driver-class-name = com.mysql.jdbc.Driver
 master.mapper-locations=classpath:com/xintong/visualinspection/visuallnspection_fjq/mapper/master/*.xml
 
+
+log.path=./visual/
+log.file=visual
+log.lever=info
+log.MaxHistory=20
+log.pattern=%-12(%d{yyyy-MM-dd HH:mm:ss.SSS}) |-%-5level [%thread] %c [%L] -| %msg%n

+ 2 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/TaskStatus.java → Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/bean/TaskStatus.java

@@ -2,6 +2,7 @@ package com.xintong.visualinspection.bean;
 
 import lombok.Data;
 
+import java.io.Serializable;
 import java.util.Date;
 
 /**
@@ -9,7 +10,7 @@ import java.util.Date;
  * 版本信息:日期:2017/4/15 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
  */
 @Data
-public class TaskStatus{
+public class TaskStatus implements Serializable {
 	//编号
     private Long id;
     //编号

+ 3 - 0
Visuallnspection_fjq/visuallnspectioninteface/src/main/java/com/xintong/visualinspection/service/TaskService_F.java

@@ -1,6 +1,7 @@
 package com.xintong.visualinspection.service;
 
 import com.xintong.visualinspection.bean.FwqCheckTask;
+import com.xintong.visualinspection.bean.TaskStatus;
 import com.xintong.visualinspection.pojo.fwq.TaskData_F;
 
 import java.util.List;
@@ -12,4 +13,6 @@ public interface TaskService_F {
     public FwqCheckTask getTask(FwqCheckTask fwqCheckTask);
     public void addTask(TaskData_F taskData_f);
 
+    public List<TaskStatus> getTaskStatusList(Long id);
+
 }