Browse Source

修复bug

liling 1 year ago
parent
commit
e5ff3601fb
35 changed files with 1297 additions and 105 deletions
  1. 4 7
      service/controllers/busAdminController.go
  2. 98 1
      service/controllers/reportController.go
  3. 2 2
      service/controllers/scdCompController.go
  4. 2 2
      service/controllers/screenController.go
  5. 8 4
      service/controllers/taskController.go
  6. 14 0
      service/models/bo/attachment.go
  7. 61 22
      service/models/bo/check_sys_model.go
  8. 36 0
      service/models/bo/check_sysmodel_ied_func.go
  9. 24 0
      service/models/bo/check_sysmodel_ied_func_fcda.go
  10. 5 6
      service/models/bo/check_sysmodel_ied_relation.go
  11. 1 1
      service/models/bo/checktools_area.go
  12. 17 7
      service/models/bo/scd_diff_compare.go
  13. 2 2
      service/models/bo/task.go
  14. 58 16
      service/models/bo/task_model.go
  15. 88 7
      service/models/bo/task_report.go
  16. 27 0
      service/routers/commentsRouter_____________ME_GoProject_src_scd_check_tools_controllers.go
  17. 27 0
      service/routers/commentsRouter_controllers.go
  18. 1 1
      service/static/pc/ArcFace32.dat
  19. BIN
      service/static/pc/ArcFaceSharp.dll
  20. 17 3
      service/static/pc/Demo.html
  21. BIN
      service/static/pc/GPUCache/data_0
  22. BIN
      service/static/pc/GPUCache/data_1
  23. BIN
      service/static/pc/GPUCache/data_3
  24. BIN
      service/static/pc/MonitorClientApp.exe
  25. BIN
      service/static/pc/MonitorClientApp.pdb
  26. BIN
      service/static/pc/Web2Cs.exe
  27. 2 1
      service/static/pc/Web2Cs.exe.config
  28. BIN
      service/static/pc/Web2Cs.pdb
  29. 368 0
      service/static/pc/debug.log
  30. 6 6
      service/static/pc/lic.txt
  31. 122 4
      service/static/swagger/swagger.json
  32. 84 4
      service/static/swagger/swagger.yml
  33. 122 4
      service/swagger/swagger.json
  34. 84 4
      service/swagger/swagger.yml
  35. 17 1
      service/test/test.go

+ 4 - 7
service/controllers/busAdminController.go

@@ -319,16 +319,13 @@ func (c *BusAdminController) CopySysModelByID() {
 		return
 	}
 	new_name := c.GetString("newname")
-	if new_name == "" {
-		c.Data["json"] = c.ResultError("新模型名称不能为空!")
-		c.ServeJSON()
-		return
-	}
+
 	obj := new(bo.SysCheckModelMgr)
 	obj.SetUserInfo(c.GetCurrentUserInfo())
 	obj.Model = bo.T_data_model_defualt{Id: id}
 	obj.Model.Id = id
