| | |
| | | |
| | | import java.math.RoundingMode; |
| | | import java.text.DecimalFormat; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | |
| | |
| | | } |
| | | DecimalFormat df_symbol = new DecimalFormat(decimals); |
| | | df_symbol.setRoundingMode(RoundingMode.FLOOR);// 向下取整 |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai")); |
| | | DecimalFormat df = new DecimalFormat("#.##"); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("order_no", order.getOrder_no()); |
| | | map.put("name", item.getName()); |
| | | map.put("symbol", order.getSymbol()); |
| | | map.put("open_time", DateUtils.format(order.getCreate_time(), DateUtils.DF_yyyyMMddHHmmss)); |
| | | map.put("open_time", sdf.format(order.getCreate_time())); |
| | | if (order.getClose_time() != null) { |
| | | map.put("close_time", DateUtils.format(order.getClose_time(), DateUtils.DF_yyyyMMddHHmmss)); |
| | | map.put("close_time", sdf.format(order.getClose_time())); |
| | | } else { |
| | | map.put("close_time", "--"); |
| | | } |