Index: yunna/pom.xml
===================================================================
--- yunna/pom.xml	(revision 33932)
+++ yunna/pom.xml	(revision 33933)
@@ -210,6 +210,22 @@
 				</includes>
 				<filtering>false</filtering>
 			</resource>
+			<!--yunna库表对应mapper-->
+			<resource>
+				<directory>src/main/java/com/freshport/fdao/Mapper</directory>
+				<targetPath>com/freshport/fdao/Mapper</targetPath>
+				<includes>
+					<include>**/*.xml</include>
+				</includes>
+				<filtering>false</filtering>
+			</resource>
+			<resource>
+				<directory>src/main/resources</directory>
+				<includes>
+					<include>**/**</include>
+				</includes>
+				<filtering>false</filtering>
+			</resource>
 		</resources>
 		<!-- 指定最终生成jar包的文件名 -->
 		<finalName>yunna</finalName>
Index: yunna/src/main/java/com/freshport/Application.java
===================================================================
--- yunna/src/main/java/com/freshport/Application.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/Application.java	(revision 33933)
@@ -1,23 +1,13 @@
 package com.freshport;
 
-import javax.sql.DataSource;
-
-import org.apache.ibatis.session.SqlSessionFactory;
-import org.mybatis.spring.SqlSessionFactoryBean;
-import org.mybatis.spring.SqlSessionTemplate;
 import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.web.servlet.ServletComponentScan;
 import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
-import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.jdbc.datasource.DataSourceTransactionManager;
 import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.transaction.PlatformTransactionManager;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
 @EnableAutoConfiguration
@@ -24,7 +14,7 @@
 @SpringBootApplication
 @EnableTransactionManagement
 @ComponentScan(basePackages = { "com.freshport" }) // 指定spring管理的bean所在的包
-@MapperScan("com.freshport.dao") // 指定mybatis的mapper接口所在的包
+@MapperScan({ "com.freshport.dao", "com.freshport.fdao" }) // 指定mybatis的mapper接口所在的包
 @ServletComponentScan
 @EnableScheduling
 @EnableZuulProxy
@@ -34,32 +24,35 @@
         SpringApplication.run(Application.class, args);
     }
 
-    @Autowired
-    private DataSource dataSource;
+    // @Autowired
+    // private DataSource dataSource;
+    //
+    // // 创建SqlSessionFactory
+    // @Bean("sqlSessionFactory")
+    // public SqlSessionFactoryBean sqlSessionFactoryBean() throws Exception {
+    //
+    // SqlSessionFactoryBean sqlSessionFactoryBean = new
+    // SqlSessionFactoryBean();
+    // sqlSessionFactoryBean.setDataSource(dataSource);
+    //
+    // PathMatchingResourcePatternResolver resolver = new
+    // PathMatchingResourcePatternResolver();
+    //
+    // sqlSessionFactoryBean.setMapperLocations(resolver.getResources("classpath:/com/freshport/dao/Mapper/*.xml"));
+    //
+    // return sqlSessionFactoryBean;
+    // }
+    //
+    // @Bean
+    // public SqlSessionTemplate sqlSessionTemplate(SqlSessionFactory
+    // sqlSessionFactory) {
+    // return new SqlSessionTemplate(sqlSessionFactory);
+    // }
+    //
+    // // 创建事物管理器
+    // @Bean
+    // public PlatformTransactionManager transactionManager() {
+    // return new DataSourceTransactionManager(dataSource);
+    // }
 
-    // 创建SqlSessionFactory
-    @Bean("sqlSessionFactory")
-    public SqlSessionFactoryBean sqlSessionFactoryBean() throws Exception {
-
-        SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
-        sqlSessionFactoryBean.setDataSource(dataSource);
-
-        PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
-
-        sqlSessionFactoryBean.setMapperLocations(resolver.getResources("classpath:/com/freshport/dao/Mapper/*.xml"));
-
-        return sqlSessionFactoryBean;
-    }
-
-    @Bean
-    public SqlSessionTemplate sqlSessionTemplate(SqlSessionFactory sqlSessionFactory) {
-        return new SqlSessionTemplate(sqlSessionFactory);
-    }
-
-    // 创建事物管理器
-    @Bean
-    public PlatformTransactionManager transactionManager() {
-        return new DataSourceTransactionManager(dataSource);
-    }
-
 }
Index: yunna/src/main/java/com/freshport/common/DruidDataSourceConfiguration.java
===================================================================
--- yunna/src/main/java/com/freshport/common/DruidDataSourceConfiguration.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/common/DruidDataSourceConfiguration.java	(revision 33933)
@@ -1,12 +1,10 @@
 package com.freshport.common;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import javax.sql.DataSource;
 
 import org.apache.ibatis.session.SqlSessionFactory;
 import org.mybatis.spring.SqlSessionFactoryBean;
+import org.mybatis.spring.SqlSessionTemplate;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.context.annotation.Bean;
@@ -13,26 +11,17 @@
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Primary;
 import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
 
-import com.alibaba.druid.filter.Filter;
-import com.alibaba.druid.filter.stat.StatFilter;
 import com.alibaba.druid.pool.DruidDataSource;
-import com.alibaba.druid.wall.WallConfig;
-import com.alibaba.druid.wall.WallFilter;
 
 @Configuration
 public class DruidDataSourceConfiguration {
     @Bean("druidDataSource")
-    @ConfigurationProperties(prefix = "spring.datasource")
+    @ConfigurationProperties(prefix = "spring.datasource.druid.master")
+    @Primary
     public DataSource druidDataSource() {
-        // DataSource druidDataSource = new DruidDataSource();
         DruidDataSource druidDataSource = new DruidDataSource();
-
-        List<Filter> filterList = new ArrayList<>();
-        filterList.add(wallFilter());
-        filterList.add(statFilter());
-        druidDataSource.setProxyFilters(filterList);
-
         return druidDataSource;
     }
 
@@ -51,25 +40,18 @@
         return sessionFactoryBean.getObject();
     }
 
-    @Bean
-    public StatFilter statFilter() {
-        StatFilter statFilter = new StatFilter();
-        return statFilter;
+    @Bean(name = "druidTransactionManager") // 配置事务
+    @Primary
+    public DataSourceTransactionManager druidTransactionManager(
+            @Qualifier("druidDataSource") DataSource druidDataSource) {
+        return new DataSourceTransactionManager(druidDataSource);
     }
 
-    @Bean
-    public WallFilter wallFilter() {
-        WallFilter wallFilter = new WallFilter();
-        wallFilter.setConfig(wallConfig());
-        return wallFilter;
+    @Bean(name = "druidSqlSessionTemplate")
+    @Primary
+    public SqlSessionTemplate druidSqlSessionTemplate(
+            @Qualifier("vopSqlSessionFactory") SqlSessionFactory vopSqlSessionFactory) {
+        return new SqlSessionTemplate(vopSqlSessionFactory);
     }
 
-    @Bean
-    public WallConfig wallConfig() {
-        WallConfig config = new WallConfig();
-        config.setMultiStatementAllow(true);// 允许一次执行多条语句
-        config.setNoneBaseStatementAllow(true);// 允许非基本语句的其他语句
-        return config;
-    }
-
 }
Index: yunna/src/main/java/com/freshport/common/DruidDataSourceConfigurationSgt.java
===================================================================
--- yunna/src/main/java/com/freshport/common/DruidDataSourceConfigurationSgt.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/common/DruidDataSourceConfigurationSgt.java	(revision 33933)
@@ -0,0 +1,49 @@
+package com.freshport.common;
+
+import javax.sql.DataSource;
+
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.mybatis.spring.SqlSessionFactoryBean;
+import org.mybatis.spring.SqlSessionTemplate;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+
+import com.alibaba.druid.pool.DruidDataSource;
+
+@Configuration
+@MapperScan(basePackages = { "com.freshport.fdao" }, sqlSessionFactoryRef = "sgtSqlSessionFactory")
+public class DruidDataSourceConfigurationSgt {
+    @Bean("sgtDataSource")
+    @ConfigurationProperties(prefix = "spring.datasource.druid.slave")
+    public DataSource sgtDataSource() {
+        return new DruidDataSource();
+    }
+
+    @Bean(name = "sgtSqlSessionFactory")
+    public SqlSessionFactory sgtSqlSessionFactory(@Qualifier("sgtDataSource") DataSource sgtDataSource)
+            throws Exception {
+        final SqlSessionFactoryBean sessionFactoryBean = new SqlSessionFactoryBean();
+        sessionFactoryBean.setDataSource(sgtDataSource);
+
+        PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
+        sessionFactoryBean.setMapperLocations(resolver.getResources("classpath:/com/freshport/fdao/Mapper/*.xml"));
+        sessionFactoryBean.getObject().getConfiguration().setMapUnderscoreToCamelCase(true);
+        return sessionFactoryBean.getObject();
+    }
+
+    @Bean(name = "sgtTransactionManager") // 配置事务
+    public DataSourceTransactionManager sgtTransactionManager(@Qualifier("sgtDataSource") DataSource sgtDataSource) {
+        return new DataSourceTransactionManager(sgtDataSource);
+    }
+
+    @Bean(name = "sgtSqlSessionTemplate")
+    public SqlSessionTemplate sgtSqlSessionTemplate(
+            @Qualifier("sgtSqlSessionFactory") SqlSessionFactory sgtSqlSessionFactory) {
+        return new SqlSessionTemplate(sgtSqlSessionFactory);
+    }
+}
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/control/FruitShipPortControl.java
===================================================================
--- yunna/src/main/java/com/freshport/control/FruitShipPortControl.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/control/FruitShipPortControl.java	(revision 33933)
@@ -133,4 +133,32 @@
         return JsonModel.success(null);
     }
 
+    /**
+     * 
+     * savePortOrShipInfo(手动调用，重新更新船司/港口信息)      
+     * @param type
+     * @param batchNo
+     * @return  
+     * @return JsonModel<Object>  
+     * @Exception 异常对象    
+     * @author lixd  
+     * @date 2023-03-28 15:36:52
+     */
+    @PostMapping("/shiwutest")
+    public JsonModel<Object> shiwutest() {
+        JsonModel<Object> model = new JsonModel<Object>();
+        try {
+            // fruitShipPortService.shiwutest();
+            model.setCode(CommonEnum.API_SUCCESS.getCode());
+            model.setDes(CommonEnum.API_SUCCESS.getRes());
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+            model.setCode(CommonEnum.API_ERROR.getCode());
+            model.setDes(CommonEnum.API_ERROR.getRes() + "  " + e.getMessage());
+        }
+
+        return model;
+    }
+
 }
Index: yunna/src/main/java/com/freshport/dao/Mapper/ShipPortMapper.xml
===================================================================
--- yunna/src/main/java/com/freshport/dao/Mapper/ShipPortMapper.xml	(revision 33932)
+++ yunna/src/main/java/com/freshport/dao/Mapper/ShipPortMapper.xml	(revision 33933)
@@ -267,7 +267,7 @@
     		<set> 
     			yjkgsj = #{item.yjkgsj},
     			sjkgsj = #{item.sjkgsj},
-    			rpa_xrsj = getdate(),
+    			<!-- rpa_xrsj = getdate(), -->
     			<if test="item.xhgqbm != null and item.xhgqbm != ''">
 		        	xhgq = #{item.xhgq},
 	    			xhgqjc = #{item.xhgqjc},
@@ -331,9 +331,9 @@
     			sfzy = #{item.sfzy},
     			zz_cm = #{item.zzCm},
     			zz_hcorhbh = #{item.zzHcorhbh},
-    			kcsj = #{item.kcsj},
-    			rpa_xrsj = getdate()
-    			<!-- <if test="item.hours != null and item.hours > 72">
+    			kcsj = #{item.kcsj}
+    			<!--rpa_xrsj = getdate()
+    			 <if test="item.hours != null and item.hours > 72">
 		        	yjkgsj = #{item.expectArrivalTime},
 		      	</if> -->
 		      </set>
@@ -351,4 +351,64 @@
   	</foreach>
   </update>
   
+  <!-- (根据批次获取数据 替代上面的listShipInfoForHddz方法，因为多数据源后无法直接关联货代单证 )   -->
+  <select id="listShipInfoForHddzNew" parameterType="java.lang.String" resultType="com.freshport.entity.yunna.ShipForHddzVO">
+  	SELECT
+		yspr.yspr_id AS ysprId,
+		yspr.loading_number AS loadingNumber,
+		yspr.container_number AS containerNumber,
+		yspr.business_no AS businessNo,
+		IFNULL(yspr.destination_port, '') as destinationPort,
+		<!-- isnull(yh.mdg, '') AS mdg, -->
+		'' AS mdg,
+		yspr.expect_arrival_time AS expectArrivalTime,
+		yspr.crt_time as crtTime,
+		IFNULL(TIMESTAMPDIFF( HOUR, yspr.crt_time, yspr.expect_arrival_time ), 0)  hours,
+		yspr.transit_port as transitPort,
+		IFNULL(yspr.ship_name, '') as shipName, 
+		<!-- isnull(yh.cm, '') as ladingShipName, --> 
+		'' as ladingShipName,
+		yspr.transit_ship_name as transitShipName,
+		yspr.transit_voyage as transitVoyage,
+		yspr.actual_sailing_time as actualSailingTime, 
+		yspr.batch_no AS batchNo 
+	FROM
+		yw_ship_port_result yspr
+		<!-- LEFT JOIN yw_hddz yh ON yspr.business_no = yh.ywbh --> 
+	WHERE
+		yspr.batch_no = #{batchNo}
+		AND yspr.type = 'SHIP'
+		and yspr.status in ('0')
+  </select>
+  
+  <!-- (根据批次获取港口数据 替换上面的listPortInfoForHddz，因为分库后无法直接关联yw_hddz获取mdg和中转航次) -->
+  <select id="listPortInfoForHddzNew" parameterType="java.lang.String" resultType="com.freshport.entity.yunna.PortForHddzVO">
+  	SELECT
+		yspr.yspr_id AS ysprId,
+		yspr.loading_number AS loadingNumber,
+		yspr.container_number AS containerNumber,
+		yspr.business_no AS businessNo,
+		<!-- yh.mdg AS destinationPort, -->
+		'' AS destinationPort,
+		yspr.expect_arrival_time AS expectArrivalTime,
+		yspr.actual_port_time AS actualPortTime,
+		IFNULL(yspr.voyage, '') AS voyage,
+		<!-- isnull(yh.zz_hcorhbh, '') as zzHcorhbh, --> 
+		'' as zzHcorhbh, 
+		IFNULL(yspr.unloading_port, '') AS unloadingPort,
+		IFNULL(ysu.unloading_port_short_name, '') as unloadingPortShortName,
+		IFNULL(ysu.unloading_port_full_name, '') as unloadingPortFullName,
+		IFNULL(ysu.unloading_port_code, '') as unloadingPortCode,
+		yspr.unloading_time AS unloadingTime,
+		yspr.actual_anchorage_time AS actualAnchorageTime,
+		yspr.batch_no AS batchNo 
+	FROM
+		yw_ship_port_result yspr
+		<!-- LEFT JOIN yw_hddz yh ON yspr.business_no = yh.ywbh  -->
+		LEFT JOIN yw_ship_unloading_port ysu on IFNULL(ysu.unloading_port, '') = IFNULL(yspr.unloading_port, '')
+	WHERE
+		yspr.batch_no = #{batchNo}
+		AND yspr.type = 'PORT'
+		and yspr.status in ('0')
+  </select>
 </mapper>
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/Mapper/YwHddzJzxxxYunnaMapper.xml
===================================================================
--- yunna/src/main/java/com/freshport/dao/Mapper/YwHddzJzxxxYunnaMapper.xml	(nonexistent)
+++ yunna/src/main/java/com/freshport/dao/Mapper/YwHddzJzxxxYunnaMapper.xml	(revision 33933)
@@ -0,0 +1,179 @@
+<?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.freshport.dao.YwHddzJzxxxYunnaMapper">
+  <resultMap id="BaseResultMap" type="com.freshport.entity.YwHddzJzxxxYunna">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="ywbh" jdbcType="VARCHAR" property="ywbh" />
+    <result column="jzxh" jdbcType="VARCHAR" property="jzxh" />
+    <result column="cxh" jdbcType="INTEGER" property="cxh" />
+    <result column="xcsj" jdbcType="TIMESTAMP" property="xcsj" />
+    <result column="crt_user" jdbcType="VARCHAR" property="crtUser" />
+    <result column="crt_time" jdbcType="TIMESTAMP" property="crtTime" />
+    <result column="crt_host" jdbcType="VARCHAR" property="crtHost" />
+    <result column="upd_user" jdbcType="VARCHAR" property="updUser" />
+    <result column="upd_time" jdbcType="TIMESTAMP" property="updTime" />
+    <result column="upd_host" jdbcType="VARCHAR" property="updHost" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, ywbh, jzxh, cxh, xcsj, crt_user, crt_time, crt_host, upd_user, upd_time, upd_host
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from yw_hddz_jzxxx_yunna
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from yw_hddz_jzxxx_yunna
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.freshport.entity.YwHddzJzxxxYunna">
+    insert into yw_hddz_jzxxx_yunna (id, ywbh, jzxh, 
+      cxh, xcsj, crt_user, 
+      crt_time, crt_host, upd_user, 
+      upd_time, upd_host)
+    values (#{id,jdbcType=VARCHAR}, #{ywbh,jdbcType=VARCHAR}, #{jzxh,jdbcType=VARCHAR}, 
+      #{cxh,jdbcType=INTEGER}, #{xcsj,jdbcType=TIMESTAMP}, #{crtUser,jdbcType=VARCHAR}, 
+      #{crtTime,jdbcType=TIMESTAMP}, #{crtHost,jdbcType=VARCHAR}, #{updUser,jdbcType=VARCHAR}, 
+      #{updTime,jdbcType=TIMESTAMP}, #{updHost,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.freshport.entity.YwHddzJzxxxYunna">
+    insert into yw_hddz_jzxxx_yunna
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="ywbh != null">
+        ywbh,
+      </if>
+      <if test="jzxh != null">
+        jzxh,
+      </if>
+      <if test="cxh != null">
+        cxh,
+      </if>
+      <if test="xcsj != null">
+        xcsj,
+      </if>
+      <if test="crtUser != null">
+        crt_user,
+      </if>
+      <if test="crtTime != null">
+        crt_time,
+      </if>
+      <if test="crtHost != null">
+        crt_host,
+      </if>
+      <if test="updUser != null">
+        upd_user,
+      </if>
+      <if test="updTime != null">
+        upd_time,
+      </if>
+      <if test="updHost != null">
+        upd_host,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="ywbh != null">
+        #{ywbh,jdbcType=VARCHAR},
+      </if>
+      <if test="jzxh != null">
+        #{jzxh,jdbcType=VARCHAR},
+      </if>
+      <if test="cxh != null">
+        #{cxh,jdbcType=INTEGER},
+      </if>
+      <if test="xcsj != null">
+        #{xcsj,jdbcType=TIMESTAMP},
+      </if>
+      <if test="crtUser != null">
+        #{crtUser,jdbcType=VARCHAR},
+      </if>
+      <if test="crtTime != null">
+        #{crtTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="crtHost != null">
+        #{crtHost,jdbcType=VARCHAR},
+      </if>
+      <if test="updUser != null">
+        #{updUser,jdbcType=VARCHAR},
+      </if>
+      <if test="updTime != null">
+        #{updTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updHost != null">
+        #{updHost,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.freshport.entity.YwHddzJzxxxYunna">
+    update yw_hddz_jzxxx_yunna
+    <set>
+      <if test="ywbh != null">
+        ywbh = #{ywbh,jdbcType=VARCHAR},
+      </if>
+      <if test="jzxh != null">
+        jzxh = #{jzxh,jdbcType=VARCHAR},
+      </if>
+      <if test="cxh != null">
+        cxh = #{cxh,jdbcType=INTEGER},
+      </if>
+      <if test="xcsj != null">
+        xcsj = #{xcsj,jdbcType=TIMESTAMP},
+      </if>
+      <if test="crtUser != null">
+        crt_user = #{crtUser,jdbcType=VARCHAR},
+      </if>
+      <if test="crtTime != null">
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="crtHost != null">
+        crt_host = #{crtHost,jdbcType=VARCHAR},
+      </if>
+      <if test="updUser != null">
+        upd_user = #{updUser,jdbcType=VARCHAR},
+      </if>
+      <if test="updTime != null">
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updHost != null">
+        upd_host = #{updHost,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.freshport.entity.YwHddzJzxxxYunna">
+    update yw_hddz_jzxxx_yunna
+    set ywbh = #{ywbh,jdbcType=VARCHAR},
+      jzxh = #{jzxh,jdbcType=VARCHAR},
+      cxh = #{cxh,jdbcType=INTEGER},
+      xcsj = #{xcsj,jdbcType=TIMESTAMP},
+      crt_user = #{crtUser,jdbcType=VARCHAR},
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
+      crt_host = #{crtHost,jdbcType=VARCHAR},
+      upd_user = #{updUser,jdbcType=VARCHAR},
+      upd_time = #{updTime,jdbcType=TIMESTAMP},
+      upd_host = #{updHost,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+  <!-- (批量保存)  -->
+  <insert id="saveList" parameterType="com.freshport.entity.YwHddzJzxxxYunna">
+    insert into yw_hddz_jzxxx_yunna (id, ywbh, jzxh, 
+      cxh, xcsj, crt_user, 
+      crt_time, crt_host, upd_user, 
+      upd_time, upd_host)
+    values
+     <foreach collection ="list" item="item" index= "index" separator =",">
+     (#{item.id,jdbcType=VARCHAR}, #{item.ywbh,jdbcType=VARCHAR}, #{item.jzxh,jdbcType=VARCHAR}, 
+      #{item.cxh,jdbcType=INTEGER}, #{item.xcsj,jdbcType=TIMESTAMP}, #{item.crtUser,jdbcType=VARCHAR}, 
+      #{item.crtTime,jdbcType=TIMESTAMP}, #{item.crtHost,jdbcType=VARCHAR}, #{item.updUser,jdbcType=VARCHAR}, 
+      #{item.updTime,jdbcType=TIMESTAMP}, #{item.updHost,jdbcType=VARCHAR})
+     </foreach>
+     
+  </insert>
+</mapper>
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/Mapper/YwHddzMapper.xml
===================================================================
--- yunna/src/main/java/com/freshport/dao/Mapper/YwHddzMapper.xml	(revision 33932)
+++ yunna/src/main/java/com/freshport/dao/Mapper/YwHddzMapper.xml	(revision 33933)
@@ -834,7 +834,7 @@
     <result column="jyz_sz_sfyc" jdbcType="CHAR" property="jyzSzSfyc" />
     <result column="mnsdsqzt" jdbcType="VARCHAR" property="mnsdsqzt" />
     <result column="sdtzfpsj" jdbcType="TIMESTAMP" property="sdtzfpsj" />
-    <result column="rpa_xrsj" jdbcType="TIMESTAMP" property="rpaXrsj" />
+   <!--  <result column="rpa_xrsj" jdbcType="TIMESTAMP" property="rpaXrsj" /> -->
   </resultMap>
   <insert id="insert" parameterType="com.freshport.entity.YwHddz">
     insert into yw_hddz (ywbh, zbr, zbrq, 
@@ -1106,7 +1106,7 @@
       zdrbm, zdrbmmc, zbjcqk, 
       zbsdqk, jysjzsscscsj, sfjjlx, 
       sqkp, jyz_sz_gzr, jyz_sz_sfyc, 
-      mnsdsqzt, sdtzfpsj, rpa_xrsj
+      mnsdsqzt, sdtzfpsj 
       )
     values (#{ywbh,jdbcType=VARCHAR}, #{zbr,jdbcType=VARCHAR}, #{zbrq,jdbcType=TIMESTAMP}, 
       #{dlwtf,jdbcType=VARCHAR}, #{hth,jdbcType=VARCHAR}, #{dlxyh,jdbcType=VARCHAR}, 
@@ -1377,7 +1377,7 @@
       #{zdrbm,jdbcType=VARCHAR}, #{zdrbmmc,jdbcType=VARCHAR}, #{zbjcqk,jdbcType=VARCHAR}, 
       #{zbsdqk,jdbcType=VARCHAR}, #{jysjzsscscsj,jdbcType=TIMESTAMP}, #{sfjjlx,jdbcType=CHAR}, 
       #{sqkp,jdbcType=CHAR}, #{jyzSzGzr,jdbcType=INTEGER}, #{jyzSzSfyc,jdbcType=CHAR}, 
-      #{mnsdsqzt,jdbcType=VARCHAR}, #{sdtzfpsj,jdbcType=TIMESTAMP}, #{rpaXrsj,jdbcType=TIMESTAMP}
+      #{mnsdsqzt,jdbcType=VARCHAR}, #{sdtzfpsj,jdbcType=TIMESTAMP}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.freshport.entity.YwHddz">
@@ -3879,9 +3879,9 @@
       <if test="sdtzfpsj != null">
         sdtzfpsj,
       </if>
-      <if test="rpaXrsj != null">
+      <!-- <if test="rpaXrsj != null">
         rpa_xrsj,
-      </if>
+      </if> -->
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="ywbh != null">
@@ -6380,9 +6380,10 @@
       <if test="sdtzfpsj != null">
         #{sdtzfpsj,jdbcType=TIMESTAMP},
       </if>
-      <if test="rpaXrsj != null">
+      <!-- <if test="rpaXrsj != null">
         #{rpaXrsj,jdbcType=TIMESTAMP},
       </if>
+       -->
     </trim>
   </insert>
 </mapper>
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/Mapper/YwHddzYunnaMapper.xml
===================================================================
--- yunna/src/main/java/com/freshport/dao/Mapper/YwHddzYunnaMapper.xml	(nonexistent)
+++ yunna/src/main/java/com/freshport/dao/Mapper/YwHddzYunnaMapper.xml	(revision 33933)
@@ -0,0 +1,321 @@
+<?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.freshport.dao.YwHddzYunnaMapper">
+  <resultMap id="BaseResultMap" type="com.freshport.entity.YwHddzYunna">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="ywbh" jdbcType="VARCHAR" property="ywbh" />
+    <result column="ztdh" jdbcType="VARCHAR" property="ztdh" />
+    <result column="qyg" jdbcType="VARCHAR" property="qyg" />
+    <result column="mdg" jdbcType="VARCHAR" property="mdg" />
+    <result column="cm" jdbcType="VARCHAR" property="cm" />
+    <result column="hcorhbh" jdbcType="VARCHAR" property="hcorhbh" />
+    <result column="zz_cm" jdbcType="VARCHAR" property="zzCm" />
+    <result column="zz_hcorhbh" jdbcType="VARCHAR" property="zzHcorhbh" />
+    <result column="yjkgsj" jdbcType="TIMESTAMP" property="yjkgsj" />
+    <result column="sjkgsj" jdbcType="TIMESTAMP" property="sjkgsj" />
+    <result column="jckfs" jdbcType="VARCHAR" property="jckfs" />
+    <result column="xhgqbm" jdbcType="VARCHAR" property="xhgqbm" />
+    <result column="xhgqjc" jdbcType="VARCHAR" property="xhgqjc" />
+    <result column="xhgq" jdbcType="VARCHAR" property="xhgq" />
+    <result column="crt_user" jdbcType="VARCHAR" property="crtUser" />
+    <result column="crt_time" jdbcType="TIMESTAMP" property="crtTime" />
+    <result column="crt_host" jdbcType="VARCHAR" property="crtHost" />
+    <result column="upd_user" jdbcType="VARCHAR" property="updUser" />
+    <result column="upd_time" jdbcType="TIMESTAMP" property="updTime" />
+    <result column="upd_host" jdbcType="VARCHAR" property="updHost" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, ywbh, ztdh, qyg, mdg, cm, hcorhbh, zz_cm, zz_hcorhbh, yjkgsj, sjkgsj, jckfs, 
+    xhgqbm, xhgqjc, xhgq, crt_user, crt_time, crt_host, upd_user, upd_time, upd_host
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from yw_hddz_yunna
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from yw_hddz_yunna
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.freshport.entity.YwHddzYunna">
+    insert into yw_hddz_yunna (id, ywbh, ztdh, 
+      qyg, mdg, cm, hcorhbh, 
+      zz_cm, zz_hcorhbh, yjkgsj, 
+      sjkgsj, jckfs, xhgqbm, 
+      xhgqjc, xhgq, crt_user, 
+      crt_time, crt_host, upd_user, 
+      upd_time, upd_host)
+    values (#{id,jdbcType=VARCHAR}, #{ywbh,jdbcType=VARCHAR}, #{ztdh,jdbcType=VARCHAR}, 
+      #{qyg,jdbcType=VARCHAR}, #{mdg,jdbcType=VARCHAR}, #{cm,jdbcType=VARCHAR}, #{hcorhbh,jdbcType=VARCHAR}, 
+      #{zzCm,jdbcType=VARCHAR}, #{zzHcorhbh,jdbcType=VARCHAR}, #{yjkgsj,jdbcType=TIMESTAMP}, 
+      #{sjkgsj,jdbcType=TIMESTAMP}, #{jckfs,jdbcType=VARCHAR}, #{xhgqbm,jdbcType=VARCHAR}, 
+      #{xhgqjc,jdbcType=VARCHAR}, #{xhgq,jdbcType=VARCHAR}, #{crtUser,jdbcType=VARCHAR}, 
+      #{crtTime,jdbcType=TIMESTAMP}, #{crtHost,jdbcType=VARCHAR}, #{updUser,jdbcType=VARCHAR}, 
+      #{updTime,jdbcType=TIMESTAMP}, #{updHost,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.freshport.entity.YwHddzYunna">
+    insert into yw_hddz_yunna
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="ywbh != null">
+        ywbh,
+      </if>
+      <if test="ztdh != null">
+        ztdh,
+      </if>
+      <if test="qyg != null">
+        qyg,
+      </if>
+      <if test="mdg != null">
+        mdg,
+      </if>
+      <if test="cm != null">
+        cm,
+      </if>
+      <if test="hcorhbh != null">
+        hcorhbh,
+      </if>
+      <if test="zzCm != null">
+        zz_cm,
+      </if>
+      <if test="zzHcorhbh != null">
+        zz_hcorhbh,
+      </if>
+      <if test="yjkgsj != null">
+        yjkgsj,
+      </if>
+      <if test="sjkgsj != null">
+        sjkgsj,
+      </if>
+      <if test="jckfs != null">
+        jckfs,
+      </if>
+      <if test="xhgqbm != null">
+        xhgqbm,
+      </if>
+      <if test="xhgqjc != null">
+        xhgqjc,
+      </if>
+      <if test="xhgq != null">
+        xhgq,
+      </if>
+      <if test="crtUser != null">
+        crt_user,
+      </if>
+      <if test="crtTime != null">
+        crt_time,
+      </if>
+      <if test="crtHost != null">
+        crt_host,
+      </if>
+      <if test="updUser != null">
+        upd_user,
+      </if>
+      <if test="updTime != null">
+        upd_time,
+      </if>
+      <if test="updHost != null">
+        upd_host,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="ywbh != null">
+        #{ywbh,jdbcType=VARCHAR},
+      </if>
+      <if test="ztdh != null">
+        #{ztdh,jdbcType=VARCHAR},
+      </if>
+      <if test="qyg != null">
+        #{qyg,jdbcType=VARCHAR},
+      </if>
+      <if test="mdg != null">
+        #{mdg,jdbcType=VARCHAR},
+      </if>
+      <if test="cm != null">
+        #{cm,jdbcType=VARCHAR},
+      </if>
+      <if test="hcorhbh != null">
+        #{hcorhbh,jdbcType=VARCHAR},
+      </if>
+      <if test="zzCm != null">
+        #{zzCm,jdbcType=VARCHAR},
+      </if>
+      <if test="zzHcorhbh != null">
+        #{zzHcorhbh,jdbcType=VARCHAR},
+      </if>
+      <if test="yjkgsj != null">
+        #{yjkgsj,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sjkgsj != null">
+        #{sjkgsj,jdbcType=TIMESTAMP},
+      </if>
+      <if test="jckfs != null">
+        #{jckfs,jdbcType=VARCHAR},
+      </if>
+      <if test="xhgqbm != null">
+        #{xhgqbm,jdbcType=VARCHAR},
+      </if>
+      <if test="xhgqjc != null">
+        #{xhgqjc,jdbcType=VARCHAR},
+      </if>
+      <if test="xhgq != null">
+        #{xhgq,jdbcType=VARCHAR},
+      </if>
+      <if test="crtUser != null">
+        #{crtUser,jdbcType=VARCHAR},
+      </if>
+      <if test="crtTime != null">
+        #{crtTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="crtHost != null">
+        #{crtHost,jdbcType=VARCHAR},
+      </if>
+      <if test="updUser != null">
+        #{updUser,jdbcType=VARCHAR},
+      </if>
+      <if test="updTime != null">
+        #{updTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updHost != null">
+        #{updHost,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.freshport.entity.YwHddzYunna">
+    update yw_hddz_yunna
+    <set>
+      <if test="ywbh != null">
+        ywbh = #{ywbh,jdbcType=VARCHAR},
+      </if>
+      <if test="ztdh != null">
+        ztdh = #{ztdh,jdbcType=VARCHAR},
+      </if>
+      <if test="qyg != null">
+        qyg = #{qyg,jdbcType=VARCHAR},
+      </if>
+      <if test="mdg != null">
+        mdg = #{mdg,jdbcType=VARCHAR},
+      </if>
+      <if test="cm != null">
+        cm = #{cm,jdbcType=VARCHAR},
+      </if>
+      <if test="hcorhbh != null">
+        hcorhbh = #{hcorhbh,jdbcType=VARCHAR},
+      </if>
+      <if test="zzCm != null">
+        zz_cm = #{zzCm,jdbcType=VARCHAR},
+      </if>
+      <if test="zzHcorhbh != null">
+        zz_hcorhbh = #{zzHcorhbh,jdbcType=VARCHAR},
+      </if>
+      <if test="yjkgsj != null">
+        yjkgsj = #{yjkgsj,jdbcType=TIMESTAMP},
+      </if>
+      <if test="sjkgsj != null">
+        sjkgsj = #{sjkgsj,jdbcType=TIMESTAMP},
+      </if>
+      <if test="jckfs != null">
+        jckfs = #{jckfs,jdbcType=VARCHAR},
+      </if>
+      <if test="xhgqbm != null">
+        xhgqbm = #{xhgqbm,jdbcType=VARCHAR},
+      </if>
+      <if test="xhgqjc != null">
+        xhgqjc = #{xhgqjc,jdbcType=VARCHAR},
+      </if>
+      <if test="xhgq != null">
+        xhgq = #{xhgq,jdbcType=VARCHAR},
+      </if>
+      <if test="crtUser != null">
+        crt_user = #{crtUser,jdbcType=VARCHAR},
+      </if>
+      <if test="crtTime != null">
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="crtHost != null">
+        crt_host = #{crtHost,jdbcType=VARCHAR},
+      </if>
+      <if test="updUser != null">
+        upd_user = #{updUser,jdbcType=VARCHAR},
+      </if>
+      <if test="updTime != null">
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updHost != null">
+        upd_host = #{updHost,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.freshport.entity.YwHddzYunna">
+    update yw_hddz_yunna
+    set ywbh = #{ywbh,jdbcType=VARCHAR},
+      ztdh = #{ztdh,jdbcType=VARCHAR},
+      qyg = #{qyg,jdbcType=VARCHAR},
+      mdg = #{mdg,jdbcType=VARCHAR},
+      cm = #{cm,jdbcType=VARCHAR},
+      hcorhbh = #{hcorhbh,jdbcType=VARCHAR},
+      zz_cm = #{zzCm,jdbcType=VARCHAR},
+      zz_hcorhbh = #{zzHcorhbh,jdbcType=VARCHAR},
+      yjkgsj = #{yjkgsj,jdbcType=TIMESTAMP},
+      sjkgsj = #{sjkgsj,jdbcType=TIMESTAMP},
+      jckfs = #{jckfs,jdbcType=VARCHAR},
+      xhgqbm = #{xhgqbm,jdbcType=VARCHAR},
+      xhgqjc = #{xhgqjc,jdbcType=VARCHAR},
+      xhgq = #{xhgq,jdbcType=VARCHAR},
+      crt_user = #{crtUser,jdbcType=VARCHAR},
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
+      crt_host = #{crtHost,jdbcType=VARCHAR},
+      upd_user = #{updUser,jdbcType=VARCHAR},
+      upd_time = #{updTime,jdbcType=TIMESTAMP},
+      upd_host = #{updHost,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  
+  <!-- (根据ywbh查询ywbh)   -->
+  <select id="queryYwbh" parameterType="java.util.ArrayList" resultType="java.lang.String">
+    select ywbh from yw_hddz_yunna where ywbh in 
+    <foreach collection="list"  index="index" item="str"  open="(" separator="," close=")">
+			#{str} 
+	</foreach>
+  </select>
+  
+ <!--  (批量保存数据)   -->
+ <insert id="saveList" parameterType="com.freshport.entity.YwHddzYunna">
+    insert into yw_hddz_yunna (id, ywbh, ztdh, 
+      qyg, mdg, cm, hcorhbh, 
+      zz_cm, zz_hcorhbh, yjkgsj, 
+      sjkgsj, jckfs, xhgqbm, 
+      xhgqjc, xhgq, crt_user, 
+      crt_time, crt_host, upd_user, 
+      upd_time, upd_host)
+    values 
+    <foreach collection ="list" item="item" index= "index" separator =",">
+    (#{item.id,jdbcType=VARCHAR}, #{item.ywbh,jdbcType=VARCHAR}, #{item.ztdh,jdbcType=VARCHAR}, 
+      #{item.qyg,jdbcType=VARCHAR}, #{item.mdg,jdbcType=VARCHAR}, #{item.cm,jdbcType=VARCHAR}, #{item.hcorhbh,jdbcType=VARCHAR}, 
+      #{item.zzCm,jdbcType=VARCHAR}, #{item.zzHcorhbh,jdbcType=VARCHAR}, #{item.yjkgsj,jdbcType=TIMESTAMP}, 
+      #{item.sjkgsj,jdbcType=TIMESTAMP}, #{item.jckfs,jdbcType=VARCHAR}, #{item.xhgqbm,jdbcType=VARCHAR}, 
+      #{item.xhgqjc,jdbcType=VARCHAR}, #{item.xhgq,jdbcType=VARCHAR}, #{item.crtUser,jdbcType=VARCHAR}, 
+      #{item.crtTime,jdbcType=TIMESTAMP}, #{item.crtHost,jdbcType=VARCHAR}, #{item.updUser,jdbcType=VARCHAR}, 
+      #{item.updTime,jdbcType=TIMESTAMP}, #{item.updHost,jdbcType=VARCHAR})
+    </foreach>
+    
+  </insert>
+  
+  <!--  -->
+  <update id="updatetest" >
+    update yw_hddz_yunna
+    set  
+      qyg = '青岛',
+      mdg = '上海'
+       
+    where ywbh = '23GZ00001'
+  </update>
+  
+</mapper>
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/Mapper/YwShipCompanyMapper.xml
===================================================================
--- yunna/src/main/java/com/freshport/dao/Mapper/YwShipCompanyMapper.xml	(nonexistent)
+++ yunna/src/main/java/com/freshport/dao/Mapper/YwShipCompanyMapper.xml	(revision 33933)
@@ -0,0 +1,171 @@
+<?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.freshport.dao.YwShipCompanyMapper">
+  <resultMap id="BaseResultMap" type="com.freshport.entity.YwShipCompany">
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="carrier_code" jdbcType="VARCHAR" property="carrierCode" />
+    <result column="carrier_short_name" jdbcType="VARCHAR" property="carrierShortName" />
+    <result column="address" jdbcType="VARCHAR" property="address" />
+    <result column="fruit_carrier_full_name" jdbcType="VARCHAR" property="fruitCarrierFullName" />
+    <result column="crt_user" jdbcType="VARCHAR" property="crtUser" />
+    <result column="crt_time" jdbcType="TIMESTAMP" property="crtTime" />
+    <result column="crt_host" jdbcType="VARCHAR" property="crtHost" />
+    <result column="upd_user" jdbcType="VARCHAR" property="updUser" />
+    <result column="upd_time" jdbcType="TIMESTAMP" property="updTime" />
+    <result column="upd_host" jdbcType="VARCHAR" property="updHost" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, carrier_code, carrier_short_name, address, fruit_carrier_full_name, crt_user, 
+    crt_time, crt_host, upd_user, upd_time, upd_host
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from yw_ship_company
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from yw_ship_company
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.freshport.entity.YwShipCompany">
+    insert into yw_ship_company (id, carrier_code, carrier_short_name, 
+      address, fruit_carrier_full_name, crt_user, 
+      crt_time, crt_host, upd_user, 
+      upd_time, upd_host)
+    values (#{id,jdbcType=INTEGER}, #{carrierCode,jdbcType=VARCHAR}, #{carrierShortName,jdbcType=VARCHAR}, 
+      #{address,jdbcType=VARCHAR}, #{fruitCarrierFullName,jdbcType=VARCHAR}, #{crtUser,jdbcType=VARCHAR}, 
+      #{crtTime,jdbcType=TIMESTAMP}, #{crtHost,jdbcType=VARCHAR}, #{updUser,jdbcType=VARCHAR}, 
+      #{updTime,jdbcType=TIMESTAMP}, #{updHost,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.freshport.entity.YwShipCompany">
+    insert into yw_ship_company
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="carrierCode != null">
+        carrier_code,
+      </if>
+      <if test="carrierShortName != null">
+        carrier_short_name,
+      </if>
+      <if test="address != null">
+        address,
+      </if>
+      <if test="fruitCarrierFullName != null">
+        fruit_carrier_full_name,
+      </if>
+      <if test="crtUser != null">
+        crt_user,
+      </if>
+      <if test="crtTime != null">
+        crt_time,
+      </if>
+      <if test="crtHost != null">
+        crt_host,
+      </if>
+      <if test="updUser != null">
+        upd_user,
+      </if>
+      <if test="updTime != null">
+        upd_time,
+      </if>
+      <if test="updHost != null">
+        upd_host,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="carrierCode != null">
+        #{carrierCode,jdbcType=VARCHAR},
+      </if>
+      <if test="carrierShortName != null">
+        #{carrierShortName,jdbcType=VARCHAR},
+      </if>
+      <if test="address != null">
+        #{address,jdbcType=VARCHAR},
+      </if>
+      <if test="fruitCarrierFullName != null">
+        #{fruitCarrierFullName,jdbcType=VARCHAR},
+      </if>
+      <if test="crtUser != null">
+        #{crtUser,jdbcType=VARCHAR},
+      </if>
+      <if test="crtTime != null">
+        #{crtTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="crtHost != null">
+        #{crtHost,jdbcType=VARCHAR},
+      </if>
+      <if test="updUser != null">
+        #{updUser,jdbcType=VARCHAR},
+      </if>
+      <if test="updTime != null">
+        #{updTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updHost != null">
+        #{updHost,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.freshport.entity.YwShipCompany">
+    update yw_ship_company
+    <set>
+      <if test="carrierCode != null">
+        carrier_code = #{carrierCode,jdbcType=VARCHAR},
+      </if>
+      <if test="carrierShortName != null">
+        carrier_short_name = #{carrierShortName,jdbcType=VARCHAR},
+      </if>
+      <if test="address != null">
+        address = #{address,jdbcType=VARCHAR},
+      </if>
+      <if test="fruitCarrierFullName != null">
+        fruit_carrier_full_name = #{fruitCarrierFullName,jdbcType=VARCHAR},
+      </if>
+      <if test="crtUser != null">
+        crt_user = #{crtUser,jdbcType=VARCHAR},
+      </if>
+      <if test="crtTime != null">
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="crtHost != null">
+        crt_host = #{crtHost,jdbcType=VARCHAR},
+      </if>
+      <if test="updUser != null">
+        upd_user = #{updUser,jdbcType=VARCHAR},
+      </if>
+      <if test="updTime != null">
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updHost != null">
+        upd_host = #{updHost,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.freshport.entity.YwShipCompany">
+    update yw_ship_company
+    set carrier_code = #{carrierCode,jdbcType=VARCHAR},
+      carrier_short_name = #{carrierShortName,jdbcType=VARCHAR},
+      address = #{address,jdbcType=VARCHAR},
+      fruit_carrier_full_name = #{fruitCarrierFullName,jdbcType=VARCHAR},
+      crt_user = #{crtUser,jdbcType=VARCHAR},
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
+      crt_host = #{crtHost,jdbcType=VARCHAR},
+      upd_user = #{updUser,jdbcType=VARCHAR},
+      upd_time = #{updTime,jdbcType=TIMESTAMP},
+      upd_host = #{updHost,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+  <!-- (获取所有数据)   -->
+  <select id="queryAll"  resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from yw_ship_company
+  </select>
+</mapper>
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/Mapper/YwShipDestinationPortMapper.xml
===================================================================
--- yunna/src/main/java/com/freshport/dao/Mapper/YwShipDestinationPortMapper.xml	(nonexistent)
+++ yunna/src/main/java/com/freshport/dao/Mapper/YwShipDestinationPortMapper.xml	(revision 33933)
@@ -0,0 +1,184 @@
+<?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.freshport.dao.YwShipDestinationPortMapper">
+  <resultMap id="BaseResultMap" type="com.freshport.entity.YwShipDestinationPort">
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="mdg" jdbcType="VARCHAR" property="mdg" />
+    <result column="destination_port" jdbcType="VARCHAR" property="destinationPort" />
+    <result column="destination_port_code" jdbcType="VARCHAR" property="destinationPortCode" />
+    <result column="address" jdbcType="VARCHAR" property="address" />
+    <result column="remark" jdbcType="VARCHAR" property="remark" />
+    <result column="crt_user" jdbcType="VARCHAR" property="crtUser" />
+    <result column="crt_time" jdbcType="TIMESTAMP" property="crtTime" />
+    <result column="crt_host" jdbcType="VARCHAR" property="crtHost" />
+    <result column="upd_user" jdbcType="VARCHAR" property="updUser" />
+    <result column="upd_time" jdbcType="TIMESTAMP" property="updTime" />
+    <result column="upd_host" jdbcType="VARCHAR" property="updHost" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, mdg, destination_port, destination_port_code, address, remark, crt_user, crt_time, 
+    crt_host, upd_user, upd_time, upd_host
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from yw_ship_destination_port
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from yw_ship_destination_port
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.freshport.entity.YwShipDestinationPort">
+    insert into yw_ship_destination_port (id, mdg, destination_port, 
+      destination_port_code, address, remark, 
+      crt_user, crt_time, crt_host, 
+      upd_user, upd_time, upd_host
+      )
+    values (#{id,jdbcType=INTEGER}, #{mdg,jdbcType=VARCHAR}, #{destinationPort,jdbcType=VARCHAR}, 
+      #{destinationPortCode,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, 
+      #{crtUser,jdbcType=VARCHAR}, #{crtTime,jdbcType=TIMESTAMP}, #{crtHost,jdbcType=VARCHAR}, 
+      #{updUser,jdbcType=VARCHAR}, #{updTime,jdbcType=TIMESTAMP}, #{updHost,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.freshport.entity.YwShipDestinationPort">
+    insert into yw_ship_destination_port
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="mdg != null">
+        mdg,
+      </if>
+      <if test="destinationPort != null">
+        destination_port,
+      </if>
+      <if test="destinationPortCode != null">
+        destination_port_code,
+      </if>
+      <if test="address != null">
+        address,
+      </if>
+      <if test="remark != null">
+        remark,
+      </if>
+      <if test="crtUser != null">
+        crt_user,
+      </if>
+      <if test="crtTime != null">
+        crt_time,
+      </if>
+      <if test="crtHost != null">
+        crt_host,
+      </if>
+      <if test="updUser != null">
+        upd_user,
+      </if>
+      <if test="updTime != null">
+        upd_time,
+      </if>
+      <if test="updHost != null">
+        upd_host,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="mdg != null">
+        #{mdg,jdbcType=VARCHAR},
+      </if>
+      <if test="destinationPort != null">
+        #{destinationPort,jdbcType=VARCHAR},
+      </if>
+      <if test="destinationPortCode != null">
+        #{destinationPortCode,jdbcType=VARCHAR},
+      </if>
+      <if test="address != null">
+        #{address,jdbcType=VARCHAR},
+      </if>
+      <if test="remark != null">
+        #{remark,jdbcType=VARCHAR},
+      </if>
+      <if test="crtUser != null">
+        #{crtUser,jdbcType=VARCHAR},
+      </if>
+      <if test="crtTime != null">
+        #{crtTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="crtHost != null">
+        #{crtHost,jdbcType=VARCHAR},
+      </if>
+      <if test="updUser != null">
+        #{updUser,jdbcType=VARCHAR},
+      </if>
+      <if test="updTime != null">
+        #{updTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updHost != null">
+        #{updHost,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.freshport.entity.YwShipDestinationPort">
+    update yw_ship_destination_port
+    <set>
+      <if test="mdg != null">
+        mdg = #{mdg,jdbcType=VARCHAR},
+      </if>
+      <if test="destinationPort != null">
+        destination_port = #{destinationPort,jdbcType=VARCHAR},
+      </if>
+      <if test="destinationPortCode != null">
+        destination_port_code = #{destinationPortCode,jdbcType=VARCHAR},
+      </if>
+      <if test="address != null">
+        address = #{address,jdbcType=VARCHAR},
+      </if>
+      <if test="remark != null">
+        remark = #{remark,jdbcType=VARCHAR},
+      </if>
+      <if test="crtUser != null">
+        crt_user = #{crtUser,jdbcType=VARCHAR},
+      </if>
+      <if test="crtTime != null">
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="crtHost != null">
+        crt_host = #{crtHost,jdbcType=VARCHAR},
+      </if>
+      <if test="updUser != null">
+        upd_user = #{updUser,jdbcType=VARCHAR},
+      </if>
+      <if test="updTime != null">
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updHost != null">
+        upd_host = #{updHost,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.freshport.entity.YwShipDestinationPort">
+    update yw_ship_destination_port
+    set mdg = #{mdg,jdbcType=VARCHAR},
+      destination_port = #{destinationPort,jdbcType=VARCHAR},
+      destination_port_code = #{destinationPortCode,jdbcType=VARCHAR},
+      address = #{address,jdbcType=VARCHAR},
+      remark = #{remark,jdbcType=VARCHAR},
+      crt_user = #{crtUser,jdbcType=VARCHAR},
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
+      crt_host = #{crtHost,jdbcType=VARCHAR},
+      upd_user = #{updUser,jdbcType=VARCHAR},
+      upd_time = #{updTime,jdbcType=TIMESTAMP},
+      upd_host = #{updHost,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+  <!-- (获取所有数据)   -->
+  <select id="queryAll" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from yw_ship_destination_port
+  </select>
+</mapper>
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/Mapper/YwShipPortLoadingMapper.xml
===================================================================
--- yunna/src/main/java/com/freshport/dao/Mapper/YwShipPortLoadingMapper.xml	(revision 33932)
+++ yunna/src/main/java/com/freshport/dao/Mapper/YwShipPortLoadingMapper.xml	(revision 33933)
@@ -232,7 +232,7 @@
   	select 
 		max(batch_no) as batchNo 
 	from yw_ship_port_loading 
-	where batch_no like #{dateStr}+ '%' 
+	where batch_no like   CONCAT(#{dateStr},'%')     
   </select>
   
   <select id="countByBatchNo" parameterType="java.lang.String" resultType="java.lang.Integer">
Index: yunna/src/main/java/com/freshport/dao/Mapper/YwShipPortResultMapper.xml
===================================================================
--- yunna/src/main/java/com/freshport/dao/Mapper/YwShipPortResultMapper.xml	(revision 33932)
+++ yunna/src/main/java/com/freshport/dao/Mapper/YwShipPortResultMapper.xml	(revision 33933)
@@ -436,4 +436,25 @@
 		    	and batch_no = #{item.batchNo}
   		</foreach>
   </update>
+  
+  <!-- (反写云娜数据)   -->
+  <update  id="updateUpdStatusByBusinessNoSingle" parameterType="java.lang.String">
+  	update yw_ship_port_result set upd_status = '1' where batch_no = #{batchNo} and business_no =#{ywbh}
+  </update>
+  
+  <!-- (更新ETA>72h信息云娜反写) -->
+  <update id="updateShipResultEtaStatusSingle" parameterType="com.freshport.entity.YwShipPortResult">
+	update yw_ship_port_result set eta_status = '1', new_eta_time = #{newEtaTime} where business_no = #{businessNo} and batch_no = #{batchNo}
+  </update>
+  
+  <!-- (港口更新云娜数据)   -->
+   <update id="updateUpdStatusAndNewEtaTimeForPortSingle" parameterType="com.freshport.entity.yunna.PortForHddzVO">
+  	  		update yw_ship_port_result
+    		<set> 
+		        	upd_status = '1',
+		        	new_eta_time = #{newEtaTime}
+		      </set>
+		    where business_no = #{businessNo}
+		    	and batch_no = #{batchNo}
+  </update>
 </mapper>
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/ShipPortMapper.java
===================================================================
--- yunna/src/main/java/com/freshport/dao/ShipPortMapper.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/dao/ShipPortMapper.java	(revision 33933)
@@ -138,4 +138,26 @@
      */
     void updateShipEtaListForHddz(List<YwHddz> list);
 
+    /**
+     * listShipInfoForHddzNew(根据批次获取数据)  
+     * @param batchNo
+     * @return List<ShipForHddzVO>
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:10:23  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<ShipForHddzVO> listShipInfoForHddzNew(String batchNo);
+
+    /**
+     * listPortInfoForHddzNew(根据批次获取港口数据)
+     * @param batchNo
+     * @return List<ShipForHddzVO>
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:10:23  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<PortForHddzVO> listPortInfoForHddzNew(String batchNo);
+
 }
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/YwHddzJzxxxYunnaMapper.java
===================================================================
--- yunna/src/main/java/com/freshport/dao/YwHddzJzxxxYunnaMapper.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/dao/YwHddzJzxxxYunnaMapper.java	(revision 33933)
@@ -0,0 +1,30 @@
+package com.freshport.dao;
+
+import java.util.List;
+
+import com.freshport.entity.YwHddzJzxxxYunna;
+
+public interface YwHddzJzxxxYunnaMapper {
+    int deleteByPrimaryKey(String id);
+
+    int insert(YwHddzJzxxxYunna record);
+
+    int insertSelective(YwHddzJzxxxYunna record);
+
+    YwHddzJzxxxYunna selectByPrimaryKey(String id);
+
+    int updateByPrimaryKeySelective(YwHddzJzxxxYunna record);
+
+    int updateByPrimaryKey(YwHddzJzxxxYunna record);
+
+    /**
+     * saveList(批量保存)  
+     * @param list
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午2:32:21  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void saveList(List<YwHddzJzxxxYunna> list);
+}
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/YwHddzYunnaMapper.java
===================================================================
--- yunna/src/main/java/com/freshport/dao/YwHddzYunnaMapper.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/dao/YwHddzYunnaMapper.java	(revision 33933)
@@ -0,0 +1,44 @@
+package com.freshport.dao;
+
+import java.util.List;
+
+import com.freshport.entity.YwHddzYunna;
+
+public interface YwHddzYunnaMapper {
+    int deleteByPrimaryKey(String id);
+
+    int insert(YwHddzYunna record);
+
+    int insertSelective(YwHddzYunna record);
+
+    YwHddzYunna selectByPrimaryKey(String id);
+
+    int updateByPrimaryKeySelective(YwHddzYunna record);
+
+    int updateByPrimaryKey(YwHddzYunna record);
+
+    /**
+     * queryYwbh(根据ywbh查询ywbh)  
+     * @param tmpYwbhList
+     * @return List<String>
+     * @author wuwenjin
+     * @date 2023年4月20日 下午1:51:00  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<String> queryYwbh(List<String> tmpYwbhList);
+
+    /**
+     * saveList(批量保存数据)  
+     * @param list
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午2:28:28  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void saveList(List<YwHddzYunna> list);
+
+    void updatetest();
+
+}
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/YwShipCompanyMapper.java
===================================================================
--- yunna/src/main/java/com/freshport/dao/YwShipCompanyMapper.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/dao/YwShipCompanyMapper.java	(revision 33933)
@@ -0,0 +1,29 @@
+package com.freshport.dao;
+
+import java.util.List;
+
+import com.freshport.entity.YwShipCompany;
+
+public interface YwShipCompanyMapper {
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(YwShipCompany record);
+
+    int insertSelective(YwShipCompany record);
+
+    YwShipCompany selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(YwShipCompany record);
+
+    int updateByPrimaryKey(YwShipCompany record);
+
+    /**
+     * queryAll(获取所有数据)  
+     * @return List<YwShipCompany>
+     * @author wuwenjin
+     * @date 2023年4月21日 上午10:58:11  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<YwShipCompany> queryAll();
+}
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/YwShipDestinationPortMapper.java
===================================================================
--- yunna/src/main/java/com/freshport/dao/YwShipDestinationPortMapper.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/dao/YwShipDestinationPortMapper.java	(revision 33933)
@@ -0,0 +1,28 @@
+package com.freshport.dao;
+
+import java.util.List;
+
+import com.freshport.entity.YwShipDestinationPort;
+
+public interface YwShipDestinationPortMapper {
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(YwShipDestinationPort record);
+
+    int insertSelective(YwShipDestinationPort record);
+
+    YwShipDestinationPort selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(YwShipDestinationPort record);
+
+    int updateByPrimaryKey(YwShipDestinationPort record);
+
+    /**
+     * queryAll(获取所有数据)  
+     * @return List<YwShipDestinationPort>
+     * @author wuwenjin
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<YwShipDestinationPort> queryAll();
+}
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/dao/YwShipPortResultMapper.java
===================================================================
--- yunna/src/main/java/com/freshport/dao/YwShipPortResultMapper.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/dao/YwShipPortResultMapper.java	(revision 33933)
@@ -55,4 +55,38 @@
      * @date 2023-03-29 15:16:26
      */
     void updateUpdStatusAndNewEtaTimeForPort(@Param("list") List<YwShipPortResult> list);
+
+    /**
+     * updateUpdStatusByBusinessNoSingle(反写云娜数据)  
+     * @param batchNo
+     * @param ywbh
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午3:50:02  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateUpdStatusByBusinessNoSingle(@Param("batchNo") String batchNo, @Param("ywbh") String ywbh);
+
+    /**
+     * updateShipResultEtaStatusSingle(更新ETA>72h信息云娜反写)  
+     * @param ywHddz
+     * @param batchNo
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午4:28:11  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateShipResultEtaStatusSingle(YwShipPortResult portResult);
+
+    /**
+     * updateUpdStatusAndNewEtaTimeForPortSingle(港口更新云娜数据)  
+     * @param PortForHddzVO pvo
+     * @author wuwenjin
+     * @date 2023年4月21日 下午5:09:26  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateUpdStatusAndNewEtaTimeForPortSingle(YwShipPortResult pvo);
 }
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/entity/YwHddz.java
===================================================================
--- yunna/src/main/java/com/freshport/entity/YwHddz.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/entity/YwHddz.java	(revision 33933)
@@ -1670,7 +1670,7 @@
 
     private Date sdtzfpsj;
 
-    private Date rpaXrsj;
+    // private Date rpaXrsj;
 
     public String getYwbh() {
         return ywbh;
@@ -8328,14 +8328,14 @@
         this.sdtzfpsj = sdtzfpsj;
     }
 
-    public Date getRpaXrsj() {
-        return rpaXrsj;
-    }
-
-    public void setRpaXrsj(Date rpaXrsj) {
-        this.rpaXrsj = rpaXrsj;
-    }
-    //构造部分字段
+    // public Date getRpaXrsj() {
+    // return rpaXrsj;
+    // }
+    //
+    // public void setRpaXrsj(Date rpaXrsj) {
+    // this.rpaXrsj = rpaXrsj;
+    // }
+    // 构造部分字段
     @Builder(builderMethodName = "customizeBuilder")
     YwHddz(String ywbh, String ztdh, Date yjkgsj, Date sjkgsj, String hcorhbh, String zzHcorhbh, String xhgq,
             String xhgqjc, String xhgqbm, Date kcsj) {
Index: yunna/src/main/java/com/freshport/entity/YwHddzJzxxxYunna.java
===================================================================
--- yunna/src/main/java/com/freshport/entity/YwHddzJzxxxYunna.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/entity/YwHddzJzxxxYunna.java	(revision 33933)
@@ -0,0 +1,115 @@
+package com.freshport.entity;
+
+import java.util.Date;
+
+public class YwHddzJzxxxYunna {
+    private String id;
+
+    private String ywbh;
+
+    private String jzxh;
+
+    private Integer cxh;
+
+    private Date xcsj;
+
+    private String crtUser;
+
+    private Date crtTime;
+
+    private String crtHost;
+
+    private String updUser;
+
+    private Date updTime;
+
+    private String updHost;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getYwbh() {
+        return ywbh;
+    }
+
+    public void setYwbh(String ywbh) {
+        this.ywbh = ywbh;
+    }
+
+    public String getJzxh() {
+        return jzxh;
+    }
+
+    public void setJzxh(String jzxh) {
+        this.jzxh = jzxh;
+    }
+
+    public Integer getCxh() {
+        return cxh;
+    }
+
+    public void setCxh(Integer cxh) {
+        this.cxh = cxh;
+    }
+
+    public Date getXcsj() {
+        return xcsj;
+    }
+
+    public void setXcsj(Date xcsj) {
+        this.xcsj = xcsj;
+    }
+
+    public String getCrtUser() {
+        return crtUser;
+    }
+
+    public void setCrtUser(String crtUser) {
+        this.crtUser = crtUser;
+    }
+
+    public Date getCrtTime() {
+        return crtTime;
+    }
+
+    public void setCrtTime(Date crtTime) {
+        this.crtTime = crtTime;
+    }
+
+    public String getCrtHost() {
+        return crtHost;
+    }
+
+    public void setCrtHost(String crtHost) {
+        this.crtHost = crtHost;
+    }
+
+    public String getUpdUser() {
+        return updUser;
+    }
+
+    public void setUpdUser(String updUser) {
+        this.updUser = updUser;
+    }
+
+    public Date getUpdTime() {
+        return updTime;
+    }
+
+    public void setUpdTime(Date updTime) {
+        this.updTime = updTime;
+    }
+
+    public String getUpdHost() {
+        return updHost;
+    }
+
+    public void setUpdHost(String updHost) {
+        this.updHost = updHost;
+    }
+}
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/entity/YwHddzYunna.java
===================================================================
--- yunna/src/main/java/com/freshport/entity/YwHddzYunna.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/entity/YwHddzYunna.java	(revision 33933)
@@ -0,0 +1,215 @@
+package com.freshport.entity;
+
+import java.util.Date;
+
+public class YwHddzYunna {
+    private String id;
+
+    private String ywbh;
+
+    private String ztdh;
+
+    private String qyg;
+
+    private String mdg;
+
+    private String cm;
+
+    private String hcorhbh;
+
+    private String zzCm;
+
+    private String zzHcorhbh;
+
+    private Date yjkgsj;
+
+    private Date sjkgsj;
+
+    private String jckfs;
+
+    private String xhgqbm;
+
+    private String xhgqjc;
+
+    private String xhgq;
+
+    private String crtUser;
+
+    private Date crtTime;
+
+    private String crtHost;
+
+    private String updUser;
+
+    private Date updTime;
+
+    private String updHost;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getYwbh() {
+        return ywbh;
+    }
+
+    public void setYwbh(String ywbh) {
+        this.ywbh = ywbh;
+    }
+
+    public String getZtdh() {
+        return ztdh;
+    }
+
+    public void setZtdh(String ztdh) {
+        this.ztdh = ztdh;
+    }
+
+    public String getQyg() {
+        return qyg;
+    }
+
+    public void setQyg(String qyg) {
+        this.qyg = qyg;
+    }
+
+    public String getMdg() {
+        return mdg;
+    }
+
+    public void setMdg(String mdg) {
+        this.mdg = mdg;
+    }
+
+    public String getCm() {
+        return cm;
+    }
+
+    public void setCm(String cm) {
+        this.cm = cm;
+    }
+
+    public String getHcorhbh() {
+        return hcorhbh;
+    }
+
+    public void setHcorhbh(String hcorhbh) {
+        this.hcorhbh = hcorhbh;
+    }
+
+    public String getZzCm() {
+        return zzCm;
+    }
+
+    public void setZzCm(String zzCm) {
+        this.zzCm = zzCm;
+    }
+
+    public String getZzHcorhbh() {
+        return zzHcorhbh;
+    }
+
+    public void setZzHcorhbh(String zzHcorhbh) {
+        this.zzHcorhbh = zzHcorhbh;
+    }
+
+    public Date getYjkgsj() {
+        return yjkgsj;
+    }
+
+    public void setYjkgsj(Date yjkgsj) {
+        this.yjkgsj = yjkgsj;
+    }
+
+    public Date getSjkgsj() {
+        return sjkgsj;
+    }
+
+    public void setSjkgsj(Date sjkgsj) {
+        this.sjkgsj = sjkgsj;
+    }
+
+    public String getJckfs() {
+        return jckfs;
+    }
+
+    public void setJckfs(String jckfs) {
+        this.jckfs = jckfs;
+    }
+
+    public String getXhgqbm() {
+        return xhgqbm;
+    }
+
+    public void setXhgqbm(String xhgqbm) {
+        this.xhgqbm = xhgqbm;
+    }
+
+    public String getXhgqjc() {
+        return xhgqjc;
+    }
+
+    public void setXhgqjc(String xhgqjc) {
+        this.xhgqjc = xhgqjc;
+    }
+
+    public String getXhgq() {
+        return xhgq;
+    }
+
+    public void setXhgq(String xhgq) {
+        this.xhgq = xhgq;
+    }
+
+    public String getCrtUser() {
+        return crtUser;
+    }
+
+    public void setCrtUser(String crtUser) {
+        this.crtUser = crtUser;
+    }
+
+    public Date getCrtTime() {
+        return crtTime;
+    }
+
+    public void setCrtTime(Date crtTime) {
+        this.crtTime = crtTime;
+    }
+
+    public String getCrtHost() {
+        return crtHost;
+    }
+
+    public void setCrtHost(String crtHost) {
+        this.crtHost = crtHost;
+    }
+
+    public String getUpdUser() {
+        return updUser;
+    }
+
+    public void setUpdUser(String updUser) {
+        this.updUser = updUser;
+    }
+
+    public Date getUpdTime() {
+        return updTime;
+    }
+
+    public void setUpdTime(Date updTime) {
+        this.updTime = updTime;
+    }
+
+    public String getUpdHost() {
+        return updHost;
+    }
+
+    public void setUpdHost(String updHost) {
+        this.updHost = updHost;
+    }
+}
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/entity/YwShipCompany.java
===================================================================
--- yunna/src/main/java/com/freshport/entity/YwShipCompany.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/entity/YwShipCompany.java	(revision 33933)
@@ -0,0 +1,115 @@
+package com.freshport.entity;
+
+import java.util.Date;
+
+public class YwShipCompany {
+    private Integer id;
+
+    private String carrierCode;
+
+    private String carrierShortName;
+
+    private String address;
+
+    private String fruitCarrierFullName;
+
+    private String crtUser;
+
+    private Date crtTime;
+
+    private String crtHost;
+
+    private String updUser;
+
+    private Date updTime;
+
+    private String updHost;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getCarrierCode() {
+        return carrierCode;
+    }
+
+    public void setCarrierCode(String carrierCode) {
+        this.carrierCode = carrierCode;
+    }
+
+    public String getCarrierShortName() {
+        return carrierShortName;
+    }
+
+    public void setCarrierShortName(String carrierShortName) {
+        this.carrierShortName = carrierShortName;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getFruitCarrierFullName() {
+        return fruitCarrierFullName;
+    }
+
+    public void setFruitCarrierFullName(String fruitCarrierFullName) {
+        this.fruitCarrierFullName = fruitCarrierFullName;
+    }
+
+    public String getCrtUser() {
+        return crtUser;
+    }
+
+    public void setCrtUser(String crtUser) {
+        this.crtUser = crtUser;
+    }
+
+    public Date getCrtTime() {
+        return crtTime;
+    }
+
+    public void setCrtTime(Date crtTime) {
+        this.crtTime = crtTime;
+    }
+
+    public String getCrtHost() {
+        return crtHost;
+    }
+
+    public void setCrtHost(String crtHost) {
+        this.crtHost = crtHost;
+    }
+
+    public String getUpdUser() {
+        return updUser;
+    }
+
+    public void setUpdUser(String updUser) {
+        this.updUser = updUser;
+    }
+
+    public Date getUpdTime() {
+        return updTime;
+    }
+
+    public void setUpdTime(Date updTime) {
+        this.updTime = updTime;
+    }
+
+    public String getUpdHost() {
+        return updHost;
+    }
+
+    public void setUpdHost(String updHost) {
+        this.updHost = updHost;
+    }
+}
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/entity/YwShipDestinationPort.java
===================================================================
--- yunna/src/main/java/com/freshport/entity/YwShipDestinationPort.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/entity/YwShipDestinationPort.java	(revision 33933)
@@ -0,0 +1,125 @@
+package com.freshport.entity;
+
+import java.util.Date;
+
+public class YwShipDestinationPort {
+    private Integer id;
+
+    private String mdg;
+
+    private String destinationPort;
+
+    private String destinationPortCode;
+
+    private String address;
+
+    private String remark;
+
+    private String crtUser;
+
+    private Date crtTime;
+
+    private String crtHost;
+
+    private String updUser;
+
+    private Date updTime;
+
+    private String updHost;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getMdg() {
+        return mdg;
+    }
+
+    public void setMdg(String mdg) {
+        this.mdg = mdg;
+    }
+
+    public String getDestinationPort() {
+        return destinationPort;
+    }
+
+    public void setDestinationPort(String destinationPort) {
+        this.destinationPort = destinationPort;
+    }
+
+    public String getDestinationPortCode() {
+        return destinationPortCode;
+    }
+
+    public void setDestinationPortCode(String destinationPortCode) {
+        this.destinationPortCode = destinationPortCode;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getCrtUser() {
+        return crtUser;
+    }
+
+    public void setCrtUser(String crtUser) {
+        this.crtUser = crtUser;
+    }
+
+    public Date getCrtTime() {
+        return crtTime;
+    }
+
+    public void setCrtTime(Date crtTime) {
+        this.crtTime = crtTime;
+    }
+
+    public String getCrtHost() {
+        return crtHost;
+    }
+
+    public void setCrtHost(String crtHost) {
+        this.crtHost = crtHost;
+    }
+
+    public String getUpdUser() {
+        return updUser;
+    }
+
+    public void setUpdUser(String updUser) {
+        this.updUser = updUser;
+    }
+
+    public Date getUpdTime() {
+        return updTime;
+    }
+
+    public void setUpdTime(Date updTime) {
+        this.updTime = updTime;
+    }
+
+    public String getUpdHost() {
+        return updHost;
+    }
+
+    public void setUpdHost(String updHost) {
+        this.updHost = updHost;
+    }
+}
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/entity/yunna/ActivemqParams.java
===================================================================
--- yunna/src/main/java/com/freshport/entity/yunna/ActivemqParams.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/entity/yunna/ActivemqParams.java	(revision 33933)
@@ -0,0 +1,31 @@
+package com.freshport.entity.yunna;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 项目名称：yunna    
+ * 类名称：ActivemqParams    
+ * 类描述： 获取队列内容
+ * 创建人：wuwenjin    
+ * 创建时间：2023年4月21日 下午2:30:44    
+ * 修改人：wuwenjin    
+ * 修改时间：2023年4月21日 下午2:30:44    
+ * 修改备注：    
+ * @version     
+ *
+ */
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+@Builder
+public class ActivemqParams {
+
+    // 批次号
+    private String batchNo;
+
+    // 查询类型
+    private String type;
+}
Index: yunna/src/main/java/com/freshport/entity/yunna/LoadingNumberQueryParam.java
===================================================================
--- yunna/src/main/java/com/freshport/entity/yunna/LoadingNumberQueryParam.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/entity/yunna/LoadingNumberQueryParam.java	(revision 33933)
@@ -35,4 +35,7 @@
      */
     @NotBlank(message = "提单号类型不能为空")
     private String type;
+
+    // 日期字符串
+    private String dateStr;
 }
Index: yunna/src/main/java/com/freshport/entity/yunna/LoadingNumberResultVO.java
===================================================================
--- yunna/src/main/java/com/freshport/entity/yunna/LoadingNumberResultVO.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/entity/yunna/LoadingNumberResultVO.java	(revision 33933)
@@ -68,4 +68,14 @@
      */
     private String batchNo;
 
+    /**
+     *  承运人 -- 冗余字段
+     */
+    private String carrier;
+
+    /**
+     *  目的港-- 冗余字段
+     */
+    private String mdg;
+
 }
Index: yunna/src/main/java/com/freshport/fdao/Mapper/ShipPortSgtMapper.xml
===================================================================
--- yunna/src/main/java/com/freshport/fdao/Mapper/ShipPortSgtMapper.xml	(nonexistent)
+++ yunna/src/main/java/com/freshport/fdao/Mapper/ShipPortSgtMapper.xml	(revision 33933)
@@ -0,0 +1,413 @@
+<?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.freshport.fdao.ShipPortSgtMapper">
+<!-- 连水果通库专用 -->
+  
+  <!-- (查询提单号信息-船司-源SQL中第一部分中外运数据按照集装箱维度查询)   -->
+   <select id="listLoadingNumberForShipConOne" resultType="com.freshport.entity.yunna.LoadingNumberResultVO">
+	SELECT
+		distinct
+		REPLACE(isnull(yh.ztdh, ''), '*', '') as loadingNumber,
+		yh.ywbh as businessNo,
+		jzxxx.jzxh as containerNumber,
+		yh.mdg as destinationPort,
+		'' as firmName,
+		'' as shipName,
+		'' as transitShipName,
+		yh.cyr as  carrier
+	FROM
+		yw_hddz_jzxxx jzxxx
+		LEFT JOIN yw_hddz yh ON yh.ywbh = jzxxx.ywbh 
+	<where>
+		yh.ysfs = '海运' 
+		and isnull(yh.state, '新制') = '新制'
+		AND yh.sjkgsj IS NULL
+		and yh.cyr is not null
+		and yh.mdg is not null
+		and isnull(yh.ztdh, '') != ''
+		and isnull(yh.jckfs, '') = '进口'
+		and isnull(jzxxx.jzxh, '') != ''
+		<!-- 之前的数据 -->
+		<if test="type=='SHIP'.toString()">
+	    	and yh.zbrq &lt;= getdate() and yh.zbrq  &gt;= '2022-01-01 00:00:00'
+    	</if>
+    	<!-- 当天的数据 -->
+    	<if test="type=='SHIP_TMP'.toString()">
+    		 and yh.zbrq between CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 00:00:00' and CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 16:00:00'
+    	</if>
+	</where>
+  </select>
+  <!-- (查询提单号信息-船司-源SQL中第二部分 按提单维度获取香港数据)   -->
+   <select id="listLoadingNumberForShipConTwo" resultType="com.freshport.entity.yunna.LoadingNumberResultVO">
+	SELECT
+			distinct
+			REPLACE(isnull(yh.ztdh, ''), '*', '') as loadingNumber,
+			yh.ywbh as businessNo,
+			(SELECT isnull(max(jzxxx.jzxh), '') from yw_hddz_jzxxx jzxxx WHERE jzxxx.ywbh = yh.ywbh and isnull(jzxxx.jzxh, '') != '') as containerNumber,
+			yh.mdg as destinationPort,
+			'' as firmName,
+			'' as shipName,
+			'' as transitShipName,yh.cyr as  carrier	
+		FROM
+			yw_hddz yh 
+		<where>
+			yh.ysfs = '海运' 
+			and isnull(yh.state, '新制') = '新制'
+			AND yh.sjkgsj IS NULL
+			and yh.cyr is not null
+			and yh.mdg is not null
+			and yh.mdg = '香港'
+			and isnull(yh.jckfs, '') = '进口'
+			<!-- 之前的数据 -->
+			<if test="type=='SHIP'.toString()">
+		    	and yh.zbrq &lt;= getdate() and yh.zbrq  &gt;= '2022-01-01 00:00:00'
+	    	</if>
+	    	<!-- 当天的数据 -->
+	    	<if test="type=='SHIP_TMP'.toString()">
+	    		 and yh.zbrq between CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 00:00:00' and CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 16:00:00'
+	    	</if>
+		</where>
+  </select>
+  <!-- (查询提单号信息-船司-源SQL中第三部分  按提单维度获取不是香港，不是中外运数据)   -->
+   <select id="listLoadingNumberForShipConThree" resultType="com.freshport.entity.yunna.LoadingNumberResultVO">
+	 SELECT
+			distinct
+			REPLACE(yh.ztdh, '*', '') as loadingNumber,
+			yh.ywbh as businessNo,
+			(SELECT isnull(max(jzxxx.jzxh), '') from yw_hddz_jzxxx jzxxx WHERE jzxxx.ywbh = yh.ywbh and isnull(jzxxx.jzxh, '') != '') as containerNumber,
+			yh.mdg as destinationPort,
+			'' as firmName,
+			'' as shipName,
+			'' as transitShipName,yh.cyr as  carrier
+		FROM
+			yw_hddz yh 
+		<where>
+			yh.ysfs = '海运' 
+			and isnull(yh.state, '新制') = '新制'
+			AND yh.sjkgsj IS NULL
+			and yh.cyr is not null
+			and yh.mdg is not null
+			and isnull(yh.mdg, '') != '香港'
+			and isnull(yh.jckfs, '') = '进口'
+			and isnull(yh.ztdh, '') != ''
+			<if test="type=='SHIP'.toString()">
+	    	and yh.zbrq &lt;= getdate() and yh.zbrq  &gt;= '2022-01-01 00:00:00'
+	    	</if>
+	    	<!-- 当天的数据 -->
+	    	<if test="type=='SHIP_TMP'.toString()">
+	    		 and yh.zbrq between CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 00:00:00' and CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 16:00:00'
+	    	</if>
+		</where>
+  </select>
+  
+  <!-- 合并到 listLoadingNumberForShip
+  <select id="listLoadingNumberForShipTmp" resultType="com.freshport.entity.yunna.LoadingNumberResultVO">
+	SELECT
+		distinct
+		REPLACE(isnull(yh.ztdh, ''), '*', '') as loadingNumber,
+		yh.ywbh as businessNo,
+		jzxxx.jzxh as containerNumber,
+		yh.mdg as destinationPort,
+		yc.carrier_code as firmName,
+		'' as shipName,
+		'' as transitShipName	
+	FROM
+		yw_hddz_jzxxx jzxxx
+		LEFT JOIN yw_hddz yh ON yh.ywbh = jzxxx.ywbh 
+		left join yw_ship_company yc on yc.fruit_carrier_full_name = yh.cyr
+	WHERE
+		yh.ysfs = '海运' 
+		and isnull(yh.state, '新制') = '新制'
+		AND yh.sjkgsj IS NULL
+		and yh.cyr is not null
+		and yh.mdg is not null
+		and isnull(yh.ztdh, '') != ''
+		and yc.carrier_code is not null
+		and yc.carrier_code = 'SINO'
+		and isnull(yh.jckfs, '') = '进口'
+		and isnull(jzxxx.jzxh, '') != ''
+		and yh.zbrq between CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 00:00:00' and CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 16:00:00'
+	union 
+	SELECT
+			distinct
+			REPLACE(isnull(yh.ztdh, ''), '*', '') as loadingNumber,
+			yh.ywbh as businessNo,
+			(SELECT isnull(max(jzxxx.jzxh), '') from yw_hddz_jzxxx jzxxx WHERE jzxxx.ywbh = yh.ywbh and isnull(jzxxx.jzxh, '') != '') as containerNumber,
+			yh.mdg as destinationPort,
+			yc.carrier_code as firmName,
+			'' as shipName,
+			'' as transitShipName	
+		FROM
+			yw_hddz yh 
+			left join yw_ship_company yc on yc.fruit_carrier_full_name = yh.cyr
+		WHERE
+			yh.ysfs = '海运' 
+			and isnull(yh.state, '新制') = '新制'
+			AND yh.sjkgsj IS NULL
+			and yh.cyr is not null
+			and yh.mdg is not null
+			and yc.carrier_code is not null
+			and yh.mdg = '香港'
+			and isnull(yh.jckfs, '') = '进口'
+			and yh.zbrq between CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 00:00:00' and CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 16:00:00'
+	union		
+	SELECT
+			distinct
+			REPLACE(yh.ztdh, '*', '') as loadingNumber,
+			yh.ywbh as businessNo,
+			(SELECT isnull(max(jzxxx.jzxh), '') from yw_hddz_jzxxx jzxxx WHERE jzxxx.ywbh = yh.ywbh and isnull(jzxxx.jzxh, '') != '') as containerNumber,
+			yh.mdg as destinationPort,
+			yc.carrier_code as firmName,
+			'' as shipName,
+			'' as transitShipName	
+		FROM
+			yw_hddz yh 
+			left join yw_ship_company yc on yc.fruit_carrier_full_name = yh.cyr
+		WHERE
+			yh.ysfs = '海运' 
+			and isnull(yh.state, '新制') = '新制'
+			AND yh.sjkgsj IS NULL
+			and yh.cyr is not null
+			and yh.mdg is not null
+			and yc.carrier_code is not null
+			and isnull(yc.carrier_code, '') != 'SINO' 
+			and isnull(yh.mdg, '') != '香港'
+			and isnull(yh.jckfs, '') = '进口'
+			and isnull(yh.ztdh, '') != ''
+			and yh.zbrq between CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 00:00:00' and CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 16:00:00'
+  </select>
+   -->
+  
+  <!-- 查询提单号信息 港口类型 -->
+  <select id="listLoadingNumberForPort" resultType="com.freshport.entity.yunna.LoadingNumberResultVO">
+	SELECT DISTINCT
+		REPLACE( yh.ztdh, '*', '' ) AS loadingNumber,
+		yh.ywbh as businessNo,
+		jzxxx.jzxh AS containerNumber,
+		<!-- ysdp.destination_port_code as destinationPort, -->
+		''  as destinationPort,
+		CASE
+				WHEN yh.mdg = '上海' THEN
+				isnull( yh.cm, '' ) ELSE '' 
+			END AS shipName,
+		CASE
+				WHEN yh.mdg = '上海' THEN
+				isnull( yh.zz_cm, '' ) ELSE '' 
+			END AS transitShipName,
+		'' AS firmName ,
+		yh.mdg as mdg
+	FROM
+		yw_hddz_jzxxx jzxxx
+		LEFT JOIN yw_hddz yh ON yh.ywbh = jzxxx.ywbh 
+		<!-- LEFT JOIN yw_ship_destination_port ysdp on ysdp.mdg = yh.mdg -->
+	<where>
+		yh.ysfs = '海运' 
+		AND isnull( yh.state, '新制' ) = '新制' 
+		AND jzxxx.xcsj IS NULL 
+		AND isnull( yh.jckfs, '' ) = '进口' 
+		AND isnull( yh.ztdh, '' ) != '' 
+		AND isnull( jzxxx.jzxh, '' ) != '' 
+		AND (
+			yh.mdg IN ( '宁波', '青岛', '天津', '上海', '盐田' ) 
+		OR ( yh.mdg = '南沙新港' AND isnull(yh.xhgqjc, '') = '南沙三期' )
+		OR (yh.mdg = '厦门港' and isnull(yh.xhgqjc, '') != '远海码头')) 
+		AND DATEDIFF( HOUR, getdate(), yh.yjkgsj ) BETWEEN 1 AND 72 
+		
+		<if test="type=='PORT'.toString()">
+    	and yh.zbrq &lt;= getdate() and yh.zbrq  &gt;= '2022-01-01 00:00:00'
+    	</if>
+    	<!-- 当天的数据 -->
+    	<if test="type=='PORT_TMP'.toString()">
+    		 and yh.zbrq between CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 00:00:00' and CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 16:00:00'
+    	</if>
+		</where>
+  </select>
+  
+  <!-- 查询提单号信息 港口类型  合并到 listLoadingNumberForPort
+  <select id="listLoadingNumberForPortTmp" resultType="com.freshport.entity.yunna.LoadingNumberResultVO">
+  	SELECT DISTINCT
+		REPLACE( yh.ztdh, '*', '' ) AS loadingNumber,
+		yh.ywbh as businessNo,
+		jzxxx.jzxh AS containerNumber,
+		ysdp.destination_port_code as destinationPort,
+		CASE
+				WHEN yh.mdg = '上海' THEN
+				isnull( yh.cm, '' ) ELSE '' 
+			END AS shipName,
+		CASE
+				WHEN yh.mdg = '上海' THEN
+				isnull( yh.zz_cm, '' ) ELSE '' 
+			END AS transitShipName,
+		'' AS firmName 
+	FROM
+		yw_hddz_jzxxx jzxxx
+		LEFT JOIN yw_hddz yh ON yh.ywbh = jzxxx.ywbh 
+		LEFT JOIN yw_ship_destination_port ysdp on ysdp.mdg = yh.mdg
+	WHERE
+		yh.ysfs = '海运' 
+		AND isnull( yh.state, '新制' ) = '新制' 
+		AND jzxxx.xcsj IS NULL 
+		AND isnull( yh.jckfs, '' ) = '进口' 
+		AND isnull( yh.ztdh, '' ) != '' 
+		AND isnull( jzxxx.jzxh, '' ) != '' 
+		AND (
+			yh.mdg IN ( '宁波', '青岛', '天津', '上海', '盐田' ) 
+		OR ( yh.mdg = '南沙新港' AND isnull(yh.xhgqjc, '') = '南沙三期' )
+		OR (yh.mdg = '厦门港' and isnull(yh.xhgqjc, '') != '远海码头')) 
+		AND DATEDIFF( HOUR, getdate(), yh.yjkgsj ) BETWEEN 1 AND 72 
+		and yh.zbrq between CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 00:00:00' and CONVERT ( CHAR ( 10 ), getdate(), 126 ) + ' 16:00:00'
+		 
+  </select>
+  -->
+  
+  <!-- (获取单证信息)   -->
+  <select id="queryHddzInfo" parameterType="java.util.ArrayList" resultType="com.freshport.entity.YwHddzYunna">
+    select  ywbh, ztdh, 
+      qyg, mdg, cm, hcorhbh, 
+      zz_cm as zzCm, zz_hcorhbh as zzHcorhbh, yjkgsj, 
+      sjkgsj, jckfs, xhgqbm, 
+      xhgqjc, xhgq
+      from yw_hddz where ywbh in 
+    <foreach collection="list"  index="index" item="str"  open="(" separator="," close=")">
+			#{str} 
+	</foreach>
+  </select>
+  
+  <!-- (获取集装箱信息)   -->
+  <select id="queryJzxxxInfo" parameterType="java.util.ArrayList" resultType="com.freshport.entity.YwHddzJzxxxYunna">
+    select  ywbh, jzxh,cxh,xcsj  from yw_hddz_jzxxx where ywbh in 
+    <foreach collection="list"  index="index" item="str"  open="(" separator="," close=")">
+			#{str} 
+	</foreach>
+  </select>
+  
+  <!-- (根据业务编号获取船名航次中转航次信息)   -->
+  <select id="queryCmAndMdgAndZzList" parameterType="java.util.ArrayList" resultType="com.freshport.entity.YwHddzYunna">
+    select  cm , mdg,zz_hcorhbh as zzHcorhbh,ywbh as ywbh  from yw_hddz where ywbh in 
+    <foreach collection="list"  index="index" item="str"  open="(" separator="," close=")">
+			#{str} 
+	</foreach>
+  </select>
+  
+  <!-- (更新货代单证表 船司信息- 中转港、是否中转、船名、航次、开船时间)   -->
+  <update id="updateShipInfoListForHddz" parameterType="java.util.List">
+  	<foreach collection="list" separator=";" item="item">
+  	  		update yw_hddz
+    		<set> 
+    			zzgk = #{item.zzgk},
+    			sfzy = #{item.sfzy},
+    			zz_cm = #{item.zzCm},
+    			zz_hcorhbh = #{item.zzHcorhbh},
+    			kcsj = #{item.kcsj}
+    			<!-- rpa_xrsj = getdate() -->
+		      </set>
+		    where ywbh = #{item.ywbh}
+  	</foreach>
+  </update>
+  
+  <!-- (更新ETA>72h信息)   -->
+  <update id="updateShipEtaListForHddz" parameterType="java.util.List">
+  	<foreach collection="list" separator=";" item="item">
+  	  		update yw_hddz
+    		<set> 
+		        	yjkgsj = #{item.yjkgsj}
+		    </set>
+		    where ywbh = #{item.ywbh}
+  	</foreach>
+  </update>
+  
+  <!-- (港口更新水果通字段)   -->
+  <update id="updatePortInfoListForHddz" parameterType="java.util.List">
+  	<foreach collection="list" separator=";" item="item">
+  	  		update yw_hddz
+    		<set> 
+    			yjkgsj = #{item.yjkgsj},
+    			sjkgsj = #{item.sjkgsj},
+    			<!-- rpa_xrsj = getdate(), -->
+    			<if test="item.xhgqbm != null and item.xhgqbm != ''">
+		        	xhgq = #{item.xhgq},
+	    			xhgqjc = #{item.xhgqjc},
+	    			xhgqbm = #{item.xhgqbm},
+		      	</if>
+		      	<choose>
+		            <when test="item.zzHcorhbh != null and item.zzHcorhbh != ''">
+		                zz_hcorhbh = #{item.hcorhbh},
+		            </when>
+		            <otherwise>
+		                hcorhbh = #{item.hcorhbh},
+		            </otherwise>
+		        </choose>
+    		</set>
+		    where ywbh = #{item.ywbh}
+  	</foreach>
+  </update>
+  
+  <!-- (港口更新集装箱字段)   -->
+    <update id="updatePortInfoListForJzxh" parameterType="java.util.List">
+  	<foreach collection="list" separator=";" item="item">
+  	  		update yw_hddz_jzxxx
+    		set 
+    			xcsj = #{item.xcsj}
+		    where ywbh = #{item.ywbh}
+		    and jzxh = #{item.jzxh}
+  	</foreach>
+  </update>
+  
+  <update id="updatetest" >
+  	 
+  	  		update yw_hddz
+    		set 
+    			dlxyh = '123'
+		    where ywbh =  '23GZ00001'
+		    
+  	 
+  </update>
+  
+   
+  <!-- (更新货代单证表 船司信息- 中转港、是否中转、船名、航次、开船时间)   -->
+  <update id="updateShipInfoListForHddzSingle" parameterType="com.freshport.entity.YwHddz">
+  	  		update yw_hddz
+    		<set> 
+    			zzgk = #{zzgk},
+    			sfzy = #{sfzy},
+    			zz_cm = #{zzCm},
+    			zz_hcorhbh = #{zzHcorhbh},
+    			kcsj = #{kcsj}
+    			<!-- rpa_xrsj = getdate() -->
+		      </set>
+		    where ywbh = #{ywbh}
+  </update>
+  
+  <!-- (更新ETA>72h信息)   -->
+  <update id="updateShipEtaListForHddzSingle" parameterType="com.freshport.entity.YwHddz">
+  	  		update yw_hddz set yjkgsj = #{yjkgsj}  where ywbh = #{ywbh}
+  </update>
+  <!-- 港口更新水果通字段 -->
+  <update id="updatePortInfoListForHddzSingle" parameterType="com.freshport.entity.YwHddz">
+  	  		update yw_hddz
+    		<set> 
+    			yjkgsj = #{yjkgsj},
+    			sjkgsj = #{sjkgsj},
+    			<!-- rpa_xrsj = getdate(), -->
+    			<if test="xhgqbm != null and xhgqbm != ''">
+		        	xhgq = #{xhgq},
+	    			xhgqjc = #{xhgqjc},
+	    			xhgqbm = #{xhgqbm},
+		      	</if>
+		      	<choose>
+		            <when test="zzHcorhbh != null and zzHcorhbh != ''">
+		                zz_hcorhbh = #{hcorhbh},
+		            </when>
+		            <otherwise>
+		                hcorhbh = #{hcorhbh},
+		            </otherwise>
+		        </choose>
+    		</set>
+		    where ywbh = #{ywbh}
+  </update>
+  
+  <!-- (更新集装箱信息)   -->
+  <update id="updatePortInfoListForJzxhSingle" parameterType="com.freshport.entity.YwHddzJzxxx">
+ 	update yw_hddz_jzxxx set xcsj = #{xcsj} where ywbh = #{ywbh} and jzxh = #{jzxh}
+  </update>
+</mapper>
\ No newline at end of file
Index: yunna/src/main/java/com/freshport/fdao/ShipPortSgtMapper.java
===================================================================
--- yunna/src/main/java/com/freshport/fdao/ShipPortSgtMapper.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/fdao/ShipPortSgtMapper.java	(revision 33933)
@@ -0,0 +1,223 @@
+package com.freshport.fdao;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.freshport.entity.YwHddz;
+import com.freshport.entity.YwHddzJzxxx;
+import com.freshport.entity.YwHddzJzxxxYunna;
+import com.freshport.entity.YwHddzYunna;
+import com.freshport.entity.yunna.LoadingNumberResultVO;
+
+/**
+ *     
+ * 项目名称：yunna    
+ * 类名称：ShipPortSgtMapper    
+ * 类描述： 船司/港口 业务查询相关mapper   从水果通查询数据
+ * 创建人：wuwenjin    
+ * 创建时间：2023年4月20日 上午11:31:08    
+ * 修改人：wuwenjin    
+ * 修改时间：2023年4月20日 上午11:31:08    
+ * 修改备注：    
+ * @version     
+ *
+ */
+public interface ShipPortSgtMapper {
+
+    /**
+     * listLoadingNumberForShip(查询提单号信息-船司)       
+     * @return
+     * @return List<LoadingNumberResultVO>
+     * @author wuwenjin
+     * @date 2023年4月20日 下午1:01:16  
+     * @Exception 异常对象  
+     * @version 1.0
+     * @modify 该方法已作废， 拆分为三个方法
+     */
+    // List<LoadingNumberResultVO> listLoadingNumberForShip();
+
+    /**
+     * listLoadingNumberForShipTmp(查询提单号信息-船司  当天00:00 到16:00之前数据)  
+     * @return List<LoadingNumberResultVO>
+     * @author wuwenjin
+     * @date 2023年4月20日 下午1:09:37  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<LoadingNumberResultVO> listLoadingNumberForShipTmp();
+
+    /**
+     * listLoadingNumberForPort(查询提单号信息-港口)      
+     * @return List<LoadingNumberResultVO>
+     * @author wuwenjin
+     * @date 2023年4月20日 下午1:12:13  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<LoadingNumberResultVO> listLoadingNumberForPort(@Param("type") String type);
+
+    /**
+     * listLoadingNumberForPortTmp(查询港口信息- 10d>ETA>72h)     
+     * @return List<LoadingNumberResultVO>
+     * @author wuwenjin
+     * @date 2023年4月20日 下午1:13:48  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<LoadingNumberResultVO> listLoadingNumberForPortTmp();
+
+    /**
+     * queryHddzInfo(获取单证信息)  
+     * @param list
+     * @return List<YwHddzYunna>
+     * @author wuwenjin
+     * @date 2023年4月20日 下午2:02:19  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<YwHddzYunna> queryHddzInfo(List<String> list);
+
+    /**
+     * queryJzxxxInfo(获取集装箱信息)  
+     * @param list
+     * @return List<YwHddzJzxxxYunna>
+     * @author wuwenjin
+     * @date 2023年4月20日 下午2:07:59  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<YwHddzJzxxxYunna> queryJzxxxInfo(List<String> list);
+
+    /**
+     * queryCmAndMdgAndZzList(根据业务编号获取船名航次中转航次信息)  
+     * @param ywbhList
+     * @return List<YwHddzYunna>
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:30:00  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<YwHddzYunna> queryCmAndMdgAndZzList(List<String> list);
+
+    /**
+     * updateShipInfoListForHddz(更新货代单证表 船司信息- 中转港、是否中转、船名、航次、开船时间)  
+     * @param list
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:52:21  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateShipInfoListForHddz(List<YwHddz> list);
+
+    /**
+     * updateShipEtaListForHddz(更新ETA>72h信息)  
+     * @param list
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午4:05:24  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateShipEtaListForHddz(List<YwHddz> list);
+
+    /**
+     * updatePortInfoListForHddz(港口更新水果通字段)  
+     * @param list
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午4:29:21  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updatePortInfoListForHddz(List<YwHddz> list);
+
+    /**
+     * updatePortInfoListForJzxh(港口更新集装箱字段)  
+     * @param list
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午4:29:21  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updatePortInfoListForJzxh(List<YwHddzJzxxx> list);
+
+    void updatetest();
+
+    /**
+     * listLoadingNumberForShipConOne(查询提单号信息-船司-源SQL中第一部分-- 中外运数据按照集装箱维度查询)  
+     * @return List<LoadingNumberResultVO>
+     * @author wuwenjin
+     * @date 2023年4月21日 上午10:47:34  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<LoadingNumberResultVO> listLoadingNumberForShipConOne(@Param("type") String type);
+
+    /**
+     * listLoadingNumberForShipConTwo(查询提单号信息-船司-源SQL中第二部分-- 按提单维度获取香港数据)  
+     * @return List<LoadingNumberResultVO>
+     * @author wuwenjin
+     * @date 2023年4月21日 上午10:47:34  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<LoadingNumberResultVO> listLoadingNumberForShipConTwo(@Param("type") String type);
+
+    /**
+     * listLoadingNumberForShipConThree(查询提单号信息-船司-源SQL中第三部分--  按提单维度获取不是香港，不是中外运数据)  
+     * @return List<LoadingNumberResultVO>
+     * @author wuwenjin
+     * @date 2023年4月21日 上午10:47:34  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    List<LoadingNumberResultVO> listLoadingNumberForShipConThree(@Param("type") String type);
+
+    /**
+     * updateShipInfoListForHddzSingle(更新船司信息)  
+     * @param ywHddz
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午3:44:12  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateShipInfoListForHddzSingle(YwHddz ywHddz);
+
+    /**
+     * updateShipEtaListForHddzSingle(更新ETA>72h信息)  
+     * @param ywHddz
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午4:22:41  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateShipEtaListForHddzSingle(YwHddz ywHddz);
+
+    /**
+     * updatePortInfoListForHddzSingle(更新港口字段)  
+     * @param ywHddz
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午4:56:26  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updatePortInfoListForHddzSingle(YwHddz ywHddz);
+
+    /**
+     * updatePortInfoListForJzxhSingle(更新集装箱信息)  
+     * @param ywHddzJzxxx
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午5:04:47  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updatePortInfoListForJzxhSingle(YwHddzJzxxx ywHddzJzxxx);
+
+}
Index: yunna/src/main/java/com/freshport/service/FruitShipPortService.java
===================================================================
--- yunna/src/main/java/com/freshport/service/FruitShipPortService.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/service/FruitShipPortService.java	(revision 33933)
@@ -165,4 +165,6 @@
      */
     void savePortOrShipInfo(String type, String batchNo);
 
+    // void shiwutest();
+
 }
Index: yunna/src/main/java/com/freshport/service/PortService.java
===================================================================
--- yunna/src/main/java/com/freshport/service/PortService.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/service/PortService.java	(revision 33933)
@@ -39,7 +39,7 @@
      * @author lixd  
      * @date 2023-03-15 13:52:58
      */
-    List<LoadingNumberResultVO> queryLoadingNumberInfoList();
+    List<LoadingNumberResultVO> queryLoadingNumberInfoList(String type);
 
     /**
      * 
Index: yunna/src/main/java/com/freshport/service/SgtDataService.java
===================================================================
--- yunna/src/main/java/com/freshport/service/SgtDataService.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/service/SgtDataService.java	(revision 33933)
@@ -0,0 +1,139 @@
+package com.freshport.service;
+
+import java.util.List;
+
+import com.freshport.entity.YwHddz;
+import com.freshport.entity.YwHddzJzxxx;
+import com.freshport.entity.YwHddzJzxxxYunna;
+import com.freshport.entity.YwHddzYunna;
+import com.freshport.entity.yunna.PortForHddzVO;
+import com.freshport.entity.yunna.ShipForHddzVO;
+
+/**
+ * 项目名称：yunna    
+ * 类名称：SgtDataService    
+ * 类描述：查询水果通数据库service
+ * 创建人：wuwenjin    
+ * 创建时间：2023年4月20日 下午1:18:59    
+ * 修改人：wuwenjin    
+ * 修改时间：2023年4月20日 下午1:18:59    
+ * 修改备注：    
+ * @version 1.0
+ */
+public interface SgtDataService {
+    /**
+     * queryYwHddzInfo(根据查询到的业务编号，获取单证和集装箱数据)  
+     * @param ywbhList 传入的ywbh
+     * @param hddzList 生成的货代单证信息
+     * @param jzxxxList生成的集装箱信息
+     * @author wuwenjin
+     * @date 2023年4月20日 下午1:23:49  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void queryYwHddzInfo(List<String> ywbhList, List<YwHddzYunna> hddzList, List<YwHddzJzxxxYunna> jzxxxList);
+
+    /**
+    * queryCmAndMdgAndZzList(根据业务编号获取船名航次中转航次信息)  
+    * @param list
+    * @return List<YwHddzYunna>
+    * @author wuwenjin
+    * @date 2023年4月20日 下午3:27:06  
+    * @Exception 异常对象  
+    * @version 1.0
+    */
+    List<YwHddzYunna> queryCmAndMdgAndZzList(List<String> list);
+
+    /**
+     * updateHddzInfoForShip(更新货代单证表船司相关字段信息(中转港、开船时间))  
+     * @param sameShipList
+     * @param totalBusinessNoStrList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:48:14  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateHddzInfoForShip(List<ShipForHddzVO> sameShipList, List<String> totalBusinessNoStrList);
+
+    /**
+     * updateHddzEtaForShip(更新ETA>72h信息)  
+     * @param baseDataList
+     * @param etaStatusList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:56:54  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateHddzEtaForShip(List<ShipForHddzVO> baseDataList, List<YwHddz> etaStatusList);
+
+    /**
+     * updateHddzInfoForPort(港口更新数据)  
+     * @param baseDataList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午4:26:28  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateHddzInfoForPort(List<PortForHddzVO> baseDataList);
+
+    /**
+     * updateContainerNoInfoForPort(更新集装箱表港口相关信息)  
+     * @param baseDataList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午4:32:16  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateContainerNoInfoForPort(List<PortForHddzVO> baseDataList);
+
+    void updatetest();
+
+    /**
+     * updateShipInfoListForHddzSingle(更新船司信息)  
+     * @param ywHddz
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午3:44:12  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateShipInfoListForHddzSingle(YwHddz ywHddz, String batchNo);
+
+    /**
+     * updateShipEtaListForHddzSingle(更新ETA>72h信息)  
+     * @param ywHddz
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午4:22:41  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateShipEtaListForHddzSingle(YwHddz ywHddz, String batchNo);
+
+    /**
+     * updatePortInfoListForHddzSingle(更新港口数据)  
+     * @param ywHddz
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午4:44:35  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updatePortInfoListForHddzSingle(YwHddz ywHddz, String batchNo);
+
+    /**
+     * updateContainerNoInfoForPortSingle(更新集装箱号)  
+     * @param ywHddzJzxxx
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午5:02:08  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateContainerNoInfoForPortSingle(YwHddzJzxxx ywHddzJzxxx, String batchNo);
+
+}
Index: yunna/src/main/java/com/freshport/service/ShipService.java
===================================================================
--- yunna/src/main/java/com/freshport/service/ShipService.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/service/ShipService.java	(revision 33933)
@@ -33,7 +33,7 @@
 
     /**
      * 
-     * queryLoadingNumberInfoList(查询船司提单号类型信息- 制单时间<=调用接口时间的数据)      
+     * queryLoadingNumberInfoList(查询船司提单号类型信息- 制单时间<=调用接口时间的数据)
      * @return  
      * @return List<LoadingNumberResultVO>  
      * @Exception 异常对象    
@@ -40,7 +40,7 @@
      * @author lixd  
      * @date 2023-03-15 13:52:58
      */
-    List<LoadingNumberResultVO> queryLoadingNumberInfoList();
+    List<LoadingNumberResultVO> queryLoadingNumberInfoList(String type);
 
     /**
      * 
Index: yunna/src/main/java/com/freshport/service/YunnaPortService.java
===================================================================
--- yunna/src/main/java/com/freshport/service/YunnaPortService.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/service/YunnaPortService.java	(revision 33933)
@@ -0,0 +1,29 @@
+package com.freshport.service;
+
+import com.freshport.entity.yunna.PortForHddzVO;
+
+public interface YunnaPortService {
+    /**
+     * handleDate(根据批次号处理数据)  
+     * @param batchNo
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午2:47:40  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void handleDate(String batchNo);
+
+    /**
+     * updatePortResultUpdStatusSingle(港口更新云娜数据)  
+     * @param pvo
+     * @param batchNo
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午5:09:26  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updatePortResultUpdStatusSingle(PortForHddzVO pvo, String batchNo);
+
+}
Index: yunna/src/main/java/com/freshport/service/YunnaShipService.java
===================================================================
--- yunna/src/main/java/com/freshport/service/YunnaShipService.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/service/YunnaShipService.java	(revision 33933)
@@ -0,0 +1,41 @@
+package com.freshport.service;
+
+import com.freshport.entity.YwHddz;
+
+public interface YunnaShipService {
+    /**
+     * handleDate(根据批次号处理数据)  
+     * @param batchNo
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午2:46:57  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void handleDate(String batchNo);
+
+    /**
+     * updateUpdStatusByBusinessNoSingle(反写云娜数据)  
+     * @param batchNo
+     * @param ywbh
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午3:50:02  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateUpdStatusByBusinessNoSingle(YwHddz ywHddz, String batchNo);
+
+    /**
+     * updateShipResultEtaStatusSingle(更新ETA>72h信息云娜反写)  
+     * @param ywHddz
+     * @param batchNo
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午4:28:11  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void updateShipResultEtaStatusSingle(YwHddz ywHddz, String batchNo);
+
+}
Index: yunna/src/main/java/com/freshport/service/YwHddzYunnaService.java
===================================================================
--- yunna/src/main/java/com/freshport/service/YwHddzYunnaService.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/service/YwHddzYunnaService.java	(revision 33933)
@@ -0,0 +1,34 @@
+package com.freshport.service;
+
+import java.util.List;
+
+import com.freshport.entity.YwHddzJzxxxYunna;
+import com.freshport.entity.YwHddzYunna;
+
+/**
+ * 项目名称：yunna    
+ * 类名称：YwHddzYunnaService    
+ * 类描述： 云娜保存业务数据
+ * 创建人：wuwenjin    
+ * 创建时间：2023年4月20日 下午2:23:20    
+ * 修改人：wuwenjin    
+ * 修改时间：2023年4月20日 下午2:23:20    
+ * 修改备注：    
+ * @version 1.0
+ */
+public interface YwHddzYunnaService {
+    /**
+     * saveHddzAndJzxxxInfo(保存单证和集装箱业务字段)  
+     * @param hddzList
+     * @param jzxxxList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午2:24:12  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    void saveHddzAndJzxxxInfo(List<YwHddzYunna> hddzList, List<YwHddzJzxxxYunna> jzxxxList);
+
+    void updatetest();
+
+}
Index: yunna/src/main/java/com/freshport/service/impl/FruitShipPortServiceImpl.java
===================================================================
--- yunna/src/main/java/com/freshport/service/impl/FruitShipPortServiceImpl.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/service/impl/FruitShipPortServiceImpl.java	(revision 33933)
@@ -15,6 +15,7 @@
 import java.util.Date;
 import java.util.List;
 import java.util.UUID;
+import java.util.stream.Collectors;
 
 import javax.annotation.Resource;
 
@@ -24,26 +25,37 @@
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.freshport.dao.YwHddzYunnaMapper;
 import com.freshport.dao.YwShipPortErrorMapper;
 import com.freshport.dao.YwShipPortLoadingMapper;
 import com.freshport.dao.YwShipPortLogMapper;
 import com.freshport.dao.YwShipPortResultMapper;
+import com.freshport.entity.YwHddzJzxxxYunna;
+import com.freshport.entity.YwHddzYunna;
 import com.freshport.entity.YwShipPortError;
 import com.freshport.entity.YwShipPortLoading;
 import com.freshport.entity.YwShipPortLogWithBLOBs;
 import com.freshport.entity.YwShipPortResult;
+import com.freshport.entity.yunna.ActivemqParams;
 import com.freshport.entity.yunna.LoadingNumberQueryParam;
 import com.freshport.entity.yunna.LoadingNumberResultVO;
 import com.freshport.entity.yunna.ShipPortResultVO;
+import com.freshport.fdao.ShipPortSgtMapper;
 import com.freshport.service.FruitShipPortService;
 import com.freshport.service.PortService;
+import com.freshport.service.SgtDataService;
 import com.freshport.service.ShipService;
+import com.freshport.service.YunnaPortService;
+import com.freshport.service.YunnaShipService;
+import com.freshport.service.YwHddzYunnaService;
 import com.freshport.util.CommonInfo;
 import com.freshport.util.CommonUtils;
 import com.freshport.util.DateUtils;
 import com.freshport.util.ShipPortDBException;
 import com.freshport.util.ShipPortEnum;
+import com.freshport.util.activemq.ProducerQueue;
 import com.freshport.util.aspect.SystemYunnaLog;
 
 import lombok.extern.slf4j.Slf4j;
@@ -87,15 +99,37 @@
     @Resource
     private YwShipPortErrorMapper ywShipPortErrorMapper;
 
+    @Resource
+    private SgtDataService sgtDataService;
+
+    @Resource
+    private YwHddzYunnaService ywHddzYunnaService;
+
     @SuppressWarnings("rawtypes")
     @Resource
     private RedisTemplate redisTemplate;
 
+    @Resource
+    private ShipPortSgtMapper shipPortSgtMapper;
+
+    @Resource
+    private YwHddzYunnaMapper ywHddzYunnaMapper;
+
+    @Resource
+    private ProducerQueue producerQueue;
+
+    @Resource
+    private YunnaPortService yunnaPortService;
+
+    @Resource
+    private YunnaShipService yunnaShipService;
+
     @Transactional
     @Override
     public List<LoadingNumberResultVO> handleLoadingNumberInfoMain(LoadingNumberQueryParam params) {
         // 查询提单号信息
         List<LoadingNumberResultVO> result = fruitShipPortService.queryLoadingNumberInfoList(params);
+
         // 批次号
         String batchNo = "";
         // 类型编码
@@ -116,7 +150,16 @@
         // JSONObject.toJSON(JsonModel.success(result)).toString(),
         // ShipPortEnum.getShipPortEnum(params.getType()).getLogType(),
         // result.size(), batchNo);
-
+        // 将部分业务信息再云娜存一份，BI查询使用,只有前面都正常的情况下才会记录。
+        List<String> ywbhList = result.stream().map(s -> s.getBusinessNo()).distinct().collect(Collectors.toList());
+        // 生成hddz数据
+        List<YwHddzYunna> hddzList = new ArrayList<YwHddzYunna>();
+        // 生成集装箱数据
+        List<YwHddzJzxxxYunna> jzxxxList = new ArrayList<YwHddzJzxxxYunna>();
+        // 处理hddz数据集装箱数据
+        sgtDataService.queryYwHddzInfo(ywbhList, hddzList, jzxxxList);
+        // 保存业务数据，供BI展示使用
+        ywHddzYunnaService.saveHddzAndJzxxxInfo(hddzList, jzxxxList);
         return result;
     }
 
@@ -125,18 +168,12 @@
     public List<LoadingNumberResultVO> queryLoadingNumberInfoList(LoadingNumberQueryParam params) {
 
         List<LoadingNumberResultVO> result = new ArrayList<LoadingNumberResultVO>();
-        if (ShipPortEnum.SHIP.getCode().equals(params.getType())) {
-
-            result = shipService.queryLoadingNumberInfoList();
-        } else if (ShipPortEnum.SHIP_TMP.getCode().equals(params.getType())) {
-
-            result = shipService.queryLoadingNumberInfoListForTmp();
-        } else if (ShipPortEnum.PORT.getCode().equals(params.getType())) {
-
-            result = portService.queryLoadingNumberInfoList();
-        } else if (ShipPortEnum.PORT_TMP.getCode().equals(params.getType())) {
-
-            result = portService.queryLoadingNumberInfoListForTmp();
+        if (ShipPortEnum.SHIP.getCode().equals(params.getType())
+                || ShipPortEnum.SHIP_TMP.getCode().equals(params.getType())) {
+            result = shipService.queryLoadingNumberInfoList(params.getType());
+        } else if (ShipPortEnum.PORT.getCode().equals(params.getType())
+                || ShipPortEnum.PORT_TMP.getCode().equals(params.getType())) {
+            result = portService.queryLoadingNumberInfoList(params.getType());
         }
         log.info("===============查询提单号类型：{}, 返回结果条数：{}", params.getType(), result.size());
 
@@ -155,9 +192,6 @@
                 lad.setCrtTime(crtTime);
                 loadingList.add(lad);
             }
-
-            // try {
-            // if (!CommonUtils.isEmpty(loadingList)) {
             // 分组保存
             List<List<YwShipPortLoading>> splitList = CommonUtils.splitList(loadingList,
                     CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED_150);
@@ -164,13 +198,6 @@
             for (int i = 0; i < splitList.size(); i++) {
                 ywShipPortLoadingMapper.insertList(splitList.get(i));
             }
-            // }
-            // } catch (Exception e) {
-            //
-            // e.printStackTrace();
-            // throw new ShipPortDBException("saveShipPortLoading_error",
-            // "保存yw_ship_port_loading-数据库异常:" + e.getMessage());
-            // }
         }
     }
 
@@ -224,11 +251,8 @@
         for (ShipPortResultVO vo : list) {
             YwShipPortResult rs = createShipPortResult(type, vo);
             rs.setCrtTime(crtTime);
-
             resultList.add(rs);
         }
-
-        // try {
         if (!CommonUtils.isEmpty(resultList)) {
             // 分组保存
             List<List<YwShipPortResult>> splitList = CommonUtils.splitList(resultList,
@@ -237,12 +261,6 @@
                 ywShipPortResultMapper.insertList(splitList.get(i));
             }
         }
-        // } catch (Exception e) {
-        //
-        // e.printStackTrace();
-        // throw new ShipPortDBException("saveShipPortResult_error",
-        // "保存yw_ship_port_result-数据库异常:" + e.getMessage());
-        // }
     }
 
     /**
@@ -294,6 +312,10 @@
         // 1. 保存原始数据表
         fruitShipPortService.saveShipPortResult(result, CommonInfo.TYPE_SHIP, batchNo);
 
+        // 将批次号放入消息队列 ， 然后与云娜通信结束。 后面与水果通系统交互与本次通信无关， 拆分执行。
+        ActivemqParams mq = ActivemqParams.builder().batchNo(batchNo).type(CommonInfo.TYPE_SHIP).build();
+        producerQueue.sendQueue(JSONArray.toJSONString(mq));
+
         // // 2. 保存日志--> 放到 YunnaLogAspect 中统一处理
         // fruitShipPortService.saveShipPortLog(JSONObject.toJSON(result).toString(),
         // JSONObject.toJSON(JsonModel.success(null)).toString(),
@@ -301,7 +323,7 @@
         // batchNo);
 
         // 3. 预警 / 反写
-        shipService.updateHddzAndWarnningInfo(batchNo);
+        // shipService.updateHddzAndWarnningInfo(batchNo);
     }
 
     @Transactional
@@ -321,6 +343,10 @@
         // 1. 保存原始数据表
         fruitShipPortService.saveShipPortResult(result, CommonInfo.TYPE_PORT, batchNo);
 
+        // 将批次号放入消息队列 ， 然后与云娜通信结束。 后面与水果通系统交互与本次通信无关， 拆分执行。
+        ActivemqParams mq = ActivemqParams.builder().batchNo(batchNo).type(CommonInfo.TYPE_PORT).build();
+        producerQueue.sendQueue(JSONArray.toJSONString(mq));
+
         // // 2. 保存日志
         // fruitShipPortService.saveShipPortLog(JSONObject.toJSON(result).toString(),
         // JSONObject.toJSON(JsonModel.success(null)).toString(),
@@ -444,10 +470,15 @@
     @Transactional
     @Override
     public void saveShipPortError(String errorCode, String batchNo, String msg) {
-        YwShipPortError error = YwShipPortError.builder().id(UUID.randomUUID().toString()).batchNo(batchNo)
-                .errorCode(errorCode).crtTime(new Date()).msg(msg.length() > 1000 ? msg.substring(0, 1000) : msg)
-                .build();
-        ywShipPortErrorMapper.insert(error);
+        try {
+            YwShipPortError error = YwShipPortError.builder().id(UUID.randomUUID().toString()).batchNo(batchNo)
+                    .errorCode(errorCode).crtTime(new Date()).msg(msg.length() > 1000 ? msg.substring(0, 1000) : msg)
+                    .build();
+            ywShipPortErrorMapper.insert(error);
+        } catch (Exception e) {
+            log.error("saveShipPortError_error", "保存日志出错！");
+            e.printStackTrace();
+        }
     }
 
     @Transactional
@@ -454,10 +485,26 @@
     @Override
     public void savePortOrShipInfo(String type, String batchNo) {
         if (CommonInfo.TYPE_SHIP.equals(type)) {
-            shipService.updateHddzAndWarnningInfo(batchNo);
+            // shipService.updateHddzAndWarnningInfo(batchNo);
+            yunnaShipService.handleDate(batchNo);
         } else if (CommonInfo.TYPE_PORT.equals(type)) {
-            portService.updateHddzAndWarnningInfo(batchNo);
+            // portService.updateHddzAndWarnningInfo(batchNo);
+            yunnaPortService.handleDate(batchNo);
         }
     }
 
+    // @Transactional
+    // @Override
+    // public void shiwutest() {
+    // sgtDataService.updatetest();
+    //
+    // ywHddzYunnaService.updatetest();
+    // // 先更新货代单证
+    // // shipPortSgtMapper.updatetest();
+    // // 更新云娜库
+    // // ywHddzYunnaMapper.updatetest();
+    // throw new BaseException("shiwutest_error", "哎呀，报错了.....");
+    //
+    // }
+
 }
Index: yunna/src/main/java/com/freshport/service/impl/PortServiceImpl.java
===================================================================
--- yunna/src/main/java/com/freshport/service/impl/PortServiceImpl.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/service/impl/PortServiceImpl.java	(revision 33933)
@@ -22,14 +22,19 @@
 import org.springframework.transaction.annotation.Transactional;
 
 import com.freshport.dao.ShipPortMapper;
+import com.freshport.dao.YwShipDestinationPortMapper;
 import com.freshport.dao.YwShipPortResultMapper;
 import com.freshport.entity.YwHddz;
 import com.freshport.entity.YwHddzJzxxx;
+import com.freshport.entity.YwHddzYunna;
+import com.freshport.entity.YwShipDestinationPort;
 import com.freshport.entity.YwShipPortResult;
 import com.freshport.entity.yunna.LoadingNumberResultVO;
 import com.freshport.entity.yunna.PortForHddzVO;
+import com.freshport.fdao.ShipPortSgtMapper;
 import com.freshport.service.FruitShipPortService;
 import com.freshport.service.PortService;
+import com.freshport.service.SgtDataService;
 import com.freshport.util.CommonInfo;
 import com.freshport.util.CommonUtils;
 import com.freshport.util.DateUtils;
@@ -67,18 +72,52 @@
     @Resource
     private YwShipPortResultMapper ywShipPortResultMapper;
 
+    @Resource
+    private ShipPortSgtMapper shipPortSgtMapper;
+
+    @Resource
+    private SgtDataService sgtDataService;
+
+    @Resource
+    private YwShipDestinationPortMapper ywShipDestinationPortMapper;
+
     @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)
     @Override
-    public List<LoadingNumberResultVO> queryLoadingNumberInfoList() {
-        return shipPortMapper.listLoadingNumberForPort();
+    public List<LoadingNumberResultVO> queryLoadingNumberInfoList(String type) {
+        // return shipPortMapper.listLoadingNumberForPort();
+        List<LoadingNumberResultVO> resultList = new ArrayList<LoadingNumberResultVO>();
+        // 根据条件获取数据
+        List<LoadingNumberResultVO> basicList = shipPortSgtMapper.listLoadingNumberForPort(type);
+        // 关联 yw_ship_destination_port 过滤数据
+        List<YwShipDestinationPort> allPortList = ywShipDestinationPortMapper.queryAll();
+        // 获取所有目的港数据
+        List<String> mdgList = allPortList.stream().map(s -> s.getMdg()).distinct().collect(Collectors.toList());
+        if (!CommonUtils.isEmpty(basicList)) {
+            // 获取映射表关联的数据
+            for (LoadingNumberResultVO vo : basicList) {
+                if (mdgList.contains(vo.getMdg())) {
+                    YwShipDestinationPort tmpCom = allPortList.stream().filter(b -> b.getMdg().equals(vo.getMdg()))
+                            .findAny().orElse(null);
+                    vo.setDestinationPort(tmpCom.getDestinationPortCode());
+                    resultList.add(vo);
+                }
+            }
+        }
+        return resultList;
     }
 
+    /**
+     * 改方法已合并到  queryLoadingNumberInfoList
+     */
+    @Deprecated
     @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)
     @Override
     public List<LoadingNumberResultVO> queryLoadingNumberInfoListForTmp() {
-        return shipPortMapper.listLoadingNumberForPortTmp();
+        // return shipPortMapper.listLoadingNumberForPortTmp();
+        return shipPortSgtMapper.listLoadingNumberForPortTmp();
     }
 
+    @Deprecated
     @Transactional(propagation = Propagation.REQUIRES_NEW)
     @Override
     public void updateHddzAndWarnningInfo(String batchNo) {
@@ -86,14 +125,17 @@
          *  港口查询到的航次是反写水果通规则：如果水果通里航次有值就直接反写航次，如果水果通航次无值就直接反写提单航次/航班号 字段；
          *  卸货港区：做映射表后对就反写，没有的就预警出来追加(放bi了)
          */
-        List<PortForHddzVO> baseDataList = shipPortMapper.listPortInfoForHddz(batchNo);
+        // List<PortForHddzVO> baseDataList =
+        // shipPortMapper.listPortInfoForHddz(batchNo);
+        List<PortForHddzVO> baseDataList = shipPortMapper.listPortInfoForHddzNew(batchNo);
+        // 拼接目的港和中转航次
+        assemblePortForHddzVO(baseDataList);
+
         log.info("===========PORT-batchNo={}, 总list.size={}", batchNo, baseDataList.size());
 
         if (!CommonUtils.isEmpty(baseDataList)) {
-
             // 循环处理ETA和上海抵锚时间
             for (int i = 0; i < baseDataList.size(); i++) {
-
                 PortForHddzVO vo = baseDataList.get(i);
                 // 目的港为上海，处理ETA和上海实际抵锚时间 ETA和抵锚时间，两个取最晚的时间
                 if (CommonInfo.PORT_SH.equals(vo.getDestinationPort())) {
@@ -104,10 +146,12 @@
             }
 
             // 1. 更新货代单证表港口相关字段信息
-            portService.updateHddzInfoForPort(baseDataList);
+            // portService.updateHddzInfoForPort(baseDataList);
+            sgtDataService.updateHddzInfoForPort(baseDataList);
 
             // 2. 更新集装箱表港口相关信息
-            portService.updateContainerNoInfoForPort(baseDataList);
+            // portService.updateContainerNoInfoForPort(baseDataList);
+            sgtDataService.updateContainerNoInfoForPort(baseDataList);
 
             // 3. 批量修改回传结果表数据反写状态
             portService.updatePortResultUpdStatus(baseDataList);
@@ -114,6 +158,41 @@
         }
     }
 
+    /**
+     * assemblePortForHddzVO(从水果通查询中转航次目的港后拼接到baseDataList中)  
+     * 之前查询数据时直接关联货代单证，现在分库后需要重新查一边
+     * @param baseDataList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:45:50  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    private void assemblePortForHddzVO(List<PortForHddzVO> baseDataList) {
+        // 获取业务编号， 去重
+        List<String> ywbhResultList = baseDataList.stream().map(s -> s.getBusinessNo()).distinct()
+                .collect(Collectors.toList());
+        // 根据业务编号获取对应的目的港中转航次
+        List<YwHddzYunna> zzmdgList = new ArrayList<YwHddzYunna>();
+        List<List<String>> splitList = CommonUtils.splitList(ywbhResultList,
+                CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+        for (int i = 0; i < splitList.size(); i++) {
+            List<YwHddzYunna> zzmdgTempList = sgtDataService.queryCmAndMdgAndZzList(splitList.get(i));
+            if (!CommonUtils.isEmpty(zzmdgTempList)) {
+                zzmdgList.addAll(zzmdgTempList);
+            }
+        }
+        // 将从水果通查询出的船名目的港添加到从云娜查询出的数据中，
+        for (PortForHddzVO vo : baseDataList) {
+            YwHddzYunna yn = zzmdgList.stream().filter(b -> b.getYwbh().equals(vo.getBusinessNo())).findAny()
+                    .orElse(null);
+            if (!CommonUtils.isEmpty(yn)) {
+                vo.setDestinationPort(yn.getMdg());
+                vo.setZzHcorhbh(yn.getZzHcorhbh());
+            }
+        }
+    }
+
     @Transactional
     @Override
     public void updatePortResultUpdStatus(List<PortForHddzVO> list) {
Index: yunna/src/main/java/com/freshport/service/impl/SgtDataServiceImpl.java
===================================================================
--- yunna/src/main/java/com/freshport/service/impl/SgtDataServiceImpl.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/service/impl/SgtDataServiceImpl.java	(revision 33933)
@@ -0,0 +1,570 @@
+package com.freshport.service.impl;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.freshport.dao.YwHddzMapper;
+import com.freshport.dao.YwHddzYunnaMapper;
+import com.freshport.entity.YwHddz;
+import com.freshport.entity.YwHddzJzxxx;
+import com.freshport.entity.YwHddzJzxxxYunna;
+import com.freshport.entity.YwHddzYunna;
+import com.freshport.entity.yunna.PortForHddzVO;
+import com.freshport.entity.yunna.ShipForHddzVO;
+import com.freshport.fdao.ShipPortSgtMapper;
+import com.freshport.service.FruitShipPortService;
+import com.freshport.service.SgtDataService;
+import com.freshport.util.CommonInfo;
+import com.freshport.util.CommonUtils;
+import com.freshport.util.DateUtils;
+import com.freshport.util.ShipPortDBException;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * 项目名称：yunna    
+ * 类名称：SgtDataServiceImpl    
+ * 类描述：查询水果通数据库service
+ * 创建人：wuwenjin    
+ * 创建时间：2023年4月20日 下午1:18:59    
+ * 修改人：wuwenjin    
+ * 修改时间：2023年4月20日 下午1:18:59    
+ * 修改备注：    
+ * @version 1.0
+ */
+@Slf4j
+@Service("sgtDataService")
+public class SgtDataServiceImpl implements SgtDataService {
+
+    @Resource
+    private ShipPortSgtMapper shipPortSgtMapper;
+
+    @Resource
+    private YwHddzYunnaMapper ywHddzYunnaMapper;
+
+    @Resource
+    private YwHddzMapper ywHddzMapper;
+
+    @Resource
+    private FruitShipPortService fruitShipPortService;
+
+    /**
+     * queryYwHddzInfo(根据查询到的业务编号，获取单证和集装箱数据)  
+     * @param ywbhList 传入的ywbh
+     * @param hddzList 生成的货代单证信息
+     * @param jzxxxList生成的集装箱信息
+     * @author wuwenjin
+     * @date 2023年4月20日 下午1:23:49  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)
+    @Override
+    public void queryYwHddzInfo(List<String> ywbhList, List<YwHddzYunna> hddzList, List<YwHddzJzxxxYunna> jzxxxList) {
+        // 去重后的业务编号
+        List<String> singleYwbhList = handleExisteYwbh(ywbhList);
+        // 分组处理
+        List<List<String>> splitSingleList = CommonUtils.splitList(singleYwbhList,
+                CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+        for (int i = 0; i < splitSingleList.size(); i++) {
+            // 获取单证信息
+            List<YwHddzYunna> yhyList = shipPortSgtMapper.queryHddzInfo(splitSingleList.get(i));
+            // 获取集装箱信息
+            List<YwHddzJzxxxYunna> yhjyList = shipPortSgtMapper.queryJzxxxInfo(splitSingleList.get(i));
+
+            if (!CommonUtils.isEmpty(yhyList)) {
+                for (YwHddzYunna h : yhyList) {
+                    h.setId(UUID.randomUUID().toString());
+                    h.setCrtTime(new Date());
+                }
+                hddzList.addAll(yhyList);
+            }
+            if (!CommonUtils.isEmpty(yhjyList)) {
+                for (YwHddzJzxxxYunna j : yhjyList) {
+                    j.setId(UUID.randomUUID().toString());
+                    j.setCrtTime(new Date());
+                }
+                jzxxxList.addAll(yhjyList);
+            }
+        }
+    }
+
+    /**
+     * handleExisteYwbh(判断传入的数据是否数据库已存在)  
+     * @param ywbhList
+     * @return List<String>
+     * @author wuwenjin
+     * @date 2023年4月20日 下午1:56:23  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    private List<String> handleExisteYwbh(List<String> ywbhList) {
+        List<String> singleYwbhList = new ArrayList<String>();
+        // 过滤掉已存在的ywbh
+        List<List<String>> splitList = CommonUtils.splitList(ywbhList,
+                CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+        for (int i = 0; i < splitList.size(); i++) {
+            List<String> tmpYwbhList = splitList.get(i);
+            List<String> tmpResultList = ywHddzYunnaMapper.queryYwbh(tmpYwbhList);
+            if (!CommonUtils.isEmpty(tmpResultList)) {
+                // 数量不一样， 获取不存在的业务编号
+                if (tmpYwbhList.size() != tmpResultList.size()) {
+                    for (String tmpywbh : tmpYwbhList) {
+                        if (!tmpResultList.contains(tmpywbh)) {
+                            singleYwbhList.add(tmpywbh);
+                        }
+                    }
+                } else {
+                    // 数量一样， 说名业务编号已存在， 不用处理
+                }
+            } else {// 查询结果为空， 说明都不存在
+                singleYwbhList.addAll(tmpYwbhList);
+            }
+        }
+        return singleYwbhList;
+    }
+
+    /**
+    * queryCmAndMdgAndZzList(根据业务编号获取船名航次中转航次信息)  
+    * @param list
+    * @return List<YwHddzYunna>
+    * @author wuwenjin
+    * @date 2023年4月20日 下午3:27:06  
+    * @Exception 异常对象  
+    * @version 1.0
+    */
+    @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)
+    @Override
+    public List<YwHddzYunna> queryCmAndMdgAndZzList(List<String> list) {
+
+        return shipPortSgtMapper.queryCmAndMdgAndZzList(list);
+    }
+
+    /**
+     * updateHddzInfoForShip(更新货代单证表船司相关字段信息(中转港、开船时间))  
+     * @param sameShipList
+     * @param totalBusinessNoStrList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:48:14  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional
+    @Override
+    public void updateHddzInfoForShip(List<ShipForHddzVO> baseDataList, List<String> ywbhStrList) {
+        List<ShipForHddzVO> shipList = new ArrayList<ShipForHddzVO>();
+        List<ShipForHddzVO> noTransitInfoList = baseDataList
+                .stream().filter(vo -> CommonUtils.isEmpty(vo.getTransitPort())
+                        && CommonUtils.isEmpty(vo.getTransitShipName()) && CommonUtils.isEmpty(vo.getTransitVoyage()))
+                .collect(Collectors.toList());
+        log.info("=================云纳中转港/中转船名/航次(三个字段都为空)的数据有{}条", noTransitInfoList.size());
+        List<ShipForHddzVO> withTransitInfoList = baseDataList
+                .stream().filter(vo -> !CommonUtils.isEmpty(vo.getTransitPort())
+                        && !CommonUtils.isEmpty(vo.getTransitShipName()) && !CommonUtils.isEmpty(vo.getTransitVoyage()))
+                .collect(Collectors.toList());
+        log.info("=================云纳中转港/中转船名/航次(三个字段都有值)的数据有{}条", withTransitInfoList.size());
+        shipList.addAll(noTransitInfoList);
+        shipList.addAll(withTransitInfoList);
+
+        List<YwHddz> ywbhList = new ArrayList<YwHddz>();
+        // 根据提单号+业务编号分组 ztdh|ywbh
+        Map<String, List<ShipForHddzVO>> basicMap = shipList.stream()
+                .collect(Collectors.groupingBy(e -> (e.getLoadingNumber() + "|" + e.getBusinessNo())));
+        for (Map.Entry<String, List<ShipForHddzVO>> entry : basicMap.entrySet()) {
+            // 分组后的每一组数据都对应列表的一条数据
+            String mapKey = entry.getKey();
+            List<ShipForHddzVO> mapList = entry.getValue();
+            if (!CommonUtils.isEmpty(mapList)) {
+                ShipForHddzVO list0 = mapList.get(0);
+                YwHddz ywbhVo = createShipForHddz(list0);
+                ywbhList.add(ywbhVo);
+            }
+        }
+
+        log.info("=======================符合更新yw_hddz表船司信息条件的有{}条", ywbhList.size());
+        try {
+            // 根据业务编号更新ATA、ETA、航次、卸货港区
+            if (!CommonUtils.isEmpty(ywbhList)) {
+                // 分组保存
+                List<List<YwHddz>> splitList = CommonUtils.splitList(ywbhList,
+                        CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+                for (int i = 0; i < splitList.size(); i++) {
+                    // shipPortMapper.updateShipInfoListForHddz(splitList.get(i));
+                    shipPortSgtMapper.updateShipInfoListForHddz(splitList.get(i));
+                }
+                List<String> businessNoList = ywbhList.stream().filter(vo -> !CommonUtils.isEmpty(vo.getYwbh()))
+                        .distinct().map(vo -> vo.getYwbh()).collect(Collectors.toList());
+                ywbhStrList.addAll(businessNoList);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new ShipPortDBException("updateHddzInfoForShip_error", "反写yw_hddz船司信息-数据库异常:" + e.getMessage());
+        }
+
+    }
+
+    /**
+     * 
+     * createShipForHddz(创建更新船司信息封装类)      
+     * @param list0
+     * @return  
+     * @return ShipForHddzVO  
+     * @Exception 异常对象    
+     * @author lixd  
+     * @date 2023-04-08 16:22:04
+     */
+    private YwHddz createShipForHddz(ShipForHddzVO list0) {
+        // 通过Builder方式获取对象
+        YwHddz ywbhVo = YwHddz.customizeBuilder().ztdh(list0.getLoadingNumber()).ywbh(list0.getBusinessNo())
+                .kcsj(list0.getActualSailingTime()).build();
+        // 云钠没有返回 中转港/中转船名/航次(三个字段都为空) 数据 清空
+        if (CommonUtils.isEmpty(list0.getTransitPort()) && CommonUtils.isEmpty(list0.getTransitShipName())
+                && CommonUtils.isEmpty(list0.getTransitVoyage())) {
+            ywbhVo.setZzgk("");
+            ywbhVo.setSfzy(CommonInfo.COMMON_N);
+            ywbhVo.setZzCm("");
+            ywbhVo.setZzHcorhbh("");
+        } else if (!CommonUtils.isEmpty(list0.getTransitPort()) && !CommonUtils.isEmpty(list0.getTransitShipName())
+                && !CommonUtils.isEmpty(list0.getTransitVoyage())) {
+            // 云钠返回中转港/中转船名/航次(三个字段都有值)，与水果通 船名/航次不一致或者水果通无信息 直接反写
+            ywbhVo.setZzgk(list0.getTransitPort());
+            ywbhVo.setSfzy(CommonInfo.COMMON_Y);
+            ywbhVo.setZzCm(list0.getTransitShipName());
+            ywbhVo.setZzHcorhbh(list0.getTransitVoyage());
+        }
+
+        return ywbhVo;
+    }
+
+    /**
+     * updateHddzEtaForShip(更新ETA>72h信息)  
+     * @param baseDataList
+     * @param etaStatusList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:56:54  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional
+    @Override
+    public void updateHddzEtaForShip(List<ShipForHddzVO> baseDataList, List<YwHddz> etaStatusList) {
+
+        List<ShipForHddzVO> withEtaList = baseDataList.stream()
+                .filter(vo -> !CommonUtils.isEmpty(vo.getExpectArrivalTime())).collect(Collectors.toList());
+        log.info("=================云纳ETA有值的数据有{}条", withEtaList.size());
+
+        List<ShipForHddzVO> eta72List = baseDataList.stream().filter(vo -> vo.getHours() > 72)
+                .collect(Collectors.toList());
+        log.info("=================云纳ETA>72h的数据有{}条", eta72List.size());
+
+        /**
+         *  预计靠港时间判断
+         *  ETA减当前返回数据时间大于72小时：提单号不同的 船名目的港相同 查到的ETA则反写(以大于当天数据返回时间(crtTime)的最早ETA时间反写）：
+         *  ETA减当前返回数据时间小于等于72小时：ETA则不反写，以港口ETA为准反写
+         *  ETA时间减当前时间（精确到天）小于0：ETA 不反写
+         */
+        List<YwHddz> ywbhList = new ArrayList<YwHddz>();
+
+        // 船名|目的港 分组
+        Map<String, List<ShipForHddzVO>> basicMap = withEtaList.stream()
+                .collect(Collectors.groupingBy(e -> (e.getShipName() + "|" + e.getDestinationPort())));
+        for (Map.Entry<String, List<ShipForHddzVO>> entry : basicMap.entrySet()) {
+            // 分组后的每一组数据都对应列表的一条数据
+            String mapKey = entry.getKey();
+            List<ShipForHddzVO> mapList = entry.getValue();
+
+            if (!CommonUtils.isEmpty(mapList)) {
+                // 过滤掉ETA < 当前时间的数据， 取最小值
+                Optional<ShipForHddzVO> min = mapList.stream()
+                        .filter(e -> DateUtils.checkStartAndEndDate(DateUtils.Date2String(e.getCrtTime()),
+                                DateUtils.Date2String(e.getExpectArrivalTime())))
+                        .min(Comparator.comparing(ShipForHddzVO::getExpectArrivalTime));
+
+                if (min.isPresent() && min.get().getExpectArrivalTime() != null) {
+                    ShipForHddzVO minEta = min.get();
+                    log.debug("@@@@@@@@@@@@@@@@@@@@@ ywbh={}, 最小ETA= {} ", minEta.getBusinessNo(),
+                            DateUtils.Date2String(minEta.getExpectArrivalTime()));
+
+                    for (ShipForHddzVO eta72 : eta72List) {
+                        if (minEta.getShipName().equals(eta72.getShipName())
+                                && minEta.getDestinationPort().equals(eta72.getDestinationPort())) {
+                            // 将最小ETA放进来，根据业务编号更新ETA
+                            // 通过Builder方式创建对象
+                            YwHddz yh = YwHddz.customizeBuilder().ywbh(eta72.getBusinessNo())
+                                    .yjkgsj(minEta.getExpectArrivalTime()).build();
+                            ywbhList.add(yh);
+                        }
+                    }
+                }
+            }
+        }
+        log.info("=======================符合更新yw_hddz表ETA信息的有{}条", ywbhList.size());
+        try {
+            // 根据业务编号更新ETA
+            if (!CommonUtils.isEmpty(ywbhList)) {
+                // 分组保存
+                List<List<YwHddz>> splitList = CommonUtils.splitList(ywbhList,
+                        CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+                for (int i = 0; i < splitList.size(); i++) {
+                    // shipPortMapper.updateShipEtaListForHddz(splitList.get(i));
+                    shipPortSgtMapper.updateShipEtaListForHddz(splitList.get(i));
+                }
+                etaStatusList.addAll(ywbhList);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new ShipPortDBException("updateHddzEtaForShip_error", "反写yw_hddz船司ETA信息-数据库异常:" + e.getMessage());
+        }
+
+    }
+
+    /**
+     * updateHddzInfoForPort(港口更新数据)  
+     * @param baseDataList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午4:26:28  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional
+    @Override
+    public void updateHddzInfoForPort(List<PortForHddzVO> baseDataList) {
+
+        List<YwHddz> ywbhList = new ArrayList<YwHddz>();
+        //
+        // 根据提单号+业务编号分组 ztdh|ywbh
+        Map<String, List<PortForHddzVO>> basicMap = baseDataList.stream()
+                .collect(Collectors.groupingBy(e -> (e.getLoadingNumber() + "|" + e.getBusinessNo())));
+        for (Map.Entry<String, List<PortForHddzVO>> entry : basicMap.entrySet()) {
+
+            // 分组后的每一组数据都对应列表的一条数据
+            String mapKey = entry.getKey();
+            List<PortForHddzVO> mapList = entry.getValue();
+
+            if (!CommonUtils.isEmpty(mapList)) {
+                PortForHddzVO list0 = mapList.get(0);
+                // 通过Builder方式创建对象
+                YwHddz yh = YwHddz.customizeBuilder().ywbh(list0.getBusinessNo()).ztdh(list0.getLoadingNumber())
+                        .yjkgsj(list0.getNewExpectArrivalTime()).sjkgsj(list0.getActualPortTime())
+                        .hcorhbh(list0.getVoyage()).zzHcorhbh(list0.getZzHcorhbh())
+                        .xhgq(list0.getUnloadingPortFullName()).xhgqjc(list0.getUnloadingPortShortName())
+                        .xhgqbm(list0.getUnloadingPortCode()).build();
+
+                ywbhList.add(yh);
+
+            }
+        }
+
+        log.info("=======================符合更新yw_hddz表港口信息条件的有{}条", ywbhList.size());
+        try {
+            // 根据业务编号更新ATA、ETA、航次、卸货港区
+            if (!CommonUtils.isEmpty(ywbhList)) {
+                // 分组保存
+                List<List<YwHddz>> splitList = CommonUtils.splitList(ywbhList,
+                        CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+                for (int i = 0; i < splitList.size(); i++) {
+                    // shipPortMapper.updatePortInfoListForHddz(splitList.get(i));
+                    shipPortSgtMapper.updatePortInfoListForHddz(splitList.get(i));
+                }
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+
+            throw new ShipPortDBException("updateHddzInfoForPort_error", "反写yw_hddz港口信息-数据库异常:" + e.getMessage());
+        }
+
+    }
+
+    /**
+     * updateContainerNoInfoForPort(更新集装箱表港口相关信息)  
+     * @param baseDataList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午4:32:16  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional
+    @Override
+    public void updateContainerNoInfoForPort(List<PortForHddzVO> baseDataList) {
+
+        // 要更新卸船时间的list
+        // List<PortForHddzVO> jzxhList = new ArrayList<PortForHddzVO>();
+        List<YwHddzJzxxx> jzxhList = new ArrayList<YwHddzJzxxx>();
+        List<PortForHddzVO> withUnloadingTimeList = baseDataList.stream()
+                .filter(vo -> !CommonUtils.isEmpty(vo.getUnloadingTime())).collect(Collectors.toList());
+        log.info("=================有卸船时间的数据有{}条", withUnloadingTimeList.size());
+
+        // 根据业务编号+集装箱号分组 ywbh|jzxh
+        Map<String, List<PortForHddzVO>> basicMap = withUnloadingTimeList.stream()
+                .collect(Collectors.groupingBy(e -> (e.getBusinessNo() + "|" + e.getContainerNumber())));
+        for (Map.Entry<String, List<PortForHddzVO>> entry : basicMap.entrySet()) {
+
+            // 分组后的每一组数据都对应列表的一条数据
+            String mapKey = entry.getKey();
+            List<PortForHddzVO> mapList = entry.getValue();
+
+            if (!CommonUtils.isEmpty(mapList)) {
+                PortForHddzVO list0 = mapList.get(0);
+
+                // YwHddzJzxxx jzx = new YwHddzJzxxx();
+                // jzx.setYwbh(list0.getBusinessNo());
+                // jzx.setJzxh(list0.getContainerNumber());
+                // jzx.setXcsj(list0.getUnloadingTime());
+                // 通过Builder方式创建对象
+                YwHddzJzxxx jzx = YwHddzJzxxx.customizeBuilder().ywbh(list0.getBusinessNo())
+                        .jzxh(list0.getContainerNumber()).xcsj(list0.getUnloadingTime()).build();
+                jzxhList.add(jzx);
+
+                /**PortForHddzVO jzxhVo = new PortForHddzVO();
+                try {
+                    BeanUtils.copyProperties(jzxhVo, list0);
+                } catch (IllegalAccessException | InvocationTargetException e1) {
+                    e1.printStackTrace();
+                }
+                
+                jzxhVo.setBusinessNo(list0.getBusinessNo());
+                jzxhVo.setContainerNumber(list0.getContainerNumber());
+                jzxhVo.setUnloadingTime(list0.getUnloadingTime());
+                
+                jzxhList.add(jzxhVo);*/
+            }
+        }
+
+        log.info("=======================符合更新yw_hddz_jzxxx表港口信息条件的有{}条", jzxhList.size());
+        try {
+            // 根据业务编号+集装箱号更新卸船时间
+            if (!CommonUtils.isEmpty(jzxhList)) {
+                // 分组保存
+                List<List<YwHddzJzxxx>> splitList = CommonUtils.splitList(jzxhList,
+                        CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+                for (int i = 0; i < splitList.size(); i++) {
+                    // shipPortMapper.updatePortInfoListForJzxh(splitList.get(i));
+                    shipPortSgtMapper.updatePortInfoListForJzxh(splitList.get(i));
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new ShipPortDBException("updateContainerNoInfoForPort_error",
+                    "反写yw_hddz_jzxxx港口信息-数据库异常:" + e.getMessage());
+        }
+
+    }
+
+    @Transactional
+    @Override
+    public void updatetest() {
+        shipPortSgtMapper.updatetest();
+        // ywHddzMapper.insertSelective(YwHddz.customizeBuilder().ywbh("0001").build());
+        // throw new BaseException("shiwutest_error",
+        // "哎呀，报错了.....shipPortSgtMapper");
+
+    }
+
+    /**
+     * updateShipInfoListForHddzSingle(更新船司信息)  
+     * @param ywHddz
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午3:44:12  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
+    @Override
+    public void updateShipInfoListForHddzSingle(YwHddz ywHddz, String batchNo) {
+        try {
+            shipPortSgtMapper.updateShipInfoListForHddzSingle(ywHddz);
+        } catch (Exception e) {
+            e.printStackTrace();
+            // 记录异常日志后继续执行
+            fruitShipPortService.saveShipPortError(CommonInfo.ERROR_CODE_DATABASE, "",
+                    "保存数据库异常:" + CommonInfo.SHIP_ERROR_YWBH + ywHddz.getYwbh() + CommonInfo.SHIP_ERROR_BATCH + batchNo);
+        }
+
+    }
+
+    /**
+     * updateShipEtaListForHddzSingle(更新ETA>72h信息)  
+     * @param ywHddz
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午4:22:41  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
+    @Override
+    public void updateShipEtaListForHddzSingle(YwHddz ywHddz, String batchNo) {
+        try {
+            shipPortSgtMapper.updateShipEtaListForHddzSingle(ywHddz);
+        } catch (Exception e) {
+            e.printStackTrace();
+            // 捕获异常后， 记录日志继续执行
+            fruitShipPortService.saveShipPortError(CommonInfo.ERROR_CODE_DATABASE, "",
+                    "保存数据库异常:" + CommonInfo.SHIP_ERROR_YWBH + ywHddz.getYwbh() + CommonInfo.SHIP_ERROR_BATCH + batchNo);
+        }
+    }
+
+    /**
+     * updatePortInfoListForHddzSingle(更新港口数据)  
+     * @param ywHddz
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午4:44:35  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
+    @Override
+    public void updatePortInfoListForHddzSingle(YwHddz ywHddz, String batchNo) {
+        try {
+            shipPortSgtMapper.updatePortInfoListForHddzSingle(ywHddz);
+        } catch (Exception e) {
+            e.printStackTrace();
+            // 捕获异常后， 记录日志继续执行
+            fruitShipPortService.saveShipPortError(CommonInfo.ERROR_CODE_DATABASE, "",
+                    "保存数据库异常:" + CommonInfo.SHIP_ERROR_YWBH + ywHddz.getYwbh() + CommonInfo.SHIP_ERROR_BATCH + batchNo);
+        }
+
+    }
+
+    /**
+     * updateContainerNoInfoForPortSingle(更新集装箱号)  
+     * @param ywHddzJzxxx
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午5:02:08  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
+    @Override
+    public void updateContainerNoInfoForPortSingle(YwHddzJzxxx ywHddzJzxxx, String batchNo) {
+        try {
+            shipPortSgtMapper.updatePortInfoListForJzxhSingle(ywHddzJzxxx);
+        } catch (Exception e) {
+            e.printStackTrace();
+            // 捕获异常后， 记录日志继续执行
+            fruitShipPortService.saveShipPortError(CommonInfo.ERROR_CODE_DATABASE, "",
+                    "保存数据库异常:" + CommonInfo.SHIP_ERROR_YWBH + ywHddzJzxxx.getYwbh() + " " + ywHddzJzxxx.getJzxh()
+                            + CommonInfo.SHIP_ERROR_BATCH + batchNo);
+        }
+    }
+}
Index: yunna/src/main/java/com/freshport/service/impl/ShipServiceImpl.java
===================================================================
--- yunna/src/main/java/com/freshport/service/impl/ShipServiceImpl.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/service/impl/ShipServiceImpl.java	(revision 33933)
@@ -14,6 +14,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
+import java.util.TreeSet;
 import java.util.stream.Collectors;
 
 import javax.annotation.Resource;
@@ -24,12 +25,17 @@
 
 import com.alibaba.fastjson.JSONObject;
 import com.freshport.dao.ShipPortMapper;
+import com.freshport.dao.YwShipCompanyMapper;
 import com.freshport.dao.YwShipPortResultMapper;
 import com.freshport.entity.YwHddz;
+import com.freshport.entity.YwHddzYunna;
+import com.freshport.entity.YwShipCompany;
 import com.freshport.entity.YwShipPortResult;
 import com.freshport.entity.yunna.LoadingNumberResultVO;
 import com.freshport.entity.yunna.ShipForHddzVO;
+import com.freshport.fdao.ShipPortSgtMapper;
 import com.freshport.service.FruitShipPortService;
+import com.freshport.service.SgtDataService;
 import com.freshport.service.ShipService;
 import com.freshport.util.CommonInfo;
 import com.freshport.util.CommonUtils;
@@ -68,23 +74,119 @@
     @Resource
     private FruitShipPortService fruitShipPortService;
 
+    @Resource
+    private ShipPortSgtMapper shipPortSgtMapper;
+
+    @Resource
+    private SgtDataService sgtDataService;
+
+    @Resource
+    private YwShipCompanyMapper ywShipCompanyMapper;
+
+    /**
+     * 
+     * queryLoadingNumberInfoList(查询船司提单号类型信息- 制单时间<=调用接口时间的数据)
+     * @return  
+     * @return List<LoadingNumberResultVO>  
+     * @Exception 异常对象    
+     * @author lixd  
+     * @date 2023-03-15 13:52:58
+     */
     @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)
     @Override
-    public List<LoadingNumberResultVO> queryLoadingNumberInfoList() {
-        return shipPortMapper.listLoadingNumberForShip();
+    public List<LoadingNumberResultVO> queryLoadingNumberInfoList(String type) {
+        // return shipPortMapper.listLoadingNumberForShip();
+        List<LoadingNumberResultVO> result = new ArrayList<LoadingNumberResultVO>();
+        // 获取所有船公司映射数据
+        List<YwShipCompany> companyList = ywShipCompanyMapper.queryAll();
+        // 将原先的一个大SQL拆分多多个小SQL， 每个查询完成后再根据条件过滤 --第一部分 按集装箱维护获取中外运数据
+        List<LoadingNumberResultVO> oneList = shipPortSgtMapper.listLoadingNumberForShipConOne(type);
+        // 过滤出中外运数据
+        List<YwShipCompany> sinoList = companyList.stream()
+                .filter(c -> c.getCarrierCode().equals(CommonInfo.SHIP_COMPANY_SINO)).collect(Collectors.toList());
+        // 获取中外运对应的水果通全称
+        List<String> fullNameList = sinoList.stream().map(s -> s.getFruitCarrierFullName()).distinct()
+                .collect(Collectors.toList());
+        if (!CommonUtils.isEmpty(oneList)) {
+            for (LoadingNumberResultVO vo : oneList) {
+                if (fullNameList.contains(vo.getCarrier())) {
+                    // 如果查询数据承运人是， 则放到集合中
+                    vo.setFirmName(CommonInfo.SHIP_COMPANY_SINO);
+                    result.add(vo);
+                }
+            }
+        }
+        // 将原先的一个大SQL拆分多多个小SQL， 每个查询完成后再根据条件过滤 --第二部分 按提单维度获取香港数据，关联所有船公司
+        List<LoadingNumberResultVO> twoList = shipPortSgtMapper.listLoadingNumberForShipConTwo(type);
+        List<String> allFullNameList = companyList.stream().map(s -> s.getFruitCarrierFullName()).distinct()
+                .collect(Collectors.toList());
+        if (!CommonUtils.isEmpty(twoList)) {
+            for (LoadingNumberResultVO vo : twoList) {
+                if (allFullNameList.contains(vo.getCarrier())) {
+                    // 如果查询数据承运人是， 则放到集合中
+                    YwShipCompany tmpCom = companyList.stream()
+                            .filter(b -> b.getFruitCarrierFullName().equals(vo.getCarrier())).findAny().orElse(null);
+                    vo.setFirmName(tmpCom.getCarrierCode());
+                    result.add(vo);
+                } else {
+                    System.out.println("++++++++++++++ " + vo.getBusinessNo() + " --  " + vo.getCarrier());
+                }
+            }
+        }
+        // 将原先的一个大SQL拆分多多个小SQL， 每个查询完成后再根据条件过滤 --第三部分 按提单维度获取不是香港，不是中外运数据
+        List<LoadingNumberResultVO> threeList = shipPortSgtMapper.listLoadingNumberForShipConThree(type);
+        if (!CommonUtils.isEmpty(threeList)) {
+            for (LoadingNumberResultVO vo : threeList) {
+                System.out.println("------ " + vo.getCarrier());
+                if (!CommonUtils.isEmpty(vo.getCarrier()) && !fullNameList.contains(vo.getCarrier())
+                        && allFullNameList.contains(vo.getCarrier())) {
+                    YwShipCompany tmpCom = companyList.stream()
+                            .filter(b -> b.getFruitCarrierFullName().equals(vo.getCarrier())).findAny().orElse(null);
+                    vo.setFirmName(tmpCom.getCarrierCode());
+                    result.add(vo);
+                }
+            }
+        }
+        log.error(" 处理前的条数：" + result.size());
+        // 上面数据处理完成后，再把数据去重
+        if (!CommonUtils.isEmpty(result)) {
+            List<LoadingNumberResultVO> setList = result.stream()
+                    .collect(Collectors.collectingAndThen(
+                            Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(re -> re.getLoadingNumber()
+                                    + ";" + re.getContainerNumber() + "" + re.getBusinessNo() + ""
+                                    + re.getDestinationPort() + "" + re.getShipName() + "" + re.getTransitShipName()
+                                    + "" + re.getFirmName() + "" + re.getBatchNo() + "" + re.getCarrier()))),
+                            ArrayList::new));
+            log.error("最终处理后的条数：" + setList.size());
+            return setList;
+        }
+
+        return result;
     }
 
+    /**
+     * 改方法作废， 合并到queryLoadingNumberInfoList中
+     */
     @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)
     @Override
+    @Deprecated
     public List<LoadingNumberResultVO> queryLoadingNumberInfoListForTmp() {
-        return shipPortMapper.listLoadingNumberForShipTmp();
+        // return shipPortMapper.listLoadingNumberForShipTmp();
+        return shipPortSgtMapper.listLoadingNumberForShipTmp();
     }
 
+    @Deprecated
     @Transactional(propagation = Propagation.REQUIRES_NEW)
     @Override
     public void updateHddzAndWarnningInfo(String batchNo) {
 
-        List<ShipForHddzVO> baseDataList = shipPortMapper.listShipInfoForHddz(batchNo);
+        // List<ShipForHddzVO> baseDataList =
+        // shipPortMapper.listShipInfoForHddz(batchNo);
+        // 根据批次号从云娜库获取数据
+        List<ShipForHddzVO> baseDataList = shipPortMapper.listShipInfoForHddzNew(batchNo);
+        // 从水果通查询船名目的港后拼接到baseDataList中
+        assembleShipForHddzVO(baseDataList);
+
         log.info("===========SHIP-batchNo={}, 总list.size={}", batchNo, baseDataList.size());
         // 要更新回写状态的业务编号list
         List<String> totalBusinessNoStrList = new ArrayList<String>();
@@ -98,19 +200,56 @@
         // 获取符合更新条件的数据，更新中转港口信息
         if (!CommonUtils.isEmpty(sameShipList)) {
             // 1. 更新货代单证表船司相关字段信息(中转港、开船时间)
-            shipService.updateHddzInfoForShip(sameShipList, totalBusinessNoStrList);
-
+            // shipService.updateHddzInfoForShip(sameShipList,
+            // totalBusinessNoStrList);
+            sgtDataService.updateHddzInfoForShip(sameShipList, totalBusinessNoStrList);
             // 2. 中转港信息状态反写
             shipService.updateShipResultUpdStatus(totalBusinessNoStrList, batchNo);
         }
 
         // 3. 更新ETA>72h信息
-        shipService.updateHddzEtaForShip(baseDataList, etaStatusList);
-
+        // shipService.updateHddzEtaForShip(baseDataList, etaStatusList);
+        sgtDataService.updateHddzEtaForShip(baseDataList, etaStatusList);
         // 4. eta更新状态反写
         shipService.updateShipResultEtaStatus(etaStatusList, batchNo);
     }
 
+    /**
+     * assembleShipForHddzVO(从水果通查询船名目的港后拼接到baseDataList中)  
+     * 之前查询数据时直接关联货代单证，现在分库后需要重新查一边
+     * @param baseDataList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:45:50  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    private void assembleShipForHddzVO(List<ShipForHddzVO> baseDataList) {
+        // 获取业务编号， 去重
+        List<String> ywbhResultList = baseDataList.stream().map(s -> s.getBusinessNo()).distinct()
+                .collect(Collectors.toList());
+        // 根据业务编号获取对应的船名，目的港
+        List<YwHddzYunna> cmmdgList = new ArrayList<YwHddzYunna>();
+        List<List<String>> splitList = CommonUtils.splitList(ywbhResultList,
+                CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+        for (int i = 0; i < splitList.size(); i++) {
+            List<YwHddzYunna> cmmdgTempList = sgtDataService.queryCmAndMdgAndZzList(splitList.get(i));
+            if (!CommonUtils.isEmpty(cmmdgTempList)) {
+                cmmdgList.addAll(cmmdgTempList);
+            }
+        }
+        // 将从水果通查询出的船名目的港添加到从云娜查询出的数据中，
+        for (ShipForHddzVO vo : baseDataList) {
+            YwHddzYunna yn = cmmdgList.stream().filter(b -> b.getYwbh().equals(vo.getBusinessNo())).findAny()
+                    .orElse(null);
+            if (!CommonUtils.isEmpty(yn)) {
+                vo.setLadingShipName(yn.getCm());
+                vo.setMdg(yn.getMdg());
+            }
+
+        }
+    }
+
     @Transactional
     @Override
     public void updateShipResultEtaStatus(List<YwHddz> etaStatusList, String batchNo) {
Index: yunna/src/main/java/com/freshport/service/impl/YunnaPortServiceImpl.java
===================================================================
--- yunna/src/main/java/com/freshport/service/impl/YunnaPortServiceImpl.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/service/impl/YunnaPortServiceImpl.java	(revision 33933)
@@ -0,0 +1,268 @@
+package com.freshport.service.impl;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.freshport.dao.ShipPortMapper;
+import com.freshport.dao.YwShipPortResultMapper;
+import com.freshport.entity.YwHddz;
+import com.freshport.entity.YwHddzJzxxx;
+import com.freshport.entity.YwHddzYunna;
+import com.freshport.entity.YwShipPortResult;
+import com.freshport.entity.yunna.PortForHddzVO;
+import com.freshport.service.FruitShipPortService;
+import com.freshport.service.SgtDataService;
+import com.freshport.service.YunnaPortService;
+import com.freshport.util.CommonInfo;
+import com.freshport.util.CommonUtils;
+import com.freshport.util.DateUtils;
+
+@Service("yunnaPortService")
+public class YunnaPortServiceImpl implements YunnaPortService {
+
+    @Resource
+    private ShipPortMapper shipPortMapper;
+
+    @Resource
+    private SgtDataService sgtDataService;
+
+    @Resource
+    private YunnaPortService yunnaPortService;
+
+    @Resource
+    private YwShipPortResultMapper ywShipPortResultMapper;
+
+    @Resource
+    private FruitShipPortService fruitShipPortService;
+
+    /**
+     * handleDate(根据批次号处理数据)  
+     * @param batchNo
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午2:47:40  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional
+    @Override
+    public void handleDate(String batchNo) {
+        /**
+         *  港口查询到的航次是反写水果通规则：如果水果通里航次有值就直接反写航次，如果水果通航次无值就直接反写提单航次/航班号 字段；
+         *  卸货港区：做映射表后对就反写，没有的就预警出来追加(放bi了)
+         */
+        List<PortForHddzVO> baseDataList = shipPortMapper.listPortInfoForHddzNew(batchNo);
+        // 拼接目的港和中转航次
+        assemblePortForHddzVO(baseDataList);
+
+        if (!CommonUtils.isEmpty(baseDataList)) {
+            // 循环处理ETA和上海抵锚时间
+            for (int i = 0; i < baseDataList.size(); i++) {
+                PortForHddzVO vo = baseDataList.get(i);
+                // 目的港为上海，处理ETA和上海实际抵锚时间 ETA和抵锚时间，两个取最晚的时间
+                if (CommonInfo.PORT_SH.equals(vo.getDestinationPort())) {
+                    vo.setNewExpectArrivalTime(handleActualAnchorageTime(vo));
+                } else {
+                    vo.setNewExpectArrivalTime(vo.getExpectArrivalTime());
+                }
+            }
+            // 1. 更新货代单证表港口相关字段信息
+            // 方法拆分， 将处理数据与更新数据库分离
+            List<YwHddz> ywbhList = handleHddzInfoForPort(baseDataList);
+            for (YwHddz ywHddz : ywbhList) {
+                sgtDataService.updatePortInfoListForHddzSingle(ywHddz, batchNo);
+            }
+
+            // 2. 更新集装箱表港口相关信息
+            // 方法拆分， 将处理数据与更新数据库分离
+            List<YwHddzJzxxx> jzxhList = handleContainerNoInfoForPort(baseDataList);
+            for (YwHddzJzxxx ywHddzJzxxx : jzxhList) {
+                sgtDataService.updateContainerNoInfoForPortSingle(ywHddzJzxxx, batchNo);
+            }
+            // 3. 批量修改回传结果表数据反写状态
+            for (PortForHddzVO pvo : baseDataList) {
+                yunnaPortService.updatePortResultUpdStatusSingle(pvo, batchNo);
+            }
+
+        }
+    }
+
+    /**
+     * handleContainerNoInfoForPort(处理集装箱数据)  
+     * @param baseDataList
+     * @return List<YwHddzJzxxx>
+     * @author wuwenjin
+     * @date 2023年4月21日 下午5:00:15  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    private List<YwHddzJzxxx> handleContainerNoInfoForPort(List<PortForHddzVO> baseDataList) {
+
+        // 要更新卸船时间的list
+        List<YwHddzJzxxx> jzxhList = new ArrayList<YwHddzJzxxx>();
+        List<PortForHddzVO> withUnloadingTimeList = baseDataList.stream()
+                .filter(vo -> !CommonUtils.isEmpty(vo.getUnloadingTime())).collect(Collectors.toList());
+
+        // 根据业务编号+集装箱号分组 ywbh|jzxh
+        Map<String, List<PortForHddzVO>> basicMap = withUnloadingTimeList.stream()
+                .collect(Collectors.groupingBy(e -> (e.getBusinessNo() + "|" + e.getContainerNumber())));
+        for (Map.Entry<String, List<PortForHddzVO>> entry : basicMap.entrySet()) {
+
+            // 分组后的每一组数据都对应列表的一条数据
+            String mapKey = entry.getKey();
+            List<PortForHddzVO> mapList = entry.getValue();
+
+            if (!CommonUtils.isEmpty(mapList)) {
+                PortForHddzVO list0 = mapList.get(0);
+                // 通过Builder方式创建对象
+                YwHddzJzxxx jzx = YwHddzJzxxx.customizeBuilder().ywbh(list0.getBusinessNo())
+                        .jzxh(list0.getContainerNumber()).xcsj(list0.getUnloadingTime()).build();
+                jzxhList.add(jzx);
+            }
+        }
+        return jzxhList;
+    }
+
+    /**
+     * handleHddzInfoForPort(数据处理)  
+     * @param baseDataList
+     * @return List<YwHddz>
+     * @author wuwenjin
+     * @date 2023年4月21日 下午4:41:41  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    private List<YwHddz> handleHddzInfoForPort(List<PortForHddzVO> baseDataList) {
+
+        List<YwHddz> ywbhList = new ArrayList<YwHddz>();
+        // 根据提单号+业务编号分组 ztdh|ywbh
+        Map<String, List<PortForHddzVO>> basicMap = baseDataList.stream()
+                .collect(Collectors.groupingBy(e -> (e.getLoadingNumber() + "|" + e.getBusinessNo())));
+        for (Map.Entry<String, List<PortForHddzVO>> entry : basicMap.entrySet()) {
+            // 分组后的每一组数据都对应列表的一条数据
+            String mapKey = entry.getKey();
+            List<PortForHddzVO> mapList = entry.getValue();
+            if (!CommonUtils.isEmpty(mapList)) {
+                PortForHddzVO list0 = mapList.get(0);
+                // 通过Builder方式创建对象
+                YwHddz yh = YwHddz.customizeBuilder().ywbh(list0.getBusinessNo()).ztdh(list0.getLoadingNumber())
+                        .yjkgsj(list0.getNewExpectArrivalTime()).sjkgsj(list0.getActualPortTime())
+                        .hcorhbh(list0.getVoyage()).zzHcorhbh(list0.getZzHcorhbh())
+                        .xhgq(list0.getUnloadingPortFullName()).xhgqjc(list0.getUnloadingPortShortName())
+                        .xhgqbm(list0.getUnloadingPortCode()).build();
+                ywbhList.add(yh);
+            }
+        }
+        return ywbhList;
+    }
+
+    /**
+     * 
+     * handleActualAnchorageTime(处理上海 预计靠港时间 和抵锚时间的关系)     
+     * ETA（预计靠港时间）反写规则：
+     *              上海实际抵锚地时间 早于等于抓取 ETA 或者 上海实际抵锚地时间为空，抓取的ETA直接反写；
+     *              上海实际抵锚地时间 晚于ETA 或者抓取的ETA为空，用上海实际抵锚地时间反写ETA；
+     * @param vo
+     * @return  
+     * @return Date  
+     * @Exception 异常对象    
+     * @author lixd  
+     * @date 2023-03-20 09:53:43
+     */
+    private static Date handleActualAnchorageTime(PortForHddzVO vo) {
+
+        // 上海实际抵锚地时间为空，ETA = ETA
+        if (CommonUtils.isEmpty(vo.getActualAnchorageTime())) {
+            return vo.getExpectArrivalTime();
+        }
+
+        // ETA为空, ETA = 上海实际抵锚时间
+        if (CommonUtils.isEmpty(vo.getExpectArrivalTime())) {
+            return vo.getActualAnchorageTime();
+        }
+
+        /**
+         *  ETA/抵锚时间 都不为空， 
+         *      抵锚时间 <= ETA, ETA = ETA;
+         *      抵锚时间 > ETA, ETA = 抵锚时间
+         */
+        if (!CommonUtils.isEmpty(vo.getExpectArrivalTime()) && !CommonUtils.isEmpty(vo.getActualAnchorageTime())) {
+            String eta = DateUtils.Date2String(vo.getExpectArrivalTime());
+            String dmsj = DateUtils.Date2String(vo.getActualAnchorageTime());
+
+            return DateUtils.checkStartAndEndDate(eta, dmsj) ? vo.getActualAnchorageTime() : vo.getExpectArrivalTime();
+        }
+        return null;
+    }
+
+    /**
+     * assemblePortForHddzVO(从水果通查询中转航次目的港后拼接到baseDataList中)  
+     * 之前查询数据时直接关联货代单证，现在分库后需要重新查一边
+     * @param baseDataList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:45:50  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    private void assemblePortForHddzVO(List<PortForHddzVO> baseDataList) {
+        // 获取业务编号， 去重
+        List<String> ywbhResultList = baseDataList.stream().map(s -> s.getBusinessNo()).distinct()
+                .collect(Collectors.toList());
+        // 根据业务编号获取对应的目的港中转航次
+        List<YwHddzYunna> zzmdgList = new ArrayList<YwHddzYunna>();
+        List<List<String>> splitList = CommonUtils.splitList(ywbhResultList,
+                CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+        for (int i = 0; i < splitList.size(); i++) {
+            List<YwHddzYunna> zzmdgTempList = sgtDataService.queryCmAndMdgAndZzList(splitList.get(i));
+            if (!CommonUtils.isEmpty(zzmdgTempList)) {
+                zzmdgList.addAll(zzmdgTempList);
+            }
+        }
+        // 将从水果通查询出的船名目的港添加到从云娜查询出的数据中，
+        for (PortForHddzVO vo : baseDataList) {
+            YwHddzYunna yn = zzmdgList.stream().filter(b -> b.getYwbh().equals(vo.getBusinessNo())).findAny()
+                    .orElse(null);
+            if (!CommonUtils.isEmpty(yn)) {
+                vo.setDestinationPort(yn.getMdg());
+                vo.setZzHcorhbh(yn.getZzHcorhbh());
+            }
+        }
+    }
+
+    /**
+     * updatePortResultUpdStatusSingle(港口更新云娜数据)  
+     * @param pvo
+     * @param batchNo
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午5:09:26  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
+    @Override
+    public void updatePortResultUpdStatusSingle(PortForHddzVO pvo, String batchNo) {
+        YwShipPortResult ysr = new YwShipPortResult();
+        ysr.setNewEtaTime(pvo.getNewExpectArrivalTime());
+        ysr.setBusinessNo(pvo.getBusinessNo());
+        ysr.setBatchNo(pvo.getBatchNo());
+        try {
+            ywShipPortResultMapper.updateUpdStatusAndNewEtaTimeForPortSingle(ysr);
+        } catch (Exception e) {
+            e.printStackTrace();
+            // 记录异常日志后继续执行
+            fruitShipPortService.saveShipPortError(CommonInfo.ERROR_CODE_DATABASE, "", "保存数据库异常:"
+                    + CommonInfo.SHIP_ERROR_YUNNA_YWBH + pvo.getBusinessNo() + CommonInfo.SHIP_ERROR_BATCH + batchNo);
+        }
+    }
+}
Index: yunna/src/main/java/com/freshport/service/impl/YunnaShipServiceImpl.java
===================================================================
--- yunna/src/main/java/com/freshport/service/impl/YunnaShipServiceImpl.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/service/impl/YunnaShipServiceImpl.java	(revision 33933)
@@ -0,0 +1,321 @@
+package com.freshport.service.impl;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.freshport.dao.ShipPortMapper;
+import com.freshport.dao.YwShipPortResultMapper;
+import com.freshport.entity.YwHddz;
+import com.freshport.entity.YwHddzYunna;
+import com.freshport.entity.YwShipPortResult;
+import com.freshport.entity.yunna.ShipForHddzVO;
+import com.freshport.fdao.ShipPortSgtMapper;
+import com.freshport.service.FruitShipPortService;
+import com.freshport.service.SgtDataService;
+import com.freshport.service.ShipService;
+import com.freshport.service.YunnaShipService;
+import com.freshport.util.CommonInfo;
+import com.freshport.util.CommonUtils;
+import com.freshport.util.DateUtils;
+
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+@Service("yunnaShipService")
+public class YunnaShipServiceImpl implements YunnaShipService {
+    @Resource
+    private ShipPortMapper shipPortMapper;
+
+    @Resource
+    private SgtDataService sgtDataService;
+
+    @Resource
+    private ShipService shipService;
+
+    @Resource
+    private ShipPortSgtMapper shipPortSgtMapper;
+
+    @Resource
+    private YunnaShipService yunnaShipService;
+
+    @Resource
+    private YwShipPortResultMapper ywShipPortResultMapper;
+
+    @Resource
+    private FruitShipPortService fruitShipPortService;
+
+    /**
+     * handleDate(根据批次号处理数据)  
+     * @param batchNo
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午2:46:57  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional
+    @Override
+    public void handleDate(String batchNo) {
+        // 根据批次号从云娜库获取数据
+        List<ShipForHddzVO> baseDataList = shipPortMapper.listShipInfoForHddzNew(batchNo);
+        // 从水果通查询船名目的港后拼接到baseDataList中
+        assembleShipForHddzVO(baseDataList);
+        // 云纳船名/目的港和水果通目的港/提单船名一样的数据
+        List<ShipForHddzVO> sameShipList = baseDataList.stream().filter(
+                vo -> vo.getShipName().equals(vo.getLadingShipName()) && vo.getDestinationPort().equals(vo.getMdg()))
+                .collect(Collectors.toList());
+
+        // 获取符合更新条件的数据，更新中转港口信息
+        if (!CommonUtils.isEmpty(sameShipList)) {
+            // 1. 更新货代单证表船司相关字段信息(中转港、开船时间) -- 将原先的方法拆分， 处理数据与更新数据库分离,
+            // 里面处理的业务逻辑没有改动。
+            List<YwHddz> hddzList = handleHddzInfoForShip(sameShipList);
+            // 更新货代单证， 更新云娜状态。 循环执行， 每个单独事务，发生异常后捕获不影响其他数据，发生异常都有日志记录
+            for (YwHddz ywHddz : hddzList) {
+                sgtDataService.updateShipInfoListForHddzSingle(ywHddz, batchNo);
+                yunnaShipService.updateUpdStatusByBusinessNoSingle(ywHddz, batchNo);
+            }
+        }
+        // 3. 更新ETA>72h信息 将这个方法拆分， 处理数据与更新数据库拆分
+        List<YwHddz> etaStatusList = updateHddzEtaForShip(baseDataList);
+        for (YwHddz ywHddz : etaStatusList) {
+            sgtDataService.updateShipEtaListForHddzSingle(ywHddz, batchNo);
+            yunnaShipService.updateShipResultEtaStatusSingle(ywHddz, batchNo);
+        }
+
+    }
+
+    /**
+     * updateHddzEtaForShip(处理更新ETA>72h信息)  
+     * @param baseDataList
+     * @return List<YwHddz>
+     * @author wuwenjin
+     * @date 2023年4月21日 下午4:18:32  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    private List<YwHddz> updateHddzEtaForShip(List<ShipForHddzVO> baseDataList) {
+
+        List<ShipForHddzVO> withEtaList = baseDataList.stream()
+                .filter(vo -> !CommonUtils.isEmpty(vo.getExpectArrivalTime())).collect(Collectors.toList());
+        log.info("=================云纳ETA有值的数据有{}条", withEtaList.size());
+
+        List<ShipForHddzVO> eta72List = baseDataList.stream().filter(vo -> vo.getHours() > 72)
+                .collect(Collectors.toList());
+        log.info("=================云纳ETA>72h的数据有{}条", eta72List.size());
+
+        /**
+         *  预计靠港时间判断
+         *  ETA减当前返回数据时间大于72小时：提单号不同的 船名目的港相同 查到的ETA则反写(以大于当天数据返回时间(crtTime)的最早ETA时间反写）：
+         *  ETA减当前返回数据时间小于等于72小时：ETA则不反写，以港口ETA为准反写
+         *  ETA时间减当前时间（精确到天）小于0：ETA 不反写
+         */
+        List<YwHddz> ywbhList = new ArrayList<YwHddz>();
+
+        // 船名|目的港 分组
+        Map<String, List<ShipForHddzVO>> basicMap = withEtaList.stream()
+                .collect(Collectors.groupingBy(e -> (e.getShipName() + "|" + e.getDestinationPort())));
+        for (Map.Entry<String, List<ShipForHddzVO>> entry : basicMap.entrySet()) {
+            // 分组后的每一组数据都对应列表的一条数据
+            String mapKey = entry.getKey();
+            List<ShipForHddzVO> mapList = entry.getValue();
+
+            if (!CommonUtils.isEmpty(mapList)) {
+                // 过滤掉ETA < 当前时间的数据， 取最小值
+                Optional<ShipForHddzVO> min = mapList.stream()
+                        .filter(e -> DateUtils.checkStartAndEndDate(DateUtils.Date2String(e.getCrtTime()),
+                                DateUtils.Date2String(e.getExpectArrivalTime())))
+                        .min(Comparator.comparing(ShipForHddzVO::getExpectArrivalTime));
+
+                if (min.isPresent() && min.get().getExpectArrivalTime() != null) {
+                    ShipForHddzVO minEta = min.get();
+                    log.debug("@@@@@@@@@@@@@@@@@@@@@ ywbh={}, 最小ETA= {} ", minEta.getBusinessNo(),
+                            DateUtils.Date2String(minEta.getExpectArrivalTime()));
+
+                    for (ShipForHddzVO eta72 : eta72List) {
+                        if (minEta.getShipName().equals(eta72.getShipName())
+                                && minEta.getDestinationPort().equals(eta72.getDestinationPort())) {
+                            // 将最小ETA放进来，根据业务编号更新ETA
+                            // 通过Builder方式创建对象
+                            YwHddz yh = YwHddz.customizeBuilder().ywbh(eta72.getBusinessNo())
+                                    .yjkgsj(minEta.getExpectArrivalTime()).build();
+                            ywbhList.add(yh);
+                        }
+                    }
+                }
+            }
+        }
+        return ywbhList;
+    }
+
+    /**
+     * handleHddzInfoForShip(处理更新船司相关字段信息)  
+     * @param baseDataList
+     * @return List<YwHddz>
+     * @author wuwenjin
+     * @date 2023年4月21日 下午3:33:41  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    private List<YwHddz> handleHddzInfoForShip(List<ShipForHddzVO> baseDataList) {
+        List<ShipForHddzVO> shipList = new ArrayList<ShipForHddzVO>();
+        List<ShipForHddzVO> noTransitInfoList = baseDataList
+                .stream().filter(vo -> CommonUtils.isEmpty(vo.getTransitPort())
+                        && CommonUtils.isEmpty(vo.getTransitShipName()) && CommonUtils.isEmpty(vo.getTransitVoyage()))
+                .collect(Collectors.toList());
+        log.info("=================云纳中转港/中转船名/航次(三个字段都为空)的数据有{}条", noTransitInfoList.size());
+        List<ShipForHddzVO> withTransitInfoList = baseDataList
+                .stream().filter(vo -> !CommonUtils.isEmpty(vo.getTransitPort())
+                        && !CommonUtils.isEmpty(vo.getTransitShipName()) && !CommonUtils.isEmpty(vo.getTransitVoyage()))
+                .collect(Collectors.toList());
+        log.info("=================云纳中转港/中转船名/航次(三个字段都有值)的数据有{}条", withTransitInfoList.size());
+        shipList.addAll(noTransitInfoList);
+        shipList.addAll(withTransitInfoList);
+
+        List<YwHddz> ywbhList = new ArrayList<YwHddz>();
+        // 根据提单号+业务编号分组 ztdh|ywbh
+        Map<String, List<ShipForHddzVO>> basicMap = shipList.stream()
+                .collect(Collectors.groupingBy(e -> (e.getLoadingNumber() + "|" + e.getBusinessNo())));
+        for (Map.Entry<String, List<ShipForHddzVO>> entry : basicMap.entrySet()) {
+            // 分组后的每一组数据都对应列表的一条数据
+            String mapKey = entry.getKey();
+            List<ShipForHddzVO> mapList = entry.getValue();
+            if (!CommonUtils.isEmpty(mapList)) {
+                ShipForHddzVO list0 = mapList.get(0);
+                YwHddz ywbhVo = createShipForHddz(list0);
+                ywbhList.add(ywbhVo);
+            }
+        }
+        return ywbhList;
+    }
+
+    /**
+     * 
+     * createShipForHddz(创建更新船司信息封装类)      
+     * @param list0
+     * @return  
+     * @return ShipForHddzVO  
+     * @Exception 异常对象    
+     * @author lixd  
+     * @date 2023-04-08 16:22:04
+     */
+    private YwHddz createShipForHddz(ShipForHddzVO list0) {
+        // 通过Builder方式获取对象
+        YwHddz ywbhVo = YwHddz.customizeBuilder().ztdh(list0.getLoadingNumber()).ywbh(list0.getBusinessNo())
+                .kcsj(list0.getActualSailingTime()).build();
+        // 云钠没有返回 中转港/中转船名/航次(三个字段都为空) 数据 清空
+        if (CommonUtils.isEmpty(list0.getTransitPort()) && CommonUtils.isEmpty(list0.getTransitShipName())
+                && CommonUtils.isEmpty(list0.getTransitVoyage())) {
+            ywbhVo.setZzgk("");
+            ywbhVo.setSfzy(CommonInfo.COMMON_N);
+            ywbhVo.setZzCm("");
+            ywbhVo.setZzHcorhbh("");
+        } else if (!CommonUtils.isEmpty(list0.getTransitPort()) && !CommonUtils.isEmpty(list0.getTransitShipName())
+                && !CommonUtils.isEmpty(list0.getTransitVoyage())) {
+            // 云钠返回中转港/中转船名/航次(三个字段都有值)，与水果通 船名/航次不一致或者水果通无信息 直接反写
+            ywbhVo.setZzgk(list0.getTransitPort());
+            ywbhVo.setSfzy(CommonInfo.COMMON_Y);
+            ywbhVo.setZzCm(list0.getTransitShipName());
+            ywbhVo.setZzHcorhbh(list0.getTransitVoyage());
+        }
+
+        return ywbhVo;
+    }
+
+    /**
+     * assembleShipForHddzVO(从水果通查询船名目的港后拼接到baseDataList中)  
+     * 之前查询数据时直接关联货代单证，现在分库后需要重新查一边
+     * @param baseDataList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午3:45:50  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    private void assembleShipForHddzVO(List<ShipForHddzVO> baseDataList) {
+        // 获取业务编号， 去重
+        List<String> ywbhResultList = baseDataList.stream().map(s -> s.getBusinessNo()).distinct()
+                .collect(Collectors.toList());
+        // 根据业务编号获取对应的船名，目的港
+        List<YwHddzYunna> cmmdgList = new ArrayList<YwHddzYunna>();
+        List<List<String>> splitList = CommonUtils.splitList(ywbhResultList,
+                CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+        for (int i = 0; i < splitList.size(); i++) {
+            List<YwHddzYunna> cmmdgTempList = sgtDataService.queryCmAndMdgAndZzList(splitList.get(i));
+            if (!CommonUtils.isEmpty(cmmdgTempList)) {
+                cmmdgList.addAll(cmmdgTempList);
+            }
+        }
+        // 将从水果通查询出的船名目的港添加到从云娜查询出的数据中，
+        for (ShipForHddzVO vo : baseDataList) {
+            YwHddzYunna yn = cmmdgList.stream().filter(b -> b.getYwbh().equals(vo.getBusinessNo())).findAny()
+                    .orElse(null);
+            if (!CommonUtils.isEmpty(yn)) {
+                vo.setLadingShipName(yn.getCm());
+                vo.setMdg(yn.getMdg());
+            }
+
+        }
+    }
+
+    /**
+     * updateUpdStatusByBusinessNoSingle(反写云娜数据)  
+     * @param batchNo
+     * @param ywbh
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午3:50:02  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
+    @Override
+    public void updateUpdStatusByBusinessNoSingle(YwHddz ywHddz, String batchNo) {
+        try {
+            ywShipPortResultMapper.updateUpdStatusByBusinessNoSingle(batchNo, ywHddz.getYwbh());
+        } catch (Exception e) {
+            e.printStackTrace();
+            // 记录异常日志后继续执行
+            fruitShipPortService.saveShipPortError(CommonInfo.ERROR_CODE_DATABASE, "", "保存数据库异常:"
+                    + CommonInfo.SHIP_ERROR_YUNNA_YWBH + ywHddz.getYwbh() + CommonInfo.SHIP_ERROR_BATCH + batchNo);
+        }
+    }
+
+    /**
+     * updateShipResultEtaStatusSingle(更新ETA>72h信息云娜反写)  
+     * @param ywHddz
+     * @param batchNo
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月21日 下午4:28:11  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
+    @Override
+    public void updateShipResultEtaStatusSingle(YwHddz ywHddz, String batchNo) {
+        YwShipPortResult ysr = new YwShipPortResult();
+        ysr.setNewEtaTime(ywHddz.getYjkgsj());
+        ysr.setBusinessNo(ywHddz.getYwbh());
+        ysr.setBatchNo(batchNo);
+        try {
+            ywShipPortResultMapper.updateShipResultEtaStatusSingle(ysr);
+        } catch (Exception e) {
+            e.printStackTrace();
+            // 记录异常日志后继续执行
+            fruitShipPortService.saveShipPortError(CommonInfo.ERROR_CODE_DATABASE, "", "保存数据库异常:"
+                    + CommonInfo.SHIP_ERROR_YUNNA_YWBH + ywHddz.getYwbh() + CommonInfo.SHIP_ERROR_BATCH + batchNo);
+        }
+
+    }
+}
Index: yunna/src/main/java/com/freshport/service/impl/YwHddzYunnaServiceImpl.java
===================================================================
--- yunna/src/main/java/com/freshport/service/impl/YwHddzYunnaServiceImpl.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/service/impl/YwHddzYunnaServiceImpl.java	(revision 33933)
@@ -0,0 +1,80 @@
+package com.freshport.service.impl;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.freshport.dao.YwHddzJzxxxYunnaMapper;
+import com.freshport.dao.YwHddzYunnaMapper;
+import com.freshport.entity.YwHddzJzxxxYunna;
+import com.freshport.entity.YwHddzYunna;
+import com.freshport.service.YwHddzYunnaService;
+import com.freshport.util.CommonInfo;
+import com.freshport.util.CommonUtils;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * 项目名称：yunna    
+ * 类名称：YwHddzYunnaServiceImpl    
+ * 类描述： 云娜保存业务数据
+ * 创建人：wuwenjin    
+ * 创建时间：2023年4月20日 下午2:23:20    
+ * 修改人：wuwenjin    
+ * 修改时间：2023年4月20日 下午2:23:20    
+ * 修改备注：    
+ * @version 1.0
+ */
+@Slf4j
+@Service("ywHddzYunnaService")
+public class YwHddzYunnaServiceImpl implements YwHddzYunnaService {
+    @Resource
+    private YwHddzYunnaMapper ywHddzYunnaMapper;
+
+    @Resource
+    private YwHddzJzxxxYunnaMapper ywHddzJzxxxYunnaMapper;
+
+    /**
+     * saveHddzAndJzxxxInfo(保存单证和集装箱业务字段)  
+     * @param hddzList
+     * @param jzxxxList
+     * @return void
+     * @author wuwenjin
+     * @date 2023年4月20日 下午2:24:12  
+     * @Exception 异常对象  
+     * @version 1.0
+     */
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
+    @Override
+    public void saveHddzAndJzxxxInfo(List<YwHddzYunna> hddzList, List<YwHddzJzxxxYunna> jzxxxList) {
+        if (!CommonUtils.isEmpty(hddzList)) {
+            List<List<YwHddzYunna>> splitList = CommonUtils.splitList(hddzList,
+                    CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+            for (int i = 0; i < splitList.size(); i++) {
+                ywHddzYunnaMapper.saveList(splitList.get(i));
+            }
+        }
+        if (!CommonUtils.isEmpty(jzxxxList)) {
+            List<List<YwHddzJzxxxYunna>> splitList = CommonUtils.splitList(jzxxxList,
+                    CommonInfo.SQLSERVER_BATCH_GROUPING_COUNT_HUNDRED);
+            for (int i = 0; i < splitList.size(); i++) {
+                ywHddzJzxxxYunnaMapper.saveList(splitList.get(i));
+            }
+        }
+
+    }
+
+    @Transactional
+    @Override
+    public void updatetest() {
+        /// ywHddzJzxxxYunnaMapper.selectByPrimaryKey("01");
+
+        ywHddzYunnaMapper.updatetest();
+
+    }
+
+}
Index: yunna/src/main/java/com/freshport/util/CommonInfo.java
===================================================================
--- yunna/src/main/java/com/freshport/util/CommonInfo.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/util/CommonInfo.java	(revision 33933)
@@ -89,4 +89,22 @@
     /** 异常日志，错误码 6-港口回传数量不对 */
     public static final String ERROR_CODE_PORT_NUM = "7";
 
+    /** 通用时间字符串  开始 */
+    public static final String DATE_STRING_START = " 00:00:00";
+
+    /** 初始化日期  1970-01-01 00:00:00*/
+    public static final String DEFAULT_DATE_STRING = "1970-01-01 00:00:00";
+
+    /** 中外运 编码 SINO */
+    public static final String SHIP_COMPANY_SINO = "SINO";
+
+    /** 船司异常数据 - ywbh */
+    public static final String SHIP_ERROR_YWBH = "船司数据更新异常,ywbh: ";
+
+    /** 船司异常数据 - batch */
+    public static final String SHIP_ERROR_BATCH = " batch: ";
+
+    /** 船司异常数据 yunna - ywbh */
+    public static final String SHIP_ERROR_YUNNA_YWBH = "船司数据云娜库更新异常,ywbh: ";
+
 }
Index: yunna/src/main/java/com/freshport/util/DateUtils.java
===================================================================
--- yunna/src/main/java/com/freshport/util/DateUtils.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/util/DateUtils.java	(revision 33933)
@@ -29,6 +29,8 @@
 public class DateUtils {
     private static SimpleDateFormat dfm = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
+    private static SimpleDateFormat sdfB = new SimpleDateFormat("yyyy-MM-dd");
+
     /**
      * 根据传递的formatter时间日期转日志字符串
      * @return
@@ -75,6 +77,22 @@
     }
 
     /**
+     * getDateToStringB(根据传入日期获取对应字符串 - 格式 ： 2018-06-15)    
+     * @param   date 日期    
+     * @param  @return    设定文件    
+     * @return String    DOM对象    
+     * @Exception 异常对象
+     * @author 吴文进
+     * @throws ParseException 
+     * @date 2019年10月12日11:17:54
+     */
+    public static String getDateToStringB(Date date) throws ParseException {
+        synchronized (sdfB) {
+            return sdfB.format(date);
+        }
+    }
+
+    /**
      * 
      * checkStartAndEndDate(这里用一句话描述这个方法的作用)       
      * @param startDate yyyy-MM-dd HH:mm:ss
Index: yunna/src/main/java/com/freshport/util/activemq/BeanConfig.java
===================================================================
--- yunna/src/main/java/com/freshport/util/activemq/BeanConfig.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/util/activemq/BeanConfig.java	(revision 33933)
@@ -0,0 +1,55 @@
+package com.freshport.util.activemq;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.Queue;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.jms.config.JmsListenerContainerFactory;
+import org.springframework.jms.config.SimpleJmsListenerContainerFactory;
+import org.springframework.jms.core.JmsMessagingTemplate;
+
+@Configuration
+public class BeanConfig {
+    @Value("${spring.activemq.broker-url}")
+    private String brokerUrl;
+
+    @Value("${spring.activemq.user}")
+    private String username;
+
+    @Value("${spring.activemq.password}")
+    private String password;
+
+    // 账龄查询动态刷新队列
+    @Value("${spring.activemq.queue-name-yunna-listen}")
+    private String queueName;
+
+    // 申请单处理队列
+    @Bean(name = "queue")
+    public Queue queue() {
+        return new ActiveMQQueue(queueName);
+    }
+
+    @Bean
+    public ConnectionFactory connectionFactory() {
+        return new ActiveMQConnectionFactory(username, password, brokerUrl);
+    }
+
+    @Bean
+    public JmsMessagingTemplate jmsMessageTemplate() {
+        return new JmsMessagingTemplate(connectionFactory());
+    }
+
+    // // 在Queue模式中，对消息的监听需要对containerFactory进行配置
+    @Bean("queueListener")
+    public JmsListenerContainerFactory<?> queueJmsListenerContainerFactory(ConnectionFactory connectionFactory) {
+        SimpleJmsListenerContainerFactory factory = new SimpleJmsListenerContainerFactory();
+        factory.setConnectionFactory(connectionFactory);
+        factory.setPubSubDomain(false);
+        return factory;
+    }
+
+}
Index: yunna/src/main/java/com/freshport/util/activemq/CustomerQueueYunna.java
===================================================================
--- yunna/src/main/java/com/freshport/util/activemq/CustomerQueueYunna.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/util/activemq/CustomerQueueYunna.java	(revision 33933)
@@ -0,0 +1,61 @@
+package com.freshport.util.activemq;
+
+import javax.annotation.Resource;
+
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import com.alibaba.fastjson.JSONObject;
+import com.freshport.entity.yunna.ActivemqParams;
+import com.freshport.service.YunnaPortService;
+import com.freshport.service.YunnaShipService;
+import com.freshport.util.CommonInfo;
+import com.freshport.util.CommonUtils;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * 项目名称：ff-settlement    
+ * 类名称：CustomerQueueFksqd    
+ * 类描述： 云娜数据处理
+ * 创建人：wuwenjin    
+ * 创建时间：2020年5月22日16:17:43
+ * 修改人：wuwenjin    
+ * 修改时间：2020年5月22日16:17:43
+ * 修改备注：    
+ * @version 1.0    
+ *
+ */
+@Slf4j
+@Component
+public class CustomerQueueYunna {
+
+    @Resource
+    private YunnaPortService yunnaPortService;
+
+    @Resource
+    private YunnaShipService yunnaShipService;
+
+    /**
+    * readActiveQueueYunna(云娜处理数据)  
+    * @param bsStr
+    * @return void
+    * @author wuwenjin
+    * @date 2023年4月21日 下午2:45:48  
+    * @Exception 异常对象  
+    * @version 1.0
+    */
+    @JmsListener(destination = "${spring.activemq.queue-name-yunna-listen}", containerFactory = "queueListener")
+    public void readActiveQueueYunna(@RequestBody String bsStr) {
+        System.out.println(">>>>>> YUNNA-MQ本次接收内容：" + bsStr);
+        if (!CommonUtils.isEmpty(bsStr)) {
+            ActivemqParams queueVo = JSONObject.parseObject(bsStr, ActivemqParams.class);
+            if (CommonInfo.TYPE_SHIP.equals(queueVo.getType())) {// 处理船司信息
+                yunnaShipService.handleDate(queueVo.getBatchNo());
+            } else if (CommonInfo.TYPE_PORT.equals(queueVo.getType())) { // 处理港口信息
+                yunnaPortService.handleDate(queueVo.getBatchNo());
+            }
+        }
+    }
+}
Index: yunna/src/main/java/com/freshport/util/activemq/ProducerQueue.java
===================================================================
--- yunna/src/main/java/com/freshport/util/activemq/ProducerQueue.java	(nonexistent)
+++ yunna/src/main/java/com/freshport/util/activemq/ProducerQueue.java	(revision 33933)
@@ -0,0 +1,31 @@
+package com.freshport.util.activemq;
+
+import javax.jms.Destination;
+import javax.jms.Queue;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.core.JmsMessagingTemplate;
+import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.PostMapping;
+
+@Service("producerQueue")
+public class ProducerQueue {
+
+    @Autowired
+    private JmsMessagingTemplate jmsMessagingTemplate;
+
+    @Autowired
+    private Queue queue;
+
+    @PostMapping("/queue/send")
+    public String sendQueue(String str) {
+        this.sendMessage(this.queue, str);
+        return "success";
+    }
+
+    // 发送消息，destination是发送到的队列，message是待发送的消息
+    private void sendMessage(Destination destination, final String message) {
+        jmsMessagingTemplate.convertAndSend(destination, message);
+    }
+
+}
Index: yunna/src/main/java/com/freshport/util/aspect/YunnaLogAspect.java
===================================================================
--- yunna/src/main/java/com/freshport/util/aspect/YunnaLogAspect.java	(revision 33932)
+++ yunna/src/main/java/com/freshport/util/aspect/YunnaLogAspect.java	(revision 33933)
@@ -73,7 +73,8 @@
         // 结果数量
         int resultSize = CommonUtils.isEmpty(resultList) ? 0 : resultList.size();
         // 记录日志
-        fruitShipPortService.saveShipPortLog(JSONObject.toJSON(params).toString(), resultStr,
+        fruitShipPortService.saveShipPortLog(JSONObject.toJSON(params).toString(),
+                resultStr.length() > 5000 ? resultStr.substring(0, 5000) : resultStr,
                 ShipPortEnum.getShipPortEnum(params.getType()).getLogType(), resultSize, batchNo);
     }
 
Index: yunna/src/main/resources/application-prod.yml
===================================================================
--- yunna/src/main/resources/application-prod.yml	(revision 33932)
+++ yunna/src/main/resources/application-prod.yml	(revision 33933)
@@ -1,24 +1,57 @@
 spring:
   datasource:
-    url: jdbc:sqlserver://www.fruitease.com;DatabaseName=zjnb;allowMultiQueries=true
-    username: oheng
-    password: Hongshen_110
-    type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-    minIdle: 2
-    initialSize: 2
-    maxActive: 200
-    maxWait: 60000
-    timeBetweenEvictionRunsMillis: 60000
-    minEvictableIdleTimeMillis: 300000
-    validationQuery: SELECT 1 FROM DUAL
-    testWhileIdle: true
-    testOnBorrow: false
-    testOnReturn: false
-    poolPreparedStatements: true
-    maxPoolPreparedStatementPerConnectionSize: 20
-    filters: stat,wall,log4j
-    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+    druid:
+      master:
+        #主数据源是yunna
+        driver-class-name: com.mysql.jdbc.Driver
+        url: jdbc:mysql://rm-bp1d94x90a6ww204o.mysql.rds.aliyuncs.com:3306/yunna?useUnicode=true&characterEncoding=utf-8&useSSL=false
+        username: nova123
+        password: NovaFreshPort2017
+        validation-query: SELECT 1 FROM DUAL
+        min-idle: 5
+        max-active: 20
+        max-wait: 60000
+        time-between-eviction-runs-millis: 60000
+        min-evictable-idle-time-millis: 300000
+        test-while-idle: true
+        test-on-borrow: false
+        test-on-return: false
+        pool-prepared-statements: true
+        max-pool-prepared-statement-per-connection-size: 20
+        use-global-data-source-stat: true
+        connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
+      slave:
+       #从数据源是水果通
+        url: jdbc:sqlserver://www.fruitease.com;DatabaseName=zjnb;allowMultiQueries=true
+        username: oheng
+        password: Hongshen_110
+        type: com.alibaba.druid.pool.DruidDataSource
+        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        minIdle: 2
+        initialSize: 2
+        maxActive: 200
+        maxWait: 60000
+        timeBetweenEvictionRunsMillis: 60000
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        filters: stat,wall,log4j
+        connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+  activemq:
+    broker-url: tcp://118.31.36.216:61616/
+    user: admin
+    password: nova123
+    close-timeout: 5s   # 在考虑结束之前等待的时间
+    in-memory: true      # 默认代理URL是否应该在内存中。如果指定了显式代理，则忽略此值。
+    non-blocking-redelivery: false  # 是否在回滚回滚消息之前停止消息传递。这意味着当启用此命令时，消息顺序不会被保留。
+    send-timeout: 0     # 等待消息发送响应的时间。设置为0等待永远。
+    queue-name-yunna-listen: yunna_pro_listen
+    packages:
+      trust-all: true #不配置此项，会报错      
 ##YunNaUser
 ynUser:    
   #用户名


Index: yunna/src/main/resources/application-test.yml
===================================================================
--- yunna/src/main/resources/application-test.yml	(revision 33932)
+++ yunna/src/main/resources/application-test.yml	(revision 33933)
@@ -1,24 +1,59 @@
 spring:
   datasource:
-    url: jdbc:sqlserver://rm-bp107kof940zw01k6qo.sqlserver.rds.aliyuncs.com:1433;DatabaseName=zjnb_rq;allowMultiQueries=true
-    username: oheng
-    password: Hongshen_110
-    type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-    minIdle: 2
-    initialSize: 2
-    maxActive: 200
-    maxWait: 60000
-    timeBetweenEvictionRunsMillis: 60000
-    minEvictableIdleTimeMillis: 300000
-    validationQuery: SELECT 1 FROM DUAL
-    testWhileIdle: true
-    testOnBorrow: false
-    testOnReturn: false
-    poolPreparedStatements: true
-    maxPoolPreparedStatementPerConnectionSize: 20
-    filters: stat,wall,log4j
-    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+    druid:
+      master:
+        #主数据源是yunna
+        driver-class-name: com.mysql.jdbc.Driver
+        url: jdbc:mysql://localhost:3306/yunna?useUnicode=true&characterEncoding=utf-8&useSSL=false
+        username: root
+        password: 111111
+        #url: jdbc:mysql://rm-bp1d94x90a6ww204o.mysql.rds.aliyuncs.com:3306/yunna?useUnicode=true&characterEncoding=utf-8&useSSL=false
+       # username: nova123
+        #password: NovaFreshPort2017
+        validation-query: SELECT 1 FROM DUAL
+        min-idle: 5
+        max-active: 20
+        max-wait: 60000
+        time-between-eviction-runs-millis: 60000
+        min-evictable-idle-time-millis: 300000
+        test-while-idle: true
+        test-on-borrow: false
+        test-on-return: false
+        pool-prepared-statements: true
+        max-pool-prepared-statement-per-connection-size: 20
+        use-global-data-source-stat: true
+        connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
+      slave:
+        url: jdbc:sqlserver://rm-bp107kof940zw01k6qo.sqlserver.rds.aliyuncs.com:1433;DatabaseName=zjnb_rq;allowMultiQueries=true
+        username: oheng
+        password: Hongshen_110
+        type: com.alibaba.druid.pool.DruidDataSource
+        driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+        minIdle: 2
+        initialSize: 2
+        maxActive: 200
+        maxWait: 60000
+        timeBetweenEvictionRunsMillis: 60000
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        filters: stat,wall,log4j
+        connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+  activemq:
+    broker-url: tcp://118.31.36.216:61616/
+    user: admin
+    password: nova123
+    close-timeout: 5s   # 在考虑结束之前等待的时间
+    in-memory: true      # 默认代理URL是否应该在内存中。如果指定了显式代理，则忽略此值。
+    non-blocking-redelivery: false  # 是否在回滚回滚消息之前停止消息传递。这意味着当启用此命令时，消息顺序不会被保留。
+    send-timeout: 0     # 等待消息发送响应的时间。设置为0等待永远。
+    queue-name-yunna-listen: yunna_test_listen
+    packages:
+      trust-all: true #不配置此项，会报错
 ##YunNaUser
 ynUser:    
   #用户名
Index: yunna/src/main/resources/application.yml
===================================================================
--- yunna/src/main/resources/application.yml	(revision 33932)
+++ yunna/src/main/resources/application.yml	(revision 33933)
@@ -21,4 +21,5 @@
 logging:
   level:
     com.freshport.dao: DEBUG
+    com.freshport.fdao: DEBUG
   config: classpath:logback.xml
Index: yunna/src/main/resources/generatorConfig.xml
===================================================================
--- yunna/src/main/resources/generatorConfig.xml	(revision 33932)
+++ yunna/src/main/resources/generatorConfig.xml	(revision 33933)
@@ -1,18 +1,25 @@
 <?xml version="1.0" encoding="UTF-8" ?>  
 <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
 <generatorConfiguration>
-	<!-- 驱动地址  自行修改为MAVEN对应的驱动 -->
-	<classPathEntry location="D:/Maven-Jar/mssql-jdbc-6.4.0.jre8.jar" />
+	<!-- 驱动地址  自行修改为MAVEN对应的驱动 
+	<classPathEntry location="D:/Maven-Jar/mssql-jdbc-6.4.0.jre8.jar" />-->
+	<classPathEntry location="D:/Maven-Jar/repository/mysql/mysql-connector-java/5.1.30/mysql-connector-java-5.1.30.jar" />
 	<context id="context1">	
 		<commentGenerator >  
             <property name="suppressAllComments" value="true"/><!-- 是否取消注释 -->  
             <property name="suppressDate" value="true" /> <!-- 是否生成注释代时间戳-->  
         </commentGenerator>  
+		<!-- 
 		<jdbcConnection driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"
             connectionURL="jdbc:sqlserver://rm-bp107kof940zw01k6qo.sqlserver.rds.aliyuncs.com:1433;DatabaseName=zjnb_rq"
             userId="oheng"
             password="Hongshen_110">
         </jdbcConnection>
+         -->
+         <jdbcConnection driverClass="com.mysql.jdbc.Driver"
+			connectionURL="jdbc:mysql://localhost:3306/yunna" 
+			userId="root"
+			password="111111" />
 		<!-- 实体类的生成地址 -->
 		<javaModelGenerator targetPackage="com.freshport.entity"
 			targetProject="yunna" />
@@ -23,7 +30,7 @@
 		<javaClientGenerator targetPackage="com.freshport.dao"
 			targetProject="yunna" type="XMLMAPPER" />
 			
-		<table domainObjectName="YwShipPortLog" tableName="yw_ship_port_log"
+		<table domainObjectName="YwShipDestinationPort" tableName="yw_ship_destination_port"
   			enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
      		enableSelectByExample="false" selectByExampleQueryId="false"/>  
 		<!-- 指定生成的表 -->
