Commit cc7d594d by 徐高华

审批记录根据店长和管理员过滤

parent 961cdfd3
...@@ -32,7 +32,7 @@ public interface AuditApiService { ...@@ -32,7 +32,7 @@ public interface AuditApiService {
Page<AuditDTO> listByStaffId(String staffId,Integer auditType,Integer auditStatus,String enterpriseId, BasePageInfo pageInfo); Page<AuditDTO> listByStaffId(String staffId,Integer auditType,Integer auditStatus,String enterpriseId, BasePageInfo pageInfo);
Page<AuditDTO> pageStoreListByParams(List<String> storeIds, BasePageInfo pageInfo, Page<AuditDTO> pageStoreListByParams(List<String> storeIds, BasePageInfo pageInfo,
Integer auditType, Integer auditStatus,String wxEnterpriseId,String enterpriseId); Integer auditType, Integer auditStatus,String wxEnterpriseId,String enterpriseId,String clerkId);
AuditDTO findById(String auditId); AuditDTO findById(String auditId);
......
...@@ -36,7 +36,7 @@ public interface TabHaobanAuditMapper { ...@@ -36,7 +36,7 @@ public interface TabHaobanAuditMapper {
@Param("auditType") Integer auditType, @Param("auditType") Integer auditType,
@Param("auditStatus") Integer auditStatus, @Param("auditStatus") Integer auditStatus,
@Param("wxEnterpriseId") String wxEnterpriseId, @Param("wxEnterpriseId") String wxEnterpriseId,
@Param("enterpriseId") String enterpriseId); @Param("enterpriseId") String enterpriseId , @Param("clerkType")int clerkType);
TabHaobanAudit findByBindRelatedIdAndAuditType(@Param("relatedId") String relatedId, TabHaobanAudit findByBindRelatedIdAndAuditType(@Param("relatedId") String relatedId,
@Param("auditType") int auditType, @Param("auditType") int auditType,
......
...@@ -412,9 +412,11 @@ public class AuditApiServiceImpl implements AuditApiService { ...@@ -412,9 +412,11 @@ public class AuditApiServiceImpl implements AuditApiService {
@Override @Override
public Page<AuditDTO> pageStoreListByParams(List<String> storeIds, BasePageInfo pageInfo, Integer auditType, public Page<AuditDTO> pageStoreListByParams(List<String> storeIds, BasePageInfo pageInfo, Integer auditType,
Integer auditStatus, String wxEnterpriseId, String enterpriseId) { Integer auditStatus, String wxEnterpriseId, String enterpriseId,String clerkId) {
ClerkDTO clerkDTO = this.clerkService.getclerkById(clerkId) ;
int clerkType = clerkDTO.getClerkType() ;
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize()); PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
return PageUtil.changePageHelperToCurrentPage(auditMapper.pageStoreListByParams(storeIds, auditType, auditStatus, wxEnterpriseId, enterpriseId), AuditDTO.class); return PageUtil.changePageHelperToCurrentPage(auditMapper.pageStoreListByParams(storeIds, auditType, auditStatus, wxEnterpriseId, enterpriseId,clerkType), AuditDTO.class);
} }
public void insertBatchLog(String batchId, int auditResult, TabHaobanAudit tab) { public void insertBatchLog(String batchId, int auditResult, TabHaobanAudit tab) {
......
...@@ -210,9 +210,11 @@ ...@@ -210,9 +210,11 @@
from tab_haoban_audit from tab_haoban_audit
where where
status_flag = 1 status_flag = 1
<if test="clerkType==1">
<if test="auditType == null || auditType == -1"> <if test="auditType == null || auditType == -1">
and audit_type in (2,3,4,5) and audit_type in (2,3,4,5)
</if> </if>
</if>
<if test="auditType != null and auditType != -1"> <if test="auditType != null and auditType != -1">
and audit_type = #{auditType} and audit_type = #{auditType}
</if> </if>
......
...@@ -145,7 +145,7 @@ public class AuditController extends WebBaseController { ...@@ -145,7 +145,7 @@ public class AuditController extends WebBaseController {
if (storeIds.contains("-1")) { if (storeIds.contains("-1")) {
storeIds = null; storeIds = null;
} }
Page<AuditDTO> page = auditApiService.pageStoreListByParams(storeIds, pageInfo, auditType, auditStatus, wxEnterpriseId, enterpriseId); Page<AuditDTO> page = auditApiService.pageStoreListByParams(storeIds, pageInfo, auditType, auditStatus, wxEnterpriseId, enterpriseId,clerkId);
List<AuditDTO> list = page.getResult(); List<AuditDTO> list = page.getResult();
List<AuditVO> voList = new ArrayList<AuditVO>(); List<AuditVO> voList = new ArrayList<AuditVO>();
for (AuditDTO auditDTO : list) { for (AuditDTO auditDTO : list) {
......
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