|
@@ -662,3 +662,80 @@ func (this *NewCommonApiController) GetMobileMonthProjectList() {
|
662
|
662
|
"monthNolist": monthNolist,
|
663
|
663
|
})
|
664
|
664
|
}
|
|
665
|
+
|
|
666
|
+func (this *NewCommonApiController) GetAllMobileMajorInspection() {
|
|
667
|
+ adminUser := this.GetMobileAdminUserInfo()
|
|
668
|
+ orgid := adminUser.Org.Id
|
|
669
|
+ inspection, err := service.GetMajorInspectionByOrgid(orgid)
|
|
670
|
+ if len(inspection) == 0 {
|
|
671
|
+ inspect, err := service.GetDefaultByOrgId(0)
|
|
672
|
+ if err != nil {
|
|
673
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
674
|
+ return
|
|
675
|
+ }
|
|
676
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
677
|
+ "inspection": inspect,
|
|
678
|
+ })
|
|
679
|
+ } else {
|
|
680
|
+ if err != nil {
|
|
681
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
682
|
+ return
|
|
683
|
+ }
|
|
684
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
685
|
+ "inspection": inspection,
|
|
686
|
+ })
|
|
687
|
+ }
|
|
688
|
+}
|
|
689
|
+
|
|
690
|
+func (this *NewCommonApiController) GetMobilePatient() {
|
|
691
|
+ adminUser := this.GetMobileAdminUserInfo()
|
|
692
|
+ orgid := adminUser.Org.Id
|
|
693
|
+ startime := this.GetString("startime")
|
|
694
|
+ endtime := this.GetString("endtime")
|
|
695
|
+ startDate, parseDateErr := utils.ParseTimeStringToTime("2006-01-02", startime)
|
|
696
|
+ fmt.Println("parseDateErr", parseDateErr)
|
|
697
|
+ statime := startDate.Unix()
|
|
698
|
+ fmt.Println("开始时间", statime)
|
|
699
|
+ endDate, _ := utils.ParseTimeStringToTime("2006-01-02", endtime)
|
|
700
|
+ entime := endDate.Unix()
|
|
701
|
+ fmt.Println("结束日期", entime)
|
|
702
|
+ limit, _ := this.GetInt64("limit")
|
|
703
|
+ fmt.Println("limit", limit)
|
|
704
|
+ page, _ := this.GetInt64("page")
|
|
705
|
+ fmt.Println("page", page)
|
|
706
|
+ patientInfo, total, err := service.GetPatientListData(orgid, statime, entime, limit, page)
|
|
707
|
+ info, _ := service.GetPatientListInfo(orgid, statime, entime)
|
|
708
|
+ if err != nil {
|
|
709
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
710
|
+ return
|
|
711
|
+ }
|
|
712
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
713
|
+ "patientInfo": patientInfo,
|
|
714
|
+ "total": total,
|
|
715
|
+ "list": info,
|
|
716
|
+ })
|
|
717
|
+}
|
|
718
|
+
|
|
719
|
+func (this *NewCommonApiController) GetMobilePatientDetailCheck() {
|
|
720
|
+
|
|
721
|
+ adminUser := this.GetMobileAdminUserInfo()
|
|
722
|
+ orgid := adminUser.Org.Id
|
|
723
|
+ id, _ := this.GetInt64("id")
|
|
724
|
+ startime := this.GetString("startime")
|
|
725
|
+ endtime := this.GetString("endtime")
|
|
726
|
+ startDate, parseDateErr := utils.ParseTimeStringToTime("2006-01-02", startime)
|
|
727
|
+ fmt.Println("parseDateErr", parseDateErr)
|
|
728
|
+ statime := startDate.Unix()
|
|
729
|
+ fmt.Println("开始时间", statime)
|
|
730
|
+ endDate, _ := utils.ParseTimeStringToTime("2006-01-02", endtime)
|
|
731
|
+ entime := endDate.Unix()
|
|
732
|
+ fmt.Println("结束日期", entime)
|
|
733
|
+ checkDetail, err := service.GetPatientDetailCheck(id, orgid, statime, entime)
|
|
734
|
+ if err != nil {
|
|
735
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
736
|
+ return
|
|
737
|
+ }
|
|
738
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
739
|
+ "checkDetail": checkDetail,
|
|
740
|
+ })
|
|
741
|
+}
|