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