Commit c303d94c by sunxin

集团写死问题解决 关联查询

parent 06893ddc
...@@ -8,11 +8,12 @@ ...@@ -8,11 +8,12 @@
a.name AS "name", a.name AS "name",
a.type AS "type.id", a.type AS "type.id",
b.name AS "typeName", b.name AS "typeName",
a.ctBbtcGroup AS "ctBbtcGroup" b2.label AS "ctBbtcGroup"
</sql> </sql>
<sql id="ctBbtcBusCategoryJoins"> <sql id="ctBbtcBusCategoryJoins">
LEFT JOIN ct_bbtc_bus_type b on b.id = a.type LEFT JOIN ct_bbtc_bus_type b on b.id = a.type
LEFT JOIN ct_bbtc_sys_dict b2 on b2.id = a.CTBBTCGROUP
</sql> </sql>
<select id="get" resultType="CtBbtcBusCategory"> <select id="get" resultType="CtBbtcBusCategory">
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
r.supplement_title AS "supplementTitle", r.supplement_title AS "supplementTitle",
/*r.supplement_type AS "supplementType",*/ /*r.supplement_type AS "supplementType",*/
ct.name AS "transferDepartment", ct.name AS "transferDepartment",
r.transferGroup AS "transferGroup", b2.label AS "transferGroup",
/*r.supplement_area AS "supplementArea",*/ /*r.supplement_area AS "supplementArea",*/
r.supplement_project AS "supplementProject", r.supplement_project AS "supplementProject",
r.supplement_content AS "supplementContent", r.supplement_content AS "supplementContent",
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
r.report_qq AS "qq", r.report_qq AS "qq",
r.report_weixin AS "weixin", r.report_weixin AS "weixin",
r.report_ifClue AS "ifClue" , r.report_ifClue AS "ifClue" ,
r.supplement_group AS "supplementGroup", b.label AS "supplementGroup",
r.supplement_category AS "supplementCategory", r.supplement_category AS "supplementCategory",
r.supplement_type AS "supplementType" r.supplement_type AS "supplementType"
...@@ -64,10 +64,10 @@ ...@@ -64,10 +64,10 @@
,cr.name AS "supplementArea" ,cr.name AS "supplementArea"
FROM ct_bbtc_report r FROM ct_bbtc_report r
LEFT JOIN ct_bbtc_sys_user su ON r.exchange_after_user = su.id LEFT JOIN ct_bbtc_sys_user su ON r.exchange_after_user = su.id
LEFT JOIN ct_bbtc_region CR LEFT JOIN ct_bbtc_region CR ON r.supplement_area = CR.id
ON r.supplement_area = CR.id LEFT JOIN ct_bbtc_bus_type CT ON r.transfer_department = CT.id
LEFT JOIN ct_bbtc_bus_type CT LEFT JOIN ct_bbtc_sys_dict b on b.id = r.supplement_group
ON r.transfer_department = CT.id LEFT JOIN ct_bbtc_sys_dict b2 on b2.id = r.TRANSFERGROUP
/* LEFT JOIN ct_bbtc_bus_type CT /* LEFT JOIN ct_bbtc_bus_type CT
ON R.supplement_group = CT.supplement_group ON R.supplement_group = CT.supplement_group
...@@ -88,7 +88,8 @@ ...@@ -88,7 +88,8 @@
ON UR.USER_ID = SU.ID ON UR.USER_ID = SU.ID
LEFT JOIN CT_BBTC_SYS_ROLE RL LEFT JOIN CT_BBTC_SYS_ROLE RL
ON RL.ID = UR.ROLE_ID ON RL.ID = UR.ROLE_ID
LEFT JOIN ct_bbtc_sys_dict b on b.id = r.supplement_group
LEFT JOIN ct_bbtc_sys_dict b2 on b2.id = r.TRANSFERGROUP
LEFT JOIN ct_bbtc_region CR LEFT JOIN ct_bbtc_region CR
ON r.supplement_area = CR.id ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT LEFT JOIN ct_bbtc_bus_type CT
...@@ -217,7 +218,8 @@ ...@@ -217,7 +218,8 @@
ON UR.USER_ID = SU.ID ON UR.USER_ID = SU.ID
LEFT JOIN CT_BBTC_SYS_ROLE RL LEFT JOIN CT_BBTC_SYS_ROLE RL
ON RL.ID = UR.ROLE_ID ON RL.ID = UR.ROLE_ID
LEFT JOIN ct_bbtc_sys_dict b on b.id = r.supplement_group
LEFT JOIN ct_bbtc_sys_dict b2 on b2.id = r.TRANSFERGROUP
LEFT JOIN ct_bbtc_region CR LEFT JOIN ct_bbtc_region CR
ON r.supplement_area = CR.id ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT LEFT JOIN ct_bbtc_bus_type CT
...@@ -266,7 +268,8 @@ ...@@ -266,7 +268,8 @@
LEFT JOIN CT_BBTC_SYS_USER2ROLE UR ON UR.USER_ID = su.ID LEFT JOIN CT_BBTC_SYS_USER2ROLE UR ON UR.USER_ID = su.ID
LEFT JOIN CT_BBTC_SYS_ROLE RL LEFT JOIN CT_BBTC_SYS_ROLE RL
ON RL.ID = UR.ROLE_ID ON RL.ID = UR.ROLE_ID
LEFT JOIN ct_bbtc_sys_dict b on b.id = r.supplement_group
LEFT JOIN ct_bbtc_sys_dict b2 on b2.id = r.TRANSFERGROUP
LEFT JOIN ct_bbtc_region CR LEFT JOIN ct_bbtc_region CR
ON r.supplement_area = CR.id ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT LEFT JOIN ct_bbtc_bus_type CT
...@@ -421,6 +424,8 @@ ...@@ -421,6 +424,8 @@
ON r.supplement_area = CR.id ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT LEFT JOIN ct_bbtc_bus_type CT
ON r.transfer_department = CT.id ON r.transfer_department = CT.id
LEFT JOIN ct_bbtc_sys_dict b on b.id = r.supplement_group
LEFT JOIN ct_bbtc_sys_dict b2 on b2.id = r.TRANSFERGROUP
/* LEFT JOIN ct_bbtc_bus_type CT /* LEFT JOIN ct_bbtc_bus_type CT
ON R.supplement_group = CT.supplement_group ON R.supplement_group = CT.supplement_group
LEFT JOIN ct_bbtc_bus_category CC LEFT JOIN ct_bbtc_bus_category CC
...@@ -906,7 +911,7 @@ ...@@ -906,7 +911,7 @@
r.supplement_informant AS "supplementInformant", r.supplement_informant AS "supplementInformant",
r.supplement_title AS "supplementTitle", r.supplement_title AS "supplementTitle",
r.supplement_type AS "supplementType", r.supplement_type AS "supplementType",
r.supplement_group AS "supplementGroup", b.label AS "supplementGroup",
r.supplement_category AS "supplementCategory", r.supplement_category AS "supplementCategory",
r.supplement_project AS "supplementProject", r.supplement_project AS "supplementProject",
r.supplement_content AS "supplementContent", r.supplement_content AS "supplementContent",
...@@ -926,6 +931,7 @@ ...@@ -926,6 +931,7 @@
ON r.supplement_area = CR.id ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT LEFT JOIN ct_bbtc_bus_type CT
ON r.transfer_department = CT.id ON r.transfer_department = CT.id
LEFT JOIN ct_bbtc_sys_dict b on b.id = r.supplement_group
<where> <where>
r.report_status = #{processStatus} r.report_status = #{processStatus}
...@@ -970,7 +976,7 @@ ...@@ -970,7 +976,7 @@
r.report_status AS "reportStatus", r.report_status AS "reportStatus",
r.supplement_title AS "supplementTitle", r.supplement_title AS "supplementTitle",
r.supplement_type AS "supplementType", r.supplement_type AS "supplementType",
r.supplement_group AS "supplementGroup", b.label AS "supplementGroup",
r.supplement_category AS "supplementCategory", r.supplement_category AS "supplementCategory",
r.supplement_department AS "supplementDepartment", r.supplement_department AS "supplementDepartment",
r.supplement_informant AS "supplementInformant", r.supplement_informant AS "supplementInformant",
...@@ -987,7 +993,7 @@ ...@@ -987,7 +993,7 @@
ON r.supplement_area = CR.id ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT LEFT JOIN ct_bbtc_bus_type CT
ON r.transfer_department = CT.id ON r.transfer_department = CT.id
LEFT JOIN ct_bbtc_sys_dict b on b.id = r.supplement_group
<where> <where>
1 = 1 1 = 1
<if test="exchangeAfterUser != null and exchangeAfterUser != ''"> <if test="exchangeAfterUser != null and exchangeAfterUser != ''">
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
a.update_by AS "updateBy.id", a.update_by AS "updateBy.id",
a.update_date, a.update_date,
a.del_flag, a.del_flag,
a.supplement_group AS supplementGroup, b.label AS supplementGroup,
c.name AS "company.name", c.name AS "company.name",
c.parent_id AS "company.parent.id", c.parent_id AS "company.parent.id",
c.parent_ids AS "company.parentIds", c.parent_ids AS "company.parentIds",
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
LEFT JOIN ct_bbtc_sys_user cu2 ON cu2.id = c.deputy_person LEFT JOIN ct_bbtc_sys_user cu2 ON cu2.id = c.deputy_person
LEFT JOIN ct_bbtc_sys_user ou ON ou.id = o.primary_person LEFT JOIN ct_bbtc_sys_user ou ON ou.id = o.primary_person
LEFT JOIN ct_bbtc_sys_user ou2 ON ou2.id = o.deputy_person LEFT JOIN ct_bbtc_sys_user ou2 ON ou2.id = o.deputy_person
LEFT JOIN ct_bbtc_sys_dict b on b.id = a.supplement_group
<!-- <!--
LEFT JOIN ct_bbtc_sys_user2role ur ON ur.user_id = a.id LEFT JOIN ct_bbtc_sys_user2role ur ON ur.user_id = a.id
......
...@@ -53,11 +53,12 @@ ...@@ -53,11 +53,12 @@
${ctBbtcBusCategory.name} ${ctBbtcBusCategory.name}
</td> </td>
<td align="center"> <td align="center">
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3437402691677202102'}">集团本部</c:if> ${ctBbtcBusCategory.ctBbtcGroup}
<%-- <c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3437402691677202102'}">集团本部</c:if>
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3510129313047280678'}">区域集团</c:if> <c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3510129313047280678'}">区域集团</c:if>
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3565898923067676254'}">服务集团</c:if> <c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3565898923067676254'}">服务集团</c:if>
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3806696792996264972'}">文化集团</c:if> <c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3806696792996264972'}">文化集团</c:if>
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3770618512934949260'}">文旅集团</c:if> <c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3770618512934949260'}">文旅集团</c:if>--%>
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq null}">--</c:if> <c:if test="${ctBbtcBusCategory.ctBbtcGroup eq null}">--</c:if>
</td> </td>
<td> <td>
......
...@@ -139,11 +139,12 @@ ...@@ -139,11 +139,12 @@
<td></td> <td></td>
<td>${report.supplementTitle}</td> <td>${report.supplementTitle}</td>
<td align="center"> <td align="center">
<c:if test="${report.supplementGroup eq '3437402691677202102'}">集团本部</c:if> ${report.supplementGroup}
<c:if test="${report.supplementGroup eq '3510129313047280678'}">区域集团</c:if> <%-- <c:if test="${user.supplementGroup eq '30590306011301372591'}">集团本部</c:if>
<c:if test="${report.supplementGroup eq '3565898923067676254'}">服务集团</c:if> <c:if test="${user.supplementGroup eq '30676650749523023279'}">地产集团</c:if>
<c:if test="${report.supplementGroup eq '3806696792996264972'}">文化集团</c:if> <c:if test="${user.supplementGroup eq '30721878435509835919'}">服务集团</c:if>
<c:if test="${report.supplementGroup eq '3770618512934949260'}">文旅集团</c:if> <c:if test="${user.supplementGroup eq '30795782242187242020'}">文化集团</c:if>
<c:if test="${user.supplementGroup eq '30770202834994792595'}">文旅集团</c:if>--%>
<c:if test="${report.supplementGroup eq null}">--</c:if> <c:if test="${report.supplementGroup eq null}">--</c:if>
</td> </td>
<td align="center">${report.supplementArea}</td> <td align="center">${report.supplementArea}</td>
......
...@@ -311,12 +311,8 @@ ...@@ -311,12 +311,8 @@
<div class="control-group"> <div class="control-group">
<label class="control-label">所属集团:</label> <label class="control-label">所属集团:</label>
<div class="controls"> <div class="controls">
<c:if test="${report.supplementGroup eq '3437402691677202102'}"><input type="text" id="supplementGroup" value="集团本部" style="width: 270px"></c:if> <form:input id="supplementGroup" path="supplementGroup" htmlEscape="false" maxlength="200"
<c:if test="${report.supplementGroup eq '3510129313047280678'}"><input type="text" id="supplementGroup" value="区域集团" style="width: 270px"></c:if> class="input-xlarge required" value="${report.supplementGroup}"/>
<c:if test="${report.supplementGroup eq '3565898923067676254'}"><input type="text" id="supplementGroup" value="服务集团" style="width: 270px"></c:if>
<c:if test="${report.supplementGroup eq '3806696792996264972'}"><input type="text" id="supplementGroup" value="文化集团" style="width: 270px"></c:if>
<c:if test="${report.supplementGroup eq '3770618512934949260'}"><input type="text" id="supplementGroup" value="文旅集团" style="width: 270px"></c:if>
<c:if test="${report.supplementGroup eq null}"><input type="text" id="supplementGroup" value="--" style="width: 270px"></c:if>
</div> </div>
</div> </div>
......
...@@ -581,11 +581,12 @@ ...@@ -581,11 +581,12 @@
<c:forEach items="${page.list}" var="report" varStatus="vs"> <c:forEach items="${page.list}" var="report" varStatus="vs">
<tr> <tr>
<td align="center"> <td align="center">
<c:if test="${report.supplementGroup eq '3437402691677202102'}">集团本部</c:if> ${report.supplementGroup}
<c:if test="${report.supplementGroup eq '3510129313047280678'}">区域集团</c:if> <%-- <c:if test="${user.supplementGroup eq '30590306011301372591'}">集团本部</c:if>
<c:if test="${report.supplementGroup eq '3565898923067676254'}">服务集团</c:if> <c:if test="${user.supplementGroup eq '30676650749523023279'}">地产集团</c:if>
<c:if test="${report.supplementGroup eq '3806696792996264972'}">文化集团</c:if> <c:if test="${user.supplementGroup eq '30721878435509835919'}">服务集团</c:if>
<c:if test="${report.supplementGroup eq '3770618512934949260'}">文旅集团</c:if> <c:if test="${user.supplementGroup eq '30795782242187242020'}">文化集团</c:if>
<c:if test="${user.supplementGroup eq '30770202834994792595'}">文旅集团</c:if>--%>
<c:if test="${report.supplementGroup eq null}">--</c:if> <c:if test="${report.supplementGroup eq null}">--</c:if>
</td> </td>
...@@ -632,12 +633,13 @@ ...@@ -632,12 +633,13 @@
<c:if test="${report.dealResult eq '7'}">转为线索</c:if> <c:if test="${report.dealResult eq '7'}">转为线索</c:if>
</td> </td>
<td align="center"> <td align="center">
<c:if test="${report.transferGroup eq '3437402691677202102'}">集团本部--${report.transferDepartment}</c:if> ${report.transferGroup}--${report.transferDepartment}
<c:if test="${report.transferGroup eq '3510129313047280678'}">区域集团--${report.transferDepartment}</c:if> <%-- <c:if test="${report.transferGroup eq '30590306011301372591'}">集团本部--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3565898923067676254'}">服务集团--${report.transferDepartment}</c:if> <c:if test="${report.transferGroup eq '30676650749523023279'}">地产集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3806696792996264972'}">文化集团--${report.transferDepartment}</c:if> <c:if test="${report.transferGroup eq '30721878435509835919'}">服务集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3770618512934949260'}">文旅集团--${report.transferDepartment}</c:if> <c:if test="${report.transferGroup eq '30795782242187242020'}">文化集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq null}">--</c:if> <c:if test="${report.transferGroup eq '30770202834994792595'}">文旅集团--${report.transferDepartment}</c:if>--%>
<c:if test="${report.transferGroup eq null and report.transferDepartment eq null}">--</c:if>
<%--<c:if test="${report.transferDepartment eq null}">--</c:if> <%--<c:if test="${report.transferDepartment eq null}">--</c:if>
<c:if test="${report.transferDepartment eq '1'}">营销</c:if> <c:if test="${report.transferDepartment eq '1'}">营销</c:if>
<c:if test="${report.transferDepartment eq '2'}">工程</c:if> <c:if test="${report.transferDepartment eq '2'}">工程</c:if>
......
...@@ -578,11 +578,12 @@ ...@@ -578,11 +578,12 @@
<tr> <tr>
<%--跟据集团id 显示对应的集团名称--%> <%--跟据集团id 显示对应的集团名称--%>
<td align="center"> <td align="center">
<c:if test="${report.supplementGroup eq '3437402691677202102'}">集团本部</c:if> ${report.supplementGroup}
<c:if test="${report.supplementGroup eq '3510129313047280678'}">区域集团</c:if> <%-- <c:if test="${user.supplementGroup eq '30590306011301372591'}">集团本部</c:if>
<c:if test="${report.supplementGroup eq '3565898923067676254'}">服务集团</c:if> <c:if test="${user.supplementGroup eq '30676650749523023279'}">地产集团</c:if>
<c:if test="${report.supplementGroup eq '3806696792996264972'}">文化集团</c:if> <c:if test="${user.supplementGroup eq '30721878435509835919'}">服务集团</c:if>
<c:if test="${report.supplementGroup eq '3770618512934949260'}">文旅集团</c:if> <c:if test="${user.supplementGroup eq '30795782242187242020'}">文化集团</c:if>
<c:if test="${user.supplementGroup eq '30770202834994792595'}">文旅集团</c:if>--%>
<c:if test="${report.supplementGroup eq null}">--</c:if> <c:if test="${report.supplementGroup eq null}">--</c:if>
</td> </td>
<td align="center">${report.supplementArea}</td> <td align="center">${report.supplementArea}</td>
...@@ -627,12 +628,13 @@ ...@@ -627,12 +628,13 @@
<c:if test="${report.dealResult eq '7'}">转为线索</c:if> <c:if test="${report.dealResult eq '7'}">转为线索</c:if>
</td> </td>
<td align="center"> <td align="center">
<c:if test="${report.transferGroup eq '3437402691677202102'}">集团本部--${report.transferDepartment}</c:if> ${report.transferGroup}--${report.transferDepartment}
<c:if test="${report.transferGroup eq '3510129313047280678'}">区域集团--${report.transferDepartment}</c:if> <%-- <c:if test="${report.transferGroup eq '30590306011301372591'}">集团本部--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3565898923067676254'}">服务集团--${report.transferDepartment}</c:if> <c:if test="${report.transferGroup eq '30676650749523023279'}">地产集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3806696792996264972'}">文化集团--${report.transferDepartment}</c:if> <c:if test="${report.transferGroup eq '30721878435509835919'}">服务集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3770618512934949260'}">文旅集团--${report.transferDepartment}</c:if> <c:if test="${report.transferGroup eq '30795782242187242020'}">文化集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq null}">--</c:if> <c:if test="${report.transferGroup eq '30770202834994792595'}">文旅集团--${report.transferDepartment}</c:if>--%>
<c:if test="${report.transferGroup eq null and report.transferDepartment eq null}">--</c:if>
<%-- <c:if test="${report.transferDepartment eq null}">--</c:if> <%-- <c:if test="${report.transferDepartment eq null}">--</c:if>
<c:if test="${report.transferDepartment eq '1'}">营销</c:if> <c:if test="${report.transferDepartment eq '1'}">营销</c:if>
<c:if test="${report.transferDepartment eq '2'}">工程</c:if> <c:if test="${report.transferDepartment eq '2'}">工程</c:if>
......
...@@ -71,11 +71,12 @@ ...@@ -71,11 +71,12 @@
<td><a href="${ctx}/sys/user/form?id=${user.id}">${user.loginName}</a></td> <td><a href="${ctx}/sys/user/form?id=${user.id}">${user.loginName}</a></td>
<td>${user.name}</td> <td>${user.name}</td>
<td align="center"> <td align="center">
<c:if test="${user.supplementGroup eq '3437402691677202102'}">集团本部</c:if> ${user.supplementGroup}
<c:if test="${user.supplementGroup eq '3510129313047280678'}">区域集团</c:if> <%-- <c:if test="${user.supplementGroup eq '30590306011301372591'}">集团本部</c:if>
<c:if test="${user.supplementGroup eq '3565898923067676254'}">服务集团</c:if> <c:if test="${user.supplementGroup eq '30676650749523023279'}">地产集团</c:if>
<c:if test="${user.supplementGroup eq '3806696792996264972'}">文化集团</c:if> <c:if test="${user.supplementGroup eq '30721878435509835919'}">服务集团</c:if>
<c:if test="${user.supplementGroup eq '3770618512934949260'}">文旅集团</c:if> <c:if test="${user.supplementGroup eq '30795782242187242020'}">文化集团</c:if>
<c:if test="${user.supplementGroup eq '30770202834994792595'}">文旅集团</c:if>--%>
<c:if test="${user.supplementGroup eq null}">--</c:if> <c:if test="${user.supplementGroup eq null}">--</c:if>
</td> </td>
<td>${user.areaName}</td> <td>${user.areaName}</td>
......
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