ept_entry_headMapper.xml 23.2 KB
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
<?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.eport.rest.dao.EptEntryHeadDao">
    
	<sql id="EptEntryHeadEntityColumns">
		a1.ID AS "id"
		,a1.BOOK_ID AS "bookId"
		,a1.ENTRY_ID AS "entryId"
		,a1.PRE_ENTRY_ID AS "preEntryId"
		,a1.ID_CHK AS "idChk"
		,a1.I_E_FLAG AS "iEFlag"
		,a1.I_E_PORT AS "iEPort"
		,a1.I_E_DATE AS "iEDate"
		,a1.D_DATE AS "dDate"
		,a1.DESTINATION_PORT AS "destinationPort"
		,a1.TRAF_NAME AS "trafName"
		,a1.VOYAGE_NO AS "voyageNo"
		,a1.TRAF_MODE AS "trafMode"
		,a1.TRADE_CO AS "tradeCo"
		,a1.TRADE_NAME AS "tradeName"
		,a1.DISTRICT_CODE AS "districtCode"
		,a1.OWNER_CODE AS "ownerCode"
		,a1.OWNER_NAME AS "ownerName"
		,a1.AGENT_CODE AS "agentCode"
		,a1.AGENT_NAME AS "agentName"
		,a1.CONTR_NO AS "contrNo"
		,a1.IN_RATIO AS "inRatio"
		,a1.BILL_NO AS "billNo"
		,a1.TRADE_COUNTRY AS "tradeCountry"
		,a1.TRADE_MODE AS "tradeMode"
		,a1.CUT_MODE AS "cutMode"
		,a1.TRANS_MODE AS "transMode"
		,a1.CONTAINER_NO AS "containerNo"
		,a1.PAY_WAY AS "payWay"
		,a1.FEE_MARK AS "feeMark"
		,a1.FEE_CURR AS "feeCurr"
		,a1.FEE_RATE AS "feeRate"
		,a1.INSUR_MARK AS "insurMark"
		,a1.INSUR_CURR AS "insurCurr"
		,a1.INSUR_RATE AS "insurRate"
		,a1.OTHER_MARK AS "otherMark"
		,a1.OTHER_CURR AS "otherCurr"
		,a1.OTHER_RATE AS "otherRate"
		,a1.PACK_NO AS "packNo"
		,a1.GROSS_WT AS "grossWt"
		,a1.NET_WT AS "netWt"
		,a1.WRAP_TYPE AS "wrapType"
		,a1.MANUAL_NO AS "manualNo"
		,a1.LICENSE_NO AS "licenseNo"
		,a1.APPR_NO AS "apprNo"
		,a1.NOTE_S AS "noteS"
		,a1.DECL_PORT AS "declPort"
		,a1.CO_OWNER AS "coOwner"
		,a1.TAXY_RG_NO AS "taxyRgNo"
		,a1.SERVICE_FEE AS "serviceFee"
		,a1.SERVICE_RATE AS "serviceRate"
		,a1.RELATIVE_ID AS "relativeId"
		,a1.BONDED_NO AS "bondedNo"
		,a1.BP_NO AS "bpNo"
		,a1.TYPIST_NO AS "typistNo"
		,a1.INPUT_NO AS "inputNo"
		,a1.P_DATE AS "pDate"
		,a1.CTA_CHK_RESULT AS "ctaChkResult"
		,a1.MODI_NO AS "modiNo"
		,a1.EDI_ID AS "ediId"
		,a1.STATUS_RESULT AS "statusResult"
		,a1.DECLARE_NO AS "declareNo"
		,a1.EDI_REMARK AS "ediRemark"
		,a1.PARTNER_ID AS "partnerId"
		,a1.CUSTOMS_FIELD AS "customsField"
		,a1.ENTRY_TYPE AS "entryType"
		,a1.RELATIVE_MANUAL_NO AS "relativeManualNo"
		,a1.PRICE_RANGE AS "priceRange"
		,a1.CREATE_ID AS "createId"
		,a1.INV_NO AS "invNo"
		,a1.IS_DELETE AS "isDelete"
		,a1.CREATE_DATE AS "createDate"
		,a1.UPDATE_ID AS "updateId"
		,a1.UPDATE_DATE AS "updateDate"
		,a1.SEQ_NO AS "seqNo"
		,a1.PLAT_NO2 AS "platNo2"
		,a1.CUSTOMS AS "customs"
		,a1.GATEJOB_NO AS "gatejobNo"
		,a1.BIZ_TYPE AS "bizType"
		,a1.BIZ_MODE AS "bizMode"
		,a1.IS_COLLECTION AS "isCollection"
		,a1.TRANS_ID AS "transId"
		,a1.GOODS_FLOW AS "goodsFlow"
		,a1.TRANSFER_MODE AS "transferMode"
		,a1.M_P AS "mP"
		,a1.ENTRYTR_TYPE AS "entrytrType"
		,a1.DEC_PROPERTY AS "decProperty"
		,a1.PROVIDER_CODE AS "providerCode"
		,a1.PROVIDER_NAME AS "providerName"
		,a1.OUT_CODE AS "outCode"
		,a1.OUT_NAME AS "outName"
		,a1.COPCODESCC AS "copcodescc"
		,a1.PROMISEITMES AS "promiseitmes"
		,a1.AREA_CODE AS "areaCode"
		,a1.CUSTOMS_CODE AS "customsCode"
		,a1.TRADES_CODE AS "tradesCode"
		,a1.STEP_ID AS "stepId"
		,a1.APPROVE_PERSON AS "approvePerson"
		,a1.APPROVE_DATE AS "approveDate"
		,a1.OUTER_COMMENT AS "outerComment"
		,a1.INNER_COMMENT AS "innerComment"
		,a1.TRADECODESCC AS "tradecodescc"
		,a1.AGENTCODESCC AS "agentcodescc"
		,a1.OWNERCODESCC AS "ownercodescc"
		,a1.STATUS AS "status"
	</sql>
	
	<sql id="EptEntryHeadEntityListColumns">
		a1.ID AS "id"
		,a1.ENTRY_ID AS "entryId"
		,a1.PRE_ENTRY_ID AS "preEntryId"
		,a1.I_E_FLAG AS "iEFlag"
		,a1.I_E_PORT AS "iEPort"
		,a1.I_E_DATE AS "iEDate"
		,a1.DESTINATION_PORT AS "destinationPort"
		,a1.TRADE_COUNTRY AS "tradeCountry"
	</sql>
	
	
	
		<!--查询表中所有资料(所有字段) -->
		<select id="listAll"  
		parameterType="HashMap" 
		resultType="com.eport.rest.entity.EptEntryHeadEntity"
		>
		select  
			<include refid="EptEntryHeadEntityColumns"/>
			,(select CUSTOMS_NAME from customs_rel  c1 where c1.CUSTOMS_CODE = a1.I_E_PORT) as iEPortName
			,(select CODENAME from ept_tran_type  c1 where c1.CODE = a1.TRAF_MODE) as trafCodeName
			,(select COUNTRY_NA from country  c1 where c1.COUNTRY_CO = a1.TRADE_COUNTRY) as tradeCountryName
			,(select CODE_NAME from ept_sup_code  c1 where c1.CODE = a1.TRADE_MODE) as tradeModeName
			,(select DUTY_SPEC from levymode  c1 where c1.DUTY_MODE = a1.CUT_MODE) as cutModeName
			,(select CODE_NAME from ept_deal_code  c1 where c1.CODE = a1.TRANS_MODE) as transModeName
			,(select CURR_NAME from curr  c1 where c1.CURR_CODE = a1.FEE_CURR) as feeCurrName
			,(select CURR_NAME from curr  c1 where c1.CURR_CODE = a1.INSUR_CURR) as insurCurrName
			,(select CURR_NAME from curr  c1 where c1.CURR_CODE = a1.OTHER_CURR) as otherCurrName
			,(select CUSTOMS_NAME from customs_rel  c1 where c1.CUSTOMS_CODE = a1.DECL_PORT) as declPortName
			,(select PAR_NAME from ept_parameter  c1 where c1.PAR_CODE = a1.IS_COLLECTION and c1.PAR_TYPE=9) as isCollectionName
			,(select PAR_NAME from ept_parameter  c1 where c1.PAR_CODE = a1.TRANS_ID and c1.PAR_TYPE=10) as transName
		FROM ept_entry_head  a1
		WHERE 1=1
		<if test="entryId != null">
		and ENTRY_ID like CONCAT(CONCAT('%',#{entryId}),'%')
		</if>
		<if test="preEntryId != null">
		and PRE_ENTRY_ID like CONCAT(CONCAT('%',#{preEntryId}),'%')
		</if>
		<if test="iEFlag != null">
		and I_E_FLAG = #{iEFlag}
		</if>
		<if test="destinationPort != null">
		and DESTINATION_PORT like CONCAT(CONCAT('%',#{destinationPort}),'%')
		</if>
		 and IS_DELETE = 0
		</select>
		
	
		<!--分页查询资料(所有字段) -->
		<select id="pageAll"  
		parameterType="HashMap" 
		resultType="com.eport.rest.entity.EptEntryHeadEntity"
		>
		select  
			<include refid="EptEntryHeadEntityColumns"/>
			,(select CUSTOMS_NAME from customs_rel  c1 where c1.CUSTOMS_CODE = a1.I_E_PORT) as iEPortName
			,(select CODENAME from ept_tran_type  c1 where c1.CODE = a1.TRAF_MODE) as trafCodeName
			,(select COUNTRY_NA from country  c1 where c1.COUNTRY_CO = a1.TRADE_COUNTRY) as tradeCountryName
			,(select CODE_NAME from ept_sup_code  c1 where c1.CODE = a1.TRADE_MODE) as tradeModeName
			,(select DUTY_SPEC from levymode  c1 where c1.DUTY_MODE = a1.CUT_MODE) as cutModeName
			,(select CODE_NAME from ept_deal_code  c1 where c1.CODE = a1.TRANS_MODE) as transModeName
			,(select CURR_NAME from curr  c1 where c1.CURR_CODE = a1.FEE_CURR) as feeCurrName
			,(select CURR_NAME from curr  c1 where c1.CURR_CODE = a1.INSUR_CURR) as insurCurrName
			,(select CURR_NAME from curr  c1 where c1.CURR_CODE = a1.OTHER_CURR) as otherCurrName
			,(select CUSTOMS_NAME from customs_rel  c1 where c1.CUSTOMS_CODE = a1.DECL_PORT) as declPortName
			,(select PAR_NAME from ept_parameter  c1 where c1.PAR_CODE = a1.IS_COLLECTION and c1.PAR_TYPE=9) as isCollectionName
			,(select PAR_NAME from ept_parameter  c1 where c1.PAR_CODE = a1.TRANS_ID and c1.PAR_TYPE=10) as transName
		FROM ept_entry_head  a1
		WHERE 1=1
		<if test="entryId != null">
		and ENTRY_ID like CONCAT(CONCAT('%',#{entryId}),'%')
		</if>
		<if test="preEntryId != null">
		and PRE_ENTRY_ID like CONCAT(CONCAT('%',#{preEntryId}),'%')
		</if>
		<if test="iEFlag != null">
		and I_E_FLAG = #{iEFlag}
		</if>
		<if test="destinationPort != null">
		and DESTINATION_PORT like CONCAT(CONCAT('%',#{destinationPort}),'%')
		</if>
		 and IS_DELETE = 0
		</select>
		
	
		<!--查询表中所有资料(仅列表显示字段) -->
		<select id="list"  
		parameterType="HashMap" 
		resultType="com.eport.rest.entity.EptEntryHeadEntity"
		>
		select  
			<include refid="EptEntryHeadEntityListColumns"/>
			,(select CUSTOMS_NAME from customs_rel  c1 where c1.CUSTOMS_CODE = a1.I_E_PORT) as iEPortName
			,(select COUNTRY_NA from country  c1 where c1.COUNTRY_CO = a1.TRADE_COUNTRY) as tradeCountryName
		FROM ept_entry_head  a1
		WHERE 1=1
		<if test="entryId != null">
		and ENTRY_ID like CONCAT(CONCAT('%',#{entryId}),'%')
		</if>
		<if test="preEntryId != null">
		and PRE_ENTRY_ID like CONCAT(CONCAT('%',#{preEntryId}),'%')
		</if>
		<if test="iEFlag != null">
		and I_E_FLAG = #{iEFlag}
		</if>
		<if test="destinationPort != null">
		and DESTINATION_PORT like CONCAT(CONCAT('%',#{destinationPort}),'%')
		</if>
		 and IS_DELETE = 0
		</select>
		
	
		<!--分页查询资料(仅列表显示字段) -->
		<select id="page"  
		parameterType="HashMap" 
		resultType="com.eport.rest.entity.EptEntryHeadEntity"
		>
		select  
			<include refid="EptEntryHeadEntityListColumns"/>
			,(select CUSTOMS_NAME from customs_rel  c1 where c1.CUSTOMS_CODE = a1.I_E_PORT) as iEPortName
			,(select COUNTRY_NA from country  c1 where c1.COUNTRY_CO = a1.TRADE_COUNTRY) as tradeCountryName
		FROM ept_entry_head  a1
		WHERE 1=1
		<if test="entryId != null">
		and ENTRY_ID like CONCAT(CONCAT('%',#{entryId}),'%')
		</if>
		<if test="preEntryId != null">
		and PRE_ENTRY_ID like CONCAT(CONCAT('%',#{preEntryId}),'%')
		</if>
		<if test="iEFlag != null">
		and I_E_FLAG = #{iEFlag}
		</if>
		<if test="destinationPort != null">
		and DESTINATION_PORT like CONCAT(CONCAT('%',#{destinationPort}),'%')
		</if>
		 and IS_DELETE = 0
		</select>
		
	
		<!--根据主键查询数据 -->
		<select id="findByPK"  
		parameterType="Integer" 
		resultType="com.eport.rest.entity.EptEntryHeadEntity"
		>
		select  
		<include refid="EptEntryHeadEntityColumns"/>
			,(select CUSTOMS_NAME from customs_rel  c1 where c1.CUSTOMS_CODE = a1.I_E_PORT) as iEPortName
			,(select CODENAME from ept_tran_type  c1 where c1.CODE = a1.TRAF_MODE) as trafCodeName
			,(select COUNTRY_NA from country  c1 where c1.COUNTRY_CO = a1.TRADE_COUNTRY) as tradeCountryName
			,(select CODE_NAME from ept_sup_code  c1 where c1.CODE = a1.TRADE_MODE) as tradeModeName
			,(select DUTY_SPEC from levymode  c1 where c1.DUTY_MODE = a1.CUT_MODE) as cutModeName
			,(select CODE_NAME from ept_deal_code  c1 where c1.CODE = a1.TRANS_MODE) as transModeName
			,(select CURR_NAME from curr  c1 where c1.CURR_CODE = a1.FEE_CURR) as feeCurrName
			,(select CURR_NAME from curr  c1 where c1.CURR_CODE = a1.INSUR_CURR) as insurCurrName
			,(select CURR_NAME from curr  c1 where c1.CURR_CODE = a1.OTHER_CURR) as otherCurrName
			,(select CUSTOMS_NAME from customs_rel  c1 where c1.CUSTOMS_CODE = a1.DECL_PORT) as declPortName
			,(select PAR_NAME from ept_parameter  c1 where c1.PAR_CODE = a1.IS_COLLECTION and c1.PAR_TYPE=9) as isCollectionName
			,(select PAR_NAME from ept_parameter  c1 where c1.PAR_CODE = a1.TRANS_ID and c1.PAR_TYPE=10) as transName
		FROM ept_entry_head  a1
		WHERE a1.ID=#{par}
		 and IS_DELETE = 0
		</select>
		
	
		<!--新增数据 -->
		<insert id="insert"  
		parameterType="com.eport.rest.entity.EptEntryHeadEntity" 
		>
		<selectKey resultType="Integer" order="AFTER" keyProperty="id">
		<if test="id != null ">
		select #{id} from dual
		</if>
		<if test="id == null ">
		SELECT LAST_INSERT_ID() AS id
		</if>
		 </selectKey>
		insert  
		  INTO ept_entry_head (
		BOOK_ID
		,ENTRY_ID
		,PRE_ENTRY_ID
		,ID_CHK
		,I_E_FLAG
		,I_E_PORT
		,I_E_DATE
		,D_DATE
		,DESTINATION_PORT
		,TRAF_NAME
		,VOYAGE_NO
		,TRAF_MODE
		,TRADE_CO
		,TRADE_NAME
		,DISTRICT_CODE
		,OWNER_CODE
		,OWNER_NAME
		,AGENT_CODE
		,AGENT_NAME
		,CONTR_NO
		,IN_RATIO
		,BILL_NO
		,TRADE_COUNTRY
		,TRADE_MODE
		,CUT_MODE
		,TRANS_MODE
		,CONTAINER_NO
		,PAY_WAY
		,FEE_MARK
		,FEE_CURR
		,FEE_RATE
		,INSUR_MARK
		,INSUR_CURR
		,INSUR_RATE
		,OTHER_MARK
		,OTHER_CURR
		,OTHER_RATE
		,PACK_NO
		,GROSS_WT
		,NET_WT
		,WRAP_TYPE
		,MANUAL_NO
		,LICENSE_NO
		,APPR_NO
		,NOTE_S
		,DECL_PORT
		,CO_OWNER
		,TAXY_RG_NO
		,SERVICE_FEE
		,SERVICE_RATE
		,RELATIVE_ID
		,BONDED_NO
		,BP_NO
		,TYPIST_NO
		,INPUT_NO
		,P_DATE
		,CTA_CHK_RESULT
		,MODI_NO
		,EDI_ID
		,STATUS_RESULT
		,DECLARE_NO
		,EDI_REMARK
		,PARTNER_ID
		,CUSTOMS_FIELD
		,ENTRY_TYPE
		,RELATIVE_MANUAL_NO
		,PRICE_RANGE
		,CREATE_ID
		,INV_NO
		,IS_DELETE
		,CREATE_DATE
		,UPDATE_ID
		,UPDATE_DATE
		,SEQ_NO
		,PLAT_NO2
		,CUSTOMS
		,GATEJOB_NO
		,BIZ_TYPE
		,BIZ_MODE
		,IS_COLLECTION
		,TRANS_ID
		,GOODS_FLOW
		,TRANSFER_MODE
		,M_P
		,ENTRYTR_TYPE
		,DEC_PROPERTY
		,PROVIDER_CODE
		,PROVIDER_NAME
		,OUT_CODE
		,OUT_NAME
		,COPCODESCC
		,PROMISEITMES
		,AREA_CODE
		,CUSTOMS_CODE
		,TRADES_CODE
		,STEP_ID
		,APPROVE_PERSON
		,APPROVE_DATE
		,OUTER_COMMENT
		,INNER_COMMENT
		,TRADECODESCC
		,AGENTCODESCC
		,OWNERCODESCC
		,STATUS
		<if test="id != null ">
		,ID
		</if>
		  ) VALUES (
		#{bookId,jdbcType=INTEGER}
		,#{entryId,jdbcType=VARCHAR}
		,#{preEntryId,jdbcType=VARCHAR}
		,#{idChk,jdbcType=VARCHAR}
		,#{iEFlag,jdbcType=VARCHAR}
		,#{iEPort,jdbcType=VARCHAR}
		,#{iEDate,jdbcType=DATE}
		,#{dDate,jdbcType=DATE}
		,#{destinationPort,jdbcType=VARCHAR}
		,#{trafName,jdbcType=VARCHAR}
		,#{voyageNo,jdbcType=VARCHAR}
		,#{trafMode,jdbcType=VARCHAR}
		,#{tradeCo,jdbcType=VARCHAR}
		,#{tradeName,jdbcType=VARCHAR}
		,#{districtCode,jdbcType=VARCHAR}
		,#{ownerCode,jdbcType=VARCHAR}
		,#{ownerName,jdbcType=VARCHAR}
		,#{agentCode,jdbcType=VARCHAR}
		,#{agentName,jdbcType=VARCHAR}
		,#{contrNo,jdbcType=VARCHAR}
		,#{inRatio,jdbcType=FLOAT}
		,#{billNo,jdbcType=VARCHAR}
		,#{tradeCountry,jdbcType=VARCHAR}
		,#{tradeMode,jdbcType=VARCHAR}
		,#{cutMode,jdbcType=VARCHAR}
		,#{transMode,jdbcType=VARCHAR}
		,#{containerNo,jdbcType=FLOAT}
		,#{payWay,jdbcType=VARCHAR}
		,#{feeMark,jdbcType=VARCHAR}
		,#{feeCurr,jdbcType=VARCHAR}
		,#{feeRate,jdbcType=FLOAT}
		,#{insurMark,jdbcType=VARCHAR}
		,#{insurCurr,jdbcType=VARCHAR}
		,#{insurRate,jdbcType=FLOAT}
		,#{otherMark,jdbcType=VARCHAR}
		,#{otherCurr,jdbcType=VARCHAR}
		,#{otherRate,jdbcType=FLOAT}
		,#{packNo,jdbcType=FLOAT}
		,#{grossWt,jdbcType=FLOAT}
		,#{netWt,jdbcType=FLOAT}
		,#{wrapType,jdbcType=VARCHAR}
		,#{manualNo,jdbcType=VARCHAR}
		,#{licenseNo,jdbcType=VARCHAR}
		,#{apprNo,jdbcType=VARCHAR}
		,#{noteS,jdbcType=VARCHAR}
		,#{declPort,jdbcType=VARCHAR}
		,#{coOwner,jdbcType=VARCHAR}
		,#{taxyRgNo,jdbcType=VARCHAR}
		,#{serviceFee,jdbcType=FLOAT}
		,#{serviceRate,jdbcType=FLOAT}
		,#{relativeId,jdbcType=VARCHAR}
		,#{bondedNo,jdbcType=VARCHAR}
		,#{bpNo,jdbcType=VARCHAR}
		,#{typistNo,jdbcType=VARCHAR}
		,#{inputNo,jdbcType=VARCHAR}
		,#{pDate,jdbcType=DATE}
		,#{ctaChkResult,jdbcType=VARCHAR}
		,#{modiNo,jdbcType=FLOAT}
		,#{ediId,jdbcType=VARCHAR}
		,#{statusResult,jdbcType=VARCHAR}
		,#{declareNo,jdbcType=VARCHAR}
		,#{ediRemark,jdbcType=VARCHAR}
		,#{partnerId,jdbcType=VARCHAR}
		,#{customsField,jdbcType=VARCHAR}
		,#{entryType,jdbcType=VARCHAR}
		,#{relativeManualNo,jdbcType=VARCHAR}
		,#{priceRange,jdbcType=FLOAT}
		,#{createId,jdbcType=INTEGER}
		,#{invNo,jdbcType=VARCHAR}
		,#{isDelete,jdbcType=INTEGER}
		,#{createDate,jdbcType=DATE}
		,#{updateId,jdbcType=INTEGER}
		,#{updateDate,jdbcType=DATE}
		,#{seqNo,jdbcType=VARCHAR}
		,#{platNo2,jdbcType=VARCHAR}
		,#{customs,jdbcType=VARCHAR}
		,#{gatejobNo,jdbcType=VARCHAR}
		,#{bizType,jdbcType=VARCHAR}
		,#{bizMode,jdbcType=VARCHAR}
		,#{isCollection,jdbcType=VARCHAR}
		,#{transId,jdbcType=VARCHAR}
		,#{goodsFlow,jdbcType=VARCHAR}
		,#{transferMode,jdbcType=VARCHAR}
		,#{mP,jdbcType=VARCHAR}
		,#{entrytrType,jdbcType=VARCHAR}
		,#{decProperty,jdbcType=VARCHAR}
		,#{providerCode,jdbcType=VARCHAR}
		,#{providerName,jdbcType=VARCHAR}
		,#{outCode,jdbcType=VARCHAR}
		,#{outName,jdbcType=VARCHAR}
		,#{copcodescc,jdbcType=VARCHAR}
		,#{promiseitmes,jdbcType=VARCHAR}
		,#{areaCode,jdbcType=VARCHAR}
		,#{customsCode,jdbcType=VARCHAR}
		,#{tradesCode,jdbcType=VARCHAR}
		,#{stepId,jdbcType=VARCHAR}
		,#{approvePerson,jdbcType=VARCHAR}
		,#{approveDate,jdbcType=DATE}
		,#{outerComment,jdbcType=VARCHAR}
		,#{innerComment,jdbcType=VARCHAR}
		,#{tradecodescc,jdbcType=VARCHAR}
		,#{agentcodescc,jdbcType=VARCHAR}
		,#{ownercodescc,jdbcType=VARCHAR}
		,#{status,jdbcType=INTEGER}
		<if test="id != null ">
		,#{id,jdbcType=INTEGER}
		</if>
		  )
		</insert>
		
	
		<!--更新数据 -->
		<update id="update"  
		parameterType="com.eport.rest.entity.EptEntryHeadEntity" 
		>
		update  
		ept_entry_head
		<set>
		<if test="bookId != null ">
		BOOK_ID = #{bookId},
		</if>
		<if test="entryId != null ">
		ENTRY_ID = #{entryId},
		</if>
		<if test="preEntryId != null ">
		PRE_ENTRY_ID = #{preEntryId},
		</if>
		<if test="idChk != null ">
		ID_CHK = #{idChk},
		</if>
		<if test="iEFlag != null ">
		I_E_FLAG = #{iEFlag},
		</if>
		<if test="iEPort != null ">
		I_E_PORT = #{iEPort},
		</if>
		<if test="iEDate != null ">
		I_E_DATE = #{iEDate},
		</if>
		<if test="dDate != null ">
		D_DATE = #{dDate},
		</if>
		<if test="destinationPort != null ">
		DESTINATION_PORT = #{destinationPort},
		</if>
		<if test="trafName != null ">
		TRAF_NAME = #{trafName},
		</if>
		<if test="voyageNo != null ">
		VOYAGE_NO = #{voyageNo},
		</if>
		<if test="trafMode != null ">
		TRAF_MODE = #{trafMode},
		</if>
		<if test="tradeCo != null ">
		TRADE_CO = #{tradeCo},
		</if>
		<if test="tradeName != null ">
		TRADE_NAME = #{tradeName},
		</if>
		<if test="districtCode != null ">
		DISTRICT_CODE = #{districtCode},
		</if>
		<if test="ownerCode != null ">
		OWNER_CODE = #{ownerCode},
		</if>
		<if test="ownerName != null ">
		OWNER_NAME = #{ownerName},
		</if>
		<if test="agentCode != null ">
		AGENT_CODE = #{agentCode},
		</if>
		<if test="agentName != null ">
		AGENT_NAME = #{agentName},
		</if>
		<if test="contrNo != null ">
		CONTR_NO = #{contrNo},
		</if>
		<if test="inRatio != null ">
		IN_RATIO = #{inRatio},
		</if>
		<if test="billNo != null ">
		BILL_NO = #{billNo},
		</if>
		<if test="tradeCountry != null ">
		TRADE_COUNTRY = #{tradeCountry},
		</if>
		<if test="tradeMode != null ">
		TRADE_MODE = #{tradeMode},
		</if>
		<if test="cutMode != null ">
		CUT_MODE = #{cutMode},
		</if>
		<if test="transMode != null ">
		TRANS_MODE = #{transMode},
		</if>
		<if test="containerNo != null ">
		CONTAINER_NO = #{containerNo},
		</if>
		<if test="payWay != null ">
		PAY_WAY = #{payWay},
		</if>
		<if test="feeMark != null ">
		FEE_MARK = #{feeMark},
		</if>
		<if test="feeCurr != null ">
		FEE_CURR = #{feeCurr},
		</if>
		<if test="feeRate != null ">
		FEE_RATE = #{feeRate},
		</if>
		<if test="insurMark != null ">
		INSUR_MARK = #{insurMark},
		</if>
		<if test="insurCurr != null ">
		INSUR_CURR = #{insurCurr},
		</if>
		<if test="insurRate != null ">
		INSUR_RATE = #{insurRate},
		</if>
		<if test="otherMark != null ">
		OTHER_MARK = #{otherMark},
		</if>
		<if test="otherCurr != null ">
		OTHER_CURR = #{otherCurr},
		</if>
		<if test="otherRate != null ">
		OTHER_RATE = #{otherRate},
		</if>
		<if test="packNo != null ">
		PACK_NO = #{packNo},
		</if>
		<if test="grossWt != null ">
		GROSS_WT = #{grossWt},
		</if>
		<if test="netWt != null ">
		NET_WT = #{netWt},
		</if>
		<if test="wrapType != null ">
		WRAP_TYPE = #{wrapType},
		</if>
		<if test="manualNo != null ">
		MANUAL_NO = #{manualNo},
		</if>
		<if test="licenseNo != null ">
		LICENSE_NO = #{licenseNo},
		</if>
		<if test="apprNo != null ">
		APPR_NO = #{apprNo},
		</if>
		<if test="noteS != null ">
		NOTE_S = #{noteS},
		</if>
		<if test="declPort != null ">
		DECL_PORT = #{declPort},
		</if>
		<if test="coOwner != null ">
		CO_OWNER = #{coOwner},
		</if>
		<if test="taxyRgNo != null ">
		TAXY_RG_NO = #{taxyRgNo},
		</if>
		<if test="serviceFee != null ">
		SERVICE_FEE = #{serviceFee},
		</if>
		<if test="serviceRate != null ">
		SERVICE_RATE = #{serviceRate},
		</if>
		<if test="relativeId != null ">
		RELATIVE_ID = #{relativeId},
		</if>
		<if test="bondedNo != null ">
		BONDED_NO = #{bondedNo},
		</if>
		<if test="bpNo != null ">
		BP_NO = #{bpNo},
		</if>
		<if test="typistNo != null ">
		TYPIST_NO = #{typistNo},
		</if>
		<if test="inputNo != null ">
		INPUT_NO = #{inputNo},
		</if>
		<if test="pDate != null ">
		P_DATE = #{pDate},
		</if>
		<if test="ctaChkResult != null ">
		CTA_CHK_RESULT = #{ctaChkResult},
		</if>
		<if test="modiNo != null ">
		MODI_NO = #{modiNo},
		</if>
		<if test="ediId != null ">
		EDI_ID = #{ediId},
		</if>
		<if test="statusResult != null ">
		STATUS_RESULT = #{statusResult},
		</if>
		<if test="declareNo != null ">
		DECLARE_NO = #{declareNo},
		</if>
		<if test="ediRemark != null ">
		EDI_REMARK = #{ediRemark},
		</if>
		<if test="partnerId != null ">
		PARTNER_ID = #{partnerId},
		</if>
		<if test="customsField != null ">
		CUSTOMS_FIELD = #{customsField},
		</if>
		<if test="entryType != null ">
		ENTRY_TYPE = #{entryType},
		</if>
		<if test="relativeManualNo != null ">
		RELATIVE_MANUAL_NO = #{relativeManualNo},
		</if>
		<if test="priceRange != null ">
		PRICE_RANGE = #{priceRange},
		</if>
		<if test="createId != null ">
		CREATE_ID = #{createId},
		</if>
		<if test="invNo != null ">
		INV_NO = #{invNo},
		</if>
		<if test="isDelete != null ">
		IS_DELETE = #{isDelete},
		</if>
		<if test="createDate != null ">
		CREATE_DATE = #{createDate},
		</if>
		<if test="updateId != null ">
		UPDATE_ID = #{updateId},
		</if>
		<if test="updateDate != null ">
		UPDATE_DATE = #{updateDate},
		</if>
		<if test="seqNo != null ">
		SEQ_NO = #{seqNo},
		</if>
		<if test="platNo2 != null ">
		PLAT_NO2 = #{platNo2},
		</if>
		<if test="customs != null ">
		CUSTOMS = #{customs},
		</if>
		<if test="gatejobNo != null ">
		GATEJOB_NO = #{gatejobNo},
		</if>
		<if test="bizType != null ">
		BIZ_TYPE = #{bizType},
		</if>
		<if test="bizMode != null ">
		BIZ_MODE = #{bizMode},
		</if>
		<if test="isCollection != null ">
		IS_COLLECTION = #{isCollection},
		</if>
		<if test="transId != null ">
		TRANS_ID = #{transId},
		</if>
		<if test="goodsFlow != null ">
		GOODS_FLOW = #{goodsFlow},
		</if>
		<if test="transferMode != null ">
		TRANSFER_MODE = #{transferMode},
		</if>
		<if test="mP != null ">
		M_P = #{mP},
		</if>
		<if test="entrytrType != null ">
		ENTRYTR_TYPE = #{entrytrType},
		</if>
		<if test="decProperty != null ">
		DEC_PROPERTY = #{decProperty},
		</if>
		<if test="providerCode != null ">
		PROVIDER_CODE = #{providerCode},
		</if>
		<if test="providerName != null ">
		PROVIDER_NAME = #{providerName},
		</if>
		<if test="outCode != null ">
		OUT_CODE = #{outCode},
		</if>
		<if test="outName != null ">
		OUT_NAME = #{outName},
		</if>
		<if test="copcodescc != null ">
		COPCODESCC = #{copcodescc},
		</if>
		<if test="promiseitmes != null ">
		PROMISEITMES = #{promiseitmes},
		</if>
		<if test="areaCode != null ">
		AREA_CODE = #{areaCode},
		</if>
		<if test="customsCode != null ">
		CUSTOMS_CODE = #{customsCode},
		</if>
		<if test="tradesCode != null ">
		TRADES_CODE = #{tradesCode},
		</if>
		<if test="stepId != null ">
		STEP_ID = #{stepId},
		</if>
		<if test="approvePerson != null ">
		APPROVE_PERSON = #{approvePerson},
		</if>
		<if test="approveDate != null ">
		APPROVE_DATE = #{approveDate},
		</if>
		<if test="outerComment != null ">
		OUTER_COMMENT = #{outerComment},
		</if>
		<if test="innerComment != null ">
		INNER_COMMENT = #{innerComment},
		</if>
		<if test="tradecodescc != null ">
		TRADECODESCC = #{tradecodescc},
		</if>
		<if test="agentcodescc != null ">
		AGENTCODESCC = #{agentcodescc},
		</if>
		<if test="ownercodescc != null ">
		OWNERCODESCC = #{ownercodescc},
		</if>
		<if test="status != null ">
		STATUS = #{status},
		</if>
		</set>
		WHERE ID = #{id}
		</update>
		
	
		<!--根据主键删除数据 -->
		<update id="delete"  
		parameterType="HashMap" 
		>
		update  
		ept_entry_head set IS_DELETE = 1
		where ID in (${par})
		</update>
		
	
		<!--根据报关单编号查询数据 -->
		<select id="findByEntryId"  
		parameterType="HashMap" 
		resultType="HashMap"
		>
		select a1.ID AS "id"
		,a1.BOOK_ID AS "bookId"
		,a1.ENTRY_ID AS "entryId"
from ept_entry_head a1
where ENTRY_ID=#{entryId} and is_delete=0
		</select>
		
	
</mapper>