28169 hace 1 año
padre
commit
9cb7c3ff83

+ 1 - 0
controllers/mobile_api_controllers/patient_api_controller.go Ver fichero

2182
 
2182
 
2183
 	dialysisPrescribe, _ = service.MobileGetDialysisPrescribe(adminUserInfo.Org.Id, id, theAssessmentDateTime)
2183
 	dialysisPrescribe, _ = service.MobileGetDialysisPrescribe(adminUserInfo.Org.Id, id, theAssessmentDateTime)
2184
 	lastDialysisPrescribe, _ = service.MobileGetLastDialysisPrescribeByModeIdSix(adminUserInfo.Org.Id, id, schedual.ModeId)
2184
 	lastDialysisPrescribe, _ = service.MobileGetLastDialysisPrescribeByModeIdSix(adminUserInfo.Org.Id, id, schedual.ModeId)
2185
+	fmt.Println("22332232o2o", lastDialysisPrescribe.Chaptalization)
2185
 	if schedual != nil {
2186
 	if schedual != nil {
2186
 		// 获取透析模版
2187
 		// 获取透析模版
2187
 		dialysisSolution, _ = service.MobileGetDialysisSolutionByModeIdSix(adminUserInfo.Org.Id, id, schedual.ModeId)
2188
 		dialysisSolution, _ = service.MobileGetDialysisSolutionByModeIdSix(adminUserInfo.Org.Id, id, schedual.ModeId)

+ 77 - 1
controllers/sign_api_controller.go Ver fichero

1
 package controllers
1
 package controllers
2
 
2
 
3
 import (
3
 import (
4
+	"XT_New/models"
4
 	"XT_New/service"
5
 	"XT_New/service"
5
 	"encoding/json"
6
 	"encoding/json"
6
 	"fmt"
7
 	"fmt"
196
 
197
 
197
 	signers := this.GetString("signers")
198
 	signers := this.GetString("signers")
198
 
199
 
199
-	service.AddContractSignatory(contractId, signers)
200
+	var newContract models.NewContract
201
+
202
+	newContract.ContractId = "153497878806048027"
203
+
204
+	service.AddContractSignatory(contractId, signers, newContract)
205
+
206
+	maprequest := make(map[string]interface{})
207
+
208
+	maprequest["contractId"] = "153497878806048027"
209
+
210
+	//maprequestOne := make(map[string]interface{})
211
+
212
+	maprequestTwo := make(map[string]interface{})
213
+
214
+	var signFiles models.SignFiles
215
+	var sig []*models.Signers
216
+	signFiles.DocId = 343465645
217
+
218
+	inputDataArrOne := make([]map[string]interface{}, 0)
219
+	inputDataArrTwo := make([]map[string]interface{}, 0)
220
+
221
+	inputDataArrThree := make([]map[string]interface{}, 0)
222
+	for _, item := range signFiles.XySignControls {
223
+		fmt.Println(item)
224
+		inputDataThree := make(map[string]interface{})
225
+		inputDataThree["key"] = 11
226
+		inputDataThree["type"] = 222
227
+		inputDataThree["pageNum"] = 333
228
+		inputDataThree["positionX"] = 444
229
+		inputDataThree["positionY"] = 555
230
+
231
+		fmt.Println("2O2332O23O23O23", inputDataArrThree)
232
+		inputDataArrOne = append(inputDataArrOne, inputDataThree)
233
+	}
234
+
235
+	fmt.Println("inputDataArrOne", inputDataArrOne)
236
+
237
+	for _, item := range signFiles.KeywordSignControls {
238
+		fmt.Println(item)
239
+		inputDataFour := make(map[string]interface{})
240
+		inputDataFour["key"] = 666
241
+		inputDataFour["type"] = 888
242
+		inputDataFour["pageNum"] = 9999
243
+		inputDataFour["keyword"] = 6666
244
+		inputDataFour["positionX"] = 77777
245
+		inputDataFour["positionY"] = 8888
246
+
247
+		inputDataArrTwo = append(inputDataArrTwo, inputDataFour)
248
+	}
249
+
250
+	for _, item := range sig {
251
+		fmt.Println(item)
252
+		inputDataFive := make(map[string]interface{})
253
+		inputDataFive["userId"] = 233232
254
+		inputDataFive["signerType"] = 454545
255
+		inputDataFive["enterpriseId"] = 45455
256
+		inputDataFive["sequence"] = 44545
257
+		inputDataFive["sendMsg"] = 4545
258
+		inputDataFive["signFiles"] = 45455
259
+
260
+	}
261
+
262
+	maprequestTwo["xySignControls"] = inputDataArrOne
263
+	maprequestTwo["keywordSignControls"] = inputDataArrTwo
264
+	maprequestTwo["docId"] = 1234555
265
+
266
+	maprequest["contractId"] = newContract.ContractId
267
+
268
+	maprequest["signers"] = inputDataArrThree
269
+
270
+	this.ServeSuccessJSON(map[string]interface{}{
271
+		"inputDataArrOne": inputDataArrOne,
272
+		"maprequestOne":   maprequest,
273
+		"maprequestTwo":   maprequestTwo,
274
+	})
275
+	return
200
 }
276
 }
201
 
277
 
202
 func (this *SignApiController) CreateContractsignatory() {
278
 func (this *SignApiController) CreateContractsignatory() {

+ 48 - 21
models/sign.models.go Ver fichero

2
 
2
 
3
 type NewContract struct {
3
 type NewContract struct {
4
 	ContractId string `json:"contractId"`
4
 	ContractId string `json:"contractId"`
5
-	signers    []struct {
5
+	Signers    []struct {
6
 		UserId       string `json:"userId"`
6
 		UserId       string `json:"userId"`
7
 		SignerType   int64  `json:"signerType"`
7
 		SignerType   int64  `json:"signerType"`
8
 		EnterpriseId string `json:"enterpriseId"`
8
 		EnterpriseId string `json:"enterpriseId"`
9
 		Sequence     string `json:"sequence"`
9
 		Sequence     string `json:"sequence"`
10
 		SendMsg      string `json:"sendMsg"`
10
 		SendMsg      string `json:"sendMsg"`
11
 		SignFiles    []struct {
11
 		SignFiles    []struct {
12
-			DocId          float64 `json:"343465645"`
12
+			DocId          float64 `json:"docId"`
13
 			XySignControls []struct {
13
 			XySignControls []struct {
14
 				Key       string `json:"key"`
14
 				Key       string `json:"key"`
15
 				Type      string `json:"type"`
15
 				Type      string `json:"type"`
16
-				PageNum   string `json:"pageNum"`
17
-				PositionX string `json:"positionX"`
18
-				positionY string `json:"positionY"`
16
+				PageNum   int64  `json:"pageNum"`
17
+				PositionX int64  `json:"positionX"`
18
+				PositionY int64  `json:"positionY"`
19
 			} `json:"xySignControls"`
19
 			} `json:"xySignControls"`
20
 			KeywordSignControls []struct {
20
 			KeywordSignControls []struct {
21
-				Key       string `json:"key"`
22
-				Type      string `json:"type"`
23
-				PageNum   string `json:"pageNum"`
24
-				PositionX string `json:"positionX"`
25
-				positionY string `json:"positionY"`
21
+				Key     string `json:"key"`
22
+				Type    string `json:"type"`
23
+				PageNum int64  `json:"pageNum"`
24
+				OffsetX int64  `json:"offsetX"`
25
+				OffsetY int64  `json:"offsetY"`
26
 			} `json:"keywordSignControls"`
26
 			} `json:"keywordSignControls"`
27
 		} `json:"signFiles"`
27
 		} `json:"signFiles"`
28
 	}
28
 	}
31
 type XySignControls struct {
31
 type XySignControls struct {
32
 	Key       string `json:"key"`
32
 	Key       string `json:"key"`
33
 	Type      string `json:"type"`
33
 	Type      string `json:"type"`
34
-	PageNum   string `json:"pageNum"`
35
-	PositionX string `json:"positionX"`
36
-	positionY string `json:"positionY"`
34
+	PageNum   int64  `json:"pageNum"`
35
+	PositionX int64  `json:"positionX"`
36
+	PositionY int64  `json:"positionY"`
37
 }
37
 }
38
 
38
 
39
 type KeywordSignControls struct {
39
 type KeywordSignControls struct {
40
-	Key       string `json:"key"`
41
-	Type      string `json:"type"`
42
-	PageNum   string `json:"pageNum"`
43
-	PositionX string `json:"positionX"`
44
-	positionY string `json:"positionY"`
40
+	Key     string `json:"key"`
41
+	Type    string `json:"type"`
42
+	PageNum int64  `json:"pageNum"`
43
+	KeyWord string `json:"KeyWord"`
44
+	OffsetX int64  `json:"offsetX"`
45
+	OffsetY int64  `json:"offsetY"`
45
 }
46
 }
46
 
47
 
47
-type SignFiles []struct {
48
+type SignFiles struct {
48
 	DocId          float64 `json:"343465645"`
49
 	DocId          float64 `json:"343465645"`
49
 	XySignControls []struct {
50
 	XySignControls []struct {
50
 		Key       string `json:"key"`
51
 		Key       string `json:"key"`
51
 		Type      string `json:"type"`
52
 		Type      string `json:"type"`
52
 		PageNum   string `json:"pageNum"`
53
 		PageNum   string `json:"pageNum"`
53
 		PositionX string `json:"positionX"`
54
 		PositionX string `json:"positionX"`
54
-		positionY string `json:"positionY"`
55
+		PositionY string `json:"positionY"`
55
 	} `json:"xySignControls"`
56
 	} `json:"xySignControls"`
56
 	KeywordSignControls []struct {
57
 	KeywordSignControls []struct {
57
 		Key       string `json:"key"`
58
 		Key       string `json:"key"`
58
 		Type      string `json:"type"`
59
 		Type      string `json:"type"`
59
 		PageNum   string `json:"pageNum"`
60
 		PageNum   string `json:"pageNum"`
61
+		KeyWord   string `json:"KeyWord"`
60
 		PositionX string `json:"positionX"`
62
 		PositionX string `json:"positionX"`
61
-		positionY string `json:"positionY"`
63
+		PositionY string `json:"positionY"`
62
 	} `json:"keywordSignControls"`
64
 	} `json:"keywordSignControls"`
63
 }
65
 }
66
+
67
+type Signers struct {
68
+	UserId       string `json:"userId"`
69
+	SignerType   int64  `json:"signerType"`
70
+	EnterpriseId string `json:"enterpriseId"`
71
+	Sequence     string `json:"sequence"`
72
+	SendMsg      string `json:"sendMsg"`
73
+	SignFiles    []struct {
74
+		DocId          float64 `json:"docId"`
75
+		XySignControls []struct {
76
+			Key       string `json:"key"`
77
+			Type      string `json:"type"`
78
+			PageNum   int64  `json:"pageNum"`
79
+			PositionX int64  `json:"positionX"`
80
+			PositionY int64  `json:"positionY"`
81
+		} `json:"xySignControls"`
82
+		KeywordSignControls []struct {
83
+			Key     string `json:"key"`
84
+			Type    string `json:"type"`
85
+			PageNum int64  `json:"pageNum"`
86
+			OffsetX int64  `json:"offsetX"`
87
+			OffsetY int64  `json:"offsetY"`
88
+		} `json:"keywordSignControls"`
89
+	} `json:"signFiles"`
90
+}

+ 48 - 4
service/sign_service.go Ver fichero

466
 //	WarnInfo    interface{} `json:"warn_info"`
466
 //	WarnInfo    interface{} `json:"warn_info"`
467
 //}
467
 //}
468
 
468
 
469
-func AddContractSignatory(contractId string, signers string) string {
469
+func AddContractSignatory(contractId string, signers string, contract models.NewContract) string {
470
 
470
 
471
 	var url string
471
 	var url string
472
 
472
 
481
 
481
 
482
 	maprequest["contractId"] = "153497878806048027"
482
 	maprequest["contractId"] = "153497878806048027"
483
 
483
 
484
-	maprequest["signers"] = ""
484
+	maprequestOne := make(map[string]interface{})
485
 
485
 
486
-	var customs models.NewContract
486
+	maprequestTwo := make(map[string]interface{})
487
 
487
 
488
-	customs.ContractId = ""
488
+	var signFiles models.SignFiles
489
+	signFiles.DocId = 343465645
490
+
491
+	inputDataArrOne := make([]map[string]interface{}, 0)
492
+	inputDataArrTwo := make([]map[string]interface{}, 0)
493
+	for _, item := range signFiles.XySignControls {
494
+
495
+		inputDataThree := make(map[string]interface{})
496
+		inputDataThree["key"] = item.Key
497
+		inputDataThree["type"] = item.Type
498
+		inputDataThree["pageNum"] = item.PageNum
499
+		inputDataThree["positionX"] = item.PositionX
500
+		inputDataThree["positionY"] = item.PositionY
501
+
502
+		inputDataArrOne = append(inputDataArrOne, inputDataThree)
503
+	}
504
+
505
+	for _, item := range signFiles.KeywordSignControls {
506
+		inputDataFour := make(map[string]interface{})
507
+		inputDataFour["key"] = item.Key
508
+		inputDataFour["type"] = item.Type
509
+		inputDataFour["pageNum"] = item.PageNum
510
+		inputDataFour["keyword"] = item.KeyWord
511
+		inputDataFour["positionX"] = item.PositionX
512
+		inputDataFour["positionY"] = item.PositionY
513
+
514
+		inputDataArrTwo = append(inputDataArrTwo, inputDataFour)
515
+	}
516
+
517
+	maprequestTwo["xySignControls"] = inputDataArrOne
518
+	maprequestTwo["keywordSignControls"] = inputDataArrTwo
519
+	maprequestTwo["docId"] = 1234555
520
+
521
+	maprequestOne["userId"] = ""
522
+	maprequestOne["signerType"] = ""
523
+	maprequestOne["enterpriseId"] = ""
524
+	maprequestOne["sequence"] = ""
525
+	maprequestOne["sendMsg"] = false
526
+	maprequestOne["signFiles"] = maprequestTwo
527
+
528
+	maprequestOne["signers"] = maprequestOne
529
+
530
+	maprequest["contractId"] = contract.ContractId
531
+
532
+	maprequest["signers"] = maprequestOne
489
 
533
 
490
 	byterequest, _ := json.Marshal(maprequest)
534
 	byterequest, _ := json.Marshal(maprequest)
491
 	reader := bytes.NewReader(byterequest)
535
 	reader := bytes.NewReader(byterequest)

+ 1 - 1
service/statistics_service/index_evaluation_service.go Ver fichero

1620
 
1620
 
1621
 func FindOrgConfigRangeTypeValue(user_org_id int64, project_id int64, item_id int64) (qcs models.InspectionReference, err error) {
1621
 func FindOrgConfigRangeTypeValue(user_org_id int64, project_id int64, item_id int64) (qcs models.InspectionReference, err error) {
1622
 	db := service.XTReadDB()
1622
 	db := service.XTReadDB()
1623
-	err = db.Model(&models.InspectionReference{}).Where("status = 1 AND org_id = ? AND project_id = ? AND id = ?", user_org_id, project_id, item_id).First(&qcs).Error
1623
+	err = db.Model(&models.InspectionReference{}).Where("status = 1 AND org_id = ? AND project_id = ? AND item_id = ?", user_org_id, project_id, item_id).First(&qcs).Error
1624
 	return
1624
 	return
1625
 }
1625
 }
1626
 
1626