Ver Fonte

修复查不到盘的BUG

zou.yingbin há 4 anos atrás
pai
commit
fb361decb0
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      mtpcache/goods.go

+ 3 - 3
mtpcache/goods.go

@@ -79,7 +79,7 @@ func (r *Goods) calc() {
 func (r *Goods) buildSql() string {
 	var sqlId utils.SQLVal = `
 select t.goodsid,
-        t.goodscode,
+        upper(t.goodscode) goodscode,
         t.goodsname,
         t.marketid,
         t.goodsgroupid,
@@ -130,10 +130,10 @@ func GetGoods(goodsCode string) (Goods, bool) {
 
 // GetGoodsDecimalplace 获取商品小数位
 func GetGoodsDecimalplace(goodsCode string) int {
-	if d, ok := GetGoods(goodsCode); ok {
+	if d, ok := GetGoods(strings.ToUpper(goodsCode)); ok {
 		return int(d.DECIMALPLACE)
 	}
-	if d, ok := GetGoods(strings.ToUpper(goodsCode)); ok {
+	if d, ok := GetGoods(goodsCode); ok {
 		return int(d.DECIMALPLACE)
 	}
 	return 0