wangzhinan 3 سال پیش
والد
کامیت
361ce2a0df
1فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 5 2
      svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/MedicineOrderService.java

+ 5 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/service/a3service/MedicineOrderService.java

@ -250,7 +250,7 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
    public  JSONObject sumamount(String beg, String end) throws Exception {
        JSONObject result = new JSONObject();
        String sql = "select sum(t.amount) from t_mediicine_order t where t.prescribe_time >= '" + beg + "' and t.prescribe_time <= '" + end + "'";
        int count = jdbcTemplate.queryForObject(sql,Integer.class);
        float count = jdbcTemplate.queryForObject(sql,Float.class);
        Date startDate = DateUtil.strToDateShort(beg);
        Date endDate = DateUtil.strToDateShort(end);
        result.put("response",ConstantUtils.SUCCESS);
@ -268,10 +268,13 @@ public class MedicineOrderService extends BaseJpaService<Mediicineorder, Mediici
     */
    public JSONObject getcount(String beg, String end) {
        JSONObject result = new JSONObject();
        String sql = "select count(1) from t_mediicine_order t where t.prescribe_time >= '" + beg + "' and t.prescribe_time <= '" + end + "'";
        int count = jdbcTemplate.queryForObject(sql,Integer.class);
        Date startDate = DateUtil.strToDateShort(beg);
        Date endDate = DateUtil.strToDateShort(end);
        result.put("response",ConstantUtils.SUCCESS);
        result.put("msg", orderDao.getsumamount(startDate, endDate));
//        result.put("msg", orderDao.getcount(startDate, endDate));
        result.put("msg", count);
        return result;
    }