demand: TMS系统 - 客户账单管理 - 财务开票处理 - 开票申请记录/已开票界面-查询支持按照”开票主体“ 查询;

TMS系统 - 客户账单管理 - 财务开票处理 - 开票申请记录-新增加” 批量发票延期“接口; TMS系统 - 客户账单管理 - 财务开票处理 - 开票申请记录-新增加”批量取消发票延期“接口;TMS系统 - 客户账单管理 - 财务开票处理 - 开票申请记录 - 新增加查询条件:发票延期;是/否 两个状态,默认为空; TMS系统 - 客户账单管理 - 财务开票处理 - 开票申请记录 - 数据显示栏新增加字段”发票延期、、发票延期操作人、发票延期操作时间、开票主体“ 位置放在”收款状态“按顺序先后排列;
committer: heyu
This commit is contained in:
aike 2025-11-06 17:35:25 +08:00
parent 0421d7dd44
commit 8dbd3536d5
6 changed files with 199 additions and 8 deletions

View File

@ -290,4 +290,44 @@ public class EmisSettleInvoiceRecordController extends BaseController {
}
return AjaxResult.success("操作成功");
}
/**
* 批量发票延期
*/
@PreAuthorize("@ss.hasPermi('emis:emisSettleInvoiceRecord:delay')")
@Log(title = "批量发票延期", businessType = BusinessType.UPDATE)
@PostMapping("/batchDelayInvoice/{ids}")
public AjaxResult batchDelayInvoice(@PathVariable Long[] ids) {
try {
return toAjax(emisSettleInvoiceRecordService.batchDelayInvoice(ids));
} catch (Exception ex) {
ex.printStackTrace();
// 返回子定义异常
if (ex instanceof EmisBizError) {
return AjaxResult.error(ex.getMessage(), ((EmisBizError) ex).getErrorCode());
}
return AjaxResult.error("延期操作异常,联系客服");
}
}
/**
* 批量取消发票延期
*/
@PreAuthorize("@ss.hasPermi('emis:emisSettleInvoiceRecord:cancelDelay')")
@Log(title = "批量取消发票延期", businessType = BusinessType.UPDATE)
@PostMapping("/batchCancelDelayInvoice/{ids}")
public AjaxResult batchCancelDelayInvoice(@PathVariable Long[] ids) {
try {
return toAjax(emisSettleInvoiceRecordService.batchCancelDelayInvoice(ids));
} catch (Exception ex) {
ex.printStackTrace();
// 返回子定义异常
if (ex instanceof EmisBizError) {
return AjaxResult.error(ex.getMessage(), ((EmisBizError) ex).getErrorCode());
}
return AjaxResult.error("取消延期操作异常,联系客服");
}
}
}

View File

@ -134,6 +134,13 @@ public class EmisSettleInvoiceRecord extends BaseEntity
private String openChStatusDesc;
/* 使用的开票企业代码 */
private String openComCode;
/* 是否延期 0-不延期 1-延期 */
private String blDelay;
/* 发票延期操作人 */
private String delayOpManCode;
/* 发票延期操作时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date delayOpDate;
// 扩展信息
/* 申请 */
@ -146,7 +153,8 @@ public class EmisSettleInvoiceRecord extends BaseEntity
private String opManName;
private String opSiteName;
/* 开票主体 */
private String salerCompanyName;
List<EmisSettleInvoiceRel> invoiceRelList;

View File

@ -120,4 +120,21 @@ public interface EmisSettleInvoiceRecordMapper extends BaseMapper<EmisSettleInvo
public List<EmisSettleInvoiceRecord> selectSimpleInvoiceRecordList(
EmisSettleInvoiceRecord emisSettleInvoiceRecord);
/**
* 批量发票延期
*
* @param ids 发票记录ID数组
* @param delayOpManCode 延期操作人
* @return 结果
*/
public int batchDelayInvoice(@Param("ids") Long[] ids, @Param("delayOpManCode") String delayOpManCode);
/**
* 批量取消发票延期
*
* @param ids 发票记录ID数组
* @return 结果
*/
public int batchCancelDelayInvoice(@Param("ids") Long[] ids);
}

