Commit 5ee66e11 authored by 张永's avatar 张永

V1.1.7.5

parent 2b482194
......@@ -411,7 +411,6 @@ public class GoodsServiceImpl implements GoodsService {
}
String[] kv = uid.split(":", 2);
args.add("(t.sAgentContractNO = '" + kv[0] + "' and t.nGoodsID = " + kv[1] + ")");
}
String sCustTypeID = "99999999999999";
String sShopTypeID = "99999999999999";
......@@ -452,7 +451,61 @@ public class GoodsServiceImpl implements GoodsService {
List<Map<String, Object>> plist = readJdbcTemplate.queryForList(sql1);
Map<String, List<Map<String, Object>>> pmm = Util.listToML(plist, ":", "sAgentContractNO", "nGoodsID");
for(String key : mm.keySet()) {
System.out.println("key-----"+key);
mm.get(key).put("promoList", pmm.get(key));
String[] kvv = key.split(":", 2); //600001001:224
String contractNo = kvv[0];
String goodsId = kvv[1];
//检查是不是不多单位 需求 #16680
int IsGoodsUnit = 0 ; //1为多单位,0 为否
try {
String mSql = "select count(1) from tAgentGoodsUnit a " +
" where a.sUnitTypeID in('SaleMid','SaleBig') " +
" and a.nAgentID = ? " +
" and a.nGoodsID = ?";
int mCount = readJdbcTemplate.queryForInt(mSql,agentID,goodsId);
if(mCount >0 ) {
IsGoodsUnit = 1;
}
} catch (Exception e1) {
}
if(IsGoodsUnit == 1) {
//查询多单位
String GoodsUnitSql = " select sUnitTypeID = 'SaleMin', sUnitType = '销售小单位', nConvertRate = 1, " +
" t.sUnit, t.nRealSalePrice, t.nSalePrice, "
+ " t.sSpec, t.nMinSaleQty, t.nSaleUnits, t.nStockQty, t.sStockTag, " +
" sShowUnit = convert(varchar,convert(numeric(12,2),t.nRealSalePrice)) + '元/' + t.sUnit + ' (1' + t.sUnit + ')' " +
" from V_OrgGoods t " +
" where t.sOrgNO = ?" +
" and t.sAgentContractNO = ?" +
" and t.nGoodsID = ?" +
" and t.nAgentID = ?" +
" union " +
" select gu.sUnitTypeID, gu.sUnitType, gu.nConvertRate, " +
" gu.sUnit, nRealSalePrice = gu.nSalePrice, gu.nSalePrice, "
+ " t.sSpec + '*' + dbo.fn_GetConvertDec(gu.nConvertRate), nMinSaleQty = 1, nSaleUnits = 1, nStockQty = cast(t.nStockQty/gu.nConvertRate as int), t.sStockTag, " +
" sShowUnit = convert(varchar,gu.nSalePrice) + '元/' + gu.sUnit + ' (' + dbo.fn_GetConvertDec(gu.nConvertRate) + t.sUnit + ')' " +
" from V_OrgGoods t join tAgentGoodsUnit gu on gu.nAgentID = t.nAgentID " +
" and gu.nGoodsID = t.nGoodsID " +
" where t.sOrgNO = ?" +
" and t.sAgentContractNO = ?" +
" and t.nGoodsID = ?" +
" and t.nAgentID = ? " +
" order by nConvertRate";
List<Map<String,Object>> goodsUnitList = readJdbcTemplate.queryForList(GoodsUnitSql,orgNo,contractNo,goodsId,agentID,orgNo,contractNo,goodsId,agentID);
mm.get(key).put("goodsUnitList", goodsUnitList);
}else {
mm.get(key).put("goodsUnitList", null);
}
}
return mm;
}
......
......@@ -414,10 +414,25 @@ public class OrderServiceImpl implements OrderService {
public List<Map<String, Object>> paySuccess(String sOutTradeNO, BigDecimal nPayAmount, String sOpenID,
String sTransTraceNO, Date dPayDateTime,String PayTypeID) {
List<Map<String, Object>> returnMap = new ArrayList<Map<String,Object>>();
String sql = "exec up_B2BSalesOrderPayCallBack '" + sOutTradeNO + "' ,'" + sTransTraceNO + "' , '" + nPayAmount
+ "' , '" + DateUtil.format(dPayDateTime, DateUtil.FMT_DATE_SECOND) + "' , '" + PayTypeID + "' ,0,'' ";
List<Map<String, Object>> returnMap = jdbcTemplate.executeMutil(sql).getDatas().get(0);
for(int i =1;i<=3;i++) {
String sql = "exec up_B2BSalesOrderPayCallBack '" + sOutTradeNO + "' ,'" + sTransTraceNO + "' , '" + nPayAmount
+ "' , '" + DateUtil.format(dPayDateTime, DateUtil.FMT_DATE_SECOND) + "' , '" + PayTypeID + "' ,0,'' ";
returnMap = jdbcTemplate.executeMutil(sql).getDatas().get(0);
String returnStr = GsonUtil.toJson(returnMap);
logger.info("回调第 "+i+"次,结果:"+returnStr);
//{"Status":99,"ErrorMsg":"订单:[S2024032620001460] 拆单异常!请联系系统管理员!\nUp_Ego_SplitOrderPayinfo\n订单:[S2024032620001460] 拆单异常!请联系系统管理员!\nUp_Ego_SplitOrderPayinfo\nTransaction (Process ID 72) was deadlocked on lock resources with another process and has been ","IsPush":0,"SalesOrderID":"S2024032620001460"}
if(returnStr.contains("Process")) { //事物锁,重试
this.paySuccess(sOutTradeNO, nPayAmount, sOpenID, sTransTraceNO, dPayDateTime, PayTypeID);
}else {
break;
}
}
this.pushOrderToSdongPo(returnMap);
......
......@@ -24,9 +24,10 @@
</head>
<body>
<div id="app">
<el-divider content-position="left">V1.1.7.5 2024-3-26</el-divider>
<el-divider content-position="left">V1.1.7.5 2024-4-10</el-divider>
<p class="title">1.增加接口签名验证及开关</p>
<p class="title">2.需求 #16555、需求 #16563 需求 #16542,需求 #16595</p>
<p class="title">3.需求 #16680</p>
<el-divider content-position="left">V1.1.7.4 2024-3-1</el-divider>
<p class="title">1.将日志写入SqlServer LGODB的idcSystemLog,一月一表: idcSystemLog_yyyyMM</p>
<p class="title">2.读写分离拆分 需求 #16467</p>
......
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