Commit 81720f74 by 墨竹

feat:审核数量调整

parent 3ca80fe1
......@@ -50,5 +50,6 @@ public interface TabHaobanAuditMapper {
int getAuditCount(@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("enterpriseId") String enterpriseId,
@Param("relatedId") String relatedId,
@Param("storeIds") List<String> storeIds);
}
\ No newline at end of file
......@@ -77,8 +77,7 @@ public class AuditApiServiceImpl implements AuditApiService {
String enterpriseId, Integer auditStatus, Integer auditFlag, BasePageInfo pageInfo, String clerkId) {
List<String> storeIdList = this.getStoreIdList(enterpriseId, clerkId);
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
com.github.pagehelper.Page<TabHaobanAudit> page = new com.github.pagehelper.Page<TabHaobanAudit>();
page = auditMapper.page(wxEnterpriseId, auditType, storeIdList, search, enterpriseId, auditStatus, auditFlag);
com.github.pagehelper.Page<TabHaobanAudit> page = auditMapper.page(wxEnterpriseId, auditType, storeIdList, search, enterpriseId, auditStatus, auditFlag);
if (CollectionUtil.isNotEmpty(page.getResult())) {
List<String> commitStaffIds = page.getResult().stream().filter(item -> StringUtils.isBlank(item.getCommitStaffName())).map(s -> s.getCommitStaffId()).collect(Collectors.toList());
logger.info(JSON.toJSONString(commitStaffIds));
......@@ -396,9 +395,9 @@ public class AuditApiServiceImpl implements AuditApiService {
}
@Override
public Page<AuditDTO> listByStaffId(String staffId, Integer auditType, Integer auditStatus,String enterpriseId, BasePageInfo pageInfo) {
public Page<AuditDTO> listByStaffId(String staffId, Integer auditType, Integer auditStatus, String enterpriseId, BasePageInfo pageInfo) {
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
return PageUtil.changePageHelperToCurrentPage(auditMapper.listByStaffId(staffId, auditType, auditStatus,enterpriseId), AuditDTO.class);
return PageUtil.changePageHelperToCurrentPage(auditMapper.listByStaffId(staffId, auditType, auditStatus, enterpriseId), AuditDTO.class);
}
@Override
......@@ -443,23 +442,38 @@ public class AuditApiServiceImpl implements AuditApiService {
}
@Override
public AuditDTO findByBindRelatedIdAndAuditType(String relatedId, int auditType,String wxEnterpriseId,String enterpriseId) {
TabHaobanAudit tab = auditMapper.findByBindRelatedIdAndAuditType(relatedId, auditType,wxEnterpriseId,enterpriseId);
public AuditDTO findByBindRelatedIdAndAuditType(String relatedId, int auditType, String wxEnterpriseId, String enterpriseId) {
TabHaobanAudit tab = auditMapper.findByBindRelatedIdAndAuditType(relatedId, auditType, wxEnterpriseId, enterpriseId);
return EntityUtil.changeEntityByJSON(AuditDTO.class, tab);
}
@Override
public boolean judgeHavePhoneNumberOrCode(String enterpriseId,
String clerkCode, String phoneNumber,String wxEnterpriseId) {
List<TabHaobanAudit> list = auditMapper.judgeHavePhoneNumberOrCode(enterpriseId, clerkCode, phoneNumber,wxEnterpriseId);
String clerkCode, String phoneNumber, String wxEnterpriseId) {
List<TabHaobanAudit> list = auditMapper.judgeHavePhoneNumberOrCode(enterpriseId, clerkCode, phoneNumber, wxEnterpriseId);
return !CollectionUtil.isEmpty(list);
}
@Override
public int getAuditCount(String wxEnterpriseId, String enterpriseId, String clerkId) {
// 如果null,说明是所有门店
List<String> storeIdList = this.getStoreIdList(enterpriseId, clerkId);
return this.auditMapper.getAuditCount(wxEnterpriseId, enterpriseId, storeIdList);
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(clerkId);
if (clerkDTO == null) {
return 0;
}
List<String> storeIdList = new ArrayList<>();
Integer clerkType = clerkDTO.getClerkType();
String storeId = clerkDTO.getStoreId();
if (clerkType == 2) {
// 如果null,说明是所有门店
storeIdList = this.getStoreIdList(enterpriseId, clerkId);
} else {
storeIdList.add(storeId);
//店长查询门店
if (clerkType == 1) {
clerkId = null;
}
}
return this.auditMapper.getAuditCount(wxEnterpriseId, enterpriseId, clerkId, storeIdList);
}
@SuppressWarnings("unchecked")
......
......@@ -277,6 +277,9 @@
)
</if>
and audit_status = 0
<if test="relatedId != null and relatedId != ''">
and related_Id = #{relatedId}
</if>
</select>
</mapper>
\ No newline at end of file
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