|
@@ -38,7 +38,6 @@ func (s *BodyCheckServ) GetCheckByUser() (map[string]interface{}, error) {
|
38
|
38
|
return nil, err
|
39
|
39
|
}
|
40
|
40
|
if len(bodyCheck) == 0 {
|
41
|
|
- utils.LogError("没有查询到数据:" + err.Error())
|
42
|
41
|
return nil, errors.New("log-error-没有查询到数据")
|
43
|
42
|
}
|
44
|
43
|
presentations, err := s.dao.GetPresentationByCheckID(bodyCheck[0].Id)
|
|
@@ -91,9 +90,6 @@ func (s *BodyCheckServ) PostCheckResult(formVal map[string]interface{}) error {
|
91
|
90
|
if customer == nil || customer.CustomerId == "" {
|
92
|
91
|
return errors.New("没有当前用户信息!")
|
93
|
92
|
}
|
94
|
|
- beego.Error("—————————————————————————用户——————————————————————————")
|
95
|
|
- beego.Error(customer)
|
96
|
|
- beego.Error("+++++++++++++++++++++++++++++++++++++++++++++++++++++++")
|
97
|
93
|
userid := customer.CustomerId
|
98
|
94
|
checkinfo, err := s.dao.GetCheckByUserAndEquipmentID(userid, result.EquipmentId)
|
99
|
95
|
if err != nil {
|
|
@@ -110,30 +106,17 @@ func (s *BodyCheckServ) PostCheckResult(formVal map[string]interface{}) error {
|
110
|
106
|
if caseEquipment == nil || caseEquipment.EquipmentId == "" {
|
111
|
107
|
return errors.New("设备未维护!")
|
112
|
108
|
}
|
113
|
|
- beego.Error("___________________设备——————————————————————————")
|
114
|
|
- beego.Error(caseEquipment)
|
115
|
|
- beego.Error("________________________________________________")
|
116
|
|
-
|
117
|
109
|
var checkNew = model.TaBodyCheck{}
|
118
|
110
|
checkNew.CaseId = caseEquipment.CaseId
|
119
|
111
|
checkNew.EquipmentId = result.EquipmentId
|
120
|
112
|
checkNew.UserId = userid
|
121
|
113
|
checkNew.ReportUrl = result.HMSReportUrl
|
122
|
114
|
checkNew.CreateDate = result.CheckDate
|
123
|
|
- beego.Error("______checkNew___________________")
|
124
|
|
- beego.Error(checkNew)
|
125
|
|
- beego.Error("+++++++++++++++++++++++++++++++++")
|
126
|
115
|
checkinfo, err = s.dao.SaveBodyCheckInfo(checkNew)
|
127
|
|
- beego.Error("____________checkInfo____________")
|
128
|
|
- beego.Error(checkinfo)
|
129
|
|
- beego.Error("__________________________________")
|
130
|
116
|
wxconf, _ := config.NewConfig("ini", "conf/wechat.conf")
|
131
|
117
|
messageTplID := wxconf.String("messageTplID")
|
132
|
118
|
|
133
|
119
|
org := s.ctx.Get("org").(model.SysOrg)
|
134
|
|
- beego.Error("***************ORG******************")
|
135
|
|
- beego.Error(org)
|
136
|
|
- beego.Error("************************************")
|
137
|
120
|
|
138
|
121
|
utils.WxClientFor(org.OrgId).SendTplMessage(result.WechatAccount, messageTplID, beego.AppConfig.String("resultURL"), map[string]wx.TplMessageData{
|
139
|
122
|
"first": wx.TplMessageData{
|
|
@@ -156,9 +139,6 @@ func (s *BodyCheckServ) PostCheckResult(formVal map[string]interface{}) error {
|
156
|
139
|
utils.LogError("获取报告明细失败:", err)
|
157
|
140
|
return errors.New("获取报告明细失败")
|
158
|
141
|
}
|
159
|
|
- beego.Error("________________presentation___________")
|
160
|
|
- beego.Error(presentation)
|
161
|
|
- beego.Error("_______________________________________")
|
162
|
142
|
if presentation == nil || presentation.Id == "" {
|
163
|
143
|
// 新增
|
164
|
144
|
var preNew = model.TaPresentation{}
|
|
@@ -195,9 +175,6 @@ func (s *BodyCheckServ) PostCheckResult(formVal map[string]interface{}) error {
|
195
|
175
|
utils.LogError("获取spec信息失败:", err)
|
196
|
176
|
return errors.New("获取spec信息失败")
|
197
|
177
|
}
|
198
|
|
- beego.Error("_________checkSpec___________")
|
199
|
|
- beego.Error(specs)
|
200
|
|
- beego.Error("____________________________")
|
201
|
178
|
|
202
|
179
|
if len(formVal) > 0 {
|
203
|
180
|
var details []model.TaPresentationDetail
|