|
@@ -88,7 +88,8 @@ func HisProjectRouters() {
|
88
|
88
|
}
|
89
|
89
|
|
90
|
90
|
func (this *HisProjectApiController) SaveProject() {
|
91
|
|
-
|
|
91
|
+ timeLayout := "2006-01-02"
|
|
92
|
+ loc, _ := time.LoadLocation("Local")
|
92
|
93
|
project_name := this.GetString("project_name")
|
93
|
94
|
pinyin := this.GetString("pinyin")
|
94
|
95
|
wubi := this.GetString("wubi")
|
|
@@ -119,41 +120,48 @@ func (this *HisProjectApiController) SaveProject() {
|
119
|
120
|
number_days := this.GetString("number_days")
|
120
|
121
|
total := this.GetString("total")
|
121
|
122
|
category, _ := this.GetInt64("category")
|
|
123
|
+ specail_project, _ := this.GetInt64("specail_project")
|
|
124
|
+ social_security_directory_code := this.GetString("social_security_directory_code")
|
|
125
|
+ record_date := this.GetString("record_date")
|
|
126
|
+ theTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", record_date+" 00:00:00", loc)
|
122
|
127
|
adminUserInfo := this.GetAdminUserInfo()
|
123
|
128
|
orgId := adminUserInfo.CurrentOrgId
|
124
|
129
|
hisProject := models.XtHisProject{
|
125
|
|
- ProjectName: project_name,
|
126
|
|
- Pinyin: pinyin,
|
127
|
|
- Wubi: wubi,
|
128
|
|
- Price: price_float,
|
129
|
|
- Unit: unit,
|
130
|
|
- CostClassify: cost_classify,
|
131
|
|
- ExecutiveSection: executive_section,
|
132
|
|
- MedicalCoverage: medical_coverage,
|
133
|
|
- StatisticalClassification: statistical_classification,
|
134
|
|
- DiseaseDirectory: disease_directory,
|
135
|
|
- IsRecord: is_record,
|
136
|
|
- MedicalCode: medical_code,
|
137
|
|
- TubeColor: tube_color,
|
138
|
|
- MedicalStatus: medical_status,
|
139
|
|
- Remark: remark,
|
140
|
|
- Sign: sign,
|
141
|
|
- DefaultNumber: default_number,
|
142
|
|
- IsCharge: is_charge,
|
143
|
|
- IsEstimate: is_estimate,
|
144
|
|
- IsWorkload: is_workload,
|
145
|
|
- Sort: sort,
|
146
|
|
- DoctorAdvice: is_advice,
|
147
|
|
- IsDefault: is_default,
|
148
|
|
- UserOrgId: orgId,
|
149
|
|
- Status: 1,
|
150
|
|
- CreatedTime: time.Now().Unix(),
|
151
|
|
- SingleDose: single_dose,
|
152
|
|
- DeliveryWay: delivery_way,
|
153
|
|
- ExecutionFrequency: execution_frequency,
|
154
|
|
- NumberDays: number_days,
|
155
|
|
- Total: total,
|
156
|
|
- Category: category,
|
|
130
|
+ ProjectName: project_name,
|
|
131
|
+ Pinyin: pinyin,
|
|
132
|
+ Wubi: wubi,
|
|
133
|
+ Price: price_float,
|
|
134
|
+ Unit: unit,
|
|
135
|
+ CostClassify: cost_classify,
|
|
136
|
+ ExecutiveSection: executive_section,
|
|
137
|
+ MedicalCoverage: medical_coverage,
|
|
138
|
+ StatisticalClassification: statistical_classification,
|
|
139
|
+ DiseaseDirectory: disease_directory,
|
|
140
|
+ IsRecord: is_record,
|
|
141
|
+ MedicalCode: medical_code,
|
|
142
|
+ TubeColor: tube_color,
|
|
143
|
+ MedicalStatus: medical_status,
|
|
144
|
+ Remark: remark,
|
|
145
|
+ Sign: sign,
|
|
146
|
+ DefaultNumber: default_number,
|
|
147
|
+ IsCharge: is_charge,
|
|
148
|
+ IsEstimate: is_estimate,
|
|
149
|
+ IsWorkload: is_workload,
|
|
150
|
+ Sort: sort,
|
|
151
|
+ DoctorAdvice: is_advice,
|
|
152
|
+ IsDefault: is_default,
|
|
153
|
+ UserOrgId: orgId,
|
|
154
|
+ Status: 1,
|
|
155
|
+ CreatedTime: time.Now().Unix(),
|
|
156
|
+ SingleDose: single_dose,
|
|
157
|
+ DeliveryWay: delivery_way,
|
|
158
|
+ ExecutionFrequency: execution_frequency,
|
|
159
|
+ NumberDays: number_days,
|
|
160
|
+ Total: total,
|
|
161
|
+ Category: category,
|
|
162
|
+ SpecailProject: specail_project,
|
|
163
|
+ SocialSecurityDirectoryCode: social_security_directory_code,
|
|
164
|
+ RecordDate: theTime.Unix(),
|
157
|
165
|
}
|
158
|
166
|
//查询项目名称是否存在
|
159
|
167
|
_, errcode := service.GetHisProjectIsExist(project_name, orgId)
|
|
@@ -211,7 +219,8 @@ func (this *HisProjectApiController) GetProjectDetail() {
|
211
|
219
|
}
|
212
|
220
|
|
213
|
221
|
func (this *HisProjectApiController) UpdatedProject() {
|
214
|
|
-
|
|
222
|
+ timeLayout := "2006-01-02"
|
|
223
|
+ loc, _ := time.LoadLocation("Local")
|
215
|
224
|
id, _ := this.GetInt64("id")
|
216
|
225
|
project_name := this.GetString("project_name")
|
217
|
226
|
pinyin := this.GetString("pinyin")
|
|
@@ -243,37 +252,44 @@ func (this *HisProjectApiController) UpdatedProject() {
|
243
|
252
|
number_days := this.GetString("number_days")
|
244
|
253
|
category, _ := this.GetInt64("category")
|
245
|
254
|
total := this.GetString("total")
|
|
255
|
+ specail_project, _ := this.GetInt64("specail_project")
|
|
256
|
+ social_security_directory_code := this.GetString("social_security_directory_code")
|
|
257
|
+ record_date := this.GetString("record_date")
|
|
258
|
+ theTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", record_date+" 00:00:00", loc)
|
246
|
259
|
hisProject := models.XtHisProject{
|
247
|
|
- ProjectName: project_name,
|
248
|
|
- Pinyin: pinyin,
|
249
|
|
- Wubi: wubi,
|
250
|
|
- Price: price_float,
|
251
|
|
- Unit: unit,
|
252
|
|
- CostClassify: cost_classify,
|
253
|
|
- ExecutiveSection: executive_section,
|
254
|
|
- MedicalCoverage: medical_coverage,
|
255
|
|
- StatisticalClassification: statistical_classification,
|
256
|
|
- DiseaseDirectory: disease_directory,
|
257
|
|
- IsRecord: is_record,
|
258
|
|
- MedicalCode: medical_code,
|
259
|
|
- TubeColor: tube_color,
|
260
|
|
- MedicalStatus: medical_status,
|
261
|
|
- Remark: remark,
|
262
|
|
- Sign: sign,
|
263
|
|
- DefaultNumber: default_number,
|
264
|
|
- IsCharge: is_charge,
|
265
|
|
- IsEstimate: is_estimate,
|
266
|
|
- IsWorkload: is_workload,
|
267
|
|
- Sort: sort,
|
268
|
|
- DoctorAdvice: is_advice,
|
269
|
|
- IsDefault: is_default,
|
270
|
|
- UpdatedTime: time.Now().Unix(),
|
271
|
|
- SingleDose: single_dose,
|
272
|
|
- DeliveryWay: delivery_way,
|
273
|
|
- ExecutionFrequency: execution_frequency,
|
274
|
|
- NumberDays: number_days,
|
275
|
|
- Total: total,
|
276
|
|
- Category: category,
|
|
260
|
+ ProjectName: project_name,
|
|
261
|
+ Pinyin: pinyin,
|
|
262
|
+ Wubi: wubi,
|
|
263
|
+ Price: price_float,
|
|
264
|
+ Unit: unit,
|
|
265
|
+ CostClassify: cost_classify,
|
|
266
|
+ ExecutiveSection: executive_section,
|
|
267
|
+ MedicalCoverage: medical_coverage,
|
|
268
|
+ StatisticalClassification: statistical_classification,
|
|
269
|
+ DiseaseDirectory: disease_directory,
|
|
270
|
+ IsRecord: is_record,
|
|
271
|
+ MedicalCode: medical_code,
|
|
272
|
+ TubeColor: tube_color,
|
|
273
|
+ MedicalStatus: medical_status,
|
|
274
|
+ Remark: remark,
|
|
275
|
+ Sign: sign,
|
|
276
|
+ DefaultNumber: default_number,
|
|
277
|
+ IsCharge: is_charge,
|
|
278
|
+ IsEstimate: is_estimate,
|
|
279
|
+ IsWorkload: is_workload,
|
|
280
|
+ Sort: sort,
|
|
281
|
+ DoctorAdvice: is_advice,
|
|
282
|
+ IsDefault: is_default,
|
|
283
|
+ UpdatedTime: time.Now().Unix(),
|
|
284
|
+ SingleDose: single_dose,
|
|
285
|
+ DeliveryWay: delivery_way,
|
|
286
|
+ ExecutionFrequency: execution_frequency,
|
|
287
|
+ NumberDays: number_days,
|
|
288
|
+ Total: total,
|
|
289
|
+ Category: category,
|
|
290
|
+ SpecailProject: specail_project,
|
|
291
|
+ SocialSecurityDirectoryCode: social_security_directory_code,
|
|
292
|
+ RecordDate: theTime.Unix(),
|
277
|
293
|
}
|
278
|
294
|
|
279
|
295
|
err := service.UpdatedProject(id, &hisProject)
|