md
This commit is contained in:
parent
919ed99bd1
commit
f5f233d9e7
@ -0,0 +1,99 @@
|
||||
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisSettleBillController.java
|
||||
* @author linfso
|
||||
* @date 2024-07-03 18:54:51
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 结算总账单 控制器 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.oms.web;
|
||||
|
||||
import com.xdadan.erp.oms.common.core.controller.BaseController;
|
||||
import com.xdadan.erp.oms.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.oms.common.core.page.PageDomain;
|
||||
import com.xdadan.erp.oms.common.core.page.TableSupport;
|
||||
import com.xdadan.erp.oms.domain.EmisSettleBill;
|
||||
import com.xdadan.erp.oms.domain.EmisWarehouseIn;
|
||||
import com.xdadan.erp.oms.service.svc.IRpcSettleBillSvc;
|
||||
import com.xdadan.erp.oms.service.svc.IRpcWarehouseInSvc;
|
||||
import com.xdadan.erp.oms.utils.WaybillHelper;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 结算总账单Controller
|
||||
*
|
||||
* @author linfso
|
||||
* @date 2024-07-03 18:54:51
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/oms2c/emisSettleBill")
|
||||
public class Oms2cSettleBillController extends BaseController
|
||||
{
|
||||
|
||||
@Autowired
|
||||
private IRpcSettleBillSvc iRpcSettleBillSvc;
|
||||
|
||||
/**
|
||||
* 查询结算总账单列表
|
||||
*/
|
||||
public AjaxResult listSimple(EmisSettleBill emisSettleBill)
|
||||
{
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
Integer pageNum = pageDomain.getPageNum();
|
||||
Integer pageSize = pageDomain.getPageSize();
|
||||
|
||||
if(emisSettleBill.getParams()==null){
|
||||
emisSettleBill.setParams(new HashMap<>());
|
||||
}
|
||||
|
||||
String customerCode=getLoginUser().getUser().getCustomerCode();
|
||||
|
||||
return iRpcSettleBillSvc.listSimple(customerCode,emisSettleBill.getParams(),emisSettleBill.getSearchValue(),pageNum,pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取结算总账单详细信息
|
||||
*/
|
||||
@GetMapping(value = "/getInfoBySettleBillNo")
|
||||
public AjaxResult getInfoBySettleBillNo(String settleBillNo)
|
||||
{
|
||||
String customerCode=getLoginUser().getUser().getCustomerCode();
|
||||
return AjaxResult.success(iRpcSettleBillSvc.getInfoBySettleBillNo(customerCode,settleBillNo));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/getWxPayQrCode")
|
||||
public AjaxResult getWxPayQrCode(String settleBillNo)
|
||||
{
|
||||
String customerCode=getLoginUser().getUser().getCustomerCode();
|
||||
return AjaxResult.success(iRpcSettleBillSvc.getWxPayQrCode(customerCode,settleBillNo));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(value = "/sumbitWxPay")
|
||||
public AjaxResult sumbitWxPay(@RequestBody EmisSettleBill emisSettleBill)
|
||||
{
|
||||
String customerCode=getLoginUser().getUser().getCustomerCode();
|
||||
emisSettleBill.setCustomerCode(customerCode);
|
||||
return AjaxResult.success(iRpcSettleBillSvc.sumbitWxPay(emisSettleBill));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,144 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisSettleBill.java
|
||||
* @author linfso
|
||||
* @date 2024-07-03 18:54:51
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 结算总账单 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.oms.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xdadan.erp.oms.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName EmisSettleBill
|
||||
* @Description 结算总账单
|
||||
* @author linfso
|
||||
* @date 2024-07-03 18:54:51
|
||||
*/
|
||||
@Data
|
||||
public class EmisSettleBill extends BaseEntity
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* id */
|
||||
private Long id;
|
||||
/* 总结算账单编号 */
|
||||
private String settleBillNo;
|
||||
/* 结算账单名称 */
|
||||
private String settleBillName;
|
||||
/* 结算账单类型 1-现金 2-月结 */
|
||||
private String settleType;
|
||||
/* 结算开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date settleStartDate;
|
||||
/* 结算结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date settleEndDate;
|
||||
/* 账单月份 202402 */
|
||||
private String billMonth;
|
||||
/* 应收款金额 */
|
||||
private BigDecimal recMoney;
|
||||
/* 已收款金额 */
|
||||
private BigDecimal recedMoney;
|
||||
/* 月结编号 */
|
||||
private String custNo;
|
||||
/* 月结账户名称 */
|
||||
private String custName;
|
||||
/* 客户编码 */
|
||||
private String customerCode;
|
||||
/* 客户名称 */
|
||||
private String customerName;
|
||||
/* 结算站点代码 */
|
||||
private String siteCode;
|
||||
/* 结算站点名称 */
|
||||
private String siteName;
|
||||
/* 安全金额 */
|
||||
private BigDecimal satisfyMoney;
|
||||
/* 允许金额 */
|
||||
private BigDecimal allowanceMoney;
|
||||
/* 抵扣金额 */
|
||||
private BigDecimal deductionMoney;
|
||||
/* 其他金额 */
|
||||
private BigDecimal otherMoney;
|
||||
/* 安全原因 */
|
||||
private String satisfyReason;
|
||||
/* 允许原因 */
|
||||
private String allowanceReason;
|
||||
/* 抵扣原因 */
|
||||
private String deductionReason;
|
||||
/* 其他原因 */
|
||||
private String otherReason;
|
||||
/* 开票状态 0-未开票 1-已开票 2-部分开票 3-不开票 */
|
||||
private String openBillStatus;
|
||||
/* 付款状态 0-未付款 1-已付款 2-部分付款 */
|
||||
private String paymentStatus;
|
||||
/* 核销状态 0-未核销1-已核销 */
|
||||
private String chargeStatus;
|
||||
/* 总票数 */
|
||||
private Integer sendPieceSum;
|
||||
/* 总件数 */
|
||||
private Integer pieceNumber;
|
||||
/* 总重量 */
|
||||
private BigDecimal feeWeight;
|
||||
/* 未结数量 */
|
||||
private BigDecimal uncollectedAmount;
|
||||
/* 合计金额 */
|
||||
private BigDecimal sendMoneySum;
|
||||
/* 退款数量 */
|
||||
private BigDecimal refundAmount;
|
||||
/* 退款金额 */
|
||||
private BigDecimal refundMoney;
|
||||
/* 销售回款人 */
|
||||
private String payee;
|
||||
/* 销售联系人 */
|
||||
private String salesmen;
|
||||
/* 推送oms */
|
||||
private String blSendOms;
|
||||
/* 财务确认状态 0-待确认 1-已确认 2-驳回 */
|
||||
private String blConfirmCenter;
|
||||
/* 财务确认日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date confirmCenterDate;
|
||||
/* 财务确认备注 */
|
||||
private String confirmCenterNote;
|
||||
/* 财务确认人 */
|
||||
private String confirmCenterManCode;
|
||||
/* 财务确认站点 */
|
||||
private String confirmCenterCode;
|
||||
/* 站点确认状态 0-待确认 1-已确认 2-驳回 3-账单异常 */
|
||||
private String blConfirmSite;
|
||||
/* 站点确认日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date confirmSiteDate;
|
||||
/* 站点确认人 */
|
||||
private String confirmSiteManCode;
|
||||
/* 网点确认备注 */
|
||||
private String confirmSiteNote;
|
||||
/* 确认网点代码 */
|
||||
private String confirmSiteCode;
|
||||
|
||||
|
||||
// 扩展信息
|
||||
|
||||
private String confirmCenterManName;
|
||||
private String confirmCenterName;
|
||||
|
||||
private String confirmSiteManName;
|
||||
private String confirmSiteName;
|
||||
|
||||
|
||||
List<EmisSettleSubBill> subBillList;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisSettleSubBill.java
|
||||
* @author linfso
|
||||
* @date 2024-07-03 18:54:52
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 结算子账单 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.oms.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xdadan.erp.oms.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName EmisSettleSubBill
|
||||
* @Description 结算子账单
|
||||
* @author linfso
|
||||
* @date 2024-07-03 18:54:52
|
||||
*/
|
||||
@Data
|
||||
public class EmisSettleSubBill extends BaseEntity
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* id */
|
||||
private Long id;
|
||||
/* 分账单号 */
|
||||
private String billNo;
|
||||
/* 父账单号 */
|
||||
private String parentBillNo;
|
||||
/* 总结算账单号 */
|
||||
private String settleBillNo;
|
||||
/* 运单号 */
|
||||
private String billCode;
|
||||
/* 出账时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date billDate;
|
||||
/* 账单费用 */
|
||||
private BigDecimal billFee;
|
||||
/* 费用币种 */
|
||||
private String currency;
|
||||
/* 结算账单类型 1-现金 2-月结 */
|
||||
private String settleType;
|
||||
/* 是否已拆单 0-否 1-是 */
|
||||
private String blSplit;
|
||||
/* 是否已合账 */
|
||||
private String blMerge;
|
||||
/* 账单月份 202402 */
|
||||
private String billMonth;
|
||||
/* 月结编号 */
|
||||
private String custNo;
|
||||
/* 月结客户名称 */
|
||||
private String custName;
|
||||
/* 客户编码 */
|
||||
private String customerCode;
|
||||
/* 客户名称 */
|
||||
private String customerName;
|
||||
/* 销售回款人 */
|
||||
private String payee;
|
||||
/* 销售联系人 */
|
||||
private String salesmen;
|
||||
/* 是否特殊报价 */
|
||||
private String blSpecialQuote;
|
||||
/* 是否敏感物 */
|
||||
private String blSensitive;
|
||||
/* 财务确认状态 0-待确认 1-已确认 2-驳回 */
|
||||
private String blConfirmCenter;
|
||||
/* 财务确认日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date confirmCenterDate;
|
||||
/* 财务确认备注 */
|
||||
private String confirmCenterNote;
|
||||
/* 财务确认人 */
|
||||
private String confirmCenterManCode;
|
||||
/* 财务确认站点 */
|
||||
private String confirmCenterCode;
|
||||
/* 站点确认状态 0-待确认 1-已确认 2-驳回 */
|
||||
private String blConfirmSite;
|
||||
/* 站点确认日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date confirmSiteDate;
|
||||
/* 站点确认人 */
|
||||
private String confirmSiteManCode;
|
||||
/* 网点确认备注 */
|
||||
private String confirmSiteNote;
|
||||
/* 确认网点代码 */
|
||||
private String confirmSiteCode;
|
||||
|
||||
// 扩展参数
|
||||
private EmisWaybill waybillDetail;
|
||||
|
||||
private String confirmCenterManName;
|
||||
private String confirmSiteManName;
|
||||
private String confirmSiteName;
|
||||
|
||||
private List<EmisSettleSubBillFeeitem> feeitemList;
|
||||
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisSettleSubBillFeeitem.java
|
||||
* @author linfso
|
||||
* @date 2024-07-03 18:54:53
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 子账单费用明细 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.oms.domain;
|
||||
|
||||
import com.xdadan.erp.oms.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName EmisSettleSubBillFeeitem
|
||||
* @Description 子账单费用明细
|
||||
* @author linfso
|
||||
* @date 2024-07-03 18:54:53
|
||||
*/
|
||||
@Data
|
||||
public class EmisSettleSubBillFeeitem extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* id */
|
||||
private Long id;
|
||||
/* 子账单号 */
|
||||
private String subBillNo;
|
||||
/* 运单号 */
|
||||
private String billCode;
|
||||
/* 费用编码 */
|
||||
private String feeCode;
|
||||
/* 费用名称 */
|
||||
private String feeName;
|
||||
/* 账单费用 */
|
||||
private BigDecimal billFee;
|
||||
/* 原始费用 */
|
||||
private BigDecimal origFee;
|
||||
/* 费用币种 */
|
||||
private String currency;
|
||||
/* 排序 */
|
||||
private Integer orderNum;
|
||||
|
||||
}
|
||||
@ -169,7 +169,7 @@ public class EmisWaybill extends BaseEntity
|
||||
/* 派件方式:1-派送 2-自提 */
|
||||
@TableField
|
||||
private String dispatchMethod;
|
||||
/* 取件方式:1-上门取件 2-仓库收货 3-整柜提货 */
|
||||
/* 取件方式:pickupMethod:1-上门取件 2-仓库收货 3-整柜提货 */
|
||||
@TableField
|
||||
private String pickupMethod;
|
||||
/* 预计上门取件开始时间 */
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
package com.xdadan.erp.oms.service.svc;
|
||||
|
||||
|
||||
import com.xdadan.erp.oms.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.oms.domain.EmisSettleBill;
|
||||
import com.xdadan.erp.oms.domain.EmisWarehouseIn;
|
||||
import com.xdadan.erp.oms.domain.vo.WaybillOrder;
|
||||
import feign.Response;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 仓库对货接口
|
||||
*/
|
||||
@FeignClient(name = "SettleBill",url = "${service.provider.url}",configuration = {FeignErrorDecoder.class})
|
||||
public interface IRpcSettleBillSvc {
|
||||
|
||||
|
||||
@GetMapping("/apiweb/emisSettleBill/listSimple")
|
||||
public AjaxResult listSimple(
|
||||
@RequestParam("customerCode") String customerCode,
|
||||
@RequestParam("params") Map<String, Object> params,
|
||||
@RequestParam("searchValue") String searchValue,
|
||||
@RequestParam("pageNum") Integer pageNum,
|
||||
@RequestParam("pageSize") Integer pageSize);
|
||||
|
||||
|
||||
@GetMapping("/apiweb/emisSettleBill/getInfoBySettleBillNo")
|
||||
public AjaxResult getInfoBySettleBillNo(@RequestParam("customerCode") String customerCode, @RequestParam("settleBillNo") String settleBillNo);
|
||||
|
||||
|
||||
@GetMapping("/apiweb/emisSettleBill/getWxPayQrCode")
|
||||
public AjaxResult getWxPayQrCode(@RequestParam("customerCode") String customerCode, @RequestParam("settleBillNo") String settleBillNo);
|
||||
|
||||
@PostMapping("/apiweb/emisSettleBill/sumbitWxPay")
|
||||
public AjaxResult sumbitWxPay(@RequestBody EmisSettleBill emisSettleBill);
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user