demand: TMS系统财务销账优化
committer: heyu
This commit is contained in:
parent
36ddc571b0
commit
bf3d8f2579
@ -0,0 +1,374 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisWriteoffApplyController.java
|
||||
* @author heyu
|
||||
* @date 2025-09-15 23:39:28
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 销账申请控制器 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.web.emis;
|
||||
|
||||
import com.xdadan.erp.common.annotation.Log;
|
||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.common.core.page.TableDataInfo;
|
||||
import com.xdadan.erp.common.enums.BusinessType;
|
||||
import com.xdadan.erp.emis.domain.EmisWriteoffApply;
|
||||
import com.xdadan.erp.emis.domain.EmisWriteoffApplyDetail;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.emis.service.IEmisWriteoffApplyService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 销账申请Controller
|
||||
*
|
||||
* @author 何宇
|
||||
* @date 2025-09-16 10:00:00
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/emis/writeoffApply")
|
||||
@Slf4j
|
||||
public class EmisWriteoffApplyController extends EmisBaseController {
|
||||
@Autowired
|
||||
private IEmisWriteoffApplyService emisWriteoffApplyService;
|
||||
|
||||
/**
|
||||
* 查询销账申请列表
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmisWriteoffApply emisWriteoffApply) {
|
||||
// 处理params参数,支持运单号、账单号多选查询
|
||||
if (emisWriteoffApply.getParams() != null && emisWriteoffApply.getParams().containsKey("queryParams")) {
|
||||
String queryParams = (String) emisWriteoffApply.getParams().get("queryParams");
|
||||
if (queryParams != null && !queryParams.trim().isEmpty()) {
|
||||
// 清理参数,去除空行和多余空格
|
||||
String[] lines = queryParams.split("\n");
|
||||
StringBuilder cleanParams = new StringBuilder();
|
||||
for (String line : lines) {
|
||||
String trimmed = line.trim();
|
||||
if (!trimmed.isEmpty()) {
|
||||
if (cleanParams.length() > 0) {
|
||||
cleanParams.append("\n");
|
||||
}
|
||||
cleanParams.append(trimmed);
|
||||
}
|
||||
}
|
||||
emisWriteoffApply.getParams().put("queryParams", cleanParams.toString());
|
||||
}
|
||||
}
|
||||
|
||||
startPage();
|
||||
List<EmisWriteoffApply> list = emisWriteoffApplyService.selectEmisWriteoffApplyList(emisWriteoffApply);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出销账申请列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:writeoffApply:export')")
|
||||
@Log(title = "销账申请", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EmisWriteoffApply emisWriteoffApply) {
|
||||
// 处理params参数,支持运单号、账单号多选查询
|
||||
if (emisWriteoffApply.getParams() != null && emisWriteoffApply.getParams().containsKey("queryParams")) {
|
||||
String queryParams = (String) emisWriteoffApply.getParams().get("queryParams");
|
||||
if (queryParams != null && !queryParams.trim().isEmpty()) {
|
||||
// 清理参数,去除空行和多余空格
|
||||
String[] lines = queryParams.split("\n");
|
||||
StringBuilder cleanParams = new StringBuilder();
|
||||
for (String line : lines) {
|
||||
String trimmed = line.trim();
|
||||
if (!trimmed.isEmpty()) {
|
||||
if (cleanParams.length() > 0) {
|
||||
cleanParams.append("\n");
|
||||
}
|
||||
cleanParams.append(trimmed);
|
||||
}
|
||||
}
|
||||
emisWriteoffApply.getParams().put("queryParams", cleanParams.toString());
|
||||
}
|
||||
}
|
||||
|
||||
List<EmisWriteoffApply> list = emisWriteoffApplyService.selectEmisWriteoffApplyList(emisWriteoffApply);
|
||||
// ExcelUtil<EmisWriteoffApply> util = new
|
||||
// ExcelUtil<EmisWriteoffApply>(EmisWriteoffApply.class);
|
||||
// util.exportExcel(response, list, "销账申请数据");
|
||||
log.info("导出销账申请数据,共{}条记录", list.size());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取销账申请详细信息
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(emisWriteoffApplyService.selectEmisWriteoffApplyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增销账申请
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:add')")
|
||||
@Log(title = "销账申请", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EmisWriteoffApply emisWriteoffApply) {
|
||||
try {
|
||||
return toAjax(emisWriteoffApplyService.insertEmisWriteoffApply(emisWriteoffApply));
|
||||
} catch (Exception e) {
|
||||
log.error("新增销账申请失败", e);
|
||||
return error("新增销账申请失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改销账申请
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:edit')")
|
||||
@Log(title = "销账申请", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EmisWriteoffApply emisWriteoffApply) throws EmisBizError {
|
||||
return toAjax(emisWriteoffApplyService.updateEmisWriteoffApply(emisWriteoffApply));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除销账申请
|
||||
* 仅支持删除已撤销的数据,审核中以及审核完成的数据不支持删除
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:remove')")
|
||||
@Log(title = "销账申请", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
try {
|
||||
return toAjax(emisWriteoffApplyService.deleteEmisWriteoffApplyByIds(ids));
|
||||
} catch (Exception e) {
|
||||
log.error("删除销账申请失败", e);
|
||||
return error("删除销账申请失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 财务中心审核通过
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:centerPass')")
|
||||
@Log(title = "财务中心审核通过", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/auditCenterPass/{ids}")
|
||||
public AjaxResult auditCenterPass(@PathVariable Long[] ids) {
|
||||
if (ids != null && ids.length > 0) {
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
try {
|
||||
long id = ids[i];
|
||||
EmisWriteoffApply emisWriteoffApply = new EmisWriteoffApply();
|
||||
emisWriteoffApply.setId(id);
|
||||
|
||||
emisWriteoffApplyService.auditCenterPass(emisWriteoffApply);
|
||||
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
// 返回子定义异常
|
||||
if (ex instanceof EmisBizError) {
|
||||
return AjaxResult.error(ex.getMessage(), ((EmisBizError) ex).getErrorCode());
|
||||
}
|
||||
|
||||
return AjaxResult.error("审核异常,联系客服");
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 财务中心审核驳回
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:centerReject')")
|
||||
@Log(title = "财务中心审核驳回", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/auditCenterReject/{ids}")
|
||||
public AjaxResult auditCenterReject(@PathVariable Long[] ids, @RequestBody EmisWriteoffApply emisWriteoffApply) {
|
||||
if (ids != null && ids.length > 0) {
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
try {
|
||||
long id = ids[i];
|
||||
EmisWriteoffApply apply = new EmisWriteoffApply();
|
||||
apply.setId(id);
|
||||
apply.setCenterRejectReason(emisWriteoffApply.getCenterRejectReason());
|
||||
|
||||
emisWriteoffApplyService.auditCenterReject(apply);
|
||||
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
// 返回子定义异常
|
||||
if (ex instanceof EmisBizError) {
|
||||
return AjaxResult.error(ex.getMessage(), ((EmisBizError) ex).getErrorCode());
|
||||
}
|
||||
|
||||
return AjaxResult.error("审核异常,联系客服");
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 总部确认
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:headquartersConfirm')")
|
||||
@Log(title = "总部确认", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/auditHeadquartersConfirm/{ids}")
|
||||
public AjaxResult auditHeadquartersConfirm(@PathVariable Long[] ids) {
|
||||
if (ids != null && ids.length > 0) {
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
try {
|
||||
long id = ids[i];
|
||||
EmisWriteoffApply emisWriteoffApply = new EmisWriteoffApply();
|
||||
emisWriteoffApply.setId(id);
|
||||
|
||||
emisWriteoffApplyService.auditHeadquartersConfirm(emisWriteoffApply);
|
||||
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
// 返回子定义异常
|
||||
if (ex instanceof EmisBizError) {
|
||||
return AjaxResult.error(ex.getMessage(), ((EmisBizError) ex).getErrorCode());
|
||||
}
|
||||
|
||||
return AjaxResult.error("确认异常,联系客服");
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 总部驳回
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:headquartersReject')")
|
||||
@Log(title = "总部驳回", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/auditHeadquartersReject/{ids}")
|
||||
public AjaxResult auditHeadquartersReject(@PathVariable Long[] ids,
|
||||
@RequestBody EmisWriteoffApply emisWriteoffApply) {
|
||||
if (ids != null && ids.length > 0) {
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
try {
|
||||
long id = ids[i];
|
||||
EmisWriteoffApply apply = new EmisWriteoffApply();
|
||||
apply.setId(id);
|
||||
apply.setHeadquartersRejectReason(emisWriteoffApply.getHeadquartersRejectReason());
|
||||
|
||||
emisWriteoffApplyService.auditHeadquartersReject(apply);
|
||||
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
// 返回子定义异常
|
||||
if (ex instanceof EmisBizError) {
|
||||
return AjaxResult.error(ex.getMessage(), ((EmisBizError) ex).getErrorCode());
|
||||
}
|
||||
|
||||
return AjaxResult.error("驳回异常,联系客服");
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤销申请
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:revoke')")
|
||||
@Log(title = "撤销申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/revoke/{ids}")
|
||||
public AjaxResult revoke(@PathVariable Long[] ids) {
|
||||
if (ids != null && ids.length > 0) {
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
try {
|
||||
long id = ids[i];
|
||||
EmisWriteoffApply emisWriteoffApply = new EmisWriteoffApply();
|
||||
emisWriteoffApply.setId(id);
|
||||
|
||||
emisWriteoffApplyService.revokeApply(emisWriteoffApply);
|
||||
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
// 返回子定义异常
|
||||
if (ex instanceof EmisBizError) {
|
||||
return AjaxResult.error(ex.getMessage(), ((EmisBizError) ex).getErrorCode());
|
||||
}
|
||||
|
||||
return AjaxResult.error("撤销异常,联系客服");
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success("操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 再次申请
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:reapply')")
|
||||
@Log(title = "再次申请", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/reapply")
|
||||
public AjaxResult reapply(@RequestBody EmisWriteoffApply emisWriteoffApply) {
|
||||
try {
|
||||
return toAjax(emisWriteoffApplyService.reapply(emisWriteoffApply));
|
||||
} catch (Exception e) {
|
||||
log.error("再次申请失败", e);
|
||||
return error("再次申请失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据运单号查询运单、结算账单、结算子账单信息(返回EmisWriteoffApplyDetail列表)
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('emis:writeoffApply:queryByBillCodes')")
|
||||
@GetMapping("/queryByBillCodes")
|
||||
public AjaxResult queryByBillCodes(EmisWriteoffApply emisWriteoffApply) {
|
||||
try {
|
||||
// 处理params参数,支持运单号、账单号多选查询
|
||||
if (emisWriteoffApply.getParams() != null && emisWriteoffApply.getParams().containsKey("queryParams")) {
|
||||
String queryParams = (String) emisWriteoffApply.getParams().get("queryParams");
|
||||
if (queryParams != null && !queryParams.trim().isEmpty()) {
|
||||
// 清理参数,去除空行和多余空格
|
||||
String[] lines = queryParams.split("\n");
|
||||
StringBuilder cleanParams = new StringBuilder();
|
||||
for (String line : lines) {
|
||||
String trimmed = line.trim();
|
||||
if (!trimmed.isEmpty()) {
|
||||
if (cleanParams.length() > 0) {
|
||||
cleanParams.append("\n");
|
||||
}
|
||||
cleanParams.append(trimmed);
|
||||
}
|
||||
}
|
||||
emisWriteoffApply.getParams().put("queryParams", cleanParams.toString());
|
||||
}
|
||||
}
|
||||
|
||||
// 检查是否有查询参数
|
||||
if (emisWriteoffApply.getParams() == null ||
|
||||
!emisWriteoffApply.getParams().containsKey("queryParams") ||
|
||||
emisWriteoffApply.getParams().get("queryParams") == null ||
|
||||
emisWriteoffApply.getParams().get("queryParams").toString().trim().isEmpty()) {
|
||||
return error("运单号列表不能为空");
|
||||
}
|
||||
|
||||
// 从queryParams中提取运单号列表
|
||||
String queryParams = (String) emisWriteoffApply.getParams().get("queryParams");
|
||||
String[] billCodes = queryParams.split("\n");
|
||||
List<String> billCodeList = Arrays.asList(billCodes);
|
||||
|
||||
List<EmisWriteoffApplyDetail> list = emisWriteoffApplyService
|
||||
.selectEmisWriteoffApplyDetailListByBillCodes(billCodeList);
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
log.error("根据运单号查询运单、结算账单、结算子账单信息失败", e);
|
||||
return error("查询失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,167 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisWriteoffApply.java
|
||||
* @author heyu
|
||||
* @date 2025-09-15 23:39:28
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 销账申请表 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xdadan.erp.common.annotation.Excel;
|
||||
import com.xdadan.erp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName EmisWriteoffApply
|
||||
* @Description 销账申请表
|
||||
* @author 何宇
|
||||
* @date 2025-09-16 10:00:00
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class EmisWriteoffApply extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* id */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/* 申请编号 */
|
||||
@Excel(name = "申请编号")
|
||||
private String applyNo;
|
||||
|
||||
/* 申请人编码 */
|
||||
@Excel(name = "申请人编码")
|
||||
private String applyManCode;
|
||||
|
||||
/* 申请人姓名 */
|
||||
@Excel(name = "申请人")
|
||||
private String applyManName;
|
||||
|
||||
/* 申请站点代码 */
|
||||
@Excel(name = "申请站点代码")
|
||||
private String applySiteCode;
|
||||
|
||||
/* 申请站点名称 */
|
||||
@Excel(name = "申请站点")
|
||||
private String applySiteName;
|
||||
|
||||
/* 申请时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "申请时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date applyDate;
|
||||
|
||||
/* 销账金额 */
|
||||
@Excel(name = "销账金额")
|
||||
private BigDecimal writeoffAmount;
|
||||
|
||||
/* 收款来源 1-微信支付2支付宝 3-对公 */
|
||||
private String payType;
|
||||
|
||||
/* 交易时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date tradeDate;
|
||||
|
||||
/* 收款人 */
|
||||
private String recipient;
|
||||
|
||||
/* 申请说明 */
|
||||
@Excel(name = "申请说明")
|
||||
private String applyMemo;
|
||||
|
||||
/* 中心审核状态 0-未审核 1-审核通过 2-审核拒绝 3-已撤销*/
|
||||
@Excel(name = "中心审核状态")
|
||||
private String blCenterConfirmed;
|
||||
|
||||
/* 中心审核人编码 */
|
||||
@Excel(name = "中心审核人编码")
|
||||
private String centerConfirmManCode;
|
||||
|
||||
/* 中心审核人姓名 */
|
||||
@Excel(name = "中心审核人")
|
||||
private String centerConfirmManName;
|
||||
|
||||
/* 中心审核时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "中心审核时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date centerConfirmDate;
|
||||
|
||||
/* 中心审核备注 */
|
||||
@Excel(name = "中心审核备注")
|
||||
private String centerConfirmNote;
|
||||
|
||||
/* 中心驳回原因 */
|
||||
@Excel(name = "中心驳回原因")
|
||||
private String centerRejectReason;
|
||||
|
||||
/* 总部审核状态 0-未审核 1-确认 2-驳回 */
|
||||
@Excel(name = "总部审核状态")
|
||||
private String blHeadquartersConfirmed;
|
||||
|
||||
/* 总部审核人编码 */
|
||||
@Excel(name = "总部审核人编码")
|
||||
private String headquartersConfirmManCode;
|
||||
|
||||
/* 总部审核人姓名 */
|
||||
@Excel(name = "总部审核人")
|
||||
private String headquartersConfirmManName;
|
||||
|
||||
/* 总部审核时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "总部审核时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date headquartersConfirmDate;
|
||||
|
||||
/* 总部审核备注 */
|
||||
@Excel(name = "总部审核备注")
|
||||
private String headquartersConfirmNote;
|
||||
|
||||
/* 总部驳回原因 */
|
||||
@Excel(name = "总部驳回原因")
|
||||
private String headquartersRejectReason;
|
||||
|
||||
/* 撤销时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "撤销时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date revokeDate;
|
||||
|
||||
/* 撤销人编码 */
|
||||
@Excel(name = "撤销人编码")
|
||||
private String revokeManCode;
|
||||
|
||||
/* 撤销人姓名 */
|
||||
@Excel(name = "撤销人")
|
||||
private String revokeManName;
|
||||
|
||||
/* 撤销原因 */
|
||||
@Excel(name = "撤销原因")
|
||||
private String revokeReason;
|
||||
|
||||
// 关联明细列表
|
||||
private List<EmisWriteoffApplyDetail> detailList;
|
||||
|
||||
// 关联图片列表
|
||||
private List<EmisWriteoffApplyImage> imageList;
|
||||
|
||||
// 查询条件字段(只查询不入库)
|
||||
@TableField(exist = false)
|
||||
private String payee; // 回款联系人
|
||||
|
||||
@TableField(exist = false)
|
||||
private String salesmen; // 销售联系人
|
||||
|
||||
@TableField(exist = false)
|
||||
private String settleBillName; // 账单名称
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisWriteoffApplyDetail.java
|
||||
* @author heyu
|
||||
* @date 2025-09-15 23:39:28
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 销账申请明细表 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.xdadan.erp.common.annotation.Excel;
|
||||
import com.xdadan.erp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @ClassName EmisWriteoffApplyDetail
|
||||
* @Description 销账申请明细表
|
||||
* @author 何宇
|
||||
* @date 2025-19-16 10:00:00
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class EmisWriteoffApplyDetail extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* id */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/* 申请ID */
|
||||
@Excel(name = "申请ID")
|
||||
private Long applyId;
|
||||
|
||||
/* 申请编号 */
|
||||
@Excel(name = "申请编号")
|
||||
private String applyNo;
|
||||
|
||||
/* 运单号 */
|
||||
@Excel(name = "运单号")
|
||||
private String billCode;
|
||||
|
||||
/* 申请金额 */
|
||||
@Excel(name = "申请金额")
|
||||
private BigDecimal applyMoney;
|
||||
|
||||
/* 账单号 */
|
||||
@Excel(name = "账单号")
|
||||
private String settleBillNo;
|
||||
|
||||
// 关联运单信息(只作查询)
|
||||
@TableField(exist = false)
|
||||
private EmisWaybill emisWaybill = new EmisWaybill();
|
||||
|
||||
// 关联结算账单信息(只作查询)
|
||||
@TableField(exist = false)
|
||||
private EmisSettleBill emisSettleBill = new EmisSettleBill();
|
||||
|
||||
// 关联结算子账单信息(只作查询)
|
||||
@TableField(exist = false)
|
||||
private EmisSettleSubBill emisSettleSubBill = new EmisSettleSubBill();
|
||||
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisWriteoffApplyImage.java
|
||||
* @author heyu
|
||||
* @date 2025-09-15 23:39:28
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 销账申请图片表 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xdadan.erp.common.annotation.Excel;
|
||||
import com.xdadan.erp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName EmisWriteoffApplyImage
|
||||
* @Description 销账申请图片表
|
||||
* @author heyu
|
||||
* @date 2025-09-16 10:00:00
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class EmisWriteoffApplyImage extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* id */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/* 申请ID */
|
||||
@Excel(name = "申请ID")
|
||||
private Long applyId;
|
||||
|
||||
/* 申请编号 */
|
||||
@Excel(name = "申请编号")
|
||||
private String applyNo;
|
||||
|
||||
/* 图片名称 */
|
||||
@Excel(name = "图片名称")
|
||||
private String imageName;
|
||||
|
||||
/* 图片路径 */
|
||||
@Excel(name = "图片路径")
|
||||
private String imagePath;
|
||||
|
||||
/* 图片大小 */
|
||||
@Excel(name = "图片大小")
|
||||
private Long imageSize;
|
||||
|
||||
/* 图片类型 */
|
||||
@Excel(name = "图片类型")
|
||||
private String imageType;
|
||||
|
||||
/* 上传时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "上传时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date uploadDate;
|
||||
|
||||
/* 上传人编码 */
|
||||
@Excel(name = "上传人编码")
|
||||
private String uploadManCode;
|
||||
|
||||
/* 上传人姓名 */
|
||||
@Excel(name = "上传人")
|
||||
private String uploadManName;
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.xdadan.erp.emis.domain.enumtype;
|
||||
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: WriteoffApplyStatus.java
|
||||
* @author heyu
|
||||
* @date 2025-09-15 23:39:28
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description:
|
||||
* <p>
|
||||
* 销账申请状态枚举
|
||||
* </p>
|
||||
*/
|
||||
public enum WriteoffApplyStatus {
|
||||
|
||||
CENTER_PENDING("0", "中心未审核"),
|
||||
CENTER_APPROVED("1", "中心已审核"),
|
||||
CENTER_REJECTED("2", "中心驳回"),
|
||||
REVOKED("3", "已撤销"),
|
||||
HEADQUARTERS_PENDING("0", "总部未审核"),
|
||||
HEADQUARTERS_CONFIRMED("1", "总部确认"),
|
||||
HEADQUARTERS_REJECTED("2", "总部驳回");
|
||||
|
||||
public String statusCode;
|
||||
public String statusName;
|
||||
|
||||
WriteoffApplyStatus(String statusCode, String statusName) {
|
||||
this.statusCode = statusCode;
|
||||
this.statusName = statusName;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.xdadan.erp.emis.domain.enumtype;
|
||||
|
||||
/**
|
||||
* 销账申请类型枚举
|
||||
*/
|
||||
public enum WriteoffApplyType {
|
||||
|
||||
WAYBILL("1", "运单号"),
|
||||
BILL("2", "账单号");
|
||||
|
||||
public String typeCode;
|
||||
public String typeName;
|
||||
|
||||
WriteoffApplyType(String typeCode, String typeName) {
|
||||
this.typeCode = typeCode;
|
||||
this.typeName = typeName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -11,6 +11,11 @@ public class EmisBizError extends Exception {
|
||||
this.errorCode = errorType.getErrorCode();
|
||||
}
|
||||
|
||||
public EmisBizError(String errorMessage) {
|
||||
super(errorMessage);
|
||||
this.errorCode = "BIZ_ERROR";
|
||||
}
|
||||
|
||||
public String getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
@ -0,0 +1,107 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisWriteoffApplyDetailMapper.java
|
||||
* @author heyu
|
||||
* @date 2025-09-15 23:39:28
|
||||
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 销账申请明细表 Mapper 接口 </p>
|
||||
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
|
||||
*/
|
||||
package com.xdadan.erp.emis.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xdadan.erp.emis.domain.EmisWriteoffApplyDetail;
|
||||
|
||||
/**
|
||||
* @ClassName EmisWriteoffApplyDetailMapper
|
||||
* @Description
|
||||
* <p>
|
||||
* 销账申请明细表 Mapper 接口
|
||||
* </p>
|
||||
* @author 何宇
|
||||
* @date 2025-09-16 10:00:00
|
||||
*/
|
||||
public interface EmisWriteoffApplyDetailMapper extends BaseMapper<EmisWriteoffApplyDetail> {
|
||||
/**
|
||||
* 主键查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisWriteoffApplyDetail selectEmisWriteoffApplyDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param emisWriteoffApplyDetail
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisWriteoffApplyDetail> selectEmisWriteoffApplyDetailList(
|
||||
EmisWriteoffApplyDetail emisWriteoffApplyDetail);
|
||||
|
||||
/**
|
||||
* 根据申请ID查询明细列表
|
||||
*
|
||||
* @param applyId 申请ID
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisWriteoffApplyDetail> selectEmisWriteoffApplyDetailListByApplyId(Long applyId);
|
||||
|
||||
/**
|
||||
* 根据申请ID查询明细列表(只包含emisWaybill、emisSettleBill、emisSettleSubBill)
|
||||
*
|
||||
* @param applyId 申请ID
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisWriteoffApplyDetail> selectEmisWriteoffApplyDetailListByApplyIdWithDetails(Long applyId);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param emisWriteoffApplyDetail
|
||||
* @return
|
||||
*/
|
||||
public int insertEmisWriteoffApplyDetail(EmisWriteoffApplyDetail emisWriteoffApplyDetail);
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
*
|
||||
* @param emisWriteoffApplyDetailList
|
||||
* @return
|
||||
*/
|
||||
public int insertEmisWriteoffApplyDetailBatch(List<EmisWriteoffApplyDetail> emisWriteoffApplyDetailList);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param emisWriteoffApplyDetail
|
||||
* @return
|
||||
*/
|
||||
public int updateEmisWriteoffApplyDetail(EmisWriteoffApplyDetail emisWriteoffApplyDetail);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWriteoffApplyDetailById(Long id);
|
||||
|
||||
/**
|
||||
* 根据申请ID删除明细
|
||||
*
|
||||
* @param applyId 申请ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWriteoffApplyDetailByApplyId(Long applyId);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWriteoffApplyDetailByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisWriteoffApplyImageMapper.java
|
||||
* @author heyu
|
||||
* @date 2025-09-15 23:39:28
|
||||
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 销账申请图片表 Mapper 接口 </p>
|
||||
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
|
||||
*/
|
||||
package com.xdadan.erp.emis.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xdadan.erp.emis.domain.EmisWriteoffApplyImage;
|
||||
|
||||
/**
|
||||
* @ClassName EmisWriteoffApplyImageMapper
|
||||
* @Description
|
||||
* <p>
|
||||
* 销账申请图片表 Mapper 接口
|
||||
* </p>
|
||||
* @author 何宇
|
||||
* @date 2025-09-16 10:00:00
|
||||
*/
|
||||
public interface EmisWriteoffApplyImageMapper extends BaseMapper<EmisWriteoffApplyImage> {
|
||||
/**
|
||||
* 主键查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisWriteoffApplyImage selectEmisWriteoffApplyImageById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param emisWriteoffApplyImage
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisWriteoffApplyImage> selectEmisWriteoffApplyImageList(EmisWriteoffApplyImage emisWriteoffApplyImage);
|
||||
|
||||
/**
|
||||
* 根据申请ID查询图片列表
|
||||
*
|
||||
* @param applyId 申请ID
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisWriteoffApplyImage> selectEmisWriteoffApplyImageListByApplyId(Long applyId);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param emisWriteoffApplyImage
|
||||
* @return
|
||||
*/
|
||||
public int insertEmisWriteoffApplyImage(EmisWriteoffApplyImage emisWriteoffApplyImage);
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
*
|
||||
* @param emisWriteoffApplyImageList
|
||||
* @return
|
||||
*/
|
||||
public int insertEmisWriteoffApplyImageBatch(List<EmisWriteoffApplyImage> emisWriteoffApplyImageList);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param emisWriteoffApplyImage
|
||||
* @return
|
||||
*/
|
||||
public int updateEmisWriteoffApplyImage(EmisWriteoffApplyImage emisWriteoffApplyImage);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWriteoffApplyImageById(Long id);
|
||||
|
||||
/**
|
||||
* 根据申请ID删除图片
|
||||
*
|
||||
* @param applyId 申请ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWriteoffApplyImageByApplyId(Long applyId);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWriteoffApplyImageByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisWriteoffApplyMapper.java
|
||||
* @author heyu
|
||||
* @date 2025-09-15 23:39:28
|
||||
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 销账申请表 Mapper 接口 </p>
|
||||
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
|
||||
*/
|
||||
package com.xdadan.erp.emis.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xdadan.erp.emis.domain.EmisWriteoffApply;
|
||||
import com.xdadan.erp.emis.domain.EmisWriteoffApplyDetail;
|
||||
|
||||
/**
|
||||
* @ClassName EmisWriteoffApplyMapper
|
||||
* @Description
|
||||
* <p>
|
||||
* 销账申请表 Mapper 接口
|
||||
* </p>
|
||||
* @author 何宇
|
||||
* @date 2025-09-16 10:00:00
|
||||
*/
|
||||
public interface EmisWriteoffApplyMapper extends BaseMapper<EmisWriteoffApply> {
|
||||
/**
|
||||
* 主键查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisWriteoffApply selectEmisWriteoffApplyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param emisWriteoffApply
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisWriteoffApply> selectEmisWriteoffApplyList(EmisWriteoffApply emisWriteoffApply);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param emisWriteoffApply
|
||||
* @return
|
||||
*/
|
||||
public int insertEmisWriteoffApply(EmisWriteoffApply emisWriteoffApply);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param emisWriteoffApply
|
||||
* @return
|
||||
*/
|
||||
public int updateEmisWriteoffApply(EmisWriteoffApply emisWriteoffApply);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWriteoffApplyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWriteoffApplyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 财务中心审核通过
|
||||
*
|
||||
* @param emisWriteoffApply
|
||||
* @return 结果
|
||||
*/
|
||||
public int auditCenterPass(EmisWriteoffApply emisWriteoffApply);
|
||||
|
||||
/**
|
||||
* 根据运单号查询运单、结算账单、结算子账单信息(返回EmisWriteoffApplyDetail列表)
|
||||
*
|
||||
* @param billCodes 运单号列表
|
||||
* @return 销账申请明细集合
|
||||
*/
|
||||
public List<EmisWriteoffApplyDetail> selectEmisWriteoffApplyDetailListByBillCodes(List<String> billCodes);
|
||||
|
||||
/**
|
||||
* 财务中心审核驳回
|
||||
*
|
||||
* @param emisWriteoffApply
|
||||
* @return 结果
|
||||
*/
|
||||
public int auditCenterReject(EmisWriteoffApply emisWriteoffApply);
|
||||
|
||||
/**
|
||||
* 总部确认
|
||||
*
|
||||
* @param emisWriteoffApply
|
||||
* @return 结果
|
||||
*/
|
||||
public int auditHeadquartersConfirm(EmisWriteoffApply emisWriteoffApply);
|
||||
|
||||
/**
|
||||
* 总部驳回
|
||||
*
|
||||
* @param emisWriteoffApply
|
||||
* @return 结果
|
||||
*/
|
||||
public int auditHeadquartersReject(EmisWriteoffApply emisWriteoffApply);
|
||||
|
||||
/**
|
||||
* 撤销申请
|
||||
*
|
||||
* @param emisWriteoffApply
|
||||
* @return 结果
|
||||
*/
|
||||
public int revokeApply(EmisWriteoffApply emisWriteoffApply);
|
||||
|
||||
/**
|
||||
* 再次申请
|
||||
*
|
||||
* @param emisWriteoffApply
|
||||
* @return 结果
|
||||
*/
|
||||
public int reapply(EmisWriteoffApply emisWriteoffApply);
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: IEmisWriteoffApplyService.java
|
||||
* @author heyu
|
||||
* @date 2025-09-15 23:39:28
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 销账申请表 服务类接口 </p>
|
||||
*/
|
||||
package com.xdadan.erp.emis.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.xdadan.erp.emis.domain.EmisWriteoffApply;
|
||||
import com.xdadan.erp.emis.domain.EmisWriteoffApplyDetail;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
|
||||
/**
|
||||
* @ClassName IEmisWriteoffApplyService
|
||||
* @Description 销账申请表
|
||||
* @author 何宇
|
||||
* @date 2025-09-16 10:00:00
|
||||
*/
|
||||
public interface IEmisWriteoffApplyService {
|
||||
/**
|
||||
* 主键查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisWriteoffApply selectEmisWriteoffApplyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询销账申请列表
|
||||
*
|
||||
* @param emisWriteoffApply 销账申请
|
||||
* @return 销账申请集合
|
||||
*/
|
||||
public List<EmisWriteoffApply> selectEmisWriteoffApplyList(EmisWriteoffApply emisWriteoffApply);
|
||||
|
||||
/**
|
||||
* 新增销账申请
|
||||
*
|
||||
* @param emisWriteoffApply 销账申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmisWriteoffApply(EmisWriteoffApply emisWriteoffApply) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 修改销账申请
|
||||
*
|
||||
* @param emisWriteoffApply 销账申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmisWriteoffApply(EmisWriteoffApply emisWriteoffApply) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 批量删除销账申请
|
||||
* 仅支持删除已撤销的数据,审核中以及审核完成的数据不支持删除
|
||||
*
|
||||
* @param ids 需要删除的销账申请主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWriteoffApplyByIds(Long[] ids) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 删除销账申请信息
|
||||
* 仅支持删除已撤销的数据,审核中以及审核完成的数据不支持删除
|
||||
*
|
||||
* @param id 销账申请主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWriteoffApplyById(Long id) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 财务中心审核通过(支持单个和批量)
|
||||
*
|
||||
* @param emisWriteoffApply 销账申请(单个操作时传入完整对象,批量操作时传入包含ids的对象)
|
||||
* @return 结果
|
||||
*/
|
||||
public int auditCenterPass(EmisWriteoffApply emisWriteoffApply) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 财务中心审核驳回(支持单个和批量)
|
||||
*
|
||||
* @param emisWriteoffApply 销账申请(单个操作时传入完整对象,批量操作时传入包含ids的对象)
|
||||
* @return 结果
|
||||
*/
|
||||
public int auditCenterReject(EmisWriteoffApply emisWriteoffApply) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 总部确认(支持单个和批量)
|
||||
*
|
||||
* @param emisWriteoffApply 销账申请(单个操作时传入完整对象,批量操作时传入包含ids的对象)
|
||||
* @return 结果
|
||||
*/
|
||||
public int auditHeadquartersConfirm(EmisWriteoffApply emisWriteoffApply) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 总部驳回(支持单个和批量)
|
||||
*
|
||||
* @param emisWriteoffApply 销账申请(单个操作时传入完整对象,批量操作时传入包含ids的对象)
|
||||
* @return 结果
|
||||
*/
|
||||
public int auditHeadquartersReject(EmisWriteoffApply emisWriteoffApply) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 撤销申请(支持单个和批量)
|
||||
*
|
||||
* @param emisWriteoffApply 销账申请(单个操作时传入完整对象,批量操作时传入包含ids的对象)
|
||||
* @return 结果
|
||||
*/
|
||||
public int revokeApply(EmisWriteoffApply emisWriteoffApply) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 再次申请
|
||||
*
|
||||
* @param emisWriteoffApply 销账申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int reapply(EmisWriteoffApply emisWriteoffApply) throws EmisBizError;
|
||||
|
||||
/**
|
||||
* 根据运单号查询运单、结算账单、结算子账单信息(返回EmisWriteoffApplyDetail列表)
|
||||
*
|
||||
* @param billCodes 运单号列表
|
||||
* @return 销账申请明细集合
|
||||
*/
|
||||
public List<EmisWriteoffApplyDetail> selectEmisWriteoffApplyDetailListByBillCodes(List<String> billCodes);
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,325 @@
|
||||
<?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.xdadan.erp.emis.mapper.EmisWriteoffApplyDetailMapper">
|
||||
|
||||
<resultMap type="EmisWriteoffApplyDetail" id="EmisWriteoffApplyDetailResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="applyId" column="apply_id" />
|
||||
<result property="applyNo" column="apply_no" />
|
||||
<result property="billCode" column="bill_code" />
|
||||
<result property="applyMoney" column="apply_money" />
|
||||
<result property="settleBillNo" column="settle_bill_no" />
|
||||
<!-- 关联运单信息 -->
|
||||
<association property="emisWaybill" javaType="EmisWaybill">
|
||||
<result property="id" column="w_id"/>
|
||||
<result property="orderSn" column="w_order_sn"/>
|
||||
<result property="custOrderId" column="w_cust_order_id"/>
|
||||
<result property="billCode" column="w_bill_code"/>
|
||||
<result property="billCodeSub" column="w_bill_code_sub"/>
|
||||
<result property="orderStatus" column="w_order_status"/>
|
||||
<result property="waybillStatus" column="w_waybill_status"/>
|
||||
<result property="orderType" column="w_order_type"/>
|
||||
<result property="orderDate" column="w_order_date"/>
|
||||
<result property="userId" column="w_user_id"/>
|
||||
<result property="customerCode" column="w_customer_code"/>
|
||||
<result property="customerName" column="w_customer_name"/>
|
||||
<result property="openId" column="w_open_id"/>
|
||||
<result property="receiveName" column="w_receive_name"/>
|
||||
<result property="receiveCompany" column="w_receive_company"/>
|
||||
<result property="receiveMobile" column="w_receive_mobile"/>
|
||||
<result property="receiveTel" column="w_receive_tel"/>
|
||||
<result property="receiveCountry" column="w_receive_country"/>
|
||||
<result property="receiveProvince" column="w_receive_province"/>
|
||||
<result property="receiveCity" column="w_receive_city"/>
|
||||
<result property="receiveAddress" column="w_receive_address"/>
|
||||
<result property="receiveZipcode" column="w_receive_zipcode"/>
|
||||
<result property="sendName" column="w_send_name"/>
|
||||
<result property="sendCompany" column="w_send_company"/>
|
||||
<result property="sendMobile" column="w_send_mobile"/>
|
||||
<result property="sendTel" column="w_send_tel"/>
|
||||
<result property="sendCountry" column="w_send_country"/>
|
||||
<result property="sendProvince" column="w_send_province"/>
|
||||
<result property="sendCity" column="w_send_city"/>
|
||||
<result property="sendAddress" column="w_send_address"/>
|
||||
<result property="sendZipcode" column="w_send_zipcode"/>
|
||||
<result property="freight" column="w_freight"/>
|
||||
<result property="salesmen" column="w_salesmen"/>
|
||||
<result property="payee" column="w_payee"/>
|
||||
<result property="paymentType" column="w_payment_type"/>
|
||||
<result property="productType" column="w_product_type"/>
|
||||
<result property="parcelQty" column="w_parcel_qty"/>
|
||||
<result property="billWeight" column="w_bill_weight"/>
|
||||
<result property="totalVolume" column="w_total_volume"/>
|
||||
<result property="sendDate" column="w_send_date"/>
|
||||
<result property="dispatchDate" column="w_dispatch_date"/>
|
||||
<result property="signMan" column="w_sign_man"/>
|
||||
<result property="signManCode" column="w_sign_man_code"/>
|
||||
<result property="signSiteCode" column="w_sign_site_code"/>
|
||||
<result property="signDate" column="w_sign_date"/>
|
||||
<result property="timezoneOffset" column="w_timezone_offset"/>
|
||||
<result property="paymentStatus" column="w_payment_status"/>
|
||||
<result property="paymentDate" column="w_payment_date"/>
|
||||
<result property="paymentRemark" column="w_payment_remark"/>
|
||||
<result property="orderRemark" column="w_order_remark"/>
|
||||
<result property="dataFrom" column="w_data_from"/>
|
||||
<result property="blSpecialGoods" column="w_bl_special_goods"/>
|
||||
<result property="extInfo" column="w_ext_info"/>
|
||||
<result property="ladingBillCode" column="w_lading_bill_code"/>
|
||||
<result property="companyCode" column="w_company_code"/>
|
||||
<result property="departurePort" column="w_departure_port"/>
|
||||
<result property="destinationPort" column="w_destination_port"/>
|
||||
<result property="boxQuantity" column="w_box_quantity"/>
|
||||
<result property="salesSupport" column="w_sales_support"/>
|
||||
<result property="salesExecutive" column="w_sales_executive"/>
|
||||
</association>
|
||||
<!-- 关联结算账单信息 -->
|
||||
<association property="emisSettleBill" javaType="EmisSettleBill">
|
||||
<result property="id" column="sb_id"/>
|
||||
<result property="settleBillNo" column="sb_settle_bill_no"/>
|
||||
<result property="settleBillName" column="sb_settle_bill_name"/>
|
||||
<result property="settleType" column="sb_settle_type"/>
|
||||
<result property="settleStartDate" column="sb_settle_start_date"/>
|
||||
<result property="settleEndDate" column="sb_settle_end_date"/>
|
||||
<result property="billMonth" column="sb_bill_month"/>
|
||||
<result property="recMoney" column="sb_rec_money"/>
|
||||
<result property="recedMoney" column="sb_reced_money"/>
|
||||
<result property="invoicedMoney" column="sb_invoiced_money"/>
|
||||
<result property="custNo" column="sb_cust_no"/>
|
||||
<result property="custName" column="sb_cust_name"/>
|
||||
<result property="customerCode" column="sb_customer_code"/>
|
||||
<result property="customerName" column="sb_customer_name"/>
|
||||
<result property="siteCode" column="sb_site_code"/>
|
||||
<result property="siteName" column="sb_site_name"/>
|
||||
<result property="satisfyMoney" column="sb_satisfy_money"/>
|
||||
<result property="allowanceMoney" column="sb_allowance_money"/>
|
||||
<result property="deductionMoney" column="sb_deduction_money"/>
|
||||
<result property="otherMoney" column="sb_other_money"/>
|
||||
<result property="satisfyReason" column="sb_satisfy_reason"/>
|
||||
<result property="allowanceReason" column="sb_allowance_reason"/>
|
||||
<result property="deductionReason" column="sb_deduction_reason"/>
|
||||
<result property="otherReason" column="sb_other_reason"/>
|
||||
<result property="openBillStatus" column="sb_open_bill_status"/>
|
||||
<result property="paymentStatus" column="sb_payment_status"/>
|
||||
<result property="chargeStatus" column="sb_charge_status"/>
|
||||
<result property="sendPieceSum" column="sb_send_piece_sum"/>
|
||||
<result property="pieceNumber" column="sb_piece_number"/>
|
||||
<result property="feeWeight" column="sb_fee_weight"/>
|
||||
<result property="uncollectedAmount" column="sb_uncollected_amount"/>
|
||||
<result property="sendMoneySum" column="sb_send_money_sum"/>
|
||||
<result property="refundAmount" column="sb_refund_amount"/>
|
||||
<result property="refundMoney" column="sb_refund_money"/>
|
||||
<result property="payee" column="sb_payee"/>
|
||||
<result property="salesmen" column="sb_salesmen"/>
|
||||
<result property="creditPeriod" column="sb_credit_period"/>
|
||||
<result property="creditPeriodType" column="sb_credit_period_type"/>
|
||||
<result property="settleDay" column="sb_settle_day"/>
|
||||
<result property="paymentDueDate" column="sb_payment_due_date"/>
|
||||
<result property="blSendOms" column="sb_bl_send_oms"/>
|
||||
<result property="blConfirmCenter" column="sb_bl_confirm_center"/>
|
||||
<result property="confirmCenterDate" column="sb_confirm_center_date"/>
|
||||
<result property="confirmCenterNote" column="sb_confirm_center_note"/>
|
||||
<result property="confirmCenterManCode" column="sb_confirm_center_man_code"/>
|
||||
<result property="confirmCenterCode" column="sb_confirm_center_code"/>
|
||||
<result property="blConfirmSite" column="sb_bl_confirm_site"/>
|
||||
<result property="confirmSiteDate" column="sb_confirm_site_date"/>
|
||||
<result property="confirmSiteManCode" column="sb_confirm_site_man_code"/>
|
||||
<result property="confirmSiteNote" column="sb_confirm_site_note"/>
|
||||
<result property="confirmSiteCode" column="sb_confirm_site_code"/>
|
||||
<result property="confirmCenterManName" column="sb_confirm_center_man_name"/>
|
||||
<result property="confirmCenterName" column="sb_confirm_center_name"/>
|
||||
<result property="confirmSiteManName" column="sb_confirm_site_man_name"/>
|
||||
<result property="confirmSiteName" column="sb_confirm_site_name"/>
|
||||
<result property="thisPayMoney" column="sb_this_pay_money"/>
|
||||
<result property="qrCodePayPicUrl" column="sb_qr_code_pay_pic_url"/>
|
||||
<result property="openId" column="sb_open_id"/>
|
||||
<result property="appId" column="sb_app_id"/>
|
||||
<result property="blLockOnlinePay" column="sb_bl_lock_online_pay"/>
|
||||
<result property="lockOnlinePayReason" column="sb_lock_online_pay_reason"/>
|
||||
</association>
|
||||
<!-- 关联结算子账单信息 -->
|
||||
<association property="emisSettleSubBill" javaType="EmisSettleSubBill">
|
||||
<result property="id" column="ssb_id"/>
|
||||
<result property="billNo" column="ssb_bill_no"/>
|
||||
<result property="parentBillNo" column="ssb_parent_bill_no"/>
|
||||
<result property="settleBillNo" column="ssb_settle_bill_no"/>
|
||||
<result property="billCode" column="ssb_bill_code"/>
|
||||
<result property="billDate" column="ssb_bill_date"/>
|
||||
<result property="billFee" column="ssb_bill_fee"/>
|
||||
<result property="currency" column="ssb_currency"/>
|
||||
<result property="settleType" column="ssb_settle_type"/>
|
||||
<result property="blSplit" column="ssb_bl_split"/>
|
||||
<result property="blMerge" column="ssb_bl_merge"/>
|
||||
<result property="billMonth" column="ssb_bill_month"/>
|
||||
<result property="custNo" column="ssb_cust_no"/>
|
||||
<result property="custName" column="ssb_cust_name"/>
|
||||
<result property="customerCode" column="ssb_customer_code"/>
|
||||
<result property="customerName" column="ssb_customer_name"/>
|
||||
<result property="invoicedMoney" column="ssb_invoiced_money"/>
|
||||
<result property="recedMoney" column="ssb_reced_money"/>
|
||||
<result property="satisfyMoney" column="ssb_satisfy_money"/>
|
||||
<result property="allowanceMoney" column="ssb_allowance_money"/>
|
||||
<result property="deductionMoney" column="ssb_deduction_money"/>
|
||||
<result property="otherMoney" column="ssb_other_money"/>
|
||||
<result property="satisfyReason" column="ssb_satisfy_reason"/>
|
||||
<result property="allowanceReason" column="ssb_allowance_reason"/>
|
||||
<result property="deductionReason" column="ssb_deduction_reason"/>
|
||||
<result property="otherReason" column="ssb_other_reason"/>
|
||||
<result property="openBillStatus" column="ssb_open_bill_status"/>
|
||||
<result property="paymentStatus" column="ssb_payment_status"/>
|
||||
<result property="chargeStatus" column="ssb_charge_status"/>
|
||||
<result property="payee" column="ssb_payee"/>
|
||||
<result property="salesmen" column="ssb_salesmen"/>
|
||||
<result property="blSpecialQuote" column="ssb_bl_special_quote"/>
|
||||
<result property="blSensitive" column="ssb_bl_sensitive"/>
|
||||
<result property="blConfirmCenter" column="ssb_bl_confirm_center"/>
|
||||
<result property="confirmCenterDate" column="ssb_confirm_center_date"/>
|
||||
<result property="confirmCenterNote" column="ssb_confirm_center_note"/>
|
||||
<result property="confirmCenterManCode" column="ssb_confirm_center_man_code"/>
|
||||
<result property="confirmCenterCode" column="ssb_confirm_center_code"/>
|
||||
<result property="blConfirmSite" column="ssb_bl_confirm_site"/>
|
||||
<result property="confirmSiteDate" column="ssb_confirm_site_date"/>
|
||||
<result property="confirmSiteManCode" column="ssb_confirm_site_man_code"/>
|
||||
<result property="confirmSiteNote" column="ssb_confirm_site_note"/>
|
||||
<result property="confirmSiteCode" column="ssb_confirm_site_code"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisWriteoffApplyDetailVo">
|
||||
select wad.id, wad.apply_id, wad.apply_no, wad.bill_code, wad.apply_money, wad.settle_bill_no,
|
||||
w.id as w_id, w.order_sn as w_order_sn, w.cust_order_id as w_cust_order_id, w.bill_code as w_bill_code, w.bill_code_sub as w_bill_code_sub,
|
||||
w.order_status as w_order_status, w.waybill_status as w_waybill_status, w.order_type as w_order_type, w.order_date as w_order_date,
|
||||
w.user_id as w_user_id, w.customer_code as w_customer_code, w.customer_name as w_customer_name, w.open_id as w_open_id,
|
||||
w.receive_name as w_receive_name, w.receive_company as w_receive_company, w.receive_mobile as w_receive_mobile, w.receive_tel as w_receive_tel,
|
||||
w.receive_country as w_receive_country, w.receive_province as w_receive_province, w.receive_city as w_receive_city,
|
||||
w.receive_county as w_receive_county, w.receive_town as w_receive_town, w.receive_address as w_receive_address, w.receive_postcode as w_receive_postcode,
|
||||
w.send_name as w_send_name, w.send_company as w_send_company, w.send_mobile as w_send_mobile, w.send_tel as w_send_tel,
|
||||
w.send_country as w_send_country, w.send_province as w_send_province, w.send_city as w_send_city,
|
||||
w.send_county as w_send_county, w.send_town as w_send_town, w.send_address as w_send_address, w.send_postcode as w_send_postcode,
|
||||
w.freight as w_freight, w.salesmen as w_salesmen, w.payee as w_payee, w.payment_type as w_payment_type, w.product_type as w_product_type,
|
||||
w.parcel_qty as w_parcel_qty, w.bill_weight as w_bill_weight, w.total_volume as w_total_volume, w.send_date as w_send_date,
|
||||
w.dispatch_date as w_dispatch_date, w.sign_man as w_sign_man, w.sign_man_code as w_sign_man_code,
|
||||
w.sign_site_code as w_sign_site_code, w.sign_date as w_sign_date, w.timezone_offset as w_timezone_offset, w.payment_status as w_payment_status,
|
||||
w.payment_date as w_payment_date, w.payment_remark as w_payment_remark, w.order_remark as w_order_remark, w.data_from as w_data_from,
|
||||
w.bl_special_goods as w_bl_special_goods, w.ext_info as w_ext_info, w.lading_bill_code as w_lading_bill_code, w.company_code as w_company_code,
|
||||
w.departure_port as w_departure_port, w.destination_port as w_destination_port, w.box_quantity as w_box_quantity,
|
||||
sb.id as sb_id, sb.settle_bill_no as sb_settle_bill_no, sb.settle_bill_name as sb_settle_bill_name, sb.settle_type as sb_settle_type,
|
||||
sb.settle_start_date as sb_settle_start_date, sb.settle_end_date as sb_settle_end_date, sb.bill_month as sb_bill_month,
|
||||
sb.rec_money as sb_rec_money, sb.reced_money as sb_reced_money, sb.invoiced_money as sb_invoiced_money, sb.cust_no as sb_cust_no,
|
||||
sb.cust_name as sb_cust_name, sb.customer_code as sb_customer_code, sb.customer_name as sb_customer_name, sb.site_code as sb_site_code,
|
||||
sb.site_name as sb_site_name, sb.satisfy_money as sb_satisfy_money, sb.allowance_money as sb_allowance_money, sb.deduction_money as sb_deduction_money,
|
||||
sb.other_money as sb_other_money, sb.satisfy_reason as sb_satisfy_reason, sb.allowance_reason as sb_allowance_reason,
|
||||
sb.deduction_reason as sb_deduction_reason, sb.other_reason as sb_other_reason, sb.open_bill_status as sb_open_bill_status,
|
||||
sb.payment_status as sb_payment_status, sb.charge_status as sb_charge_status, sb.send_piece_sum as sb_send_piece_sum,
|
||||
sb.piece_number as sb_piece_number, sb.fee_weight as sb_fee_weight, sb.uncollected_amount as sb_uncollected_amount,
|
||||
sb.send_money_sum as sb_send_money_sum, sb.refund_amount as sb_refund_amount, sb.refund_money as sb_refund_money,
|
||||
sb.payee as sb_payee, sb.salesmen as sb_salesmen, sb.credit_period as sb_credit_period, sb.credit_period_type as sb_credit_period_type,
|
||||
sb.settle_day as sb_settle_day, sb.payment_due_date as sb_payment_due_date, sb.bl_send_oms as sb_bl_send_oms,
|
||||
sb.bl_confirm_center as sb_bl_confirm_center, sb.confirm_center_date as sb_confirm_center_date, sb.confirm_center_note as sb_confirm_center_note,
|
||||
sb.confirm_center_man_code as sb_confirm_center_man_code, sb.confirm_center_code as sb_confirm_center_code,
|
||||
sb.bl_confirm_site as sb_bl_confirm_site, sb.confirm_site_date as sb_confirm_site_date, sb.confirm_site_man_code as sb_confirm_site_man_code,
|
||||
sb.confirm_site_note as sb_confirm_site_note, sb.confirm_site_code as sb_confirm_site_code,
|
||||
ssb.id as ssb_id, ssb.bill_no as ssb_bill_no, ssb.parent_bill_no as ssb_parent_bill_no, ssb.settle_bill_no as ssb_settle_bill_no,
|
||||
ssb.bill_code as ssb_bill_code, ssb.bill_date as ssb_bill_date, ssb.bill_fee as ssb_bill_fee, ssb.currency as ssb_currency,
|
||||
ssb.settle_type as ssb_settle_type, ssb.bl_split as ssb_bl_split, ssb.bl_merge as ssb_bl_merge, ssb.bill_month as ssb_bill_month,
|
||||
ssb.cust_no as ssb_cust_no, ssb.cust_name as ssb_cust_name, ssb.customer_code as ssb_customer_code, ssb.customer_name as ssb_customer_name,
|
||||
ssb.invoiced_money as ssb_invoiced_money, ssb.reced_money as ssb_reced_money, ssb.satisfy_money as ssb_satisfy_money,
|
||||
ssb.allowance_money as ssb_allowance_money, ssb.deduction_money as ssb_deduction_money, ssb.other_money as ssb_other_money,
|
||||
ssb.satisfy_reason as ssb_satisfy_reason, ssb.allowance_reason as ssb_allowance_reason, ssb.deduction_reason as ssb_deduction_reason,
|
||||
ssb.other_reason as ssb_other_reason, ssb.open_bill_status as ssb_open_bill_status, ssb.payment_status as ssb_payment_status,
|
||||
ssb.charge_status as ssb_charge_status, ssb.payee as ssb_payee, ssb.salesmen as ssb_salesmen, ssb.bl_special_quote as ssb_bl_special_quote,
|
||||
ssb.bl_sensitive as ssb_bl_sensitive, ssb.bl_confirm_center as ssb_bl_confirm_center, ssb.confirm_center_date as ssb_confirm_center_date,
|
||||
ssb.confirm_center_note as ssb_confirm_center_note, ssb.confirm_center_man_code as ssb_confirm_center_man_code,
|
||||
ssb.confirm_center_code as ssb_confirm_center_code, ssb.bl_confirm_site as ssb_bl_confirm_site, ssb.confirm_site_date as ssb_confirm_site_date,
|
||||
ssb.confirm_site_man_code as ssb_confirm_site_man_code, ssb.confirm_site_note as ssb_confirm_site_note, ssb.confirm_site_code as ssb_confirm_site_code
|
||||
from emis_writeoff_apply_detail wad
|
||||
left join emis_waybill w on wad.bill_code = w.bill_code
|
||||
left join emis_settle_bill sb on wad.settle_bill_no = sb.settle_bill_no
|
||||
left join emis_settle_sub_bill ssb on wad.bill_code = ssb.bill_code
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisWriteoffApplyDetailList" parameterType="EmisWriteoffApplyDetail" resultMap="EmisWriteoffApplyDetailResult">
|
||||
<include refid="selectEmisWriteoffApplyDetailVo"/>
|
||||
<where>
|
||||
<if test="applyId != null "> and wad.apply_id = #{applyId}</if>
|
||||
<if test="applyNo != null and applyNo != ''"> and wad.apply_no = #{applyNo}</if>
|
||||
<if test="billCode != null and billCode != ''"> and wad.bill_code = #{billCode}</if>
|
||||
<if test="settleBillNo != null and settleBillNo != ''"> and wad.settle_bill_no = #{settleBillNo}</if>
|
||||
<if test="applyMoney != null "> and wad.apply_money = #{applyMoney}</if>
|
||||
</where>
|
||||
order by wad.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectEmisWriteoffApplyDetailById" parameterType="Long" resultMap="EmisWriteoffApplyDetailResult">
|
||||
<include refid="selectEmisWriteoffApplyDetailVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectEmisWriteoffApplyDetailListByApplyId" parameterType="Long" resultMap="EmisWriteoffApplyDetailResult">
|
||||
<include refid="selectEmisWriteoffApplyDetailVo"/>
|
||||
where apply_id = #{applyId}
|
||||
order by wad.create_time desc
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisWriteoffApplyDetail" parameterType="EmisWriteoffApplyDetail" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_writeoff_apply_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="applyId != null">apply_id,</if>
|
||||
<if test="applyNo != null and applyNo != ''">apply_no,</if>
|
||||
<if test="billCode != null and billCode != ''">bill_code,</if>
|
||||
<if test="applyMoney != null">apply_money,</if>
|
||||
<if test="settleBillNo != null and settleBillNo != ''">settle_bill_no,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="applyId != null">#{applyId},</if>
|
||||
<if test="applyNo != null and applyNo != ''">#{applyNo},</if>
|
||||
<if test="billCode != null and billCode != ''">#{billCode},</if>
|
||||
<if test="applyMoney != null">#{applyMoney},</if>
|
||||
<if test="settleBillNo != null and settleBillNo != ''">#{settleBillNo},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertEmisWriteoffApplyDetailBatch" parameterType="java.util.List">
|
||||
insert into emis_writeoff_apply_detail (apply_id, apply_no, bill_code, apply_money, settle_bill_no)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.applyId}, #{item.applyNo}, #{item.billCode}, #{item.applyMoney}, #{item.settleBillNo})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisWriteoffApplyDetail" parameterType="EmisWriteoffApplyDetail">
|
||||
update emis_writeoff_apply_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="applyId != null">apply_id = #{applyId},</if>
|
||||
<if test="applyNo != null and applyNo != ''">apply_no = #{applyNo},</if>
|
||||
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
|
||||
<if test="applyMoney != null">apply_money = #{applyMoney},</if>
|
||||
<if test="settleBillNo != null and settleBillNo != ''">settle_bill_no = #{settleBillNo},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisWriteoffApplyDetailById" parameterType="Long">
|
||||
delete from emis_writeoff_apply_detail where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisWriteoffApplyDetailByApplyId" parameterType="Long">
|
||||
delete from emis_writeoff_apply_detail where apply_id = #{applyId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisWriteoffApplyDetailByIds" parameterType="String">
|
||||
delete from emis_writeoff_apply_detail where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 根据申请ID查询明细列表(只包含emisWaybill、emisSettleBill、emisSettleSubBill) -->
|
||||
<select id="selectEmisWriteoffApplyDetailListByApplyIdWithDetails" parameterType="Long" resultMap="EmisWriteoffApplyDetailResult">
|
||||
<include refid="selectEmisWriteoffApplyDetailVo"/>
|
||||
where apply_id = #{applyId}
|
||||
order by wad.create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,135 @@
|
||||
<?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.xdadan.erp.emis.mapper.EmisWriteoffApplyImageMapper">
|
||||
|
||||
<resultMap type="EmisWriteoffApplyImage" id="EmisWriteoffApplyImageResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="applyId" column="apply_id" />
|
||||
<result property="applyNo" column="apply_no" />
|
||||
<result property="imageName" column="image_name" />
|
||||
<result property="imagePath" column="image_path" />
|
||||
<result property="imageSize" column="image_size" />
|
||||
<result property="imageType" column="image_type" />
|
||||
<result property="uploadDate" column="upload_date" />
|
||||
<result property="uploadManCode" column="upload_man_code" />
|
||||
<result property="uploadManName" column="upload_man_name" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisWriteoffApplyImageVo">
|
||||
select id, apply_id, apply_no, image_name, image_path, image_size, image_type, upload_date, upload_man_code, upload_man_name, create_by, create_time, update_by, update_time, remark from emis_writeoff_apply_image
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisWriteoffApplyImageList" parameterType="EmisWriteoffApplyImage" resultMap="EmisWriteoffApplyImageResult">
|
||||
<include refid="selectEmisWriteoffApplyImageVo"/>
|
||||
<where>
|
||||
<if test="applyId != null "> and apply_id = #{applyId}</if>
|
||||
<if test="applyNo != null and applyNo != ''"> and apply_no = #{applyNo}</if>
|
||||
<if test="imageName != null and imageName != ''"> and image_name like concat('%', #{imageName}, '%')</if>
|
||||
<if test="imagePath != null and imagePath != ''"> and image_path like concat('%', #{imagePath}, '%')</if>
|
||||
<if test="imageSize != null "> and image_size = #{imageSize}</if>
|
||||
<if test="imageType != null and imageType != ''"> and image_type = #{imageType}</if>
|
||||
<if test="uploadDate != null "> and upload_date = #{uploadDate}</if>
|
||||
<if test="uploadManCode != null and uploadManCode != ''"> and upload_man_code = #{uploadManCode}</if>
|
||||
<if test="uploadManName != null and uploadManName != ''"> and upload_man_name like concat('%', #{uploadManName}, '%')</if>
|
||||
</where>
|
||||
order by upload_date desc
|
||||
</select>
|
||||
|
||||
<select id="selectEmisWriteoffApplyImageById" parameterType="Long" resultMap="EmisWriteoffApplyImageResult">
|
||||
<include refid="selectEmisWriteoffApplyImageVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectEmisWriteoffApplyImageListByApplyId" parameterType="Long" resultMap="EmisWriteoffApplyImageResult">
|
||||
<include refid="selectEmisWriteoffApplyImageVo"/>
|
||||
where apply_id = #{applyId}
|
||||
order by upload_date desc
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisWriteoffApplyImage" parameterType="EmisWriteoffApplyImage" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_writeoff_apply_image
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="applyId != null">apply_id,</if>
|
||||
<if test="applyNo != null and applyNo != ''">apply_no,</if>
|
||||
<if test="imageName != null and imageName != ''">image_name,</if>
|
||||
<if test="imagePath != null and imagePath != ''">image_path,</if>
|
||||
<if test="imageSize != null">image_size,</if>
|
||||
<if test="imageType != null and imageType != ''">image_type,</if>
|
||||
<if test="uploadDate != null">upload_date,</if>
|
||||
<if test="uploadManCode != null and uploadManCode != ''">upload_man_code,</if>
|
||||
<if test="uploadManName != null and uploadManName != ''">upload_man_name,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="applyId != null">#{applyId},</if>
|
||||
<if test="applyNo != null and applyNo != ''">#{applyNo},</if>
|
||||
<if test="imageName != null and imageName != ''">#{imageName},</if>
|
||||
<if test="imagePath != null and imagePath != ''">#{imagePath},</if>
|
||||
<if test="imageSize != null">#{imageSize},</if>
|
||||
<if test="imageType != null and imageType != ''">#{imageType},</if>
|
||||
<if test="uploadDate != null">#{uploadDate},</if>
|
||||
<if test="uploadManCode != null and uploadManCode != ''">#{uploadManCode},</if>
|
||||
<if test="uploadManName != null and uploadManName != ''">#{uploadManName},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertEmisWriteoffApplyImageBatch" parameterType="java.util.List">
|
||||
insert into emis_writeoff_apply_image (apply_id, apply_no, image_name, image_path, image_size, image_type, upload_date, upload_man_code, upload_man_name, create_by, create_time, update_by, update_time, remark)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.applyId}, #{item.applyNo}, #{item.imageName}, #{item.imagePath}, #{item.imageSize}, #{item.imageType}, #{item.uploadDate}, #{item.uploadManCode}, #{item.uploadManName}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisWriteoffApplyImage" parameterType="EmisWriteoffApplyImage">
|
||||
update emis_writeoff_apply_image
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="applyId != null">apply_id = #{applyId},</if>
|
||||
<if test="applyNo != null and applyNo != ''">apply_no = #{applyNo},</if>
|
||||
<if test="imageName != null and imageName != ''">image_name = #{imageName},</if>
|
||||
<if test="imagePath != null and imagePath != ''">image_path = #{imagePath},</if>
|
||||
<if test="imageSize != null">image_size = #{imageSize},</if>
|
||||
<if test="imageType != null and imageType != ''">image_type = #{imageType},</if>
|
||||
<if test="uploadDate != null">upload_date = #{uploadDate},</if>
|
||||
<if test="uploadManCode != null and uploadManCode != ''">upload_man_code = #{uploadManCode},</if>
|
||||
<if test="uploadManName != null and uploadManName != ''">upload_man_name = #{uploadManName},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisWriteoffApplyImageById" parameterType="Long">
|
||||
delete from emis_writeoff_apply_image where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisWriteoffApplyImageByApplyId" parameterType="Long">
|
||||
delete from emis_writeoff_apply_image where apply_id = #{applyId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisWriteoffApplyImageByIds" parameterType="String">
|
||||
delete from emis_writeoff_apply_image where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
517
emis-biz/src/main/resources/mapper/EmisWriteoffApplyMapper.xml
Normal file
517
emis-biz/src/main/resources/mapper/EmisWriteoffApplyMapper.xml
Normal file
@ -0,0 +1,517 @@
|
||||
<?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.xdadan.erp.emis.mapper.EmisWriteoffApplyMapper">
|
||||
|
||||
<resultMap type="EmisWriteoffApply" id="EmisWriteoffApplyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="applyNo" column="apply_no" />
|
||||
<result property="applyManCode" column="apply_man_code" />
|
||||
<result property="applyManName" column="apply_man_name" />
|
||||
<result property="applySiteCode" column="apply_site_code" />
|
||||
<result property="applySiteName" column="apply_site_name" />
|
||||
<result property="applyDate" column="apply_date" />
|
||||
<result property="writeoffAmount" column="writeoff_amount" />
|
||||
<result property="payType" column="pay_type" />
|
||||
<result property="tradeDate" column="trade_date" />
|
||||
<result property="recipient" column="recipient" />
|
||||
<result property="applyMemo" column="apply_memo" />
|
||||
<result property="blCenterConfirmed" column="bl_center_confirmed" />
|
||||
<result property="centerConfirmManCode" column="center_confirm_man_code" />
|
||||
<result property="centerConfirmManName" column="center_confirm_man_name" />
|
||||
<result property="centerConfirmDate" column="center_confirm_date" />
|
||||
<result property="centerConfirmNote" column="center_confirm_note" />
|
||||
<result property="centerRejectReason" column="center_reject_reason" />
|
||||
<result property="blHeadquartersConfirmed" column="bl_headquarters_confirmed" />
|
||||
<result property="headquartersConfirmManCode" column="headquarters_confirm_man_code" />
|
||||
<result property="headquartersConfirmManName" column="headquarters_confirm_man_name" />
|
||||
<result property="headquartersConfirmDate" column="headquarters_confirm_date" />
|
||||
<result property="headquartersConfirmNote" column="headquarters_confirm_note" />
|
||||
<result property="headquartersRejectReason" column="headquarters_reject_reason" />
|
||||
<result property="revokeDate" column="revoke_date" />
|
||||
<result property="revokeManCode" column="revoke_man_code" />
|
||||
<result property="revokeManName" column="revoke_man_name" />
|
||||
<result property="revokeReason" column="revoke_reason" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<!-- 关联明细列表 -->
|
||||
<collection property="detailList" ofType="EmisWriteoffApplyDetail"
|
||||
select="com.xdadan.erp.emis.mapper.EmisWriteoffApplyDetailMapper.selectEmisWriteoffApplyDetailListByApplyId"
|
||||
column="id"/>
|
||||
<!-- 关联图片列表 -->
|
||||
<collection property="imageList" ofType="EmisWriteoffApplyImage"
|
||||
select="com.xdadan.erp.emis.mapper.EmisWriteoffApplyImageMapper.selectEmisWriteoffApplyImageListByApplyId"
|
||||
column="id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisWriteoffApplyVo">
|
||||
select id, apply_no, apply_man_code, apply_man_name, apply_site_code, apply_site_name, apply_date, writeoff_amount, pay_type, trade_date, recipient, apply_memo, bl_center_confirmed, center_confirm_man_code, center_confirm_man_name, center_confirm_date, center_confirm_note, center_reject_reason, bl_headquarters_confirmed, headquarters_confirm_man_code, headquarters_confirm_man_name, headquarters_confirm_date, headquarters_confirm_note, headquarters_reject_reason, revoke_date, revoke_man_code, revoke_man_name, revoke_reason, create_by, create_time, update_by, update_time, remark from emis_writeoff_apply
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisWriteoffApplyList" parameterType="EmisWriteoffApply" resultMap="EmisWriteoffApplyResult">
|
||||
select distinct wa.id, wa.apply_no, wa.apply_man_code, wa.apply_man_name, wa.apply_site_code, wa.apply_site_name,
|
||||
wa.apply_date, wa.writeoff_amount, wa.pay_type, wa.trade_date, wa.recipient, wa.apply_memo,
|
||||
wa.bl_center_confirmed, wa.center_confirm_man_code, wa.center_confirm_man_name, wa.center_confirm_date,
|
||||
wa.center_confirm_note, wa.center_reject_reason, wa.bl_headquarters_confirmed, wa.headquarters_confirm_man_code,
|
||||
wa.headquarters_confirm_man_name, wa.headquarters_confirm_date, wa.headquarters_confirm_note,
|
||||
wa.headquarters_reject_reason, wa.revoke_date, wa.revoke_man_code, wa.revoke_man_name, wa.revoke_reason,
|
||||
wa.create_by, wa.create_time, wa.update_by, wa.update_time, wa.remark
|
||||
from emis_writeoff_apply wa
|
||||
<if test="(params != null and params.queryParams != null and params.queryParams != '') or (settleBillName != null and settleBillName != '')">
|
||||
left join emis_writeoff_apply_detail wad on wa.id = wad.apply_id
|
||||
</if>
|
||||
<if test="settleBillName != null and settleBillName != ''">
|
||||
left join emis_settle_bill sb on wad.settle_bill_no = sb.settle_bill_no
|
||||
</if>
|
||||
<where>
|
||||
<if test="applyNo != null and applyNo != ''"> and wa.apply_no = #{applyNo}</if>
|
||||
<if test="applyManCode != null and applyManCode != ''"> and wa.apply_man_code = #{applyManCode}</if>
|
||||
<if test="applyManName != null and applyManName != ''"> and wa.apply_man_name like concat('%', #{applyManName}, '%')</if>
|
||||
<if test="applySiteCode != null and applySiteCode != ''"> and wa.apply_site_code = #{applySiteCode}</if>
|
||||
<if test="applySiteName != null and applySiteName != ''"> and wa.apply_site_name like concat('%', #{applySiteName}, '%')</if>
|
||||
<if test="applyDate != null "> and wa.apply_date = #{applyDate}</if>
|
||||
<if test="writeoffAmount != null "> and wa.writeoff_amount = #{writeoffAmount}</if>
|
||||
<if test="applyMemo != null and applyMemo != ''"> and wa.apply_memo like concat('%', #{applyMemo}, '%')</if>
|
||||
<if test="blCenterConfirmed != null and blCenterConfirmed != ''"> and wa.bl_center_confirmed = #{blCenterConfirmed}</if>
|
||||
<if test="centerConfirmManCode != null and centerConfirmManCode != ''"> and wa.center_confirm_man_code = #{centerConfirmManCode}</if>
|
||||
<if test="centerConfirmManName != null and centerConfirmManName != ''"> and wa.center_confirm_man_name like concat('%', #{centerConfirmManName}, '%')</if>
|
||||
<if test="centerConfirmDate != null "> and wa.center_confirm_date = #{centerConfirmDate}</if>
|
||||
<if test="centerConfirmNote != null and centerConfirmNote != ''"> and wa.center_confirm_note like concat('%', #{centerConfirmNote}, '%')</if>
|
||||
<if test="centerRejectReason != null and centerRejectReason != ''"> and wa.center_reject_reason like concat('%', #{centerRejectReason}, '%')</if>
|
||||
<if test="blHeadquartersConfirmed != null and blHeadquartersConfirmed != ''"> and wa.bl_headquarters_confirmed = #{blHeadquartersConfirmed}</if>
|
||||
<if test="headquartersConfirmManCode != null and headquartersConfirmManCode != ''"> and wa.headquarters_confirm_man_code = #{headquartersConfirmManCode}</if>
|
||||
<if test="headquartersConfirmManName != null and headquartersConfirmManName != ''"> and wa.headquarters_confirm_man_name like concat('%', #{headquartersConfirmManName}, '%')</if>
|
||||
<if test="headquartersConfirmDate != null "> and wa.headquarters_confirm_date = #{headquartersConfirmDate}</if>
|
||||
<if test="headquartersConfirmNote != null and headquartersConfirmNote != ''"> and wa.headquarters_confirm_note like concat('%', #{headquartersConfirmNote}, '%')</if>
|
||||
<if test="headquartersRejectReason != null and headquartersRejectReason != ''"> and wa.headquarters_reject_reason like concat('%', #{headquartersRejectReason}, '%')</if>
|
||||
<if test="revokeDate != null "> and wa.revoke_date = #{revokeDate}</if>
|
||||
<if test="revokeManCode != null and revokeManCode != ''"> and wa.revoke_man_code = #{revokeManCode}</if>
|
||||
<if test="revokeManName != null and revokeManName != ''"> and wa.revoke_man_name like concat('%', #{revokeManName}, '%')</if>
|
||||
<if test="revokeReason != null and revokeReason != ''"> and wa.revoke_reason like concat('%', #{revokeReason}, '%')</if>
|
||||
<if test="settleBillName != null and settleBillName != ''"> and sb.settle_bill_name like concat('%', #{settleBillName}, '%')</if>
|
||||
<if test="params != null and params.queryParams != null and params.queryParams != ''">
|
||||
and (
|
||||
wad.bill_code in
|
||||
<foreach collection="params.queryParams.split('\n')" item="param" open="(" separator="," close=")">
|
||||
#{param}
|
||||
</foreach>
|
||||
or wad.settle_bill_no in
|
||||
<foreach collection="params.queryParams.split('\n')" item="param" open="(" separator="," close=")">
|
||||
#{param}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
order by wa.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectEmisWriteoffApplyById" parameterType="Long" resultMap="EmisWriteoffApplyResult">
|
||||
<include refid="selectEmisWriteoffApplyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisWriteoffApply" parameterType="EmisWriteoffApply" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_writeoff_apply
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="applyNo != null and applyNo != ''">apply_no,</if>
|
||||
<if test="applyManCode != null and applyManCode != ''">apply_man_code,</if>
|
||||
<if test="applyManName != null and applyManName != ''">apply_man_name,</if>
|
||||
<if test="applySiteCode != null and applySiteCode != ''">apply_site_code,</if>
|
||||
<if test="applySiteName != null and applySiteName != ''">apply_site_name,</if>
|
||||
<if test="applyDate != null">apply_date,</if>
|
||||
<if test="writeoffAmount != null">writeoff_amount,</if>
|
||||
<if test="payType != null and payType != ''">pay_type,</if>
|
||||
<if test="tradeDate != null">trade_date,</if>
|
||||
<if test="recipient != null and recipient != ''">recipient,</if>
|
||||
<if test="applyMemo != null and applyMemo != ''">apply_memo,</if>
|
||||
<if test="blCenterConfirmed != null and blCenterConfirmed != ''">bl_center_confirmed,</if>
|
||||
<if test="centerConfirmManCode != null and centerConfirmManCode != ''">center_confirm_man_code,</if>
|
||||
<if test="centerConfirmManName != null and centerConfirmManName != ''">center_confirm_man_name,</if>
|
||||
<if test="centerConfirmDate != null">center_confirm_date,</if>
|
||||
<if test="centerConfirmNote != null and centerConfirmNote != ''">center_confirm_note,</if>
|
||||
<if test="centerRejectReason != null and centerRejectReason != ''">center_reject_reason,</if>
|
||||
<if test="blHeadquartersConfirmed != null and blHeadquartersConfirmed != ''">bl_headquarters_confirmed,</if>
|
||||
<if test="headquartersConfirmManCode != null and headquartersConfirmManCode != ''">headquarters_confirm_man_code,</if>
|
||||
<if test="headquartersConfirmManName != null and headquartersConfirmManName != ''">headquarters_confirm_man_name,</if>
|
||||
<if test="headquartersConfirmDate != null">headquarters_confirm_date,</if>
|
||||
<if test="headquartersConfirmNote != null and headquartersConfirmNote != ''">headquarters_confirm_note,</if>
|
||||
<if test="headquartersRejectReason != null and headquartersRejectReason != ''">headquarters_reject_reason,</if>
|
||||
<if test="revokeDate != null">revoke_date,</if>
|
||||
<if test="revokeManCode != null and revokeManCode != ''">revoke_man_code,</if>
|
||||
<if test="revokeManName != null and revokeManName != ''">revoke_man_name,</if>
|
||||
<if test="revokeReason != null and revokeReason != ''">revoke_reason,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="applyNo != null and applyNo != ''">#{applyNo},</if>
|
||||
<if test="applyManCode != null and applyManCode != ''">#{applyManCode},</if>
|
||||
<if test="applyManName != null and applyManName != ''">#{applyManName},</if>
|
||||
<if test="applySiteCode != null and applySiteCode != ''">#{applySiteCode},</if>
|
||||
<if test="applySiteName != null and applySiteName != ''">#{applySiteName},</if>
|
||||
<if test="applyDate != null">#{applyDate},</if>
|
||||
<if test="writeoffAmount != null">#{writeoffAmount},</if>
|
||||
<if test="payType != null and payType != ''">#{payType},</if>
|
||||
<if test="tradeDate != null">#{tradeDate},</if>
|
||||
<if test="recipient != null and recipient != ''">#{recipient},</if>
|
||||
<if test="applyMemo != null and applyMemo != ''">#{applyMemo},</if>
|
||||
<if test="blCenterConfirmed != null and blCenterConfirmed != ''">#{blCenterConfirmed},</if>
|
||||
<if test="centerConfirmManCode != null and centerConfirmManCode != ''">#{centerConfirmManCode},</if>
|
||||
<if test="centerConfirmManName != null and centerConfirmManName != ''">#{centerConfirmManName},</if>
|
||||
<if test="centerConfirmDate != null">#{centerConfirmDate},</if>
|
||||
<if test="centerConfirmNote != null and centerConfirmNote != ''">#{centerConfirmNote},</if>
|
||||
<if test="centerRejectReason != null and centerRejectReason != ''">#{centerRejectReason},</if>
|
||||
<if test="blHeadquartersConfirmed != null and blHeadquartersConfirmed != ''">#{blHeadquartersConfirmed},</if>
|
||||
<if test="headquartersConfirmManCode != null and headquartersConfirmManCode != ''">#{headquartersConfirmManCode},</if>
|
||||
<if test="headquartersConfirmManName != null and headquartersConfirmManName != ''">#{headquartersConfirmManName},</if>
|
||||
<if test="headquartersConfirmDate != null">#{headquartersConfirmDate},</if>
|
||||
<if test="headquartersConfirmNote != null and headquartersConfirmNote != ''">#{headquartersConfirmNote},</if>
|
||||
<if test="headquartersRejectReason != null and headquartersRejectReason != ''">#{headquartersRejectReason},</if>
|
||||
<if test="revokeDate != null">#{revokeDate},</if>
|
||||
<if test="revokeManCode != null and revokeManCode != ''">#{revokeManCode},</if>
|
||||
<if test="revokeManName != null and revokeManName != ''">#{revokeManName},</if>
|
||||
<if test="revokeReason != null and revokeReason != ''">#{revokeReason},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisWriteoffApply" parameterType="EmisWriteoffApply">
|
||||
update emis_writeoff_apply
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="applyNo != null and applyNo != ''">apply_no = #{applyNo},</if>
|
||||
<if test="applyManCode != null and applyManCode != ''">apply_man_code = #{applyManCode},</if>
|
||||
<if test="applyManName != null and applyManName != ''">apply_man_name = #{applyManName},</if>
|
||||
<if test="applySiteCode != null and applySiteCode != ''">apply_site_code = #{applySiteCode},</if>
|
||||
<if test="applySiteName != null and applySiteName != ''">apply_site_name = #{applySiteName},</if>
|
||||
<if test="applyDate != null">apply_date = #{applyDate},</if>
|
||||
<if test="writeoffAmount != null">writeoff_amount = #{writeoffAmount},</if>
|
||||
<if test="applyMemo != null and applyMemo != ''">apply_memo = #{applyMemo},</if>
|
||||
<if test="blCenterConfirmed != null and blCenterConfirmed != ''">bl_center_confirmed = #{blCenterConfirmed},</if>
|
||||
<if test="centerConfirmManCode != null and centerConfirmManCode != ''">center_confirm_man_code = #{centerConfirmManCode},</if>
|
||||
<if test="centerConfirmManName != null and centerConfirmManName != ''">center_confirm_man_name = #{centerConfirmManName},</if>
|
||||
<if test="centerConfirmDate != null">center_confirm_date = #{centerConfirmDate},</if>
|
||||
<if test="centerConfirmNote != null and centerConfirmNote != ''">center_confirm_note = #{centerConfirmNote},</if>
|
||||
<if test="centerRejectReason != null and centerRejectReason != ''">center_reject_reason = #{centerRejectReason},</if>
|
||||
<if test="blHeadquartersConfirmed != null and blHeadquartersConfirmed != ''">bl_headquarters_confirmed = #{blHeadquartersConfirmed},</if>
|
||||
<if test="headquartersConfirmManCode != null and headquartersConfirmManCode != ''">headquarters_confirm_man_code = #{headquartersConfirmManCode},</if>
|
||||
<if test="headquartersConfirmManName != null and headquartersConfirmManName != ''">headquarters_confirm_man_name = #{headquartersConfirmManName},</if>
|
||||
<if test="headquartersConfirmDate != null">headquarters_confirm_date = #{headquartersConfirmDate},</if>
|
||||
<if test="headquartersConfirmNote != null and headquartersConfirmNote != ''">headquarters_confirm_note = #{headquartersConfirmNote},</if>
|
||||
<if test="headquartersRejectReason != null and headquartersRejectReason != ''">headquarters_reject_reason = #{headquartersRejectReason},</if>
|
||||
<if test="revokeDate != null">revoke_date = #{revokeDate},</if>
|
||||
<if test="revokeManCode != null and revokeManCode != ''">revoke_man_code = #{revokeManCode},</if>
|
||||
<if test="revokeManName != null and revokeManName != ''">revoke_man_name = #{revokeManName},</if>
|
||||
<if test="revokeReason != null and revokeReason != ''">revoke_reason = #{revokeReason},</if>
|
||||
<if test="salesmen != null and salesmen != ''">salesmen = #{salesmen},</if>
|
||||
<if test="payee != null and payee != ''">payee = #{payee},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisWriteoffApplyById" parameterType="Long">
|
||||
delete from emis_writeoff_apply where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisWriteoffApplyByIds" parameterType="String">
|
||||
delete from emis_writeoff_apply where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="auditCenterPass" parameterType="EmisWriteoffApply">
|
||||
update emis_writeoff_apply set
|
||||
bl_center_confirmed = #{blCenterConfirmed},
|
||||
center_confirm_man_code = #{centerConfirmManCode},
|
||||
center_confirm_man_name = #{centerConfirmManName},
|
||||
center_confirm_date = #{centerConfirmDate},
|
||||
center_confirm_note = #{centerConfirmNote},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="auditCenterReject" parameterType="EmisWriteoffApply">
|
||||
update emis_writeoff_apply set
|
||||
bl_center_confirmed = #{blCenterConfirmed},
|
||||
center_confirm_man_code = #{centerConfirmManCode},
|
||||
center_confirm_man_name = #{centerConfirmManName},
|
||||
center_confirm_date = #{centerConfirmDate},
|
||||
center_reject_reason = #{centerRejectReason},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="auditHeadquartersConfirm" parameterType="EmisWriteoffApply">
|
||||
update emis_writeoff_apply set
|
||||
bl_headquarters_confirmed = #{blHeadquartersConfirmed},
|
||||
headquarters_confirm_man_code = #{headquartersConfirmManCode},
|
||||
headquarters_confirm_man_name = #{headquartersConfirmManName},
|
||||
headquarters_confirm_date = #{headquartersConfirmDate},
|
||||
headquarters_confirm_note = #{headquartersConfirmNote},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="auditHeadquartersReject" parameterType="EmisWriteoffApply">
|
||||
update emis_writeoff_apply set
|
||||
bl_headquarters_confirmed = #{blHeadquartersConfirmed},
|
||||
headquarters_confirm_man_code = #{headquartersConfirmManCode},
|
||||
headquarters_confirm_man_name = #{headquartersConfirmManName},
|
||||
headquarters_confirm_date = #{headquartersConfirmDate},
|
||||
headquarters_reject_reason = #{headquartersRejectReason},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="revokeApply" parameterType="EmisWriteoffApply">
|
||||
update emis_writeoff_apply set
|
||||
bl_center_confirmed = #{blCenterConfirmed},
|
||||
revoke_man_code = #{revokeManCode},
|
||||
revoke_man_name = #{revokeManName},
|
||||
revoke_date = #{revokeDate},
|
||||
revoke_reason = #{revokeReason},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="reapply" parameterType="EmisWriteoffApply">
|
||||
update emis_writeoff_apply set
|
||||
bl_center_confirmed = #{blCenterConfirmed},
|
||||
bl_headquarters_confirmed = #{blHeadquartersConfirmed},
|
||||
center_confirm_man_code = null,
|
||||
center_confirm_man_name = null,
|
||||
center_confirm_date = null,
|
||||
center_confirm_note = null,
|
||||
center_reject_reason = null,
|
||||
headquarters_confirm_man_code = null,
|
||||
headquarters_confirm_man_name = null,
|
||||
headquarters_confirm_date = null,
|
||||
headquarters_confirm_note = null,
|
||||
headquarters_reject_reason = null,
|
||||
revoke_man_code = null,
|
||||
revoke_man_name = null,
|
||||
revoke_date = null,
|
||||
revoke_reason = null,
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 根据运单号查询运单、结算账单、结算子账单信息的ResultMap -->
|
||||
<resultMap type="EmisWriteoffApplyDetail" id="EmisWriteoffApplyDetailWithDetailsResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="applyId" column="apply_id"/>
|
||||
<result property="applyNo" column="apply_no"/>
|
||||
<result property="billCode" column="bill_code"/>
|
||||
<result property="applyMoney" column="apply_money"/>
|
||||
<result property="settleBillNo" column="settle_bill_no"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
|
||||
<!-- 关联运单信息 -->
|
||||
<association property="emisWaybill" javaType="EmisWaybill">
|
||||
<result property="id" column="w_id"/>
|
||||
<result property="orderSn" column="w_order_sn"/>
|
||||
<result property="custOrderId" column="w_cust_order_id"/>
|
||||
<result property="billCode" column="w_bill_code"/>
|
||||
<result property="billCodeSub" column="w_bill_code_sub"/>
|
||||
<result property="orderStatus" column="w_order_status"/>
|
||||
<result property="waybillStatus" column="w_waybill_status"/>
|
||||
<result property="orderType" column="w_order_type"/>
|
||||
<result property="orderDate" column="w_order_date"/>
|
||||
<result property="userId" column="w_user_id"/>
|
||||
<result property="customerCode" column="w_customer_code"/>
|
||||
<result property="customerName" column="w_customer_name"/>
|
||||
<result property="openId" column="w_open_id"/>
|
||||
<result property="receiveName" column="w_receive_name"/>
|
||||
<result property="receiveCompany" column="w_receive_company"/>
|
||||
<result property="receiveMobile" column="w_receive_mobile"/>
|
||||
<result property="receiveTel" column="w_receive_tel"/>
|
||||
<result property="receiveCountry" column="w_receive_country"/>
|
||||
<result property="receiveProvince" column="w_receive_province"/>
|
||||
<result property="receiveCity" column="w_receive_city"/>
|
||||
<result property="receiveAddress" column="w_receive_address"/>
|
||||
<result property="receivePostcode" column="w_receive_postcode"/>
|
||||
<result property="sendName" column="w_send_name"/>
|
||||
<result property="sendCompany" column="w_send_company"/>
|
||||
<result property="sendMobile" column="w_send_mobile"/>
|
||||
<result property="sendTel" column="w_send_tel"/>
|
||||
<result property="sendCountry" column="w_send_country"/>
|
||||
<result property="sendProvince" column="w_send_province"/>
|
||||
<result property="sendCity" column="w_send_city"/>
|
||||
<result property="sendAddress" column="w_send_address"/>
|
||||
<result property="sendPostcode" column="w_send_postcode"/>
|
||||
<result property="freight" column="w_freight"/>
|
||||
<result property="salesmen" column="w_salesmen"/>
|
||||
<result property="payee" column="w_payee"/>
|
||||
<result property="paymentType" column="w_payment_type"/>
|
||||
<result property="createBy" column="w_create_by"/>
|
||||
<result property="createTime" column="w_create_time"/>
|
||||
<result property="updateBy" column="w_update_by"/>
|
||||
<result property="updateTime" column="w_update_time"/>
|
||||
<result property="remark" column="w_remark"/>
|
||||
</association>
|
||||
|
||||
<!-- 关联结算账单信息 -->
|
||||
<association property="emisSettleBill" javaType="EmisSettleBill">
|
||||
<result property="id" column="sb_id"/>
|
||||
<result property="settleBillNo" column="sb_settle_bill_no"/>
|
||||
<result property="settleBillName" column="sb_settle_bill_name"/>
|
||||
<result property="settleType" column="sb_settle_type"/>
|
||||
<result property="settleStartDate" column="sb_settle_start_date"/>
|
||||
<result property="settleEndDate" column="sb_settle_end_date"/>
|
||||
<result property="billMonth" column="sb_bill_month"/>
|
||||
<result property="recMoney" column="sb_rec_money"/>
|
||||
<result property="recedMoney" column="sb_reced_money"/>
|
||||
<result property="invoicedMoney" column="sb_invoiced_money"/>
|
||||
<result property="custNo" column="sb_cust_no"/>
|
||||
<result property="custName" column="sb_cust_name"/>
|
||||
<result property="customerCode" column="sb_customer_code"/>
|
||||
<result property="customerName" column="sb_customer_name"/>
|
||||
<result property="siteCode" column="sb_site_code"/>
|
||||
<result property="siteName" column="sb_site_name"/>
|
||||
<result property="satisfyMoney" column="sb_satisfy_money"/>
|
||||
<result property="allowanceMoney" column="sb_allowance_money"/>
|
||||
<result property="deductionMoney" column="sb_deduction_money"/>
|
||||
<result property="otherMoney" column="sb_other_money"/>
|
||||
<result property="satisfyReason" column="sb_satisfy_reason"/>
|
||||
<result property="allowanceReason" column="sb_allowance_reason"/>
|
||||
<result property="deductionReason" column="sb_deduction_reason"/>
|
||||
<result property="otherReason" column="sb_other_reason"/>
|
||||
<result property="openBillStatus" column="sb_open_bill_status"/>
|
||||
<result property="paymentStatus" column="sb_payment_status"/>
|
||||
<result property="chargeStatus" column="sb_charge_status"/>
|
||||
<result property="sendPieceSum" column="sb_send_piece_sum"/>
|
||||
<result property="pieceNumber" column="sb_piece_number"/>
|
||||
<result property="feeWeight" column="sb_fee_weight"/>
|
||||
<result property="uncollectedAmount" column="sb_uncollected_amount"/>
|
||||
<result property="sendMoneySum" column="sb_send_money_sum"/>
|
||||
<result property="refundAmount" column="sb_refund_amount"/>
|
||||
<result property="refundMoney" column="sb_refund_money"/>
|
||||
<result property="payee" column="sb_payee"/>
|
||||
<result property="salesmen" column="sb_salesmen"/>
|
||||
<result property="creditPeriod" column="sb_credit_period"/>
|
||||
<result property="createBy" column="sb_create_by"/>
|
||||
<result property="createTime" column="sb_create_time"/>
|
||||
<result property="updateBy" column="sb_update_by"/>
|
||||
<result property="updateTime" column="sb_update_time"/>
|
||||
<result property="remark" column="sb_remark"/>
|
||||
</association>
|
||||
|
||||
<!-- 关联结算子账单信息 -->
|
||||
<association property="emisSettleSubBill" javaType="EmisSettleSubBill">
|
||||
<result property="id" column="ssb_id"/>
|
||||
<result property="billNo" column="ssb_bill_no"/>
|
||||
<result property="parentBillNo" column="ssb_parent_bill_no"/>
|
||||
<result property="settleBillNo" column="ssb_settle_bill_no"/>
|
||||
<result property="billCode" column="ssb_bill_code"/>
|
||||
<result property="billDate" column="ssb_bill_date"/>
|
||||
<result property="billFee" column="ssb_bill_fee"/>
|
||||
<result property="currency" column="ssb_currency"/>
|
||||
<result property="settleType" column="ssb_settle_type"/>
|
||||
<result property="blSplit" column="ssb_bl_split"/>
|
||||
<result property="blMerge" column="ssb_bl_merge"/>
|
||||
<result property="billMonth" column="ssb_bill_month"/>
|
||||
<result property="custNo" column="ssb_cust_no"/>
|
||||
<result property="custName" column="ssb_cust_name"/>
|
||||
<result property="customerCode" column="ssb_customer_code"/>
|
||||
<result property="customerName" column="ssb_customer_name"/>
|
||||
<result property="invoicedMoney" column="ssb_invoiced_money"/>
|
||||
<result property="recedMoney" column="ssb_reced_money"/>
|
||||
<result property="satisfyMoney" column="ssb_satisfy_money"/>
|
||||
<result property="allowanceMoney" column="ssb_allowance_money"/>
|
||||
<result property="deductionMoney" column="ssb_deduction_money"/>
|
||||
<result property="otherMoney" column="ssb_other_money"/>
|
||||
<result property="satisfyReason" column="ssb_satisfy_reason"/>
|
||||
<result property="allowanceReason" column="ssb_allowance_reason"/>
|
||||
<result property="deductionReason" column="ssb_deduction_reason"/>
|
||||
<result property="otherReason" column="ssb_other_reason"/>
|
||||
<result property="createBy" column="ssb_create_by"/>
|
||||
<result property="createTime" column="ssb_create_time"/>
|
||||
<result property="updateBy" column="ssb_update_by"/>
|
||||
<result property="updateTime" column="ssb_update_time"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<!-- 根据运单号查询运单、结算账单、结算子账单信息 -->
|
||||
<select id="selectEmisWriteoffApplyDetailListByBillCodes" parameterType="java.util.List" resultMap="EmisWriteoffApplyDetailWithDetailsResult">
|
||||
select distinct
|
||||
-- EmisWriteoffApplyDetail 基本信息
|
||||
w.bill_code as bill_code,
|
||||
0.00 as apply_money,
|
||||
ssb.settle_bill_no as settle_bill_no,
|
||||
|
||||
-- 运单信息
|
||||
w.id as w_id, w.order_sn as w_order_sn, w.cust_order_id as w_cust_order_id, w.bill_code as w_bill_code,
|
||||
w.bill_code_sub as w_bill_code_sub, w.order_status as w_order_status, w.waybill_status as w_waybill_status,
|
||||
w.order_type as w_order_type, w.order_date as w_order_date, w.user_id as w_user_id, w.customer_code as w_customer_code,
|
||||
w.customer_name as w_customer_name, w.open_id as w_open_id, w.receive_name as w_receive_name,
|
||||
w.receive_company as w_receive_company, w.receive_mobile as w_receive_mobile, w.receive_tel as w_receive_tel,
|
||||
w.receive_country as w_receive_country, w.receive_province as w_receive_province, w.receive_city as w_receive_city,
|
||||
w.receive_address as w_receive_address, w.receive_postcode as w_receive_postcode, w.send_name as w_send_name,
|
||||
w.send_company as w_send_company, w.send_mobile as w_send_mobile, w.send_tel as w_send_tel,
|
||||
w.send_country as w_send_country, w.send_province as w_send_province, w.send_city as w_send_city,
|
||||
w.send_address as w_send_address, w.send_postcode as w_send_postcode, w.freight as w_freight,
|
||||
w.salesmen as w_salesmen, w.payee as w_payee, w.payment_type as w_payment_type, w.create_by as w_create_by,
|
||||
w.create_time as w_create_time, w.update_by as w_update_by, w.update_time as w_update_time, w.remark as w_remark,
|
||||
|
||||
-- 结算账单信息
|
||||
sb.id as sb_id, sb.settle_bill_no as sb_settle_bill_no, sb.settle_bill_name as sb_settle_bill_name,
|
||||
sb.settle_type as sb_settle_type, sb.settle_start_date as sb_settle_start_date, sb.settle_end_date as sb_settle_end_date,
|
||||
sb.bill_month as sb_bill_month, sb.rec_money as sb_rec_money, sb.reced_money as sb_reced_money,
|
||||
sb.invoiced_money as sb_invoiced_money, sb.cust_no as sb_cust_no, sb.cust_name as sb_cust_name,
|
||||
sb.customer_code as sb_customer_code, sb.customer_name as sb_customer_name, sb.site_code as sb_site_code,
|
||||
sb.site_name as sb_site_name, sb.satisfy_money as sb_satisfy_money, sb.allowance_money as sb_allowance_money,
|
||||
sb.deduction_money as sb_deduction_money, sb.other_money as sb_other_money, sb.satisfy_reason as sb_satisfy_reason,
|
||||
sb.allowance_reason as sb_allowance_reason, sb.deduction_reason as sb_deduction_reason, sb.other_reason as sb_other_reason,
|
||||
sb.open_bill_status as sb_open_bill_status, sb.payment_status as sb_payment_status, sb.charge_status as sb_charge_status,
|
||||
sb.send_piece_sum as sb_send_piece_sum, sb.piece_number as sb_piece_number, sb.fee_weight as sb_fee_weight,
|
||||
sb.uncollected_amount as sb_uncollected_amount, sb.send_money_sum as sb_send_money_sum, sb.refund_amount as sb_refund_amount,
|
||||
sb.refund_money as sb_refund_money, sb.payee as sb_payee, sb.salesmen as sb_salesmen, sb.credit_period as sb_credit_period,
|
||||
sb.create_by as sb_create_by, sb.create_time as sb_create_time, sb.update_by as sb_update_by,
|
||||
sb.update_time as sb_update_time, sb.remark as sb_remark,
|
||||
|
||||
-- 结算子账单信息
|
||||
ssb.id as ssb_id, ssb.bill_no as ssb_bill_no, ssb.parent_bill_no as ssb_parent_bill_no,
|
||||
ssb.settle_bill_no as ssb_settle_bill_no, ssb.bill_code as ssb_bill_code, ssb.bill_date as ssb_bill_date,
|
||||
ssb.bill_fee as ssb_bill_fee, ssb.currency as ssb_currency, ssb.settle_type as ssb_settle_type,
|
||||
ssb.bl_split as ssb_bl_split, ssb.bl_merge as ssb_bl_merge, ssb.bill_month as ssb_bill_month,
|
||||
ssb.cust_no as ssb_cust_no, ssb.cust_name as ssb_cust_name, ssb.customer_code as ssb_customer_code,
|
||||
ssb.customer_name as ssb_customer_name, ssb.invoiced_money as ssb_invoiced_money, ssb.reced_money as ssb_reced_money,
|
||||
ssb.satisfy_money as ssb_satisfy_money, ssb.allowance_money as ssb_allowance_money, ssb.deduction_money as ssb_deduction_money,
|
||||
ssb.other_money as ssb_other_money, ssb.satisfy_reason as ssb_satisfy_reason, ssb.allowance_reason as ssb_allowance_reason,
|
||||
ssb.deduction_reason as ssb_deduction_reason, ssb.other_reason as ssb_other_reason, ssb.create_by as ssb_create_by,
|
||||
ssb.create_time as ssb_create_time, ssb.update_by as ssb_update_by, ssb.update_time as ssb_update_time
|
||||
from emis_waybill w
|
||||
left join emis_settle_sub_bill ssb on w.bill_code = ssb.bill_code
|
||||
left join emis_settle_bill sb on ssb.settle_bill_no = sb.settle_bill_no
|
||||
where w.bill_code in
|
||||
<foreach collection="list" item="billCode" open="(" separator="," close=")">
|
||||
#{billCode}
|
||||
</foreach>
|
||||
order by w.create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user