Merge pull request 'develop' (#222) from develop into master

Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/222
This commit is contained in:
heyu 2025-11-07 11:38:16 +08:00
commit 248ad9048b
8 changed files with 883 additions and 345 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,17 @@ public class EmisSettleInvoiceRecord extends BaseEntity
private String openChStatusDesc;
/* 使用的开票企业代码 */
private String openComCode;
/* 开票主体 */
private String salerCompanyName;
/* 是否延期 0-不延期 1-延期 */
private String blDelay;
/* 发票延期操作人编码 */
private String delayOpManCode;
/* 发票延期操作人名称 */
private String delayOpManName;
/* 发票延期操作时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date delayOpDate;
// 扩展信息
/* 申请 */

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

@ -1,10 +1,10 @@
/**
/**
* @Project: emis
* @Title: EmisSettlePayRelMapper.java
* @author linfso
* @date 2024-07-21 13:31:24
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
* @version v1.0
* @version v1.0
* @Description: <p> 支付子账单关联表 Mapper 接口 </p>
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
*/
@ -16,6 +16,7 @@ import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xdadan.erp.emis.domain.EmisSettleInvoiceRel;
import com.xdadan.erp.emis.domain.EmisSettlePayRel;
import org.apache.ibatis.annotations.Param;
/**
* @ClassName EmisSettlePayRelMapper
* @Description <p> 支付子账单关联表 Mapper 接口 </p>
@ -27,18 +28,26 @@ public interface EmisSettlePayRelMapper extends BaseMapper<EmisSettlePayRel>
/**
* 主键查询
* @param id
* @return
* @return
*/
public EmisSettlePayRel selectEmisSettlePayRelById(Long id);
public List<EmisSettlePayRel> selectHasPayListBySettleBillNo(String settleBillNo);
/**
* 根据账单号列表查询支付关联记录
*
* @param settleBillNoList 账单号列表
* @return 支付关联记录列表
*/
public List<EmisSettlePayRel> selectHasPayListBySettleBillNoList(@Param("settleBillNoList") List<String> settleBillNoList);
public List<Map> selectHasPayMapList(String settleBillNo);
/**
* 查询列表
*
* @param emisSettlePayRel
*
* @param emisSettlePayRel
* @return 集合
*/
public List<EmisSettlePayRel> selectEmisSettlePayRelList(EmisSettlePayRel emisSettlePayRel);
@ -46,32 +55,32 @@ public interface EmisSettlePayRelMapper extends BaseMapper<EmisSettlePayRel>
/**
* 检查是否重复
*
* @param emisSettlePayRel
*
* @param emisSettlePayRel
* @return 数量
*/
public int checkUnique(EmisSettlePayRel emisSettlePayRel);
/**
* 新增
*
* 新增
*
* @param emisSettlePayRel
* @return
* @return
*/
public int insertEmisSettlePayRel(EmisSettlePayRel emisSettlePayRel);
/**
* 修改
*
* @param emisSettlePayRel
* @return
*
* @param emisSettlePayRel
* @return
*/
public int updateEmisSettlePayRel(EmisSettlePayRel emisSettlePayRel);
/**
* 删除
*
*
* @param id 主键
* @return 结果
*/
@ -79,7 +88,7 @@ public interface EmisSettlePayRelMapper extends BaseMapper<EmisSettlePayRel>
/**
* 批量删除
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/

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

@ -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"/>
@ -62,6 +66,7 @@
<association property="opManName" column="op_man_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectEmpNameByCode"/>
<association property="opSiteName" column="op_site_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
<association property="delayOpManName" column="delay_op_man_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectEmpNameByCode"/>
</resultMap>
@ -88,12 +93,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 +145,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,16 +254,18 @@
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,
op_user.emp_name as op_man_name
op_user.emp_name as op_man_name,
delay_op_user.emp_name as delay_op_man_name
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'
left join sys_user apply_user on a.apply_man_code = apply_user.emp_code
left join sys_user audit_user on a.audit_man_code = audit_user.emp_code
left join sys_user op_user on a.op_man_code = op_user.emp_code
left join sys_user delay_op_user on a.delay_op_man_code = delay_op_user.emp_code
<where>
a.del_flag='0'
<if test="id != null "> and a.id = #{id}</if>
@ -299,6 +308,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 +373,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 +470,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 +524,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 +583,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 +655,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 +707,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>

View File

@ -79,6 +79,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</select>
<select id="selectHasPayListBySettleBillNoList" parameterType="List" resultMap="EmisSettlePayRelWithSubBillResult">
select distinct a.id, a.pay_id, a.bill_no, a.pay_money, a.del_flag, a.create_by, a.create_time,
a.update_by, a.update_time, a.create_site, a.update_site
from emis_settle_pay_rel a
inner join emis_settle_pay_record b on a.pay_id = b.pay_id and b.del_flag = '0'
inner join emis_settle_pay_bill_rel espbr on a.pay_id = espbr.pay_id and espbr.del_flag = '0'
inner join emis_settle_sub_bill essb on a.bill_no = essb.bill_no and essb.del_flag = '0'
where a.del_flag = '0'
<if test="settleBillNoList != null and settleBillNoList.size() > 0">
and espbr.settle_bill_no in
<foreach item="settleBillNo" collection="settleBillNoList" open="(" separator="," close=")">
#{settleBillNo}
</foreach>
and essb.settle_bill_no in
<foreach item="settleBillNo" collection="settleBillNoList" open="(" separator="," close=")">
#{settleBillNo}
</foreach>
</if>
</select>
<select id="selectHasPayMapList" parameterType="String" resultType="map">
select a.bill_no as billNo, sum(a.pay_money) sumMoney