陈少旭 пре 2 година
родитељ
комит
1f5af4bbb6
1 измењених фајлова са 5 додато и 2 уклоњено
  1. 5 2
      controllers/his_api_controller.go

+ 5 - 2
controllers/his_api_controller.go Прегледај датотеку

3966
 	label.Status = 0
3966
 	label.Status = 0
3967
 	service.CreateHisLabelRecord(&label)
3967
 	service.CreateHisLabelRecord(&label)
3968
 
3968
 
3969
+	fmt.Println(goodOutConfig.IsOpen)
3969
 	if goodOutConfig.IsOpen != 1 {
3970
 	if goodOutConfig.IsOpen != 1 {
3970
 		if stockConfig.IsOpen == 1 {
3971
 		if stockConfig.IsOpen == 1 {
3971
 			if project.Type == 2 {
3972
 			if project.Type == 2 {
3972
 				err := service.DelelteProject(id, c.GetAdminUserInfo().CurrentOrgId)
3973
 				err := service.DelelteProject(id, c.GetAdminUserInfo().CurrentOrgId)
3973
 				fmt.Println(err)
3974
 				fmt.Println(err)
3974
 			}
3975
 			}
3975
-
3976
 			if project.Type == 3 && project.IsOut == 1 {
3976
 			if project.Type == 3 && project.IsOut == 1 {
3977
 
3977
 
3978
 				houseConfig, _ := service.GetAllStoreHouseConfig(c.GetAdminUserInfo().CurrentOrgId)
3978
 				houseConfig, _ := service.GetAllStoreHouseConfig(c.GetAdminUserInfo().CurrentOrgId)
4224
 				fmt.Println(err)
4224
 				fmt.Println(err)
4225
 			}
4225
 			}
4226
 
4226
 
4227
+		} else {
4228
+			err := service.DelelteProject(id, c.GetAdminUserInfo().CurrentOrgId)
4229
+			fmt.Println(err)
4230
+
4227
 		}
4231
 		}
4228
 	}
4232
 	}
4229
 
4233
 
4230
 	//保存处方出库
4234
 	//保存处方出库
4231
 	if goodOutConfig.IsOpen == 1 {
4235
 	if goodOutConfig.IsOpen == 1 {
4232
-
4233
 		if project.Type == 3 {
4236
 		if project.Type == 3 {
4234
 			houseConfig, _ := service.GetAllStoreHouseConfig(c.GetAdminUserInfo().CurrentOrgId)
4237
 			houseConfig, _ := service.GetAllStoreHouseConfig(c.GetAdminUserInfo().CurrentOrgId)
4235
 			good, _ := service.FindGoodInfoByIdTwo(project.ProjectId)
4238
 			good, _ := service.FindGoodInfoByIdTwo(project.ProjectId)