瀏覽代碼

库存流水展示

XMLWAN 2 年之前
父節點
當前提交
f21db1835f

+ 5 - 7
controllers/mobile_api_controllers/mobile_api_base_controller.go 查看文件

151
 			var userRolePurviews string
151
 			var userRolePurviews string
152
 			var userRolePurviewsArr []string
152
 			var userRolePurviewsArr []string
153
 
153
 
154
-			fmt.Println("----redis 开始----")
155
-			fmt.Println(purviews_json_str)
156
-			fmt.Println("----redis 结束----")
154
+			//fmt.Println("----redis 开始----")
155
+			//fmt.Println(purviews_json_str)
156
+			//fmt.Println("----redis 结束----")
157
 
157
 
158
-			fmt.Println("purviews_json_str0000000000000000000000000000", len(purviews_json_str))
159
 			if len(purviews_json_str) == 0 {
158
 			if len(purviews_json_str) == 0 {
160
 				for _, item := range roles {
159
 				for _, item := range roles {
161
 					role_id, _ := strconv.ParseInt(item, 10, 64)
160
 					role_id, _ := strconv.ParseInt(item, 10, 64)
162
 					purviews, _ := service.GetRoleFuncPurviewIds(role_id)
161
 					purviews, _ := service.GetRoleFuncPurviewIds(role_id)
163
-					fmt.Println("2333333333333333333", purviews)
162
+
164
 					if len(userRolePurviews) == 0 {
163
 					if len(userRolePurviews) == 0 {
165
 						userRolePurviews = purviews
164
 						userRolePurviews = purviews
166
 					} else {
165
 					} else {
171
 				userRolePurviewsArr = RemoveRepeatedPurviewElement(strings.Split(userRolePurviews, ","))
170
 				userRolePurviewsArr = RemoveRepeatedPurviewElement(strings.Split(userRolePurviews, ","))
172
 				//缓存数据
171
 				//缓存数据
173
 				purview_json, err := json.Marshal(userRolePurviewsArr)
172
 				purview_json, err := json.Marshal(userRolePurviewsArr)
174
-				fmt.Println("errr-------------------", err)
175
 				if err == nil {
173
 				if err == nil {
176
 					redis.Set(key, purview_json, time.Minute*60*60*24)
174
 					redis.Set(key, purview_json, time.Minute*60*60*24)
177
 				}
175
 				}
189
 
187
 
190
 			//系统所记录的权限列表
188
 			//系统所记录的权限列表
191
 			allPermission, _ := service.GetAllFunctionPurview()
189
 			allPermission, _ := service.GetAllFunctionPurview()
192
-			fmt.Println("allPermission-----------------------", allPermission)
190
+
193
 			for _, item := range allPermission {
191
 			for _, item := range allPermission {
194
 				//判断当前路由是否在权限路由列表里面
192
 				//判断当前路由是否在权限路由列表里面
195
 				if strings.Split(item.Urlfor, ",")[0] == strings.Split(this.Ctx.Request.RequestURI, "?")[0]+"?"+"mode="+this.GetString("mode") {
193
 				if strings.Split(item.Urlfor, ",")[0] == strings.Split(this.Ctx.Request.RequestURI, "?")[0]+"?"+"mode="+this.GetString("mode") {

+ 13 - 11
controllers/mobile_api_controllers/patient_api_controller.go 查看文件

621
 	origin, _ := c.GetInt64("origin", 0)
621
 	origin, _ := c.GetInt64("origin", 0)
622
 	groupno, _ := c.GetInt64("groupno", -1)
622
 	groupno, _ := c.GetInt64("groupno", -1)
623
 
623
 
624
-	fmt.Println("orgind===2=323322323232323", origin)
625
-	fmt.Println("groupno233333333333333333333", groupno)
624
+	record_date, _ := c.GetInt64("record_date")
625
+
626
 	if origin != 2 {
626
 	if origin != 2 {
627
 		adminUserInfo := c.GetMobileAdminUserInfo()
627
 		adminUserInfo := c.GetMobileAdminUserInfo()
628
 		execution_staff := adminUserInfo.AdminUser.Id
628
 		execution_staff := adminUserInfo.AdminUser.Id
690
 			UpdatedTime:    time.Now().Unix(),
690
 			UpdatedTime:    time.Now().Unix(),
691
 		}
691
 		}
692
 		var err error
692
 		var err error
693
-		fmt.Println("groupno==============", groupno)
693
+
694
 		if groupno > 0 {
694
 		if groupno > 0 {
695
 
695
 
696
 			// 查询信息规挡的设置天数
696
 			// 查询信息规挡的设置天数
705
 
705
 
706
 				//今日的日期减去设置的日期
706
 				//今日的日期减去设置的日期
707
 				cha_time = timeNewDate.Unix() - infor.WeekDay*86400
707
 				cha_time = timeNewDate.Unix() - infor.WeekDay*86400
708
-
709
-				if cha_time >= advices.AdviceDate {
708
+				fmt.Println("cha_time----------------", cha_time)
709
+				fmt.Println("advices.232323232222", record_date)
710
+				if cha_time >= record_date {
710
 					//查询审核是否允许
711
 					//查询审核是否允许
711
 					infor, _ := service.GetDialysisInformationByRecordDate(advices.PatientId, advices.AdviceDate, adminUserInfo.Org.Id)
712
 					infor, _ := service.GetDialysisInformationByRecordDate(advices.PatientId, advices.AdviceDate, adminUserInfo.Org.Id)
712
 					//申请状态不允许的情况 拒绝修改
713
 					//申请状态不允许的情况 拒绝修改
752
 				//今日的日期减去设置的日期
753
 				//今日的日期减去设置的日期
753
 				cha_time = timeNewDate.Unix() - infor.WeekDay*86400
754
 				cha_time = timeNewDate.Unix() - infor.WeekDay*86400
754
 
755
 
755
-				if cha_time >= advices.AdviceDate {
756
+				if cha_time >= record_date {
756
 					//查询审核是否允许
757
 					//查询审核是否允许
757
 					infor, _ := service.GetDialysisInformationByRecordDate(advices.PatientId, advices.AdviceDate, adminUserInfo.Org.Id)
758
 					infor, _ := service.GetDialysisInformationByRecordDate(advices.PatientId, advices.AdviceDate, adminUserInfo.Org.Id)
758
 					//申请状态不允许的情况 拒绝修改
759
 					//申请状态不允许的情况 拒绝修改
1828
 
1829
 
1829
 func (c *PatientApiController) CheckDoctorAdvice() {
1830
 func (c *PatientApiController) CheckDoctorAdvice() {
1830
 	origin, _ := c.GetInt64("origin", 0)
1831
 	origin, _ := c.GetInt64("origin", 0)
1831
-
1832
+	record_date, _ := c.GetInt64("record_date")
1833
+	patient_id, _ := c.GetInt64("patient_id")
1832
 	if origin != 2 {
1834
 	if origin != 2 {
1833
 		groupno, _ := c.GetInt64("groupno", -1)
1835
 		groupno, _ := c.GetInt64("groupno", -1)
1834
 		var ids []string
1836
 		var ids []string
1912
 				//今日的日期减去设置的日期
1914
 				//今日的日期减去设置的日期
1913
 				cha_time = timeNewDate.Unix() - infor.WeekDay*86400
1915
 				cha_time = timeNewDate.Unix() - infor.WeekDay*86400
1914
 
1916
 
1915
-				if cha_time >= advices.AdviceDate {
1917
+				if cha_time >= record_date {
1916
 					//查询审核是否允许
1918
 					//查询审核是否允许
1917
-					infor, _ := service.GetDialysisInformationByRecordDate(advices.PatientId, advices.AdviceDate, adminUserInfo.Org.Id)
1919
+					infor, _ := service.GetDialysisInformationByRecordDate(patient_id, record_date, adminUserInfo.Org.Id)
1918
 					//申请状态不允许的情况 拒绝修改
1920
 					//申请状态不允许的情况 拒绝修改
1919
 					if infor.ApplicationStatus != 1 {
1921
 					if infor.ApplicationStatus != 1 {
1920
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeInformationExist)
1922
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeInformationExist)
2036
 				//今日的日期减去设置的日期
2038
 				//今日的日期减去设置的日期
2037
 				cha_time = timeNewDate.Unix() - infor.WeekDay*86400
2039
 				cha_time = timeNewDate.Unix() - infor.WeekDay*86400
2038
 
2040
 
2039
-				if cha_time >= item.AdviceDate {
2041
+				if cha_time >= record_date {
2040
 					//查询审核是否允许
2042
 					//查询审核是否允许
2041
-					infor, _ := service.GetDialysisInformationByRecordDate(item.PatientId, item.AdviceDate, adminInfo.Org.Id)
2043
+					infor, _ := service.GetDialysisInformationByRecordDate(patient_id, record_date, adminInfo.Org.Id)
2042
 					//申请状态不允许的情况 拒绝修改
2044
 					//申请状态不允许的情况 拒绝修改
2043
 					if infor.ApplicationStatus != 1 {
2045
 					if infor.ApplicationStatus != 1 {
2044
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeInformationExist)
2046
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeInformationExist)

+ 1 - 1
controllers/pharmacy_controller.go 查看文件

438
 
438
 
439
 // 退药按钮点击
439
 // 退药按钮点击
440
 func (this *PharmacyController) DrugWithdrawal() {
440
 func (this *PharmacyController) DrugWithdrawal() {
441
-	fmt.Println("寄哪里2333333333333333333333333333333")
441
+
442
 	var err error
442
 	var err error
443
 	defer func() {
443
 	defer func() {
444
 		if rec := recover(); rec != nil {
444
 		if rec := recover(); rec != nil {

+ 1 - 1
controllers/supply_order_api_contorller.go 查看文件

2403
 			sum_in_count += item.WarehousingCount
2403
 			sum_in_count += item.WarehousingCount
2404
 		}
2404
 		}
2405
 		service.UpdateGoodByGoodId(item.GoodId, sum_count, sum_in_count, item.OrgId)
2405
 		service.UpdateGoodByGoodId(item.GoodId, sum_count, sum_in_count, item.OrgId)
2406
-		fmt.Println("入库数量23333333333333333333333wo", item.WarehousingCount)
2406
+
2407
 		//查询是否有该耗材
2407
 		//查询是否有该耗材
2408
 		goodStock, _ := service.GetGoodSumCount(storeConfig.StorehouseOutInfo, item.GoodId, item.OrgId)
2408
 		goodStock, _ := service.GetGoodSumCount(storeConfig.StorehouseOutInfo, item.GoodId, item.OrgId)
2409
 		if goodStock.ID > 0 {
2409
 		if goodStock.ID > 0 {

+ 11 - 10
models/data_models.go 查看文件

143
 }
143
 }
144
 
144
 
145
 type FiledConfig struct {
145
 type FiledConfig struct {
146
-	ID          int64  `gorm:"column:id" json:"id"`
147
-	OrgId       int64  `gorm:"column:org_id" json:"org_id"`
148
-	Module      int64  `gorm:"column:module" json:"module"`
149
-	FiledName   string `gorm:"column:filed_name" json:"filed_name"`
150
-	FiledNameCn string `gorm:"column:filed_name_cn" json:"filed_name_cn"`
151
-	IsShow      int64  `gorm:"column:is_show" json:"is_show"`
152
-	CreateTime  int64  `gorm:"column:create_time" json:"create_time"`
153
-	UpdateTime  int64  `gorm:"column:update_time" json:"update_time"`
154
-	SysModule   int64  `gorm:"column:sys_module" json:"sys_module" form:"sys_module"`
155
-	IsWrite     int64  `gorm:"column:is_write" json:"is_write" form:"is_write"`
146
+	ID           int64  `gorm:"column:id" json:"id"`
147
+	OrgId        int64  `gorm:"column:org_id" json:"org_id"`
148
+	Module       int64  `gorm:"column:module" json:"module"`
149
+	FiledName    string `gorm:"column:filed_name" json:"filed_name"`
150
+	FiledNameCn  string `gorm:"column:filed_name_cn" json:"filed_name_cn"`
151
+	IsShow       int64  `gorm:"column:is_show" json:"is_show"`
152
+	CreateTime   int64  `gorm:"column:create_time" json:"create_time"`
153
+	UpdateTime   int64  `gorm:"column:update_time" json:"update_time"`
154
+	SysModule    int64  `gorm:"column:sys_module" json:"sys_module" form:"sys_module"`
155
+	IsWrite      int64  `gorm:"column:is_write" json:"is_write" form:"is_write"`
156
+	IsSecondMenu int64  `gorm:"column:is_second_menu" json:"is_second_menu" form:"is_second_menu"`
156
 }
157
 }
157
 
158
 
158
 func (FiledConfig) TableName() string {
159
 func (FiledConfig) TableName() string {

+ 2 - 2
service/warhouse_service.go 查看文件

1856
 		if errThree != nil {
1856
 		if errThree != nil {
1857
 			return errThree
1857
 			return errThree
1858
 		}
1858
 		}
1859
-		fmt.Println("errThreee23333333333333333333333", errThree)
1859
+
1860
 		//查询剩余库存
1860
 		//查询剩余库存
1861
 		houseConfig, _ := GetAllStoreHouseConfig(orgID)
1861
 		houseConfig, _ := GetAllStoreHouseConfig(orgID)
1862
 		goodList, _ := GetAllGoodSumCount(good_yc.GoodId, orgID, houseConfig.StorehouseOutInfo)
1862
 		goodList, _ := GetAllGoodSumCount(good_yc.GoodId, orgID, houseConfig.StorehouseOutInfo)
1864
 		for _, item := range goodList {
1864
 		for _, item := range goodList {
1865
 			sum_count += item.StockCount
1865
 			sum_count += item.StockCount
1866
 		}
1866
 		}
1867
-		fmt.Println("sum_count++++++++++++++++++++++++++++++++=", sum_count)
1867
+
1868
 		// 判断当前出库的数据和删除出库数量
1868
 		// 判断当前出库的数据和删除出库数量
1869
 		if good_yc.Count <= ware.Count {
1869
 		if good_yc.Count <= ware.Count {
1870
 			delete_count = good_yc.Count
1870
 			delete_count = good_yc.Count