清理没有清理干净的代码
parent
ed35bee4e7
commit
4def584a0a
|
|
@ -28,7 +28,6 @@ import com.whdc.model.dto.AutoCallDto;
|
|||
import com.whdc.model.autocall.AutoCall;
|
||||
import com.whdc.model.autocall.AutoCallPerson;
|
||||
import com.whdc.model.autocall.AutoCallTask;
|
||||
import com.whdc.model.entity.WarnCallMap;
|
||||
import com.whdc.utils.DateUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -54,8 +53,6 @@ import java.util.List;
|
|||
public class AutoCallApiService {
|
||||
@Autowired
|
||||
private AutoCallMapper autoCallMapper;
|
||||
@Autowired
|
||||
private WarnCallMapMapper warnCallMapMapper;
|
||||
|
||||
private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
|
|
@ -130,63 +127,7 @@ public class AutoCallApiService {
|
|||
return pageResult;
|
||||
}
|
||||
|
||||
public Page<WarnCallMap> page(AutoCallDto dto) {
|
||||
Date stm = null;
|
||||
Date etm = null;
|
||||
try {
|
||||
if (dto.getStm() != null && dto.getEtm() != null) {
|
||||
stm = DateUtils.formatD(dto.getStm(), DateUtils.DATE_PATTERN1);
|
||||
etm = DateUtils.formatD(dto.getEtm(), DateUtils.DATE_PATTERN1);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (stm != null) stm = DateUtils.standardize(stm, true);
|
||||
if (etm != null) etm = DateUtils.standardize(etm, false);
|
||||
|
||||
QueryWrapper<WarnCallMap> query = new QueryWrapper<WarnCallMap>()
|
||||
.eq("should_generate", 1)
|
||||
.orderByDesc("id")
|
||||
.between("warn_tm", stm, etm);
|
||||
if (dto.getCallIsPut() != null) {
|
||||
if (dto.getCallIsPut()) {
|
||||
query.eq("call_is_put", 1);
|
||||
} else {
|
||||
query.eq("call_is_put", 0);
|
||||
}
|
||||
}
|
||||
Page pageParam = dto.getPage().getPage();
|
||||
Page<WarnCallMap> pageResult = warnCallMapMapper.selectPage(
|
||||
pageParam,
|
||||
query
|
||||
);
|
||||
List<WarnCallMap> records = pageResult.getRecords();
|
||||
if (records.size() > 0) {
|
||||
for (WarnCallMap record : records) {
|
||||
Integer wcmId = record.getId();
|
||||
List<AutoCall> autoCallList = autoCallMapper.selectList(
|
||||
new QueryWrapper<AutoCall>()
|
||||
.eq("wcm_id", wcmId)
|
||||
);
|
||||
record.setCallList(autoCallList);
|
||||
}
|
||||
}
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
public List<WarnCallMap> listCallIsNotPut() {
|
||||
List<WarnCallMap> wcmList = warnCallMapMapper.listCallIsNotPutWcm();
|
||||
for (WarnCallMap record : wcmList) {
|
||||
Integer wcmId = record.getId();
|
||||
List<AutoCall> autoCallList = autoCallMapper.selectList(
|
||||
new QueryWrapper<AutoCall>()
|
||||
.eq("wcm_id", wcmId)
|
||||
);
|
||||
record.setCallList(autoCallList);
|
||||
}
|
||||
return wcmList;
|
||||
}
|
||||
@Autowired
|
||||
@Autowired
|
||||
private AutoCallTaskMapper taskMapper;
|
||||
@Autowired
|
||||
private AutoCallPersonMapper personMapper;
|
||||
|
|
|
|||
Loading…
Reference in New Issue