-	err, newid := obj.Copy(new_name)
+	obj.Model.ModelName = new_name
+	err, newid := obj.Copy(id)
 	if err != nil {
 		c.Data["json"] = c.ResultError(err.Error())
 		c.ServeJSON()
@@ -389,7 +386,7 @@ func (c *BusAdminController) GetSysModelList() {
 	obj.SetUserInfo(c.GetCurrentUserInfo())
 	obj.Model = bo.T_data_model_defualt{}
 	obj.Model.Id, _ = c.GetInt("id")
-	obj.Model.IsSys, _ = c.GetInt("is_sys")
+	obj.Model.IsSys, _ = c.GetInt("is_sys", 1) //默认查询系统内置模型
 	obj.Model.VolId, _ = c.GetInt("vol_id")
 	obj.Model.ModelName = c.GetString("model_name")
 	obj.Model.LineLinkStyle, _ = c.GetInt("line_link_style")

+ 98 - 1
service/controllers/reportController.go

@@ -22,6 +22,103 @@ type ReportController struct {
 func init() {
 }
 
+// @Summary 查询检测任务的报告列表
+//	@Description  查询检测任务的报告列表
+// 	@Tags         检测报告服务接口
+// 	@Accept       x-www-form-urlencoded
+// 	@Produce      json
+//	@Param 	pageno 			query   int  	true 	"当前页码。默认为1"
+//	@Param 	pagesize 		query   int  	true 	"每页显示数据数。默认为20"
+//	@Param 	task_id 	formData   int false "任务ID"
+//	@Param 	name 	formData   string false "任务名称。"
+//	@Param 	code 	formData   string false "任务编号。支持模糊匹配。"
+// 	@Success     200    {object} ResultOK 成功
+// 	@Failure 	 500 	{object} ResultError  失败
+// @router /report/list [get]
+func (c *ReportController) GetReportList() {
+	id, _ := c.GetInt("task_id")
+	pi, _ := c.GetInt("pagesize", 20)
+	po, _ := c.GetInt("pageno", 0)
+	if po == 0 {
+		po, _ = c.GetInt("pageindex", 0)
+	}
+	if po == 0 {
+		po = 1
+	}
+	obj := new(bo.TaskReportMgr)
+	obj.SetUserInfo(c.GetCurrentUserInfo())
+	obj.Model = bo.T_data_task_report{TaskId: id, Name: c.GetString("name"), Code: c.GetString("code")}
+	lst, cnt, err := obj.List(po, pi)
+	if err != nil {
+		c.Data["json"] = c.ResultError(err.Error())
+		c.ServeJSON()
+		return
+	}
+	c.Data["json"] = c.ResultOK(lst, cnt)
+	c.ServeJSON()
+}
+
+// @Summary 删除指定的检测报告
+//	@Description  删除指定的检测报告
+// 	@Tags         检测报告服务接口
+// 	@Accept       x-www-form-urlencoded
+// 	@Produce      json
+//	@Param 	id 		formData   int  true 	"检测报告ID"
+// 	@Success     200    {object} ResultOK 成功
+// 	@Failure 	 500 	{object} ResultError  失败
+// @router /report/delete [post]
+func (c *ReportController) DeleteReport() {
+	id, _ := c.GetInt("id")
+	if id == 0 {
+		c.Data["json"] = c.ResultError("报告编号不能为空!")
+		c.ServeJSON()
+		return
+	}
+	obj := new(bo.TaskReportMgr)
+	obj.SetUserInfo(c.GetCurrentUserInfo())
+	obj.Model = bo.T_data_task_report{}
+	obj.Model.Id = id
+	err := obj.Delete()
+	if err != nil {
+		c.Data["json"] = c.ResultError(err.Error())
+		c.ServeJSON()
+		return
+	}
+	c.Data["json"] = c.ResultOK("", 0)
+	c.ServeJSON()
+}
+
+// @Summary 生成指定检测任务的报告
+//	@Description  生成指定检测任务的报告
+// 	@Tags         检测报告服务接口
+// 	@Accept       x-www-form-urlencoded
+// 	@Produce      json
+//	@Param 	task_id 			formData   int  	true 	"任务ID"
+// 	@Success     200    {object} ResultOK 成功
+// 	@Failure 	 500 	{object} ResultError  失败
+// @router /report/make [post]
+func (c *ReportController) MakeReport() {
+	id, _ := c.GetInt("task_id")
+	if id == 0 {
+		c.Data["json"] = c.ResultError("检测任务ID不能为空")
+		c.ServeJSON()
+		return
+	}
+	obj := new(bo.TaskReportMgr)
+	obj.SetUserInfo(c.GetCurrentUserInfo())
+	obj.Model = bo.T_data_task_report{TaskId: id, State: 1}
+	reportid, err := obj.Make()
+	if err != nil {
+		c.Data["json"] = c.ResultError(err.Error())
+		c.ServeJSON()
+		return
+	}
+	obj.Model.Id = reportid
+	info, _ := obj.One(id)
+	c.Data["json"] = c.ResultOK(info, 1)
+	c.ServeJSON()
+}
+
 // @Summary 创建新的检测报告模板
 //	@Description  创建新的检测报告模板
 // 	@Tags         检测报告服务接口
@@ -72,7 +169,7 @@ func (c *ReportController) SavereportTplInfo() {
 // 	@Tags         检测报告服务接口
 // 	@Accept       x-www-form-urlencoded
 // 	@Produce      json
-//	@Param 	id 		formData   int  true 	"检测报告ID"
+//	@Param 	id 		formData   int  true 	"检测报告模板ID"
 // 	@Success     200    {object} ResultOK 成功
 // 	@Failure 	 500 	{object} ResultError  失败
 // @router /report/tpl/delete [post]

+ 2 - 2
service/controllers/scdCompController.go

@@ -184,9 +184,9 @@ func (c *ScdCompController) GetCompStatResult() {
 // @Param        type 			query   string   true  "对比的文件类型。值为scd\ccd\cid\ccd_cid_scd\icd_scd之一。"
 // @Param        comp_id 		query   int   false  "差异比对记录ID。不为空或0时表示重新比对差异"
 // @Param        station_id 	query  	int   true  "变电站ID"
-// @Param        source_scd_id 	query  	int   false  "对比的基准SCD文件ID。type为scd时必填。"
+// @Param        source_scd_id 	query  	int   true  "对比的基准SCD文件ID。type为scd时必填。"
 // @Param        target_scd_id 	query  	int   false  "对比的参照SCD文件ID。type为scd时必填。"
-// @Param        ids 			query  	string   false  "如果是2个非SCD对比文件时,需要对比的文件ID列表,使用逗号分隔。仅当type为ccd\cid\ccd_cid_scd\icd_scd时有效"
+// @Param        ids 			query  	string   false  "非SCD对比对象列表,默认2个元素,第一个为装置name(基准对象),第二个为文件id(对比文件)。如果是2个非SCD对比文件时,需要对比的装置name或文件ID列表,使用逗号分隔。仅当type为ccd\cid\ccd_cid_scd\icd_scd时有效"
 // @Success      200    {object} ResultOK   成功
 // @Failure 	 500 	status  失败
 // @router /scd/comp/start [post]

+ 2 - 2
service/controllers/screenController.go

@@ -166,8 +166,8 @@ func (c *ScreenController) RemoveScdInfo() {
 // 	@Accept       x-www-form-urlencoded
 // 	@Produce      json
 //	@Param 	station_id 	formData   int  	true 	"变电站ID"
-//	@Param 	scdname 	formData   string  	false 	"SCD名称"
-//	@Param 	scdpath 	formData   string  	false 	"SCD路径"
+//	@Param 	scd_name 	formData   string  	false 	"SCD名称"
+//	@Param 	scd_path 	formData   string  	false 	"SCD路径"
 // 	@Success     200    {object} ResultOK 成功
 // 	@Failure 	 500 	{object} ResultError  失败
 // @router /screen/scd/tmp_parse [post]

+ 8 - 4
service/controllers/taskController.go

@@ -15,6 +15,7 @@ import (
 	"fmt"
 	"scd_check_tools/models/bo"
 	"scd_check_tools/tools"
+	"strings"
 	"time"
 )
 
@@ -79,12 +80,12 @@ func (c *TaskController) SaveTaskInfo() {
 		return
 	}
 	if modelids == "" || modelids == "[]" {
-		c.Data["json"] = c.ResultError("检测任务的间隔检测模型不能为空")
+		c.Data["json"] = c.ResultError("检测任务的模型不能为空")
 		c.ServeJSON()
 		return
 	}
-	area_models := []int{}
-	err1 := json.Unmarshal([]byte(`[`+modelids+`]`), &area_models)
+	area_models := []string{}
+	err1 := json.Unmarshal([]byte(`["`+strings.ReplaceAll(modelids, ",", "\",\"")+`"]`), &area_models)
 	if err1 != nil {
 		c.Data["json"] = c.ResultError(err1.Error())
 		c.ServeJSON()
@@ -277,6 +278,8 @@ func (c *TaskController) GetTaskInfo() {
 		c.ServeJSON()
 		return
 	}
+	rep := new(bo.TaskReportMgr)
+	report, _ := rep.One(lst.Id)
 	result := map[string]interface{}{}
 	result["id"] = lst.Id
 	result["code"] = lst.Code
@@ -285,11 +288,12 @@ func (c *TaskController) GetTaskInfo() {
 	result["end_time"] = lst.EndTime
 	result["memo"] = lst.Memo
 	result["name"] = lst.Name
-	result["report_id"] = lst.ReportId
+	result["report_id"] = lst.ReportId //报告模板ID
 	result["scd_id"] = lst.ScdId
 	result["scd_info"] = scdinfo
 	result["start_time"] = lst.StartTime
 	result["models"] = models
+	result["report_info"] = report //生成的报告信息
 	c.Data["json"] = c.ResultOK(result, 1)
 	c.ServeJSON()
 }

+ 14 - 0
service/models/bo/attachment.go

@@ -359,6 +359,20 @@ func (c *AttachmentMgr) Delete(isall ...bool) (err error) {
 	return err
 }
 
+//获取指定装置及类型的文件信息
+func (c *AttachmentMgr) GetInfoByIed(scdid int64, iedname, iedtype string) (T_sys_attachment, error) {
+	result := T_sys_attachment{}
+	db := orm.NewOrm()
+	rowset := []orm.Params{}
+	db.Raw("select * from t_sys_attachment where scd_id=? and ied_name=? and file_suffix=?", scdid, iedname, iedtype).Values(&rowset)
+	if len(rowset) > 0 {
+		id, _ := strconv.Atoi(tools.IsEmpty(rowset[0]["id"]))
+		result.Id = int32(id)
+		result.SavePath = tools.IsEmpty(rowset[0]["save_path"])
+	}
+	return result, nil
+}
+
 //开始分析指定的scd文件
 func (c *AttachmentMgr) StartScdTempParse(stationid int, scdname, scdpath string) error {
 	if stationid == 0 {

+ 61 - 22
service/models/bo/check_sys_model.go

@@ -5,6 +5,7 @@ import (
 	"encoding/xml"
 	"errors"
 	"fmt"
+	"scd_check_tools/arrayex"
 	"scd_check_tools/logger"
 	"scd_check_tools/models/enum"
 	"scd_check_tools/tools"
@@ -24,7 +25,8 @@ type T_data_model_defualt struct {
 	LineLinkStyle int    // '接线方式' ,
 	IedTypes      string // '包含的装置类型' ,
 	RelationJson  string // '关系定义内容' ,
-	IsSys         int    //是否内置模型 1 内置  2 自定义
+	IsSys         int    //是否内置模型。1 系统内置模型 2 任务检测模型
+	FromModelId   int    //非系统内置模型时的参照模型ID。is_sys为2时有效
 	Cr            int    // '创建人' ,
 	Ct            string `orm:"-"` // '创建时间' ,
 	Ur            int    // '更新人' ,
@@ -163,6 +165,9 @@ func (c *SysCheckModelMgr) Save() (err error) {
 		if c.Model.IsSys == 0 {
 			c.Model.IsSys = tmpObj.IsSys
 		}
+		if c.Model.FromModelId == 0 {
+			c.Model.FromModelId = tmpObj.FromModelId
+		}
 
 		if c.Model.RelationJson != "" {
 			// 解析出模型需要的装置类型
@@ -191,21 +196,17 @@ func (c *SysCheckModelMgr) Save() (err error) {
 				dblog.Fail2()
 				return err
 			}
-			/*
-				if nodes.Nodes != nil && len(nodes.Nodes) > 0 {
-					iedtypes := []string{}
-					for _, ritem := range nodes.Nodes {
-						iedtypes = append(iedtypes, ritem.Properties.IedType)
-					}
-					c.Model.IedTypes = strings.Join(iedtypes, ",")
-				}
-			*/
 			if modelJson["nodes"] != nil {
 				nodes := modelJson["nodes"].([]interface{})
 				iedtypes := []string{}
 				for _, ritem := range nodes {
 					properties := ritem.(map[string]interface{})["properties"].(map[string]interface{})
-					iedtypes = append(iedtypes, tools.IsEmpty(properties["ied_type"]))
+					tmp := tools.IsEmpty(properties["ied_type"])
+					if arrayex.IndexOf(iedtypes, tmp) > 0 {
+						//装置类型重复了
+						return errors.New("装置类型" + tmp + "不能重复引用")
+					}
+					iedtypes = append(iedtypes, tmp)
 				}
 				c.Model.IedTypes = strings.Join(iedtypes, ",")
 			}
@@ -220,6 +221,19 @@ func (c *SysCheckModelMgr) Save() (err error) {
 			c.Model.Cr = tmpObj.Cr
 			c.Model.Ur, _ = strconv.Atoi(c.GetUserId())
 			_, err = db.Update(&c.Model)
+			if err != nil {
+				//对比装置类型是否有变动.如果有减少则,需要同步删除减少装置类型的相关数据
+				oldTypes := strings.Split(tmpObj.IedTypes, ",")
+				newTypes := "," + c.Model.IedTypes + ","
+				for _, item := range oldTypes {
+					if strings.Index(newTypes, ","+item+",") == -1 {
+						//当前装置类型item被删除:删除该装置类型原来的功能定义等
+						m1 := new(SysCheckModelIedFuncMgr)
+						m1.Model = T_data_model_func_def{ModelId: c.Model.Id, IedType: item}
+						m1.Delete()
+					}
+				}
+			}
 		}
 	}
 	if err != nil {
@@ -283,7 +297,7 @@ func (c *SysCheckModelMgr) Delete() (err error) {
 }
 
 //复制模型
-func (c *SysCheckModelMgr) Copy(newmodelname string) (error, int) {
+func (c *SysCheckModelMgr) Copy(modelid int) (error, int) {
 	dblog := new(SystemLog)
 	dblog.SetUserInfo(c.GetUserInfo())
 	dblog.Audittype = enum.AuditType_check_model
@@ -291,9 +305,19 @@ func (c *SysCheckModelMgr) Copy(newmodelname string) (error, int) {
 	dblog.Eventtype = enum.OptEventType_Bus
 	dblog.Eventlevel = enum.OptEventLevel_Low
 	o := orm.NewOrm()
-	o.Read(&c.Model)
-	sql := "insert into t_data_model_defualt(model_name,area_type,vol_id,line_link_style,ied_types,relation_json,is_sys)values(?,?,?,?,?,?,?)"
-	r, err := o.Raw(sql, []interface{}{newmodelname, c.Model.AreaType, c.Model.VolId, c.Model.LineLinkStyle, c.Model.IedTypes, c.Model.RelationJson, 2}).Exec()
+	tmpM := T_data_model_defualt{Id: modelid}
+	err := o.Read(&tmpM)
+	if err != nil {
+		logger.Logger.Error(err)
+		return err, 0
+	}
+	if c.Model.ModelName != "" {
+		tmpM.ModelName = c.Model.ModelName + tmpM.ModelName
+	} else {
+		tmpM.ModelName = "[检测模型]" + tmpM.ModelName
+	}
+	sql := "insert into t_data_model_defualt(model_name,area_type,vol_id,line_link_style,ied_types,relation_json,is_sys,from_model_id)values(?,?,?,?,?,?,?,?)"
+	r, err := o.Raw(sql, []interface{}{tmpM.ModelName, tmpM.AreaType, tmpM.VolId, tmpM.LineLinkStyle, tmpM.IedTypes, tmpM.RelationJson, 2, modelid}).Exec()
 	if err != nil {
 		logger.Logger.Error(err)
 		dblog.Description = fmt.Sprintf("复制%s%s失败:%s", sysCheckModelDesc, c.Model.ModelName, err.Error())
@@ -302,7 +326,7 @@ func (c *SysCheckModelMgr) Copy(newmodelname string) (error, int) {
 	} else {
 		m2 := new(SysCheckModelIedRelationMgr)
 		m2.SetUserInfo(c.GetUserInfo())
-		m2.Model.ModelId = c.Model.Id
+		m2.Model = T_data_model_relation_def{ModelId: modelid}
 		newid, _ := r.LastInsertId()
 		err, _ = m2.Copy(int(newid))
 		if err != nil {
@@ -312,19 +336,34 @@ func (c *SysCheckModelMgr) Copy(newmodelname string) (error, int) {
 			dblog.Fail2()
 			return err, 0
 		}
+		//复制功能及端子信息
+		m3 := new(SysCheckModelIedFuncMgr)
+		m3.SetUserInfo(c.GetUserInfo())
+		err = m3.Copy(tmpM.Id, int(newid))
+		if err != nil {
+			c.Model.Id = int(newid)
+			c.Delete()
+			m2.Model.ModelId = int(newid)
+			m2.Delete()
+			dblog.Description = fmt.Sprintf("复制%s%s失败:%s", sysCheckModelDesc, c.Model.ModelName, err.Error())
+			dblog.Fail2()
+			return err, 0
+		}
 		dblog.Description = fmt.Sprintf("复制%s%s成功", sysCheckModelDesc, c.Model.ModelName)
 		dblog.Success2()
-		id, _ := r.LastInsertId()
-		return nil, int(id)
+		return nil, int(newid)
 	}
-	return nil, 0
 }
 
 //获取指定电压等级下的所有模型
-func (c *SysCheckModelMgr) GetModelsByVolid() ([]orm.Params, error) {
+func (c *SysCheckModelMgr) GetModelsByVolid(is_sys ...int) ([]orm.Params, error) {
 	o := orm.NewOrm()
-	sqlParamters := []interface{}{}
-	sql := "select t.id, t.model_name,t.area_type,c.code area_type_code,c.name area_type_name ,t.ied_types,t.is_sys ,c1.`code` vol_code,c1.`name` vol_name from t_data_model_defualt t INNER JOIN global_const_code c on c.id=t.area_type and c.parentcode='area_type' INNER JOIN global_const_code c1 on t.vol_id=c1.id and c1.parentcode='voltage_level' "
+	s := 1
+	if len(is_sys) > 0 {
+		s = is_sys[0]
+	}
+	sqlParamters := []interface{}{s}
+	sql := "select t.id, t.model_name,t.area_type,c.code area_type_code,c.name area_type_name ,t.ied_types,t.is_sys ,c1.`code` vol_code,c1.`name` vol_name from t_data_model_defualt t INNER JOIN global_const_code c on c.id=t.area_type and c.parentcode='area_type' INNER JOIN global_const_code c1 on t.vol_id=c1.id and c1.parentcode='voltage_level' where t.is_sys=? "
 	rowset := []orm.Params{}
 	_, err := o.Raw(sql, sqlParamters).Values(&rowset)
 	if err != nil {

+ 36 - 0
service/models/bo/check_sysmodel_ied_func.go

@@ -108,6 +108,42 @@ func (c *SysCheckModelIedFuncMgr) Exist() (bool, error) {
 	return false, err
 }
 
+func (c *SysCheckModelIedFuncMgr) Copy(oldModelid, newModelId int) error {
+	db := orm.NewOrm()
+	//将原端子关联数据复制到新模型
+	_, err := db.Raw("insert into t_data_model_fcda_ref(model_id,relation_ref,from_ied_code,from_func_id,from_fcda_id,to_ied_code,to_func_id,to_fcda_id,goosesv) select ?,relation_ref,from_ied_code,from_func_id,from_fcda_id,to_ied_code,to_func_id,to_fcda_id,goosesv from t_data_model_fcda_ref where model_id=?", newModelId, oldModelid).Exec()
+	if err != nil {
+		logger.Logger.Error(err)
+		return err
+	}
+	rowset := []orm.Params{}
+	db.Raw("select * from t_data_model_func_def where model_id=?", oldModelid).Values(&rowset)
+	for _, row := range rowset {
+		oldFuncId, _ := strconv.Atoi(tools.IsEmpty(row["id"]))
+		//复制功能数据
+		newFunc := T_data_model_func_def{
+			ModelId:  newModelId,
+			IedType:  tools.IsEmpty(row["ied_type"]),
+			FuncName: tools.IsEmpty(row["func_name"]),
+		}
+		newid, err := db.Insert(&newFunc)
+		if err != nil {
+			logger.Logger.Error(err)
+			return err
+		}
+		//复制功能下的端子信息
+		m1 := new(SysCheckModelIedFuncFcdaMgr)
+		m1.Model = T_data_model_func_fcda{ModelId: oldModelid}
+		err = m1.Copy(oldFuncId, newModelId, int(newid))
+		if err != nil {
+			newFunc.Id = int(newid)
+			db.Delete(&newFunc)
+			return err
+		}
+	}
+	return nil
+}
+
 //根据model中指定的id删除
 func (c *SysCheckModelIedFuncMgr) Delete() (err error) {
 	dblog := new(SystemLog)

+ 24 - 0
service/models/bo/check_sysmodel_ied_func_fcda.go

@@ -6,6 +6,7 @@ import (
 	"scd_check_tools/logger"
 	"scd_check_tools/models/enum"
 	"scd_check_tools/tools"
+	"strconv"
 
 	"github.com/astaxie/beego/orm"
 )
@@ -85,6 +86,29 @@ func (c *SysCheckModelIedFuncFcdaMgr) Exist() (bool, error) {
 	}
 	return false, err
 }
+func (c *SysCheckModelIedFuncFcdaMgr) Copy(oldFuncId, newModelId, newFuncId int) error {
+	db := orm.NewOrm()
+	rowset := []orm.Params{}
+	db.Raw("select * from t_data_model_func_fcda where model_id=? and func_id=?", c.Model.ModelId, oldFuncId).Values(&rowset)
+	for _, row := range rowset {
+		oldFcdaId, _ := strconv.Atoi(tools.IsEmpty(row["id"]))
+		//复制端子数据
+		newFcda := T_data_model_func_fcda{
+			ModelId:      newModelId,
+			FuncId:       newFuncId,
+			FcdaName:     tools.IsEmpty(row["fcda_name"]),
+			FcdaMatchExp: tools.IsEmpty(row["fcda_match_exp"]),
+		}
+		newid, err := db.Insert(&newFcda)
+		if err != nil {
+			logger.Logger.Error(err)
+			return err
+		}
+		db.Raw("update t_data_model_fcda_ref set from_func_id=?,from_fcda_id=? where model_id=? and from_func_id=? and from_fcda_id=?", newFuncId, newid, newModelId, oldFuncId, oldFcdaId).Exec()
+		db.Raw("update t_data_model_fcda_ref set to_func_id=?,to_fcda_id=? where model_id=? and to_func_id=? and to_fcda_id=?", newFuncId, newid, newModelId, oldFuncId, oldFcdaId).Exec()
+	}
+	return nil
+}
 
 //根据model中指定的id删除
 func (c *SysCheckModelIedFuncFcdaMgr) Delete() (err error) {

+ 5 - 6
service/models/bo/check_sysmodel_ied_relation.go

@@ -142,7 +142,7 @@ func (c *SysCheckModelIedRelationMgr) Delete() (err error) {
 }
 
 //复制模型
-func (c *SysCheckModelIedRelationMgr) Copy(fromModelId int) (error, int) {
+func (c *SysCheckModelIedRelationMgr) Copy(newModelId int) (error, int) {
 	dblog := new(SystemLog)
 	dblog.SetUserInfo(c.GetUserInfo())
 	dblog.Audittype = enum.AuditType_check_model
@@ -150,16 +150,15 @@ func (c *SysCheckModelIedRelationMgr) Copy(fromModelId int) (error, int) {
 	dblog.Eventtype = enum.OptEventType_Bus
 	dblog.Eventlevel = enum.OptEventLevel_Low
 	o := orm.NewOrm()
-	o.Read(&c.Model)
-	sql := "insert into t_data_model_defualt(model_name,area_type,vol_id,line_link_style,ied_types,relation_json,is_sys)values(?,?,?,?,?,?,?)"
-	r, err := o.Raw(sql).Exec()
+	sql := "insert into t_data_model_relation_def(model_id,custem_model_id,from_ied_code,from_ied_name,to_ied_name,to_ied_code,in_type) select ?,custem_model_id,from_ied_code,from_ied_name,to_ied_name,to_ied_code,in_type from t_data_model_relation_def where model_id=?"
+	r, err := o.Raw(sql, newModelId, c.Model.ModelId).Exec()
 	if err != nil {
 		logger.Logger.Error(err)
-		dblog.Description = fmt.Sprintf("复制%s(%d)失败:%s", sysCheckModel_iedRelationDesc, fromModelId, err.Error())
+		dblog.Description = fmt.Sprintf("复制%s(%d)失败:%s", sysCheckModel_iedRelationDesc, newModelId, err.Error())
 		dblog.Fail2()
 		return err, 0
 	} else {
-		dblog.Description = fmt.Sprintf("复制%s(%d)成功", sysCheckModel_iedRelationDesc, fromModelId)
+		dblog.Description = fmt.Sprintf("复制%s(%d)成功", sysCheckModel_iedRelationDesc, newModelId)
 		dblog.Success2()
 		id, _ := r.LastInsertId()
 		return nil, int(id)

+ 1 - 1
service/models/bo/checktools_area.go

@@ -115,7 +115,7 @@ func (c *CheckAreaMgr) Init(scdid int64) {
 			volid = stationonof.AreaLevel
 		}
 	*/
-	tmplist, _ := new(SysCheckModelMgr).GetModelsByVolid()
+	tmplist, _ := new(SysCheckModelMgr).GetModelsByVolid(2)
 	scdModels, _, _ := new(TaskMgr).GetModelsByScdID(c.ScdId)
 	ms := map[string]interface{}{}
 	for _, row := range scdModels {

+ 17 - 7
service/models/bo/scd_diff_compare.go

@@ -1,16 +1,16 @@
 package bo
 
 import (
-	"scd_check_tools/logger"
-	"scd_check_tools/models/enum"
-	"scd_check_tools/models/node_attr"
-	"scd_check_tools/mqtt"
-	"scd_check_tools/tools"
 	"encoding/json"
 	"errors"
 	"fmt"
 	"os"
 	"runtime"
+	"scd_check_tools/logger"
+	"scd_check_tools/models/enum"
+	"scd_check_tools/models/node_attr"
+	"scd_check_tools/mqtt"
+	"scd_check_tools/tools"
 	"strconv"
 	"strings"
 	"sync"
@@ -714,7 +714,12 @@ func (c *ScdCompare) CidCompare() error {
 	//根据文件id获取路径
 	cid1id, _ := strconv.Atoi(c.CompFileIds[0])
 	if cid1id == 0 {
-		return errors.New("基准CID文件ID(" + c.CompFileIds[0] + ")不正确")
+		//非文件id时,表示是当前scd中的装置name
+		fileinfo, _ := new(AttachmentMgr).GetInfoByIed(c.Sourceid, c.CompFileIds[0], "cid")
+		if fileinfo.Id == 0 {
+			return errors.New("基准CID文件ID(" + c.CompFileIds[0] + ")不正确")
+		}
+		cid1id = int(fileinfo.Id)
 	}
 	cid2id, _ := strconv.Atoi(c.CompFileIds[1])
 	if cid2id == 0 {
@@ -843,7 +848,12 @@ func (c *ScdCompare) CcdCompare() error {
 	//根据文件id获取路径
 	ccd1id, _ := strconv.Atoi(c.CompFileIds[0])
 	if ccd1id == 0 {
-		return errors.New("基准CCD文件ID(" + c.CompFileIds[0] + ")不正确")
+		//非文件id时,表示是当前scd中的装置name
+		fileinfo, _ := new(AttachmentMgr).GetInfoByIed(c.Sourceid, c.CompFileIds[0], "ccd")
+		if fileinfo.Id == 0 {
+			return errors.New("基准CCD文件ID(" + c.CompFileIds[0] + ")不正确")
+		}
+		ccd1id = int(fileinfo.Id)
 	}
 	ccd2id, _ := strconv.Atoi(c.CompFileIds[1])
 	if ccd2id == 0 {

+ 2 - 2
service/models/bo/task.go

@@ -403,14 +403,14 @@ func (c *TaskMgr) List(pageno, pagesize int) ([]orm.Params, int, error) {
 	return r, totalCnt, err
 }
 
-//获取指定任务的已选择模型
+//获取指定任务的已选择模型对应的系统内置模型
 func (c *TaskMgr) GetModels() ([]orm.Params, int, error) {
 	if c.Model.Id == 0 {
 		return nil, 0, errors.New("任务ID不能为空")
 	}
 	db := orm.NewOrm()
 	rowset := []orm.Params{}
-	_, err := db.Raw("select t.*,t1.model_name,t1.vol_id,t1.line_link_style from t_data_task_model t,t_data_model_defualt t1 where t.model_id=t1.id and t.task_id=?", c.Model.Id).Values(&rowset)
+	_, err := db.Raw("select t.*,t1.from_model_id sys_model_id,t2.model_name,t2.vol_id,t2.line_link_style from t_data_task_model t,t_data_model_defualt t1,t_data_model_defualt t2 where t.model_id=t1.id and t1.from_model_id=t2.id and t.task_id=?", c.Model.Id).Values(&rowset)
 	if err != nil {
 		return rowset, 0, err
 	}

+ 58 - 16
service/models/bo/task_model.go

@@ -3,6 +3,7 @@ package bo
 import (
 	"errors"
 	"fmt"
+	"scd_check_tools/arrayex"
 	"scd_check_tools/logger"
 	"scd_check_tools/models/enum"
 	"scd_check_tools/tools"
@@ -37,26 +38,46 @@ func init() {
 }
 
 //保存任务模型信息
-func (c *TaskModelMgr) Save(modelids []int) (err error) {
+func (c *TaskModelMgr) Save(modelids []string) (err error) {
 	dblog := new(SystemLog)
 	dblog.SetUserInfo(c.GetUserInfo())
 	dblog.Audittype = enum.AuditType_check_task
 	dblog.Logtype = enum.LogType_Insert
 	dblog.Eventtype = enum.OptEventType_Bus
 	dblog.Eventlevel = enum.OptEventLevel_Hight
-	err = c.Delete()
-	if err != nil {
-		return err
-	}
+	//获取检测任务原来的模型
+	oldModels := []string{}
+	rowset := []orm.Params{}
 	db := orm.NewOrm()
+	db.Raw("select model_id from t_data_task_model where task_id=?", c.Model.TaskId).Values(&rowset)
+	for _, row := range rowset {
+		oldModels = append(oldModels, tools.IsEmpty(row["model_id"]))
+	}
 	c.Model.Cr, _ = strconv.Atoi(c.GetUserId())
+	m1 := new(SysCheckModelMgr)
+	m1.SetUserInfo(c.GetUserInfo())
+	for _, item := range oldModels {
+		//判断模型有没有删减,如果有删除模型则同步删除对应的模型配置数据
+		if arrayex.IndexOf(modelids, item) == -1 {
+			c.Model.ModelId, _ = strconv.Atoi(item)
+			c.Delete()
+		}
+	}
 	for _, ids := range modelids {
-		//c.Model.AreaId = (ids[0])
-		//c.Model.ModelId = (ids[1])
-		c.Model.ModelId = ids
-		_, err = db.Insert(&c.Model)
-		if err != nil {
-			break
+		//判断是否新增了模型
+		if arrayex.IndexOf(oldModels, ids) == -1 {
+			//将选择的系统模型复制为检测模型
+			m1.Model.ModelName = fmt.Sprintf("[%d]", c.Model.TaskId) //生成不唯一的模型名称,规则:检测任务id作为复制源模型的名称前缀
+			tmpid, _ := strconv.Atoi(ids)
+			err, newid := m1.Copy(tmpid)
+			if err != nil {
+				break
+			}
+			c.Model.ModelId = newid
+			_, err = db.Insert(&c.Model)
+			if err != nil {
+				break
+			}
 		}
 	}
 	if err != nil {
@@ -82,7 +103,7 @@ func (c *TaskModelMgr) One() (T_data_task_model, error) {
 	return c.Model, err
 }
 
-//根据model中指定的id删除检测任务
+//根据model中指定的id删除检测任务模型对应关系
 func (c *TaskModelMgr) Delete() (err error) {
 	dblog := new(SystemLog)
 	dblog.SetUserInfo(c.GetUserInfo())
@@ -95,17 +116,38 @@ func (c *TaskModelMgr) Delete() (err error) {
 		db.Read(&c.Model)
 		_, err = db.Delete(&c.Model)
 	}
+	models := []orm.Params{}
 	if c.Model.TaskId > 0 {
-		_, err = db.Raw("delete from t_data_task_model where task_id=?", c.Model.TaskId).Exec()
-	}
-	if c.Model.ModelId > 0 {
-		_, err = db.Raw("delete from t_data_task_model where model_id=?", c.Model.ModelId).Exec()
+		if c.Model.ModelId > 0 {
+			_, err = db.Raw("delete from t_data_task_model where task_id=? and model_id=?", c.Model.TaskId, c.Model.ModelId).Exec()
+		} else {
+			_, err = db.Raw("select model_id from t_data_task_model where task_id=?", c.Model.TaskId).Values(&models)
+			_, err = db.Raw("delete from t_data_task_model where task_id=?", c.Model.TaskId).Exec()
+		}
+	} else {
+		if c.Model.ModelId > 0 {
+			_, err = db.Raw("delete from t_data_task_model where model_id=?", c.Model.ModelId).Exec()
+		}
 	}
 	if err != nil {
 		logger.Logger.Error(err)
 		dblog.Description = fmt.Sprintf("删除%s%d失败:%s", modelDesc2, c.Model.TaskId, err.Error())
 		dblog.Fail2()
 	} else {
+		if c.Model.TaskId > 0 && c.Model.ModelId == 0 {
+			for _, r := range models {
+				id, _ := strconv.Atoi(tools.IsEmpty(r["model_id"]))
+				m1 := new(SysCheckModelMgr)
+				m1.SetUserInfo(c.GetUserInfo())
+				m1.Model = T_data_model_defualt{Id: id, IsSys: 2}
+				m1.Delete()
+			}
+		} else {
+			m1 := new(SysCheckModelMgr)
+			m1.SetUserInfo(c.GetUserInfo())
+			m1.Model = T_data_model_defualt{Id: c.Model.ModelId, IsSys: 2}
+			m1.Delete()
+		}
 		dblog.Description = fmt.Sprintf("删除%s%d成功", modelDesc2, c.Model.TaskId)
 		dblog.Success2()
 	}

+ 88 - 7
service/models/bo/task_report.go

@@ -2,9 +2,13 @@ package bo
 
 import (
 	"fmt"
+	"io/fs"
+	"os"
 	"scd_check_tools/logger"
 	"scd_check_tools/models/enum"
+	"scd_check_tools/tools"
 	"strconv"
+	"strings"
 
 	"github.com/astaxie/beego/orm"
 )
@@ -36,7 +40,13 @@ func init() {
 }
 
 //生成报告
-func (c *TaskReportMgr) Make() (err error) {
+func (c *TaskReportMgr) Make() (reprid int, err error) {
+	taskMgr := new(TaskMgr)
+	taskMgr.Model = T_data_task{Id: c.Model.TaskId}
+	taskinfo, e := taskMgr.One()
+	if e != nil {
+		return 0, e
+	}
 	dblog := new(SystemLog)
 	dblog.SetUserInfo(c.GetUserInfo())
 	dblog.Audittype = enum.AuditType_check_task
@@ -44,9 +54,13 @@ func (c *TaskReportMgr) Make() (err error) {
 	dblog.Eventtype = enum.OptEventType_Bus
 	dblog.Eventlevel = enum.OptEventLevel_Hight
 	db := orm.NewOrm()
+	c.Model.Name = taskinfo.Name
+	c.Model.Code = taskinfo.Code
 	if c.Model.Id == 0 {
 		c.Model.Cr, _ = strconv.Atoi(c.GetUserId())
-		_, err = db.Insert(&c.Model)
+		newid, err2 := db.Insert(&c.Model)
+		err = err2
+		c.Model.Id = int(newid)
 	} else {
 		c.Model.Ur, _ = strconv.Atoi(c.GetUserId())
 		_, err = db.Update(&c.Model)
@@ -56,20 +70,69 @@ func (c *TaskReportMgr) Make() (err error) {
 		dblog.Description = fmt.Sprintf("生成%s失败:%s,操作数据:%+v", modelDesc3, err.Error(), c.Model)
 		dblog.Fail2()
 	} else {
+		//根据模板生成报告
+		wordpath, err := c.ToWord(taskinfo.ReportId)
+		if err != nil {
+			c.Delete()
+			return 0, err
+		}
+		c.Model.Doc = wordpath
+		c.Model.State = 2
+		_, err = db.Update(&c.Model)
 		dblog.Description = fmt.Sprintf("生成%s成功,操作数据:%+v", modelDesc3, c.Model)
 		dblog.Success2()
 	}
-	return err
+	return c.Model.Id, err
 }
 
-func (c *TaskReportMgr) One(taskid int) (T_data_task_report, error) {
+func (c *TaskReportMgr) List(pageno, pagesize int) ([]orm.Params, int, error) {
 	o := orm.NewOrm()
-	c.Model.TaskId = taskid
-	err := o.Read(&c.Model)
+	rowset := []orm.Params{}
+	sqlParams := []interface{}{}
+	sql := "select * from t_data_task_report where 1=1 "
+	if c.Model.TaskId > 0 {
+		sql = sql + " and task_id=?"
+		sqlParams = append(sqlParams, c.Model.TaskId)
+	}
+	if c.Model.Name != "" {
+		sql = sql + " and name like ?"
+		sqlParams = append(sqlParams, "%"+c.Model.Name+"%")
+	}
+	if c.Model.Code != "" {
+		sql = sql + " and code like ?"
+		sqlParams = append(sqlParams, "%"+c.Model.Code+"%")
+	}
+	limit := fmt.Sprintf(" order by ct desc limit %d,%d", (pageno-1)*pagesize, pagesize)
+	_, err := o.Raw(sql+limit, sqlParams).Values(&rowset)
+
+	total := []orm.Params{}
+	_, err = o.Raw(strings.Replace(sql, "*", "count(1) cnt", 1), sqlParams).Values(&total)
 	if err != nil {
 		logger.Logger.Error(err)
+		return nil, 0, err
 	}
-	return c.Model, err
+	totalCnt := 0
+	if len(total) > 0 {
+		totalCnt, _ = strconv.Atoi(tools.IsEmpty(total[0]["cnt"]))
+	}
+	return rowset, totalCnt, err
+}
+
+func (c *TaskReportMgr) One(taskid int) (T_data_task_report, error) {
+	o := orm.NewOrm()
+	tmp := T_data_task_report{}
+	rowset := []orm.Params{}
+	o.Raw("select * from t_data_task_report where task_id=?", taskid).Values(&rowset)
+	if len(rowset) == 0 {
+		return tmp, nil
+	}
+	tmp.Id, _ = strconv.Atoi(tools.IsEmpty(rowset[0]["id"]))
+	tmp.Code = tools.IsEmpty(rowset[0]["code"])
+	tmp.Name = tools.IsEmpty(rowset[0]["name"])
+	tmp.TaskId = taskid
+	tmp.Doc = tools.IsEmpty(rowset[0]["doc"])
+	tmp.State, _ = strconv.Atoi(tools.IsEmpty(rowset[0]["state"]))
+	return tmp, nil
 }
 
 //根据model中指定的id删除检测任务报告
@@ -99,3 +162,21 @@ func (c *TaskReportMgr) Delete() (err error) {
 	}
 	return err
 }
+
+func (c *TaskReportMgr) ToWord(tplid int) (path string, err error) {
+	fileMgr := new(AttachmentMgr)
+	fileMgr.Model = T_sys_attachment{Id: int32(tplid)}
+	fileinfo, err := fileMgr.One()
+	if err != nil {
+		return "", err
+	}
+	reportPath := strings.Join([]string{".", "static", "download", "report"}, string(os.PathSeparator))
+	os.MkdirAll(reportPath, fs.ModePerm)
+	reportFN := reportPath + string(os.PathSeparator) + fmt.Sprintf("%s.%s", c.Model.Code, strings.Split(fileinfo.SavePath, ".")[0])
+	err = os.Rename(fileinfo.SavePath, reportFN)
+	if err != nil {
+		return "", err
+	}
+	//生成报告数据
+	return reportFN[1:], err
+}

+ 27 - 0
service/routers/commentsRouter_____________ME_GoProject_src_scd_check_tools_controllers.go

@@ -828,6 +828,33 @@ func init() {
 
     beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"] = append(beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"],
         beego.ControllerComments{
+            Method: "DeleteReport",
+            Router: "/report/delete",
+            AllowHTTPMethods: []string{"post"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"] = append(beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"],
+        beego.ControllerComments{
+            Method: "GetReportList",
+            Router: "/report/list",
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"] = append(beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"],
+        beego.ControllerComments{
+            Method: "MakeReport",
+            Router: "/report/make",
+            AllowHTTPMethods: []string{"post"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"] = append(beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"],
+        beego.ControllerComments{
             Method: "DeleteTpl",
             Router: "/report/tpl/delete",
             AllowHTTPMethods: []string{"post"},

+ 27 - 0
service/routers/commentsRouter_controllers.go

@@ -828,6 +828,33 @@ func init() {
 
     beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"] = append(beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"],
         beego.ControllerComments{
+            Method: "DeleteReport",
+            Router: "/report/delete",
+            AllowHTTPMethods: []string{"post"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"] = append(beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"],
+        beego.ControllerComments{
+            Method: "GetReportList",
+            Router: "/report/list",
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"] = append(beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"],
+        beego.ControllerComments{
+            Method: "MakeReport",
+            Router: "/report/make",
+            AllowHTTPMethods: []string{"post"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"] = append(beego.GlobalControllerRouter["scd_check_tools/controllers:ReportController"],
+        beego.ControllerComments{
             Method: "DeleteTpl",
             Router: "/report/tpl/delete",
             AllowHTTPMethods: []string{"post"},

+ 1 - 1
service/static/pc/ArcFace32.dat

@@ -1 +1 @@
-EWEPEPEOGMGTELIZJUGECKIUJDBCJTCNISGPBNHLJTJUBHEWGNAKGEGAIOHJDQAJGNCFDRFZJEDMJTJGHKDPDDDUGCEDDKEIINDPISGWBLEWDUJRDUGKAKFMBEGQGZIMAKFZFGGZCAEOGXHIBEBSJVALHJBXDGIGHIFVBZBPBKJMCJDBGCFXJMBFETJKFRFNDPBOCMHQCNHHJQEGFCADATFAHBCOBEIJCWDLHQJODBEBHQGADYCHDWILEEIMGSIQFHIMGTFDGVDVGEIYIBEJDKANGNJMHDFVBAFWCKAXCIJHHXAJIWCPDGARBDDMEVHOBVGLCKAYGQDCIBHUFYETBCAFELGLFYGSFBGJJQAJINAODHHKBAAPECFREJCIHZBNANIAAPBCGNBXGGCDCFATIHBOGPCSDWJNEYGSAYIUJOEQBCHYBVJKGCGUFWGGIRIMIXIVCDFGHQJDEMIYFLCHHAGRHCILHNADIABSHKAJGTBRGICJFPEGDHBJJUCSCWIFDPICGNASCTAAEVITAGBLIJGDCKJDBVAGDHFGFGGXANGRIXGFAYIRFKCPAYFVFUEGADCFEMFZEGGLIOCEFFFKGIFMADERAIDCJPJVBKEGCZALGRBHHWEDDCFEDMAQBAAXCUFCCDAZHYFVIVJPCMDBHREUFFAOHKCRGYAHAGDGCNHFDEIFCRIXDVCLDCECBXHDGRDGJAIZDOGMBPGQAGEQEOEBFUIFCCEXDHGIJCAKHDDRHAJRBUAZFSGWEVJDAHAMBYFMGLICIYDEFHGTFYGOBCBDADDXGQADFYJLDLDLJVJHGXATAOGYFMDUDZEAJMGVIEDTCQAVIWDKCYBQFNAQHYIHDACOGTHCHYDZICIUHSGYGFBTAFINDMJUDTHJFWHOCRDMEVDWEKJSGQFCEWGUDVDUDRFDFKFNBADCEBJRJEHIHSDYGTFIJDIJGBHQEYFCCCEHGWHXBPIFGJCQBVFTIHGIAGDZEGCBADCJHLASHIHCCXADGXHYDYBDDXCQBMEFGRCBGUDVEGJQFCGAEAGYGOJLGUCUDYIJADAHDYIXBPBPFGJAHCFTDYAAGSIKAMFKJICDAGCWABCDJDDWFAFBIIFQGWAJCGFEIYEVGVFOFAAODQHYIYFNEHFAHDHHBOIMGBFRIBHUHQDMBAFVHHISCKIJFVHZJJBHJPALEACRCPJH
+EWEPEPEOGMGTELIZJUGECKIUJDBCJTCNISGPBNHLJTJUBHEWGNAKGEGAIOHJDQAJGNCFDRFZJEDMJTGRFOGBGQIJIJCRFSJGESBDASIJEEIWGRAXASALJTCPHYJUAIDZJBDAAFFBFWEEERDQGZIRDZBZIWARHQGOJDFWGCCNJMBHDPFFEVCDARCQHOAAEFGKEGCSEBAHFXAEEEFTCOBEBAHZGXACBYHXJUGFGIBJIDHZEDIIIYIZAJJGJEHPBJJHCDDGCZJJIOAPCNBLFKHQBWGUBTBLEICJHLGTAPGBFWEVIPIOGYFPDSFYJREVIWHYBAGHEUJIEBHNIYISHXERFMHCBFDSDWCIEMGPBUAKFTAHJJFNDDCFEEDICMGOISDGJCGREOFQDSARBZDOEYASCBFCBQECGNFBDABGBAAKDMANCRHZBDEMHWJNFIEAJTHXATACFOACGFDOGHCGGKIIIIIYCICBEMFCBEHSIWCWESJPBDBSFTHFGWEAHOJMGGEIITGLBZAYHPFIIOHJFIFXBIEMFFEHCKAAAGCECBIQIYCKGNCQFUCMDWFEJPCGFFBYERHZAAFJCSASEVFKIZFSJTHJCBIAGHHNCYJOGHGQGUJJILDPHADFEZGKFYBQIXBDCJETEBCBGYBJGVHYIHBNDMAADECAHXBSEQADBLIMBGJBADJMJQJKCOICDLEEHSFVIIGKFDEQITJSIBJUFNEEJDAIFKEJJQHXEFBVFEGZJQBHHREXDJBCHSGMHWCPIWABCFAXCKBLFWDXGIHCCRAUIGEYHFEJBODHGZERFRGLBLJOJVEPBMCGBCHAGGGEABAEBDGJBUGMJSIAEOGKFVBNCBAAEDHLFPICBIGIARGPFHDQARJGEYBTIIEMBADHJJDTAOENCXBYFHDDDNIDHYJRBRBWGGGWEIBIGTBHIQDQDECPAWDIAJFSDJEOJPINCMCZBVJRHJIWIHCWDKHXIEBXECILCZERGAEOHUCIFMAEHZGHINJUDKBSJODGJBFUECGGJSAJINDXECGIDYJODGGGADHAHGCRGNBKDMBYCYBBJIIJFTJJDREDATBADWGTBGDWBMBZJIECJEFFDKHOIKBMEVIIGTAQEMJEDSJVCLEPBVBRGYCPDCBJJUBXDEHSHLGQEUGZJUAMEKGYBTJQCCCBEZCXEQJHJHAUDFIDCVGZEJGVEY

BIN
service/static/pc/ArcFaceSharp.dll


+ 17 - 3
service/static/pc/Demo.html

@@ -11,8 +11,6 @@
     </style>
 </head>
 <body>
-    <div style="text-align: center;">后台服务-开发接口</div>
-    <div style="text-align: left;"><a href="javascript:windowEx.NewWin('http://127.0.0.1:9527/static/swagger/index.html',1024,768,'center')">查看</a></div>
     <div style="text-align: center;">JS开发接口</div>
     <div style="text-align: left;">JS-API调用说明</div>
     <div style="text-align: left;">
@@ -43,6 +41,19 @@
             <li><a href="javascript:windowEx.NewWin('https://www.baidu.com',300,700,'right_bottom')">立即测试</a>JS代码:windowEx.NewWin('https://www.baidu.com',300,700,'right_bottom')</li>
             <li>9、【回调API】网络/服务器连接中断通知。方法定义:NetEventNotice(string msg)</li>  
             <li>JS代码:function NetEventNotice(msg){}</li>
+            <li>10、【回调API】办公环境安全检测结果通知。方法定义: SecurityEventNotice(string msg)</li>  
+            <li>JS代码:function SecurityEventNotice(level,msg){}</li>
+            <li>11、获取当前的授权信息。API方法:windowEx.GetSignInfo()</li>  
+            <li><a href="javascript:windowEx.GetSignInfo('receiverSinginfoFunc')">立即测试</a>JS代码:windowEx.GetSignInfo("receiverSinginfoFunc")</li>
+    </div>
+    <div style="text-align: left;">文档服务</div>
+    <div style="text-align: left;">
+        <ul>
+            <li>1、打印服务器文件。API方法:windowEx.PrintWebFile(string url,string filetype)</li>  
+            <li><a href="javascript:windowEx.PrintWebFile('http://8.142.173.95:10086/static/download/exp_data_20230525114922.xlsx','xlsx')">立即测试</a></li> 
+            <li>1、打开本地文件。API方法:windowEx.OpenFile(string url)</li>  
+            <li><a href="javascript:windowEx.OpenFile('G:\\工作目录\\project\\企业S文档管理\\聚合智慧文档产品简介.pptx')">立即测试</a></li>          
+        </ul>        
     </div>
     <div style="text-align: left;">音频播放API</div>
     <div style="text-align: left;">
@@ -102,6 +113,9 @@
     function NetEventNotice(msg){
         if(msg!="") alert(msg)
     }
+    function receiverSinginfoFunc(sign){
+        alert(sign);
+    }
     function start() {
         //if (windowEx.SetPix(640, 480) == 0) {
         //    alert("无效的分辩率设置。");
@@ -131,7 +145,7 @@
         hint.innerHTML = path;
     }
     //判断是否录制结束
-    function checkResult() {        
+    function checkResult() {    	
         setTimeout(function () {
             recordTime--;
             if (recordTime <= 0) {

BIN
service/static/pc/GPUCache/data_0


BIN
service/static/pc/GPUCache/data_1


BIN
service/static/pc/GPUCache/data_3


BIN
service/static/pc/MonitorClientApp.exe


BIN
service/static/pc/MonitorClientApp.pdb


BIN
service/static/pc/Web2Cs.exe


+ 2 - 1
service/static/pc/Web2Cs.exe.config

@@ -24,7 +24,8 @@
     <!--浏览器跨域设置:个人用户目录,默认为D:\chromeuserdata -->
     <add key="chrome_security_user_dir" value=""/>
     <!--浏览器访问默认主页地址-->
-    <add key="indexUrl" value="http://127.0.0.1:9527/static/login.html"/>    
+    <add key="indexUrl" value="http://127.0.0.1:8080/login"/>   
+    <add key="lic_auth" value="UKey"/>
     <!--开发环境地址-->
     <add key="tokenUrl2" value="http://www.yunids.com:18123/ycloud-oauth/oauth/token"/>
     <!--测试环境地址-->

BIN
service/static/pc/Web2Cs.pdb


File diff suppressed because it is too large
+ 368 - 0
service/static/pc/debug.log


+ 6 - 6
service/static/pc/lic.txt

@@ -1,8 +1,8 @@
 [IM Server]
-Serial=e9bbc5c8-df3e-48c4-a105-4068dfdb0c14
-Enterprise=JJT
+Serial=3d316c31-bdc1-47d7-83cb-7e632a42c955
+Enterprise=李领-liling-4
 ClusterNodeNum=999999
-Type=PROD
-Expiration=2099-12-31
-RegistrationCode=504631353042354D4C3148463839313032324B42464542464246463030303830364541
-Signature=43F1D30ED1BDB16C983D58B471CFBF2E694206F1F928B6D13FB23F0CF35C025E262CB28708D3BB069AD0DCC1D906BE4308D1F981DBD217B1C79E09CF85101C6B934E611A96CDA34005DA560826799C6C27315B7DA42AEE75BAC18DD4671AC97A0C94211E095007A32C243D3562A5CD3E2A34FC90EBC64209DC58A7A4FFC61781
+Type=TEST
+Expiration=2024-02-10
+RegistrationCode=55534253544F52414449534B4256454E434B494E4753544F4E4250524F44434441544154524156454C4552434733425245564331443030413030314343303546453933324642393042393242323436424230
+Signature=1790AA5E9648F3F4A78CCF999653384264CBAE286C5F904B509CEFAAAE00AA0E3D3E08A05A7EAE4140519F735473ED1C659E3A7B4E5A7EE54BA39651348C2C75B1E216535386C788A51DCF43F147E8209448B4641F9750C58377CAE767C4B4ADE64DB72C41423D5DC13DE65516374A448B4228618AAF21B61ED7E77242D7C7C6

+ 122 - 4
service/static/swagger/swagger.json

@@ -3406,6 +3406,123 @@
                 }
             }
         },
+        "/report/delete": {
+            "post": {
+                "tags": [
+                    "scd_check_tools/controllersReportController"
+                ],
+                "summary": "删除指定的检测报告",
+                "description": "删除指定的检测报告",
+                "parameters": [
+                    {
+                        "in": "formData",
+                        "name": "id",
+                        "description": "检测报告ID",
+                        "required": true,
+                        "type": "integer",
+                        "format": "int64"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "成功",
+                        "schema": {
+                            "$ref": "#/definitions/ResultOK"
+                        }
+                    },
+                    "500": {
+                        "description": "{object} ResultError  失败"
+                    }
+                }
+            }
+        },
+        "/report/list": {
+            "get": {
+                "tags": [
+                    "scd_check_tools/controllersReportController"
+                ],
+                "summary": "查询检测任务的报告列表",
+                "description": "查询检测任务的报告列表",
+                "parameters": [
+                    {
+                        "in": "query",
+                        "name": "pageno",
+                        "description": "当前页码。默认为1",
+                        "required": true,
+                        "type": "integer",
+                        "format": "int64"
+                    },
+                    {
+                        "in": "query",
+                        "name": "pagesize",
+                        "description": "每页显示数据数。默认为20",
+                        "required": true,
+                        "type": "integer",
+                        "format": "int64"
+                    },
+                    {
+                        "in": "formData",
+                        "name": "task_id",
+                        "description": "任务ID",
+                        "type": "integer",
+                        "format": "int64"
+                    },
+                    {
+                        "in": "formData",
+                        "name": "name",
+                        "description": "任务名称。",
+                        "type": "string"
+                    },
+                    {
+                        "in": "formData",
+                        "name": "code",
+                        "description": "任务编号。支持模糊匹配。",
+                        "type": "string"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "成功",
+                        "schema": {
+                            "$ref": "#/definitions/ResultOK"
+                        }
+                    },
+                    "500": {
+                        "description": "{object} ResultError  失败"
+                    }
+                }
+            }
+        },
+        "/report/make": {
+            "post": {
+                "tags": [
+                    "scd_check_tools/controllersReportController"
+                ],
+                "summary": "生成指定检测任务的报告",
+                "description": "生成指定检测任务的报告",
+                "parameters": [
+                    {
+                        "in": "formData",
+                        "name": "task_id",
+                        "description": "任务ID",
+                        "required": true,
+                        "type": "integer",
+                        "format": "int64"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "成功",
+                        "schema": {
+                            "$ref": "#/definitions/ResultOK"
+                        }
+                    },
+                    "500": {
+                        "description": "{object} ResultError  失败"
+                    }
+                }
+            }
+        },
         "/report/tpl/delete": {
             "post": {
                 "tags": [
@@ -3417,7 +3534,7 @@
                     {
                         "in": "formData",
                         "name": "id",
-                        "description": "检测报告ID",
+                        "description": "检测报告模板ID",
                         "required": true,
                         "type": "integer",
                         "format": "int64"
@@ -4211,6 +4328,7 @@
                         "in": "query",
                         "name": "source_scd_id",
                         "description": "对比的基准SCD文件ID。type为scd时必填。",
+                        "required": true,
                         "type": "integer",
                         "format": "int64"
                     },
@@ -4224,7 +4342,7 @@
                     {
                         "in": "query",
                         "name": "ids",
-                        "description": "如果是2个非SCD对比文件时,需要对比的文件ID列表,使用逗号分隔。仅当type为ccd\\cid\\ccd_cid_scd\\icd_scd时有效",
+                        "description": "非SCD对比对象列表,默认2个元素,第一个为装置name(基准对象),第二个为文件id(对比文件)。如果是2个非SCD对比文件时,需要对比的装置name或文件ID列表,使用逗号分隔。仅当type为ccd\\cid\\ccd_cid_scd\\icd_scd时有效",
                         "type": "string"
                     }
                 ],
@@ -5516,13 +5634,13 @@
                     },
                     {
                         "in": "formData",
-                        "name": "scdname",
+                        "name": "scd_name",
                         "description": "SCD名称",
                         "type": "string"
                     },
                     {
                         "in": "formData",
-                        "name": "scdpath",
+                        "name": "scd_path",
                         "description": "SCD路径",
                         "type": "string"
                     }

+ 84 - 4
service/static/swagger/swagger.yml

@@ -2301,6 +2301,85 @@ paths:
             $ref: '#/definitions/WarpOK'
         "500":
           description: '{object} WarpError  失败'
+  /report/delete:
+    post:
+      tags:
+      - scd_check_tools/controllersReportController
+      summary: 删除指定的检测报告
+      description: 删除指定的检测报告
+      parameters:
+      - in: formData
+        name: id
+        description: 检测报告ID
+        required: true
+        type: integer
+        format: int64
+      responses:
+        "200":
+          description: 成功
+          schema:
+            $ref: '#/definitions/ResultOK'
+        "500":
+          description: '{object} ResultError  失败'
+  /report/list:
+    get:
+      tags:
+      - scd_check_tools/controllersReportController
+      summary: 查询检测任务的报告列表
+      description: 查询检测任务的报告列表
+      parameters:
+      - in: query
+        name: pageno
+        description: 当前页码。默认为1
+        required: true
+        type: integer
+        format: int64
+      - in: query
+        name: pagesize
+        description: 每页显示数据数。默认为20
+        required: true
+        type: integer
+        format: int64
+      - in: formData
+        name: task_id
+        description: 任务ID
+        type: integer
+        format: int64
+      - in: formData
+        name: name
+        description: 任务名称。
+        type: string
+      - in: formData
+        name: code
+        description: 任务编号。支持模糊匹配。
+        type: string
+      responses:
+        "200":
+          description: 成功
+          schema:
+            $ref: '#/definitions/ResultOK'
+        "500":
+          description: '{object} ResultError  失败'
+  /report/make:
+    post:
+      tags:
+      - scd_check_tools/controllersReportController
+      summary: 生成指定检测任务的报告
+      description: 生成指定检测任务的报告
+      parameters:
+      - in: formData
+        name: task_id
+        description: 任务ID
+        required: true
+        type: integer
+        format: int64
+      responses:
+        "200":
+          description: 成功
+          schema:
+            $ref: '#/definitions/ResultOK'
+        "500":
+          description: '{object} ResultError  失败'
   /report/tpl/delete:
     post:
       tags:
@@ -2310,7 +2389,7 @@ paths:
       parameters:
       - in: formData
         name: id
-        description: 检测报告ID
+        description: 检测报告模板ID
         required: true
         type: integer
         format: int64
@@ -2851,6 +2930,7 @@ paths:
       - in: query
         name: source_scd_id
         description: 对比的基准SCD文件ID。type为scd时必填。
+        required: true
         type: integer
         format: int64
       - in: query
@@ -2860,7 +2940,7 @@ paths:
         format: int64
       - in: query
         name: ids
-        description: 如果是2个非SCD对比文件时,需要对比的文件ID列表,使用逗号分隔。仅当type为ccd\cid\ccd_cid_scd\icd_scd时有效
+        description: 非SCD对比对象列表,默认2个元素,第一个为装置name(基准对象),第二个为文件id(对比文件)。如果是2个非SCD对比文件时,需要对比的装置name或文件ID列表,使用逗号分隔。仅当type为ccd\cid\ccd_cid_scd\icd_scd时有效
         type: string
       responses:
         "200":
@@ -3746,11 +3826,11 @@ paths:
         type: integer
         format: int64
       - in: formData
-        name: scdname
+        name: scd_name
         description: SCD名称
         type: string
       - in: formData
-        name: scdpath
+        name: scd_path
         description: SCD路径
         type: string
       responses:

+ 122 - 4
service/swagger/swagger.json

@@ -3406,6 +3406,123 @@
                 }
             }
         },
+        "/report/delete": {
+            "post": {
+                "tags": [
+                    "scd_check_tools/controllersReportController"
+                ],
+                "summary": "删除指定的检测报告",
+                "description": "删除指定的检测报告",
+                "parameters": [
+                    {
+                        "in": "formData",
+                        "name": "id",
+                        "description": "检测报告ID",
+                        "required": true,
+                        "type": "integer",
+                        "format": "int64"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "成功",
+                        "schema": {
+                            "$ref": "#/definitions/ResultOK"
+                        }
+                    },
+                    "500": {
+                        "description": "{object} ResultError  失败"
+                    }
+                }
+            }
+        },
+        "/report/list": {
+            "get": {
+                "tags": [
+                    "scd_check_tools/controllersReportController"
+                ],
+                "summary": "查询检测任务的报告列表",
+                "description": "查询检测任务的报告列表",
+                "parameters": [
+                    {
+                        "in": "query",
+                        "name": "pageno",
+                        "description": "当前页码。默认为1",
+                        "required": true,
+                        "type": "integer",
+                        "format": "int64"
+                    },
+                    {
+                        "in": "query",
+                        "name": "pagesize",
+                        "description": "每页显示数据数。默认为20",
+                        "required": true,
+                        "type": "integer",
+                        "format": "int64"
+                    },
+                    {
+                        "in": "formData",
+                        "name": "task_id",
+                        "description": "任务ID",
+                        "type": "integer",
+                        "format": "int64"
+                    },
+                    {
+                        "in": "formData",
+                        "name": "name",
+                        "description": "任务名称。",
+                        "type": "string"
+                    },
+                    {
+                        "in": "formData",
+                        "name": "code",
+                        "description": "任务编号。支持模糊匹配。",
+                        "type": "string"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "成功",
+                        "schema": {
+                            "$ref": "#/definitions/ResultOK"
+                        }
+                    },
+                    "500": {
+                        "description": "{object} ResultError  失败"
+                    }
+                }
+            }
+        },
+        "/report/make": {
+            "post": {
+                "tags": [
+                    "scd_check_tools/controllersReportController"
+                ],
+                "summary": "生成指定检测任务的报告",
+                "description": "生成指定检测任务的报告",
+                "parameters": [
+                    {
+                        "in": "formData",
+                        "name": "task_id",
+                        "description": "任务ID",
+                        "required": true,
+                        "type": "integer",
+                        "format": "int64"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "成功",
+                        "schema": {
+                            "$ref": "#/definitions/ResultOK"
+                        }
+                    },
+                    "500": {
+                        "description": "{object} ResultError  失败"
+                    }
+                }
+            }
+        },
         "/report/tpl/delete": {
             "post": {
                 "tags": [
@@ -3417,7 +3534,7 @@
                     {
                         "in": "formData",
                         "name": "id",
-                        "description": "检测报告ID",
+                        "description": "检测报告模板ID",
                         "required": true,
                         "type": "integer",
                         "format": "int64"
@@ -4211,6 +4328,7 @@
                         "in": "query",
                         "name": "source_scd_id",
                         "description": "对比的基准SCD文件ID。type为scd时必填。",
+                        "required": true,
                         "type": "integer",
                         "format": "int64"
                     },
@@ -4224,7 +4342,7 @@
                     {
                         "in": "query",
                         "name": "ids",
-                        "description": "如果是2个非SCD对比文件时,需要对比的文件ID列表,使用逗号分隔。仅当type为ccd\\cid\\ccd_cid_scd\\icd_scd时有效",
+                        "description": "非SCD对比对象列表,默认2个元素,第一个为装置name(基准对象),第二个为文件id(对比文件)。如果是2个非SCD对比文件时,需要对比的装置name或文件ID列表,使用逗号分隔。仅当type为ccd\\cid\\ccd_cid_scd\\icd_scd时有效",
                         "type": "string"
                     }
                 ],
@@ -5516,13 +5634,13 @@
                     },
                     {
                         "in": "formData",
-                        "name": "scdname",
+                        "name": "scd_name",
                         "description": "SCD名称",
                         "type": "string"
                     },
                     {
                         "in": "formData",
-                        "name": "scdpath",
+                        "name": "scd_path",
                         "description": "SCD路径",
                         "type": "string"
                     }

+ 84 - 4
service/swagger/swagger.yml

@@ -2301,6 +2301,85 @@ paths:
             $ref: '#/definitions/WarpOK'
         "500":
           description: '{object} WarpError  失败'
+  /report/delete:
+    post:
+      tags:
+      - scd_check_tools/controllersReportController
+      summary: 删除指定的检测报告
+      description: 删除指定的检测报告
+      parameters:
+      - in: formData
+        name: id
+        description: 检测报告ID
+        required: true
+        type: integer
+        format: int64
+      responses:
+        "200":
+          description: 成功
+          schema:
+            $ref: '#/definitions/ResultOK'
+        "500":
+          description: '{object} ResultError  失败'
+  /report/list:
+    get:
+      tags:
+      - scd_check_tools/controllersReportController
+      summary: 查询检测任务的报告列表
+      description: 查询检测任务的报告列表
+      parameters:
+      - in: query
+        name: pageno
+        description: 当前页码。默认为1
+        required: true
+        type: integer
+        format: int64
+      - in: query
+        name: pagesize
+        description: 每页显示数据数。默认为20
+        required: true
+        type: integer
+        format: int64
+      - in: formData
+        name: task_id
+        description: 任务ID
+        type: integer
+        format: int64
+      - in: formData
+        name: name
+        description: 任务名称。
+        type: string
+      - in: formData
+        name: code
+        description: 任务编号。支持模糊匹配。
+        type: string
+      responses:
+        "200":
+          description: 成功
+          schema:
+            $ref: '#/definitions/ResultOK'
+        "500":
+          description: '{object} ResultError  失败'
+  /report/make:
+    post:
+      tags:
+      - scd_check_tools/controllersReportController
+      summary: 生成指定检测任务的报告
+      description: 生成指定检测任务的报告
+      parameters:
+      - in: formData
+        name: task_id
+        description: 任务ID
+        required: true
+        type: integer
+        format: int64
+      responses:
+        "200":
+          description: 成功
+          schema:
+            $ref: '#/definitions/ResultOK'
+        "500":
+          description: '{object} ResultError  失败'
   /report/tpl/delete:
     post:
       tags:
@@ -2310,7 +2389,7 @@ paths:
       parameters:
       - in: formData
         name: id
-        description: 检测报告ID
+        description: 检测报告模板ID
         required: true
         type: integer
         format: int64
@@ -2851,6 +2930,7 @@ paths:
       - in: query
         name: source_scd_id
         description: 对比的基准SCD文件ID。type为scd时必填。
+        required: true
         type: integer
         format: int64
       - in: query
@@ -2860,7 +2940,7 @@ paths:
         format: int64
       - in: query
         name: ids
-        description: 如果是2个非SCD对比文件时,需要对比的文件ID列表,使用逗号分隔。仅当type为ccd\cid\ccd_cid_scd\icd_scd时有效
+        description: 非SCD对比对象列表,默认2个元素,第一个为装置name(基准对象),第二个为文件id(对比文件)。如果是2个非SCD对比文件时,需要对比的装置name或文件ID列表,使用逗号分隔。仅当type为ccd\cid\ccd_cid_scd\icd_scd时有效
         type: string
       responses:
         "200":
@@ -3746,11 +3826,11 @@ paths:
         type: integer
         format: int64
       - in: formData
-        name: scdname
+        name: scd_name
         description: SCD名称
         type: string
       - in: formData
-        name: scdpath
+        name: scd_path
         description: SCD路径
         type: string
       responses:

+ 17 - 1
service/test/test.go

@@ -135,7 +135,7 @@ func (t *UnitTest) DTask() {
 	appport := conf.GlobalConfig["appport"]
 	url := "http://127.0.0.1:" + appport + "/api/task/delete"
 	logger.Logger.Println(fmt.Sprintf("============正在测试删除任务方法,请求URL:%s", url))
-	postdata := []string{"id=5"}
+	postdata := []string{"id=91"}
 	postdataStr := strings.Join(postdata, "&")
 	testResult, _ := tools.Post(url, postdataStr, UnitTestToken)
 	logger.Logger.Println(fmt.Sprintf("============删除任务方法测试结果:%+v", testResult))
@@ -196,3 +196,19 @@ func (t *UnitTest) Test16() {
 	logger.Logger.Println(fmt.Sprintf("============正在测试[生成检测模型间隔]方法,参数:"))
 	testobj.Reset()
 }
+
+func (t *UnitTest) Test17() {
+	return
+	logger.Logger.Println(fmt.Sprintf("============正在测试[模型复制]方法,参数:"))
+	testobj := new(bo.SysCheckModelMgr)
+	testobj.Model.ModelName = "[15]"
+	testobj.Copy(9)
+}
+
+func (t *UnitTest) Test18() {
+	return
+	logger.Logger.Println(fmt.Sprintf("============正在测试[删除模型]方法,参数:"))
+	testobj := new(bo.SysCheckModelMgr)
+	testobj.Model.Id = 32
+	testobj.Delete()
+}

Some files were not shown because too many files changed in this diff