New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.ExcelExportUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderTaxiService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 财务报表 |
| | | * @author zhibing.pu |
| | | * @Date 2025/4/22 10:55 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/financialStatement") |
| | | public class FinancialStatementController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/financialStatement/"; |
| | | |
| | | @Resource |
| | | private ITOrderTaxiService orderTaxiService; |
| | | |
| | | |
| | | /** |
| | | * 跳转支付订单统计页 |
| | | * @return |
| | | */ |
| | | @GetMapping("/paymentOrderStatistics") |
| | | public String paymentOrderStatistics(){ |
| | | return PREFIX + "paymentOrderStatistics/paymentOrderStatistics.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转线下订单统计页 |
| | | * @return |
| | | */ |
| | | @GetMapping("/offlineOrderStatistics") |
| | | public String offlineOrderStatistics(){ |
| | | return PREFIX + "offlineOrderStatistics/offlineOrderStatistics.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取支付订单统计列表 |
| | | * @param paymentCode |
| | | * @param orderCode |
| | | * @param userPhone |
| | | * @param driverPhone |
| | | * @param createTime |
| | | * @param paymentTime |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/paymentOrderStatisticsList") |
| | | public Object paymentOrderStatisticsList(String paymentCode, String orderCode, String userPhone, |
| | | String driverPhone, String createTime, String paymentTime){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<Map<String, Object>> list = orderTaxiService.paymentOrderStatisticsList(page, paymentCode, orderCode, userPhone, driverPhone, createTime, paymentTime); |
| | | return super.packForBT(page.setRecords(list)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出支付订单统计列表 |
| | | * @param paymentCode |
| | | * @param orderCode |
| | | * @param userPhone |
| | | * @param driverPhone |
| | | * @param createTime |
| | | * @param paymentTime |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/paymentOrderStatisticsList_export") |
| | | public void paymentOrderStatisticsList_export(String paymentCode, String orderCode, String userPhone, |
| | | String driverPhone, String createTime, String paymentTime, HttpServletRequest request, HttpServletResponse response){ |
| | | Page<Map<String, Object>> page = new Page(1, 9999); |
| | | List<Map<String, Object>> list = orderTaxiService.paymentOrderStatisticsList(page, paymentCode, orderCode, userPhone, driverPhone, createTime, paymentTime); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |
| | | |
| | | // 列【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | shellList.add("支付流水号"); |
| | | shellList.add("订单号"); |
| | | shellList.add("支付用户手机号"); |
| | | shellList.add("支付金额"); |
| | | shellList.add("接单司机手机号"); |
| | | shellList.add("司机所属机构"); |
| | | shellList.add("扣除司机抽成"); |
| | | shellList.add("下单时间"); |
| | | shellList.add("支付时间"); |
| | | dataList.add(shellList); |
| | | |
| | | for (Map<String,Object> object : list){ |
| | | // 详细数据列【封装】 |
| | | shellList = new ArrayList<String>(); |
| | | if(SinataUtil.isNotEmpty(object.get("paymentCode"))){ |
| | | shellList.add(object.get("paymentCode").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("orderNum"))){ |
| | | shellList.add(object.get("orderNum").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("userPhone"))){ |
| | | shellList.add(object.get("userPhone").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("amount"))){ |
| | | shellList.add(object.get("amount").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("driverPhone"))){ |
| | | shellList.add(object.get("driverPhone").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("company"))){ |
| | | shellList.add(object.get("company").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("income"))){ |
| | | shellList.add(object.get("income").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("insertTime"))){ |
| | | shellList.add(object.get("insertTime").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("paymentTime"))){ |
| | | shellList.add(object.get("paymentTime").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | dataList.add(shellList); |
| | | } |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet("支付订单统计"+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), "支付订单统计", dataList,request, response); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取线下订单统计 |
| | | * @param orderCode |
| | | * @param userPhone |
| | | * @param driverPhone |
| | | * @param createTime |
| | | * @param orderSource |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/offlineOrderStatisticsList") |
| | | public Object offlineOrderStatisticsList(String orderCode, String userPhone, String driverPhone, |
| | | String createTime, Integer orderSource){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<Map<String, Object>> list = orderTaxiService.offlineOrderStatisticsList(page, orderCode, userPhone, driverPhone, createTime, orderSource); |
| | | return super.packForBT(page.setRecords(list)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出线下订单统计 |
| | | * @param orderCode |
| | | * @param userPhone |
| | | * @param driverPhone |
| | | * @param createTime |
| | | * @param orderSource |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping("/offlineOrderStatisticsList_export") |
| | | public void offlineOrderStatisticsList_export(String orderCode, String userPhone, String driverPhone, |
| | | String createTime, Integer orderSource, HttpServletRequest request, HttpServletResponse response){ |
| | | Page<Map<String, Object>> page = new Page(1, 9999); |
| | | List<Map<String, Object>> list = orderTaxiService.offlineOrderStatisticsList(page, orderCode, userPhone, driverPhone, createTime, orderSource); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |
| | | |
| | | // 列【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | shellList.add("订单号"); |
| | | shellList.add("用户手机号"); |
| | | shellList.add("打车方式"); |
| | | shellList.add("接单司机手机号"); |
| | | shellList.add("司机所属机构"); |
| | | shellList.add("扣除司机抽成"); |
| | | shellList.add("下单时间"); |
| | | dataList.add(shellList); |
| | | |
| | | for (Map<String,Object> object : list){ |
| | | shellList = new ArrayList<String>(); |
| | | // 详细数据列【封装】 |
| | | if(SinataUtil.isNotEmpty(object.get("orderNum"))){ |
| | | shellList.add(object.get("orderNum").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("userPhone"))){ |
| | | shellList.add(object.get("userPhone").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("orderSource"))){ |
| | | shellList.add(object.get("orderSource").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("driverPhone"))){ |
| | | shellList.add(object.get("driverPhone").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("company"))){ |
| | | shellList.add(object.get("company").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("income"))){ |
| | | shellList.add(object.get("income").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("insertTime"))){ |
| | | shellList.add(object.get("insertTime").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | dataList.add(shellList); |
| | | } |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet("线下订单统计"+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), "线下订单统计", dataList,request, response); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.TCompany; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyService; |
| | | import com.stylefeng.guns.modular.system.service.IUserActivityDiscount1Service; |
| | | import com.stylefeng.guns.modular.system.service.IUserCouponRecordService; |
| | | import com.stylefeng.guns.modular.system.service.IUserRedPacketRecordService; |
| | | import com.stylefeng.guns.modular.system.model.User; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private IUserActivityDiscount1Service userActivityDiscount1Service; |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | @RequestMapping("/showOperationalData") |
| | | public String showOperationalData(Model model){ |
| | | List<TCompany> tCompanies = companyService.selectList(new EntityWrapper<TCompany>().eq("state", 0).ne("flag", 3)); |
| | | Wrapper<TCompany> wrapper = new EntityWrapper<TCompany>().eq("state", 0).ne("flag", 3); |
| | | Integer id = ShiroKit.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | if(user.getRoleType() != 1){ |
| | | wrapper.eq("id", user.getObjectId()); |
| | | } |
| | | List<TCompany> tCompanies = companyService.selectList(wrapper); |
| | | model.addAttribute("company", tCompanies); |
| | | return PREFIX + "operationalData.html"; |
| | | } |
| | |
| | | start = time.split(" - ")[0]; |
| | | end = time.split(" - ")[1]; |
| | | } |
| | | Integer id = ShiroKit.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | if(user.getRoleType() != 1){ |
| | | companyId = user.getObjectId(); |
| | | } |
| | | return companyService.queryOperationalData(type, start, end, companyId, offset, limit); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | start = time.split(" - ")[0]; |
| | | end = time.split(" - ")[1]; |
| | | } |
| | | |
| | | Integer id = ShiroKit.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | if(user.getRoleType() != 1){ |
| | | companyId = user.getObjectId(); |
| | | } |
| | | HSSFWorkbook hssfWorkbook = companyService.downloadOperationalData(type, start, end, companyId); |
| | | response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("日常运营数据汇总表.xls", "utf-8")); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.SysRedPacketRecord; |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | |
| | | import com.stylefeng.guns.modular.system.service.ISysCouponRecordService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | |
| | | @Autowired |
| | | private ISysCouponRecordService sysCouponRecordService; |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/sysCouponRecord_add") |
| | | public String sysCouponRecordAdd() { |
| | | public String sysCouponRecordAdd(Model model) { |
| | | List<TRegion> provinceList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",provinceList); |
| | | return PREFIX + "sysCouponRecord_add.html"; |
| | | } |
| | | |
| | |
| | | SysCouponRecord sysCouponRecord = sysCouponRecordService.selectById(sysCouponRecordId); |
| | | model.addAttribute("item",sysCouponRecord); |
| | | LogObjectHolder.me().set(sysCouponRecord); |
| | | List<TRegion> provinceList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",provinceList); |
| | | return PREFIX + "sysCouponRecord_edit.html"; |
| | | } |
| | | |
| | |
| | | sysCouponRecord.setInsertTime(new Date()); |
| | | sysCouponRecord.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | sysCouponRecord.setCompanyType(ShiroKit.getUser().getRoleType()); |
| | | String citys = sysCouponRecord.getCitys(); |
| | | JSONArray jsonArray = JSON.parseArray(citys); |
| | | JSONArray citys_list = new JSONArray(); |
| | | List<TRegion> tRegions = tRegionService.selectList(null); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | Integer integer = jsonArray.getInteger(i); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("code", integer); |
| | | Optional<TRegion> first = tRegions.stream().filter(s->s.getCode().equals(integer.toString())).findFirst(); |
| | | if(first.isPresent()){ |
| | | TRegion tRegion = first.get(); |
| | | jsonObject.put("name", tRegion.getName()); |
| | | } |
| | | citys_list.add(jsonObject); |
| | | } |
| | | sysCouponRecord.setCitys(citys_list.toString()); |
| | | sysCouponRecordService.insert(sysCouponRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(SysCouponRecord sysCouponRecord) { |
| | | String citys = sysCouponRecord.getCitys(); |
| | | JSONArray jsonArray = JSON.parseArray(citys); |
| | | JSONArray citys_list = new JSONArray(); |
| | | List<TRegion> tRegions = tRegionService.selectList(null); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | Integer integer = jsonArray.getInteger(i); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("code", integer); |
| | | Optional<TRegion> first = tRegions.stream().filter(s->s.getCode().equals(integer.toString())).findFirst(); |
| | | if(first.isPresent()){ |
| | | TRegion tRegion = first.get(); |
| | | jsonObject.put("name", tRegion.getName()); |
| | | } |
| | | citys_list.add(jsonObject); |
| | | } |
| | | sysCouponRecord.setCitys(citys_list.toString()); |
| | | sysCouponRecordService.updateById(sysCouponRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.TOrderTaxi; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return |
| | | */ |
| | | Double getAllIncomeMoney(@Param("companyId") Integer companyId,@Param("beginTime") String beginTime,@Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 获取支付订单统计 |
| | | * @param page |
| | | * @param paymentCode |
| | | * @param orderCode |
| | | * @param userPhone |
| | | * @param driverPhone |
| | | * @param createTimeStart |
| | | * @param createTimeEnd |
| | | * @param paymentTimeStart |
| | | * @param paymentTimeEnd |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> paymentOrderStatisticsList(Page<Map<String, Object>> page, @Param("paymentCode") String paymentCode, |
| | | @Param("orderCode") String orderCode, @Param("userPhone") String userPhone, |
| | | @Param("driverPhone") String driverPhone, @Param("createTimeStart") String createTimeStart, |
| | | @Param("createTimeEnd") String createTimeEnd, @Param("paymentTimeStart") String paymentTimeStart, |
| | | @Param("paymentTimeEnd") String paymentTimeEnd); |
| | | |
| | | |
| | | /** |
| | | * 获取线下订单统计 |
| | | * @param page |
| | | * @param orderCode |
| | | * @param userPhone |
| | | * @param driverPhone |
| | | * @param createTimeStart |
| | | * @param createTimeEnd |
| | | * @param orderSource |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> offlineOrderStatisticsList(Page<Map<String, Object>> page, @Param("orderCode") String orderCode, |
| | | @Param("userPhone") String userPhone, @Param("driverPhone") String driverPhone, |
| | | @Param("createTimeStart") String createTimeStart, @Param("createTimeEnd") String createTimeEnd, |
| | | @Param("orderSource") Integer orderSource); |
| | | } |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="paymentOrderStatisticsList" resultType="map"> |
| | | select |
| | | a.id, |
| | | b.code as paymentCode, |
| | | a.orderNum, |
| | | c.phone as userPhone, |
| | | b.amount, |
| | | d.phone as driverPhone, |
| | | e.name as company, |
| | | f.money as income, |
| | | DATE_FORMAT(a.insertTime, '%Y-%m-%d %H:%i:%s') as insertTime, |
| | | DATE_FORMAT(b.insertTime, '%Y-%m-%d %H:%i:%s') as paymentTime |
| | | from t_order_taxi a |
| | | left join t_payment_record b on (a.id = b.orderId and b.orderType = 2 and b.state = 2) |
| | | left join t_user c on (a.userId = c.id) |
| | | left join t_driver d on (a.driverId = d.id) |
| | | left join t_company e on (d.companyId = e.id) |
| | | left join t_pub_transaction_details f on (a.id = f.orderId and f.orderType = 2 and f.userType = 2) |
| | | where a.state in (8, 9) and a.isDelete = 1 and a.payManner = 1 |
| | | <if test="null != paymentCode and '' != paymentCode"> |
| | | and b.code like CONCAT('%', #{paymentCode}, '%') |
| | | </if> |
| | | <if test="null != orderCode and '' != orderCode"> |
| | | and a.orderNum like CONCAT('%', #{orderCode}, '%') |
| | | </if> |
| | | <if test="null != userPhone and '' != userPhone"> |
| | | and c.phone like CONCAT('%', #{userPhone}, '%') |
| | | </if> |
| | | <if test="null != driverPhone and '' != driverPhone"> |
| | | and d.phone like CONCAT('%', #{driverPhone}, '%') |
| | | </if> |
| | | <if test="null != createTimeStart and '' != createTimeStart and null != createTimeEnd and '' != createTimeEnd"> |
| | | and a.insertTime between #{createTimeStart} and #{createTimeEnd} |
| | | </if> |
| | | <if test="null != paymentTimeStart and '' != paymentTimeStart and null != paymentTimeEnd and '' != paymentTimeEnd"> |
| | | and b.insertTime between #{paymentTimeStart} and #{paymentTimeEnd} |
| | | </if> |
| | | order by a.insertTime desc |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <select id="offlineOrderStatisticsList" resultType="map"> |
| | | select |
| | | a.id, |
| | | a.orderNum, |
| | | c.phone as userPhone, |
| | | d.phone as driverPhone, |
| | | e.name as company, |
| | | f.money as income, |
| | | DATE_FORMAT(a.insertTime, '%Y-%m-%d %H:%i:%s') as insertTime, |
| | | a.orderSource, |
| | | a.oldPeople, |
| | | a.payManner |
| | | from t_order_taxi a |
| | | left join t_user c on (a.userId = c.id) |
| | | left join t_driver d on (a.driverId = d.id) |
| | | left join t_company e on (d.companyId = e.id) |
| | | left join t_pub_transaction_details f on (a.id = f.orderId and f.orderType = 2 and f.userType = 2) |
| | | where a.state in (8, 9) and a.isDelete = 1 and (a.orderSource in (5, 6) or a.oldPeople = 1 or a.payManner = 2) |
| | | <if test="null != orderCode and '' != orderCode"> |
| | | and a.orderNum like CONCAT('%', #{orderCode}, '%') |
| | | </if> |
| | | <if test="null != userPhone and '' != userPhone"> |
| | | and c.phone like CONCAT('%', #{userPhone}, '%') |
| | | </if> |
| | | <if test="null != driverPhone and '' != driverPhone"> |
| | | and d.phone like CONCAT('%', #{driverPhone}, '%') |
| | | </if> |
| | | <if test="null != createTimeStart and '' != createTimeStart and null != createTimeEnd and '' != createTimeEnd"> |
| | | and a.insertTime between #{createTimeStart} and #{createTimeEnd} |
| | | </if> |
| | | <if test="null != orderSource and 1 == orderSource"> |
| | | and a.orderSource = 6 |
| | | </if> |
| | | <if test="null != orderSource and 2 == orderSource"> |
| | | and a.oldPeople = 1 |
| | | </if> |
| | | <if test="null != orderSource and 3 == orderSource"> |
| | | and a.payManner = 2 |
| | | </if> |
| | | <if test="null != orderSource and 4 == orderSource"> |
| | | and a.orderSource = 5 |
| | | </if> |
| | | order by a.insertTime desc |
| | | </select> |
| | | </mapper> |
| | |
| | | * 1=平台 2=分公司 3=加盟商 |
| | | */ |
| | | private Integer companyType; |
| | | /** |
| | | * 适用城市 |
| | | */ |
| | | private String citys; |
| | | |
| | | public Integer getCompanyType() { |
| | | return companyType; |
| | |
| | | public void setEffective(Integer effective) { |
| | | this.effective = effective; |
| | | } |
| | | |
| | | public String getCitys() { |
| | | return citys; |
| | | }public void setCitys(String citys) { |
| | | this.citys = citys; |
| | | } |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.TOrderTaxi; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.model.TOrderTaxi; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return |
| | | */ |
| | | Double getAllIncomeMoney(@Param("companyId") Integer companyId,@Param("beginTime") String beginTime,@Param("endTime") String endTime); |
| | | |
| | | |
| | | /** |
| | | * 获取支付订单统计数据 |
| | | * @param page |
| | | * @param paymentCode |
| | | * @param orderCode |
| | | * @param userPhone |
| | | * @param driverPhone |
| | | * @param createTime |
| | | * @param paymentTime |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> paymentOrderStatisticsList(Page<Map<String, Object>> page, String paymentCode, String orderCode, String userPhone, |
| | | String driverPhone, String createTime, String paymentTime); |
| | | |
| | | |
| | | /** |
| | | * 获取线下订单统计数据 |
| | | * @param page |
| | | * @param orderCode |
| | | * @param userPhone |
| | | * @param driverPhone |
| | | * @param createTime |
| | | * @param orderSource |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> offlineOrderStatisticsList(Page<Map<String, Object>> page, String orderCode, String userPhone, String driverPhone, |
| | | String createTime, Integer orderSource); |
| | | |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.TOrderPosition; |
| | | import com.stylefeng.guns.modular.system.model.TOrderTaxi; |
| | | import com.stylefeng.guns.modular.system.dao.TOrderTaxiMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderTaxiService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.TOrderTaxiMapper; |
| | | import com.stylefeng.guns.modular.system.model.TOrderTaxi; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderTaxiService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | public Double getAllIncomeMoney(Integer companyId, String beginTime, String endTime) { |
| | | return this.baseMapper.getAllIncomeMoney(companyId, beginTime, endTime); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取支付订单统计数据 |
| | | * @param page |
| | | * @param paymentCode |
| | | * @param orderCode |
| | | * @param userPhone |
| | | * @param driverPhone |
| | | * @param createTime |
| | | * @param paymentTime |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> paymentOrderStatisticsList(Page<Map<String, Object>> page, String paymentCode, String orderCode, String userPhone, String driverPhone, String createTime, String paymentTime) { |
| | | String createTimeStart = null; |
| | | String createTimeEnd = null; |
| | | String paymentTimeStart = null; |
| | | String paymentTimeEnd = null; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | createTimeStart = split[0]; |
| | | createTimeEnd = split[1]; |
| | | } |
| | | if(ToolUtil.isNotEmpty(paymentTime)){ |
| | | String[] split = paymentTime.split(" - "); |
| | | paymentTimeStart = split[0]; |
| | | paymentTimeEnd = split[1]; |
| | | } |
| | | return this.baseMapper.paymentOrderStatisticsList(page, paymentCode, orderCode, userPhone, driverPhone, createTimeStart, createTimeEnd, paymentTimeStart, paymentTimeEnd); |
| | | } |
| | | |
| | | /** |
| | | * 获取线下订单统计数据 |
| | | * @param page |
| | | * @param orderCode |
| | | * @param userPhone |
| | | * @param driverPhone |
| | | * @param createTime |
| | | * @param orderSource |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String, Object>> offlineOrderStatisticsList(Page<Map<String, Object>> page, String orderCode, String userPhone, String driverPhone, String createTime, Integer orderSource) { |
| | | String createTimeStart = null; |
| | | String createTimeEnd = null; |
| | | if(ToolUtil.isNotEmpty(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | createTimeStart = split[0]; |
| | | createTimeEnd = split[1]; |
| | | } |
| | | List<Map<String, Object>> list = this.baseMapper.offlineOrderStatisticsList(page, orderCode, userPhone, driverPhone, createTimeStart, createTimeEnd, orderSource); |
| | | for (Map<String, Object> map : list) { |
| | | Integer orderSource1 = null; |
| | | if(null != map.get("orderSource")){ |
| | | orderSource1 = Integer.valueOf(map.get("orderSource").toString()); |
| | | } |
| | | Integer oldPeople = null; |
| | | if(null != map.get("oldPeople")){ |
| | | oldPeople = Integer.valueOf(map.get("oldPeople").toString()); |
| | | } |
| | | Integer payManner = null; |
| | | if(null != map.get("payManner")){ |
| | | payManner = Integer.valueOf(map.get("payManner").toString()); |
| | | } |
| | | if(6 == orderSource1){ |
| | | map.put("orderSource", "电话订单"); |
| | | }else if(5 == orderSource1){ |
| | | map.put("orderSource", "平台下单"); |
| | | }else if(1 == oldPeople){ |
| | | map.put("orderSource", "一键下单"); |
| | | }else if(2 == payManner){ |
| | | map.put("orderSource", "普通订单-打表计费"); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | } |
| | |
| | | # password: XianNing@2024! |
| | | # db-name: guns #用来搜集数据库的所有表 |
| | | # filters: wall,mergeStat |
| | | url: jdbc:mysql://127.0.0.1:3306/xianning?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true |
| | | url: jdbc:mysql://127.0.0.1:3306/xianning_1?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: 123456 |
| | | # db-name: guns #用来搜集数据库的所有表 |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>线下订单统计</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="orderCode" name="订单号" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="userPhone" name="支付用户手机号" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="driverPhone" name="接单司机手机号" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="createTime" name="下单时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="orderSource" name="打车方式" > |
| | | <option value="">全部</option> |
| | | <option value="1">电话订单</option> |
| | | <option value="2">一键下单</option> |
| | | <option value="3">普通订单-打表计费</option> |
| | | <option value="4">平台下单</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="OfflineOrderStatistics.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="OfflineOrderStatistics.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="OfflineOrderStatisticsTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/offlineOrderStatistics/export")){ |
| | | <#button name="导出" icon="" clickFun="OfflineOrderStatistics.export()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="OfflineOrderStatisticsTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/financialStatement/offlineOrderStatistics/offlineOrderStatistics.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,type: 'date' |
| | | ,range: true |
| | | ,format: 'yyyy-MM-dd' |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>支付订单统计</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="paymentCode" name="支付流水号"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="orderCode" name="订单号" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="userPhone" name="支付用户手机号" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="driverPhone" name="接单司机手机号" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="createTime" name="下单时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="paymentTime" name="支付时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="PaymentOrderStatistics.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="PaymentOrderStatistics.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="PaymentOrderStatisticsTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/paymentOrderStatistics/export")){ |
| | | <#button name="导出" icon="" clickFun="PaymentOrderStatistics.export()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="PaymentOrderStatisticsTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/financialStatement/paymentOrderStatistics/paymentOrderStatistics.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,type: 'date' |
| | | ,range: true |
| | | ,format: 'yyyy-MM-dd' |
| | | }); |
| | | |
| | | laydate.render({ |
| | | elem: '#paymentTime' |
| | | ,type: 'date' |
| | | ,range: true |
| | | ,format: 'yyyy-MM-dd' |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | <input class="form-control" id="fullMoney" name="fullMoney" > |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">适用城市:</label> |
| | | <div class="col-sm-2"> |
| | | <select class="form-control" id="province" onchange="SysCouponRecordInfoDlg.provinceChange(this)"> |
| | | <option value="">选择省</option> |
| | | @for(obj in provinceList){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <select class="form-control" id="city" onchange="SysCouponRecordInfoDlg.cityChage(this)"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <select class="form-control" id="area"> |
| | | <option value="">选择区</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <#button btnCss="info" name="添加" id="ensure" icon="fa-check" clickFun="SysCouponRecordInfoDlg.addScope()"/> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label"></label> |
| | | <div class="col-sm-9"> |
| | | <div style="height: 200px; border: 1px solid #e5e6e7;overflow-y: auto;"> |
| | | <table class="table table-striped table-bordered table-hover table-condensed"> |
| | | <thead> |
| | | <tr> |
| | | <th style="width: 300px;">城市</th> |
| | | <th style="width: 200px;">操作</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody id="conn"> |
| | | |
| | | </tbody> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var OfflineOrderStatistics = { |
| | | id: "OfflineOrderStatisticsTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | OfflineOrderStatistics.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '订单号', field: 'orderNum', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户手机号', field: 'userPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '打车方式', field: 'orderSource', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '接单司机手机号', field: 'driverPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '司机所属机构', field: 'company', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '扣除司机抽成', field: 'income', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '下单时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | return '<a onclick="OfflineOrderStatistics.openOfflineOrderStatisticsDetail(' + value + ')" style="color: blue;">订单详情</a>'; |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | OfflineOrderStatistics.check = function (type) { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | //验证类型null删除,1=审核,2=编辑,3=启动/暂停 |
| | | if(type==null){ |
| | | OfflineOrderStatistics.seItem = selected[0]; |
| | | return true; |
| | | }else if(type==3 && selected[0].status!=3 && selected[0].status!=4){ |
| | | Feng.info("当前状态不能暂停/启动!"); |
| | | return false; |
| | | }else if(type==3 && selected[0].status==3 && (selected[0].startTime>new Date() || new Date()>selected[0].endTime)){ |
| | | Feng.info("当前状态不能暂停/启动!"); |
| | | return false; |
| | | }else if(type==1 && selected[0].status!=1){ |
| | | Feng.info("当前状态不能审核!"); |
| | | return false; |
| | | }else if(type==2 && selected[0].status!=2){ |
| | | Feng.info("当前状态不能编辑!"); |
| | | return false; |
| | | } |
| | | OfflineOrderStatistics.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | OfflineOrderStatistics.openOfflineOrderStatisticsDetail = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '出租车订单详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrderTaxi/tOrderTaxi_update/' + TOrderTaxi.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | OfflineOrderStatistics.export = function (){ |
| | | let orderCode = $("#orderCode").val(); |
| | | let userPhone = $("#userPhone").val(); |
| | | let driverPhone = $("#driverPhone").val(); |
| | | let createTime = $("#createTime").val(); |
| | | let orderSource = $("#orderSource").val(); |
| | | window.location.href = Feng.ctxPath + '/financialStatement/offlineOrderStatisticsList_export?orderCode=' + orderCode + |
| | | "&userPhone=" + userPhone + "&driverPhone=" + driverPhone + "&createTime=" + createTime + "&orderSource=" + orderSource |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | OfflineOrderStatistics.search = function () { |
| | | var queryData = {}; |
| | | queryData['orderCode'] = $("#orderCode").val(); |
| | | queryData['userPhone'] = $("#userPhone").val(); |
| | | queryData['driverPhone'] = $("#driverPhone").val(); |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | queryData['orderSource'] = $("#orderSource").val(); |
| | | OfflineOrderStatistics.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | |
| | | OfflineOrderStatistics.resetSearch = function () { |
| | | $("#orderCode").val(""); |
| | | $("#userPhone").val(""); |
| | | $("#driverPhone").val(""); |
| | | $("#createTime").val(""); |
| | | $("#orderSource").val(""); |
| | | OfflineOrderStatistics.search(); |
| | | }; |
| | | |
| | | |
| | | $(function () { |
| | | var defaultColunms = OfflineOrderStatistics.initColumn(); |
| | | var table = new BSTable(OfflineOrderStatistics.id, "/financialStatement/offlineOrderStatisticsList", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | OfflineOrderStatistics.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var PaymentOrderStatistics = { |
| | | id: "PaymentOrderStatisticsTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | PaymentOrderStatistics.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '支付流水号', field: 'paymentCode', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单号', field: 'orderNum', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付用户手机号', field: 'userPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付金额', field: 'amount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '接单司机手机号', field: 'driverPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '司机所属机构', field: 'company', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '扣除司机抽成', field: 'income', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '下单时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付时间', field: 'paymentTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', field: 'id', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | return '<a onclick="PaymentOrderStatistics.openPaymentOrderStatisticsDetail(' + value + ')" style="color: blue;">订单详情</a>'; |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | PaymentOrderStatistics.check = function (type) { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | //验证类型null删除,1=审核,2=编辑,3=启动/暂停 |
| | | if(type==null){ |
| | | PaymentOrderStatistics.seItem = selected[0]; |
| | | return true; |
| | | }else if(type==3 && selected[0].status!=3 && selected[0].status!=4){ |
| | | Feng.info("当前状态不能暂停/启动!"); |
| | | return false; |
| | | }else if(type==3 && selected[0].status==3 && (selected[0].startTime>new Date() || new Date()>selected[0].endTime)){ |
| | | Feng.info("当前状态不能暂停/启动!"); |
| | | return false; |
| | | }else if(type==1 && selected[0].status!=1){ |
| | | Feng.info("当前状态不能审核!"); |
| | | return false; |
| | | }else if(type==2 && selected[0].status!=2){ |
| | | Feng.info("当前状态不能编辑!"); |
| | | return false; |
| | | } |
| | | PaymentOrderStatistics.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | PaymentOrderStatistics.openPaymentOrderStatisticsDetail = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '出租车订单详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrderTaxi/tOrderTaxi_update/' + TOrderTaxi.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | PaymentOrderStatistics.export = function (){ |
| | | let paymentCode = $("#paymentCode").val(); |
| | | let orderCode = $("#orderCode").val(); |
| | | let userPhone = $("#userPhone").val(); |
| | | let driverPhone = $("#driverPhone").val(); |
| | | let createTime = $("#createTime").val(); |
| | | let paymentTime = $("#paymentTime").val(); |
| | | window.location.href = Feng.ctxPath + '/financialStatement/paymentOrderStatisticsList_export?paymentCode=' + paymentCode + "&orderCode=" + orderCode + |
| | | "&userPhone=" + userPhone + "&driverPhone=" + driverPhone + "&createTime=" + createTime + "&paymentTime=" + paymentTime |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | PaymentOrderStatistics.search = function () { |
| | | var queryData = {}; |
| | | queryData['paymentCode'] = $("#paymentCode").val(); |
| | | queryData['orderCode'] = $("#orderCode").val(); |
| | | queryData['userPhone'] = $("#userPhone").val(); |
| | | queryData['driverPhone'] = $("#driverPhone").val(); |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | queryData['paymentTime'] = $("#paymentTime").val(); |
| | | PaymentOrderStatistics.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | |
| | | PaymentOrderStatistics.resetSearch = function () { |
| | | $("#paymentCode").val(""); |
| | | $("#orderCode").val(""); |
| | | $("#userPhone").val(""); |
| | | $("#driverPhone").val(""); |
| | | $("#createTime").val(""); |
| | | $("#paymentTime").val(""); |
| | | PaymentOrderStatistics.search(); |
| | | }; |
| | | |
| | | |
| | | $(function () { |
| | | var defaultColunms = PaymentOrderStatistics.initColumn(); |
| | | var table = new BSTable(PaymentOrderStatistics.id, "/financialStatement/paymentOrderStatisticsList", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | PaymentOrderStatistics.table = table.init(); |
| | | }); |
| | |
| | | return ""; |
| | | } |
| | | } |
| | | }, |
| | | {title: '适用城市', field: 'citys', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if(null != value && '' != value){ |
| | | let cityList = JSON.parse(value); |
| | | var names = ""; |
| | | for (let i = 0; i < cityList.length; i++) { |
| | | names += cityList[i].name + ","; |
| | | } |
| | | return '' == names ? names : names.substring(0, names.length - 1); |
| | | } |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | |
| | | Feng.info("金额最多不能超过4位数"); |
| | | return; |
| | | } |
| | | var subArr=[]; |
| | | $(".timeClass").each(function () { |
| | | subArr.push($(this).find("input[name*='code']").val()) |
| | | }); |
| | | if(subArr.length <= 0){ |
| | | Feng.error("请选择适用城市"); |
| | | return; |
| | | } |
| | | this.sysCouponRecordInfoData.citys = JSON.stringify(subArr); |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/sysCouponRecord/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | //省改变 |
| | | SysCouponRecordInfoDlg.provinceChange = function (e) { |
| | | var provinceCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#city").empty().append(content); |
| | | $("#area").empty().append('<option value="">选择区</option>'); |
| | | } |
| | | }); |
| | | ajax.set("code",provinceCode); |
| | | ajax.start(); |
| | | } |
| | | //市改变 |
| | | SysCouponRecordInfoDlg.cityChage = function (e) { |
| | | var cityCode=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择区</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#area").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("code",cityCode); |
| | | ajax.start(); |
| | | } |
| | | //添加区域 |
| | | SysCouponRecordInfoDlg.addScope = function () { |
| | | var subCode = ''; |
| | | var area = $("#area").val(); |
| | | if(null == area || '' == area){ |
| | | var city = $("#city").val(); |
| | | if(null == city || '' == city){ |
| | | var province = $("#province").val(); |
| | | subCode = province; |
| | | }else{ |
| | | subCode = city; |
| | | } |
| | | }else{ |
| | | subCode = area; |
| | | } |
| | | |
| | | if ("" == subCode){ |
| | | Feng.info("请选择适用城市"); |
| | | return; |
| | | } |
| | | var subArr=[]; |
| | | $(".timeClass").each(function () { |
| | | subArr.push($(this).find("input[name*='code']").val()) |
| | | }); |
| | | for(var i=0;i<subArr.length;i++){ |
| | | var code = subArr[i]; |
| | | if (subCode == code) { |
| | | Feng.info("适用城市已存在,请重新选择"); |
| | | return; |
| | | } |
| | | } |
| | | var provinceValue = $("#province option:selected").text(); |
| | | var cityValue = ""; |
| | | if (city != ""){ |
| | | cityValue = $("#city option:selected").text(); |
| | | } |
| | | var areaValue = ""; |
| | | if (area != ""){ |
| | | areaValue = $("#area option:selected").text(); |
| | | } |
| | | |
| | | var str = '<tr class="timeClass"><td>' + |
| | | '<input type="hidden" id="code" name="code" value="'+subCode+'">'+provinceValue+cityValue+areaValue+'</td>' + |
| | | '<td><button onclick="deleteSub(this)">移除</button></td></tr>'; |
| | | $("#conn").append(str); |
| | | } |
| | | |
| | | function deleteSub(e) { |
| | | $(e).parent().parent().remove(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | |
| | | var subArr=[]; |
| | | $(".timeClass").each(function () { |
| | | subArr.push($(this).find("input[name*='code']").val()) |
| | | }); |
| | | if(subArr.length <= 0){ |
| | | Feng.error("请选择适用城市"); |
| | | return; |
| | | } |
| | | this.sysCouponRecordInfoData.citys = JSON.stringify(subArr); |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/sysCouponRecord/update", function(data){ |
| | | Feng.success("修改成功!"); |