Commit 95312a8a by huangZW

111

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