|
@@ -37,6 +37,8 @@ func StockGoodApiRegistRouters() {
|
37
|
37
|
func (c *StockGoodApiController) CreateGoodType() {
|
38
|
38
|
type_name := c.GetString("type_name")
|
39
|
39
|
remark := c.GetString("remark")
|
|
40
|
+ out_stock := c.GetString("out_stock")
|
|
41
|
+ outStockInt, _ := strconv.ParseInt(out_stock, 10, 64)
|
40
|
42
|
adminUserInfo := c.GetAdminUserInfo()
|
41
|
43
|
totals := service.FindGoodTypeByName(type_name, adminUserInfo.CurrentOrgId)
|
42
|
44
|
if totals > 0 {
|
|
@@ -56,6 +58,7 @@ func (c *StockGoodApiController) CreateGoodType() {
|
56
|
58
|
OrgId: adminUserInfo.CurrentOrgId,
|
57
|
59
|
Creater: adminUserInfo.AdminUser.Id,
|
58
|
60
|
Status: 1,
|
|
61
|
+ OutStock: outStockInt,
|
59
|
62
|
}
|
60
|
63
|
err, types := service.AddSigleGoodType(&goodType)
|
61
|
64
|
if err == nil {
|
|
@@ -72,6 +75,8 @@ func (c *StockGoodApiController) ModifyGoodType() {
|
72
|
75
|
type_name := c.GetString("type_name")
|
73
|
76
|
remark := c.GetString("remark")
|
74
|
77
|
good_type_code := c.GetString("type_code")
|
|
78
|
+ out_stock := c.GetString("out_stock")
|
|
79
|
+ outStockInt, _ := strconv.ParseInt(out_stock, 10, 64)
|
75
|
80
|
adminUserInfo := c.GetAdminUserInfo()
|
76
|
81
|
|
77
|
82
|
//totals := service.FindGoodTypeByName(type_name, adminUserInfo.CurrentOrgId)
|
|
@@ -90,6 +95,7 @@ func (c *StockGoodApiController) ModifyGoodType() {
|
90
|
95
|
OrgId: adminUserInfo.CurrentOrgId,
|
91
|
96
|
Modifier: adminUserInfo.AdminUser.Id,
|
92
|
97
|
Status: 1,
|
|
98
|
+ OutStock: outStockInt,
|
93
|
99
|
}
|
94
|
100
|
err, types := service.ModifyGoodType(&goodType)
|
95
|
101
|
if err == nil {
|