Commit d75633da by 徐高华

审批条数

parent b0b6de5a
...@@ -13,7 +13,7 @@ import com.gic.haoban.manage.api.dto.BatchAuditLogDTO; ...@@ -13,7 +13,7 @@ import com.gic.haoban.manage.api.dto.BatchAuditLogDTO;
*/ */
public interface AuditApiService { public interface AuditApiService {
Page<AuditDTO> page(Integer auditType, String search,String wxEnterpriseId,String enterpriseId,Integer auditStatus,Integer auditFlag,BasePageInfo pageInfo); Page<AuditDTO> page(Integer auditType, String search,String wxEnterpriseId,String enterpriseId,Integer auditStatus,Integer auditFlag,BasePageInfo pageInfo , String clerkId);
String audit(String batchId,String auditId,String aduitName,String optStaffId); String audit(String batchId,String auditId,String aduitName,String optStaffId);
...@@ -42,4 +42,6 @@ public interface AuditApiService { ...@@ -42,4 +42,6 @@ public interface AuditApiService {
AuditDTO findByBindRelatedIdAndAuditType(String relatedId,int auditType); AuditDTO findByBindRelatedIdAndAuditType(String relatedId,int auditType);
boolean judgeHavePhoneNumberOrCode(String enterpriseId,String clerkCode,String phoneNumber); boolean judgeHavePhoneNumberOrCode(String enterpriseId,String clerkCode,String phoneNumber);
int getAuditCount(String enterpriseId , String clerkId) ;
} }
...@@ -24,7 +24,6 @@ public interface TabHaobanAuditMapper { ...@@ -24,7 +24,6 @@ public interface TabHaobanAuditMapper {
Page<TabHaobanAudit> pageForStoreIdsAndstaffIds(@Param("auditType")Integer auditType, @Param("storeIds")List<String> storeIds,@Param("staffIds")List<String>staffIds,@Param("wxEnterpriseId")String wxEnterpriseId, @Param("enterpriseId")String enterpriseId,@Param("auditStatus")Integer auditStatus,@Param("auditFlag")Integer auditFlag ); Page<TabHaobanAudit> pageForStoreIdsAndstaffIds(@Param("auditType")Integer auditType, @Param("storeIds")List<String> storeIds,@Param("staffIds")List<String>staffIds,@Param("wxEnterpriseId")String wxEnterpriseId, @Param("enterpriseId")String enterpriseId,@Param("auditStatus")Integer auditStatus,@Param("auditFlag")Integer auditFlag );
List<TabHaobanAudit> listByStoreId(String storeId); List<TabHaobanAudit> listByStoreId(String storeId);
TabHaobanAudit findByStoreIdAndChangeField(@Param("storeId")String storeId,@Param("changeField")String changeField); TabHaobanAudit findByStoreIdAndChangeField(@Param("storeId")String storeId,@Param("changeField")String changeField);
...@@ -37,5 +36,5 @@ public interface TabHaobanAuditMapper { ...@@ -37,5 +36,5 @@ public interface TabHaobanAuditMapper {
List<TabHaobanAudit> judgeHavePhoneNumberOrCode(@Param("enterpriseId")String enterpriseId,@Param("clerkCode")String clerkCode, @Param("phoneNumber")String phoneNumber); List<TabHaobanAudit> judgeHavePhoneNumberOrCode(@Param("enterpriseId")String enterpriseId,@Param("clerkCode")String clerkCode, @Param("phoneNumber")String phoneNumber);
int getAuditCount(String enterpriseId , @Param("storeIds")List<String> storeIds) ; int getAuditCount(@Param("enterpriseId")String enterpriseId , @Param("storeIds")List<String> storeIds) ;
} }
\ No newline at end of file
...@@ -30,6 +30,8 @@ import com.gic.haoban.manage.service.entity.TabHaobanAudit; ...@@ -30,6 +30,8 @@ import com.gic.haoban.manage.service.entity.TabHaobanAudit;
import com.gic.haoban.manage.service.entity.TabHaobanBatchAuditLog; import com.gic.haoban.manage.service.entity.TabHaobanBatchAuditLog;
import com.gic.haoban.manage.service.entity.TabHaobanStaff; import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -72,9 +74,8 @@ public class AuditApiServiceImpl implements AuditApiService { ...@@ -72,9 +74,8 @@ public class AuditApiServiceImpl implements AuditApiService {
@Override @Override
public Page<AuditDTO> page(Integer auditType, String search, String wxEnterpriseId, public Page<AuditDTO> page(Integer auditType, String search, String wxEnterpriseId,
String enterpriseId, Integer auditStatus, Integer auditFlag, BasePageInfo pageInfo) { String enterpriseId, Integer auditStatus, Integer auditFlag, BasePageInfo pageInfo , String clerkId) {
//部门关联表修改,服务层调整 //部门关联表修改,服务层调整
List<String> departmentIds = new ArrayList<>();
List<String> staffIds = new ArrayList<>(); List<String> staffIds = new ArrayList<>();
List<String> storeIds = new ArrayList<>(); List<String> storeIds = new ArrayList<>();
if (StringUtils.isNotEmpty(search)) { if (StringUtils.isNotEmpty(search)) {
...@@ -504,4 +505,12 @@ public class AuditApiServiceImpl implements AuditApiService { ...@@ -504,4 +505,12 @@ public class AuditApiServiceImpl implements AuditApiService {
return !CollectionUtil.isEmpty(list); return !CollectionUtil.isEmpty(list);
} }
public int getAuditCount(String enterpriseId , String clerkId) {
List<String> storeIdList = null ;
if(CollectionUtils.isEmpty(storeIdList)) {
storeIdList = null ;
}
return this.auditMapper.getAuditCount(enterpriseId, storeIdList) ;
}
} }
...@@ -444,8 +444,17 @@ ...@@ -444,8 +444,17 @@
) )
</select> </select>
<select id="getAuditCount"> <select id="getAuditCount" resultType="int">
select count(*) from tab_haoban_audit where enterprise_id=#{enterpriseId}
<if test="null != storeIds">
and
( commit_store_id in
<foreach collection="storeIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
)
and audit_status = 0
</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -79,7 +79,8 @@ public class AuditController extends WebBaseController{ ...@@ -79,7 +79,8 @@ public class AuditController extends WebBaseController{
if(StringUtils.isAnyBlank(wxEnterpriseId)){ if(StringUtils.isAnyBlank(wxEnterpriseId)){
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
Page<AuditDTO> page = auditApiService.page(auditType, search, wxEnterpriseId,enterpriseId, auditStatus,auditFlag, pageInfo); String clerkId = AuthWebRequestUtil.getLoginUser().getClerkId() ;
Page<AuditDTO> page = auditApiService.page(auditType, search, wxEnterpriseId,enterpriseId, auditStatus,auditFlag, pageInfo ,clerkId);
List<AuditDTO> list = page.getResult(); List<AuditDTO> list = page.getResult();
List<String> storeIds = list.stream().map(s->s.getCommitStoreId()).collect(Collectors.toList()); List<String> storeIds = list.stream().map(s->s.getCommitStoreId()).collect(Collectors.toList());
String[] array=storeIds.toArray(new String[storeIds.size()]); String[] array=storeIds.toArray(new String[storeIds.size()]);
...@@ -236,4 +237,13 @@ public class AuditController extends WebBaseController{ ...@@ -236,4 +237,13 @@ public class AuditController extends WebBaseController{
List<BatchAuditLogDTO> list = auditApiService.listBatchLog(batchId); List<BatchAuditLogDTO> list = auditApiService.listBatchLog(batchId);
return resultResponse(HaoBanErrCode.ERR_1,list); return resultResponse(HaoBanErrCode.ERR_1,list);
} }
@RequestMapping("get-audit-count")
public HaobanResponse getAuditCount() {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
String eid = login.getEnterpriseId() ;
String clerkId = login.getClerkId() ;
int count = this.auditApiService.getAuditCount(eid,clerkId) ;
return this.success(count) ;
}
} }
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