Commit 95312a8a by huangZW

111

parent 819ddff2
......@@ -12,7 +12,7 @@ import com.gic.haoban.manage.api.dto.AuditDTO;
*/
public interface AuditApiService {
Page<AuditDTO> page(Integer auditType, String search,String wxEnterpriseId,String enterpriseId,Integer auditStatus,BasePageInfo pageInfo);
Page<AuditDTO> page(Integer auditType, String search,String wxEnterpriseId,String enterpriseId,Integer auditStatus,Integer auditFlag,BasePageInfo pageInfo);
void audit(String auditId);
......
......@@ -20,7 +20,7 @@ public interface TabHaobanAuditMapper {
int updateByPrimaryKey(TabHaobanAudit record);
Page<TabHaobanAudit> page(@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 );
Page<TabHaobanAudit> page(@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);
......
......@@ -55,7 +55,7 @@ public class AuditApiServiceImpl implements AuditApiService{
@Override
public Page<AuditDTO> page(Integer auditType, String search,String wxEnterpriseId,
String enterpriseId,Integer auditStatus, BasePageInfo pageInfo) {
String enterpriseId,Integer auditStatus,Integer auditFlag, BasePageInfo pageInfo) {
List<String> storeIds = new ArrayList<>();
List<String> staffIds = new ArrayList<>();
if(StringUtils.isNotEmpty(search)){
......@@ -69,7 +69,7 @@ public class AuditApiServiceImpl implements AuditApiService{
}
}
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
com.github.pagehelper.Page<TabHaobanAudit> page = auditMapper.page(auditType, storeIds, staffIds, wxEnterpriseId,enterpriseId,auditStatus);
com.github.pagehelper.Page<TabHaobanAudit> page = auditMapper.page(auditType, storeIds, staffIds, wxEnterpriseId,enterpriseId,auditStatus,auditFlag);
return PageUtil.changePageHelperToCurrentPage( page,AuditDTO.class);
}
@Transactional
......
......@@ -286,12 +286,15 @@
<if test = "auditType != null">
and audit_type = #{auditType,jdbcType=INTEGER}
</if>
<if test = "auditStatus != null and auditStatus == 0">
<if test = "auditFlag != null and auditFlag == 0">
and audit_status = 0
</if>
<if test = "auditStatus != null and auditStatus != 0">
<if test = "auditFlag != null and auditFlag != 0">
and audit_status in (1,2)
</if>
<if test = "auditStatus != null">
and audit_status = #{auditStatus,jdbcType=INTEGER}
</if>
<include refid="storeSql"/>
<include refid="staffSql"/>
</select>
......
......@@ -86,14 +86,14 @@ public class AuditController extends WebBaseController{
}
//分页查找
@RequestMapping("find-page")
public HaobanResponse findPage(String wxEnterpriseId,String enterpriseId,String search,BasePageInfo pageInfo ,Integer auditType,Integer auditStatus ) {
if(auditStatus == null){
public HaobanResponse findPage(String wxEnterpriseId,String enterpriseId,String search,BasePageInfo pageInfo ,Integer auditType,Integer auditStatus,Integer auditFlag ) {
if(auditFlag == null){
return resultResponse(HaoBanErrCode.ERR_2);
}
if(StringUtils.isAnyBlank(wxEnterpriseId)){
return resultResponse(HaoBanErrCode.ERR_2);
}
Page<AuditDTO> page = auditApiService.page(auditType, search, wxEnterpriseId,enterpriseId, auditStatus, pageInfo);
Page<AuditDTO> page = auditApiService.page(auditType, search, wxEnterpriseId,enterpriseId, auditStatus,auditFlag, pageInfo);
List<AuditDTO> list = page.getResult();
List<String> storeIds = list.stream().map(s->s.getCommitStoreId()).collect(Collectors.toList());
String[] array=storeIds.toArray(new String[storeIds.size()]);
......
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