Bladeren bron

库存流水展示

XMLWAN 2 jaren geleden
bovenliggende
commit
f21db1835f

+ 5 - 7
controllers/mobile_api_controllers/mobile_api_base_controller.go Bestand weergeven

@@ -151,16 +151,15 @@ func (this *MobileBaseAPIAuthController) Prepare() {
151 151
 			var userRolePurviews string
152 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 158
 			if len(purviews_json_str) == 0 {
160 159
 				for _, item := range roles {
161 160
 					role_id, _ := strconv.ParseInt(item, 10, 64)
162 161
 					purviews, _ := service.GetRoleFuncPurviewIds(role_id)
163
-					fmt.Println("2333333333333333333", purviews)
162
+
164 163
 					if len(userRolePurviews) == 0 {
165 164
 						userRolePurviews = purviews
166 165
 					} else {
@@ -171,7 +170,6 @@ func (this *MobileBaseAPIAuthController) Prepare() {
171 170
 				userRolePurviewsArr = RemoveRepeatedPurviewElement(strings.Split(userRolePurviews, ","))
172 171
 				//缓存数据
173 172
 				purview_json, err := json.Marshal(userRolePurviewsArr)
174
-				fmt.Println("errr-------------------", err)
175 173
 				if err == nil {
176 174
 					redis.Set(key, purview_json, time.Minute*60*60*24)
177 175
 				}
@@ -189,7 +187,7 @@ func (this *MobileBaseAPIAuthController) Prepare() {
189 187
 
190 188
 			//系统所记录的权限列表
191 189
 			allPermission, _ := service.GetAllFunctionPurview()
192
-			fmt.Println("allPermission-----------------------", allPermission)
190
+
193 191
 			for _, item := range allPermission {
194 192
 				//判断当前路由是否在权限路由列表里面
195 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 Bestand weergeven

@@ -621,8 +621,8 @@ func (c *PatientApiController) ExecDoctorAdvice() {
621 621
 	origin, _ := c.GetInt64("origin", 0)
622 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 626
 	if origin != 2 {
627 627
 		adminUserInfo := c.GetMobileAdminUserInfo()
628 628
 		execution_staff := adminUserInfo.AdminUser.Id
@@ -690,7 +690,7 @@ func (c *PatientApiController) ExecDoctorAdvice() {
690 690
 			UpdatedTime:    time.Now().Unix(),
691 691
 		}
692 692
 		var err error
693
-		fmt.Println("groupno==============", groupno)
693
+
694 694
 		if groupno > 0 {
695 695
 
696 696
 			// 查询信息规挡的设置天数
@@ -705,8 +705,9 @@ func (c *PatientApiController) ExecDoctorAdvice() {
705 705
 
706 706
 				//今日的日期减去设置的日期
707 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 712
 					infor, _ := service.GetDialysisInformationByRecordDate(advices.PatientId, advices.AdviceDate, adminUserInfo.Org.Id)
712 713
 					//申请状态不允许的情况 拒绝修改
@@ -752,7 +753,7 @@ func (c *PatientApiController) ExecDoctorAdvice() {
752 753
 				//今日的日期减去设置的日期
753 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 758
 					infor, _ := service.GetDialysisInformationByRecordDate(advices.PatientId, advices.AdviceDate, adminUserInfo.Org.Id)
758 759
 					//申请状态不允许的情况 拒绝修改
@@ -1828,7 +1829,8 @@ func (c *PatientApiController) ModifyExecDoctorAdvice() {
1828 1829
 
1829 1830
 func (c *PatientApiController) CheckDoctorAdvice() {
1830 1831
 	origin, _ := c.GetInt64("origin", 0)
1831
-
1832
+	record_date, _ := c.GetInt64("record_date")
1833
+	patient_id, _ := c.GetInt64("patient_id")
1832 1834
 	if origin != 2 {
1833 1835
 		groupno, _ := c.GetInt64("groupno", -1)
1834 1836
 		var ids []string
@@ -1912,9 +1914,9 @@ func (c *PatientApiController) CheckDoctorAdvice() {
1912 1914
 				//今日的日期减去设置的日期
1913 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 1921
 					if infor.ApplicationStatus != 1 {
1920 1922
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeInformationExist)
@@ -2036,9 +2038,9 @@ func (c *PatientApiController) CheckDoctorAdvice() {
2036 2038
 				//今日的日期减去设置的日期
2037 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 2045
 					if infor.ApplicationStatus != 1 {
2044 2046
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeInformationExist)

+ 1 - 1
controllers/pharmacy_controller.go Bestand weergeven

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

+ 1 - 1
controllers/supply_order_api_contorller.go Bestand weergeven

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

+ 11 - 10
models/data_models.go Bestand weergeven

@@ -143,16 +143,17 @@ func (DictConfigViewModel) TableName() string {
143 143
 }
144 144
 
145 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 159
 func (FiledConfig) TableName() string {

+ 2 - 2
service/warhouse_service.go Bestand weergeven

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