View File

@ -106,4 +106,22 @@ public interface IEmisSettleInvoiceRecordService {
public List<EmisSettleInvoiceRecordExportVO> selectCustomExportList(
EmisSettleInvoiceRecord emisSettleInvoiceRecord);
/**
* 批量发票延期
*
* @param ids 发票记录ID数组
* @return 结果
* @throws EmisBizError
*/
public int batchDelayInvoice(Long[] ids) throws EmisBizError;
/**
* 批量取消发票延期
*
* @param ids 发票记录ID数组
* @return 结果
* @throws EmisBizError
*/
public int batchCancelDelayInvoice(Long[] ids) throws EmisBizError;
}

View File

@ -782,4 +782,67 @@ public class EmisSettleInvoiceRecordServiceImpl extends EmisBaseService implemen
BigDecimal totalMoney;
}
/**
* 批量发票延期
*
* @param ids 发票记录ID数组
* @return 结果
* @throws EmisBizError
*/
@Override
@Transactional
public int batchDelayInvoice(Long[] ids) throws EmisBizError {
if (ids == null || ids.length == 0) {
throw new EmisBizError(EmisBizErrorType.FAIL, "请选择要延期的发票记录");
}
// 验证所有记录是否都是未开票状态
for (Long id : ids) {
EmisSettleInvoiceRecord record = emisSettleInvoiceRecordMapper.selectEmisSettleInvoiceRecordById(id);
if (record == null) {
throw new EmisBizError(EmisBizErrorType.FAIL, "发票记录不存在,ID: " + id);
}
if (!"0".equals(record.getInvoiceStatus())) {
throw new EmisBizError(EmisBizErrorType.FAIL,
"只能对未开票状态的发票进行延期操作,申请序号: " + record.getApplySeqNo());
}
}
// 获取当前操作人
String delayOpManCode = getCurrentUser().getEmpCode();
// 执行批量延期
return emisSettleInvoiceRecordMapper.batchDelayInvoice(ids, delayOpManCode);
}
/**
* 批量取消发票延期
*
* @param ids 发票记录ID数组
* @return 结果
* @throws EmisBizError
*/
@Override
@Transactional
public int batchCancelDelayInvoice(Long[] ids) throws EmisBizError {
if (ids == null || ids.length == 0) {
throw new EmisBizError(EmisBizErrorType.FAIL, "请选择要取消延期的发票记录");
}
// 验证所有记录是否都是已延期状态
for (Long id : ids) {
EmisSettleInvoiceRecord record = emisSettleInvoiceRecordMapper.selectEmisSettleInvoiceRecordById(id);
if (record == null) {
throw new EmisBizError(EmisBizErrorType.FAIL, "发票记录不存在,ID: " + id);
}
if (!"1".equals(record.getBlDelay())) {
throw new EmisBizError(EmisBizErrorType.FAIL,
"只能对已延期的发票进行取消延期操作,申请序号: " + record.getApplySeqNo());
}
}
// 执行批量取消延期
return emisSettleInvoiceRecordMapper.batchCancelDelayInvoice(ids);
}
}

View File

