|
|
@@ -161,12 +161,12 @@
|
|
161
|
161
|
(select first 1 pj.pjjg
|
|
162
|
162
|
from qyxypjdc pj
|
|
163
|
163
|
where pj.ztmc = tz.qymc
|
|
164
|
|
- and to_date(pj.pjyxq
|
|
165
|
|
- , 'yyyy-MM-dd') >= to_date((select sysdate from dual)
|
|
166
|
|
- , 'yyyy-MM-dd')
|
|
167
|
|
- and to_date(pj.pjrq
|
|
168
|
|
- , 'yyyy-MM-dd') <= to_date((select sysdate from dual)
|
|
169
|
|
- , 'yyyy-MM-dd')
|
|
|
164
|
+ and DATE_FORMAT(pj.pjyxq
|
|
|
165
|
+ , '%Y-%m-%d') >= DATE_FORMAT(now()
|
|
|
166
|
+ , '%Y-%m-%d')
|
|
|
167
|
+ and DATE_FORMAT(pj.pjrq
|
|
|
168
|
+ , '%Y-%m-%d') <= DATE_FORMAT(now()
|
|
|
169
|
+ , '%Y-%m-%d')
|
|
170
|
170
|
and zt = '已提交'
|
|
171
|
171
|
order by pj.pjnd desc) x) as pjjg
|
|
172
|
172
|
from
|
|
|
@@ -289,10 +289,10 @@
|
|
289
|
289
|
|
|
290
|
290
|
<!-- 根据统一社会信用代码获取企业相关信息-->
|
|
291
|
291
|
<select id="getqyxxBytyshxydm" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
292
|
|
- SELECT qymc, fddbr, create_date,refresh_time,zcr,
|
|
293
|
|
- (select distinct p.provin_name from usercenter.BAS_AREA p where p.provin_code= txprovince) ||
|
|
294
|
|
- (select distinct p.county_name from usercenter.BAS_AREA p where p.county_code= txcity) ||
|
|
295
|
|
- (select distinct p.city_name from usercenter.BAS_AREA p where p.city_code= txcity) || qytxdz as qytxdz
|
|
|
292
|
+ SELECT qymc, fddbr, create_date,refresh_time,zcr,
|
|
|
293
|
+ concat((select distinct p.provin_name from usercenter.BAS_AREA p where p.provin_code= txprovince),
|
|
|
294
|
+ (select distinct p.county_name from usercenter.BAS_AREA p where p.county_code= txcity) ,
|
|
|
295
|
+ (select distinct p.city_name from usercenter.BAS_AREA p where p.city_code= txcity) , qytxdz) as qytxdz
|
|
296
|
296
|
FROM TZ_SLQY
|
|
297
|
297
|
WHERE tyshxydm = #{kddm}
|
|
298
|
298
|
</select>
|
|
|
@@ -1393,9 +1393,9 @@
|
|
1393
|
1393
|
<select id="getCompanyBytyshxydm" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
1394
|
1394
|
SELECT
|
|
1395
|
1395
|
<include refid="Base_Column_List_common"></include>
|
|
1396
|
|
- ,(select nvl(count(0),0) from base.d_kdxxsjy where tyshxydm=tz.tyshxydm and status=1) as kqsl
|
|
1397
|
|
- ,(select nvl(count(distinct(gfcfdm)),0) from base.d_cfxxsjy where tyshxydm=tz.tyshxydm and status=1 and sfba=5) as cfsl
|
|
1398
|
|
- ,(select nvl(count(0),0) from base.d_ygxxsjy where tyshxydm=tz.tyshxydm and status=1 and sfba=5 ) as ygsl
|
|
|
1396
|
+ ,(select ifnull(count(0),0) from base.d_kdxxsjy where tyshxydm=tz.tyshxydm and status=1) as kqsl
|
|
|
1397
|
+ ,(select ifnull(count(distinct(gfcfdm)),0) from base.d_cfxxsjy where tyshxydm=tz.tyshxydm and status=1 and sfba=5) as cfsl
|
|
|
1398
|
+ ,(select ifnull(count(0),0) from base.d_ygxxsjy where tyshxydm=tz.tyshxydm and status=1 and sfba=5 ) as ygsl
|
|
1399
|
1399
|
from
|
|
1400
|
1400
|
TZ_SLQY tz
|
|
1401
|
1401
|
<where>
|
|
|
@@ -1405,7 +1405,8 @@
|
|
1405
|
1405
|
</select>
|
|
1406
|
1406
|
|
|
1407
|
1407
|
<select id="selectMaxId" resultType="java.lang.Integer">
|
|
1408
|
|
- SELECT MAX(CAST(ID AS INT)) AS ID FROM TZ_SLQY
|
|
|
1408
|
+ SELECT MAX(ID) AS ID FROM TZ_SLQY
|
|
|
1409
|
+-- SELECT MAX(CAST(ID AS INT)) AS ID FROM TZ_SLQY
|
|
1409
|
1410
|
</select>
|
|
1410
|
1411
|
|
|
1411
|
1412
|
<select id="selectByEntity" resultMap="BaseResultMap">
|
|
|
@@ -1482,7 +1483,7 @@
|
|
1482
|
1483
|
</select>
|
|
1483
|
1484
|
|
|
1484
|
1485
|
<select id="selectQyjg" resultType="com.unis.base.common.vo.TzQyjgVO">
|
|
1485
|
|
- SELECT * FROM TZ_QYJG WHERE status=1
|
|
|
1486
|
+ SELECT * FROM TZ_QYJG WHERE status =1
|
|
1486
|
1487
|
</select>
|
|
1487
|
1488
|
|
|
1488
|
1489
|
<select id="selectKdxx" resultType="com.unis.base.common.vo.DKdxxsjyVO">
|
|
|
@@ -1685,7 +1686,7 @@
|
|
1685
|
1686
|
SELECT DISTINCT(tz.id)
|
|
1686
|
1687
|
from TZ_SLQY tz
|
|
1687
|
1688
|
left join TZ_QYLX q on tz.id = q.qyid
|
|
1688
|
|
- WHERE tz.status = 1 AND decode(tz.qyjd, null, 0, 1) =1 and decode(tz.qywd, null, 0, 1) = 1
|
|
|
1689
|
+ WHERE tz.status = 1 AND if(tz.qyjd = null, 0, 1) =1 and if(tz.qywd =null, 0, 1) = 1
|
|
1689
|
1690
|
<!-- 企业类型 -->
|
|
1690
|
1691
|
<if test="qylxbh != null and qylxbh != ''">
|
|
1691
|
1692
|
and q.qylxbh LIKE concat(CONCAT('%',#{qylxbh,jdbcType=VARCHAR}) ,'%')
|
|
|
@@ -2063,7 +2064,7 @@
|
|
2063
|
2064
|
<!--根据实体的唯一属性查询数量-->
|
|
2064
|
2065
|
<select id='selectCountById' resultType='java.lang.Integer'>
|
|
2065
|
2066
|
SELECT
|
|
2066
|
|
- COUNT(*)
|
|
|
2067
|
+ COUNT(1)
|
|
2067
|
2068
|
FROM TZ_SLQY
|
|
2068
|
2069
|
<where>
|
|
2069
|
2070
|
<if test='id !=null and id != ""'>
|
|
|
@@ -2077,9 +2078,9 @@
|
|
2077
|
2078
|
<select id="getCompanyByqymc" resultType="com.unis.base.server.entity.TzSlqyDO">
|
|
2078
|
2079
|
SELECT
|
|
2079
|
2080
|
<include refid="Base_Column_List_common"></include>
|
|
2080
|
|
- ,(select nvl(count(0),0) from base.d_kdxxsjy where tyshxydm=tz.tyshxydm and status=1) as kqsl
|
|
2081
|
|
- ,(select nvl(count(distinct(gfcfdm)),0) from base.d_cfxxsjy where tyshxydm=tz.tyshxydm and status=1 and sfba=5) as cfsl
|
|
2082
|
|
- ,(select nvl(count(0),0) from base.d_ygxxsjy where tyshxydm=tz.tyshxydm and status=1 and sfba=5 ) as ygsl
|
|
|
2081
|
+ ,(select ifnull(count(0),0) from base.d_kdxxsjy where tyshxydm=tz.tyshxydm and status=1) as kqsl
|
|
|
2082
|
+ ,(select ifnull(count(distinct(gfcfdm)),0) from base.d_cfxxsjy where tyshxydm=tz.tyshxydm and status=1 and sfba=5) as cfsl
|
|
|
2083
|
+ ,(select ifnull(count(0),0) from base.d_ygxxsjy where tyshxydm=tz.tyshxydm and status=1 and sfba=5 ) as ygsl
|
|
2083
|
2084
|
from
|
|
2084
|
2085
|
TZ_SLQY tz
|
|
2085
|
2086
|
<where>
|
|
|
@@ -2531,7 +2532,7 @@
|
|
2531
|
2532
|
update TZ_SLQY
|
|
2532
|
2533
|
set
|
|
2533
|
2534
|
<if test="sjcr != null">
|
|
2534
|
|
- sjcr = (select nvl(sum(sjcr),0)
|
|
|
2535
|
+ sjcr = (select ifnull(sum(sjcr),0)
|
|
2535
|
2536
|
from (select a.sjcr,
|
|
2536
|
2537
|
row_number() over(partition by a.gfcfdm order by a.refresh_time desc) as rn
|
|
2537
|
2538
|
from base.D_CFXXSJY a
|
|
|
@@ -2539,7 +2540,7 @@
|
|
2539
|
2540
|
and a.sfba = '5'
|
|
2540
|
2541
|
and tyshxydm = #{tyshxydm,jdbcType=VARCHAR})
|
|
2541
|
2542
|
where rn=1),
|
|
2542
|
|
- zcr = (select nvl(sum(dczlrj),0)
|
|
|
2543
|
+ zcr = (select ifnull(sum(dczlrj),0)
|
|
2543
|
2544
|
from (select a.dczlrj,
|
|
2544
|
2545
|
row_number() over(partition by a.gfcfdm order by a.refresh_time desc) as rn
|
|
2545
|
2546
|
from base.D_CFXXSJY a
|
|
|
@@ -2549,7 +2550,7 @@
|
|
2549
|
2550
|
where rn=1),
|
|
2550
|
2551
|
</if>
|
|
2551
|
2552
|
<if test="gr != null">
|
|
2552
|
|
- gr = (select nvl(sum(sjgr),0)
|
|
|
2553
|
+ gr = (select ifnull(sum(sjgr),0)
|
|
2553
|
2554
|
from d_ygxxsjy
|
|
2554
|
2555
|
where sfba = '5'
|
|
2555
|
2556
|
and tyshxydm = #{tyshxydm,jdbcType=VARCHAR}),
|