APP额度查询数据展示问题

This commit is contained in:
zhangjun 2020-08-08 10:40:14 +08:00
parent d315c10c13
commit 1b165c5f22

View File

@ -210,14 +210,11 @@ public class ApplyArchiveServiceImpl implements ApplyArchiveService{
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
.readRequestParam(request, "UTF-8");
fieldMap = (Map<String, Object>) testMap.get("fieldMap");
//String userId = fieldMap.get("belongorg") == null ? "" : fieldMap.get("belongorg").toString();
String userId = fieldMap.get("userid") == null ? "" : fieldMap.get("userid").toString();
ASUser asUser = new ASUser(userId);
String orgID = asUser.getOrgID();
String orgID = fieldMap.get("belongorg") == null ? "" : fieldMap.get("belongorg").toString();
String sql = "";
//sql = "select o.distributor_no,ifnull(b.caution_money,0) as bcaution_money,ifnull(t.caution_money,0) as tcaution_money,ifnull(sum(b.caution_money),0) - ifnull(sum(t.caution_money),0) as surrende,o.total,o.usedlines,o.relines from vi_distributor_lines o left join d_depositcharge_info b on b.distributor_id = o.distributor_no and b.money_type = 'bondcollect' left join d_depositreturn_info t on t.distributor_id = o.distributor_no and t.money_type = 'bondreturn' group by o.distributor_no";
//sql = "SELECT o.distributor_no,IFNULL(b.caution_money,0) AS bcaution_money,IFNULL(t.caution_money,0) AS tcaution_money,IFNULL(SUM(b.caution_money),0) - IFNULL(SUM(t.caution_money),0) AS surrende,o.total,o.usedlines,o.relines FROM vi_distributor_lines o LEFT JOIN d_depositcharge_info b ON b.distributor_id = o.distributor_no AND b.money_type = 'bondcollect' LEFT JOIN d_depositreturn_info t ON t.distributor_id = o.distributor_no AND t.money_type = 'bondreturn' WHERE o.distributor_no=(SELECT distributor_no FROM distributor_info WHERE orgid='"+userId+"') ";
sql = "SELECT O.DISTRIBUTOR_NO,TOTAL,O.USEDLINES,O.RELINES,CAUTION_MONEY FROM vi_distributor_lines O LEFT JOIN (SELECT SUM(CAUTION_MONEY) AS CAUTION_MONEY,distributor_id,money_type FROM d_depositcharge_info WHERE money_type = 'bondcollect' GROUP BY distributor_id) b ON b.distributor_id = O.distributor_no WHERE O.distributor_no=(SELECT distributor_no FROM distributor_info WHERE orgid='"+orgID+"') ";
sql = "SELECT O.distributor_no,O.total,O.USEDLINES AS usedlines,O.RELINES AS relines,CAUTION_MONEY AS surrende FROM vi_distributor_lines O LEFT JOIN (SELECT SUM(CAUTION_MONEY) AS CAUTION_MONEY,distributor_id,money_type FROM d_depositcharge_info WHERE money_type = 'bondcollect' GROUP BY distributor_id) b ON b.distributor_id = O.distributor_no WHERE O.distributor_no=(SELECT distributor_no FROM distributor_info WHERE orgid='"+orgID+"') ";
List<Map<String, String>> dataList = DataOperatorUtil.getDataBySql(sql);
if(dataList.size()>0){
Map<String, Object> body = new HashMap<String, Object>();