@ -52,6 +52,10 @@
<result property="openChStatus" column="open_ch_status" />
<result property="openChStatusDesc" column="open_ch_status_desc" />
<result property="openComCode" column="open_com_code" />
<result property="blDelay" column="bl_delay" />
<result property="delayOpManCode" column="delay_op_man_code" />
<result property="delayOpDate" column="delay_op_date" />
<result property="salerCompanyName" column="saler_company_name" />
<association property="applyManName" column="apply_man_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectEmpNameByCode"/>
<association property="applySiteName" column="apply_site_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
@ -88,12 +92,12 @@
</resultMap>
<sql id="selectEmisSettleInvoiceRecordVo">
select id, apply_seq_no, apply_date, apply_man_code, apply_site_code, customer_code, customer_name, settle_bill_no, settle_bill_name, apply_money, invoice_type, openbill_scope, company_name, company_tax_no, company_tel, company_address, invioce_remark, bank_name, bank_acc_no, contact, phone, real_tax_type, orig_open_money, add_tax_rate, add_open_money, open_money_max, open_money, invoice_no, reced_money, payment_status, invoice_status, invoice_status_desc, recieve_address, email, file_path, remark, bl_audit, audit_date, audit_man_code, audit_site_code, audit_note, op_man_code, op_date, op_site_code, open_ch_id, open_ch_status, open_ch_status_desc, open_com_code, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_settle_invoice_record
select id, apply_seq_no, apply_date, apply_man_code, apply_site_code, customer_code, customer_name, settle_bill_no, settle_bill_name, apply_money, invoice_type, openbill_scope, company_name, company_tax_no, company_tel, company_address, invioce_remark, bank_name, bank_acc_no, contact, phone, real_tax_type, orig_open_money, add_tax_rate, add_open_money, open_money_max, open_money, invoice_no, reced_money, payment_status, invoice_status, invoice_status_desc, recieve_address, email, file_path, remark, bl_audit, audit_date, audit_man_code, audit_site_code, audit_note, op_man_code, op_date, op_site_code, open_ch_id, open_ch_status, open_ch_status_desc, open_com_code, bl_delay, delay_op_man_code, delay_op_date, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_settle_invoice_record
</sql>
<select id="selectEmisSettleInvoiceRecordList" parameterType="EmisSettleInvoiceRecord" resultMap="EmisSettleInvoiceRecordResult">
select a.id, a.apply_seq_no, a.apply_date, a.apply_man_code, a.apply_site_code, a.customer_code, a.customer_name, a.settle_bill_no, a.settle_bill_name, a.apply_money, a.invoice_type, a.openbill_scope, a.company_name, a.company_tax_no, a.company_tel, a.company_address, a.invioce_remark, a.bank_name, a.bank_acc_no, a.contact, a.phone, a.real_tax_type, a.orig_open_money, a.add_tax_rate, a.add_open_money, a.open_money_max, a.open_money, ch.invoice_no, a.reced_money, a.payment_status, a.invoice_status, a.invoice_status_desc, a.recieve_address, a.email, a.file_path, a.remark, a.bl_audit, a.audit_date, a.audit_man_code, a.audit_site_code, a.audit_note, a.op_man_code, a.op_date, a.op_site_code, a.open_ch_id, a.open_ch_status, a.open_ch_status_desc, a.open_com_code, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.create_site, a.update_site
select a.id, a.apply_seq_no, a.apply_date, a.apply_man_code, a.apply_site_code, a.customer_code, a.customer_name, a.settle_bill_no, a.settle_bill_name, a.apply_money, a.invoice_type, a.openbill_scope, a.company_name, a.company_tax_no, a.company_tel, a.company_address, a.invioce_remark, a.bank_name, a.bank_acc_no, a.contact, a.phone, a.real_tax_type, a.orig_open_money, a.add_tax_rate, a.add_open_money, a.open_money_max, a.open_money, ch.invoice_no, a.reced_money, a.payment_status, a.invoice_status, a.invoice_status_desc, a.recieve_address, a.email, a.file_path, a.remark, a.bl_audit, a.audit_date, a.audit_man_code, a.audit_site_code, a.audit_note, a.op_man_code, a.op_date, a.op_site_code, a.open_ch_id, a.open_ch_status, a.open_ch_status_desc, a.open_com_code, a.bl_delay, a.delay_op_man_code, a.delay_op_date, ch.saler_company_name, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.create_site, a.update_site
from emis_settle_invoice_record a
left join emis_settle_invoice_ch_record ch on a.apply_seq_no = ch.apply_seq_no and ch.del_flag = '0'
@ -140,6 +144,8 @@
<if test="openChStatus != null and openChStatus != ''"> and a.open_ch_status = #{openChStatus}</if>
<if test="openChStatusDesc != null and openChStatusDesc != ''"> and a.open_ch_status_desc = #{openChStatusDesc}</if>
<if test="openComCode != null and openComCode != ''"> and a.open_com_code = #{openComCode}</if>
<if test="blDelay != null and blDelay != ''"> and a.bl_delay = #{blDelay}</if>
<if test="salerCompanyName != null and salerCompanyName != ''"> and ch.saler_company_name like concat('%', #{salerCompanyName}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and a.del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and a.create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and a.create_time = #{createTime}</if>
@ -247,7 +253,7 @@
a.open_money_max, a.open_money, ch.invoice_no, a.reced_money, a.payment_status, a.invoice_status,
a.invoice_status_desc, a.recieve_address, a.email, a.file_path, a.remark, a.bl_audit, a.audit_date,
a.audit_man_code, a.audit_site_code, a.audit_note, a.op_man_code, a.op_date, a.op_site_code, a.open_ch_id,
a.open_ch_status, a.open_ch_status_desc, a.open_com_code, a.del_flag, a.create_by, a.create_time, a.update_by,
a.open_ch_status, a.open_ch_status_desc, a.open_com_code, a.bl_delay, a.delay_op_man_code, a.delay_op_date, ch.saler_company_name, a.del_flag, a.create_by, a.create_time, a.update_by,
a.update_time, a.create_site, a.update_site,
apply_user.emp_name as apply_man_name,
audit_user.emp_name as audit_man_name,
@ -299,6 +305,8 @@
<if test="openChStatus != null and openChStatus != ''"> and a.open_ch_status = #{openChStatus}</if>
<if test="openChStatusDesc != null and openChStatusDesc != ''"> and a.open_ch_status_desc = #{openChStatusDesc}</if>
<if test="openComCode != null and openComCode != ''"> and a.open_com_code = #{openComCode}</if>
<if test="blDelay != null and blDelay != ''"> and a.bl_delay = #{blDelay}</if>
<if test="salerCompanyName != null and salerCompanyName != ''"> and ch.saler_company_name like concat('%', #{salerCompanyName}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and a.del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and a.create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and a.create_time = #{createTime}</if>
@ -362,19 +370,19 @@
</select>
<select id="selectInvoiceRecordListBySettleBillNo" parameterType="String" resultMap="EmisSettleInvoiceRecordResult">
select id, apply_seq_no, apply_date, apply_man_code, apply_site_code, customer_code, customer_name, settle_bill_no, settle_bill_name, apply_money, invoice_type, company_name, company_tax_no, company_tel, company_address, bank_name, bank_acc_no, contact, phone, real_tax_type, open_money_max, open_money, invoice_no, invoice_status, invoice_status_desc, recieve_address, email, file_path, remark, bl_audit, audit_date, audit_man_code, audit_site_code, audit_note, op_man_code, op_date, op_site_code, open_ch_id, open_ch_status, open_ch_status_desc, open_com_code, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, apply_seq_no, apply_date, apply_man_code, apply_site_code, customer_code, customer_name, settle_bill_no, settle_bill_name, apply_money, invoice_type, company_name, company_tax_no, company_tel, company_address, bank_name, bank_acc_no, contact, phone, real_tax_type, open_money_max, open_money, invoice_no, invoice_status, invoice_status_desc, recieve_address, email, file_path, remark, bl_audit, audit_date, audit_man_code, audit_site_code, audit_note, op_man_code, op_date, op_site_code, open_ch_id, open_ch_status, open_ch_status_desc, open_com_code, bl_delay, delay_op_man_code, delay_op_date, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_settle_invoice_record a
where del_flag = '0' and FIND_IN_SET( a.settle_bill_no,#{settleBillNo} )
</select>
<select id="selectInvoiceRecordByApplySeqNo" parameterType="String" resultMap="EmisSettleInvoiceRecordResult">
select id, apply_seq_no, apply_date, apply_man_code, apply_site_code, customer_code, customer_name, settle_bill_no, settle_bill_name, apply_money, invoice_type, company_name, company_tax_no, company_tel, company_address, bank_name, bank_acc_no, contact, phone, real_tax_type, open_money_max, open_money,reced_money, invoice_no, invoice_status, invoice_status_desc, recieve_address, email, file_path, remark, bl_audit, audit_date, audit_man_code, audit_site_code, audit_note, op_man_code, op_date, op_site_code, open_ch_id, open_ch_status, open_ch_status_desc, open_com_code, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select id, apply_seq_no, apply_date, apply_man_code, apply_site_code, customer_code, customer_name, settle_bill_no, settle_bill_name, apply_money, invoice_type, company_name, company_tax_no, company_tel, company_address, bank_name, bank_acc_no, contact, phone, real_tax_type, open_money_max, open_money,reced_money, invoice_no, invoice_status, invoice_status_desc, recieve_address, email, file_path, remark, bl_audit, audit_date, audit_man_code, audit_site_code, audit_note, op_man_code, op_date, op_site_code, open_ch_id, open_ch_status, open_ch_status_desc, open_com_code, bl_delay, delay_op_man_code, delay_op_date, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_settle_invoice_record a
where a.apply_seq_no = #{applySeqNo}
</select>
<select id="selectInvoiceRecordListByBillCodes" parameterType="java.util.List" resultMap="EmisSettleInvoiceRecordResult">
select distinct a.id, a.apply_seq_no, a.apply_date, a.apply_man_code, a.apply_site_code, a.customer_code, a.customer_name, a.settle_bill_no, a.settle_bill_name, a.apply_money, a.invoice_type, a.openbill_scope, a.company_name, a.company_tax_no, a.company_tel, a.company_address, a.invioce_remark, a.bank_name, a.bank_acc_no, a.contact, a.phone, a.real_tax_type, a.orig_open_money, a.add_tax_rate, a.add_open_money, a.open_money_max, a.open_money, ch.invoice_no, a.reced_money, a.payment_status, a.invoice_status, a.invoice_status_desc, a.recieve_address, a.email, a.file_path, a.remark, a.bl_audit, a.audit_date, a.audit_man_code, a.audit_site_code, a.audit_note, a.op_man_code, a.op_date, a.op_site_code, a.open_ch_id, a.open_ch_status, a.open_ch_status_desc, a.open_com_code, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.create_site, a.update_site
select distinct a.id, a.apply_seq_no, a.apply_date, a.apply_man_code, a.apply_site_code, a.customer_code, a.customer_name, a.settle_bill_no, a.settle_bill_name, a.apply_money, a.invoice_type, a.openbill_scope, a.company_name, a.company_tax_no, a.company_tel, a.company_address, a.invioce_remark, a.bank_name, a.bank_acc_no, a.contact, a.phone, a.real_tax_type, a.orig_open_money, a.add_tax_rate, a.add_open_money, a.open_money_max, a.open_money, ch.invoice_no, a.reced_money, a.payment_status, a.invoice_status, a.invoice_status_desc, a.recieve_address, a.email, a.file_path, a.remark, a.bl_audit, a.audit_date, a.audit_man_code, a.audit_site_code, a.audit_note, a.op_man_code, a.op_date, a.op_site_code, a.open_ch_id, a.open_ch_status, a.open_ch_status_desc, a.open_com_code, a.bl_delay, a.delay_op_man_code, a.delay_op_date, ch.saler_company_name, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.create_site, a.update_site
from emis_settle_invoice_record a
left join emis_settle_invoice_ch_record ch on a.apply_seq_no = ch.apply_seq_no and ch.del_flag = '0'
where a.del_flag = '0'
@ -459,8 +467,9 @@
</select>
<select id="selectEmisSettleInvoiceRecordById" parameterType="Long" resultMap="EmisSettleInvoiceRecordResult">
select id, apply_seq_no, apply_date, apply_man_code, apply_site_code, customer_code, customer_name, settle_bill_no, settle_bill_name, apply_money, invoice_type, openbill_scope, company_name, company_tax_no, company_tel, company_address, invioce_remark, bank_name, bank_acc_no, contact, phone, real_tax_type, orig_open_money, add_tax_rate, add_open_money, open_money_max, open_money, invoice_no, invoice_status, invoice_status_desc, recieve_address, email, file_path, remark, bl_audit, audit_date, audit_man_code, audit_site_code, audit_note, op_man_code, op_date, op_site_code, open_ch_id, open_ch_status, open_ch_status_desc, open_com_code, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
select a.id, a.apply_seq_no, a.apply_date, a.apply_man_code, a.apply_site_code, a.customer_code, a.customer_name, a.settle_bill_no, a.settle_bill_name, a.apply_money, a.invoice_type, a.openbill_scope, a.company_name, a.company_tax_no, a.company_tel, a.company_address, a.invioce_remark, a.bank_name, a.bank_acc_no, a.contact, a.phone, a.real_tax_type, a.orig_open_money, a.add_tax_rate, a.add_open_money, a.open_money_max, a.open_money, a.invoice_no, a.invoice_status, a.invoice_status_desc, a.recieve_address, a.email, a.file_path, a.remark, a.bl_audit, a.audit_date, a.audit_man_code, a.audit_site_code, a.audit_note, a.op_man_code, a.op_date, a.op_site_code, a.open_ch_id, a.open_ch_status, a.open_ch_status_desc, a.open_com_code, a.bl_delay, a.delay_op_man_code, a.delay_op_date, ch.saler_company_name, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.create_site, a.update_site
from emis_settle_invoice_record a
left join emis_settle_invoice_ch_record ch on a.apply_seq_no = ch.apply_seq_no and ch.del_flag = '0'
where a.id = #{id}
</select>
@ -512,6 +521,9 @@
<if test="openChStatus != null and openChStatus != ''">open_ch_status,</if>
<if test="openChStatusDesc != null and openChStatusDesc != ''">open_ch_status_desc,</if>
<if test="openComCode != null and openComCode != ''">open_com_code,</if>
<if test="blDelay != null and blDelay != ''">bl_delay,</if>
<if test="delayOpManCode != null and delayOpManCode != ''">delay_op_man_code,</if>
<if test="delayOpDate != null">delay_op_date,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
@ -568,6 +580,9 @@
<if test="openChStatus != null and openChStatus != ''">#{openChStatus},</if>
<if test="openChStatusDesc != null and openChStatusDesc != ''">#{openChStatusDesc},</if>
<if test="openComCode != null and openComCode != ''">#{openComCode},</if>
<if test="blDelay != null and blDelay != ''">#{blDelay},</if>
<if test="delayOpManCode != null and delayOpManCode != ''">#{delayOpManCode},</if>
<if test="delayOpDate != null">#{delayOpDate},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
@ -637,6 +652,9 @@
<if test="openChStatus != null and openChStatus != ''">open_ch_status = #{openChStatus},</if>
<if test="openChStatusDesc != null and openChStatusDesc != ''">open_ch_status_desc = #{openChStatusDesc},</if>
<if test="openComCode != null and openComCode != ''">open_com_code = #{openComCode},</if>
<if test="blDelay != null and blDelay != ''">bl_delay = #{blDelay},</if>
<if test="delayOpManCode != null and delayOpManCode != ''">delay_op_man_code = #{delayOpManCode},</if>
<if test="delayOpDate != null">delay_op_date = #{delayOpDate},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
@ -686,4 +704,31 @@
#{id}
</foreach>
</delete>
<!-- 批量发票延期 -->
<update id="batchDelayInvoice" parameterType="map">
update emis_settle_invoice_record
set bl_delay = '1',
delay_op_man_code = #{delayOpManCode},
delay_op_date = now()
where id in
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
and invoice_status = '0'
and (bl_delay is null or bl_delay = '0')
</update>
<!-- 批量取消发票延期 -->
<update id="batchCancelDelayInvoice" parameterType="map">
update emis_settle_invoice_record
set bl_delay = '0',
delay_op_man_code = null,
delay_op_date = null
where id in
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
and bl_delay = '1'
</update>
</mapper>