Commit 0f8c65e6 by fudahua

绑定流程门店下判断

parent b639ede0
......@@ -17,8 +17,12 @@ import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.EnterpriseService;
import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.contacts.manage.api.enums.AuditStatusEnum;
import com.gic.haoban.manage.api.dto.AuditDTO;
import com.gic.haoban.manage.api.dto.StaffClerkInfoDTO;
import com.gic.haoban.manage.api.enums.AuditType;
import com.gic.haoban.manage.api.service.AuditApiService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -45,6 +49,11 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
private StoreService storeService;
@Autowired
private TabHaobanStaffClerkRelationMapper tabHaobanStaffClerkRelationMapper;
@Autowired
private AuditApiService auditApiService;
@Override
public List<StaffClerkRelationDTO> listBindCode(String enterpriseId, Set<String> clerkCodeList) {
return staffClerkRelatinService.listBindCode(enterpriseId,clerkCodeList);
......@@ -110,6 +119,12 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
response.setMessage("已经被绑定,不能绑定");
return response;
}
AuditDTO auditDTO = auditApiService.findByBindRelatedIdAndAuditType(staffClerkRelationDTO.getClerkId(), AuditType.CLERK_BIND.getCode());
if (null != auditDTO) {
response.setCode(4);
response.setMessage("该导购已经被被申请绑定,请审核处理后再绑定");
return response;
}
StaffClerkRelationDTO storeHasBind = staffClerkRelatinService.getOneBindByStoreId(staffClerkRelationDTO.getStaffId(), staffClerkRelationDTO.getStoreId());
if (storeHasBind!=null) {
response.setCode(3);
......
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