This commit is contained in:
linfso 2024-08-30 10:38:38 +08:00
parent 7634ba173b
commit 01509a2d45
2 changed files with 5 additions and 52 deletions

View File

@ -106,6 +106,11 @@ public class EmisSettleBillServiceImpl extends EmisBaseService implements IEmisS
throw new EmisBizError(EmisBizErrorType.FAIL,"合账失败,未选择子账单");
}
int cnt=emisSettleBillMapper.checkUnique(emisSettleBill);
if(cnt>1){
throw new EmisBizError(EmisBizErrorType.FAIL,"账单名称重复");
}
// 生成账单号
emisSettleBill.setSettleBillNo(WaybillHelper.genSettleBillNo());

View File

@ -164,59 +164,7 @@
<select id="checkUnique" parameterType="EmisSettleBill" resultType="int">
select count(1) from emis_settle_bill
where del_flag='0'
and id = #{id}
and settle_bill_no = #{settleBillNo}
and settle_bill_name = #{settleBillName}
and settle_type = #{settleType}
and settle_start_date = #{settleStartDate}
and settle_end_date = #{settleEndDate}
and bill_month = #{billMonth}
and rec_money = #{recMoney}
and reced_money = #{recedMoney}
and cust_no = #{custNo}
and customer_code = #{customerCode}
and customer_name = #{customerName}
and site_code = #{siteCode}
and site_name = #{siteName}
and satisfy_money = #{satisfyMoney}
and allowance_money = #{allowanceMoney}
and deduction_money = #{deductionMoney}
and other_money = #{otherMoney}
and satisfy_reason = #{satisfyReason}
and allowance_reason = #{allowanceReason}
and deduction_reason = #{deductionReason}
and other_reason = #{otherReason}
and open_bill_status = #{openBillStatus}
and payment_status = #{paymentStatus}
and charge_status = #{chargeStatus}
and send_piece_sum = #{sendPieceSum}
and piece_number = #{pieceNumber}
and fee_weight = #{feeWeight}
and uncollected_amount = #{uncollectedAmount}
and send_money_sum = #{sendMoneySum}
and refund_amount = #{refundAmount}
and refund_money = #{refundMoney}
and payee = #{payee}
and salesmen = #{salesmen}
and bl_send_oms = #{blSendOms}
and bl_confirm_center = #{blConfirmCenter}
and confirm_center_date = #{confirmCenterDate}
and confirm_center_note = #{confirmCenterNote}
and confirm_center_man_code = #{confirmCenterManCode}
and confirm_center_code = #{confirmCenterCode}
and bl_confirm_site = #{blConfirmSite}
and confirm_site_date = #{confirmSiteDate}
and confirm_site_man_code = #{confirmSiteManCode}
and confirm_site_note = #{confirmSiteNote}
and confirm_site_code = #{confirmSiteCode}
and remark = #{remark}
and del_flag = #{delFlag}
and create_by = #{createBy}
and create_time = #{createTime}
and update_by = #{updateBy}
and update_time = #{updateTime}
and create_site = #{createSite}
and update_site = #{updateSite}
limit 1
</select>