|
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fdkankan.manage_jp.vo.request.ContractorParam;
|
|
|
import com.fdkankan.manage_jp.vo.request.SceneParam;
|
|
|
import com.fdkankan.manage_jp.vo.response.GroupByCount;
|
|
|
+import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.util.StringUtil;
|
|
@@ -46,6 +47,8 @@ public class TmContractorServiceImpl extends ServiceImpl<ITmContractorMapper, Tm
|
|
|
IScenePlusService scenePlusService;
|
|
|
@Autowired
|
|
|
ISceneProService sceneProService;
|
|
|
+ @Autowired
|
|
|
+ RabbitMqProducer rabbitMqProducer;
|
|
|
|
|
|
@Override
|
|
|
public Page<TmContractor> pageList(ContractorParam param) {
|
|
@@ -116,6 +119,17 @@ public class TmContractorServiceImpl extends ServiceImpl<ITmContractorMapper, Tm
|
|
|
if(param.getContractorId() == null ||param.getDetailIds() == null || param.getDetailIds().isEmpty()){
|
|
|
throw new BusinessException(ResultCode.PARAM_ERROR);
|
|
|
}
|
|
|
+ TmContractor tmContractor = this.getById(param.getContractorId());
|
|
|
+ if(tmContractor != null){
|
|
|
+ HashMap<String,Object> map = new HashMap<>();
|
|
|
+ String contractorAccount = tmContractor.getContractorAccount();
|
|
|
+ List<TmContractorNum> tmContractorNumList = tmContractorNumService.listByIds(param.getDetailIds());
|
|
|
+ List<String> numList = tmContractorNumList.stream().map(TmContractorNum::getNum).collect(Collectors.toList());
|
|
|
+ map.put("contractorAccount",contractorAccount);
|
|
|
+ map.put("numList",numList);
|
|
|
+ map.put("command","unCollaborate");
|
|
|
+ rabbitMqProducer.sendByWorkQueue("manage-collaborate-msg-notice",map);
|
|
|
+ }
|
|
|
tmContractorNumService.removeByIds(param.getDetailIds());
|
|
|
List<TmContractorNum> contractorIds = tmContractorNumService.getByContractorIds(Arrays.asList(param.getContractorId()));
|
|
|
if(contractorIds.size() <=0){
|