Jianghan 3 жил өмнө
parent
commit
2447ae6095

+ 58 - 14
src/config.json

@@ -96,36 +96,76 @@
                 "descript": "城市(w)"
             },
             {
-                "key": "subtype",
-                "descript": "公告类别"
+                "key": "bidamounttype",
+                "descript": "金额类型"
             },
             {
                 "key": "district",
                 "descript": "区县(e)"
             },
             {
-                "key": "buyer",
-                "descript": "采购单位(a)"
+                "key": "budget",
+                "descript": "预算(a)"
             },
             {
-                "key": "budget",
-                "descript": "预算(z)"
+                "key": "bidamount",
+                "descript": "中标金额(z)"
+            },
+            {
+                "key": "s_winner",
+                "descript": "中标单位(d)"
+            },
+            {
+                "key": "subtype",
+                "descript": "公告类别"
+            },
+            {
+                "key": "winnertel",
+                "descript": "中标单位电话"
+            },
+            {
+                "key": "projectscope",
+                "descript": "项目范围"
+            },
+            {
+                "key": "winnerperson",
+                "descript": "中标单位联系人"
+            },
+            {
+                "key": "winneraddr",
+                "descript": "中标单位地址"
+            },
+            {
+                "key": "buyer",
+                "descript": "采购单位(s)"
             },
             {
                 "key": "agency",
-                "descript": "代理机构(s)"
+                "descript": "代理机构(x)"
             },
             {
-                "key": "bidamount",
-                "descript": "中标金额(x)"
+                "key": "buyertel",
+                "descript": "采购单位电话"
             },
             {
-                "key": "s_winner",
-                "descript": "中标单位(d)"
+                "key": "agencytel",
+                "descript": "代理机构电话"
             },
             {
-                "key": "bidamounttype",
-                "descript": "金额类型"
+                "key": "buyerperson",
+                "descript": "采购单位联系人"
+            },
+            {
+                "key": "agencyperson",
+                "descript": "代理机构联系人"
+            },
+            {
+                "key": "buyeraddr",
+                "descript": "采购单位地址"
+            },
+            {
+                "key": "agencyaddr",
+                "descript": "代理机构地址"
             }
         ],
         "timeplace": [
@@ -167,7 +207,7 @@
             },
             {
                 "key": "projectperiod",
-                "descript": "项目周期(服务周期)"
+                "descript": "项目周期"
             },
             {
                 "key": "projectaddr",
@@ -332,6 +372,10 @@
             {
                 "key": "contract_guarantee",
                 "descript": "是否支持保函"
+            },
+            {
+                "key": "biddiscount",
+                "descript": "投标折扣系数"
             }
         ]
     }

+ 24 - 5
src/front/front.go

@@ -97,11 +97,13 @@ type Front struct {
 	remarkDetail   xweb.Mapper `xweb:"/front/user/remark/detail"`
 
 	//check
-	checkList   xweb.Mapper `xweb:"/front/user/check/list"`
-	checkData   xweb.Mapper `xweb:"/front/user/check/data"`
-	checkDetail xweb.Mapper `xweb:"/front/user/check/detail"`
-	checkSave   xweb.Mapper `xweb:"/front/user/check/save"`
-	checkResult xweb.Mapper `xweb:"/front/user/check/result"`
+	checkList       xweb.Mapper `xweb:"/front/user/check/list"`
+	checkData       xweb.Mapper `xweb:"/front/user/check/data"`
+	checkDetail     xweb.Mapper `xweb:"/front/user/check/detail"`
+	checkSave       xweb.Mapper `xweb:"/front/user/check/save"`
+	checkResult     xweb.Mapper `xweb:"/front/user/check/result"`
+	checkExcpResult xweb.Mapper `xweb:"/front/check/excp/result"`     // 异常数据
+	checkExcpData   xweb.Mapper `xweb:"/front/check/excp/notag/data"` //达标数据
 }
 
 func (f *Front) Index() {
@@ -157,3 +159,20 @@ func GetUserMenu(role int) []map[string]interface{} {
 	}
 	return list
 }
+
+func (f *Front) UpdatePwd() {
+	defer qu.Catch()
+	id := f.GetString("id")
+	password := f.GetString("pwd")
+	set := map[string]interface{}{
+		"$set": map[string]interface{}{
+			"s_pwd": qu.SE.EncodeString(password),
+		},
+	}
+	if Mgo.UpdateById("s_user", id, set) {
+		sessionuser := f.GetSession("user").(map[string]interface{})
+		sessionuser["pwd"] = password
+		f.SetSession("user", sessionuser)
+	}
+
+}

+ 13 - 1
src/front/mark.go

@@ -406,11 +406,16 @@ func (f *Front) UserDataMark() {
 		}
 		for field, val := range baseSet { //更新基本字段
 			setResult["v_baseinfo."+field] = val
+			baseInfo[field] = val
 		}
 		baseUnsetResult := map[string]interface{}{} //删除字段集
 		for field, _ := range baseUnset {           //删除基本字段
 			baseUnsetResult["v_baseinfo."+field] = ""
+			delete(baseInfo, field)
 		}
