demand: TMS-航信开票记录-定制导出:增加上旬和下旬,导出表格定制备注中
committer: heyu
This commit is contained in:
parent
34bb02e08c
commit
ec9b36fafb
@ -23,16 +23,14 @@ import java.math.BigDecimal;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName EmisSettleInvoiceChRecord
|
* @ClassName EmisSettleInvoiceChRecord
|
||||||
* @Description 渠道开票记录表
|
* @Description 渠道开票记录表
|
||||||
* @author linfso
|
* @author linfso
|
||||||
* @date 2024-07-24 23:39:08
|
* @date 2024-07-24 23:39:08
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class EmisSettleInvoiceChRecord extends BaseEntity
|
public class EmisSettleInvoiceChRecord extends BaseEntity {
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/* id */
|
/* id */
|
||||||
@ -99,11 +97,11 @@ public class EmisSettleInvoiceChRecord extends BaseEntity
|
|||||||
/* 操作人 */
|
/* 操作人 */
|
||||||
private String opManCode;
|
private String opManCode;
|
||||||
/* 操作时间 */
|
/* 操作时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date opDate;
|
private Date opDate;
|
||||||
/* 操作站点 */
|
/* 操作站点 */
|
||||||
private String opSiteCode;
|
private String opSiteCode;
|
||||||
/* 开票渠道编号 code -航信 HX */
|
/* 开票渠道编号 code -航信 HX */
|
||||||
private String openChId;
|
private String openChId;
|
||||||
/* 开票渠道状态 0-待开票 1-已开票 2-拒绝开票 */
|
/* 开票渠道状态 0-待开票 1-已开票 2-拒绝开票 */
|
||||||
private String openChStatus;
|
private String openChStatus;
|
||||||
@ -114,7 +112,7 @@ public class EmisSettleInvoiceChRecord extends BaseEntity
|
|||||||
/* 扩展信息,货物名称 */
|
/* 扩展信息,货物名称 */
|
||||||
private String extData;
|
private String extData;
|
||||||
|
|
||||||
// 扩展字段
|
// 扩展字段
|
||||||
// 账期
|
// 账期
|
||||||
private String billMonth;
|
private String billMonth;
|
||||||
// 面单号
|
// 面单号
|
||||||
@ -143,4 +141,7 @@ public class EmisSettleInvoiceChRecord extends BaseEntity
|
|||||||
// 付款日期
|
// 付款日期
|
||||||
private String exportPayDays;
|
private String exportPayDays;
|
||||||
|
|
||||||
|
// 结算账单名称
|
||||||
|
private String settleBillName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -145,7 +145,7 @@ public class InvoiceExportHelper {
|
|||||||
public static String processCustomRemark(EmisSettleInvoiceChRecord record) {
|
public static String processCustomRemark(EmisSettleInvoiceChRecord record) {
|
||||||
String remark = record.getOpenBillRemark();
|
String remark = record.getOpenBillRemark();
|
||||||
if (remark == null) {
|
if (remark == null) {
|
||||||
return "";
|
remark = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 只去除与 LTD 直接相邻的符号
|
// 只去除与 LTD 直接相邻的符号
|
||||||
@ -157,16 +157,26 @@ public class InvoiceExportHelper {
|
|||||||
finalResult = finalResult.replaceAll("(有限公司|有限责任公司)", "").trim();
|
finalResult = finalResult.replaceAll("(有限公司|有限责任公司)", "").trim();
|
||||||
|
|
||||||
if ("2".equals(record.getSettleType())) {
|
if ("2".equals(record.getSettleType())) {
|
||||||
return finalResult.replaceAll("-", ",").replaceAll("(\\d+)\\s+", "$1").trim();
|
finalResult = finalResult.replaceAll("-", ",").replaceAll("(\\d+)\\s+", "$1").trim();
|
||||||
|
} else {
|
||||||
|
// 处理多个日期的情况
|
||||||
|
String[] dateParts = finalResult.split("-");
|
||||||
|
if (dateParts.length > 0) {
|
||||||
|
String lastPart = dateParts[dateParts.length - 1].trim();
|
||||||
|
// 去除日期和公司名之间的空格
|
||||||
|
lastPart = lastPart.replaceAll("(\\d+)\\s+", "$1");
|
||||||
|
finalResult = "现金-" + lastPart;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理多个日期的情况
|
// 检查结算账单名称是否包含上旬/下旬,如果包含则在末尾拼接
|
||||||
String[] dateParts = finalResult.split("-");
|
String settleBillName = record.getSettleBillName();
|
||||||
if (dateParts.length > 0) {
|
if (settleBillName != null && !settleBillName.trim().isEmpty()) {
|
||||||
String lastPart = dateParts[dateParts.length - 1].trim();
|
if (settleBillName.contains("上旬")) {
|
||||||
// 去除日期和公司名之间的空格
|
finalResult = finalResult + "上旬";
|
||||||
lastPart = lastPart.replaceAll("(\\d+)\\s+", "$1");
|
} else if (settleBillName.contains("下旬")) {
|
||||||
finalResult = "现金-" + lastPart;
|
finalResult = finalResult + "下旬";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return finalResult;
|
return finalResult;
|
||||||
|
|||||||
@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="settleType" column="settle_type" />
|
<result property="settleType" column="settle_type" />
|
||||||
<result property="openBillRemark" column="open_bill_remark" />
|
<result property="openBillRemark" column="open_bill_remark" />
|
||||||
<result property="payDays" column="pay_days" />
|
<result property="payDays" column="pay_days" />
|
||||||
|
<result property="settleBillName" column="settle_bill_name" />
|
||||||
|
|
||||||
<association property="billMonth" column="apply_seq_no" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectBillMonthByApplySeqNo"/>
|
<association property="billMonth" column="apply_seq_no" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectBillMonthByApplySeqNo"/>
|
||||||
<association property="billCode" column="apply_seq_no" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectBillCodeByApplySeqNo"/>
|
<association property="billCode" column="apply_seq_no" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectBillCodeByApplySeqNo"/>
|
||||||
@ -105,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="salesmen" column="salesmen" />
|
<result property="salesmen" column="salesmen" />
|
||||||
<result property="applyManName" column="apply_man_name" />
|
<result property="applyManName" column="apply_man_name" />
|
||||||
<result property="applyRemark" column="apply_remark" />
|
<result property="applyRemark" column="apply_remark" />
|
||||||
|
<result property="settleBillName" column="settle_bill_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectEmisSettleInvoiceChRecordVo">
|
<sql id="selectEmisSettleInvoiceChRecordVo">
|
||||||
@ -314,6 +316,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
bri.settle_type,
|
bri.settle_type,
|
||||||
bri.open_bill_remark,
|
bri.open_bill_remark,
|
||||||
pdi.pay_days,
|
pdi.pay_days,
|
||||||
|
sbi.settle_bill_name,
|
||||||
cu.emp_name as create_by_name,
|
cu.emp_name as create_by_name,
|
||||||
uu.emp_name as update_by_name,
|
uu.emp_name as update_by_name,
|
||||||
cs.site_name as create_site_name,
|
cs.site_name as create_site_name,
|
||||||
@ -408,6 +411,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
WHERE bd.del_flag = '0'
|
WHERE bd.del_flag = '0'
|
||||||
GROUP BY bd.id, b.settle_type
|
GROUP BY bd.id, b.settle_type
|
||||||
) bri ON bri.id = a.id
|
) bri ON bri.id = a.id
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
bd.id,
|
||||||
|
MAX(esb.settle_bill_name) as settle_bill_name
|
||||||
|
FROM emis_settle_invoice_ch_record bd
|
||||||
|
LEFT JOIN emis_settle_invoice_bill_rel ibr ON ibr.apply_seq_no = bd.apply_seq_no AND ibr.del_flag = '0'
|
||||||
|
LEFT JOIN emis_settle_bill esb ON esb.settle_bill_no = ibr.settle_bill_no AND esb.del_flag = '0'
|
||||||
|
WHERE bd.del_flag = '0'
|
||||||
|
GROUP BY bd.id
|
||||||
|
) sbi ON sbi.id = a.id
|
||||||
LEFT JOIN sys_user cu ON cu.user_id = a.create_by AND cu.del_flag = '0'
|
LEFT JOIN sys_user cu ON cu.user_id = a.create_by AND cu.del_flag = '0'
|
||||||
LEFT JOIN sys_user uu ON uu.user_id = a.update_by AND uu.del_flag = '0'
|
LEFT JOIN sys_user uu ON uu.user_id = a.update_by AND uu.del_flag = '0'
|
||||||
LEFT JOIN emis_site cs ON cs.site_code = a.create_site AND cs.del_flag = '0'
|
LEFT JOIN emis_site cs ON cs.site_code = a.create_site AND cs.del_flag = '0'
|
||||||
@ -867,7 +880,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
LEFT JOIN emis_settle_pay_bill_rel pbr ON ibr.settle_bill_no = pbr.settle_bill_no
|
LEFT JOIN emis_settle_pay_bill_rel pbr ON ibr.settle_bill_no = pbr.settle_bill_no
|
||||||
LEFT JOIN emis_settle_pay_record pr ON pr.pay_id = pbr.pay_id
|
LEFT JOIN emis_settle_pay_record pr ON pr.pay_id = pbr.pay_id
|
||||||
WHERE bd.apply_seq_no = a.apply_seq_no AND bd.del_flag = '0'
|
WHERE bd.apply_seq_no = a.apply_seq_no AND bd.del_flag = '0'
|
||||||
) as pay_days
|
) as pay_days,
|
||||||
|
(
|
||||||
|
SELECT MAX(esb.settle_bill_name)
|
||||||
|
FROM emis_settle_invoice_ch_record bd
|
||||||
|
LEFT JOIN emis_settle_invoice_bill_rel ibr ON ibr.apply_seq_no = bd.apply_seq_no AND ibr.del_flag = '0'
|
||||||
|
LEFT JOIN emis_settle_bill esb ON esb.settle_bill_no = ibr.settle_bill_no AND esb.del_flag = '0'
|
||||||
|
WHERE bd.apply_seq_no = a.apply_seq_no AND bd.del_flag = '0'
|
||||||
|
) as settle_bill_name
|
||||||
FROM emis_settle_invoice_ch_record a
|
FROM emis_settle_invoice_ch_record a
|
||||||
WHERE a.del_flag = '0'
|
WHERE a.del_flag = '0'
|
||||||
AND a.apply_seq_no IN
|
AND a.apply_seq_no IN
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user