|
|
|
@ -775,13 +775,13 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
public Map<String,Object> queryOrder(Map qmap, Integer userrole, Integer page, Integer limit) { |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); |
|
|
|
int start = page > 1 ? (page - 1) * limit : 0; |
|
|
|
Map outmap = new HashMap(); |
|
|
|
Map outmap = new LinkedHashMap(); |
|
|
|
//订单结算 todo
|
|
|
|
List<Order> orderList = orderMapper.getOrderList(qmap, start, limit); |
|
|
|
//最后的结果返回list
|
|
|
|
List outlist =new ArrayList(); |
|
|
|
for (Order od : orderList) { |
|
|
|
Map<String, Object> retmap = new HashMap<>(); |
|
|
|
Map<String, Object> retmap = new LinkedHashMap<>(); |
|
|
|
//订单的产品转为map
|
|
|
|
//JSONObject odjson = (JSONObject) JSON.toJSON(od);
|
|
|
|
//retmap = JSONObject.parseObject(odjson.toJSONString());
|
|
|
|
@ -845,7 +845,7 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
//Map odgmap =new HashMap();
|
|
|
|
// 利用goods detail的信息来初始化
|
|
|
|
//Map odgmap = JSONObject.parseObject(JSON.toJSONString(ogd));
|
|
|
|
Map odgmap = new HashMap(); |
|
|
|
Map odgmap = new LinkedHashMap(); |
|
|
|
odgmap.put("entrust_islicode",ogd.getEntrustIslicode()); |
|
|
|
odgmap.put("islicode",ogd.getIslicode()); |
|
|
|
odgmap.put("goods_name",ogd.getGoodsName()); |
|
|
|
@ -856,7 +856,7 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
odgmap.put("history_entrust_code",ogd.getHistoryEntrustCode()); |
|
|
|
odgmap.put("identifier",ogd.getIdentifier()); |
|
|
|
odgmap.put("identifiers",ogd.getIdentifiers()); |
|
|
|
odgmap.put("sourcedata_islicode",ogd.getSourceDownload()); |
|
|
|
odgmap.put("sourcedata_islicode",ogd.getSourcedataIslicode()); |
|
|
|
odgmap.put("close_serial_number",ogd.getCloseSerialNumber()); |
|
|
|
odgmap.put("price",ogd.getPrice()); |
|
|
|
odgmap.put("goods_price",ogd.getGoodsPrice()); |
|
|
|
@ -866,38 +866,38 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
odgmap.put("money",ogd.getMoney()); |
|
|
|
odgmap.put("entrust_service_charge",ogd.getEntrustServiceCharge()); |
|
|
|
odgmap.put("entrust_money",ogd.getEarnestMoney()); |
|
|
|
// "goods_ownership": 0,
|
|
|
|
// "goods_ownership_str": "发行权",
|
|
|
|
// "goods_type": 1,
|
|
|
|
// "charges_type": 2,
|
|
|
|
// "goods_islicode": "010007-00000000384699999999-2",
|
|
|
|
// "goods_entrust": 2,
|
|
|
|
// "contractual_period": 2,
|
|
|
|
// "transaction_class": 1,
|
|
|
|
// "contract": "[]",
|
|
|
|
// "otherIdentifiers": "11.30,第二次,一次性",
|
|
|
|
// "classification": " ",
|
|
|
|
// "source_islicode": "",
|
|
|
|
// "source_islicode_name": "",
|
|
|
|
// "source_download": null,
|
|
|
|
// "close_id": null,
|
|
|
|
// "close_status": 1,
|
|
|
|
// "is_close": 0,
|
|
|
|
// "callback_msg": "",
|
|
|
|
// "goods_status": 1,
|
|
|
|
// "entrust_month": 2,
|
|
|
|
//
|
|
|
|
odgmap.put("goods_ownership",ogd.getGoodsOwnership()); |
|
|
|
odgmap.put("goods_ownership_str",ogd.getGoodsOwnershipStr()); |
|
|
|
odgmap.put("goods_type",ogd.getGoodsType()); |
|
|
|
odgmap.put("charges_type",ogd.getChargesType()); |
|
|
|
odgmap.put("goods_islicode",ogd.getGoodsIslicode()); |
|
|
|
odgmap.put("goods_entrust",ogd.getGoodsEntrust()); |
|
|
|
odgmap.put("contractual_period",ogd.getContractualPeriod()); |
|
|
|
odgmap.put("transaction_class",ogd.getTransactionClass()); |
|
|
|
odgmap.put("contract",ogd.getContract()); |
|
|
|
odgmap.put("otherIdentifiers",ogd.getOtherIdentifiers()); |
|
|
|
odgmap.put("classification",ogd.getClassification()); |
|
|
|
odgmap.put("source_islicode",ogd.getSourceIslicode()); |
|
|
|
odgmap.put("source_islicode_name",ogd.getSourceIslicodeName()); |
|
|
|
odgmap.put("source_download",ogd.getSourceDownload()); |
|
|
|
odgmap.put("close_id",ogd.getCloseId()); |
|
|
|
odgmap.put("close_status",ogd.getCloseStatus()); |
|
|
|
odgmap.put("is_close",ogd.getIsClose()); |
|
|
|
odgmap.put("callback_msg",ogd.getCallbackMsg()); |
|
|
|
|
|
|
|
//补充其他元素
|
|
|
|
//retmap.put("close_status", ogd.getCloseStatus());
|
|
|
|
// 查询委托方信息
|
|
|
|
// OrderUser entrUser = orderUserMapper.getUserOrder(ogd.getBatchcode(),ogd.getIslicode());
|
|
|
|
// if(entrUser!=null){ //not null
|
|
|
|
// odgmap.put("entrust_name",entrUser.getName());
|
|
|
|
// odgmap.put("attesttime",entrUser.getAttesttime());
|
|
|
|
// odgmap.put("registertime",entrUser.getRegistertime());
|
|
|
|
// odgmap.put("userType",entrUser.getUserType());
|
|
|
|
// odgmap.put("authType",entrUser.getAuthType());
|
|
|
|
// odgmap.put("state",entrUser.getState());
|
|
|
|
// }
|
|
|
|
OrderUser entrUser = orderUserMapper.getUserOrder(ogd.getBatchcode(),ogd.getIslicode()); |
|
|
|
if(entrUser!=null){ //not null
|
|
|
|
odgmap.put("entrust_name",entrUser.getName()); |
|
|
|
odgmap.put("attesttime",entrUser.getAttesttime()); |
|
|
|
odgmap.put("registertime",entrUser.getRegistertime()); |
|
|
|
odgmap.put("userType",entrUser.getUserType()); |
|
|
|
odgmap.put("authType",entrUser.getAuthType()); |
|
|
|
odgmap.put("state",entrUser.getState()); |
|
|
|
} |
|
|
|
//查询商品状态
|
|
|
|
Goods tgoods = goodsMapper.getGoodsByIsli(ogd.getGoodsIslicode()); |
|
|
|
int igoodsStatus=4; //默认
|
|
|
|
@ -938,7 +938,7 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
ogsJsonList.add(osgsMap); |
|
|
|
} |
|
|
|
// convert to json
|
|
|
|
odgmap.put("source", ogsJsonList); |
|
|
|
odgmap.put("source", ogsJsonList==null?"[]":ogsJsonList); |
|
|
|
//
|
|
|
|
odgList.add(odgmap); |
|
|
|
} |
|
|
|
@ -953,21 +953,21 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
if (userrole == 1 && od.getStatus() == 3) { |
|
|
|
retmap.put("status", 4); |
|
|
|
} |
|
|
|
retmap.put("search_close_money", new BigDecimal(0)); |
|
|
|
retmap.put("total_close_money", new BigDecimal(0)); |
|
|
|
//retmap.put("search_close_money", new BigDecimal(0));
|
|
|
|
//retmap.put("total_close_money", new BigDecimal(0));
|
|
|
|
//
|
|
|
|
outlist.add(retmap); |
|
|
|
} |
|
|
|
//统计符合条件的总数
|
|
|
|
int total = orderMapper.countOrderByMap(qmap); |
|
|
|
// 最外层
|
|
|
|
outmap.put("total_close_money",new BigDecimal("0.00")); |
|
|
|
|
|
|
|
outmap.put("total",total); |
|
|
|
outmap.put("per_page",limit); |
|
|
|
outmap.put("current_page",page); |
|
|
|
outmap.put("last_page",1); |
|
|
|
outmap.put("total",total); |
|
|
|
outmap.put("data",outlist); |
|
|
|
outmap.put("total_close_money",new BigDecimal("0.00")); |
|
|
|
outmap.put("search_close_money", new BigDecimal("0.00")); |
|
|
|
return outmap; |
|
|
|
} |
|
|
|
|
|
|
|
|