+		ex, exp := DataException(baseInfo)
+		setResult["s_excp"] = ex
+		setResult["s_excp_info"] = exp
 		set := map[string]interface{}{
 			"$set": setResult,
 		}
@@ -477,6 +482,12 @@ func MarkBase(content []interface{}, tagSet, baseSet, baseUnset map[string]inter
 									baseSet["toptype"] = topsubtype[0]
 									baseSet[key] = topsubtype[1]
 								}
+							} else if key == "s_winner" {
+								if strings.Contains(qu.ObjToString(input), ",") {
+									baseSet[key] = strings.ReplaceAll(qu.ObjToString(input), ",", ",")
+								} else {
+									baseSet[key] = input
+								}
 							} else {
 								baseSet[key] = input
 							}
@@ -765,7 +776,8 @@ func MarkOther(content []interface{}, tagSet, baseSet, baseUnset map[string]inte
 							if key == "signaturedate" {
 								inputTmp, _ := time.ParseInLocation(qu.Date_Full_Layout, input.(string), time.Local)
 								input = inputTmp.Unix()
-							} else if key == "bid_bond" || key == "contract_bond" || key == "supervisorrate" || key == "agencyrate" || key == "docamount" || key == "agencyfee" {
+							} else if key == "bid_bond" || key == "contract_bond" || key == "supervisorrate" || key == "agencyrate" || key == "docamount" || key == "agencyfee" ||
+								key == "biddiscount" {
 								input = qu.Float64All(input)
 								//input, _ = strconv.ParseFloat(qu.ObjToString(input), 32)
 							}

+ 9 - 1
src/front/project.go

@@ -513,7 +513,7 @@ func (f *Front) ProjectGroupTaskRepulse() {
 	success = util.Mgo.Update(sourceinfo, map[string]interface{}{"s_grouptaskid": groupTaskId}, map[string]interface{}{
 		"$set": map[string]interface{}{
 			"b_istag":      false,
-			"i_ckdata":     2,
+			"i_ckdata":     0,
 			"b_isgiveuser": false,
 			"i_updatetime": currenttime,
 		},
@@ -521,6 +521,9 @@ func (f *Front) ProjectGroupTaskRepulse() {
 			"s_userid":     "",
 			"s_usertaskid": "",
 			"s_login":      "",
+			"b_check":      "",
+			"v_taginfo":    "",
+			"v_checkinfo":  "",
 		},
 	}, false, true)
 	if success {
@@ -843,6 +846,11 @@ func UpdateSourceInfoByGroup(sourceinfo, stype string, groupIdInfo map[string]ut
 						"b_isgivegroup": true,
 						"i_updatetime":  time.Now().Unix(),
 					},
+					// 分发时 删除程序检测的标记
+					"$unset": map[string]interface{}{
+						"s_excp":      "",
+						"s_excp_info": "",
+					},
 				})
 				lock.Lock()
 				updateArr = append(updateArr, update)

+ 152 - 4
src/front/remark.go

@@ -8,9 +8,11 @@ import (
 	"math"
 	mgo "mongodb"
 	qu "qfw/util"
+	"regexp"
 	"sort"
 	"strconv"
 	"strings"
+	"sync"
 	"time"
 	"util"
 )
@@ -109,6 +111,7 @@ func (f *Front) RemarkDetail() {
 func getDetail(id, coll string) map[string]interface{} {
 	rep := map[string]interface{}{}
 	infoTmp, _ := util.Mgo.FindById(coll, id, ``)
+	rep["s_excp_info"] = (*infoTmp)["s_excp_info"]
 	baseInfo := (*infoTmp)["v_baseinfo"].(map[string]interface{}) //字段值
 	var bzInfo map[string]interface{}                             //标注信息
 	if (*infoTmp)["v_taginfo"] != nil {
@@ -554,16 +557,21 @@ func GetNextDataId(id, coll, tid string) string {
 }
 
 // GetNextDataId1 质检下一条
-func GetNextDataId1(id, coll, tid string) string {
+func GetNextDataId1(id, coll, tid, tag string) string {
 	nextIdQuery := map[string]interface{}{
 		"_id": map[string]interface{}{
 			"$gt": mgo.StringTOBsonId(id),
 		},
+		"b_check": nil,
 	}
 	if tid != "" {
 		// 数据有任务 查询带上标注标记
 		nextIdQuery["i_ckdata"] = 2
-		nextIdQuery["s_usertaskid"] = tid
+		if tag == "group" {
+			nextIdQuery["s_grouptaskid"] = tid
+		} else {
+			nextIdQuery["s_usertaskid"] = tid
+		}
 	} else {
 		nextIdQuery["i_ckdata"] = 2
 	}
@@ -636,6 +644,7 @@ func (f *Front) CheckList() {
 func (f *Front) CheckData() {
 	qu.Catch()
 	pid := f.GetString("pid")
+	gid := f.GetString("gid")
 	tid := f.GetString("tid")
 	stype := f.GetString("stype")
 	sourceinfo := f.GetString("s_sourceinfo")
@@ -652,7 +661,9 @@ func (f *Front) CheckData() {
 			query["b_istag"] = true
 			if stype == "group" {
 				query["s_grouptaskid"] = tid
+				f.SetSession("check", "group")
 			} else {
+				f.SetSession("check", "user")
 				query["s_usertaskid"] = tid
 			}
 		} else {
@@ -674,18 +685,24 @@ func (f *Front) CheckData() {
 			}
 		}
 		status := f.GetString("s_status")
+		s_excp := f.GetString("s_excp")
 		if status == "1" {
 			query["b_check"] = true
 		} else if status == "-1" {
 			query["b_check"] = false
 		}
+		if s_excp == "1" {
+			query["s_excp"] = nil
+		} else if s_excp == "-1" {
+			query["s_excp"] = map[string]interface{}{"$exists": true}
+		}
 		if search != "" {
 			query["$or"] = []interface{}{
 				map[string]interface{}{"v_baseinfo.title": map[string]interface{}{"$regex": search}},
 				map[string]interface{}{"s_login": map[string]interface{}{"$regex": search}},
 			}
 		}
-		fields := map[string]interface{}{"v_baseinfo.title": 1, "b_check": 1, "i_ckdata": 1, "s_login": 1, "b_istag": 1}
+		fields := map[string]interface{}{"v_baseinfo.title": 1, "b_check": 1, "i_ckdata": 1, "s_login": 1, "b_istag": 1, "s_excp": 1, "s_excp_info": 1}
 		info, _ := util.Mgo.Find(sourceinfo, query, `{"_id": 1}`, fields, false, start, limit)
 		count := util.Mgo.Count(sourceinfo, query)
 		qu.Debug(query, sourceinfo, count)
@@ -746,6 +763,7 @@ func (f *Front) CheckData() {
 		}
 		f.T["pid"] = pid
 		f.T["tid"] = tid
+		f.T["gid"] = gid
 		f.T["sourceinfo"] = sourceinfo
 		f.T["stype"] = stype
 		f.T["datatype"] = datatype
@@ -772,6 +790,7 @@ func (f *Front) CheckDetail() {
 	rep := getDetail(did, coll)         //获取本条公告的信息
 	f.T["otherInfo"] = rep["otherInfo"] //展示关联公告信息
 	f.T["moreInfo"] = rep["moreInfo"]   //更多关联公告信息
+	f.T["s_excp_info"] = rep["s_excp_info"]
 	f.T["pid"] = pid
 	f.T["tid"] = tid
 	f.T["did"] = did
@@ -795,7 +814,7 @@ func (f *Front) CheckDetail() {
 	f.T["worder_new"] = rep["worder_new"]
 	f.T["pcl_new"] = rep["pcl_new"]
 	f.T["pkg_new"] = rep["pkg_new"]
-	f.T["nextid"] = GetNextDataId1(did, coll, tid) //下一条id
+	f.T["nextid"] = GetNextDataId1(did, coll, tid, qu.ObjToString(f.GetSession("check"))) //下一条id
 	_ = f.Render("project/check_detail.html", &f.T)
 }
 
@@ -923,10 +942,20 @@ func (f *Front) CheckSave() {
 		setResult["v_checkinfo"] = checkSet
 		for field, val := range baseSet { //更新基本字段
 			setResult["v_baseinfo."+field] = val
+			baseInfo[field] = val
 		}
 		baseUnsetResult := map[string]interface{}{} //删除字段集
 		for field, _ := range baseUnset {           //删除基本字段
 			baseUnsetResult["v_baseinfo."+field] = ""
+			delete(baseInfo, field)
+		}
+		ex, exp := DataException(baseInfo)
+		if ex != "" {
+			setResult["s_excp"] = ex
+			setResult["s_excp_info"] = exp
+		} else {
+			baseUnsetResult["s_excp"] = ""
+			baseUnsetResult["s_excp_info"] = ""
 		}
 		set := map[string]interface{}{
 			"$set": setResult,
@@ -1120,3 +1149,122 @@ func CountPr(c1, c2 int) string {
 	d := decimal.NewFromInt32(int32(c1)).Div(decimal.NewFromInt32(int32(c2))).Mul(decimal.NewFromInt32(100))
 	return d.String() + "%"
 }
+
+func (f *Front) CheckExcpResult() {
+	pid := f.GetString("pid")
+	tid := f.GetString("tid")
+	sourceinfo := f.GetString("s_sourceinfo")
+	stype := f.GetString("stype")
+	query := make(map[string]interface{})
+	var dataSource []map[string]interface{}
+	if tid != "" {
+		if stype == "group" {
+			query["s_grouptaskid"] = tid
+		} else {
+			query["s_usertaskid"] = tid
+		}
+		query["s_excp"] = map[string]interface{}{"$exists": true}
+
+	} else {
+		query["s_excp"] = map[string]interface{}{"$exists": true}
+		excpNum := util.Mgo.Count(sourceinfo, query)
+		tagNum := util.Mgo.Count(sourceinfo, map[string]interface{}{"i_ckdata": 2})
+		dataSource = append(dataSource, map[string]interface{}{"name": "达标数据", "num1": excpNum, "num2": tagNum, "num3": CountPr(excpNum, tagNum)})
+	}
+	f.T["tableData"] = dataSource
+	f.T["pid"] = pid
+	f.T["tid"] = tid
+	f.T["sourceinfo"] = sourceinfo
+	_ = f.Render("project/check_excp_result.html", &f.T)
+}
+
+func (f *Front) CheckExcpData() {
+	sourceinfo := f.GetString("s_sourceinfo")
+	// 达标,待分发数据
+	query := map[string]interface{}{
+		"b_istagging": false,
+		//"b_isgivegroup": false,
+	}
+	pool := make(chan bool, 3)
+	wg := &sync.WaitGroup{}
+	sess := util.Mgo.GetMgoConn()
+	defer util.Mgo.DestoryMongoConn(sess)
+	count := 0
+	it := sess.DB(util.Mgo.DbName).C(sourceinfo).Find(query).Select(nil).Iter()
+	for tmp := make(map[string]interface{}); it.Next(&tmp); count++ {
+		if tmp["s_excp"] != nil {
+			f.ServeJson(map[string]interface{}{"success": true})
+			break
+		}
+		pool <- true
+		wg.Add(1)
+		go func(tmp map[string]interface{}) {
+			defer func() {
+				<-pool
+				wg.Done()
+				info := tmp["v_baseinfo"].(map[string]interface{})
+				ex, exp := DataException(info)
+				if ex != "" {
+					util.Mgo.UpdateById(sourceinfo, tmp["_id"], map[string]interface{}{"$set": map[string]interface{}{"s_excp": ex, "s_excp_info": exp}})
+				}
+			}()
+		}(tmp)
+	}
+	f.ServeJson(map[string]interface{}{"success": true})
+}
+
+var regReplAllSymbol = regexp.MustCompile("[(\\(<《【\\[{{〔)\\)>》】\\]}}〕,,;;::'\"“”。.\\??/+=\\-_——*&……\\^%$¥@#!!`~·]")
+
+func DataException(tmp map[string]interface{}) (string, string) {
+	var tag []string
+	var exp string
+	if tmp["buyer"] != nil && tmp["buyer"] == tmp["s_winner"] {
+		tag = append(tag, "1")
+		exp += "采购单位与中标单位相等,"
+	}
+	if tmp["agency"] != nil && tmp["buyer"] == tmp["agency"] {
+		tag = append(tag, "2")
+		exp += "采购单位与代理机构相等,"
+	}
+	if tmp["s_winner"] != nil && tmp["s_winner"] == tmp["agency"] {
+		tag = append(tag, "3")
+		exp += "中标单位与代理机构相等,"
+	}
+	if tmp["bidamount"] != nil && tmp["budget"] != nil {
+		if qu.Float64All(tmp["bidamount"]) > qu.Float64All(tmp["budget"]) {
+			tag = append(tag, "4")
+			exp += "中标金额大于预算,"
+		}
+		if qu.Float64All(tmp["bidamount"]) < (qu.Float64All(tmp["budget"]) / 2) {
+			tag = append(tag, "5")
+			exp += "中标金额小于预算的一半,"
+		}
+		if tmp["budget"] == 0 && qu.Float64All(tmp["bidamount"]) != 0 {
+			tag = append(tag, "6")
+			exp += "预算为0,中标金额不为0,"
+		}
+		if qu.Float64All(tmp["budget"]) != 0 && tmp["bidamount"] == 0 {
+			tag = append(tag, "7")
+			exp += "预算不为0,中标金额为0,"
+		}
+	}
+	if b := qu.ObjToString(tmp["buyer"]); b != "" {
+		if regReplAllSymbol.MatchString(b) {
+			tag = append(tag, "8")
+			exp += "采购单位含有特殊符号,"
+		}
+	}
+	if a := qu.ObjToString(tmp["agency"]); a != "" {
+		if regReplAllSymbol.MatchString(a) {
+			tag = append(tag, "9")
+			exp += "中标单位含有特殊符号,"
+		}
+	}
+	if a := qu.ObjToString(tmp["s_winner"]); a != "" {
+		if regReplAllSymbol.MatchString(a) {
+			tag = append(tag, "10")
+			exp += "代理机构含有特殊符号,"
+		}
+	}
+	return strings.Join(tag, ","), exp
+}

+ 5 - 0
src/front/user.go

@@ -851,6 +851,11 @@ func (f *Front) UserTaskClose() {
 			"i_ckdata":     0,
 			"i_updatetime": currenttime,
 		},
+		"$unset": map[string]interface{}{
+			"b_check":     "",
+			"v_taginfo":   "",
+			"v_checkinfo": "",
+		},
 	}, false, true)
 	// 修改任务
 	if success {

+ 29 - 7
src/web/templates/project/check_data_list.html

@@ -19,7 +19,12 @@
             <li><a href="#"><i class="fa fa-dashboard"></i> 质检列表</a></li>
         </ol>
         <ol class="breadcrumb" name="tab4" style="display: none">
-            <li><a href="/front/user/check/list?"><i class="fa fa-dashboard"></i> 质检任务列表</a></li>
+            <li><a href="/front/user/check/list"><i class="fa fa-dashboard"></i> 质检任务列表</a></li>
+            <li><a href="#"><i class="fa fa-dashboard"></i> 质检列表</a></li>
+        </ol>
+        <ol class="breadcrumb" name="tab5" style="display: none">
+            <li><a href="/front/group/task/list"><i class="fa fa-dashboard"></i> 用户组任务列表</a></li>
+            <li><a href="#"><i class="fa fa-dashboard"></i> 用户任务分发</a></li>
             <li><a href="#"><i class="fa fa-dashboard"></i> 质检列表</a></li>
         </ol>
     </section>
@@ -39,22 +44,29 @@
                                         <input type="text" class="form-control" style="width: 120px;padding: 5px" readonly value="{{.T.taskCheckNum}} / {{ .T.taskTagNum }}"></label>
                                 </div>
                                 <input type="button" class="btn btn-primary" onclick="checkResult()" value="质检结果">
+                                <input type="button" class="btn btn-primary" onclick="checkExcpResult()" value="异常校验结果">
                             </div>
                         </div>
 
                         <div id="status-div" class="col-xs-1" style="width: auto;float:right;">
-                            <label for="statusSelect">状态:
+                            <label for="statusSelect">质检状态:
                                 <select class="form-control selectpicker" id="statusSelect">
                                     <option value="0">全部</option>
                                     <option value="1">已质检</option>
                                     <option value="-1">未质检</option>
                                 </select></label>
+                            <label for="dataSelect">数据状态:
+                                <select class="form-control selectpicker" id="dataSelect">
+                                    <option value="0">全部</option>
+                                    <option value="1">正常</option>
+                                    <option value="-1" selected>异常</option>
+                                </select></label>
                         </div>
                         <table id="dataTable" class="table table-bordered table-hover">
                             <thead>
                             <tr>
                                 <th></th>
-                                <th>状态</th>
+                                <th>数据状态</th>
                                 <th>标题</th>
                                 <th>用户</th>
                             </tr>
@@ -82,6 +94,9 @@
     }else if (router === "task") {
         $('ol[name="tab4"]').show()
         menuActive("/front/user/check/list");
+    }else if (router === "detail") {
+        $('ol[name="tab5"]').show()
+        menuActive("/front/user/check/list");
     }
 
     let tid = {{ .T.tid }}
@@ -124,12 +139,12 @@
             },
             "columns": [
                 {"data": null, width: "2%"},
-                {"data": "b_check", width: "5%", render: function (val) {
+                {"data": "s_excp", width: "5%", render: function (val) {
                         let tmp;
-                        if (val) {
-                            tmp = '<span style="display: inline-block;font-size:14px;">已质检</span>'
+                        if (val !== undefined && val !== "") {
+                            tmp = '<span style="display: inline-block;font-size:14px;">异常</span>'
                         } else {
-                            tmp = '<span style="display: inline-block;font-size:14px;">未质检</span>'
+                            tmp = '<span style="display: inline-block;font-size:14px;">正常</span>'
                         }
                         return tmp
                     }},
@@ -150,11 +165,15 @@
             },
             "fnServerParams": function (e) {
                 e.s_status = $("#statusSelect option:selected").val()
+                e.s_excp = $("#dataSelect option:selected").val()
             }
         });
         $('#statusSelect').on('changed.bs.select', function () {
             ttable.api().ajax.reload();
         })
+        $('#dataSelect').on('changed.bs.select', function () {
+            ttable.api().ajax.reload();
+        })
     });
 
     function checkResult() {
@@ -165,4 +184,7 @@
             showTip("没有审核数据")
         }
     }
+    function checkExcpResult() {
+        window.location.href = "/front/check/excp/result?pid={{.T.pid}}&tid={{.T.tid}}&s_sourceinfo={{.T.sourceinfo}}&stype={{.T.stype}}&datatype={{.T.datatype}}"
+    }
 </script>

+ 11 - 7
src/web/templates/project/check_detail.html

@@ -208,7 +208,7 @@
                 <div class="edit one" v-for="(one,oindex) in editData" :key="oindex">
                     <!--one-->
                     <div class="edit-title" @click="one.show = !one.show">
-                        <span>[[one.title]]</span>
+                        <span>[[one.title]]<span style="color: red;font-size: 14px;margin-left: 20px" v-if="one.title == '基本字段' && titleDesc">[[titleDesc]]</span></span>
                         <div class="button-group">
                             <div v-if="one.showCheck">
                                 <input :id="one.title" v-show="one.title == '标的信息'" @click.stop type="checkbox"
@@ -415,6 +415,9 @@
     let purchasing_all_tag = {{ .T.ck_pclistag }}           // 标的物是否全部标记
     let package_status = {{ .T.ck_package }}                //包标记
     let winneroder_status = {{ .T.ck_winnerorder }}         //中标候选人标记
+
+    console.log({{ .T.s_excp_info }})
+
     // 页面数据
     var pageDataMap = {
         '原文': {
@@ -484,21 +487,21 @@
             }
         } else if (event.keyCode === 83) {//采购单位快捷键s
             if (event.shiftKey) {
-                app.changeBaseValue(8, '', 2) //删除对应文本
+                app.changeBaseValue(14, '', 2) //删除对应文本
             } else {
-                app.changeBaseValue(8, text, 2)//填充
+                app.changeBaseValue(14, text, 2)//填充
             }
         } else if (event.keyCode === 88) {//代理机构快捷键x
             if (event.shiftKey) {
-                app.changeBaseValue(9, '', 2) //删除对应文本
+                app.changeBaseValue(15, '', 2) //删除对应文本
             } else {
-                app.changeBaseValue(9, text, 2)//填充
+                app.changeBaseValue(15, text, 2)//填充
             }
         } else if (event.keyCode === 68) {//中标单位快捷键d
             if (event.shiftKey) {
-                app.changeBaseValue(10, '', 2) //删除对应文本
+                app.changeBaseValue(8, '', 2) //删除对应文本
             } else {
-                app.changeBaseValue(10, text, 2)//填充
+                app.changeBaseValue(8, text, 2)//填充
             }
         }
     });
@@ -746,6 +749,7 @@
         el: '#app',
         delimiters: ["[[", "]]"],
         data: {
+            titleDesc: {{ .T.s_excp_info }},
             activeLabel: '原文',
             nowLabel: ['原文'],
             otherInfo: otherInfo,

+ 99 - 0
src/web/templates/project/check_excp_result.html

@@ -0,0 +1,99 @@
+{{include "com/inc.html"}}
+<!-- Main Header -->
+{{include "com/header.html"}}
+<!-- Left side column. 权限菜单 -->
+{{include "com/menu.html"}}
+<div class="content-wrapper">
+    <section class="content-header">
+        <h1><small></small></h1>
+        <ol class="breadcrumb" name="tab1" style="display: none">
+            <li><a href="/front/project"><i class="fa fa-dashboard"></i> 项目列表</a></li>
+            <li><a href="/front/user/check/data?pid={{.T.pid}}&s_sourceinfo={{.T.sourceinfo}}"><i class="fa fa-dashboard"></i> 质检列表</a></li>
+            <li><a href="#"><i class="fa fa-dashboard"></i> 异常校验结果</a></li>
+        </ol>
+        <ol class="breadcrumb" name="tab2" style="display: none">
+            <li><a href="/front/group/admin/task/list"><i class="fa fa-dashboard"></i> 剑鱼任务列表</a></li>
+            <li><a href="/front/user/check/data?pid={{.T.pid}}&tid={{.T.tid}}&s_sourceinfo={{.T.sourceinfo}}&stype=group"><i class="fa fa-dashboard"></i> 质检列表</a></li>
+            <li><a href="#"><i class="fa fa-dashboard"></i> 异常校验结果</a></li>
+        </ol>
+        <ol class="breadcrumb" name="tab3" style="display: none">
+            <li><a href="/front/group/task/list"><i class="fa fa-dashboard"></i> 用户组任务列表</a></li>
+            <li><a href="/front/user/check/data?pid={{.T.pid}}&tid={{.T.tid}}&s_sourceinfo={{.T.sourceinfo}}&stype=group"><i class="fa fa-dashboard"></i> 质检列表</a></li>
+            <li><a href="#"><i class="fa fa-dashboard"></i> 异常校验结果</a></li>
+        </ol>
+        <ol class="breadcrumb" name="tab4" style="display: none">
+            <li><a href="/front/user/check/list?"><i class="fa fa-dashboard"></i> 质检任务列表</a></li>
+            <li><a href="/front/user/check/data?pid={{.T.pid}}&tid={{.T.tid}}&s_sourceinfo={{.T.sourceinfo}}&stype=user"><i class="fa fa-dashboard"></i> 质检列表</a></li>
+            <li><a href="#"><i class="fa fa-dashboard"></i> 异常校验结果</a></li>
+        </ol>
+    </section>
+    <!-- Main content -->
+    <section class="content">
+        <div class="row">
+            <div class="col-xs-12">
+                <div class="box">
+                    <div class="box-body">
+                        <table id="dataTable" class="table table-bordered table-hover">
+                            <thead>
+                            <tr>
+                                <th>用户</th>
+                                <th>异常数据量</th>
+                                <th>标注数据量</th>
+                                <th>异常占比</th>
+                            </tr>
+                            </thead>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </section>
+</div>
+
+{{include "com/footer.html"}}
+<script>
+    let router = sessionStorage.getItem("check")
+    if (router === "project") {
+        $('ol[name="tab1"]').show()
+        menuActive("/front/project")
+    }else if (router === "jygroup") {
+        $('ol[name="tab2"]').show()
+        menuActive("/front/group/admin/task/list");
+    }else if (router === "group") {
+        $('ol[name="tab3"]').show()
+        menuActive("/front/group/task/list");
+    }else if (router === "task") {
+        $('ol[name="tab4"]').show()
+        menuActive("/front/user/check/list");
+    }
+
+    let dataResult = {{ .T.tableData }}
+
+    $(function () {
+        ttable = $('#dataTable').dataTable({
+            "paging": false,
+            "lengthChange": false,
+            "searching": false,
+            "ordering": false,
+            "info": true,
+            "autoWidth": false,
+            "serverSide": false,
+            "language": {
+                "url": "/dist/js/dataTables.chinese.lang"
+            },
+            "columns": [
+                {"data": "name"},
+                {"data": "num1"},
+                {"data": "num2"},
+                {"data": "num3"}
+            ],
+            "initComplete": function () {
+
+            },
+        });
+
+        ttable.fnClearTable();
+        ttable.fnAddData(dataResult);
+    });
+
+</script>

+ 36 - 3
src/web/templates/project/project_clear.html

@@ -187,6 +187,18 @@
     let tableData = []
     let stype = ""                                  // 分发类型:所有数据:all 达标数据:notag 未达标:tag
 
+    //展示loading框
+    showLoading = function (text){
+        if(text){
+            $("#loadText").html(text)
+        }
+        $('#loadingModal').modal({backdrop: 'static', keyboard: false});
+    }
+    //隐藏掉loading框
+    hideLoading = function (){
+        $('#loadingModal').modal('hide');
+    }
+
     $(function () {
         ttable = $('#dataTable').dataTable({
             "paging": true,
@@ -243,7 +255,7 @@
                         tmp = '<div>' +
                             '<a class="btn btn-sm btn-primary" href="/front/group/user/task/list?pid='+projectid+'&grouptaskid='+val+'&s_groupid='+row.s_groupid+'&s_sourceinfo='+row.s_sourceinfo+'">查看</a>&nbsp;&nbsp;' +
                             '<a class="btn btn-sm btn-primary" onclick="retrieveTask(\''+val+'\',\''+row.s_sourceinfo+'\',\''+row.s_status+'\')">收回</a>&nbsp;&nbsp;' +
-                            // '<a class="btn btn-sm btn-primary" href=href="/front/user/check/data?pid='+row.s_projectid+'&tid=' + val + '&s_sourceinfo='+row.s_sourceinfo+'">质检</a>&nbsp;&nbsp;' +
+                            '<a class="btn btn-sm btn-primary" onclick="checkMethod1(\'' + row.s_projectid + '\',\'' + val + '\',\'' + row.s_sourceinfo + '\')">质检</a>&nbsp;&nbsp;' +
                             '<a class="btn btn-sm btn-primary" onclick="repulseTask(\''+val+'\',\''+row.s_sourceinfo+'\',\''+row.s_status+'\')">打回</a>&nbsp;&nbsp;' +
                             '<a class="btn btn-sm btn-primary" onclick="closeTask(\'' + val + '\',\''+row.s_sourceinfo+'\',\'' + row.s_status + '\')">关闭</a>&nbsp;&nbsp;' +
                             '</div>';
@@ -482,6 +494,7 @@
         if (stype === "all") {
             let num0 = {{ .T.allIsTagDataNum }}     // 已标注
             if (num0 > 0) {
+                sessionStorage.setItem("check", "project")
                 window.location.href = "/front/user/check/data?pid="+projectid+"&s_sourceinfo={{.T.s_sourceinfo}}"+"&stype="+stype
             }else {
                 showTip("没有质检数据")
@@ -494,13 +507,28 @@
             if (num0 > 0) {
                 if (num1 > 0) {
                     if (num3 > 0) {
+                        sessionStorage.setItem("check", "project")
                         window.location.href = "/front/user/check/data?pid="+projectid+"&s_sourceinfo={{.T.s_sourceinfo}}"+"&stype="+stype+"&datatype=2"
                     }else {
                         showTip("没有质检数据")
                     }
                 }else {
                     if (num2 > 0) {
-                        window.location.href = "/front/user/check/data?pid="+projectid+"&s_sourceinfo={{.T.s_sourceinfo}}"+"&stype="+stype+"&datatype=1"
+                        showLoading("数据处理中...")
+                        $.ajax({
+                            url: "/front/check/excp/notag/data",
+                            type: 'POST',
+                            data: {"s_sourceinfo": sourceinfo},
+                            success: function (r) {
+                                hideLoading()
+                                if (r.success) {
+                                    sessionStorage.setItem("check", "project")
+                                    window.location.href = "/front/user/check/data?pid="+projectid+"&s_sourceinfo={{.T.s_sourceinfo}}"+"&stype="+stype+"&datatype=1"
+                                } else {
+                                    showTip(r.msg);
+                                }
+                            }
+                        })
                     }else {
                         showTip("没有质检数据")
                     }
@@ -512,6 +540,7 @@
         }else {
             let num0 = {{ .T.IsNotOkIsTagDataNum }}
             if (num0 > 0) {
+                sessionStorage.setItem("check", "project")
                 window.location.href = "/front/user/check/data?pid="+projectid+"&s_sourceinfo={{.T.s_sourceinfo}}"+"&stype="+stype
             }else {
                 showTip("没有质检数据")
@@ -523,7 +552,7 @@
         let num1 = {{ .T.okIsGiveDataNum }}     // 达标 已分发
         let num2 = {{ .T.okNotGiveDataNum }}    // 达标 待分发
         let num3 = {{ .T.okIsTagDataNum }}      // 达标 已标注
-        if (num2 > 0 && num1 === 0 && num3 === 0) {
+        if (num2 > 0 && num1 === 0 && num3 > 0) {
             showConfirm("确认达标数据通过质检?确认后,达标数据将无法进行标注、分发,默认完成标注。", function () {
                 $.ajax({
                     url: "/front/project/check/success",
@@ -564,4 +593,8 @@
             showTip("操作不允许", 500)
         }
     }
+    function checkMethod1(pid, tid, sourceinfo) {
+        sessionStorage.setItem("check", "project")
+        window.location.href = "/front/user/check/data?pid="+pid+"&tid="+tid+"&s_sourceinfo="+sourceinfo+"&stype=group"
+    }
 </script>

+ 6 - 6
src/web/templates/project/remark_detail.html

@@ -482,21 +482,21 @@
             }
         } else if (event.keyCode === 83) {//采购单位快捷键s
             if (event.shiftKey) {
-                app.changeBaseValue(8, '', 2) //删除对应文本
+                app.changeBaseValue(14, '', 2) //删除对应文本
             } else {
-                app.changeBaseValue(8, text, 2)//填充
+                app.changeBaseValue(14, text, 2)//填充
             }
         } else if (event.keyCode === 88) {//代理机构快捷键x
             if (event.shiftKey) {
-                app.changeBaseValue(9, '', 2) //删除对应文本
+                app.changeBaseValue(15, '', 2) //删除对应文本
             } else {
-                app.changeBaseValue(9, text, 2)//填充
+                app.changeBaseValue(15, text, 2)//填充
             }
         } else if (event.keyCode === 68) {//中标单位快捷键d
             if (event.shiftKey) {
-                app.changeBaseValue(10, '', 2) //删除对应文本
+                app.changeBaseValue(8, '', 2) //删除对应文本
             } else {
-                app.changeBaseValue(10, text, 2)//填充
+                app.changeBaseValue(8, text, 2)//填充
             }
         }
     });

+ 6 - 1
src/web/templates/project/task_detail.html

@@ -220,7 +220,7 @@
                     "data": "_id", width: "11%", render: function (val, a, row, pos) {
                         tmp = '<div>' +
                             '<a class="btn btn-sm btn-primary" onclick="retrieveTask(\''+val+'\',\''+row.s_sourceinfo+'\',\''+row.s_status+'\')">收回</a>&nbsp;&nbsp;' +
-                            '<a class="btn btn-sm btn-primary" href="/front/user/check/data?pid='+row.s_projectid+'&tid=' + val + '&s_sourceinfo='+row.s_sourceinfo+'">质检</a>&nbsp;&nbsp;' +
+                            '<a class="btn btn-sm btn-primary" onclick="checkMethod(\'' + row.s_projectid + '\',\'' + val + '\',\'' + row.s_sourceinfo + '\')">质检</a>&nbsp;&nbsp;' +
                             '<a class="btn btn-sm btn-primary" onclick="closeTask(\'' + val + '\',\'' + row.s_status + '\',\''+row.s_sourceinfo+'\')">打回</a>&nbsp;&nbsp;' +
                             '</div>';
                         return tmp
@@ -466,4 +466,9 @@
             showTip("操作不允许")
         }
     }
+    function checkMethod(pid, tid, sourceinfo) {
+        sessionStorage.setItem("check", "detail")
+        window.location.href = "/front/user/check/data?pid="+pid+"&tid="+tid+"&s_sourceinfo="+sourceinfo
+
+    }
 </script>