|
@@ -719,9 +719,11 @@ func (this *NewDialysisApiController) GetAllBloodDialysisPatient() {
|
719
|
719
|
fmt.Print("page", page)
|
720
|
720
|
limit, _ := this.GetInt64("limit")
|
721
|
721
|
fmt.Print("limit", limit)
|
|
722
|
+ lapseto, _ := this.GetInt64("patientstatus")
|
|
723
|
+ source, _ := this.GetInt64("source")
|
722
|
724
|
adminUserInfo := this.GetMobileAdminUserInfo()
|
723
|
725
|
orgid := adminUserInfo.Org.Id
|
724
|
|
- patient, total, err := service.GetAllBloodDialysisPatient(orgid, page, limit)
|
|
726
|
+ patient, total, err := service.GetAllBloodDialysisPatient(orgid, page, limit, lapseto, source)
|
725
|
727
|
if err != nil {
|
726
|
728
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
727
|
729
|
return
|
|
@@ -1546,14 +1548,15 @@ func (this *NewDialysisApiController) GetInspection() {
|
1546
|
1548
|
}
|
1547
|
1549
|
|
1548
|
1550
|
func (this *NewDialysisApiController) GetMyInformation() {
|
1549
|
|
- adminUserInfo := this.GetMobileAdminUserInfo()
|
1550
|
|
-
|
1551
|
|
- roleInfo := adminUserInfo.AppRole
|
1552
|
|
- es, _ := service.GetAdminUserElectronicSignature(adminUserInfo.Org.Id, adminUserInfo.App.Id, adminUserInfo.AdminUser.Id)
|
1553
|
|
-
|
|
1551
|
+ id, _ := this.GetInt64("id")
|
|
1552
|
+ fmt.Println("id--------------", id)
|
|
1553
|
+ roleInfo, err := service.GetPosition(id)
|
|
1554
|
+ if err != nil {
|
|
1555
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
1556
|
+ return
|
|
1557
|
+ }
|
1554
|
1558
|
this.ServeSuccessJSON(map[string]interface{}{
|
1555
|
|
- "electronic_signature": es,
|
1556
|
|
- "roleInfo": roleInfo,
|
|
1559
|
+ "roleInfo": roleInfo,
|
1557
|
1560
|
})
|
1558
|
1561
|
return
|
1559
|
1562
|
}
|
|
@@ -1661,16 +1664,14 @@ func (this *NewDialysisApiController) DeleteChildInspection() {
|
1661
|
1664
|
}
|
1662
|
1665
|
|
1663
|
1666
|
func (this *NewDialysisApiController) SaveMessage() {
|
1664
|
|
- orgid := this.GetMobileAdminUserInfo().Org.Id
|
1665
|
|
- appid := this.GetMobileAdminUserInfo().App.Id
|
1666
|
1667
|
id, _ := this.GetInt64("id")
|
1667
|
1668
|
fmt.Println("id", id)
|
1668
|
1669
|
message := this.GetString("message")
|
1669
|
1670
|
fmt.Println("message", message)
|
1670
|
|
- role := models.App_Role{
|
|
1671
|
+ role := models.SgjUserAdminRole{
|
1671
|
1672
|
Message: message,
|
1672
|
1673
|
}
|
1673
|
|
- err := service.SaveMessage(orgid, appid, id, &role)
|
|
1674
|
+ err := service.SaveMessage(id, &role)
|
1674
|
1675
|
if err != nil {
|
1675
|
1676
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
1676
|
1677
|
return
|
|
@@ -1681,16 +1682,14 @@ func (this *NewDialysisApiController) SaveMessage() {
|
1681
|
1682
|
}
|
1682
|
1683
|
|
1683
|
1684
|
func (this *NewDialysisApiController) SaveSex() {
|
1684
|
|
- orgid := this.GetMobileAdminUserInfo().Org.Id
|
1685
|
|
- appid := this.GetMobileAdminUserInfo().App.Id
|
1686
|
1685
|
sex, _ := this.GetInt64("sex")
|
1687
|
1686
|
fmt.Println("sex", sex)
|
1688
|
1687
|
id, _ := this.GetInt64("id")
|
1689
|
1688
|
fmt.Println("id", id)
|
1690
|
|
- role := models.App_Role{
|
|
1689
|
+ role := models.SgjUserAdminRole{
|
1691
|
1690
|
Sex: sex,
|
1692
|
1691
|
}
|
1693
|
|
- err := service.SaveSex(id, orgid, appid, &role)
|
|
1692
|
+ err := service.SaveSex(id, &role)
|
1694
|
1693
|
if err != nil {
|
1695
|
1694
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
1696
|
1695
|
return
|
|
@@ -1701,8 +1700,6 @@ func (this *NewDialysisApiController) SaveSex() {
|
1701
|
1700
|
}
|
1702
|
1701
|
|
1703
|
1702
|
func (this *NewDialysisApiController) SaveBirthday() {
|
1704
|
|
- orgid := this.GetMobileAdminUserInfo().Org.Id
|
1705
|
|
- appid := this.GetMobileAdminUserInfo().App.Id
|
1706
|
1703
|
dataBody := make(map[string]interface{}, 0)
|
1707
|
1704
|
err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
|
1708
|
1705
|
fmt.Println(err)
|
|
@@ -1713,10 +1710,10 @@ func (this *NewDialysisApiController) SaveBirthday() {
|
1713
|
1710
|
timeLayout := "2006-01-02 15:04:05"
|
1714
|
1711
|
theTime, err := utils.ParseTimeStringToTime(timeLayout, birthday+" 00:00:00")
|
1715
|
1712
|
birth := theTime.Unix()
|
1716
|
|
- role := models.App_Role{
|
|
1713
|
+ role := models.SgjUserAdminRole{
|
1717
|
1714
|
Birthday: birth,
|
1718
|
1715
|
}
|
1719
|
|
- err = service.SaveBirthday(ids, orgid, appid, &role)
|
|
1716
|
+ err = service.SaveBirthday(ids, &role)
|
1720
|
1717
|
if err != nil {
|
1721
|
1718
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
1722
|
1719
|
return
|
|
@@ -1934,3 +1931,53 @@ func (this *NewDialysisApiController) DeleteBed() {
|
1934
|
1931
|
this.ServeSuccessJSON(returnData)
|
1935
|
1932
|
return
|
1936
|
1933
|
}
|
|
1934
|
+
|
|
1935
|
+func (this *NewDialysisApiController) LoginOut() {
|
|
1936
|
+
|
|
1937
|
+ this.DelSession("mobile_admin_user_info")
|
|
1938
|
+ this.Ctx.SetCookie("token_cookie", "")
|
|
1939
|
+ returnData := make(map[string]interface{}, 0)
|
|
1940
|
+ returnData["msg"] = "删除失败"
|
|
1941
|
+ this.ServeSuccessJSON(returnData)
|
|
1942
|
+ return
|
|
1943
|
+}
|
|
1944
|
+
|
|
1945
|
+func (this *NewDialysisApiController) GetMemberPatient() {
|
|
1946
|
+
|
|
1947
|
+ adminUser := this.GetMobileAdminUserInfo()
|
|
1948
|
+ orgid := adminUser.Org.Id
|
|
1949
|
+ patient, err := service.GetMemberPatient(orgid)
|
|
1950
|
+ if err != nil {
|
|
1951
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
1952
|
+ return
|
|
1953
|
+ }
|
|
1954
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
1955
|
+ "patient": patient,
|
|
1956
|
+ })
|
|
1957
|
+}
|
|
1958
|
+
|
|
1959
|
+func (this *NewDialysisApiController) GetSlowPatient() {
|
|
1960
|
+ adminUser := this.GetMobileAdminUserInfo()
|
|
1961
|
+ orgid := adminUser.Org.Id
|
|
1962
|
+ patient, err := service.GetSlowPatient(orgid)
|
|
1963
|
+ if err != nil {
|
|
1964
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
1965
|
+ return
|
|
1966
|
+ }
|
|
1967
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
1968
|
+ "patient": patient,
|
|
1969
|
+ })
|
|
1970
|
+}
|
|
1971
|
+
|
|
1972
|
+func (this *NewDialysisApiController) GetBloodPatient() {
|
|
1973
|
+ adminUser := this.GetMobileAdminUserInfo()
|
|
1974
|
+ orgid := adminUser.Org.Id
|
|
1975
|
+ patient, err := service.GetBloodPatient(orgid)
|
|
1976
|
+ if err != nil {
|
|
1977
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
1978
|
+ return
|
|
1979
|
+ }
|
|
1980
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
1981
|
+ "patient": patient,
|
|
1982
|
+ })
|
|
1983
|
+}
|