| | |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import com.stylefeng.guns.modular.system.model.TSystemNotice; |
| | | import com.stylefeng.guns.modular.system.model.TWithdrawal; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemNoticeService; |
| | | import com.stylefeng.guns.modular.system.service.ITWithdrawalService; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import com.stylefeng.guns.modular.system.model.TPubWithdrawal; |
| | | import com.stylefeng.guns.modular.system.service.ITPubWithdrawalService; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | |
| | | |
| | | @Autowired |
| | | private ITPubWithdrawalService tPubWithdrawalService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService tSystemNoticeService; |
| | |
| | | model.addAttribute("str",str); |
| | | return "/system/tComplaint/lookDetail.html"; |
| | | } |
| | | |
| | | @Autowired |
| | | private ITWithdrawalService withdrawalService; |
| | | /** |
| | | * 跳转到立即处理页面 |
| | | */ |
| | | @RequestMapping("/tPubWithdrawal_immediately/{tPubWithdrawalId}") |
| | | public String tPubWithdrawalUpdate(@PathVariable Integer tPubWithdrawalId, Model model) { |
| | | model.addAttribute("tPubWithdrawalId",tPubWithdrawalId); |
| | | return PREFIX + "tPubWithdrawal_immediately.html"; |
| | | TWithdrawal tWithdrawal = withdrawalService.selectById(tPubWithdrawalId); |
| | | tWithdrawal.setWithdrawalTimeStr(new SimpleDateFormat("yyyy-MM-dd HH:mm").format(tWithdrawal.getWithdrawalTime())); |
| | | tWithdrawal.setWithdrawalTypeStr(tWithdrawal.getWithdrawalType()==1?"支付宝":"银行卡"); |
| | | model.addAttribute("item",tWithdrawal); |
| | | LogObjectHolder.me().set(tWithdrawal); |
| | | if(tWithdrawal.getStatus() == 1){ |
| | | return PREFIX + "tWithdrawal_edit.html"; |
| | | }else { |
| | | return PREFIX + "tWithdrawal_detail.html"; |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String name, |
| | | Integer withdrawalType) { |
| | | Integer status) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tPubWithdrawalService.getWithdrawalList(page,beginTime,endTime,name,withdrawalType)); |
| | | page.setRecords(tPubWithdrawalService.getWithdrawalList(page,beginTime,endTime,name,status)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | List<Map<String, Object>> list = withdrawalService.excel(beginTime, endTime, driverName, status); |
| | | List<Map<String, Object>> list = withdrawalService.excel1(beginTime, endTime, driverName, status); |
| | | try { |
| | | String fileName = "提现管理" + System.currentTimeMillis() + ".xls"; // 文件名 |
| | | String sheetName = "提现管理";// sheet名 |
| | |
| | | object = list.get(i); |
| | | values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm").format((Date) object.get("withdrawalTime")); |
| | | values[i][1] = object.get("driverName").toString(); |
| | | values[i][2] = (Integer)object.get("withdrawalType")==1?"支付宝": "银行卡"; |
| | | values[i][3] = (Integer)object.get("withdrawalType")==1? |
| | | "收款人:"+object.get("receivePaymentName").toString()+"/n"+"支付宝号:"+object.get("receivePaymentAccount").toString() |
| | | : "开户行:"+object.get("openBank").toString()+"/n"+"收款人:"+object.get("receivePaymentName").toString()+"/n"+"银行卡号:"+object.get("receivePaymentAccount").toString(); |
| | | values[i][2] = "银行卡"; |
| | | values[i][3] = "开户行:"+object.get("openBank").toString()+"/n"+"收款人:"+object.get("receivePaymentName").toString()+"/n"+"银行卡号:"+object.get("receivePaymentAccount").toString(); |
| | | values[i][4] = new BigDecimal(object.get("driverBalance").toString()).setScale(2, RoundingMode.HALF_UP).toString(); |
| | | values[i][5] = object.get("withdrawalMoney").toString(); |
| | | values[i][6] = object.get("driverPhone").toString(); |
| | |
| | | @Param("endTime")String endTime, |
| | | @Param("driverName")String driverName, |
| | | @Param("status")Integer status); |
| | | List<Map<String, Object>> excel1(@Param("beginTime")String beginTime, |
| | | @Param("endTime")String endTime, |
| | | @Param("driverName")String driverName, |
| | | @Param("status")Integer status); |
| | | |
| | | |
| | | } |
| | |
| | | <!--根据条件查询提现列表--> |
| | | <select id="getWithdrawalList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT |
| | | case when pw.userType = 1 then uu.nickName when pw.userType = 2 then dd.`name` else '' end as userName, |
| | | case when pw.userType = 1 then uu.phone when pw.userType = 2 then dd.phone else '' end as userPhone, |
| | | dd.`name`as userName, |
| | | dd.phone as userPhone, |
| | | dd.balance as balance, |
| | | pw.* |
| | | FROM t_pub_withdrawal as pw |
| | | LEFT JOIN t_user as uu on uu.id = pw.userId |
| | | LEFT JOIN t_driver as dd on dd.id = pw.userId) as o |
| | | FROM t_withdrawal as pw |
| | | LEFT JOIN t_driver as dd on dd.id = pw.driverId) as o |
| | | <where> |
| | | o.flag != 3 |
| | | <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> |
| | | AND (o.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | AND (o.withdrawalTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and o.name LIKE CONCAT('%',#{name},'%') |
| | | and o.userName LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="withdrawalType != null and withdrawalType != ''"> |
| | | and o.withdrawalType = #{withdrawalType} |
| | | and o.status = #{withdrawalType} |
| | | </if> |
| | | </where> |
| | | order by o.id desc |
| | |
| | | </where> |
| | | order by t.withdrawalTime desc |
| | | </select> |
| | | |
| | | <select id="excel1" resultType="java.util.Map"> |
| | | select |
| | | t.id, |
| | | t.driverId, |
| | | t.receivePaymentName, |
| | | t.receivePaymentAccount, |
| | | t.withdrawalType, |
| | | t.withdrawalMoney, |
| | | t.withdrawalTime, |
| | | t.status, |
| | | t.openBank, |
| | | t.remark, |
| | | t.receiptVoucher, |
| | | d.name as driverName, |
| | | d.phone as driverPhone, |
| | | d.balance as driverBalance |
| | | from t_withdrawal t |
| | | left join t_driver d on t.driverId = d.id |
| | | <where> |
| | | <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> |
| | | and t.withdrawalTime >= CONCAT(#{beginTime},' 00:00:00') and t.withdrawalTime <= CONCAT(#{endTime},' 23:59:59') |
| | | </if> |
| | | <if test="driverName != null and driverName != ''"> |
| | | and d.name like concat('%',#{driverName},'%') |
| | | </if> |
| | | <if test="status != null"> |
| | | and t.status = #{status} |
| | | </if> |
| | | </where> |
| | | order by t.withdrawalTime desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | List<Map<String, Object>> getWithdrawalList(Page<Map<String, Object>> page, String beginTime, String endTime, String driverName, Integer status); |
| | | |
| | | List<Map<String, Object>> excel(String beginTime, String endTime, String driverName, Integer status); |
| | | List<Map<String, Object>> excel1(String beginTime, String endTime, String driverName, Integer status); |
| | | |
| | | } |
| | |
| | | public List<Map<String, Object>> excel(String beginTime, String endTime, String driverName, Integer status) { |
| | | return this.baseMapper.excel(beginTime, endTime, driverName, status); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> excel1(String beginTime, String endTime, String driverName, Integer status) { |
| | | return this.baseMapper.excel1(beginTime, endTime, driverName, status); |
| | | } |
| | | } |
| | |
| | | <#NameCon id="name" name="提现人" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="withdrawalType" name="提现方式" > |
| | | <option value="">全部</option> |
| | | <option value="1">银行卡</option> |
| | | <option value="2">线下</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <#SelectCon id="status" name="提现状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">待处理</option> |
| | | <option value="2">成功</option> |
| | | <option value="3">失败</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TPubWithdrawal.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TPubWithdrawal.resetSearch()" space="true"/> |
| | |
| | | @if(shiro.hasPermission("/tPubWithdrawal/immediately")){ |
| | | <#button name="立即处理" icon="fa-edit" clickFun="TPubWithdrawal.immediately()"/> |
| | | @} |
| | | <#button name="导出" icon="" clickFun="TPubWithdrawal.export()" space="true"/> |
| | | </div> |
| | | <#table id="TPubWithdrawalTable"/> |
| | | </div> |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="withdrawalInfoForm"> |
| | | <input type="hidden" id="id" name="id" value="${tPubWithdrawalId}"> |
| | | <div class="form-horizontal" id="siteInfoForm"> |
| | | <input type="hidden" id="id" name="id" value="${item.id}"> |
| | | <div class="row"> |
| | | <div class="col-sm-10"> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">处理意见:</label> |
| | | <div class="col-sm-9" style="display: flex;align-items: center;"> |
| | | <div class="radio radio-info radio-inline"> |
| | | <input type="radio" id="state2" value="2" name="state" checked="" > |
| | | <label for="state2"> 同意 </label> |
| | | </div> |
| | | <div class="radio radio-success radio-inline"> |
| | | <input type="radio" id="state3" value="3" name="state" > |
| | | <label for="state3"> 拒绝 </label> |
| | | </div> |
| | | </div> |
| | | <label class="col-sm-3 control-label">提现时间:</label> |
| | | <label class="control-label">${item.insertTimeString}</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">填写备注:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea type="text/plain" class="form-control" name="remark" id="remark" style="width:100%;height:150px;"></textarea> |
| | | <label class="col-sm-3 control-label">提现金额:</label> |
| | | <label class="control-label">¥${item.money}</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">提现方式:</label> |
| | | <label class="control-label">${item.withdrawalTypeString}</label> |
| | | </div> |
| | | @if(item.withdrawalType == 1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">收款人:</label> |
| | | <label class="control-label">${item.name}</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">银行卡账号:</label> |
| | | <label class="control-label">${item.name}</label> |
| | | </div> |
| | | @} |
| | | @if(item.withdrawalType == 1){ |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">开户行:</label> |
| | | <label class="control-label">${item.openBank}</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">收款人:</label> |
| | | <label class="control-label">${item.receivePaymentName}</label> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">收款账号:</label> |
| | | <label class="control-label">${item.receivePaymentAccount}</label> |
| | | </div> |
| | | @} |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">处理:</label> |
| | | <div class="form-group col-sm-2"> |
| | | <input type="radio" id="status1" name="status" value="2" checked="" onclick="TWithdrawalInfoDlg.statusClick(2)"> |
| | | <label for="status1">已转账</label><br> |
| | | </div> |
| | | <div class="form-group col-sm-2"> |
| | | <input type="radio" id="status2" name="status" value="3" onclick="TWithdrawalInfoDlg.statusClick(3)"> |
| | | <label for="status2">转账失败</label><br> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" id="success"> |
| | | <div class="form-group"> |
| | | <#avatar id="receiptVoucher" name="转账凭证:"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group" hidden id="fail"> |
| | | <label class="col-sm-3 control-label">备注:</label> |
| | | <div class="col-sm-6 control-label"> |
| | | <input type="text" class="form-control" id="remark" name="remark" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TPubWithdrawalInfoDlg.immediately()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TPubWithdrawalInfoDlg.close()"/> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TWithdrawalInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TWithdrawalInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tPubWithdrawal/tPubWithdrawal_info.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tWithdrawal/tWithdrawal.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tWithdrawal/tWithdrawal_info.js"></script> |
| | | @} |
| | |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '申请时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | {title: '申请时间', field: 'withdrawalTime', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.insertTime != '' && row.insertTime != null) { |
| | | var time = row.insertTime.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.insertTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] |
| | | if(row.withdrawalTime != '' && row.withdrawalTime != null) { |
| | | var time = row.withdrawalTime.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.withdrawalTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '提现人', field: 'name', visible: true, align: 'center', valign: 'middle', |
| | | {title: '提现人', field: 'userName', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.name != '' && row.name != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.name + '" onfocus="TUser.tooltip()">' + row.name + '</p>'] |
| | | if(row.userName != '' && row.userName != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userName + '" onfocus="TUser.tooltip()">' + row.userName + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | |
| | | {title: '账户余额', field: 'balance', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.money != '' && row.money != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.money + '" onfocus="TUser.tooltip()">' + row.money + '</p>'] |
| | | if(row.balance != '' && row.balance != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.balance + '" onfocus="TUser.tooltip()">' + row.balance + '</p>'] |
| | | }else if (row.withdrawalType == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="0" onfocus="TUser.tooltip()">0</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '提现金额', field: 'money', visible: true, align: 'center', valign: 'middle', |
| | | {title: '提现金额', field: 'withdrawalMoney', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.money != '' && row.money != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.money + '" onfocus="TUser.tooltip()">' + row.money + '</p>'] |
| | | if(row.withdrawalMoney != '' && row.withdrawalMoney != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.withdrawalMoney + '" onfocus="TUser.tooltip()">' + row.withdrawalMoney + '</p>'] |
| | | }else if (row.withdrawalType == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="0" onfocus="TUser.tooltip()">0</p>'] |
| | | } |
| | |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.state != '' && row.state != null) { |
| | | if(row.state == 1){ |
| | | if(row.status != '' && row.status != null) { |
| | | if(row.status == 1){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="待处理" onfocus="TUser.tooltip()">待处理</p>'] |
| | | }else if (row.state == 2){ |
| | | }else if (row.status == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已同意" onfocus="TUser.tooltip()">已同意</p>'] |
| | | }else if (row.state == 3){ |
| | | }else if (row.status == 3){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已拒绝" onfocus="TUser.tooltip()">已拒绝</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | { |
| | | title: '操作', visible: true, align: 'center', valign: 'middle', formatter: function (value, row, index) { |
| | | return '<button type="button" class="btn btn-primary button-margin" onclick="TPubWithdrawal.immediately1(' + row.id + ')" id=""><i class="fa fa-search"></i> 详情</button>'; } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 导出 |
| | | */ |
| | | TPubWithdrawal.export = function () { |
| | | window.location.href=Feng.ctxPath + "/withdrawal/excel?insertTime="+$("#insertTime").val()+ |
| | | "&driverName="+$("#name").val()+ |
| | | "&status="+$("#status").val(); |
| | | }; |
| | | /** |
| | | * 查看更多按钮 |
| | | * @param con |
| | |
| | | */ |
| | | TPubWithdrawal.immediately = function () { |
| | | if (this.check()) { |
| | | var state = TPubWithdrawal.seItem.state; |
| | | var state = TPubWithdrawal.seItem.status; |
| | | if (1 != state){ |
| | | swal("操作失败", "【待处理】状态下才能执行此操作", "warning"); |
| | | return; |
| | |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '立即处理', |
| | | area: ['800px', '420px'], //宽高 |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tPubWithdrawal/tPubWithdrawal_immediately/' + TPubWithdrawal.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | TPubWithdrawal.immediately1 = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '查看详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tPubWithdrawal/tPubWithdrawal_immediately/' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | |
| | | var queryData = {}; |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['withdrawalType'] = $("#withdrawalType").val(); |
| | | queryData['status'] = $("#status").val(); |
| | | TPubWithdrawal.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TPubWithdrawal.resetSearch = function () { |
| | | $("#insertTime").val(""); |
| | | $("#name").val(""); |
| | | $("#withdrawalType").val(""); |
| | | $("#status").val(""); |
| | | TPubWithdrawal.search(); |
| | | }; |
| | | |