Sfoglia il codice sorgente

Merge branch 'master' of hj/kmall-pt-general into master

Scott Chen 4 anni fa
parent
commit
e55207d31e

+ 175 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/MallPaymentOrderDataController.java

@@ -0,0 +1,175 @@
+package com.kmall.admin.controller;
+
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.util.*;
+
+import com.kmall.admin.dto.SystemFormatDto;
+import com.kmall.admin.dto.WxPaymentOrderDto;
+import com.kmall.admin.entity.BrandEntity;
+import com.kmall.admin.entity.MallPaymentOrderDataEntity;
+import com.kmall.admin.service.MallPaymentOrderDataService;
+import com.kmall.admin.utils.ParamUtils;
+import com.kmall.common.constant.Dict;
+import com.kmall.common.constant.JxlsXmlTemplateName;
+import com.kmall.common.utils.PageUtils;
+import com.kmall.common.utils.Query;
+import com.kmall.common.utils.R;
+import com.kmall.common.utils.RRException;
+import com.kmall.common.utils.excel.ExcelExport;
+import com.kmall.common.utils.excel.ExcelUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * 支付订单表Controller
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2021-04-22 14:54:43
+ */
+@Controller
+@RequestMapping("mallpaymentorderdata")
+public class MallPaymentOrderDataController {
+    @Autowired
+    private MallPaymentOrderDataService mall2PaymentOrderDataService;
+    @Autowired
+    private ExcelUtil excelUtil;
+
+    /**
+     * 查看列表
+     */
+    @RequestMapping("/list")
+    @RequiresPermissions("mallpaymentorderdata:list")
+    @ResponseBody
+    public R list(@RequestParam Map<String, Object> params) {
+
+        //处理时间格式问题
+        params = ParamUtils.setTimeMap(params);
+        //查询列表数据
+        Query query = new Query(params);
+
+        List<MallPaymentOrderDataEntity> mall2PaymentOrderDataList = mall2PaymentOrderDataService.queryList(query);
+        int total = mall2PaymentOrderDataService.queryTotal(query);
+
+        PageUtils pageUtil = new PageUtils(mall2PaymentOrderDataList, total, query.getLimit(), query.getPage());
+
+        return R.ok().put("page", pageUtil);
+    }
+
+    /**
+     * 查看信息
+     */
+    @RequestMapping("/info/{payOrderId}")
+    @RequiresPermissions("mallpaymentorderdata:info")
+    @ResponseBody
+    public R info(@PathVariable("payOrderId") Integer payOrderId) {
+        MallPaymentOrderDataEntity mall2PaymentOrderData = mall2PaymentOrderDataService.queryObject(payOrderId);
+
+        return R.ok().put("mallPaymentOrderData", mall2PaymentOrderData);
+    }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/save")
+    @RequiresPermissions("mallpaymentorderdata:save")
+    @ResponseBody
+    public R save(@RequestBody MallPaymentOrderDataEntity mall2PaymentOrderData) {
+        mall2PaymentOrderDataService.save(mall2PaymentOrderData);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改
+     */
+    @RequestMapping("/update")
+    @RequiresPermissions("mallpaymentorderdata:update")
+    @ResponseBody
+    public R update(@RequestBody MallPaymentOrderDataEntity mall2PaymentOrderData) {
+        mall2PaymentOrderDataService.update(mall2PaymentOrderData);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除
+     */
+    @RequestMapping("/delete")
+    @RequiresPermissions("mallpaymentorderdata:delete")
+    @ResponseBody
+    public R delete(@RequestBody Integer[]payOrderIds) {
+        mall2PaymentOrderDataService.deleteBatch(payOrderIds);
+
+        return R.ok();
+    }
+
+    /**
+     * 查看所有列表
+     */
+    @RequestMapping("/queryAll")
+    @ResponseBody
+    public R queryAll(@RequestParam Map<String, Object> params) {
+
+        List<MallPaymentOrderDataEntity> list = mall2PaymentOrderDataService.queryList(params);
+
+        return R.ok().put("list", list);
+    }
+
+    @RequestMapping("/upload")
+    @RequiresPermissions("mallpaymentorderdata:upload")
+    @ResponseBody
+    public R upload(@RequestParam("file") MultipartFile file,@RequestParam Map<String, Object> params) throws Exception {
+
+        List<MallPaymentOrderDataEntity> list = new ArrayList<>();
+        String payFlag = params.get("payFlag").toString();
+        try {
+            if (file.isEmpty()) {
+                throw new RRException("上传文件不能为空");
+            }
+            MallPaymentOrderDataEntity mallPaymentOrderDataEntity = new MallPaymentOrderDataEntity();
+            Map<String, Object> beans = new HashMap<String, Object>();
+            beans.put("MallPaymentOrderDataEntity", mallPaymentOrderDataEntity);
+            beans.put("MallPaymentOrderDataEntityList", list);
+            if (Dict.payFlag.item_weixin.getItem().equals(payFlag)) {
+                excelUtil.readExcel(JxlsXmlTemplateName.WX_PAYMENT_ORDER_DTO_List, beans, file.getInputStream());
+            }else if (Dict.payFlag.item_alipay.getItem().equals(payFlag)){
+                excelUtil.readExcel(JxlsXmlTemplateName.ALI_PAYMENT_ORDER_DTO_List, beans, file.getInputStream());
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+            return R.error("导入失败!");
+        }
+        try {
+            mall2PaymentOrderDataService.uploadExcel(list,payFlag);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error(e.getMessage());
+        }
+        return R.ok();
+    }
+
+    /**
+     * System Format 导出请求
+     */
+    @RequestMapping(value = "exportDataFormat")
+    @RequiresPermissions("mallpaymentorderdata:exportDataFormat")
+    @ResponseBody
+    public R exportSystemFormat(@RequestParam Map<String, Object> params, HttpServletResponse response, HttpServletRequest request) throws ParseException {
+
+        params = ParamUtils.setTimeMap(params);
+        mall2PaymentOrderDataService.exportDataFormatList(params,response);
+        return R.ok();
+    }
+
+}

+ 5 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/OrderController.java

@@ -1348,7 +1348,7 @@ public class OrderController {
         List<SystemFormatDto> systemFormatList = orderService.queryExportSystemFormatList(params);
         String[] header = new String[]{"Receipt No.","Store Name", "Cash Register No.", "Time Stamp Details (Date & Time)", "Staff ID", "Staff Name","Pay Flag","Order Status","Order SnWx","Order SnAli",
                 "HS Code", "HS Code Name", "E-matou Code", "PLU", "MychemID", "Product Name (EN)","Product Name (CN)", "Barcode", "Pack Size", "Product Specification",
-                "Brand","EDLP","Current Price","Cost Price","Prime Cost","Goods Number","Deduction Rate","Unit Sold","Sales","Tax amount","Total Sales incl. Tax","Tax Rate",
+                "Brand","EDLP","Current Price","Cost Price",/*"Prime Cost","Goods Number",*/"Deduction Rate","Unit Sold","Sales","Tax amount","Total Sales incl. Tax","Tax Rate",
                 "GP ¥","GP %","Product Category","Supplier Name","Transaction Type","Sale Return Type","Remark"};
 
         LinkedHashMap<String, Object> headerMap = initHeaderMap();
@@ -1474,8 +1474,8 @@ public class OrderController {
                 map.put("EDLP",systemFormat.getEdlp());
                 map.put("CurrentPrice",systemFormat.getCurrentPrice());
                 map.put("CostPrice",systemFormat.getCostPrice());
-                map.put("PrimeCost",systemFormat.getPrimeCost());
-                map.put("GoodsNumber",systemFormat.getGoodsNumber());
+//                map.put("PrimeCost",systemFormat.getPrimeCost());
+//                map.put("GoodsNumber",systemFormat.getGoodsNumber());
                 map.put("DeductionRate",systemFormat.getDeductionRate());
                 map.put("UnitSold",systemFormat.getUnitSold());
                 map.put("Sales",systemFormat.getSales());
@@ -1532,8 +1532,8 @@ public class OrderController {
         headerMap.put("EDLP","日常价");
         headerMap.put("CurrentPrice","实际销售价");
         headerMap.put("CostPrice","进货价");
-        headerMap.put("PrimeCost","成本价");
-        headerMap.put("GoodsNumber","可用库存数");
+//        headerMap.put("PrimeCost","成本价");
+//        headerMap.put("GoodsNumber","可用库存数");
         headerMap.put("DeductionRate","扣率 (EDLP vs 实际销售价)");
         headerMap.put("UnitSold","销售数量");
         headerMap.put("Sales","销售额");

+ 22 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/MallPaymentOrderDataDao.java

@@ -0,0 +1,22 @@
+package com.kmall.admin.dao;
+
+
+import com.kmall.admin.entity.MallPaymentOrderDataEntity;
+import com.kmall.manager.dao.BaseDao;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 支付订单表Dao
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2021-04-22 14:54:43
+ */
+public interface MallPaymentOrderDataDao extends BaseDao<MallPaymentOrderDataEntity> {
+
+    int saveData(MallPaymentOrderDataEntity mallPaymentOrderData);
+
+    List<MallPaymentOrderDataEntity> queryListData(Map<String, Object> params);
+}

+ 686 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/MallPaymentOrderDataEntity.java

@@ -0,0 +1,686 @@
+package com.kmall.admin.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 支付订单表实体
+ * 表名 mall2_payment_order_data
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2021-04-22 14:54:43
+ */
+public class MallPaymentOrderDataEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    private Integer payOrderId;
+    /**
+     * 商户名称
+     */
+    private String merchantName;
+    /**
+     * 商户订单号
+     */
+    private String outTradeNo;
+    /**
+     * 支付金额(wx订单金额 zfb收入)
+     */
+    private String payMoney;
+    /**
+     * 退款金额(wx退款金额  zfb支出)
+     */
+    private String refundMoney;
+    /**
+     * 支付类型(wx交易类型 zfb账务类型)
+     */
+    private String payType;
+    /**
+     * 付款类型(wx付款银行 zfb支付渠道)
+     */
+    private String paymentType;
+    /**
+     * 交易订单号(wx订单号,zfb交易号)
+     */
+    private String transactionOrder;
+    /**
+     * 时间
+     */
+    private String timeStr;
+    /**
+     * 商家数据包,原样返回
+     */
+    private String attach;
+    /**
+     * 交易状态
+     */
+    private String transactionStatus;
+    /**
+     * 货币种类
+     */
+    private String currencyType;
+    /**
+     * 应结订单金额
+     */
+    private String amountOrder;
+    /**
+     * 微信退款单号
+     */
+    private String refundId;
+    /**
+     * 商户退款单号
+     */
+    private String merRefundNumber;
+    /** 退款类型 */
+    private String refundType;
+    /**
+     * 退款状态
+     */
+    private String refundStatus;
+
+    /**
+     * 申请退款金额
+     */
+    private String applyRefundAmount;
+    /**
+     * 代金券
+     */
+    private String cashCoupon;
+    /**
+     * 充值券退款金额
+     */
+    private String refundRechargpCoupon;
+    /**
+     * 手续费
+     */
+    private String feeCharge;
+    /**
+     * 费率
+     */
+    private String rate;
+    /**
+     * 支付方式:weixin:微信;pingan平安支付;wxglobalpay:微信国际支付;tenpay:QQ财付通;alipay:支付宝;cash:现金
+     */
+    private String payFlag;
+    /**
+     * 流水号
+     */
+    private String serialNumber;
+    /**
+     * 对方账户
+     */
+    private String oppositeAccount;
+    /**
+     * 对方名称
+     */
+    private String otherName;
+    /**
+     * 银行订单号
+     */
+    private String bankOrder;
+    /**
+     * 业务基础订单号
+     */
+    private String businessBasicOrder;
+    /**
+     * 业务账单来源
+     */
+    private String businessBillingSource;
+    /**
+     * 业务订单号
+     */
+    private String businessOrder;
+    /**
+     * 业务描述
+     */
+    private String businessDescription;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 费率备注
+     */
+    private String rateRemark;
+    /**
+     * 付款备注
+     */
+    private String paymentNotes;
+    /**
+     * 创建人编号
+     */
+    private String createrSn;
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+    /**
+     * 修改人编号
+     */
+    private String moderSn;
+    /**
+     * 修改时间
+     */
+    private Date modTime;
+    /**
+     * 时间戳
+     */
+    private Date tstm;
+
+    private String id;
+
+    /**
+     * 设置:编号
+     */
+    public void setPayOrderId(Integer payOrderId) {
+        this.payOrderId = payOrderId;
+    }
+
+    /**
+     * 获取:编号
+     */
+    public Integer getPayOrderId() {
+        return payOrderId;
+    }
+    /**
+     * 设置:商户名称
+     */
+    public void setMerchantName(String merchantName) {
+        this.merchantName = merchantName;
+    }
+
+    /**
+     * 获取:商户名称
+     */
+    public String getMerchantName() {
+        return merchantName;
+    }
+    /**
+     * 设置:商户订单号
+     */
+    public void setOutTradeNo(String outTradeNo) {
+        this.outTradeNo = outTradeNo;
+    }
+
+    /**
+     * 获取:商户订单号
+     */
+    public String getOutTradeNo() {
+        return outTradeNo;
+    }
+    /**
+     * 设置:支付金额(wx订单金额 zfb收入)
+     */
+    public void setPayMoney(String payMoney) {
+        this.payMoney = payMoney;
+    }
+
+    /**
+     * 获取:支付金额(wx订单金额 zfb收入)
+     */
+    public String getPayMoney() {
+        return payMoney;
+    }
+    /**
+     * 设置:退款金额(wx退款金额  zfb支出)
+     */
+    public void setRefundMoney(String refundMoney) {
+        this.refundMoney = refundMoney;
+    }
+
+    /**
+     * 获取:退款金额(wx退款金额  zfb支出)
+     */
+    public String getRefundMoney() {
+        return refundMoney;
+    }
+    /**
+     * 设置:支付类型(wx交易类型 zfb账务类型)
+     */
+    public void setPayType(String payType) {
+        this.payType = payType;
+    }
+
+    /**
+     * 获取:支付类型(wx交易类型 zfb账务类型)
+     */
+    public String getPayType() {
+        return payType;
+    }
+    /**
+     * 设置:付款类型(wx付款银行 zfb支付渠道)
+     */
+    public void setPaymentType(String paymentType) {
+        this.paymentType = paymentType;
+    }
+
+    /**
+     * 获取:付款类型(wx付款银行 zfb支付渠道)
+     */
+    public String getPaymentType() {
+        return paymentType;
+    }
+    /**
+     * 设置:交易订单号(wx订单号,zfb交易号)
+     */
+    public void setTransactionOrder(String transactionOrder) {
+        this.transactionOrder = transactionOrder;
+    }
+
+    /**
+     * 获取:交易订单号(wx订单号,zfb交易号)
+     */
+    public String getTransactionOrder() {
+        return transactionOrder;
+    }
+    /**
+     * 设置:时间
+     */
+    public void setTimeStr(String timeStr) {
+        this.timeStr = timeStr;
+    }
+
+    /**
+     * 获取:时间
+     */
+    public String getTimeStr() {
+        return timeStr;
+    }
+    /**
+     * 设置:商家数据包,原样返回
+     */
+    public void setAttach(String attach) {
+        this.attach = attach;
+    }
+
+    /**
+     * 获取:商家数据包,原样返回
+     */
+    public String getAttach() {
+        return attach;
+    }
+    /**
+     * 设置:交易状态
+     */
+    public void setTransactionStatus(String transactionStatus) {
+        this.transactionStatus = transactionStatus;
+    }
+
+    /**
+     * 获取:交易状态
+     */
+    public String getTransactionStatus() {
+        return transactionStatus;
+    }
+    /**
+     * 设置:货币种类
+     */
+    public void setCurrencyType(String currencyType) {
+        this.currencyType = currencyType;
+    }
+
+    /**
+     * 获取:货币种类
+     */
+    public String getCurrencyType() {
+        return currencyType;
+    }
+    /**
+     * 设置:应结订单金额
+     */
+    public void setAmountOrder(String amountOrder) {
+        this.amountOrder = amountOrder;
+    }
+
+    /**
+     * 获取:应结订单金额
+     */
+    public String getAmountOrder() {
+        return amountOrder;
+    }
+    /**
+     * 设置:微信退款单号
+     */
+    public void setRefundId(String refundId) {
+        this.refundId = refundId;
+    }
+
+    /**
+     * 获取:微信退款单号
+     */
+    public String getRefundId() {
+        return refundId;
+    }
+    /**
+     * 设置:商户退款单号
+     */
+    public void setMerRefundNumber(String merRefundNumber) {
+        this.merRefundNumber = merRefundNumber;
+    }
+
+    /**
+     * 获取:商户退款单号
+     */
+    public String getMerRefundNumber() {
+        return merRefundNumber;
+    }
+    /**
+     * 设置:退款状态
+     */
+    public void setRefundStatus(String refundStatus) {
+        this.refundStatus = refundStatus;
+    }
+
+    /**
+     * 获取:退款状态
+     */
+    public String getRefundStatus() {
+        return refundStatus;
+    }
+    /**
+     * 设置:代金券
+     */
+    public void setCashCoupon(String cashCoupon) {
+        this.cashCoupon = cashCoupon;
+    }
+
+    /**
+     * 获取:代金券
+     */
+    public String getCashCoupon() {
+        return cashCoupon;
+    }
+    /**
+     * 设置:充值券退款金额
+     */
+    public void setRefundRechargpCoupon(String refundRechargpCoupon) {
+        this.refundRechargpCoupon = refundRechargpCoupon;
+    }
+
+    /**
+     * 获取:充值券退款金额
+     */
+    public String getRefundRechargpCoupon() {
+        return refundRechargpCoupon;
+    }
+    /**
+     * 设置:手续费
+     */
+    public void setFeeCharge(String feeCharge) {
+        this.feeCharge = feeCharge;
+    }
+
+    /**
+     * 获取:手续费
+     */
+    public String getFeeCharge() {
+        return feeCharge;
+    }
+    /**
+     * 设置:费率
+     */
+    public void setRate(String rate) {
+        this.rate = rate;
+    }
+
+    /**
+     * 获取:费率
+     */
+    public String getRate() {
+        return rate;
+    }
+    /**
+     * 设置:支付方式:weixin:微信;pingan平安支付;wxglobalpay:微信国际支付;tenpay:QQ财付通;alipay:支付宝;cash:现金
+     */
+    public void setPayFlag(String payFlag) {
+        this.payFlag = payFlag;
+    }
+
+    /**
+     * 获取:支付方式:weixin:微信;pingan平安支付;wxglobalpay:微信国际支付;tenpay:QQ财付通;alipay:支付宝;cash:现金
+     */
+    public String getPayFlag() {
+        return payFlag;
+    }
+    /**
+     * 设置:流水号
+     */
+    public void setSerialNumber(String serialNumber) {
+        this.serialNumber = serialNumber;
+    }
+
+    /**
+     * 获取:流水号
+     */
+    public String getSerialNumber() {
+        return serialNumber;
+    }
+    /**
+     * 设置:对方账户
+     */
+    public void setOppositeAccount(String oppositeAccount) {
+        this.oppositeAccount = oppositeAccount;
+    }
+
+    /**
+     * 获取:对方账户
+     */
+    public String getOppositeAccount() {
+        return oppositeAccount;
+    }
+    /**
+     * 设置:对方名称
+     */
+    public void setOtherName(String otherName) {
+        this.otherName = otherName;
+    }
+
+    /**
+     * 获取:对方名称
+     */
+    public String getOtherName() {
+        return otherName;
+    }
+    /**
+     * 设置:银行订单号
+     */
+    public void setBankOrder(String bankOrder) {
+        this.bankOrder = bankOrder;
+    }
+
+    /**
+     * 获取:银行订单号
+     */
+    public String getBankOrder() {
+        return bankOrder;
+    }
+    /**
+     * 设置:业务基础订单号
+     */
+    public void setBusinessBasicOrder(String businessBasicOrder) {
+        this.businessBasicOrder = businessBasicOrder;
+    }
+
+    /**
+     * 获取:业务基础订单号
+     */
+    public String getBusinessBasicOrder() {
+        return businessBasicOrder;
+    }
+    /**
+     * 设置:业务账单来源
+     */
+    public void setBusinessBillingSource(String businessBillingSource) {
+        this.businessBillingSource = businessBillingSource;
+    }
+
+    /**
+     * 获取:业务账单来源
+     */
+    public String getBusinessBillingSource() {
+        return businessBillingSource;
+    }
+    /**
+     * 设置:业务订单号
+     */
+    public void setBusinessOrder(String businessOrder) {
+        this.businessOrder = businessOrder;
+    }
+
+    /**
+     * 获取:业务订单号
+     */
+    public String getBusinessOrder() {
+        return businessOrder;
+    }
+    /**
+     * 设置:业务描述
+     */
+    public void setBusinessDescription(String businessDescription) {
+        this.businessDescription = businessDescription;
+    }
+
+    /**
+     * 获取:业务描述
+     */
+    public String getBusinessDescription() {
+        return businessDescription;
+    }
+    /**
+     * 设置:备注
+     */
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    /**
+     * 获取:备注
+     */
+    public String getRemark() {
+        return remark;
+    }
+    /**
+     * 设置:费率备注
+     */
+    public void setRateRemark(String rateRemark) {
+        this.rateRemark = rateRemark;
+    }
+
+    /**
+     * 获取:费率备注
+     */
+    public String getRateRemark() {
+        return rateRemark;
+    }
+    /**
+     * 设置:付款备注
+     */
+    public void setPaymentNotes(String paymentNotes) {
+        this.paymentNotes = paymentNotes;
+    }
+
+    /**
+     * 获取:付款备注
+     */
+    public String getPaymentNotes() {
+        return paymentNotes;
+    }
+    /**
+     * 设置:创建人编号
+     */
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    /**
+     * 获取:创建人编号
+     */
+    public String getCreaterSn() {
+        return createrSn;
+    }
+    /**
+     * 设置:创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 获取:创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+    /**
+     * 设置:修改人编号
+     */
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    /**
+     * 获取:修改人编号
+     */
+    public String getModerSn() {
+        return moderSn;
+    }
+    /**
+     * 设置:修改时间
+     */
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    /**
+     * 获取:修改时间
+     */
+    public Date getModTime() {
+        return modTime;
+    }
+    /**
+     * 设置:时间戳
+     */
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
+    /**
+     * 获取:时间戳
+     */
+    public Date getTstm() {
+        return tstm;
+    }
+
+    /**
+     * 获取:退款类型
+     */
+    public String getRefundType() {
+        return refundType;
+    }
+
+    /**
+     * 设置:退款类型
+     */
+    public void setRefundType(String refundType) {
+        this.refundType = refundType;
+    }
+
+    public String getApplyRefundAmount() {
+        return applyRefundAmount;
+    }
+
+    public void setApplyRefundAmount(String applyRefundAmount) {
+        this.applyRefundAmount = applyRefundAmount;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+}

+ 84 - 0
kmall-admin/src/main/java/com/kmall/admin/service/MallPaymentOrderDataService.java

@@ -0,0 +1,84 @@
+package com.kmall.admin.service;
+
+
+import com.kmall.admin.entity.MallPaymentOrderDataEntity;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 支付订单表Service接口
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2021-04-22 14:54:43
+ */
+public interface MallPaymentOrderDataService {
+
+    /**
+     * 根据主键查询实体
+     *
+     * @param id 主键
+     * @return 实体
+     */
+    MallPaymentOrderDataEntity queryObject(Integer payOrderId);
+
+    /**
+     * 分页查询
+     *
+     * @param map 参数
+     * @return list
+     */
+    List<MallPaymentOrderDataEntity> queryList(Map<String, Object> map);
+
+    /**
+     * 分页统计总数
+     *
+     * @param map 参数
+     * @return 总数
+     */
+    int queryTotal(Map<String, Object> map);
+
+    /**
+     * 保存实体
+     *
+     * @param mall2PaymentOrderData 实体
+     * @return 保存条数
+     */
+    int save(MallPaymentOrderDataEntity mall2PaymentOrderData);
+
+    /**
+     * 根据主键更新实体
+     *
+     * @param mall2PaymentOrderData 实体
+     * @return 更新条数
+     */
+    int update(MallPaymentOrderDataEntity mall2PaymentOrderData);
+
+    /**
+     * 根据主键删除
+     *
+     * @param payOrderId
+     * @return 删除条数
+     */
+    int delete(Integer payOrderId);
+
+    /**
+     * 根据主键批量删除
+     *
+     * @param payOrderIds
+     * @return 删除条数
+     */
+    int deleteBatch(Integer[]payOrderIds);
+
+    /**
+     * 根据excel表单导入添加入库 -- 支付宝和微信账单
+     * @param list
+     * @param payFlag
+     * @return
+     */
+    int uploadExcel(List<MallPaymentOrderDataEntity> list,String payFlag);
+
+    void exportDataFormatList(Map<String, Object> map, HttpServletResponse response);
+}

+ 229 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/MallPaymentOrderDataServiceImpl.java

@@ -0,0 +1,229 @@
+package com.kmall.admin.service.impl;
+
+import com.kmall.admin.dao.MallPaymentOrderDataDao;
+import com.kmall.admin.entity.MallPaymentOrderDataEntity;
+import com.kmall.admin.fromcomm.entity.SysUserEntity;
+import com.kmall.admin.service.MallPaymentOrderDataService;
+import com.kmall.admin.utils.ShiroUtils;
+import com.kmall.common.constant.Dict;
+import com.kmall.common.constant.JxlsXmlTemplateName;
+import com.kmall.common.utils.excel.ExcelExport;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.*;
+
+
+/**
+ * 支付订单表Service实现类
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2021-04-22 14:54:43
+ */
+@Service("mallPaymentOrderDataService")
+public class MallPaymentOrderDataServiceImpl implements MallPaymentOrderDataService {
+    @Autowired
+    private MallPaymentOrderDataDao mall2PaymentOrderDataDao;
+
+    @Override
+    public MallPaymentOrderDataEntity queryObject(Integer payOrderId) {
+        return mall2PaymentOrderDataDao.queryObject(payOrderId);
+    }
+
+    @Override
+    public List<MallPaymentOrderDataEntity> queryList(Map<String, Object> map) {
+        return mall2PaymentOrderDataDao.queryList(map);
+    }
+
+    @Override
+    public int queryTotal(Map<String, Object> map) {
+        return mall2PaymentOrderDataDao.queryTotal(map);
+    }
+
+    @Override
+    public int save(MallPaymentOrderDataEntity mall2PaymentOrderData) {
+        return mall2PaymentOrderDataDao.save(mall2PaymentOrderData);
+    }
+
+    @Override
+    public int update(MallPaymentOrderDataEntity mall2PaymentOrderData) {
+        return mall2PaymentOrderDataDao.update(mall2PaymentOrderData);
+    }
+
+    @Override
+    public int delete(Integer payOrderId) {
+        return mall2PaymentOrderDataDao.delete(payOrderId);
+    }
+
+    @Override
+    public int deleteBatch(Integer[]payOrderIds) {
+        return mall2PaymentOrderDataDao.deleteBatch(payOrderIds);
+    }
+
+    @Override
+    public int uploadExcel(List<MallPaymentOrderDataEntity> list,String payFlag) {
+        SysUserEntity sysUserEntity = ShiroUtils.getUserEntity();
+        if (list!=null && list.size()>0) {
+            for (MallPaymentOrderDataEntity  paymentOrderDataEntity : list) {
+                MallPaymentOrderDataEntity orderDataEntity = new MallPaymentOrderDataEntity();
+                paymentOrderDataEntity.setCreaterSn(sysUserEntity.getUsername());
+                paymentOrderDataEntity.setCreateTime(new Date());
+                paymentOrderDataEntity.setPayFlag(payFlag);
+                BeanUtils.copyProperties(paymentOrderDataEntity,orderDataEntity);
+                mall2PaymentOrderDataDao.saveData(orderDataEntity);
+            }
+        }
+        return 0;
+    }
+
+    @Override
+    public void exportDataFormatList(Map<String, Object> map, HttpServletResponse response) {
+        List<MallPaymentOrderDataEntity> mallList = mall2PaymentOrderDataDao.queryListData(map);
+        String payFlag = map.get("payFlag").toString();
+        String itemName = null;
+        String[] header = null;
+        LinkedHashMap<String, Object> headerMap = null;
+        if (Dict.payFlag.item_weixin.getItem().equals(payFlag)) {
+            //初始化 第一行数据信息
+            itemName = Dict.payFlag.item_weixin.getItemName();
+            header = new String[]{"Time Str","Transaction Order", "OutTrade No", "Pay Type", "Transaction Status", "Payment Type","Currency Type","Amount Order","Cash Coupon","Refund Id",
+                    "MerRefund Number", "Refund Money", "Refund RechargpCoupon", "Refund Type", "Refund Status", "Merchant Name","Attach", "Fee Charge", "Rate", "Pay Money",
+                    "ApplyRefund Amount","Rate Remark"};
+            //初始化 第二行数据信息
+            headerMap = initHeaderWxMap();
+        }else if (Dict.payFlag.item_alipay.getItem().equals(payFlag)){
+            //初始化 第一行数据信息
+            itemName = Dict.payFlag.item_alipay.getItemName();
+            header = new String[]{"Time Str","Transaction Order", "Serial Number", "OutTrade No", "Pay Type", "Pay Money","Refund Money","payment Type","Opposite Account","Other Name",
+                    "Bank Order ", "Merchant Name", "Remark", "BusinessBasic Order", "Business Order", "BusinessBilling Source","Business Description", "Payment Notes"};
+            //初始化 第二行数据信息
+            headerMap = initHeaderAliMap();
+        }
+        // excel 表单名字
+        ExcelExport ee = new ExcelExport(itemName+"账单");
+        List<Map<String, Object>> list = new LinkedList<>();
+        list.add(headerMap);
+        for (MallPaymentOrderDataEntity orderDataEntity : mallList) {
+            LinkedHashMap<String, Object> mapLinked = new LinkedHashMap<>(24);
+            if (Dict.payFlag.item_weixin.getItem().equals(payFlag)) {
+                //渲染表单数据
+                mapLinked = initHeaderWxMap(orderDataEntity);
+            }else if (Dict.payFlag.item_alipay.getItem().equals(payFlag)){
+                //渲染表单数据
+                mapLinked = initHeaderAliMap(orderDataEntity);
+            }
+            list.add(mapLinked);
+        }
+        //渲染excel表单
+        ee.addSheetByMap(itemName+"账单", list, header);
+        ee.export(response);
+    }
+
+    private LinkedHashMap<String, Object> initHeaderAliMap() {
+        LinkedHashMap<String, Object> headerMap = new LinkedHashMap<>();
+        headerMap.put("timeStr","入账时间");
+        headerMap.put("transactionOrder","支付宝交易号");
+        headerMap.put("serialNumber","支付宝流水号");
+        headerMap.put("outTradeNo","商户订单号");
+        headerMap.put("payType","账务类型");
+        headerMap.put("payMoney","收入(+元)");
+        headerMap.put("refundMoney","支出(-元)");
+        headerMap.put("paymentType","支付渠道");
+        headerMap.put("oppositeAccount","对方账户");
+        headerMap.put("otherName","对方名称");
+        headerMap.put("bankOrder","银行订单号");
+        headerMap.put("merchantName","商品名称");
+        headerMap.put("remark","备注");
+        headerMap.put("businessBasicOrder","业务基础订单号");
+        headerMap.put("businessOrder","业务订单号");
+        headerMap.put("businessBillingSource","业务账单来源");
+        headerMap.put("businessDescription","业务描述");
+        headerMap.put("paymentNotes","付款备注");
+        return headerMap;
+    }
+    private LinkedHashMap<String, Object> initHeaderAliMap(MallPaymentOrderDataEntity orderDataEntity) {
+        LinkedHashMap<String, Object> headerMap = new LinkedHashMap<>();
+        headerMap.put("timeStr",orderDataEntity.getTimeStr());
+        headerMap.put("transactionOrder",orderDataEntity.getTransactionOrder());
+        headerMap.put("serialNumber",orderDataEntity.getSerialNumber());
+        headerMap.put("outTradeNo",orderDataEntity.getOutTradeNo());
+        headerMap.put("payType",orderDataEntity.getPayType());
+        headerMap.put("payMoney",orderDataEntity.getPayMoney());
+        headerMap.put("refundMoney",orderDataEntity.getRefundMoney());
+        headerMap.put("paymentType",orderDataEntity.getPaymentType());
+        headerMap.put("oppositeAccount",orderDataEntity.getOppositeAccount());
+        headerMap.put("otherName",orderDataEntity.getOtherName());
+        headerMap.put("bankOrder",orderDataEntity.getBankOrder());
+        headerMap.put("merchantName",orderDataEntity.getMerchantName());
+        headerMap.put("remark",orderDataEntity.getRemark());
+        headerMap.put("businessBasicOrder", orderDataEntity.getBusinessBasicOrder());
+        headerMap.put("businessOrder",orderDataEntity.getBusinessOrder());
+        headerMap.put("businessBillingSource",orderDataEntity.getBusinessBillingSource());
+        headerMap.put("businessDescription",orderDataEntity.getBusinessDescription());
+        headerMap.put("paymentNotes",orderDataEntity.getPaymentNotes());
+        return headerMap;
+    }
+
+    private LinkedHashMap<String, Object> initHeaderWxMap() {
+        LinkedHashMap<String, Object> headerMap = new LinkedHashMap<>();
+        headerMap.put("timeStr","交易时间");
+        headerMap.put("transactionOrder","微信订单号");
+        headerMap.put("outTradeNo","商户订单号");
+        headerMap.put("payType","交易类型");
+        headerMap.put("transactionStatus","交易状态");
+        headerMap.put("paymentType","付款银行");
+        headerMap.put("currencyType","货币种类");
+        headerMap.put("amountOrder","应结订单金额");
+        headerMap.put("cashCoupon","代金券金额");
+        headerMap.put("refundId","微信退款单号");
+        headerMap.put("merRefundNumber","商户退款单号");
+        headerMap.put("refundMoney","退款金额");
+        headerMap.put("refundRechargpCoupon","充值券退款金额");
+        headerMap.put("refundType","退款类型");
+        headerMap.put("refundStatus","退款状态");
+        headerMap.put("merchantName","商品名称");
+        headerMap.put("attach","商户数据包");
+        headerMap.put("feeCharge","手续费");
+        headerMap.put("rate","费率");
+        headerMap.put("payMoney","订单金额");
+        headerMap.put("applyRefundAmount","申请退款金额");
+        headerMap.put("rateRemark","费率备注");
+        return headerMap;
+    }
+    private LinkedHashMap<String, Object> initHeaderWxMap(MallPaymentOrderDataEntity orderDataEntity) {
+        LinkedHashMap<String, Object> headerMap = new LinkedHashMap<>();
+        headerMap.put("timeStr",orderDataEntity.getTimeStr());
+        headerMap.put("transactionOrder",orderDataEntity.getTransactionOrder());
+        headerMap.put("outTradeNo",orderDataEntity.getOutTradeNo());
+        headerMap.put("payType",orderDataEntity.getPayType());
+        headerMap.put("transactionStatus",orderDataEntity.getTransactionStatus());
+        headerMap.put("paymentType",orderDataEntity.getPaymentType());
+        headerMap.put("currencyType",orderDataEntity.getCurrencyType());
+        headerMap.put("amountOrder",orderDataEntity.getAmountOrder());
+        headerMap.put("cashCoupon",orderDataEntity.getCashCoupon());
+        headerMap.put("refundId",orderDataEntity.getRefundId());
+        headerMap.put("merRefundNumber",orderDataEntity.getMerRefundNumber());
+        headerMap.put("refundMoney",orderDataEntity.getRefundMoney());
+        headerMap.put("refundRechargpCoupon",orderDataEntity.getRefundRechargpCoupon());
+        headerMap.put("refundType",orderDataEntity.getRefundType());
+        headerMap.put("refundStatus",orderDataEntity.getRefundStatus());
+        headerMap.put("merchantName",orderDataEntity.getMerchantName());
+        headerMap.put("attach",orderDataEntity.getAttach());
+        headerMap.put("feeCharge",orderDataEntity.getFeeCharge());
+        headerMap.put("rate",orderDataEntity.getRate());
+        headerMap.put("payMoney",orderDataEntity.getPayMoney());
+        headerMap.put("applyRefundAmount",orderDataEntity.getApplyRefundAmount());
+        headerMap.put("rateRemark",orderDataEntity.getRateRemark());
+        return headerMap;
+    }
+}

+ 35 - 0
kmall-admin/src/main/resources/XmlTemplate/AliPaymentOrderDtoList.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbook>
+    <worksheet name="Sheet1">
+        <section startRow="0" endRow="0"/>
+        <loop startRow="1" endRow="1" items="MallPaymentOrderDataEntityList" var="MallPaymentOrderDataEntity"
+              varType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
+            <section startRow="1" endRow="1">
+                <mapping row="1" col="0">MallPaymentOrderDataEntity.id</mapping>
+                <mapping row="1" col="1">MallPaymentOrderDataEntity.timeStr</mapping>
+                <mapping row="1" col="2">MallPaymentOrderDataEntity.transactionOrder</mapping>
+                <mapping row="1" col="3">MallPaymentOrderDataEntity.serialNumber</mapping>
+                <mapping row="1" col="4">MallPaymentOrderDataEntity.outTradeNo</mapping>
+                <mapping row="1" col="5">MallPaymentOrderDataEntity.payType</mapping>
+                <mapping row="1" col="6">MallPaymentOrderDataEntity.payMoney</mapping>
+                <mapping row="1" col="7">MallPaymentOrderDataEntity.refundMoney</mapping>
+                <mapping row="1" col="8">MallPaymentOrderDataEntity.paymentType</mapping>
+                <mapping row="1" col="9">MallPaymentOrderDataEntity.oppositeAccount</mapping>
+                <mapping row="1" col="10">MallPaymentOrderDataEntity.otherName</mapping>
+                <mapping row="1" col="11">MallPaymentOrderDataEntity.bankOrder</mapping>
+                <mapping row="1" col="12">MallPaymentOrderDataEntity.merchantName</mapping>
+                <mapping row="1" col="13">MallPaymentOrderDataEntity.remark</mapping>
+                <mapping row="1" col="14">MallPaymentOrderDataEntity.businessBasicOrder</mapping>
+                <mapping row="1" col="15">MallPaymentOrderDataEntity.businessOrder</mapping>
+                <mapping row="1" col="16">MallPaymentOrderDataEntity.businessBillingSource</mapping>
+                <mapping row="1" col="17">MallPaymentOrderDataEntity.businessDescription</mapping>
+                <mapping row="1" col="18">MallPaymentOrderDataEntity.paymentNotes</mapping>
+            </section>
+            <loopbreakcondition>
+                <rowcheck offset="0">
+                    <cellcheck offset="0">end</cellcheck>
+                </rowcheck>
+            </loopbreakcondition>
+        </loop>
+    </worksheet>
+</workbook>

+ 38 - 0
kmall-admin/src/main/resources/XmlTemplate/WxPaymentOrderDtoList.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbook>
+    <worksheet name="Sheet1">
+        <section startRow="0" endRow="0"/>
+        <loop startRow="1" endRow="1" items="MallPaymentOrderDataEntityList" var="MallPaymentOrderDataEntity"
+              varType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
+            <section startRow="1" endRow="1">
+                <mapping row="1" col="0">MallPaymentOrderDataEntity.timeStr</mapping>
+                <mapping row="1" col="1">MallPaymentOrderDataEntity.transactionOrder</mapping>
+                <mapping row="1" col="2">MallPaymentOrderDataEntity.outTradeNo</mapping>
+                <mapping row="1" col="3">MallPaymentOrderDataEntity.payType</mapping>
+                <mapping row="1" col="4">MallPaymentOrderDataEntity.transactionStatus</mapping>
+                <mapping row="1" col="5">MallPaymentOrderDataEntity.paymentType</mapping>
+                <mapping row="1" col="6">MallPaymentOrderDataEntity.currencyType</mapping>
+                <mapping row="1" col="7">MallPaymentOrderDataEntity.amountOrder</mapping>
+                <mapping row="1" col="8">MallPaymentOrderDataEntity.cashCoupon</mapping>
+                <mapping row="1" col="9">MallPaymentOrderDataEntity.refundId</mapping>
+                <mapping row="1" col="10">MallPaymentOrderDataEntity.merRefundNumber</mapping>
+                <mapping row="1" col="11">MallPaymentOrderDataEntity.refundMoney</mapping>
+                <mapping row="1" col="12">MallPaymentOrderDataEntity.refundRechargpCoupon</mapping>
+                <mapping row="1" col="13">MallPaymentOrderDataEntity.refundType</mapping>
+                <mapping row="1" col="14">MallPaymentOrderDataEntity.refundStatus</mapping>
+                <mapping row="1" col="15">MallPaymentOrderDataEntity.merchantName</mapping>
+                <mapping row="1" col="16">MallPaymentOrderDataEntity.attach</mapping>
+                <mapping row="1" col="17">MallPaymentOrderDataEntity.feeCharge</mapping>
+                <mapping row="1" col="18">MallPaymentOrderDataEntity.rate</mapping>
+                <mapping row="1" col="19">MallPaymentOrderDataEntity.payMoney</mapping>
+                <mapping row="1" col="20">MallPaymentOrderDataEntity.applyRefundAmount</mapping>
+                <mapping row="1" col="21">MallPaymentOrderDataEntity.rateRemark</mapping>
+            </section>
+            <loopbreakcondition>
+                <rowcheck offset="0">
+                    <cellcheck offset="0">end</cellcheck>
+                </rowcheck>
+            </loopbreakcondition>
+        </loop>
+    </worksheet>
+</workbook>

+ 570 - 0
kmall-admin/src/main/resources/mybatis/mapper/MallPaymentOrderDataDao.xml

@@ -0,0 +1,570 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.kmall.admin.dao.MallPaymentOrderDataDao">
+
+    <resultMap type="com.kmall.admin.entity.MallPaymentOrderDataEntity" id="mall2PaymentOrderDataMap">
+        <result property="payOrderId" column="pay_order_id"/>
+        <result property="merchantName" column="merchant_name"/>
+        <result property="outTradeNo" column="out_trade_no"/>
+        <result property="payMoney" column="pay_money"/>
+        <result property="refundMoney" column="refund_money"/>
+        <result property="payType" column="pay_type"/>
+        <result property="paymentType" column="payment_type"/>
+        <result property="transactionOrder" column="transaction_order"/>
+        <result property="timeStr" column="time_str"/>
+        <result property="attach" column="attach"/>
+        <result property="transactionStatus" column="transaction_status"/>
+        <result property="currencyType" column="currency_type"/>
+        <result property="amountOrder" column="Amount_order"/>
+        <result property="refundId" column="refund_id"/>
+        <result property="merRefundNumber" column="mer_refund_number"/>
+        <result property="refundType" column="refund_type"/>
+        <result property="refundStatus" column="refund_status"/>
+        <result property="applyRefundAmount" column="apply_refund_amount"/>
+        <result property="cashCoupon" column="cash_coupon"/>
+        <result property="refundRechargpCoupon" column="refund_rechargp_coupon"/>
+        <result property="feeCharge" column="fee_charge"/>
+        <result property="rate" column="rate"/>
+        <result property="payFlag" column="pay_flag"/>
+        <result property="serialNumber" column="serial_number"/>
+        <result property="oppositeAccount" column="opposite_account"/>
+        <result property="otherName" column="other_name"/>
+        <result property="bankOrder" column="bank_order"/>
+        <result property="businessBasicOrder" column="business_basic_order"/>
+        <result property="businessBillingSource" column="business_billing_source"/>
+        <result property="businessOrder" column="business_order"/>
+        <result property="businessDescription" column="business_description"/>
+        <result property="remark" column="remark"/>
+        <result property="rateRemark" column="rate_remark"/>
+        <result property="paymentNotes" column="payment_notes"/>
+        <result property="createrSn" column="creater_sn"/>
+        <result property="createTime" column="create_time"/>
+        <result property="moderSn" column="moder_sn"/>
+        <result property="modTime" column="mod_time"/>
+        <result property="tstm" column="tstm"/>
+    </resultMap>
+
+	<select id="queryObject" resultType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
+		select
+			`pay_order_id`,
+			`merchant_name`,
+			`out_trade_no`,
+			`pay_money`,
+			`refund_money`,
+			`pay_type`,
+			`payment_type`,
+			`transaction_order`,
+			`time_str`,
+			`attach`,
+			`transaction_status`,
+			`currency_type`,
+			`Amount_order`,
+			`refund_id`,
+			`mer_refund_number`,
+			`refund_type`,
+			`refund_status`,
+			`apply_refund_amount`,
+			`cash_coupon`,
+			`refund_rechargp_coupon`,
+			`fee_charge`,
+			`rate`,
+			`pay_flag`,
+			`serial_number`,
+			`opposite_account`,
+			`other_name`,
+			`bank_order`,
+			`business_basic_order`,
+			`business_billing_source`,
+			`business_order`,
+			`business_description`,
+			`remark`,
+			`rate_remark`,
+			`payment_notes`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`
+		from mall2_payment_order_data
+		where pay_order_id = #{id}
+	</select>
+
+	<select id="queryList" resultType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
+		select
+    		`pay_order_id`,
+    		`merchant_name`,
+    		`out_trade_no`,
+    		`pay_money`,
+    		`refund_money`,
+    		`pay_type`,
+    		`payment_type`,
+    		`transaction_order`,
+    		`time_str`,
+    		`attach`,
+    		`transaction_status`,
+    		`currency_type`,
+    		`Amount_order`,
+    		`refund_id`,
+    		`mer_refund_number`,
+			`refund_type`,
+    		`refund_status`,
+			`apply_refund_amount`,
+    		`cash_coupon`,
+    		`refund_rechargp_coupon`,
+    		`fee_charge`,
+    		`rate`,
+    		`pay_flag`,
+    		`serial_number`,
+    		`opposite_account`,
+    		`other_name`,
+    		`bank_order`,
+    		`business_basic_order`,
+    		`business_billing_source`,
+    		`business_order`,
+    		`business_description`,
+    		`remark`,
+    		`rate_remark`,
+    		`payment_notes`,
+    		`creater_sn`,
+    		`create_time`,
+    		`moder_sn`,
+    		`mod_time`,
+    		`tstm`
+		from mall2_payment_order_data
+		WHERE 1=1
+		<if test="payFlag != null and payFlag.trim() != ''">
+			AND pay_flag = #{payFlag}
+		</if>
+		<if test="startTime != null and startTime != ''">
+			AND time_str <![CDATA[ >  ]]> #{startTime}
+		</if>
+		<if test="endTime != null and endTime != ''">
+			AND time_str <![CDATA[ <  ]]> #{endTime}
+		</if>
+        <choose>
+            <when test="sidx != null and sidx.trim() != ''">
+                order by ${sidx} ${order}
+            </when>
+			<otherwise>
+                order by pay_order_id desc
+			</otherwise>
+        </choose>
+		<if test="offset != null and limit != null">
+			limit #{offset}, #{limit}
+		</if>
+	</select>
+
+	<select id="queryListData" resultType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
+		select
+		`pay_order_id`,
+		`merchant_name`,
+		`out_trade_no`,
+		`pay_money`,
+		`refund_money`,
+		`pay_type`,
+		`payment_type`,
+		`transaction_order`,
+		`time_str`,
+		`attach`,
+		`transaction_status`,
+		`currency_type`,
+		`Amount_order`,
+		`refund_id`,
+		`mer_refund_number`,
+		`refund_type`,
+		`refund_status`,
+		`apply_refund_amount`,
+		`cash_coupon`,
+		`refund_rechargp_coupon`,
+		`fee_charge`,
+		`rate`,
+		`pay_flag`,
+		`serial_number`,
+		`opposite_account`,
+		`other_name`,
+		`bank_order`,
+		`business_basic_order`,
+		`business_billing_source`,
+		`business_order`,
+		`business_description`,
+		`remark`,
+		`rate_remark`,
+		`payment_notes`,
+		`creater_sn`,
+		`create_time`,
+		`moder_sn`,
+		`mod_time`,
+		`tstm`
+		from mall2_payment_order_data
+		WHERE 1=1
+		<if test="payFlag != null and payFlag.trim() != ''">
+			AND pay_flag = #{payFlag}
+		</if>
+		<if test="startTime != null and startTime != ''">
+			AND time_str <![CDATA[ >  ]]> #{startTime}
+		</if>
+		<if test="endTime != null and endTime != ''">
+			AND time_str <![CDATA[ <  ]]> #{endTime}
+		</if>
+	</select>
+	
+ 	<select id="queryTotal" resultType="int">
+		select count(*) from mall2_payment_order_data
+		WHERE 1=1
+        <if test="name != null and name.trim() != ''">
+            AND name LIKE concat('%',#{name},'%')
+        </if>
+	</select>
+	 
+	<insert id="save" parameterType="com.kmall.admin.entity.MallPaymentOrderDataEntity" useGeneratedKeys="true" keyProperty="payOrderId">
+		insert into mall2_payment_order_data(
+			`merchant_name`,
+			`out_trade_no`,
+			`pay_money`,
+			`refund_money`,
+			`pay_type`,
+			`payment_type`,
+			`transaction_order`,
+			`time_str`,
+			`attach`,
+			`transaction_status`,
+			`currency_type`,
+			`Amount_order`,
+			`refund_id`,
+			`mer_refund_number`,
+			`refund_type`,
+			`refund_status`,
+			`apply_refund_amount`,
+			`cash_coupon`,
+			`refund_rechargp_coupon`,
+			`fee_charge`,
+			`rate`,
+			`pay_flag`,
+			`serial_number`,
+			`opposite_account`,
+			`other_name`,
+			`bank_order`,
+			`business_basic_order`,
+			`business_billing_source`,
+			`business_order`,
+			`business_description`,
+			`remark`,
+			`rate_remark`,
+			`payment_notes`,
+			`creater_sn`,
+			`create_time`
+			)
+		values(
+			#{merchantName},
+			#{outTradeNo},
+			#{payMoney},
+			#{refundMoney},
+			#{payType},
+			#{paymentType},
+			#{transactionOrder},
+			#{timeStr},
+			#{attach},
+			#{transactionStatus},
+			#{currencyType},
+			#{amountOrder},
+			#{refundId},
+			#{merRefundNumber},
+			#{refundType},
+			#{refundStatus},
+			#{applyRefundAmount},
+			#{cashCoupon},
+			#{refundRechargpCoupon},
+			#{feeCharge},
+			#{rate},
+			#{payFlag},
+			#{serialNumber},
+			#{oppositeAccount},
+			#{otherName},
+			#{bankOrder},
+			#{businessBasicOrder},
+			#{businessBillingSource},
+			#{businessOrder},
+			#{businessDescription},
+			#{remark},
+			#{rateRemark},
+			#{paymentNotes},
+			#{createrSn},
+			#{createTime}
+	</insert>
+
+	<insert id="saveData" parameterType="com.kmall.admin.entity.MallPaymentOrderDataEntity" useGeneratedKeys="true" keyProperty="payOrderId">
+		insert into mall2_payment_order_data
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="merchantName != null" >
+				`merchant_name`,
+			</if>
+			<if test="outTradeNo != null" >
+				`out_trade_no`,
+			</if>
+			<if test="payMoney != null" >
+				`pay_money`,
+			</if>
+			<if test="refundMoney != null" >
+				`refund_money`,
+			</if>
+			<if test="payType != null" >
+				`pay_type`,
+			</if>
+			<if test="paymentType != null" >
+				`payment_type`,
+			</if>
+			<if test="transactionOrder != null" >
+				`transaction_order`,
+			</if>
+			<if test="timeStr != null" >
+				`time_str`,
+			</if>
+			<if test="attach != null" >
+				`attach`,
+			</if>
+			<if test="transactionStatus != null" >
+				`transaction_status`,
+			</if>
+			<if test="currencyType != null" >
+				`currency_type`,
+			</if>
+			<if test="amountOrder != null" >
+				`Amount_order`,
+			</if>
+			<if test="refundId != null" >
+				`refund_id`,
+			</if>
+			<if test="merRefundNumber != null" >
+				`mer_refund_number`,
+			</if>
+			<if test="refundType != null" >
+				`refund_type`,
+			</if>
+			<if test="refundStatus != null" >
+				`refund_status`,
+			</if>
+			<if test="applyRefundAmount != null" >
+				`apply_refund_amount`,
+			</if>
+			<if test="cashCoupon != null" >
+				`cash_coupon`,
+			</if>
+			<if test="refundRechargpCoupon != null" >
+				`refund_rechargp_coupon`,
+			</if>
+			<if test="feeCharge != null" >
+				`fee_charge`,
+			</if>
+			<if test="rate != null" >
+				`rate`,
+			</if>
+			<if test="payFlag != null" >
+				`pay_flag`,
+			</if>
+			<if test="serialNumber != null" >
+				`serial_number`,
+			</if>
+			<if test="oppositeAccount != null" >
+				`opposite_account`,
+			</if>
+			<if test="otherName != null" >
+				`other_name`,
+			</if>
+			<if test="bankOrder != null" >
+				`bank_order`,
+			</if>
+			<if test="businessBasicOrder != null" >
+				`business_basic_order`,
+			</if>
+			<if test="businessBillingSource != null" >
+				`business_billing_source`,
+			</if>
+			<if test="businessOrder != null" >
+				`business_order`,
+			</if>
+			<if test="businessDescription != null" >
+				`business_description`,
+			</if>
+			<if test="remark != null" >
+				`remark`,
+			</if>
+			<if test="rateRemark != null" >
+				`rate_remark`,
+			</if>
+			<if test="paymentNotes != null" >
+				`payment_notes`,
+			</if>
+			<if test="createrSn != null" >
+				`creater_sn`,
+			</if>
+			<if test="createTime != null" >
+				`create_time`,
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="merchantName != null" >
+				#{merchantName},
+			</if>
+			<if test="outTradeNo != null" >
+				#{outTradeNo},
+			</if>
+			<if test="payMoney != null" >
+				#{payMoney},
+			</if>
+			<if test="refundMoney != null" >
+				#{refundMoney},
+			</if>
+			<if test="payType != null" >
+				#{payType},
+			</if>
+			<if test="paymentType != null" >
+				#{paymentType},
+			</if>
+			<if test="transactionOrder != null" >
+				#{transactionOrder},
+			</if>
+			<if test="timeStr != null" >
+				#{timeStr},
+			</if>
+			<if test="attach != null" >
+				#{attach},
+			</if>
+			<if test="transactionStatus != null" >
+				#{transactionStatus},
+			</if>
+			<if test="currencyType != null" >
+				#{currencyType},
+			</if>
+			<if test="amountOrder != null" >
+				#{amountOrder},
+			</if>
+			<if test="refundId != null" >
+				#{refundId},
+			</if>
+			<if test="merRefundNumber != null" >
+				#{merRefundNumber},
+			</if>
+			<if test="refundType != null" >
+				#{refundType},
+			</if>
+			<if test="refundStatus != null" >
+				#{refundStatus},
+			</if>
+			<if test="applyRefundAmount != null" >
+				#{applyRefundAmount},
+			</if>
+			<if test="cashCoupon != null" >
+				#{cashCoupon},
+			</if>
+			<if test="refundRechargpCoupon != null" >
+				#{refundRechargpCoupon},
+			</if>
+			<if test="feeCharge != null" >
+				#{feeCharge},
+			</if>
+			<if test="rate != null" >
+				#{rate},
+			</if>
+			<if test="payFlag != null" >
+				#{payFlag},
+			</if>
+			<if test="serialNumber != null" >
+				#{serialNumber},
+			</if>
+			<if test="oppositeAccount != null" >
+				#{oppositeAccount},
+			</if>
+			<if test="otherName != null" >
+				#{otherName},
+			</if>
+			<if test="bankOrder != null" >
+				#{bankOrder},
+			</if>
+			<if test="businessBasicOrder != null" >
+				#{businessBasicOrder},
+			</if>
+			<if test="businessBillingSource != null" >
+				#{businessBillingSource},
+			</if>
+			<if test="businessOrder != null" >
+				#{businessOrder},
+			</if>
+			<if test="businessDescription != null" >
+				#{businessDescription},
+			</if>
+			<if test="remark != null" >
+				#{remark},
+			</if>
+			<if test="rateRemark != null" >
+				#{rateRemark},
+			</if>
+			<if test="paymentNotes != null" >
+				#{paymentNotes},
+			</if>
+			<if test="createrSn != null" >
+				#{createrSn},
+			</if>
+			<if test="createTime != null" >
+				#{createTime},
+			</if>
+		</trim>
+	</insert>
+	 
+	<update id="update" parameterType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
+		update mall2_payment_order_data 
+		<set>
+			<if test="merchantName != null">`merchant_name` = #{merchantName}, </if>
+			<if test="outTradeNo != null">`out_trade_no` = #{outTradeNo}, </if>
+			<if test="payMoney != null">`pay_money` = #{payMoney}, </if>
+			<if test="refundMoney != null">`refund_money` = #{refundMoney}, </if>
+			<if test="payType != null">`pay_type` = #{payType}, </if>
+			<if test="paymentType != null">`payment_type` = #{paymentType}, </if>
+			<if test="transactionOrder != null">`transaction_order` = #{transactionOrder}, </if>
+			<if test="timeStr != null">`time_str` = #{timeStr}, </if>
+			<if test="attach != null">`attach` = #{attach}, </if>
+			<if test="transactionStatus != null">`transaction_status` = #{transactionStatus}, </if>
+			<if test="currencyType != null">`currency_type` = #{currencyType}, </if>
+			<if test="amountOrder != null">`Amount_order` = #{amountOrder}, </if>
+			<if test="refundId != null">`refund_id` = #{refundId}, </if>
+			<if test="merRefundNumber != null">`mer_refund_number` = #{merRefundNumber}, </if>
+			<if test="refundType != null">`refund_type` = #{refundType}, </if>
+			<if test="refundStatus != null">`refund_status` = #{refundStatus}, </if>
+			<if test="applyRefundAmount != null">`apply_refund_amount` = #{applyRefundAmount}, </if>
+			<if test="cashCoupon != null">`cash_coupon` = #{cashCoupon}, </if>
+			<if test="refundRechargpCoupon != null">`refund_rechargp_coupon` = #{refundRechargpCoupon}, </if>
+			<if test="feeCharge != null">`fee_charge` = #{feeCharge}, </if>
+			<if test="rate != null">`rate` = #{rate}, </if>
+			<if test="payFlag != null">`pay_flag` = #{payFlag}, </if>
+			<if test="serialNumber != null">`serial_number` = #{serialNumber}, </if>
+			<if test="oppositeAccount != null">`opposite_account` = #{oppositeAccount}, </if>
+			<if test="otherName != null">`other_name` = #{otherName}, </if>
+			<if test="bankOrder != null">`bank_order` = #{bankOrder}, </if>
+			<if test="businessBasicOrder != null">`business_basic_order` = #{businessBasicOrder}, </if>
+			<if test="businessBillingSource != null">`business_billing_source` = #{businessBillingSource}, </if>
+			<if test="businessOrder != null">`business_order` = #{businessOrder}, </if>
+			<if test="businessDescription != null">`business_description` = #{businessDescription}, </if>
+			<if test="remark != null">`remark` = #{remark}, </if>
+			<if test="rateRemark != null">`rate_remark` = #{rateRemark}, </if>
+			<if test="paymentNotes != null">`payment_notes` = #{paymentNotes}, </if>
+			<if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
+			<if test="createTime != null">`create_time` = #{createTime}, </if>
+			<if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
+			<if test="modTime != null">`mod_time` = #{modTime}, </if>
+			<if test="tstm != null">`tstm` = #{tstm}</if>
+		</set>
+		where pay_order_id = #{payOrderId}
+	</update>
+	
+	<delete id="delete">
+		delete from mall2_payment_order_data where pay_order_id = #{value}
+	</delete>
+	
+	<delete id="deleteBatch">
+		delete from mall2_payment_order_data where pay_order_id in 
+		<foreach item="payOrderId" collection="array" open="(" separator="," close=")">
+			#{payOrderId}
+		</foreach>
+	</delete>
+
+</mapper>

+ 341 - 0
kmall-admin/src/main/webapp/WEB-INF/page/shop/mallpaymentorderdata.html

@@ -0,0 +1,341 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>支付订单表</title>
+    #parse("sys/header.html")
+</head>
+<body>
+<div id="rrapp" v-cloak>
+	<div v-show="showList">
+        <Row :gutter="16">
+            <div class="search-group">
+                    <i-col span="3">
+                        <i-select v-model="q.payFlag" filterable placeholder="支付类型">
+                            <i-option v-for="mct in machineCodeTypes" :value="mct.value" :key="mct.value">{{mct.name}}</i-option>
+                        </i-select>
+                    </i-col>
+                    <i-col span="3">
+                        <Date-picker v-model="q.startTime" placeholder="创建订单开始时间"/>
+                    </i-col>
+                    <i-col span="3">
+                        <Date-picker v-model="q.endTime" placeholder="创建订单结束时间"/>
+                    </i-col>
+                <i-button @click="query">查询</i-button>
+                <i-button @click="reloadSearch">重置</i-button>
+            </div>
+            <div class="buttons-group">
+                #if($shiro.hasPermission("mallpaymentorderdata:save"))
+                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
+                #end
+                #if($shiro.hasPermission("mallpaymentorderdata:update"))
+                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
+                #end
+                #if($shiro.hasPermission("mallpaymentorderdata:delete"))
+                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
+                #end
+                #if($shiro.hasPermission("mallpaymentorderdata:down"))
+                <a href="../statics/file/wx.xls">微信账单模板下载</a>&nbsp;&nbsp;&nbsp;&nbsp;
+                <a href="../statics/file/ali.xls">支付宝账单模版下载</a>
+                #end
+                #if($shiro.hasPermission("mallpaymentorderdata:exportDataFormat"))
+                <i-button type="primary" @click="exportDataFormat"><i class="fa fa-cloud-download"></i>&nbsp;导出数据</i-button>
+                #end
+                #if($shiro.hasPermission("mallpaymentorderdata:upload"))
+                <i-button type="ghost" @click="upload" icon="ios-cloud-upload-outline">&nbsp;数据上传</i-button>
+                #end
+
+            </div>
+        </Row>
+	    <table id="jqGrid"></table>
+	    <div id="jqGridPager"></div>
+    </div>
+
+    <Card v-show="">
+        <p slot="title">{{title}}</p>
+		<i-form ref="formValidate" :model="mallpaymentorderdata" :rules="ruleValidate" :label-width="80">
+            <Form-item label="商户名称" prop="merchantName">
+                <i-input v-model="mallpaymentorderdata.merchantName" placeholder="商户名称"/>
+            </Form-item>
+            <Form-item label="商户订单号" prop="outTradeNo">
+                <i-input v-model="mallpaymentorderdata.outTradeNo" placeholder="商户订单号"/>
+            </Form-item>
+            <Form-item label="支付金额(wx订单金额 zfb收入)" prop="payMoney">
+                <i-input v-model="mallpaymentorderdata.payMoney" placeholder="支付金额(wx订单金额 zfb收入)"/>
+            </Form-item>
+            <Form-item label="退款金额(wx退款金额  zfb支出)" prop="refundMoney">
+                <i-input v-model="mallpaymentorderdata.refundMoney" placeholder="退款金额(wx退款金额  zfb支出)"/>
+            </Form-item>
+            <Form-item label="支付类型(wx交易类型 zfb账务类型)" prop="payType">
+                <i-input v-model="mallpaymentorderdata.payType" placeholder="支付类型(wx交易类型 zfb账务类型)"/>
+            </Form-item>
+            <Form-item label="付款类型(wx付款银行 zfb支付渠道)" prop="paymentType">
+                <i-input v-model="mallpaymentorderdata.paymentType" placeholder="付款类型(wx付款银行 zfb支付渠道)"/>
+            </Form-item>
+            <Form-item label="交易订单号(wx订单号,zfb交易号)" prop="transactionOrder">
+                <i-input v-model="mallpaymentorderdata.transactionOrder" placeholder="交易订单号(wx订单号,zfb交易号)"/>
+            </Form-item>
+            <Form-item label="时间" prop="timeStr">
+                <i-input v-model="mallpaymentorderdata.timeStr" placeholder="时间"/>
+            </Form-item>
+            <Form-item label="商家数据包,原样返回" prop="attach">
+                <i-input v-model="mallpaymentorderdata.attach" placeholder="商家数据包,原样返回"/>
+            </Form-item>
+            <Form-item label="交易状态" prop="transactionStatus">
+                <i-input v-model="mallpaymentorderdata.transactionStatus" placeholder="交易状态"/>
+            </Form-item>
+            <Form-item label="货币种类" prop="currencyType">
+                <i-input v-model="mallpaymentorderdata.currencyType" placeholder="货币种类"/>
+            </Form-item>
+            <Form-item label="应结订单金额" prop="amountOrder">
+                <i-input v-model="mallpaymentorderdata.amountOrder" placeholder="应结订单金额"/>
+            </Form-item>
+            <Form-item label="微信退款单号" prop="refundId">
+                <i-input v-model="mallpaymentorderdata.refundId" placeholder="微信退款单号"/>
+            </Form-item>
+            <Form-item label="商户退款单号" prop="merRefundNumber">
+                <i-input v-model="mallpaymentorderdata.merRefundNumber" placeholder="商户退款单号"/>
+            </Form-item>
+            <Form-item label="退款状态" prop="refundStatus">
+                <i-input v-model="mallpaymentorderdata.refundStatus" placeholder="退款状态"/>
+            </Form-item>
+            <Form-item label="代金券" prop="cashCoupon">
+                <i-input v-model="mallpaymentorderdata.cashCoupon" placeholder="代金券"/>
+            </Form-item>
+            <Form-item label="充值券退款金额" prop="refundRechargpCoupon">
+                <i-input v-model="mallpaymentorderdata.refundRechargpCoupon" placeholder="充值券退款金额"/>
+            </Form-item>
+            <Form-item label="手续费" prop="feeCharge">
+                <i-input v-model="mallpaymentorderdata.feeCharge" placeholder="手续费"/>
+            </Form-item>
+            <Form-item label="费率" prop="rate">
+                <i-input v-model="mallpaymentorderdata.rate" placeholder="费率"/>
+            </Form-item>
+            <Form-item label="支付方式:weixin:微信;pingan平安支付;wxglobalpay:微信国际支付;tenpay:QQ财付通;alipay:支付宝;cash:现金" prop="payFlag">
+                <i-input v-model="mallpaymentorderdata.payFlag" placeholder="支付方式:weixin:微信;pingan平安支付;wxglobalpay:微信国际支付;tenpay:QQ财付通;alipay:支付宝;cash:现金"/>
+            </Form-item>
+            <Form-item label="流水号" prop="serialNumber">
+                <i-input v-model="mallpaymentorderdata.serialNumber" placeholder="流水号"/>
+            </Form-item>
+            <Form-item label="对方账户" prop="oppositeAccount">
+                <i-input v-model="mallpaymentorderdata.oppositeAccount" placeholder="对方账户"/>
+            </Form-item>
+            <Form-item label="对方名称" prop="otherName">
+                <i-input v-model="mallpaymentorderdata.otherName" placeholder="对方名称"/>
+            </Form-item>
+            <Form-item label="银行订单号" prop="bankOrder">
+                <i-input v-model="mallpaymentorderdata.bankOrder" placeholder="银行订单号"/>
+            </Form-item>
+            <Form-item label="业务基础订单号" prop="businessBasicOrder">
+                <i-input v-model="mallpaymentorderdata.businessBasicOrder" placeholder="业务基础订单号"/>
+            </Form-item>
+            <Form-item label="业务账单来源" prop="businessBillingSource">
+                <i-input v-model="mallpaymentorderdata.businessBillingSource" placeholder="业务账单来源"/>
+            </Form-item>
+            <Form-item label="业务订单号" prop="businessOrder">
+                <i-input v-model="mallpaymentorderdata.businessOrder" placeholder="业务订单号"/>
+            </Form-item>
+            <Form-item label="业务描述" prop="businessDescription">
+                <i-input v-model="mallpaymentorderdata.businessDescription" placeholder="业务描述"/>
+            </Form-item>
+            <Form-item label="备注" prop="remark">
+                <i-input v-model="mallpaymentorderdata.remark" placeholder="备注"/>
+            </Form-item>
+            <Form-item label="费率备注" prop="rateRemark">
+                <i-input v-model="mallpaymentorderdata.rateRemark" placeholder="费率备注"/>
+            </Form-item>
+            <Form-item label="付款备注" prop="paymentNotes">
+                <i-input v-model="mallpaymentorderdata.paymentNotes" placeholder="付款备注"/>
+            </Form-item>
+            <Form-item label="创建人编号" prop="createrSn">
+                <i-input v-model="mallpaymentorderdata.createrSn" placeholder="创建人编号"/>
+            </Form-item>
+            <Form-item label="创建时间" prop="createTime">
+                <i-input v-model="mallpaymentorderdata.createTime" placeholder="创建时间"/>
+            </Form-item>
+            <Form-item label="修改人编号" prop="moderSn">
+                <i-input v-model="mallpaymentorderdata.moderSn" placeholder="修改人编号"/>
+            </Form-item>
+            <Form-item label="修改时间" prop="modTime">
+                <i-input v-model="mallpaymentorderdata.modTime" placeholder="修改时间"/>
+            </Form-item>
+            <Form-item label="时间戳" prop="tstm">
+                <i-input v-model="mallpaymentorderdata.tstm" placeholder="时间戳"/>
+            </Form-item>
+            <Form-item>
+                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
+                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
+            </Form-item>
+        </i-form>
+	</Card>
+
+    <Card v-show="showDiv==2">
+        <p slot="title">{{title}}</p>
+        <i-form ref="formValidate" :model="mallpaymentorderdata" :rules="ruleValidate" :label-width="80">
+            <Form-item label="商户名称" prop="merchantName">
+                <i-input v-model="mallpaymentorderdata.merchantName" placeholder="商户名称" readonly/>
+            </Form-item>
+            <Form-item label="商户订单号" prop="outTradeNo">
+                <i-input v-model="mallpaymentorderdata.outTradeNo" placeholder="商户订单号" readonly/>
+            </Form-item>
+            <Form-item label="支付金额" prop="payMoney">
+                <i-input v-model="mallpaymentorderdata.payMoney" placeholder="支付金额(wx订单金额 zfb收入)" readonly/>
+            </Form-item>
+            <Form-item label="退款金额" prop="refundMoney">
+                <i-input v-model="mallpaymentorderdata.refundMoney" placeholder="退款金额(wx退款金额  zfb支出)"/>
+            </Form-item>
+            <Form-item label="支付类型" prop="payType">
+                <i-input v-model="mallpaymentorderdata.payType" placeholder="支付类型(wx交易类型 zfb账务类型)" readonly/>
+            </Form-item>
+            <Form-item label="付款类型" prop="paymentType">
+                <i-input v-model="mallpaymentorderdata.paymentType" placeholder="付款类型(wx付款银行 zfb支付渠道)" readonly/>
+            </Form-item>
+            <Form-item label="交易订单号" prop="transactionOrder">
+                <i-input v-model="mallpaymentorderdata.transactionOrder" placeholder="交易订单号(wx订单号,zfb交易号)" readonly/>
+            </Form-item>
+            <Form-item label="时间" prop="timeStr">
+                <i-input v-model="mallpaymentorderdata.timeStr" placeholder="时间" readonly/>
+            </Form-item>
+            <Form-item label="商家数据包,原样返回" prop="attach">
+                <i-input v-model="mallpaymentorderdata.attach" placeholder="商家数据包,原样返回" readonly/>
+            </Form-item>
+            <Form-item label="交易状态" prop="transactionStatus">
+                <i-input v-model="mallpaymentorderdata.transactionStatus" placeholder="交易状态" readonly/>
+            </Form-item>
+            <Form-item label="货币种类" prop="currencyType">
+                <i-input v-model="mallpaymentorderdata.currencyType" placeholder="货币种类" readonly/>
+            </Form-item>
+            <Form-item label="应结订单金额" prop="amountOrder">
+                <i-input v-model="mallpaymentorderdata.amountOrder" placeholder="应结订单金额" readonly/>
+            </Form-item>
+            <Form-item label="微信退款单号" prop="refundId">
+                <i-input v-model="mallpaymentorderdata.refundId" placeholder="微信退款单号" readonly/>
+            </Form-item>
+            <Form-item label="商户退款单号" prop="merRefundNumber" readonly>
+                <i-input v-model="mallpaymentorderdata.merRefundNumber" placeholder="商户退款单号" readonly/>
+            </Form-item>
+            <Form-item label="退款状态" prop="refundStatus">
+                <i-input v-model="mallpaymentorderdata.refundStatus" placeholder="退款状态" readonly/>
+            </Form-item>
+            <Form-item label="代金券" prop="cashCoupon">
+                <i-input v-model="mallpaymentorderdata.cashCoupon" placeholder="代金券" readonly/>
+            </Form-item>
+            <Form-item label="充值券退款金额" prop="refundRechargpCoupon">
+                <i-input v-model="mallpaymentorderdata.refundRechargpCoupon" placeholder="充值券退款金额" readonly/>
+            </Form-item>
+            <Form-item label="手续费" prop="feeCharge">
+                <i-input v-model="mallpaymentorderdata.feeCharge" placeholder="手续费" readonly/>
+            </Form-item>
+            <Form-item label="费率" prop="rate">
+                <i-input v-model="mallpaymentorderdata.rate" placeholder="费率" readonly/>
+            </Form-item>
+            <Form-item label="支付方式" prop="payFlag">
+                <i-input v-model="mallpaymentorderdata.payFlag" placeholder="支付方式" readonly/>
+            </Form-item>
+            <Form-item label="费率备注" prop="rateRemark">
+                <i-input v-model="mallpaymentorderdata.rateRemark" placeholder="费率备注" readonly/>
+            </Form-item>
+            <Form-item>
+                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+            </Form-item>
+        </i-form>
+    </Card>
+    <Card v-show="showDiv==1">
+        <p slot="title">{{title}}</p>
+        <i-form ref="formValidate" :model="mallpaymentorderdata" :rules="ruleValidate" :label-width="80">
+            <Form-item label="商户名称" prop="merchantName">
+                <i-input v-model="mallpaymentorderdata.merchantName" placeholder="商户名称" readonly/>
+            </Form-item>
+            <Form-item label="商户订单号" prop="outTradeNo">
+                <i-input v-model="mallpaymentorderdata.outTradeNo" placeholder="商户订单号" readonly/>
+            </Form-item>
+            <Form-item label="支付金额" prop="payMoney">
+                <i-input v-model="mallpaymentorderdata.payMoney" placeholder="支付金额(wx订单金额 zfb收入)" readonly/>
+            </Form-item>
+            <Form-item label="退款金额" prop="refundMoney">
+                <i-input v-model="mallpaymentorderdata.refundMoney" placeholder="退款金额(wx退款金额  zfb支出)" readonly/>
+            </Form-item>
+            <Form-item label="支付类型" prop="payType">
+                <i-input v-model="mallpaymentorderdata.payType" placeholder="支付类型(wx交易类型 zfb账务类型)" readonly/>
+            </Form-item>
+            <Form-item label="付款类型" prop="paymentType">
+                <i-input v-model="mallpaymentorderdata.paymentType" placeholder="付款类型(wx付款银行 zfb支付渠道)" readonly/>
+            </Form-item>
+            <Form-item label="交易订单号" prop="transactionOrder">
+                <i-input v-model="mallpaymentorderdata.transactionOrder" placeholder="交易订单号(wx订单号,zfb交易号)" readonly/>
+            </Form-item>
+            <Form-item label="时间" prop="timeStr">
+                <i-input v-model="mallpaymentorderdata.timeStr" placeholder="时间" readonly/>
+            </Form-item>
+            <Form-item label="支付方式" prop="payFlag">
+                <i-input v-model="mallpaymentorderdata.payFlag" placeholder="支付方式" readonly/>
+            </Form-item>
+            <Form-item label="流水号" prop="serialNumber">
+                <i-input v-model="mallpaymentorderdata.serialNumber" placeholder="流水号" readonly/>
+            </Form-item>
+            <Form-item label="对方账户" prop="oppositeAccount">
+                <i-input v-model="mallpaymentorderdata.oppositeAccount" placeholder="对方账户" readonly/>
+            </Form-item>
+            <Form-item label="对方名称" prop="otherName">
+                <i-input v-model="mallpaymentorderdata.otherName" placeholder="对方名称" readonly/>
+            </Form-item>
+            <Form-item label="银行订单号" prop="bankOrder">
+                <i-input v-model="mallpaymentorderdata.bankOrder" placeholder="银行订单号" readonly/>
+            </Form-item>
+            <Form-item label="业务基础订单号" prop="businessBasicOrder">
+                <i-input v-model="mallpaymentorderdata.businessBasicOrder" placeholder="业务基础订单号" readonly/>
+            </Form-item>
+            <Form-item label="业务账单来源" prop="businessBillingSource">
+                <i-input v-model="mallpaymentorderdata.businessBillingSource" placeholder="业务账单来源" readonly/>
+            </Form-item>
+            <Form-item label="业务订单号" prop="businessOrder">
+                <i-input v-model="mallpaymentorderdata.businessOrder" placeholder="业务订单号" readonly/>
+            </Form-item>
+            <Form-item label="业务描述" prop="businessDescription">
+                <i-input v-model="mallpaymentorderdata.businessDescription" placeholder="业务描述" readonly/>
+            </Form-item>
+            <Form-item label="备注" prop="remark">
+                <i-input v-model="mallpaymentorderdata.remark" placeholder="备注" readonly/>
+            </Form-item>
+            <Form-item label="付款备注" prop="paymentNotes">
+                <i-input v-model="mallpaymentorderdata.paymentNotes" placeholder="付款备注" readonly/>
+            </Form-item>
+            <Form-item>
+                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+            </Form-item>
+        </i-form>
+    </Card>
+    <div class="modal fade" id="salesDataFormDiv"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+        <div class="modal-dialog">
+            <div class="modal-content">
+                <div class="modal-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                    <h4 class="modal-title" id="exampleModalLabel">上传数据</h4>
+                </div>
+                <div class="modal-body">
+                    <form id="salesDataUploadForm">
+                        <div class="form-group">
+                            支付类型:
+                            <i-select v-model="q.payFlag" filterable placeholder="支付类型" label-in-value style="width:300px;">
+                             <i-option v-for="mct in machineCodeTypes" :value="mct.value" :key="mct.value">{{mct.name}}</i-option>
+                            </i-select>
+                        </div>
+                        <div class="form-group">
+                            <input type="file" name="file" id="file">
+                            <br>
+                            <span style="display: block;">温馨提示: 请选择Excel文件进行导入</span>
+                        </div>
+                    </form>
+                </div>
+                <div class="modal-footer">
+                    <button type="button" id="cancel" class="btn btn-default" data-dismiss="modal">取消</button>
+                    <button type="button" class="btn btn-primary" @click="uploadFormSubmit">确认</button>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script src="${rc.contextPath}/js/shop/mallpaymentorderdata.js?_${date.systemTime}"></script>
+</body>
+</html>

+ 317 - 0
kmall-admin/src/main/webapp/js/shop/mallpaymentorderdata.js

@@ -0,0 +1,317 @@
+$(function () {
+    $("#jqGrid").jqGrid({
+        url: '../mallpaymentorderdata/list',
+        datatype: "json",
+        colModel: [
+			{label: '编号', name: 'payOrderId', index: 'pay_order_id', key: true, hidden: true},
+			{label: '商户名称', name: 'merchantName', index: 'merchant_name', width: 80},
+			{label: '商户订单号', name: 'outTradeNo', index: 'out_trade_no', width: 80},
+			{label: '支付金额', name: 'payMoney', index: 'pay_money', width: 80},
+			{label: '退款金额', name: 'refundMoney', index: 'refund_money', width: 80},
+			{label: '支付类型', name: 'payType', index: 'pay_type', width: 80},
+			{label: '付款类型', name: 'paymentType', index: 'payment_type', width: 80},
+			{label: '交易订单号', name: 'transactionOrder', index: 'transaction_order', width: 80},
+			{label: '时间', name: 'timeStr', index: 'time_str', width: 80},
+			{label: '支付方式', name: 'payFlag', index: 'pay_flag', width: 80},
+			{
+				label: '操作', width: 180, sortable: false,align: 'center',
+				formatter: function (value, col, row) {
+					let htmlStr = '';
+					if (row.payFlag == 'weixin') {
+						htmlStr='<button class="btn btn-outline btn-info" onclick="vm.lookDetailwx(' + row.payOrderId + ')"><i class="fa fa-info-circle"></i>详情</button>&nbsp;';
+					}else {
+						htmlStr='<button class="btn btn-outline btn-info" onclick="vm.lookDetailali(' + row.payOrderId + ')"><i class="fa fa-info-circle"></i>详情</button>&nbsp;';
+					}
+					return htmlStr;
+				}
+			}
+			],
+		viewrecords: true,
+        height: 550,
+        rowNum: 10,
+        rowList: [10, 30, 50],
+        rownumbers: true,
+        rownumWidth: 25,
+        autowidth: true,
+        multiselect: true,
+        pager: "#jqGridPager",
+        jsonReader: {
+            root: "page.list",
+            page: "page.currPage",
+            total: "page.totalPage",
+            records: "page.totalCount"
+        },
+        prmNames: {
+            page: "page",
+            rows: "limit",
+            order: "order"
+        },
+        gridComplete: function () {
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
+        }
+    });
+});
+
+let vm = new Vue({
+	el: '#rrapp',
+	data: {
+        showList: true,
+        title: null,
+		payFlag:'',
+		showDiv:'',
+		mallpaymentorderdata: {},
+		machineCodeTypes:[],
+		ruleValidate: {
+			name: [
+				{required: true, message: '名称不能为空', trigger: 'blur'}
+			]
+		},
+		q: {
+			payFlag: '',
+			startTime:'',
+			endTime:'',
+		}
+	},
+	methods: {
+		query: function () {
+			vm.reload();
+		},
+		add: function () {
+			vm.showList = false;
+			vm.title = "新增";
+			vm.mallpaymentorderdata = {};
+		},
+		update: function (event) {
+            let payOrderId = getSelectedRow();
+			if (payOrderId == null) {
+				return;
+			}
+			vm.showList = false;
+            vm.title = "修改";
+
+            vm.getInfo(payOrderId)
+		},
+		saveOrUpdate: function (event) {
+            let url = vm.mallpaymentorderdata.payOrderId == null ? "../mallpaymentorderdata/save" : "../mallpaymentorderdata/update";
+			$.ajax({
+				type: "POST",
+			    url: url,
+			    contentType: "application/json",
+			    data: JSON.stringify(vm.mallpaymentorderdata),
+                success: function (r) {
+                    if (r.code === 0) {
+                        alert('操作成功', function (index) {
+                            vm.reload();
+                        });
+                    } else {
+                        alert(r.msg);
+                    }
+                }
+			});
+		},
+		del: function (event) {
+            let payOrderIds = getSelectedRows();
+			if (payOrderIds == null){
+				return;
+			}
+
+			confirm('确定要删除选中的记录?', function () {
+				$.ajax({
+					type: "POST",
+				    url: "../mallpaymentorderdata/delete",
+				    contentType: "application/json",
+				    data: JSON.stringify(payOrderIds),
+				    success: function (r) {
+						if (r.code == 0) {
+							alert('操作成功', function (index) {
+								$("#jqGrid").trigger("reloadGrid");
+							});
+						} else {
+							alert(r.msg);
+						}
+					}
+				});
+			});
+		},
+		getInfo: function(payOrderId){
+			$.get("../mallpaymentorderdata/info/"+payOrderId, function (r) {
+                vm.mallpaymentorderdata = r.mallPaymentOrderData;
+            });
+		},
+		lookDetailwx: function (rowId) { //第三步:定义编辑操作
+			vm.showDiv = 2;
+			vm.title = "账单详情";
+			vm.showList =false;
+			vm.getInfo(rowId);
+		},
+		lookDetailali: function (rowId) { //第三步:定义编辑操作
+			vm.showDiv = 1;
+			vm.title = "账单详情";
+			vm.showList =false;
+			vm.getInfo(rowId);
+		},
+        reloadSearch: function() {
+            vm.q = {
+                name: '',
+				payFlag: '',
+				startTime:'',
+				endTime:'',
+            }
+            vm.reload();
+		},
+		reload: function (event) {
+			vm.showList = true;
+			vm.showDiv='';
+            let page = $("#jqGrid").jqGrid('getGridParam', 'page');
+			$("#jqGrid").jqGrid('setGridParam', {
+                postData: {'name': vm.q.name,
+					'payFlag': vm.q.payFlag,
+					'startTime': vm.q.startTime,
+					'endTime': vm.q.endTime,},
+                page: page
+            }).trigger("reloadGrid");
+            vm.handleReset('formValidate');
+		},
+        handleSubmit: function (name) {
+            handleSubmitValidate(this, name, function () {
+                vm.saveOrUpdate()
+            });
+        },
+        handleReset: function (name) {
+            handleResetForm(this, name);
+        },
+		uploadExcelSuccess: function () {
+			alert('上传成功', function (index) {
+				$("#jqGrid").trigger("reloadGrid");
+			});
+			setTimeout(exportMsg, 100);
+		},
+		uploadExcelError: function () {
+			alert('上传出现异常');
+			setTimeout(exportMsg, 100);
+		},
+		uploadExcelProgress:function(event, file, fileList){
+			console.log("上传中")
+			console.log(event)
+			console.log(file)
+			console.log(fileList)
+			console.log("上传中")
+			exportMsg = this.$Message.loading({
+				content: 'Loading...',
+				duration: 0
+			});
+			// setTimeout(msg, 3000);
+		},
+		uploadExcelSuccess: function (data) {
+			if(data.code==0){
+				alert('导入成功', function (index) {
+					vm.reload();
+				});
+			}else{
+				if(data.msg == '导入成功!'){
+					alert(data.msg);
+					vm.reload();
+				}else {
+					alert(data.msg);
+				}
+			}
+		},
+		uploadExcelError: function (data) {
+			console.log(data);
+			alert('上传出现异常,请重试!');
+			setTimeout(exportMsg, 100);
+		},
+		uploadExcelFormatError: function (file) {
+			this.$Notice.warning({
+				title: '文件格式不正确',
+				desc: '文件 ' + file.name + ' 格式不正确,请上传 xls 或 xlsx 格式的文件。'
+			});
+			setTimeout(exportMsg, 100);
+		},
+		upload: function (){
+			$('#salesDataFormDiv').modal('show');
+		},
+		uploadFormSubmit: function () {
+			debugger;
+			if(!vm.q.payFlag){
+				alert("请选择支付类型");
+				return ;
+			}
+			// if(!vm.checkTime){
+			// 	alert("请选择核对时间");
+			// }
+			let fileName = $('#file').val();
+			if(!fileName){
+				alert("选择上传文件");
+				return ;
+			}
+			if(fileName.lastIndexOf(".xlsx") == -1 && fileName.lastIndexOf(".xls") == -1){
+				fileName = fileName.substring(fileName.lastIndexOf("\\")+1);
+				alert("文件 " + fileName + " 格式不正确,请上传 xls 或 xlsx 格式的文件。");
+				return ;
+			}
+
+			let formData = new FormData();
+			formData.append("file", document.getElementById("file").files[0]);
+			formData.append("payFlag", vm.q.payFlag);
+
+			$.ajax({
+				async: false,
+				type: "POST",
+				url: "../mallpaymentorderdata/upload",
+				data: formData,
+				mimeType: "multipart/form-data",
+				contentType: false,
+				processData: false,
+				success: function (data) {
+					if(data.code==0){
+						$('#cancel').click();
+						alert('导入成功', function (index) {
+							$("#jqGrid").trigger("reloadGrid");
+						});
+					}else{
+						alert(data.msg);
+					}
+				}
+			});
+		},
+		exportDataFormat : function () {
+
+			var params = {};
+			params.payFlag=vm.q.payFlag;
+			params.startTime=vm.q.startTime;
+			params.endTime=vm.q.endTime;
+			if(!params.payFlag){
+				alert("请选择支付类型");
+				return ;
+			}
+			if(!params.startTime || !params.endTime){
+				alert("请选择创建订单时间");
+				return ;
+			}
+			let startDateTime = Date.parse(new Date(params.startTime));
+			let endDateTime = Date.parse(new Date(params.endTime));
+			if(startDateTime > endDateTime){
+				alert("创建订单开始时间不能大于创建订单结束时间");
+				return ;
+			}
+
+			let day = Math.abs(parseInt((endDateTime - startDateTime)/1000/3600/24));
+			if(day > 30 || Object.is(day,NaN)){
+				alert("导出时间不能相差大于30天");
+				return ;
+			}
+			const msg = this.$Message.loading({
+				content: 'Loading...',
+				duration: 0
+			});
+			exportFile('#rrapp', '../mallpaymentorderdata/exportDataFormat', params);
+			setTimeout(msg, 1000);
+		},
+	},
+	mounted() {
+		$.get("../sys/macro/queryMacrosByValue?value=payFlag", function (r) {
+			vm.machineCodeTypes = r.list;
+		});
+	},
+});

BIN
kmall-admin/src/main/webapp/statics/file/ali.xls


BIN
kmall-admin/src/main/webapp/statics/file/wx.xls


+ 7 - 0
kmall-common/src/main/java/com/kmall/common/constant/JxlsXmlTemplateName.java

@@ -58,4 +58,11 @@ public class JxlsXmlTemplateName {
     public static final String GOODS_PRODUCT_DTO_LIST = "/XmlTemplate/GoodsProductDtoList.xml";
     // 门店转移单导入
     public static final String STORE_TRANSFER_INVENTORY_ORDER_IMPORT_DTO_LIST = "/XmlTemplate/StoreTransferInventoryOrderImportDtoList.xml";
+
+    //微信账单导入
+    public static final String WX_PAYMENT_ORDER_DTO_List = "/XmlTemplate/WxPaymentOrderDtoList.xml";
+
+    //支付宝账单导入
+    public static final String ALI_PAYMENT_ORDER_DTO_List = "/XmlTemplate/AliPaymentOrderDtoList.xml";
+
 }