Commit 19495898 authored by 张永's avatar 张永

修改BUG

parent 3f664fd0
......@@ -174,6 +174,7 @@ public class GoodsController {
@ApiImplicitParam(paramType = "query", name = "goodsId", dataType = "String", required = true, value = "商品编号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "contractNo", dataType = "String", required = true, value = "合同编号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "custTypeId", dataType = "String", required = false, value = "合同编号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "ShopPriceTypeID", dataType = "String", required = false, value = "ShopPriceTypeID", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = false, value = "终端标识", defaultValue = "wechat"),
@ApiImplicitParam(paramType = "query", name = "langID", dataType = "String", required = false, value = "语言", defaultValue = "936"),
@ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""),
......@@ -182,7 +183,7 @@ public class GoodsController {
@RequestMapping(value = "/goodsDetail",method=RequestMethod.GET)
@IDCLogResource(name="商品详情")
public String goodsDetail(String orgNo, String goodsId, String contractNo, String custTypeId, String terminal, String langID,String agentID, HttpServletRequest request, HttpServletResponse response) {
public String goodsDetail(String orgNo, String goodsId, String contractNo, String custTypeId, String terminal,String ShopPriceTypeID, String langID,String agentID, HttpServletRequest request, HttpServletResponse response) {
Map<String,Object> params=new HashMap<>();
params.put("orgNo", orgNo);
......@@ -192,6 +193,7 @@ public class GoodsController {
params.put("langID", langID);
params.put("terminal", terminal);
params.put("agentID", agentID);
params.put("ShopPriceTypeID", ShopPriceTypeID);
return goodsService.goodsDetail(params);
}
......
......@@ -17,6 +17,7 @@ import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.stereotype.Service;
import com.egolm.common.DateUtil;
import com.egolm.common.GsonUtil;
import com.egolm.common.StringUtil;
import com.egolm.common.Util;
import com.egolm.common.bean.Rjx;
......@@ -166,7 +167,7 @@ public class GoodsServiceImpl implements GoodsService {
String goodsId=(String) map.get("goodsId");
String contractNo=(String) map.get("contractNo");
String custTypeId=(String) map.get("custTypeId");
String shopPriceTypeId=(String) map.get("shopPriceTypeId");
String shopPriceTypeId=(String) map.get("ShopPriceTypeID");
String agentID = map.get("agentID")+"";
boolean isCheckAgentID = StringUtil.isNotBlank(agentID)?true:false;
......@@ -413,31 +414,26 @@ public class GoodsServiceImpl implements GoodsService {
}
String sCustTypeID = "99999999999999";
try {
String sqll = "select c.sCustTypeID from tCustomer c, tShop s where c.sCustNO = s.sCustNO and s.sShopNO = ? ";
if(StringUtil.isNotBlank(agentID)) {
sqll += " and c.nAgentID = ?";
sCustTypeID = readJdbcTemplate.queryForString(sqll, shopNo,agentID);
}else {
sCustTypeID = readJdbcTemplate.queryForString(sqll, shopNo);
}
} catch (Exception e) {
//shopNo为空,没有登陆
}
String sShopTypeID = "99999999999999";
try {
String sqll = "select s.sPriceTypeID from tCustomer c, tShop s where c.sCustNO = s.sCustNO and s.sShopNO = ? ";
String sqll = "select c.sCustTypeID,s.sPriceTypeID from tCustomer c, tShop s where c.sCustNO = s.sCustNO and s.sShopNO = ? ";
Map<String,Object> qM = new HashMap<String,Object>();
if(StringUtil.isNotBlank(agentID)) {
sqll += " and c.nAgentID = ?";
sShopTypeID = readJdbcTemplate.queryForString(sqll, shopNo,agentID);
sqll += " and s.nAgentID = ?";
qM = readJdbcTemplate.queryForMap(sqll, shopNo,agentID);
}else {
sShopTypeID = readJdbcTemplate.queryForString(sqll, shopNo);
qM = readJdbcTemplate.queryForMap(sqll, shopNo);
}
if(!qM.isEmpty()) {
sCustTypeID = qM.get("sCustTypeID")+"";
sShopTypeID = qM.get("sPriceTypeID")+"";
}
} catch (Exception e) {
//shopNo为空,没有登陆
}
String sql = "select t.sAgentContractNO, t.nGoodsID, nStockQty = t.nRealStockQty, t.nDefaultPrice, isnull(ap.nRealSalePrice, t.nRealSalePrice) nRealSalePrice, t.sStockTag " +
" from V_OrgGoods t left join tAgentCustTypePrice ap on ap.sCustTypeID = '" + sCustTypeID + "' " +
" and ap.sShopTypeID = '" + sShopTypeID + "' " +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment