dedmapper.xml 50.5 KB
Newer Older
hulei committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904
<?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.brilliance.isc.mda.dao.DedMapper">

    <resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Ded">
        <result property="inr" column="inr" jdbcType="VARCHAR"/>
        <result property="ownref" column="ownref" jdbcType="VARCHAR"/>
        <result property="nam" column="nam" jdbcType="VARCHAR"/>
        <result property="ownusr" column="ownusr" jdbcType="VARCHAR"/>
        <result property="credat" column="credat" jdbcType="DATE"/>
        <result property="opndat" column="opndat" jdbcType="DATE"/>
        <result property="clsdat" column="clsdat" jdbcType="DATE"/>
        <result property="cnfdat" column="cnfdat" jdbcType="DATE"/>
        <result property="advdat" column="advdat" jdbcType="DATE"/>
        <result property="issnam" column="issnam" jdbcType="VARCHAR"/>
        <result property="issref" column="issref" jdbcType="VARCHAR"/>
        <result property="amedat" column="amedat" jdbcType="DATE"/>
        <result property="amenbr" column="amenbr" jdbcType="INTEGER"/>
        <result property="avbby" column="avbby" jdbcType="VARCHAR"/>
        <result property="avbwth" column="avbwth" jdbcType="VARCHAR"/>
        <result property="bennam" column="bennam" jdbcType="VARCHAR"/>
        <result property="benref" column="benref" jdbcType="VARCHAR"/>
        <result property="chato" column="chato" jdbcType="VARCHAR"/>
        <result property="cnfflg" column="cnfflg" jdbcType="VARCHAR"/>
        <result property="cnfdet" column="cnfdet" jdbcType="VARCHAR"/>
        <result property="cnfsta" column="cnfsta" jdbcType="VARCHAR"/>
        <result property="expdat" column="expdat" jdbcType="DATE"/>
        <result property="expplc" column="expplc" jdbcType="VARCHAR"/>
        <result property="lcrtyp" column="lcrtyp" jdbcType="VARCHAR"/>
        <result property="nomspc" column="nomspc" jdbcType="VARCHAR"/>
        <result property="nomtop" column="nomtop" jdbcType="DECIMAL"/>
        <result property="nomton" column="nomton" jdbcType="DECIMAL"/>
        <result property="preadvdt" column="preadvdt" jdbcType="DATE"/>
        <result property="shpdat" column="shpdat" jdbcType="DATE"/>
        <result property="shpfro" column="shpfro" jdbcType="VARCHAR"/>
        <result property="shppar" column="shppar" jdbcType="VARCHAR"/>
        <result property="shpto" column="shpto" jdbcType="VARCHAR"/>
        <result property="shptrs" column="shptrs" jdbcType="VARCHAR"/>
        <result property="stacty" column="stacty" jdbcType="VARCHAR"/>
        <result property="stagod" column="stagod" jdbcType="VARCHAR"/>
        <result property="utlnbr" column="utlnbr" jdbcType="INTEGER"/>
        <result property="ver" column="ver" jdbcType="VARCHAR"/>
        <result property="aplbnkdirsnd" column="aplbnkdirsnd" jdbcType="VARCHAR"/>
        <result property="tenmaxday" column="tenmaxday" jdbcType="INTEGER"/>
        <result property="cnfsnd" column="cnfsnd" jdbcType="VARCHAR"/>
        <result property="revflg" column="revflg" jdbcType="VARCHAR"/>
        <result property="revnbr" column="revnbr" jdbcType="INTEGER"/>
        <result property="revtimes" column="revtimes" jdbcType="INTEGER"/>
        <result property="revdat" column="revdat" jdbcType="DATE"/>
        <result property="revcum" column="revcum" jdbcType="VARCHAR"/>
        <result property="revtyp" column="revtyp" jdbcType="VARCHAR"/>
        <result property="cnfins" column="cnfins" jdbcType="VARCHAR"/>
        <result property="redclsflg" column="redclsflg" jdbcType="VARCHAR"/>
        <result property="advnbr" column="advnbr" jdbcType="INTEGER"/>
        <result property="resflg" column="resflg" jdbcType="VARCHAR"/>
        <result property="inctrf" column="inctrf" jdbcType="VARCHAR"/>
        <result property="apprul" column="apprul" jdbcType="VARCHAR"/>
        <result property="apprultxt" column="apprultxt" jdbcType="VARCHAR"/>
        <result property="pordis" column="pordis" jdbcType="VARCHAR"/>
        <result property="porloa" column="porloa" jdbcType="VARCHAR"/>
        <result property="nonban" column="nonban" jdbcType="VARCHAR"/>
        <result property="etyextkey" column="etyextkey" jdbcType="VARCHAR"/>
        <result property="partcon" column="partcon" jdbcType="DECIMAL"/>
        <result property="collflg" column="collflg" jdbcType="VARCHAR"/>
        <result property="teskeyunc" column="teskeyunc" jdbcType="VARCHAR"/>
        <result property="dbtflg" column="dbtflg" jdbcType="VARCHAR"/>
        <result property="branchinr" column="branchinr" jdbcType="VARCHAR"/>
        <result property="bchkeyinr" column="bchkeyinr" jdbcType="VARCHAR"/>
        <result property="rskrat" column="rskrat" jdbcType="DECIMAL"/>
        <result property="dflg" column="dflg" jdbcType="VARCHAR"/>
        <result property="tratyp" column="tratyp" jdbcType="VARCHAR"/>
        <result property="oppbnk" column="oppbnk" jdbcType="VARCHAR"/>
        <result property="mytype" column="mytype" jdbcType="VARCHAR"/>
        <result property="isyifu" column="isyifu" jdbcType="VARCHAR"/>
        <result property="elcflg" column="elcflg" jdbcType="VARCHAR"/>
        <result property="shppro" column="shppro" jdbcType="VARCHAR"/>
        <result property="conno" column="conno" jdbcType="VARCHAR"/>
        <result property="concur" column="concur" jdbcType="VARCHAR"/>
        <result property="conamt" column="conamt" jdbcType="DECIMAL"/>
        <result property="rejame" column="rejame" jdbcType="VARCHAR"/>
        <result property="rejnbr" column="rejnbr" jdbcType="DECIMAL"/>
        <result property="cantyp" column="cantyp" jdbcType="VARCHAR"/>
        <result property="rejflg" column="rejflg" jdbcType="VARCHAR"/>
        <result property="dkflg" column="dkflg" jdbcType="VARCHAR"/>
        <result property="fqtime" column="fqtime" jdbcType="VARCHAR"/>
        <result property="kzref" column="kzref" jdbcType="VARCHAR"/>
        <result property="fqzytgfw" column="fqzytgfw" jdbcType="VARCHAR"/>
        <result property="bdflg" column="bdflg" jdbcType="VARCHAR"/>
        <result property="sdsrfs" column="sdsrfs" jdbcType="VARCHAR"/>
        <result property="idcode" column="idcode" jdbcType="VARCHAR"/>
        <result property="finrenflg" column="finrenflg" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        inr,ownref,nam,ownusr,credat,opndat,clsdat,cnfdat,advdat,issnam,issref,amedat,amenbr,avbby,avbwth,bennam,benref,chato,cnfflg,cnfdet,cnfsta,expdat,expplc,lcrtyp,nomspc,nomtop,nomton,preadvdt,shpdat,shpfro,shppar,shpto,shptrs,stacty,stagod,utlnbr,ver,aplbnkdirsnd,tenmaxday,cnfsnd,revflg,revnbr,revtimes,revdat,revcum,revtyp,cnfins,redclsflg,advnbr,resflg,inctrf,apprul,apprultxt,pordis,porloa,nonban,etyextkey,partcon,collflg,teskeyunc,dbtflg,branchinr,bchkeyinr,rskrat,dflg,tratyp,oppbnk,mytype,isyifu,elcflg,shppro,conno,concur,conamt,rejame,rejnbr,cantyp,rejflg,dkflg,fqtime,kzref,fqzytgfw,bdflg,sdsrfs,idcode,finrenflg
    </sql>

    <select id="selectByPrimaryKey" resultMap="BaseResultMap">
        select
            <include refid="Base_Column_List" />
        from ded
        where inr = #{inr,jdbcType=VARCHAR}
    </select>

    <delete id="deleteByPrimaryKey">
        delete from ded
        where inr = #{inr,jdbcType=VARCHAR}
    </delete>

    <insert id="insert">
        insert into ded (<include refid="Base_Column_List" />)
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            #{inr,jdbcType=VARCHAR},
            #{ownref,jdbcType=VARCHAR},
            #{nam,jdbcType=VARCHAR},
            #{ownusr,jdbcType=VARCHAR},
            #{credat,jdbcType=DATE},
            #{opndat,jdbcType=DATE},
            #{clsdat,jdbcType=DATE},
            #{cnfdat,jdbcType=DATE},
            #{advdat,jdbcType=DATE},
            #{issnam,jdbcType=VARCHAR},
            #{issref,jdbcType=VARCHAR},
            #{amedat,jdbcType=DATE},
            #{amenbr,jdbcType=INTEGER},
            #{avbby,jdbcType=VARCHAR},
            #{avbwth,jdbcType=VARCHAR},
            #{bennam,jdbcType=VARCHAR},
            #{benref,jdbcType=VARCHAR},
            #{chato,jdbcType=VARCHAR},
            #{cnfflg,jdbcType=VARCHAR},
            #{cnfdet,jdbcType=VARCHAR},
            #{cnfsta,jdbcType=VARCHAR},
            #{expdat,jdbcType=DATE},
            #{expplc,jdbcType=VARCHAR},
            #{lcrtyp,jdbcType=VARCHAR},
            #{nomspc,jdbcType=VARCHAR},
            #{nomtop,jdbcType=DECIMAL},
            #{nomton,jdbcType=DECIMAL},
            #{preadvdt,jdbcType=DATE},
            #{shpdat,jdbcType=DATE},
            #{shpfro,jdbcType=VARCHAR},
            #{shppar,jdbcType=VARCHAR},
            #{shpto,jdbcType=VARCHAR},
            #{shptrs,jdbcType=VARCHAR},
            #{stacty,jdbcType=VARCHAR},
            #{stagod,jdbcType=VARCHAR},
            #{utlnbr,jdbcType=INTEGER},
            #{ver,jdbcType=VARCHAR},
            #{aplbnkdirsnd,jdbcType=VARCHAR},
            #{tenmaxday,jdbcType=INTEGER},
            #{cnfsnd,jdbcType=VARCHAR},
            #{revflg,jdbcType=VARCHAR},
            #{revnbr,jdbcType=INTEGER},
            #{revtimes,jdbcType=INTEGER},
            #{revdat,jdbcType=DATE},
            #{revcum,jdbcType=VARCHAR},
            #{revtyp,jdbcType=VARCHAR},
            #{cnfins,jdbcType=VARCHAR},
            #{redclsflg,jdbcType=VARCHAR},
            #{advnbr,jdbcType=INTEGER},
            #{resflg,jdbcType=VARCHAR},
            #{inctrf,jdbcType=VARCHAR},
            #{apprul,jdbcType=VARCHAR},
            #{apprultxt,jdbcType=VARCHAR},
            #{pordis,jdbcType=VARCHAR},
            #{porloa,jdbcType=VARCHAR},
            #{nonban,jdbcType=VARCHAR},
            #{etyextkey,jdbcType=VARCHAR},
            #{partcon,jdbcType=DECIMAL},
            #{collflg,jdbcType=VARCHAR},
            #{teskeyunc,jdbcType=VARCHAR},
            #{dbtflg,jdbcType=VARCHAR},
            #{branchinr,jdbcType=VARCHAR},
            #{bchkeyinr,jdbcType=VARCHAR},
            #{rskrat,jdbcType=DECIMAL},
            #{dflg,jdbcType=VARCHAR},
            #{tratyp,jdbcType=VARCHAR},
            #{oppbnk,jdbcType=VARCHAR},
            #{mytype,jdbcType=VARCHAR},
            #{isyifu,jdbcType=VARCHAR},
            #{elcflg,jdbcType=VARCHAR},
            #{shppro,jdbcType=VARCHAR},
            #{conno,jdbcType=VARCHAR},
            #{concur,jdbcType=VARCHAR},
            #{conamt,jdbcType=DECIMAL},
            #{rejame,jdbcType=VARCHAR},
            #{rejnbr,jdbcType=DECIMAL},
            #{cantyp,jdbcType=VARCHAR},
            #{rejflg,jdbcType=VARCHAR},
            #{dkflg,jdbcType=VARCHAR},
            #{fqtime,jdbcType=VARCHAR},
            #{kzref,jdbcType=VARCHAR},
            #{fqzytgfw,jdbcType=VARCHAR},
            #{bdflg,jdbcType=VARCHAR},
            #{sdsrfs,jdbcType=VARCHAR},
            #{idcode,jdbcType=VARCHAR},
            #{finrenflg,jdbcType=VARCHAR},
        </trim>
    </insert>

    <insert id="insertSelective">
        insert into ded
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="inr != null">inr,</if>
            <if test="ownref != null">ownref,</if>
            <if test="nam != null">nam,</if>
            <if test="ownusr != null">ownusr,</if>
            <if test="credat != null">credat,</if>
            <if test="opndat != null">opndat,</if>
            <if test="clsdat != null">clsdat,</if>
            <if test="cnfdat != null">cnfdat,</if>
            <if test="advdat != null">advdat,</if>
            <if test="issnam != null">issnam,</if>
            <if test="issref != null">issref,</if>
            <if test="amedat != null">amedat,</if>
            <if test="amenbr != null">amenbr,</if>
            <if test="avbby != null">avbby,</if>
            <if test="avbwth != null">avbwth,</if>
            <if test="bennam != null">bennam,</if>
            <if test="benref != null">benref,</if>
            <if test="chato != null">chato,</if>
            <if test="cnfflg != null">cnfflg,</if>
            <if test="cnfdet != null">cnfdet,</if>
            <if test="cnfsta != null">cnfsta,</if>
            <if test="expdat != null">expdat,</if>
            <if test="expplc != null">expplc,</if>
            <if test="lcrtyp != null">lcrtyp,</if>
            <if test="nomspc != null">nomspc,</if>
            <if test="nomtop != null">nomtop,</if>
            <if test="nomton != null">nomton,</if>
            <if test="preadvdt != null">preadvdt,</if>
            <if test="shpdat != null">shpdat,</if>
            <if test="shpfro != null">shpfro,</if>
            <if test="shppar != null">shppar,</if>
            <if test="shpto != null">shpto,</if>
            <if test="shptrs != null">shptrs,</if>
            <if test="stacty != null">stacty,</if>
            <if test="stagod != null">stagod,</if>
            <if test="utlnbr != null">utlnbr,</if>
            <if test="ver != null">ver,</if>
            <if test="aplbnkdirsnd != null">aplbnkdirsnd,</if>
            <if test="tenmaxday != null">tenmaxday,</if>
            <if test="cnfsnd != null">cnfsnd,</if>
            <if test="revflg != null">revflg,</if>
            <if test="revnbr != null">revnbr,</if>
            <if test="revtimes != null">revtimes,</if>
            <if test="revdat != null">revdat,</if>
            <if test="revcum != null">revcum,</if>
            <if test="revtyp != null">revtyp,</if>
            <if test="cnfins != null">cnfins,</if>
            <if test="redclsflg != null">redclsflg,</if>
            <if test="advnbr != null">advnbr,</if>
            <if test="resflg != null">resflg,</if>
            <if test="inctrf != null">inctrf,</if>
            <if test="apprul != null">apprul,</if>
            <if test="apprultxt != null">apprultxt,</if>
            <if test="pordis != null">pordis,</if>
            <if test="porloa != null">porloa,</if>
            <if test="nonban != null">nonban,</if>
            <if test="etyextkey != null">etyextkey,</if>
            <if test="partcon != null">partcon,</if>
            <if test="collflg != null">collflg,</if>
            <if test="teskeyunc != null">teskeyunc,</if>
            <if test="dbtflg != null">dbtflg,</if>
            <if test="branchinr != null">branchinr,</if>
            <if test="bchkeyinr != null">bchkeyinr,</if>
            <if test="rskrat != null">rskrat,</if>
            <if test="dflg != null">dflg,</if>
            <if test="tratyp != null">tratyp,</if>
            <if test="oppbnk != null">oppbnk,</if>
            <if test="mytype != null">mytype,</if>
            <if test="isyifu != null">isyifu,</if>
            <if test="elcflg != null">elcflg,</if>
            <if test="shppro != null">shppro,</if>
            <if test="conno != null">conno,</if>
            <if test="concur != null">concur,</if>
            <if test="conamt != null">conamt,</if>
            <if test="rejame != null">rejame,</if>
            <if test="rejnbr != null">rejnbr,</if>
            <if test="cantyp != null">cantyp,</if>
            <if test="rejflg != null">rejflg,</if>
            <if test="dkflg != null">dkflg,</if>
            <if test="fqtime != null">fqtime,</if>
            <if test="kzref != null">kzref,</if>
            <if test="fqzytgfw != null">fqzytgfw,</if>
            <if test="bdflg != null">bdflg,</if>
            <if test="sdsrfs != null">sdsrfs,</if>
            <if test="idcode != null">idcode,</if>
            <if test="finrenflg != null">finrenflg,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="inr != null">#{inr,jdbcType=VARCHAR}, </if>
            <if test="ownref != null">#{ownref,jdbcType=VARCHAR}, </if>
            <if test="nam != null">#{nam,jdbcType=VARCHAR}, </if>
            <if test="ownusr != null">#{ownusr,jdbcType=VARCHAR}, </if>
            <if test="credat != null">#{credat,jdbcType=DATE}, </if>
            <if test="opndat != null">#{opndat,jdbcType=DATE}, </if>
            <if test="clsdat != null">#{clsdat,jdbcType=DATE}, </if>
            <if test="cnfdat != null">#{cnfdat,jdbcType=DATE}, </if>
            <if test="advdat != null">#{advdat,jdbcType=DATE}, </if>
            <if test="issnam != null">#{issnam,jdbcType=VARCHAR}, </if>
            <if test="issref != null">#{issref,jdbcType=VARCHAR}, </if>
            <if test="amedat != null">#{amedat,jdbcType=DATE}, </if>
            <if test="amenbr != null">#{amenbr,jdbcType=INTEGER}, </if>
            <if test="avbby != null">#{avbby,jdbcType=VARCHAR}, </if>
            <if test="avbwth != null">#{avbwth,jdbcType=VARCHAR}, </if>
            <if test="bennam != null">#{bennam,jdbcType=VARCHAR}, </if>
            <if test="benref != null">#{benref,jdbcType=VARCHAR}, </if>
            <if test="chato != null">#{chato,jdbcType=VARCHAR}, </if>
            <if test="cnfflg != null">#{cnfflg,jdbcType=VARCHAR}, </if>
            <if test="cnfdet != null">#{cnfdet,jdbcType=VARCHAR}, </if>
            <if test="cnfsta != null">#{cnfsta,jdbcType=VARCHAR}, </if>
            <if test="expdat != null">#{expdat,jdbcType=DATE}, </if>
            <if test="expplc != null">#{expplc,jdbcType=VARCHAR}, </if>
            <if test="lcrtyp != null">#{lcrtyp,jdbcType=VARCHAR}, </if>
            <if test="nomspc != null">#{nomspc,jdbcType=VARCHAR}, </if>
            <if test="nomtop != null">#{nomtop,jdbcType=DECIMAL}, </if>
            <if test="nomton != null">#{nomton,jdbcType=DECIMAL}, </if>
            <if test="preadvdt != null">#{preadvdt,jdbcType=DATE}, </if>
            <if test="shpdat != null">#{shpdat,jdbcType=DATE}, </if>
            <if test="shpfro != null">#{shpfro,jdbcType=VARCHAR}, </if>
            <if test="shppar != null">#{shppar,jdbcType=VARCHAR}, </if>
            <if test="shpto != null">#{shpto,jdbcType=VARCHAR}, </if>
            <if test="shptrs != null">#{shptrs,jdbcType=VARCHAR}, </if>
            <if test="stacty != null">#{stacty,jdbcType=VARCHAR}, </if>
            <if test="stagod != null">#{stagod,jdbcType=VARCHAR}, </if>
            <if test="utlnbr != null">#{utlnbr,jdbcType=INTEGER}, </if>
            <if test="ver != null">#{ver,jdbcType=VARCHAR}, </if>
            <if test="aplbnkdirsnd != null">#{aplbnkdirsnd,jdbcType=VARCHAR}, </if>
            <if test="tenmaxday != null">#{tenmaxday,jdbcType=INTEGER}, </if>
            <if test="cnfsnd != null">#{cnfsnd,jdbcType=VARCHAR}, </if>
            <if test="revflg != null">#{revflg,jdbcType=VARCHAR}, </if>
            <if test="revnbr != null">#{revnbr,jdbcType=INTEGER}, </if>
            <if test="revtimes != null">#{revtimes,jdbcType=INTEGER}, </if>
            <if test="revdat != null">#{revdat,jdbcType=DATE}, </if>
            <if test="revcum != null">#{revcum,jdbcType=VARCHAR}, </if>
            <if test="revtyp != null">#{revtyp,jdbcType=VARCHAR}, </if>
            <if test="cnfins != null">#{cnfins,jdbcType=VARCHAR}, </if>
            <if test="redclsflg != null">#{redclsflg,jdbcType=VARCHAR}, </if>
            <if test="advnbr != null">#{advnbr,jdbcType=INTEGER}, </if>
            <if test="resflg != null">#{resflg,jdbcType=VARCHAR}, </if>
            <if test="inctrf != null">#{inctrf,jdbcType=VARCHAR}, </if>
            <if test="apprul != null">#{apprul,jdbcType=VARCHAR}, </if>
            <if test="apprultxt != null">#{apprultxt,jdbcType=VARCHAR}, </if>
            <if test="pordis != null">#{pordis,jdbcType=VARCHAR}, </if>
            <if test="porloa != null">#{porloa,jdbcType=VARCHAR}, </if>
            <if test="nonban != null">#{nonban,jdbcType=VARCHAR}, </if>
            <if test="etyextkey != null">#{etyextkey,jdbcType=VARCHAR}, </if>
            <if test="partcon != null">#{partcon,jdbcType=DECIMAL}, </if>
            <if test="collflg != null">#{collflg,jdbcType=VARCHAR}, </if>
            <if test="teskeyunc != null">#{teskeyunc,jdbcType=VARCHAR}, </if>
            <if test="dbtflg != null">#{dbtflg,jdbcType=VARCHAR}, </if>
            <if test="branchinr != null">#{branchinr,jdbcType=VARCHAR}, </if>
            <if test="bchkeyinr != null">#{bchkeyinr,jdbcType=VARCHAR}, </if>
            <if test="rskrat != null">#{rskrat,jdbcType=DECIMAL}, </if>
            <if test="dflg != null">#{dflg,jdbcType=VARCHAR}, </if>
            <if test="tratyp != null">#{tratyp,jdbcType=VARCHAR}, </if>
            <if test="oppbnk != null">#{oppbnk,jdbcType=VARCHAR}, </if>
            <if test="mytype != null">#{mytype,jdbcType=VARCHAR}, </if>
            <if test="isyifu != null">#{isyifu,jdbcType=VARCHAR}, </if>
            <if test="elcflg != null">#{elcflg,jdbcType=VARCHAR}, </if>
            <if test="shppro != null">#{shppro,jdbcType=VARCHAR}, </if>
            <if test="conno != null">#{conno,jdbcType=VARCHAR}, </if>
            <if test="concur != null">#{concur,jdbcType=VARCHAR}, </if>
            <if test="conamt != null">#{conamt,jdbcType=DECIMAL}, </if>
            <if test="rejame != null">#{rejame,jdbcType=VARCHAR}, </if>
            <if test="rejnbr != null">#{rejnbr,jdbcType=DECIMAL}, </if>
            <if test="cantyp != null">#{cantyp,jdbcType=VARCHAR}, </if>
            <if test="rejflg != null">#{rejflg,jdbcType=VARCHAR}, </if>
            <if test="dkflg != null">#{dkflg,jdbcType=VARCHAR}, </if>
            <if test="fqtime != null">#{fqtime,jdbcType=VARCHAR}, </if>
            <if test="kzref != null">#{kzref,jdbcType=VARCHAR}, </if>
            <if test="fqzytgfw != null">#{fqzytgfw,jdbcType=VARCHAR}, </if>
            <if test="bdflg != null">#{bdflg,jdbcType=VARCHAR}, </if>
            <if test="sdsrfs != null">#{sdsrfs,jdbcType=VARCHAR}, </if>
            <if test="idcode != null">#{idcode,jdbcType=VARCHAR}, </if>
            <if test="finrenflg != null">#{finrenflg,jdbcType=VARCHAR}, </if>
        </trim>
    </insert>

    <update id="updateByPrimaryKeySelective">
        update ded
        <set>
            <if test="ownref != null">ownref = #{ownref,jdbcType=VARCHAR},</if>
            <if test="nam != null">nam = #{nam,jdbcType=VARCHAR},</if>
            <if test="ownusr != null">ownusr = #{ownusr,jdbcType=VARCHAR},</if>
            <if test="credat != null">credat = #{credat,jdbcType=DATE},</if>
            <if test="opndat != null">opndat = #{opndat,jdbcType=DATE},</if>
            <if test="clsdat != null">clsdat = #{clsdat,jdbcType=DATE},</if>
            <if test="cnfdat != null">cnfdat = #{cnfdat,jdbcType=DATE},</if>
            <if test="advdat != null">advdat = #{advdat,jdbcType=DATE},</if>
            <if test="issnam != null">issnam = #{issnam,jdbcType=VARCHAR},</if>
            <if test="issref != null">issref = #{issref,jdbcType=VARCHAR},</if>
            <if test="amedat != null">amedat = #{amedat,jdbcType=DATE},</if>
            <if test="amenbr != null">amenbr = #{amenbr,jdbcType=INTEGER},</if>
            <if test="avbby != null">avbby = #{avbby,jdbcType=VARCHAR},</if>
            <if test="avbwth != null">avbwth = #{avbwth,jdbcType=VARCHAR},</if>
            <if test="bennam != null">bennam = #{bennam,jdbcType=VARCHAR},</if>
            <if test="benref != null">benref = #{benref,jdbcType=VARCHAR},</if>
            <if test="chato != null">chato = #{chato,jdbcType=VARCHAR},</if>
            <if test="cnfflg != null">cnfflg = #{cnfflg,jdbcType=VARCHAR},</if>
            <if test="cnfdet != null">cnfdet = #{cnfdet,jdbcType=VARCHAR},</if>
            <if test="cnfsta != null">cnfsta = #{cnfsta,jdbcType=VARCHAR},</if>
            <if test="expdat != null">expdat = #{expdat,jdbcType=DATE},</if>
            <if test="expplc != null">expplc = #{expplc,jdbcType=VARCHAR},</if>
            <if test="lcrtyp != null">lcrtyp = #{lcrtyp,jdbcType=VARCHAR},</if>
            <if test="nomspc != null">nomspc = #{nomspc,jdbcType=VARCHAR},</if>
            <if test="nomtop != null">nomtop = #{nomtop,jdbcType=DECIMAL},</if>
            <if test="nomton != null">nomton = #{nomton,jdbcType=DECIMAL},</if>
            <if test="preadvdt != null">preadvdt = #{preadvdt,jdbcType=DATE},</if>
            <if test="shpdat != null">shpdat = #{shpdat,jdbcType=DATE},</if>
            <if test="shpfro != null">shpfro = #{shpfro,jdbcType=VARCHAR},</if>
            <if test="shppar != null">shppar = #{shppar,jdbcType=VARCHAR},</if>
            <if test="shpto != null">shpto = #{shpto,jdbcType=VARCHAR},</if>
            <if test="shptrs != null">shptrs = #{shptrs,jdbcType=VARCHAR},</if>
            <if test="stacty != null">stacty = #{stacty,jdbcType=VARCHAR},</if>
            <if test="stagod != null">stagod = #{stagod,jdbcType=VARCHAR},</if>
            <if test="utlnbr != null">utlnbr = #{utlnbr,jdbcType=INTEGER},</if>
            <if test="ver != null">ver = #{ver,jdbcType=VARCHAR},</if>
            <if test="aplbnkdirsnd != null">aplbnkdirsnd = #{aplbnkdirsnd,jdbcType=VARCHAR},</if>
            <if test="tenmaxday != null">tenmaxday = #{tenmaxday,jdbcType=INTEGER},</if>
            <if test="cnfsnd != null">cnfsnd = #{cnfsnd,jdbcType=VARCHAR},</if>
            <if test="revflg != null">revflg = #{revflg,jdbcType=VARCHAR},</if>
            <if test="revnbr != null">revnbr = #{revnbr,jdbcType=INTEGER},</if>
            <if test="revtimes != null">revtimes = #{revtimes,jdbcType=INTEGER},</if>
            <if test="revdat != null">revdat = #{revdat,jdbcType=DATE},</if>
            <if test="revcum != null">revcum = #{revcum,jdbcType=VARCHAR},</if>
            <if test="revtyp != null">revtyp = #{revtyp,jdbcType=VARCHAR},</if>
            <if test="cnfins != null">cnfins = #{cnfins,jdbcType=VARCHAR},</if>
            <if test="redclsflg != null">redclsflg = #{redclsflg,jdbcType=VARCHAR},</if>
            <if test="advnbr != null">advnbr = #{advnbr,jdbcType=INTEGER},</if>
            <if test="resflg != null">resflg = #{resflg,jdbcType=VARCHAR},</if>
            <if test="inctrf != null">inctrf = #{inctrf,jdbcType=VARCHAR},</if>
            <if test="apprul != null">apprul = #{apprul,jdbcType=VARCHAR},</if>
            <if test="apprultxt != null">apprultxt = #{apprultxt,jdbcType=VARCHAR},</if>
            <if test="pordis != null">pordis = #{pordis,jdbcType=VARCHAR},</if>
            <if test="porloa != null">porloa = #{porloa,jdbcType=VARCHAR},</if>
            <if test="nonban != null">nonban = #{nonban,jdbcType=VARCHAR},</if>
            <if test="etyextkey != null">etyextkey = #{etyextkey,jdbcType=VARCHAR},</if>
            <if test="partcon != null">partcon = #{partcon,jdbcType=DECIMAL},</if>
            <if test="collflg != null">collflg = #{collflg,jdbcType=VARCHAR},</if>
            <if test="teskeyunc != null">teskeyunc = #{teskeyunc,jdbcType=VARCHAR},</if>
            <if test="dbtflg != null">dbtflg = #{dbtflg,jdbcType=VARCHAR},</if>
            <if test="branchinr != null">branchinr = #{branchinr,jdbcType=VARCHAR},</if>
            <if test="bchkeyinr != null">bchkeyinr = #{bchkeyinr,jdbcType=VARCHAR},</if>
            <if test="rskrat != null">rskrat = #{rskrat,jdbcType=DECIMAL},</if>
            <if test="dflg != null">dflg = #{dflg,jdbcType=VARCHAR},</if>
            <if test="tratyp != null">tratyp = #{tratyp,jdbcType=VARCHAR},</if>
            <if test="oppbnk != null">oppbnk = #{oppbnk,jdbcType=VARCHAR},</if>
            <if test="mytype != null">mytype = #{mytype,jdbcType=VARCHAR},</if>
            <if test="isyifu != null">isyifu = #{isyifu,jdbcType=VARCHAR},</if>
            <if test="elcflg != null">elcflg = #{elcflg,jdbcType=VARCHAR},</if>
            <if test="shppro != null">shppro = #{shppro,jdbcType=VARCHAR},</if>
            <if test="conno != null">conno = #{conno,jdbcType=VARCHAR},</if>
            <if test="concur != null">concur = #{concur,jdbcType=VARCHAR},</if>
            <if test="conamt != null">conamt = #{conamt,jdbcType=DECIMAL},</if>
            <if test="rejame != null">rejame = #{rejame,jdbcType=VARCHAR},</if>
            <if test="rejnbr != null">rejnbr = #{rejnbr,jdbcType=DECIMAL},</if>
            <if test="cantyp != null">cantyp = #{cantyp,jdbcType=VARCHAR},</if>
            <if test="rejflg != null">rejflg = #{rejflg,jdbcType=VARCHAR},</if>
            <if test="dkflg != null">dkflg = #{dkflg,jdbcType=VARCHAR},</if>
            <if test="fqtime != null">fqtime = #{fqtime,jdbcType=VARCHAR},</if>
            <if test="kzref != null">kzref = #{kzref,jdbcType=VARCHAR},</if>
            <if test="fqzytgfw != null">fqzytgfw = #{fqzytgfw,jdbcType=VARCHAR},</if>
            <if test="bdflg != null">bdflg = #{bdflg,jdbcType=VARCHAR},</if>
            <if test="sdsrfs != null">sdsrfs = #{sdsrfs,jdbcType=VARCHAR},</if>
            <if test="idcode != null">idcode = #{idcode,jdbcType=VARCHAR},</if>
            <if test="finrenflg != null">finrenflg = #{finrenflg,jdbcType=VARCHAR},</if>
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <update id="updateByPrimaryKey">
        update ded
        <set>
            ownref = #{ownref,jdbcType=VARCHAR},
            nam = #{nam,jdbcType=VARCHAR},
            ownusr = #{ownusr,jdbcType=VARCHAR},
            credat = #{credat,jdbcType=DATE},
            opndat = #{opndat,jdbcType=DATE},
            clsdat = #{clsdat,jdbcType=DATE},
            cnfdat = #{cnfdat,jdbcType=DATE},
            advdat = #{advdat,jdbcType=DATE},
            issnam = #{issnam,jdbcType=VARCHAR},
            issref = #{issref,jdbcType=VARCHAR},
            amedat = #{amedat,jdbcType=DATE},
            amenbr = #{amenbr,jdbcType=INTEGER},
            avbby = #{avbby,jdbcType=VARCHAR},
            avbwth = #{avbwth,jdbcType=VARCHAR},
            bennam = #{bennam,jdbcType=VARCHAR},
            benref = #{benref,jdbcType=VARCHAR},
            chato = #{chato,jdbcType=VARCHAR},
            cnfflg = #{cnfflg,jdbcType=VARCHAR},
            cnfdet = #{cnfdet,jdbcType=VARCHAR},
            cnfsta = #{cnfsta,jdbcType=VARCHAR},
            expdat = #{expdat,jdbcType=DATE},
            expplc = #{expplc,jdbcType=VARCHAR},
            lcrtyp = #{lcrtyp,jdbcType=VARCHAR},
            nomspc = #{nomspc,jdbcType=VARCHAR},
            nomtop = #{nomtop,jdbcType=DECIMAL},
            nomton = #{nomton,jdbcType=DECIMAL},
            preadvdt = #{preadvdt,jdbcType=DATE},
            shpdat = #{shpdat,jdbcType=DATE},
            shpfro = #{shpfro,jdbcType=VARCHAR},
            shppar = #{shppar,jdbcType=VARCHAR},
            shpto = #{shpto,jdbcType=VARCHAR},
            shptrs = #{shptrs,jdbcType=VARCHAR},
            stacty = #{stacty,jdbcType=VARCHAR},
            stagod = #{stagod,jdbcType=VARCHAR},
            utlnbr = #{utlnbr,jdbcType=INTEGER},
            ver = #{ver,jdbcType=VARCHAR},
            aplbnkdirsnd = #{aplbnkdirsnd,jdbcType=VARCHAR},
            tenmaxday = #{tenmaxday,jdbcType=INTEGER},
            cnfsnd = #{cnfsnd,jdbcType=VARCHAR},
            revflg = #{revflg,jdbcType=VARCHAR},
            revnbr = #{revnbr,jdbcType=INTEGER},
            revtimes = #{revtimes,jdbcType=INTEGER},
            revdat = #{revdat,jdbcType=DATE},
            revcum = #{revcum,jdbcType=VARCHAR},
            revtyp = #{revtyp,jdbcType=VARCHAR},
            cnfins = #{cnfins,jdbcType=VARCHAR},
            redclsflg = #{redclsflg,jdbcType=VARCHAR},
            advnbr = #{advnbr,jdbcType=INTEGER},
            resflg = #{resflg,jdbcType=VARCHAR},
            inctrf = #{inctrf,jdbcType=VARCHAR},
            apprul = #{apprul,jdbcType=VARCHAR},
            apprultxt = #{apprultxt,jdbcType=VARCHAR},
            pordis = #{pordis,jdbcType=VARCHAR},
            porloa = #{porloa,jdbcType=VARCHAR},
            nonban = #{nonban,jdbcType=VARCHAR},
            etyextkey = #{etyextkey,jdbcType=VARCHAR},
            partcon = #{partcon,jdbcType=DECIMAL},
            collflg = #{collflg,jdbcType=VARCHAR},
            teskeyunc = #{teskeyunc,jdbcType=VARCHAR},
            dbtflg = #{dbtflg,jdbcType=VARCHAR},
            branchinr = #{branchinr,jdbcType=VARCHAR},
            bchkeyinr = #{bchkeyinr,jdbcType=VARCHAR},
            rskrat = #{rskrat,jdbcType=DECIMAL},
            dflg = #{dflg,jdbcType=VARCHAR},
            tratyp = #{tratyp,jdbcType=VARCHAR},
            oppbnk = #{oppbnk,jdbcType=VARCHAR},
            mytype = #{mytype,jdbcType=VARCHAR},
            isyifu = #{isyifu,jdbcType=VARCHAR},
            elcflg = #{elcflg,jdbcType=VARCHAR},
            shppro = #{shppro,jdbcType=VARCHAR},
            conno = #{conno,jdbcType=VARCHAR},
            concur = #{concur,jdbcType=VARCHAR},
            conamt = #{conamt,jdbcType=DECIMAL},
            rejame = #{rejame,jdbcType=VARCHAR},
            rejnbr = #{rejnbr,jdbcType=DECIMAL},
            cantyp = #{cantyp,jdbcType=VARCHAR},
            rejflg = #{rejflg,jdbcType=VARCHAR},
            dkflg = #{dkflg,jdbcType=VARCHAR},
            fqtime = #{fqtime,jdbcType=VARCHAR},
            kzref = #{kzref,jdbcType=VARCHAR},
            fqzytgfw = #{fqzytgfw,jdbcType=VARCHAR},
            bdflg = #{bdflg,jdbcType=VARCHAR},
            sdsrfs = #{sdsrfs,jdbcType=VARCHAR},
            idcode = #{idcode,jdbcType=VARCHAR},
            finrenflg = #{finrenflg,jdbcType=VARCHAR},
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <delete id="deleteByIds">
        delete from act where inr in
        <foreach item="item" index="index" collection="collection" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

    <update id="dyncUpdate">
        update ded
        <set>
            <if test="module.ownref != null">ownref = #{module.ownref,jdbcType=VARCHAR},</if>
            <if test="module.nam != null">nam = #{module.nam,jdbcType=VARCHAR},</if>
            <if test="module.ownusr != null">ownusr = #{module.ownusr,jdbcType=VARCHAR},</if>
            <if test="module.credat != null">credat = #{module.credat,jdbcType=DATE},</if>
            <if test="module.opndat != null">opndat = #{module.opndat,jdbcType=DATE},</if>
            <if test="module.clsdat != null">clsdat = #{module.clsdat,jdbcType=DATE},</if>
            <if test="module.cnfdat != null">cnfdat = #{module.cnfdat,jdbcType=DATE},</if>
            <if test="module.advdat != null">advdat = #{module.advdat,jdbcType=DATE},</if>
            <if test="module.issnam != null">issnam = #{module.issnam,jdbcType=VARCHAR},</if>
            <if test="module.issref != null">issref = #{module.issref,jdbcType=VARCHAR},</if>
            <if test="module.amedat != null">amedat = #{module.amedat,jdbcType=DATE},</if>
            <if test="module.amenbr != null">amenbr = #{module.amenbr,jdbcType=INTEGER},</if>
            <if test="module.avbby != null">avbby = #{module.avbby,jdbcType=VARCHAR},</if>
            <if test="module.avbwth != null">avbwth = #{module.avbwth,jdbcType=VARCHAR},</if>
            <if test="module.bennam != null">bennam = #{module.bennam,jdbcType=VARCHAR},</if>
            <if test="module.benref != null">benref = #{module.benref,jdbcType=VARCHAR},</if>
            <if test="module.chato != null">chato = #{module.chato,jdbcType=VARCHAR},</if>
            <if test="module.cnfflg != null">cnfflg = #{module.cnfflg,jdbcType=VARCHAR},</if>
            <if test="module.cnfdet != null">cnfdet = #{module.cnfdet,jdbcType=VARCHAR},</if>
            <if test="module.cnfsta != null">cnfsta = #{module.cnfsta,jdbcType=VARCHAR},</if>
            <if test="module.expdat != null">expdat = #{module.expdat,jdbcType=DATE},</if>
            <if test="module.expplc != null">expplc = #{module.expplc,jdbcType=VARCHAR},</if>
            <if test="module.lcrtyp != null">lcrtyp = #{module.lcrtyp,jdbcType=VARCHAR},</if>
            <if test="module.nomspc != null">nomspc = #{module.nomspc,jdbcType=VARCHAR},</if>
            <if test="module.nomtop != null">nomtop = #{module.nomtop,jdbcType=DECIMAL},</if>
            <if test="module.nomton != null">nomton = #{module.nomton,jdbcType=DECIMAL},</if>
            <if test="module.preadvdt != null">preadvdt = #{module.preadvdt,jdbcType=DATE},</if>
            <if test="module.shpdat != null">shpdat = #{module.shpdat,jdbcType=DATE},</if>
            <if test="module.shpfro != null">shpfro = #{module.shpfro,jdbcType=VARCHAR},</if>
            <if test="module.shppar != null">shppar = #{module.shppar,jdbcType=VARCHAR},</if>
            <if test="module.shpto != null">shpto = #{module.shpto,jdbcType=VARCHAR},</if>
            <if test="module.shptrs != null">shptrs = #{module.shptrs,jdbcType=VARCHAR},</if>
            <if test="module.stacty != null">stacty = #{module.stacty,jdbcType=VARCHAR},</if>
            <if test="module.stagod != null">stagod = #{module.stagod,jdbcType=VARCHAR},</if>
            <if test="module.utlnbr != null">utlnbr = #{module.utlnbr,jdbcType=INTEGER},</if>
            <if test="module.ver != null">ver = #{module.ver,jdbcType=VARCHAR},</if>
            <if test="module.aplbnkdirsnd != null">aplbnkdirsnd = #{module.aplbnkdirsnd,jdbcType=VARCHAR},</if>
            <if test="module.tenmaxday != null">tenmaxday = #{module.tenmaxday,jdbcType=INTEGER},</if>
            <if test="module.cnfsnd != null">cnfsnd = #{module.cnfsnd,jdbcType=VARCHAR},</if>
            <if test="module.revflg != null">revflg = #{module.revflg,jdbcType=VARCHAR},</if>
            <if test="module.revnbr != null">revnbr = #{module.revnbr,jdbcType=INTEGER},</if>
            <if test="module.revtimes != null">revtimes = #{module.revtimes,jdbcType=INTEGER},</if>
            <if test="module.revdat != null">revdat = #{module.revdat,jdbcType=DATE},</if>
            <if test="module.revcum != null">revcum = #{module.revcum,jdbcType=VARCHAR},</if>
            <if test="module.revtyp != null">revtyp = #{module.revtyp,jdbcType=VARCHAR},</if>
            <if test="module.cnfins != null">cnfins = #{module.cnfins,jdbcType=VARCHAR},</if>
            <if test="module.redclsflg != null">redclsflg = #{module.redclsflg,jdbcType=VARCHAR},</if>
            <if test="module.advnbr != null">advnbr = #{module.advnbr,jdbcType=INTEGER},</if>
            <if test="module.resflg != null">resflg = #{module.resflg,jdbcType=VARCHAR},</if>
            <if test="module.inctrf != null">inctrf = #{module.inctrf,jdbcType=VARCHAR},</if>
            <if test="module.apprul != null">apprul = #{module.apprul,jdbcType=VARCHAR},</if>
            <if test="module.apprultxt != null">apprultxt = #{module.apprultxt,jdbcType=VARCHAR},</if>
            <if test="module.pordis != null">pordis = #{module.pordis,jdbcType=VARCHAR},</if>
            <if test="module.porloa != null">porloa = #{module.porloa,jdbcType=VARCHAR},</if>
            <if test="module.nonban != null">nonban = #{module.nonban,jdbcType=VARCHAR},</if>
            <if test="module.etyextkey != null">etyextkey = #{module.etyextkey,jdbcType=VARCHAR},</if>
            <if test="module.partcon != null">partcon = #{module.partcon,jdbcType=DECIMAL},</if>
            <if test="module.collflg != null">collflg = #{module.collflg,jdbcType=VARCHAR},</if>
            <if test="module.teskeyunc != null">teskeyunc = #{module.teskeyunc,jdbcType=VARCHAR},</if>
            <if test="module.dbtflg != null">dbtflg = #{module.dbtflg,jdbcType=VARCHAR},</if>
            <if test="module.branchinr != null">branchinr = #{module.branchinr,jdbcType=VARCHAR},</if>
            <if test="module.bchkeyinr != null">bchkeyinr = #{module.bchkeyinr,jdbcType=VARCHAR},</if>
            <if test="module.rskrat != null">rskrat = #{module.rskrat,jdbcType=DECIMAL},</if>
            <if test="module.dflg != null">dflg = #{module.dflg,jdbcType=VARCHAR},</if>
            <if test="module.tratyp != null">tratyp = #{module.tratyp,jdbcType=VARCHAR},</if>
            <if test="module.oppbnk != null">oppbnk = #{module.oppbnk,jdbcType=VARCHAR},</if>
            <if test="module.mytype != null">mytype = #{module.mytype,jdbcType=VARCHAR},</if>
            <if test="module.isyifu != null">isyifu = #{module.isyifu,jdbcType=VARCHAR},</if>
            <if test="module.elcflg != null">elcflg = #{module.elcflg,jdbcType=VARCHAR},</if>
            <if test="module.shppro != null">shppro = #{module.shppro,jdbcType=VARCHAR},</if>
            <if test="module.conno != null">conno = #{module.conno,jdbcType=VARCHAR},</if>
            <if test="module.concur != null">concur = #{module.concur,jdbcType=VARCHAR},</if>
            <if test="module.conamt != null">conamt = #{module.conamt,jdbcType=DECIMAL},</if>
            <if test="module.rejame != null">rejame = #{module.rejame,jdbcType=VARCHAR},</if>
            <if test="module.rejnbr != null">rejnbr = #{module.rejnbr,jdbcType=DECIMAL},</if>
            <if test="module.cantyp != null">cantyp = #{module.cantyp,jdbcType=VARCHAR},</if>
            <if test="module.rejflg != null">rejflg = #{module.rejflg,jdbcType=VARCHAR},</if>
            <if test="module.dkflg != null">dkflg = #{module.dkflg,jdbcType=VARCHAR},</if>
            <if test="module.fqtime != null">fqtime = #{module.fqtime,jdbcType=VARCHAR},</if>
            <if test="module.kzref != null">kzref = #{module.kzref,jdbcType=VARCHAR},</if>
            <if test="module.fqzytgfw != null">fqzytgfw = #{module.fqzytgfw,jdbcType=VARCHAR},</if>
            <if test="module.bdflg != null">bdflg = #{module.bdflg,jdbcType=VARCHAR},</if>
            <if test="module.sdsrfs != null">sdsrfs = #{module.sdsrfs,jdbcType=VARCHAR},</if>
            <if test="module.idcode != null">idcode = #{module.idcode,jdbcType=VARCHAR},</if>
            <if test="module.finrenflg != null">finrenflg = #{module.finrenflg,jdbcType=VARCHAR},</if>
        </set>
        ${conditions}
    </update>

    <delete id="dyncDelete">
        ${sql}
    </delete>

    <select id="dyncRead" resultMap="BaseResultMap">
        ${sql}
    </select>
    <select id="queryDed" resultType="com.brilliance.isc.vo.domlc.DedWithPtsCbbResponseVo">
        select
        ded.*,
        cbb.cur cur, cbb.amt amt,opn.cur opncur,opn.amt opnamt,pts1.extkey aplExtkey,pts1.nam aplName,pts1.cnnam aplCnname,
        pts2.extkey benExtkey,pts2.nam benName,pts2.cnnam benCnname,pts3.extkey issExtkey,pts3.nam issName,pts3.cnnam issCnname,
        pts3.JIGOMC issLhname
        from ded
        left join cbb on cbb.OBJINR = ded.inr and cbb.OBJTYP = 'DED'  and cbb.cbc = 'MAXSUM' and cbb.extid = 'AMT1' and cbb.enddat = '2299-12-31'
        left join cbb opn on opn.OBJINR = ded.inr and opn.OBJTYP = 'DED'  and opn.cbc = 'OPN' and opn.extid = 'AMT1' and opn.enddat = '2299-12-31'
        left join pts pts1 on pts1.OBJINR = ded.inr and pts1.OBJTYP = 'DED' and pts1.rol = 'APL'
        left join pts pts2 on pts2.OBJINR = ded.inr and pts2.OBJTYP = 'DED' and pts2.rol = 'BEN'
        left join pts pts3 on pts3.OBJINR = ded.inr and pts3.OBJTYP = 'DED' and pts3.rol = 'ISS'
        where 1 = 1
        <!--机构隔离-->
        <if test="bchinr != null and bchinr != '' ">
            AND ded.bchkeyinr = #{bchinr}
        </if>
        <!--业务编号-->
        <if test="seaownref != null and seaownref != ''">
            AND UPPER(ded.OWNREF) LIKE concat(concat('%', UPPER(#{seaownref})), '%')
        </if>
        <!--日期-->
        <if test="opndatfrom != null and opndatfrom != ''">
            AND ded.CREDAT &gt;= #{opndatfrom}
        </if>
        <if test="opndatto != null and opndatto != ''">
            AND ded.CREDAT &lt;= #{opndatto}
        </if>
        <!-- 申请人 -->
        <if test="aplref != null and aplref != ''">
            and exists (
            select 1 from PTS,PTY
            where ded.INR = PTS.OBJINR
            AND PTY.INR = PTS.PTYINR
            AND PTS.OBJTYP = 'DED'
            AND PTS.ROL = 'APL'
            AND (
            PTS.EXTKEY LIKE concat(concat('%', #{aplref}), '%')
            or PTS.NAM LIKE concat(concat('%', #{aplref}), '%')
            or PTS.CNNAM LIKE concat(concat('%', #{aplref}), '%')
            or PTS.ENNAM LIKE concat(concat('%', #{aplref}), '%')
            or PTY.NAM LIKE concat(concat('%', #{aplref}), '%')
            )
            )
        </if>
        <!-- 申请人 -->
        <if test="benref != null and benref != ''">
            and exists (
            select 1 from PTS,PTY
            where ded.INR = PTS.OBJINR
            AND PTY.INR = PTS.PTYINR
            AND PTS.OBJTYP = 'DED'
            AND PTS.ROL = 'BEN'
            AND (
            PTS.EXTKEY LIKE concat(concat('%', #{benref}), '%')
            or PTS.NAM LIKE concat(concat('%', #{benref}), '%')
            or PTS.CNNAM LIKE concat(concat('%', #{benref}), '%')
            or PTS.ENNAM LIKE concat(concat('%', #{benref}), '%')
            or PTY.NAM LIKE concat(concat('%', #{benref}), '%')
            )
            )
        </if>
        <!--是否闭卷 -->
        <if test="isClosed != null and isClosed != ''">
            <if test="isClosed == 'Y'.toString()">
                and ded.clsdat is not null
            </if>
            <if test="isClosed == 'N'.toString()">
                and ded.clsdat is  null
            </if>
        </if>
        order by ded.CREDAT desc , ded.ownref desc
    </select>

    <select id="selectByAnyref" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from ded WHERE INR in ( select distinct OBJINR from PTS where OBJTYP = #{objtyp} and REF = #{ref}
        <if test="rol != null and rol != ''">
            and rol = #{rol}
        </if>
        )
        ORDER BY CREDAT desc
        limit 1
    </select>

    <select id="selectByWhere" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from ded WHERE 1=1
        <if test="ownref != null and ownref != ''"> and ownref = #{ownref,jdbcType=VARCHAR}</if>
        <if test="issref != null and issref != ''"> and issref = #{issref,jdbcType=VARCHAR}</if>
        <if test="kzref != null and kzref != ''"> and kzref = #{kzref,jdbcType=VARCHAR}</if>
        <!--<if test="oldref != null and oldref != ''"> and oldref = #{oldref,jdbcType=VARCHAR}</if>-->
        order by credat desc limit 1
    </select>

    <select id="selectKzrefByWhere" resultType="java.lang.String">
        select ded.kzref from ded,bfd where ded.inr = bfd.pntinr and bfd.ownref = #{ownref,jdbcType=VARCHAR}
    </select>
    <select id="queryDedInfo" resultType="com.brilliance.isc.vo.domlc.DedWithPtsCbbResponseVo">
        select
        ded.*,bch.BCHNAME bchName,usr.NAM usrNam,
        max1.cur cur, case when max2.amt is not null then (max1.amt + max2.amt ) else max1.amt end amt,
        opn1.cur opncur,case when opn2.amt is not null then (opn1.amt + opn2.amt) else opn1.amt end opnamt,
        apl.extkey aplExtkey,apl.nam aplName,ben.EXTKEY benExtkey,ben.nam benName,iss.EXTKEY issExtkey,iss.nam issName
        from ded
        left join cbb max1 on max1.OBJINR = ded.inr and max1.OBJTYP = 'DED' and max1.cbc = 'MAXSUM' and max1.extid =
        'AMT1' and max1.enddat = '2299-12-31'
        left join cbb max2 on max2.OBJINR = ded.inr and max2.OBJTYP = 'DED' and max2.cbc = 'MAXSUM' and max2.extid =
        'AMT2' and max2.enddat = '2299-12-31'
        left join cbb opn1 on opn1.OBJINR = ded.inr and opn1.OBJTYP = 'DED' and opn1.cbc = 'OPN' and opn1.extid = 'AMT1'
        and opn1.enddat = '2299-12-31'
        left join cbb opn2 on opn2.OBJINR = ded.inr and opn2.OBJTYP = 'DED' and opn2.cbc = 'OPN' and opn2.extid = 'AMT2'
        and opn2.enddat = '2299-12-31'
        left join pts apl on apl.OBJINR = ded.inr and apl.OBJTYP = 'DED' and apl.rol = 'APL'
        left join pts ben on ben.OBJINR = ded.inr and ben.OBJTYP = 'DED' and ben.rol = 'BEN'
        left join pts iss on iss.OBJINR = ded.inr and iss.OBJTYP = 'DED' and iss.rol = 'ISS'
        left join bch bch on bch.inr = ded.BCHKEYINR
        left join usr usr on usr.EXTKEY = ded.OWNUSR
        where ded.flwsta = 'R'
        <!--机构隔离-->
        <if test="bchinr != null and bchinr != '' ">
            AND ded.bchkeyinr = #{bchinr}
        </if>
        <!--业务编号-->
        <if test="seaownref != null and seaownref != ''">
            AND UPPER(ded.OWNREF) LIKE concat(concat('%', UPPER(#{seaownref})), '%')
        </if>
        <!--日期-->
        <if test="opndatfrom != null and opndatfrom != ''">
            AND ded.CREDAT &gt;= #{opndatfrom}
        </if>
        <if test="opndatto != null and opndatto != ''">
            AND ded.CREDAT &lt;= #{opndatto}
        </if>
        <!--信用证类型-->
        <if test="sealcrtyp != null and sealcrtyp != '' ">
            AND ded.lcrtyp = #{sealcrtyp}
        </if>
        <!--客户号/名称 -->
        <if test="ptyExtkey != null and ptyExtkey != ''">
            and exists (
            select 1 from PTS
            where ded.INR = PTS.OBJINR
            AND PTS.OBJTYP = 'DED'
            AND (
            PTS.EXTKEY LIKE concat(concat('%', #{ptyExtkey}), '%')
            or PTS.NAM LIKE concat(concat('%', #{ptyExtkey}), '%')
            or PTS.CNNAM LIKE concat(concat('%', #{ptyExtkey}), '%')
            or PTS.ENNAM LIKE concat(concat('%', #{ptyExtkey}), '%')
            )
            )
        </if>
        <!--当事人BIC/名称 -->
        <if test="seapty != null and seapty != ''">
            and exists (
            select 1 from PTS,PTA
            where ded.INR = PTS.OBJINR
            AND PTS.OBJTYP = 'DED'
            AND PTA.INR = PTS.PTAINR
            AND (
            PTA.PTYEXTKEY LIKE concat(concat('%', #{seapty}), '%')
            or PTA.NAM LIKE concat(concat('%', #{seapty}), '%')
            or PTA.BIC LIKE concat(concat('%', #{seapty}), '%')
            )
            )
        </if>
        <!--当事人参考号 -->
        <if test="searef != null and searef != ''">
            and exists (
            select 1 from PTS
            where ded.INR = PTS.OBJINR
            AND PTS.OBJTYP = 'DED'
            AND
            PTS.REF LIKE concat(concat('%', #{searef}), '%')
            )
        </if>
        <!-- 币种以及金额-->
        <if test="seacur != null and seacur != ''">
            AND EXISTS (
            select 1 from CBB INFCONCBS where
            UPPER(INFCONCBS.CUR ) = UPPER(#{seacur})
            <if test="seaamtfr != null and seaamtfr != ''">
                AND INFCONCBS.AMT >= #{seaamtfr}
            </if>
            <if test="seaamtto != null and seaamtto != ''">
                AND INFCONCBS.AMT &lt;= #{seaamtto}
            </if>
            AND (INFCONCBS.OBJTYP = 'DED'
            AND INFCONCBS.OBJINR = DED.INR
            AND (INFCONCBS.BEGDAT &lt;= STR_TO_DATE('2299-12-30', '%Y-%m-%d')
            AND INFCONCBS.ENDDAT &gt; STR_TO_DATE('2299-12-30', '%Y-%m-%d'))
            AND INFCONCBS.EXTID IN (' ', 'AMT1')
            AND INFCONCBS.CBC IN ('MAXSUM', 'PRESUM', 'NOMSUM', 'OPN'))
            )
        </if>

        <!--业务状态  -->
        <if test="seasta != null and seasta != ''">
            <if test="seasta == 'C'.toString()">
                and ded.clsdat is not null
            </if>
            <if test="seasta == 'O'.toString()">
                and ded.clsdat is null
            </if>
        </if>
        <!--贸易类型-->
        <if test="seamylx != null and seamylx != '' ">
            AND ded.mytype = #{seamylx}
        </if>
        <!--是否通过电证系统-->
        <if test="seaelcflg != null and seaelcflg != '' ">
            AND ded.elcflg = #{seaelcflg}
        </if>
        <if test='column != null and column!="" '>
            order by  ${column}  ${order}
        </if>
        <if test='column == null or column=="" '>
            order by ded.opndat desc , ded.ownref desc
        </if>
    </select>

    <select id="selectByOwnref" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from ded
        where ownref = #{ownref}
    </select>

</mapper>