/qxwarning/getDpple:获取预警信息的防御责任人修改为旧联系人。
parent
d134d847dc
commit
bcfacb94ed
|
|
@ -7,8 +7,10 @@ import com.whdc.model.dto.ApiDto;
|
|||
import com.whdc.model.dto.GroupWarningDto;
|
||||
import com.whdc.model.dto.WarnDppleDto;
|
||||
import com.whdc.model.entity.AddressBook;
|
||||
import com.whdc.model.entity.AddressBookOld;
|
||||
import com.whdc.model.entity.WarnMsgFB;
|
||||
import com.whdc.model.vo.*;
|
||||
import com.whdc.service.IAddressBookOldService;
|
||||
import com.whdc.service.IAddressBookService;
|
||||
import com.whdc.service.IAdinfoService;
|
||||
import com.whdc.service.IWarnMsgFBService;
|
||||
|
|
@ -43,7 +45,8 @@ import static com.whdc.controller.WarningController.THIS_REDIS_KEY;
|
|||
public class QXWarnController {
|
||||
@Autowired
|
||||
private IAddressBookService addressBookService;
|
||||
|
||||
@Autowired
|
||||
private IAddressBookOldService addressBookOldService;
|
||||
@Autowired
|
||||
private IAdinfoService adinfoService;
|
||||
|
||||
|
|
@ -97,12 +100,12 @@ public class QXWarnController {
|
|||
for(int i=0;i<cnnms.length;i++){
|
||||
String cnnm = cnnms[i];
|
||||
String cnnm2 = cnnm.replace("县","").replace("区","");
|
||||
String adcd = adinfoService.getAdcdByAdnm2(cnnm2);//根据区县的名字找到对应的adcd
|
||||
System.out.println(adcd);
|
||||
if (StringUtils.isNotBlank(adcd)){
|
||||
List<AddressBook> dpples = addressBookService.getListByAdnm(adcd);
|
||||
// String adcd = adinfoService.getAdcdByAdnm2(cnnm2);//根据区县的名字找到对应的adcd
|
||||
// System.out.println(adcd);
|
||||
if (StringUtils.isNotBlank(cnnm2)){
|
||||
List<AddressBookOld> dpples = addressBookOldService.getListByAdnm2(cnnm2);
|
||||
System.out.println("dpple个数:"+dpples.size());
|
||||
for(AddressBook dpple:dpples){
|
||||
for(AddressBookOld dpple:dpples){
|
||||
WarnDppleVO warndpple = new WarnDppleVO();
|
||||
warndpple.setCtnm(dto.getCtnm());
|
||||
warndpple.setCnnm(cnnm);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ package com.whdc.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.whdc.model.entity.AddressBookOld;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xusan
|
||||
|
|
@ -10,4 +13,6 @@ import com.whdc.model.entity.AddressBookOld;
|
|||
public interface AddressBookOldMapper extends BaseMapper<AddressBookOld> {
|
||||
|
||||
|
||||
List<AddressBookOld> getListByAdnm2(@Param("adnm")String adnm);
|
||||
// List<AddressBookOld> getListByAdnm(@Param("adnm") String adnm);
|
||||
}
|
||||
|
|
@ -3,6 +3,8 @@ package com.whdc.service;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.whdc.model.entity.AddressBookOld;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
|
|
@ -11,6 +13,5 @@ import com.whdc.model.entity.AddressBookOld;
|
|||
* @date 2024-05-11
|
||||
*/
|
||||
public interface IAddressBookOldService extends IService<AddressBookOld> {
|
||||
|
||||
|
||||
List<AddressBookOld> getListByAdnm2(String cnnm2);
|
||||
}
|
||||
|
|
@ -9,6 +9,8 @@ import com.whdc.model.entity.AddressBookOld;
|
|||
import com.whdc.service.IAddressBookOldService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
|
|
@ -20,4 +22,8 @@ import org.springframework.stereotype.Service;
|
|||
@Service
|
||||
public class AddressBookOldServiceImpl extends ServiceImpl<AddressBookOldMapper, AddressBookOld> implements IAddressBookOldService {
|
||||
|
||||
@Override
|
||||
public List<AddressBookOld> getListByAdnm2(String adnm) {
|
||||
return baseMapper.getListByAdnm2(adnm);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,13 @@
|
|||
LEFT JOIN ADINFO A ON AB.ADCD = A.ADCD
|
||||
WHERE AB.OPENID = #{id}
|
||||
</select>
|
||||
<select id="getListByAdnm2" resultType="com.whdc.model.entity.AddressBookOld">
|
||||
select * from ADDRESS_BOOK_OLD A
|
||||
where 1=1 and
|
||||
<if test="adnm != null and adnm != '' ">
|
||||
A.CNNM like CONCAT(#{adnm},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue