|
@@ -48,12 +48,22 @@
|
|
|
</update>
|
|
|
|
|
|
|
|
|
+ <update id="updateClientLine" parameterType="map">
|
|
|
+ UPDATE MARKET_BASE_IMPORT A SET A.MANAGER_CODE= (SELECT MANAGER_CODE FROM V_B_CLIENT B WHERE A.CLIENT_CODE=B.CLIENT_CODE AND B.COUNTY_CODE=#{countyCode})
|
|
|
+ WHERE A.COUNTY_CODE=#{countyCode} AND (a.year,a.week) in (select year,week from market_base_week where current date>=begin_date and current date <![CDATA[ <= ]]> end_date)
|
|
|
+ </update>
|
|
|
+
|
|
|
<update id="updateZdh1" parameterType="map">
|
|
|
UPDATE MARKET_BASE_IMPORT A SET A.YBH=(SELECT TYPE FROM MARKET_SAMPLE_ZD B WHERE A.CLIENT_CODE=B.CLIENT_CODE)
|
|
|
WHERE a.year=#{year} and a.week=#{week}
|
|
|
AND A.CLIENT_CODE IN (SELECT CLIENT_CODE FROM MARKET_SAMPLE_ZD WHERE COUNTY_CODE=#{countyCode})
|
|
|
</update>
|
|
|
|
|
|
+ <update id="updateZdh3" parameterType="map">
|
|
|
+ UPDATE MARKET_BASE_IMPORT A SET A.YBH='0'
|
|
|
+ WHERE a.year=#{year} and a.week=#{week} AND A.CLIENT_CODE not IN (SELECT CLIENT_CODE FROM MARKET_SAMPLE_ZD)
|
|
|
+ </update>
|
|
|
+
|
|
|
<update id="updateZdh2" parameterType="map">
|
|
|
UPDATE HBYC.MARKET_BASE_IMPORT A SET A.IS_IMPORT='1'
|
|
|
WHERE a.year=#{year} and a.week=#{week} AND A.YBH IN ('4','5','6','7') AND A.IS_IMPORT='0'
|