Commit 31967a74 authored by 李秀明's avatar 李秀明

fix(jcs): 驻站消防员接口bizOrgCode取值错误

parent d03c7438
......@@ -77,56 +77,56 @@
</select>
<select id="queryPeopleInfo" resultType="Map">
SELECT
s1.date,
IFNULL( s2.signNum, 0 ) AS signNum
FROM
(
SELECT
@s := @s + 1 AS `index`,
DATE_FORMAT( DATE_ADD(( DATE( DATE_ADD( now(), INTERVAL - 5 DAY ))), INTERVAL @s DAY ), '%Y-%m-%d' ) AS date
FROM
mysql.help_topic,
( SELECT @s := - 2 ) temp
WHERE
@s &lt; 5
) s1
LEFT JOIN (
SELECT
count(s0.userId) AS signNum,
s0.*
FROM
(
SELECT
s.*
FROM
(
SELECT DISTINCT
sign.user_id userId,
date,
biz_org_Name bizOrgName,
biz_org_code bizOrgCode,
person_of_day personOfDay
FROM
cb_sign sign
<where>
<if test="dto.dateLESS!=null and dto.dateLESS!=''">
and #{dto.dateLESS} >= sign.sign_time
</if>
<if test="dto.bizOrgCode!=null and dto.bizOrgCode!=''">
and sign.biz_org_code like CONCAT(#{dto.bizOrgCode},'%')
</if>
</where>
ORDER BY
sign.sign_time DESC
) s
) s0
GROUP BY s0.date
) s2 ON s2.date = s1.date
GROUP BY
s1.date
ORDER BY
s1.date
SELECT
s1.date,
IFNULL( s2.signNum, 0 ) AS signNum
FROM
(
SELECT
@s := @s + 1 AS `index`,
DATE_FORMAT( DATE_ADD(( DATE( DATE_ADD( now(), INTERVAL - 5 DAY ))), INTERVAL @s DAY ), '%Y-%m-%d' ) AS date
FROM
mysql.help_topic,
( SELECT @s := - 2 ) temp
WHERE
@s &lt; 5
) s1
LEFT JOIN (
SELECT
count(s0.userId) AS signNum,
s0.*
FROM
(
SELECT
s.*
FROM
(
SELECT DISTINCT
sign.user_id userId,
date,
biz_org_Name bizOrgName,
biz_org_code bizOrgCode,
person_of_day personOfDay
FROM
cb_sign sign
<where>
<if test="dto.dateLESS!=null and dto.dateLESS!=''">
and #{dto.dateLESS} >= sign.sign_time
</if>
<if test="dto.bizOrgCode!=null and dto.bizOrgCode!=''">
and sign.biz_org_code like CONCAT(#{dto.bizOrgCode},'%')
</if>
</where>
ORDER BY
sign.sign_time DESC
) s
) s0
GROUP BY s0.date
) s2 ON s2.date = s1.date
GROUP BY
s1.date
ORDER BY
s1.date
</select>
<select id="queryPersonNum" resultType="java.lang.Integer">
......
......@@ -196,7 +196,7 @@ public class SignController extends BaseController {
ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
String bizOrgCode = null;
if(null != reginParam) {
bizOrgCode = reginParam.getPersonIdentity().getBizOrgCode();
bizOrgCode = reginParam.getPersonIdentity().getCompanyBizOrgCode();
}
dto.setBizOrgCode(bizOrgCode);
List<Map<String, Object>> res = signServiceImpl.queryPeopleInfo(dto);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment