|
@@ -6,6 +6,7 @@ import (
|
|
|
"dashoo.cn/utils"
|
|
"dashoo.cn/utils"
|
|
|
"encoding/json"
|
|
"encoding/json"
|
|
|
"strconv"
|
|
"strconv"
|
|
|
|
|
+ "time"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
// 系统参数设置
|
|
// 系统参数设置
|
|
@@ -15,6 +16,7 @@ type ParamSetController struct {
|
|
|
|
|
|
|
|
type ParamSerModel struct {
|
|
type ParamSerModel struct {
|
|
|
IsInvestigate bool `json:"isInvestigate"`
|
|
IsInvestigate bool `json:"isInvestigate"`
|
|
|
|
|
+ IsHse bool `json:"IsHse"`
|
|
|
IsGetBarCode bool `json:"isGetBarCode"`
|
|
IsGetBarCode bool `json:"isGetBarCode"`
|
|
|
SAddLimitMonth string `json:"sAddLimitMonth"`
|
|
SAddLimitMonth string `json:"sAddLimitMonth"`
|
|
|
AppendApplyNums string `json:"appendApplyNums"`
|
|
AppendApplyNums string `json:"appendApplyNums"`
|
|
@@ -32,7 +34,7 @@ type ParamModel struct {
|
|
|
|
|
|
|
|
// @Title 保存参数设置
|
|
// @Title 保存参数设置
|
|
|
// @Description 保存参数设置
|
|
// @Description 保存参数设置
|
|
|
-// @Param body body business.device.DeviceChannels "报警项目信息"
|
|
|
|
|
|
|
+// @Param body body business.device.DeviceChannels
|
|
|
// @Success 200 {object} controllers.Request
|
|
// @Success 200 {object} controllers.Request
|
|
|
// @router /saveparamset [put]
|
|
// @router /saveparamset [put]
|
|
|
func (this *ParamSetController) ParamSetPost() {
|
|
func (this *ParamSetController) ParamSetPost() {
|
|
@@ -65,6 +67,23 @@ func (this *ParamSetController) ParamSetPost() {
|
|
|
svc.UpdateEntityByIdCols(isInvEntity.Id, isInvEntity, cols)
|
|
svc.UpdateEntityByIdCols(isInvEntity.Id, isInvEntity, cols)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // HSE没成绩是否允许提交流程
|
|
|
|
|
+ var isAllow string
|
|
|
|
|
+ if model.IsHse {
|
|
|
|
|
+ isAllow = "true"
|
|
|
|
|
+ } else {
|
|
|
|
|
+ isAllow = "false"
|
|
|
|
|
+ }
|
|
|
|
|
+ var isHse baseparameter.Base_Parameter
|
|
|
|
|
+ svc.GetEntity(&isHse, where + " 'isHse'")
|
|
|
|
|
+ if isHse.Id > 0 {
|
|
|
|
|
+ isHse.Parametercontent = isAllow
|
|
|
|
|
+ isHse.Modifieduserid, _ = utils.StrTo(this.User.Id).Int()
|
|
|
|
|
+ isHse.Modifiedby = this.User.Realname
|
|
|
|
|
+ isHse.Modifiedon = time.Now()
|
|
|
|
|
+ svc.UpdateEntityByIdCols(isHse.Id, isHse, cols)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 增项申请时间间隔
|
|
// 增项申请时间间隔
|
|
|
var lmEntity baseparameter.Base_Parameter
|
|
var lmEntity baseparameter.Base_Parameter
|
|
|
svc.GetEntity(&lmEntity, where+"'sAddLimitMonth'")
|
|
svc.GetEntity(&lmEntity, where+"'sAddLimitMonth'")
|