Commit d0b0eeb5 by 墨竹

feat:审核增加查询条件

parent 83809a27
......@@ -31,7 +31,8 @@ public interface AuditApiService {
Page<AuditDTO> listByStaffId(String staffId,Integer auditType,Integer auditStatus, BasePageInfo pageInfo);
Page<AuditDTO> pageStoreListByParams(List<String> storeIds, BasePageInfo pageInfo, Integer auditType, Integer auditStatus);
Page<AuditDTO> pageStoreListByParams(List<String> storeIds, BasePageInfo pageInfo,
Integer auditType, Integer auditStatus,String wxEnterpriseId,String enterpriseId);
AuditDTO findById(String auditId);
......
......@@ -14,19 +14,23 @@ public interface TabHaobanAuditMapper {
int updateByPrimaryKeySelective(TabHaobanAudit record);
Page<TabHaobanAudit> page(@Param("wxEnterpriseId")String wxEnterpriseId , @Param("auditType")Integer auditType, @Param("storeIds")List<String> storeIds,@Param("searchParams") String search, @Param("enterpriseId")String enterpriseId,@Param("auditStatus")Integer auditStatus,@Param("auditFlag")Integer auditFlag );
Page<TabHaobanAudit> page(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("auditType") Integer auditType, @Param("storeIds") List<String> storeIds, @Param("searchParams") String search, @Param("enterpriseId") String enterpriseId, @Param("auditStatus") Integer auditStatus, @Param("auditFlag") Integer auditFlag);
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);
com.github.pagehelper.Page listByStaffId(@Param("staffId")String staffId,@Param("auditType")Integer auditType,@Param("auditStatus")Integer auditStatus);
com.github.pagehelper.Page listByStaffId(@Param("staffId") String staffId, @Param("auditType") Integer auditType, @Param("auditStatus") Integer auditStatus);
com.github.pagehelper.Page pageStoreListByParams(@Param("storeIds")List<String> storeIds, @Param("auditType")Integer auditType, @Param("auditStatus")Integer auditStatus);
com.github.pagehelper.Page pageStoreListByParams(@Param("storeIds") List<String> storeIds,
@Param("auditType") Integer auditType,
@Param("auditStatus") Integer auditStatus,
@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("enterpriseId") String enterpriseId);
TabHaobanAudit findByBindRelatedIdAndAuditType(@Param("relatedId")String relatedId,@Param("auditType")int auditType);
TabHaobanAudit findByBindRelatedIdAndAuditType(@Param("relatedId") String relatedId, @Param("auditType") int auditType);
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(@Param("wxEnterpriseId")String wxEnterpriseId,@Param("enterpriseId")String enterpriseId , @Param("storeIds")List<String> storeIds) ;
int getAuditCount(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("enterpriseId") String enterpriseId, @Param("storeIds") List<String> storeIds);
}
\ No newline at end of file
......@@ -68,8 +68,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
private ClerkService clerkService;
@Override
public List<StaffClerkRelationDTO> listBindCode(String wxEnterpriseId,String enterpriseId, Set<String> clerkCodeList) {
return EntityUtil.changeEntityListByJSON(StaffClerkRelationDTO.class, mapper.listBindCode(wxEnterpriseId,enterpriseId, clerkCodeList));
public List<StaffClerkRelationDTO> listBindCode(String wxEnterpriseId, String enterpriseId, Set<String> clerkCodeList) {
return EntityUtil.changeEntityListByJSON(StaffClerkRelationDTO.class, mapper.listBindCode(wxEnterpriseId, enterpriseId, clerkCodeList));
}
@Override
......@@ -79,7 +79,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
@Override
public boolean delBind(String oldClerkId, String optStaffId, int channelCode, String newClerkId) {
TabHaobanStaffClerkRelation clerkRelation = mapper.getByClerkId(oldClerkId,null);
TabHaobanStaffClerkRelation clerkRelation = mapper.getByClerkId(oldClerkId, null);
if (null == clerkRelation) {
logger.info("老的绑定关联不存在,clerkId={}", oldClerkId);
return true;
......@@ -163,13 +163,13 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
String staffClerkRelationId = insert(dto);
if (StringUtils.isNotBlank(staffClerkRelationId)) {
String wxEnterpriseId = dto.getWxEnterpriseId();
clerkMainStoreRelatedService.getMainStoreByStaffId(staffId, wxEnterpriseId);
//推入日志
staffClerkBindLogService.pushToMq(staffId, optStaffId, BindTypeEnum.BIND.getVal(), channelCode, staffClerkRelationId);
Integer manageFlag = dto.getManageFlag();
//导购和店长需要设置主门店
if (manageFlag != null && manageFlag == 1) {
return staffClerkRelationId;
}
//do nothing
} else {
logger.info("设置主门店并创建活码:manageFlag:{},staffId:{}", manageFlag, staffId);
clerkMainStoreRelatedService.getMainStoreByStaffId(staffId, wxEnterpriseId);
// 绑定自动创建活码
HmQrcodeQDTO hmQrcodeQDTO = new HmQrcodeQDTO();
hmQrcodeQDTO.setHmType(1);
......@@ -182,6 +182,9 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
hmQrcodeQDTO.setInvokingType(channelCode);
hmQrcodeApiService.add(hmQrcodeQDTO);
}
//推入日志
staffClerkBindLogService.pushToMq(staffId, optStaffId, BindTypeEnum.BIND.getVal(), channelCode, staffClerkRelationId);
}
return staffClerkRelationId;
}
......@@ -245,13 +248,13 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
@Override
public StaffClerkRelationDTO getByClerkId(String clerkId) {
return EntityUtil.changeEntityByJSON(StaffClerkRelationDTO.class, mapper.getByClerkId(clerkId,null));
return EntityUtil.changeEntityByJSON(StaffClerkRelationDTO.class, mapper.getByClerkId(clerkId, null));
}
@Override
public StaffClerkRelationDTO getByClerkId(String clerkId, String wxEnterpriseId) {
TabHaobanStaffClerkRelation staffClerkRelation = mapper.getByClerkId(clerkId, wxEnterpriseId);
return EntityUtil.changeEntityNew(StaffClerkRelationDTO.class,staffClerkRelation);
return EntityUtil.changeEntityNew(StaffClerkRelationDTO.class, staffClerkRelation);
}
@Override
......@@ -259,7 +262,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
if (CollectionUtils.isEmpty(clerkList)) {
return Collections.EMPTY_LIST;
}
return mapper.listByClerkIds(clerkList,null);
return mapper.listByClerkIds(clerkList, null);
}
@Override
......
......@@ -403,9 +403,9 @@ public class AuditApiServiceImpl implements AuditApiService {
@Override
public Page<AuditDTO> pageStoreListByParams(List<String> storeIds, BasePageInfo pageInfo, Integer auditType,
Integer auditStatus) {
Integer auditStatus, String wxEnterpriseId, String enterpriseId) {
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
return PageUtil.changePageHelperToCurrentPage(auditMapper.pageStoreListByParams(storeIds, auditType, auditStatus), AuditDTO.class);
return PageUtil.changePageHelperToCurrentPage(auditMapper.pageStoreListByParams(storeIds, auditType, auditStatus, wxEnterpriseId, enterpriseId), AuditDTO.class);
}
public void insertBatchLog(String batchId, int auditResult, TabHaobanAudit tab) {
......
......@@ -187,8 +187,7 @@
select
<include refid="Base_Column_List"/>
from tab_haoban_audit
where 1=1
and commit_staff_id = #{staffId,jdbcType=VARCHAR}
where commit_staff_id = #{staffId,jdbcType=VARCHAR}
and status_flag = 1
<if test="auditType == null">
and audit_type in (2,3,4,5)
......@@ -217,6 +216,12 @@
<if test="auditStatus != null and auditStatus != -1">
and audit_status = #{auditStatus}
</if>
<if test="wxEnterpriseId != null">
and wx_enterprise_id = #{wxEnterpriseId}
</if>
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId}
</if>
<include refid="storeSql"></include>
order by update_time desc
</select>
......
......@@ -130,7 +130,8 @@ public class AuditController extends WebBaseController {
//门店记录列表
@RequestMapping("store-apply-list")
public HaobanResponse storeApplyList(String storeId, BasePageInfo pageInfo, Integer auditType, Integer auditStatus,Integer manageFlag,String clerkId) {
public HaobanResponse storeApplyList(String storeId, BasePageInfo pageInfo, Integer auditType,
Integer auditStatus, Integer manageFlag, String clerkId, String enterpriseId) {
WellDoneLoginDTO loginUser = this.getLoginUser();
String wxEnterpriseId = loginUser.getWxEnterpriseId();
List<String> storeIds = new ArrayList<>();
......@@ -146,7 +147,7 @@ public class AuditController extends WebBaseController {
if (storeIds.contains("-1")) {
storeIds = null;
}
Page<AuditDTO> page = auditApiService.pageStoreListByParams(storeIds, pageInfo, auditType, auditStatus);
Page<AuditDTO> page = auditApiService.pageStoreListByParams(storeIds, pageInfo, auditType, auditStatus, wxEnterpriseId, enterpriseId);
List<AuditDTO> list = page.getResult();
List<AuditVO> voList = new ArrayList<AuditVO>();
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