From bce12a18795cbab7f5426161ba452d0a6c757d4b Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sun, 22 Aug 2021 16:25:40 +0800
Subject: [PATCH] 内网数据同步
---
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
index fd32991..37e92e4 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -27,7 +27,23 @@
<result column="representativecell" property="representativecell"/>
<result column="contacts" property="contacts"/>
<result column="contactscell" property="contactscell"/>
+ <result column="businessLicense" property="businessLicense"/>
+ <result column="licence" property="licence"/>
</resultMap>
+
+
+ <insert id="insertIn" useGeneratedKeys="true" keyProperty="id">
+ insert into sys_information(creditcode, enterprisename,representative, establishtime, registeredcapital,organizationcode, registrationnumber, identificationnumber, enterprises, address,business, region, registration, industry, departmentid, stats, jurisdiction,
+ representativecell, contacts, contactscell)
+ values (#{information.creditcode}, #{information.enterprisename}, #{information.representative},
+ #{information.establishtime}, #{information.registeredcapital},
+ #{information.organizationcode}, #{information.registrationnumber},
+ #{information.identificationnumber}, #{information.enterprises}, #{information.address},
+ #{information.business},
+ #{information.region}, #{information.registration}, #{information.industry},
+ #{information.departmentid}, #{information.stats}, #{information.jurisdiction},
+ #{information.representativecell}, #{information.contacts}, #{information.contactscell})
+ </insert>
<select id="selectInformationPage" resultMap="informationResultMap">
@@ -124,17 +140,19 @@
) B ON A.dept_id = B.dept_id
WHERE A.dept_id = #{deptid}
</select>
+
+
<!--保安员持证和未持证数量-->
<select id="selectHold" resultType="java.util.HashMap">
SELECT IFNULL(A.thisnum, 0) AS cz,
IFNULL(B.lastnum, 0) AS wcz
FROM (SELECT COUNT(*) AS thisnum, dept_id
FROM blade_user
- WHERE role_id = '1412226235153731586' AND hold = 0
+ WHERE role_id = '1412226235153731586' AND hold = 1
GROUP BY dept_id) A
LEFT JOIN (SELECT COUNT(*) AS lastnum, dept_id
FROM blade_user
- WHERE role_id = '1412226235153731586' AND hold = 1
+ WHERE role_id = '1412226235153731586' AND hold = 2
GROUP BY dept_id) B ON A.dept_id = B.dept_id
WHERE A.dept_id =#{deptid}
</select>
--
Gitblit v1.9.3