| | |
| | | int count = tAgentService.selectCount(new EntityWrapper<TAgent>().eq("provinceName", split1[0]).eq("cityName",split1[1])); |
| | | if(count>0){ |
| | | return new SuccessTip(500,"该代理商已存在!"); |
| | | |
| | | } |
| | | |
| | | tAgent.setPrincipal(tAgent.getPrincipal().replace(" ","")); |
| | | |
| | | |
| | | String[] split = tAgent.getAreaId().split("/"); |
| | | // 查询省市 |
| | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TAgent tAgent) { |
| | | tAgent.setPrincipal(tAgent.getPrincipal().replace(" ","")); |
| | | tAgentService.updateById(tAgent); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | if(Objects.nonNull(o)){ |
| | | return o; |
| | | } |
| | | tBranchOffice.setPrincipal(tBranchOffice.getPrincipal().replace(" ","")); |
| | | tBranchOffice.setStatus(StatusEnum.NORMAL.getCode()); |
| | | |
| | | tBranchOfficeService.insert(tBranchOffice); |
| | |
| | | if(Objects.nonNull(o)){ |
| | | return o; |
| | | } |
| | | tBranchOffice.setPrincipal(tBranchOffice.getPrincipal().replace(" ","")); |
| | | tBranchOfficeService.updateById(tBranchOffice); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @RequestMapping("/auditPage") |
| | | public String auditPage( Integer id, |
| | | Model model) { |
| | | public String auditPage( Integer id,Model model) { |
| | | tDriverService.auditPage(id,model); |
| | | return PREFIX + "tDriverAudit.html"; |
| | | } |
| | |
| | | return o; |
| | | } |
| | | // 默认值板块 |
| | | tDriver.setName(tDriver.getName().replace(" ","")); |
| | | tDriver.setEmergencyContact(tDriver.getEmergencyContact().replace(" ","")); |
| | | tDriver.setCode(UUIDUtil.getNumberRandom(16)); |
| | | tDriver.setBalance(BigDecimal.ZERO); |
| | | tDriver.setBackgroundBalance(BigDecimal.ZERO); |
| | |
| | | if(Objects.nonNull(o)){ |
| | | return o; |
| | | } |
| | | tDriver.setName(tDriver.getName().replace(" ","")); |
| | | tDriver.setEmergencyContact(tDriver.getEmergencyContact().replace(" ","")); |
| | | tDriverService.updateById(tDriver); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | .eq("agentId", agentId) |
| | | .eq("serverStatus", 2)); |
| | | map.put("onLineDriverCount",onLineDriver.size()); |
| | | tOrderService.getDataStatisticsCountGetMap(agentId,map); |
| | | // tOrderService.getDataStatisticsCountGetMap(agentId,map); |
| | | // // 查询服务中的订单列表 |
| | | // List<TOrderServerResp> orderServerRespList = tOrderService.getDataStatisticsServerList(agentId); |
| | | // // 查询司机 |
| | | // for (TOrderServerResp tOrderServerResp : orderServerRespList) { |
| | | // TDriver tDriver = tDriverService.selectById(tOrderServerResp.getDriverId()); |
| | | // tOrderServerResp.setAvatar(tDriver.getAvatar()); |
| | | // tOrderServerResp.setDriverName(tDriver.getName()); |
| | | // } |
| | | // map.put("serverList",orderServerRespList); |
| | | List<TAgent> tAgentAllList = tAgentService.selectList(new EntityWrapper<TAgent>()); |
| | | List<Integer> allIds = tAgentAllList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | tOrderService.getDataStatisticsCountByIdsGetMap(allIds,map); |
| | | |
| | | // 查询服务中的订单列表 |
| | | List<TOrderServerResp> orderServerRespList = tOrderService.getDataStatisticsServerList(agentId); |
| | | List<TOrderServerResp> orderServerRespList = tOrderService.getDataStatisticsServerListByIds(allIds); |
| | | // 查询司机 |
| | | for (TOrderServerResp tOrderServerResp : orderServerRespList) { |
| | | TDriver tDriver = tDriverService.selectById(tOrderServerResp.getDriverId()); |
| | |
| | | |
| | | EntityWrapper<TOrder> wrapper = new EntityWrapper<>(); |
| | | if(Objects.nonNull(userId)){ |
| | | wrapper.eq("user_id",userId); |
| | | wrapper.eq("userId",userId); |
| | | } |
| | | List<TOrder> tOrders = tOrderService.selectList(wrapper); |
| | | for (TOrder tOrder : tOrders) { |
| | |
| | | public Object list(String condition) { |
| | | EntityWrapper<TOrderRefusal> wrapper = new EntityWrapper<>(); |
| | | if(StringUtils.hasLength(condition)){ |
| | | wrapper.eq("order_id",condition); |
| | | wrapper.eq("driver_id",condition); |
| | | } |
| | | return tOrderRefusalService.selectList(wrapper); |
| | | } |
| | |
| | | AND b.billType = #{billType} |
| | | </if> |
| | | <if test="billHeaderType != null"> |
| | | AND b.billHeaderType = #{addresseePhone} |
| | | AND b.billHeaderType = #{billHeaderType} |
| | | </if> |
| | | <if test="roleType != null and roleType == 2"> |
| | | AND o.branchOfficeId = #{objectId} |
| | |
| | | <if test="driverName != null and driverName != ''"> |
| | | AND d.name LIKE concat('%',#{driverName},'%') |
| | | </if> |
| | | <if test="isException != null"> |
| | | AND a.is_exception = #{isException} |
| | | </if> |
| | | <if test="roleType != null and roleType == 2"> |
| | | AND o.branchOfficeId = #{objectId} |
| | | </if> |
| | |
| | | @Autowired |
| | | private TRegionMapper tRegionMapper; |
| | | @Autowired |
| | | private TRevenueMapper tRevenueMapper; |
| | | @Autowired |
| | | private ITRegionService itRegionService; |
| | | @Autowired |
| | | private HttpUtils httpUtils; |
| | |
| | | } |
| | | //累计订单量 |
| | | List<TOrder> cumulativeOrderCount = tOrders.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) |
| | | && order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) && order.getState().equals(OrderStateEnum.FINISH.getCode())).collect(Collectors.toList()); |
| | | && (order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) || order.getState().equals(OrderStateEnum.FINISH.getCode()))).collect(Collectors.toList()); |
| | | tDriverResp.setCumulativeOrderCount(cumulativeOrderCount.size()); |
| | | //当月订单量 |
| | | List<TOrder> monthOrderCount = tOrders.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) |
| | | && order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) && order.getState().equals(OrderStateEnum.FINISH.getCode()) |
| | | && (order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) || order.getState().equals(OrderStateEnum.FINISH.getCode())) |
| | | && new SimpleDateFormat("yyyyMM").format(order.getCreateTime()).equals(monthDate)).collect(Collectors.toList()); |
| | | tDriverResp.setMonthOrderCount(monthOrderCount.size()); |
| | | // 拒单次数 |
| | |
| | | if(!CollectionUtils.isEmpty(tOrders)){ |
| | | //累计订单量 |
| | | List<TOrder> cumulativeOrderCount = tOrders.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) |
| | | && order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) && order.getState().equals(OrderStateEnum.FINISH.getCode())).collect(Collectors.toList()); |
| | | && (order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) || order.getState().equals(OrderStateEnum.FINISH.getCode()))).collect(Collectors.toList()); |
| | | model.addAttribute("cumulativeOrderCount",cumulativeOrderCount.size()); |
| | | //当月订单量 |
| | | List<TOrder> monthOrderCount = tOrders.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) |
| | | && order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) && order.getState().equals(OrderStateEnum.FINISH.getCode()) |
| | | && (order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) || order.getState().equals(OrderStateEnum.FINISH.getCode())) |
| | | && new SimpleDateFormat("yyyyMM").format(order.getCreateTime()).equals(monthDate)).collect(Collectors.toList()); |
| | | model.addAttribute("monthOrderCount",monthOrderCount.size()); |
| | | // 拒单次数 |
| | |
| | | .eq("userDriverId", tDriver.getId()) |
| | | .eq("state", 2)); |
| | | BigDecimal balance = tDriver.getBalance(); |
| | | if(!CollectionUtils.isEmpty(tCashWithdrawals)){ |
| | | Optional<BigDecimal> reduce = tCashWithdrawals.stream().map(TCashWithdrawal::getAmount).reduce(BigDecimal::add); |
| | | if(reduce.isPresent()){ |
| | | balance = balance.add(reduce.get()); |
| | | } |
| | | } |
| | | List<TRechargeRecord> tRechargeRecords = tRechargeRecordMapper.selectList(new EntityWrapper<TRechargeRecord>() |
| | | .eq("type", UserTypeEnum.DRIVER.getCode()) |
| | | .eq("userId", tDriver.getId()) |
| | | .eq("payType", 1) |
| | | .eq("payStatus", PayStatusEnum.FINISH.getCode())); |
| | | if(!CollectionUtils.isEmpty(tRechargeRecords)){ |
| | | Optional<BigDecimal> reduce = tRechargeRecords.stream().map(TRechargeRecord::getAmount).reduce(BigDecimal::add); |
| | | if(reduce.isPresent()){ |
| | | balance = balance.subtract(reduce.get()); |
| | | } |
| | | } |
| | | // if(!CollectionUtils.isEmpty(tCashWithdrawals)){ |
| | | // Optional<BigDecimal> reduce = tCashWithdrawals.stream().map(TCashWithdrawal::getAmount).reduce(BigDecimal::add); |
| | | // if(reduce.isPresent()){ |
| | | // balance = balance.add(reduce.get()); |
| | | // } |
| | | // } |
| | | // List<TRechargeRecord> tRechargeRecords = tRechargeRecordMapper.selectList(new EntityWrapper<TRechargeRecord>() |
| | | // .eq("type", UserTypeEnum.DRIVER.getCode()) |
| | | // .eq("userId", tDriver.getId()) |
| | | // .eq("payType", 1) |
| | | // .eq("payStatus", PayStatusEnum.FINISH.getCode())); |
| | | // if(!CollectionUtils.isEmpty(tRechargeRecords)){ |
| | | // Optional<BigDecimal> reduce = tRechargeRecords.stream().map(TRechargeRecord::getAmount).reduce(BigDecimal::add); |
| | | // if(reduce.isPresent()){ |
| | | // balance = balance.subtract(reduce.get()); |
| | | // } |
| | | // } |
| | | List<TRevenue> tRevenues = tRevenueMapper.selectList(new EntityWrapper<TRevenue>() |
| | | .eq("userType", 2) |
| | | .eq("userId", tDriver.getId())); |
| | | Optional<BigDecimal> reduce = tRevenues.stream().map(TRevenue::getAmount).reduce(BigDecimal::add); |
| | | // 减去充值金额 |
| | | model.addAttribute("cumulativeIncome",balance); |
| | | reduce.ifPresent(bigDecimal -> model.addAttribute("cumulativeIncome", bigDecimal)); |
| | | }else { |
| | | model.addAttribute("cumulativeOrderCount",0); |
| | | model.addAttribute("monthOrderCount",0); |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: local |
| | | active: produce |
| | | mvc: |
| | | static-path-pattern: /static/** |
| | | view: |
| | |
| | | spring: |
| | | profiles: local |
| | | datasource: |
| | | url: jdbc:mysql://127.0.0.1:3306/super_save_driving?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://192.168.110.80:3306/super_save_driving?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: f4OfRjqoN3jSiNGiUoiNsQdOBtCOKYRj |
| | | # password: 123456 |
| | | # password: f4OfRjqoN3jSiNGiUoiNsQdOBtCOKYRj |
| | | password: 123456 |
| | | db-name: super_save_driving #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | |
| | | spring: |
| | | profiles: produce |
| | | datasource: |
| | | url: jdbc:mysql://120.24.34.190:3306/mask?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://127.0.0.1:3306/super_save_driving?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: Root2020! |
| | | db-name: mask #用来搜集数据库的所有表 |
| | | password: f4OfRjqoN3jSiNGiUoiNsQdOBtCOKYRj |
| | | db-name: super_save_driving #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | | --- |
| | |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="Role.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="Role.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="roleTableToolbar" role="group"> |
| | |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input hidden id="id" value="${id}"> |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | $(function (){ |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | queryData['userId'] = $("#id").val(); |
| | | TAppUserDetailOrderTable.table.refresh({query: queryData}); |
| | | }) |
| | | </script> |
| | | @} |
| | |
| | | <script type="text/javascript"> |
| | | $(function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#driverId").val();; |
| | | queryData['condition'] = $("#driverId").val(); |
| | | TOrderRefusal.table.refresh({query: queryData}); |
| | | }); |
| | | laydate.render({ |
| | |
| | | <#button name="重置" icon="fa-trash" clickFun="TEvaluate.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | @if(shiro.hasPermission("/tEvaluate/export")){ |
| | | <#button name="导出" icon="" clickFun="TEvaluate.export()"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TEvaluateTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tEvaluate/export")){ |
| | | <#button name="导出" icon="" clickFun="TEvaluate.export()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tEvaluate/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TEvaluate.openAddTEvaluate()"/> |
| | | @} |
| | |
| | | Role.table.refresh({query: queryData}); |
| | | } |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | Role.resetSearch = function (){ |
| | | $("#roleName").val(''); |
| | | Role.search(); |
| | | } |
| | | |
| | | $(function () { |
| | | var defaultColunms = Role.initColumn(); |
| | | var table = new BSTable(Role.id, "/role/list", defaultColunms); |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '负责人姓名不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[\u4E00-\u9FA5A-Za-z\s]+$/, |
| | | message: '不能输入特殊字符和数字' |
| | | } |
| | | } |
| | | }, |
| | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TAppUserDetailOrderTable.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TAppUserDetailOrderTable.table.refresh({query: queryData}); |
| | | }; |
| | | // TAppUserDetailOrderTable.search = function () { |
| | | // var queryData = {}; |
| | | // queryData['condition'] = $("#condition").val(); |
| | | // TAppUserDetailOrderTable.table.refresh({query: queryData}); |
| | | // }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TAppUserDetailOrderTable.initColumn(); |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '负责人姓名不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[\u4E00-\u9FA5A-Za-z\s]+$/, |
| | | message: '不能输入特殊字符和数字' |
| | | } |
| | | } |
| | | }, |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '姓名不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[\u4E00-\u9FA5A-Za-z\s]+$/, |
| | | message: '不能输入特殊字符和数字' |
| | | } |
| | | } |
| | | }, |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '紧急联系人姓名不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[\u4E00-\u9FA5A-Za-z\s]+$/, |
| | | message: '不能输入特殊字符和数字' |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | } |
| | | }, |
| | | {title: '金额', field: 'amount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '佣金提成', field: 'commissionAmount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '金额', field: 'amount', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.businessType === 1){ |
| | | return '+'+row.amount |
| | | }else{ |
| | | return '-'+row.amount |
| | | } |
| | | } |
| | | }, |
| | | {title: '佣金抽成', field: 'commissionAmount', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.businessType === 1){ |
| | | if(row.commissionAmount !== 0){ |
| | | return '-'+row.commissionAmount |
| | | }else { |
| | | return 0 |
| | | } |
| | | }else { |
| | | return '' |
| | | } |
| | | } |
| | | }, |
| | | {title: '优惠券', field: 'discountedPrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '余额', field: 'accountBalance', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | if (row.businessType === 1){ |
| | | return '<a href="#" onclick="TRevenue.searchTRevenueOrderDetail('+row.code+')" style="color:blue">详情</a>' |
| | | return '<a href="#" onclick="TRevenue.searchTRevenueOrderDetail('+row.code.toString()+')" style="color:blue">详情</a>' |
| | | }else if (row.businessType === 11){ |
| | | return '<a href="#" onclick="TRevenue.searchTRevenueCommissionDetail('+row.code+')" style="color:blue">详情</a>' |
| | | return '<a href="#" onclick="TRevenue.searchTRevenueCommissionDetail('+row.code.toString()+')" style="color:blue">详情</a>' |
| | | }else if (row.businessType === 12){ |
| | | return '<a href="#" onclick="TRevenue.searchTRevenueBalanceDetail('+row.code+')" style="color:blue">详情</a>' |
| | | return '<a href="#" onclick="TRevenue.searchTRevenueBalanceDetail('+row.code.toString()+')" style="color:blue">详情</a>' |
| | | } |
| | | } |
| | | } |
| | |
| | | * 打开查看支付订单详情(使用中) |
| | | */ |
| | | TRevenue.searchTRevenueOrderDetail = function (code) { |
| | | console.log(code) |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '支付订单详情', |