优化系统
This commit is contained in:
@@ -58,14 +58,21 @@ var product_spot_checkCtr = Ctr{
|
||||
}
|
||||
|
||||
produceProduct := that.Db.Get("produce_product", "*", Map{"id": produceProductId})
|
||||
if produceProduct == nil {
|
||||
that.Display(4, "找不到成品记录,无法进行抽检")
|
||||
return
|
||||
}
|
||||
//判断是否已经抽检了
|
||||
alreadyCheck := that.Db.Get("product_spot_check", "id", Map{"produce_product_id": produceProductId})
|
||||
|
||||
that.Db.Update("product", Map{"spot_check_count[#]": "spot_check_count+1",
|
||||
"spot_check_saved[#]": "spot_check_saved+1"},
|
||||
Map{"id": produceProduct.GetCeilInt("product_id")})
|
||||
if alreadyCheck == nil {
|
||||
|
||||
that.Db.Update("produce", Map{"spot_check_count[#]": "spot_check_count+1",
|
||||
"spot_check_saved[#]": "spot_check_saved+1"},
|
||||
Map{"id": produceProduct.GetCeilInt("produce_id")})
|
||||
that.Db.Update("product", Map{"spot_check_count[#]": "spot_check_count+1"},
|
||||
Map{"id": produceProduct.GetCeilInt("product_id")})
|
||||
|
||||
that.Db.Update("produce", Map{"spot_check_count[#]": "spot_check_count+1"},
|
||||
Map{"id": produceProduct.GetCeilInt("produce_id")})
|
||||
}
|
||||
|
||||
data := Map{
|
||||
"sn": sn,
|
||||
|
||||
Reference in New Issue
Block a user