Browse Source

历史排班

28169 1 year ago
parent
commit
9cb7c3ff83

+ 1 - 0
controllers/mobile_api_controllers/patient_api_controller.go View File

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

+ 77 - 1
controllers/sign_api_controller.go View File

@@ -1,6 +1,7 @@
1 1
 package controllers
2 2
 
3 3
 import (
4
+	"XT_New/models"
4 5
 	"XT_New/service"
5 6
 	"encoding/json"
6 7
 	"fmt"
@@ -196,7 +197,82 @@ func (this *SignApiController) AddContractSignatory() {
196 197
 
197 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 278
 func (this *SignApiController) CreateContractsignatory() {

+ 48 - 21
models/sign.models.go View File

@@ -2,27 +2,27 @@ package models
2 2
 
3 3
 type NewContract struct {
4 4
 	ContractId string `json:"contractId"`
5
-	signers    []struct {
5
+	Signers    []struct {
6 6
 		UserId       string `json:"userId"`
7 7
 		SignerType   int64  `json:"signerType"`
8 8
 		EnterpriseId string `json:"enterpriseId"`
9 9
 		Sequence     string `json:"sequence"`
10 10
 		SendMsg      string `json:"sendMsg"`
11 11
 		SignFiles    []struct {
12
-			DocId          float64 `json:"343465645"`
12
+			DocId          float64 `json:"docId"`
13 13
 			XySignControls []struct {
14 14
 				Key       string `json:"key"`
15 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 19
 			} `json:"xySignControls"`
20 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 26
 			} `json:"keywordSignControls"`
27 27
 		} `json:"signFiles"`
28 28
 	}
@@ -31,33 +31,60 @@ type NewContract struct {
31 31
 type XySignControls struct {
32 32
 	Key       string `json:"key"`
33 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 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 49
 	DocId          float64 `json:"343465645"`
49 50
 	XySignControls []struct {
50 51
 		Key       string `json:"key"`
51 52
 		Type      string `json:"type"`
52 53
 		PageNum   string `json:"pageNum"`
53 54
 		PositionX string `json:"positionX"`
54
-		positionY string `json:"positionY"`
55
+		PositionY string `json:"positionY"`
55 56
 	} `json:"xySignControls"`
56 57
 	KeywordSignControls []struct {
57 58
 		Key       string `json:"key"`
58 59
 		Type      string `json:"type"`
59 60
 		PageNum   string `json:"pageNum"`
61
+		KeyWord   string `json:"KeyWord"`
60 62
 		PositionX string `json:"positionX"`
61
-		positionY string `json:"positionY"`
63
+		PositionY string `json:"positionY"`
62 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 View File

@@ -466,7 +466,7 @@ func CreateUserId(userId string, displayName string) string {
466 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 471
 	var url string
472 472
 
@@ -481,11 +481,55 @@ func AddContractSignatory(contractId string, signers string) string {
481 481
 
482 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 534
 	byterequest, _ := json.Marshal(maprequest)
491 535
 	reader := bytes.NewReader(byterequest)

+ 1 - 1
service/statistics_service/index_evaluation_service.go View File

@@ -1620,7 +1620,7 @@ func FindOrgInspectionReferenceRangeTypeValue(user_org_id int64, project_id int6
1620 1620
 
1621 1621
 func FindOrgConfigRangeTypeValue(user_org_id int64, project_id int64, item_id int64) (qcs models.InspectionReference, err error) {
1622 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 1624
 	return
1625 1625
 }
1626 1626