md
This commit is contained in:
parent
8466dafda4
commit
8d192b6072
@ -47,24 +47,14 @@ public class EmisBaseController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public void setPrivParams(BaseEntity entity){
|
public void setPrivParams(BaseEntity entity){
|
||||||
|
|
||||||
if(!(getLoginUser().getUser().isTopSite())){
|
|
||||||
try {
|
try {
|
||||||
entity.getParams().put("isPrivQuery", "T");
|
|
||||||
entity.getParams().put("privSiteCode", getLoginUser().getUser().getOwnerSiteCode());
|
entity.getParams().put("privSiteCode", getLoginUser().getUser().getOwnerSiteCode());
|
||||||
entity.getParams().put("privEmpCode", getLoginUser().getUser().getEmpCode());
|
entity.getParams().put("privEmpCode", getLoginUser().getUser().getEmpCode());
|
||||||
entity.getParams().put("privEmpName", getLoginUser().getUser().getEmpName());
|
entity.getParams().put("privEmpName", getLoginUser().getUser().getEmpName());
|
||||||
|
|
||||||
String info=JSON.toJSONString(entity.getParams());
|
|
||||||
System.out.println(info);
|
|
||||||
log.info(info);
|
|
||||||
|
|
||||||
}catch (Exception ex){
|
}catch (Exception ex){
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
|
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
entity.getParams().put("isPrivQuery", "F");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -156,14 +156,6 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<!-- <if test="params.isPrivQuery != null and params.isPrivQuery ='T'">-->
|
|
||||||
<!-- and (-->
|
|
||||||
<!-- create_site=#{params.privSiteCode}-->
|
|
||||||
<!-- )-->
|
|
||||||
<!-- </if>-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 获取订单最后一条扫描记录 -->
|
<!-- 获取订单最后一条扫描记录 -->
|
||||||
<select id="selectLastRecordByBillCode" parameterType="string" resultMap="EmisTmsScanRecordResult">
|
<select id="selectLastRecordByBillCode" parameterType="string" resultMap="EmisTmsScanRecordResult">
|
||||||
@ -261,30 +253,25 @@
|
|||||||
and sign_date <![CDATA[ <= ]]> #{params.endSignDate}
|
and sign_date <![CDATA[ <= ]]> #{params.endSignDate}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<!-- <if test="params.isUploadPic != null and params.isUploadPic = 1 ">-->
|
<if test="params.isUploadPic != null and params.isUploadPic == '1' ">
|
||||||
<!-- and pic_url is not null-->
|
and pic_url is not null
|
||||||
<!-- </if>-->
|
</if>
|
||||||
|
|
||||||
<!-- <if test="params.isUploadPic != null and params.isUploadPic = 0">-->
|
<if test="params.isUploadPic != null and params.isUploadPic == '0' ">
|
||||||
<!-- and pic_url is null-->
|
and pic_url is null
|
||||||
<!-- </if>-->
|
</if>
|
||||||
|
|
||||||
|
|
||||||
<if test="params.isPrivQuery != null and params.isPrivQuery ='T'">
|
<if test="params.isPrivQuery != null and params.isPrivQuery == 'T'">
|
||||||
and (
|
and (
|
||||||
1=1
|
scan_site_code in (
|
||||||
<if test="params.privSiteCode != null">
|
SELECT t1.site_code FROM (
|
||||||
AND scan_site_code in (
|
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||||
SELECT t1.site_code FROM (
|
#{params.privSiteCode} ) pd
|
||||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||||
#{params.privSiteCode} ) pd
|
UNION
|
||||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
SELECT #{params.privSiteCode} FROM dual
|
||||||
UNION
|
)
|
||||||
SELECT #{params.privSiteCode} FROM dual
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|||||||
@ -471,9 +471,17 @@
|
|||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|
||||||
<if test="params.isPrivQuery != null and params.isPrivQuery ='T'">
|
<if test="params.privSiteCode != null">
|
||||||
and (
|
and (
|
||||||
create_site=#{params.privSiteCode}
|
send_site_code in (
|
||||||
|
SELECT t1.site_code FROM (
|
||||||
|
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||||
|
#{params.privSiteCode} ) pd
|
||||||
|
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||||
|
UNION
|
||||||
|
SELECT #{params.privSiteCode} FROM dual
|
||||||
|
)
|
||||||
|
|
||||||
or salesmen=#{params.privEmpCode}
|
or salesmen=#{params.privEmpCode}
|
||||||
or payee=#{params.privEmpName}
|
or payee=#{params.privEmpName}
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user