Commit 871c5105 by guojuxing

查询为开票单据列表

parent a878f9cb
package com.gic.enterprise.constant;
/**
* 未开票收据生成类型
* @ClassName: BuyTypeEnum

* @Description: 

* @author guojuxing

* @date 2019/8/15 3:28 PM

*/
public enum BuyTypeEnum {
BUY_SHORT_MESSAGE_PACKAGE(2, "短信套餐包购买"),
BALANCE_RECHARGE(1, "商户余额充值");
private int code;
private String message;
private BuyTypeEnum(int code, String message) {
this.code = code;
this.message = message;
}
public static String getMessageByCode(Integer code) {
if (code == null) {
return "未知";
}
for (BuyTypeEnum typeEnum : values()) {
if (code.intValue() == typeEnum.getCode()) {
return typeEnum.getMessage();
}
}
return "未知";
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.gic.enterprise.constant;
/**
* 支付方式类型
* @ClassName: PayTypeEnum

* @Description: 

* @author guojuxing

* @date 2019/8/15 3:24 PM

*/
public enum PayTypeEnum {
WE_CHAT_PAY(1, "微信支付"),
ALI_PAY(2, "支付宝支付"),
OFFLINE_PAY(3, "银行对公转账"),
BALANCE_PAY(4, "余额支付");
private int code;
private String message;
private PayTypeEnum(int code, String message) {
this.code = code;
this.message = message;
}
public static String getMessageByCode(Integer code) {
if (code == null) {
return "未知";
}
for (PayTypeEnum typeEnum : values()) {
if (code.intValue() == typeEnum.getCode()) {
return typeEnum.getMessage();
}
}
return "未知";
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
......@@ -239,17 +239,18 @@
<include refid="Base_Column_List" />
from tab_billing_pay_info
where enterprise_id = #{enterpriseId}
and time_end is not null
<if test="buyType != null">
buy_type = #{buyType}
and buy_type = #{buyType}
</if>
<if test="payType != null">
pay_type = #{payType}
and pay_type = #{payType}
</if>
<if test="startTime != null">
DATE_FORMAT(create_time,'%Y-%m-%d') >= #{startTime}
and DATE_FORMAT(time_end,'%Y-%m-%d') >= #{startTime}
</if>
<if test="endTime != null">
DATE_FORMAT(create_time,'%Y-%m-%d') &lt;= #{endTime}
and DATE_FORMAT(time_end,'%Y-%m-%d') &lt;= #{endTime}
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -28,7 +28,7 @@ public class EnterpriseApiServiceImplTest extends AbstractJUnit4SpringContextTes
// if (!response.isSuccess()) {
// System.out.println(response.getMessage());
// }
enterpriseInitService.initEnterpriseConfigInfo(25);
enterpriseApiService.listEnterprise(null, null, null, " order by a.create_time ", 1, 20);
System.out.println("success");
}
......
package com.gic.enterprise.web.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.qo.BillListQueryQO;
import com.gic.enterprise.service.BillingPayInfoApiService;
import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.enterprise.web.vo.BillListVO;
@RestController
@RequestMapping("/billing-pay-info")
public class BillingPayInfoController {
private static final Logger LOGGER = LoggerFactory.getLogger(BillingPayInfoController.class);
@Autowired
private BillingPayInfoApiService billingPayInfoApiService;
@RequestMapping("/list-bill")
public RestResponse listBill(BillListQueryQO params) {
return ResultControllerUtils.commonPageResult(billingPayInfoApiService.listBill(params), BillListVO.class);
}
}
package com.gic.enterprise.web.qo;
import java.io.Serializable;
/**
* 分页查询
*
* @author zhurz
*/
public class PageQO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 页码
*/
private Integer currentPage=1;
/**
* 分页大小
*/
private Integer pageSize=20;
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
}
package com.gic.enterprise.web.vo;
import com.gic.enterprise.constant.BuyTypeEnum;
import com.gic.enterprise.constant.PayTypeEnum;
import java.io.Serializable;
/**
* 未开票列表
* @ClassName: BillListVO

* @Description: 

* @author guojuxing

* @date 2019/8/15 2:59 PM

*/
public class BillListVO implements Serializable{
private static final long serialVersionUID = -3737832047382825129L;
/**
* 支付流水号
*/
private String serialNumber;
/**
* 支付方式 1微信 2支付宝 3.线下支付 4余额支付
*/
private Integer payType;
/**
* 支付方式名称
*/
private String payTypeStr;
/**
* 支付完成时间 (到账时间)
*/
private String timeEnd;
/**
* 实付金额
*/
private Double totalFeePaid;
/**
* 购买类型 1:商户余额充值 2:短信套餐包购买
*/
private Integer buyType;
/**
* 为开票单据生成方式名称
*/
private String buyTypeStr;
public String getSerialNumber() {
return serialNumber;
}
public void setSerialNumber(String serialNumber) {
this.serialNumber = serialNumber;
}
public void setPayType(Integer payType) {
this.payType = payType;
}
public String getPayTypeStr() {
return PayTypeEnum.getMessageByCode(payType);
}
public String getTimeEnd() {
return timeEnd;
}
public void setTimeEnd(String timeEnd) {
this.timeEnd = timeEnd;
}
public Double getTotalFeePaid() {
return totalFeePaid;
}
public void setTotalFeePaid(Double totalFeePaid) {
this.totalFeePaid = totalFeePaid;
}
public void setBuyType(Integer buyType) {
this.buyType = buyType;
}
public String getBuyTypeStr() {
return BuyTypeEnum.getMessageByCode(buyType);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment