|
@@ -75,6 +75,7 @@ public class BusJcbDmcgyqServiceImpl extends BusJcabServiceImpl implements IBusJ
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 获取检查表类型名
|
|
* 获取检查表类型名
|
|
|
|
|
+ *
|
|
|
* @return 类型名
|
|
* @return 类型名
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
@@ -93,10 +94,10 @@ public class BusJcbDmcgyqServiceImpl extends BusJcabServiceImpl implements IBusJ
|
|
|
return busJcbDmcgyqMapper.update(busJcbDmcgyq);
|
|
return busJcbDmcgyqMapper.update(busJcbDmcgyq);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void setPillarCode(BusJcbDmcgyq jcbDmcgyq){
|
|
|
|
|
- if(StringUtils.isNotEmpty(jcbDmcgyq.getGyqId())){
|
|
|
|
|
|
|
+ private void setPillarCode(BusJcbDmcgyq jcbDmcgyq) {
|
|
|
|
|
+ if (StringUtils.isNotEmpty(jcbDmcgyq.getGyqId())) {
|
|
|
BusDmcgyq dmcgyq = baseMapper.getInfo(jcbDmcgyq.getGyqId());
|
|
BusDmcgyq dmcgyq = baseMapper.getInfo(jcbDmcgyq.getGyqId());
|
|
|
- if(StringUtils.isNotNull(dmcgyq)){
|
|
|
|
|
|
|
+ if (StringUtils.isNotNull(dmcgyq)) {
|
|
|
jcbDmcgyq.setPillarArea(dmcgyq.getPillarArea());
|
|
jcbDmcgyq.setPillarArea(dmcgyq.getPillarArea());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -135,13 +136,13 @@ public class BusJcbDmcgyqServiceImpl extends BusJcabServiceImpl implements IBusJ
|
|
|
public int submit(BusJcbDmcgyq bean) {
|
|
public int submit(BusJcbDmcgyq bean) {
|
|
|
setSubmit(bean);
|
|
setSubmit(bean);
|
|
|
int ret;
|
|
int ret;
|
|
|
- if(StringUtils.isEmpty(bean.getId())){
|
|
|
|
|
|
|
+ if (StringUtils.isEmpty(bean.getId())) {
|
|
|
ret = create(bean);
|
|
ret = create(bean);
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
ret = update(bean);
|
|
ret = update(bean);
|
|
|
}
|
|
}
|
|
|
// 推送消息
|
|
// 推送消息
|
|
|
- if(ret > 0) {
|
|
|
|
|
|
|
+ if (ret > 0) {
|
|
|
pushSubmit(bean);
|
|
pushSubmit(bean);
|
|
|
}
|
|
}
|
|
|
return ret;
|
|
return ret;
|
|
@@ -175,12 +176,11 @@ public class BusJcbDmcgyqServiceImpl extends BusJcabServiceImpl implements IBusJ
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public String exportExcel(JcebQueryVo query) {
|
|
public String exportExcel(JcebQueryVo query) {
|
|
|
|
|
+ setJcebQuery(query);
|
|
|
List<BusJcbDmcgyq> list = busJcbDmcgyqMapper.getJcebList(query);
|
|
List<BusJcbDmcgyq> list = busJcbDmcgyqMapper.getJcebList(query);
|
|
|
List<BusJcbDmcgyq> resultList = new ArrayList<>();
|
|
List<BusJcbDmcgyq> resultList = new ArrayList<>();
|
|
|
list.forEach(
|
|
list.forEach(
|
|
|
- x -> {
|
|
|
|
|
- transDataForList(x, resultList);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ x -> transDataForList(x, resultList)
|
|
|
);
|
|
);
|
|
|
String fileName = "地磁感应器检测记录.xls";
|
|
String fileName = "地磁感应器检测记录.xls";
|
|
|
String templateFileName = "excel/template/地磁感应器检测记录.xls";
|
|
String templateFileName = "excel/template/地磁感应器检测记录.xls";
|
|
@@ -189,22 +189,19 @@ public class BusJcbDmcgyqServiceImpl extends BusJcabServiceImpl implements IBusJ
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 检测表list
|
|
* 检测表list
|
|
|
- * @param query
|
|
|
|
|
- * @return
|
|
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public List<BusJcbDmcgyq> getJcebList(JcebQueryVo query) {
|
|
public List<BusJcbDmcgyq> getJcebList(JcebQueryVo query) {
|
|
|
- List<BusJcbDmcgyq> list = busJcbDmcgyqMapper.getJcebList(query);
|
|
|
|
|
- List<BusJcbDmcgyq> resultList = new ArrayList<>();
|
|
|
|
|
- list.forEach(
|
|
|
|
|
- x -> {
|
|
|
|
|
- transDataForList(x, resultList);
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
- PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
|
|
- Integer pageNum = pageDomain.getPageNum();
|
|
|
|
|
- Integer pageSize = pageDomain.getPageSize();
|
|
|
|
|
- return resultList.stream().limit(pageSize * pageNum).collect(Collectors.toList());
|
|
|
|
|
|
|
+ setJcebQuery(query);
|
|
|
|
|
+ List<BusJcbDmcgyq> list = busJcbDmcgyqMapper.getJcebList(query);
|
|
|
|
|
+ List<BusJcbDmcgyq> resultList = new ArrayList<>();
|
|
|
|
|
+ list.forEach(
|
|
|
|
|
+ x -> transDataForList(x, resultList)
|
|
|
|
|
+ );
|
|
|
|
|
+ PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
|
|
+ Integer pageNum = pageDomain.getPageNum();
|
|
|
|
|
+ Integer pageSize = pageDomain.getPageSize();
|
|
|
|
|
+ return resultList.stream().limit((long) pageSize * pageNum).collect(Collectors.toList());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -217,84 +214,84 @@ public class BusJcbDmcgyqServiceImpl extends BusJcabServiceImpl implements IBusJ
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void transDataForList(BusJcbDmcgyq x, List<BusJcbDmcgyq> resultList) {
|
|
private void transDataForList(BusJcbDmcgyq x, List<BusJcbDmcgyq> resultList) {
|
|
|
- if(StringUtils.YES_VALUE.equals(x.getBspwgAzlg()) &&
|
|
|
|
|
- StringUtils.YES_VALUE.equals(x.getBspwgBsqx()) &&
|
|
|
|
|
- StringUtils.YES_VALUE.equals(x.getDgqwgBmqj()) &&
|
|
|
|
|
- StringUtils.YES_VALUE.equals(x.getDgqwgWzws()) &&
|
|
|
|
|
- StringUtils.YES_VALUE.equals(x.getDgqwgAzlg())) {
|
|
|
|
|
- x.setWsjbjsd("无");
|
|
|
|
|
- } else {
|
|
|
|
|
- x.setWsjbjsd("有");
|
|
|
|
|
- }
|
|
|
|
|
- BusDmcgyq busDmcgyq = baseMapper.getInfo(x.getGyqId());
|
|
|
|
|
- BusDmcgyq query = new BusDmcgyq();
|
|
|
|
|
- query.setXingbie(busDmcgyq.getXingbie());
|
|
|
|
|
- query.setFxmc(busDmcgyq.getFxmc());
|
|
|
|
|
- query.setDeptStationId(busDmcgyq.getDeptStationId());
|
|
|
|
|
- List<BusDmcgyq> busDmcgyqList = baseMapper.getList(query);
|
|
|
|
|
|
|
+ if (StringUtils.YES_VALUE.equals(x.getBspwgAzlg()) &&
|
|
|
|
|
+ StringUtils.YES_VALUE.equals(x.getBspwgBsqx()) &&
|
|
|
|
|
+ StringUtils.YES_VALUE.equals(x.getDgqwgBmqj()) &&
|
|
|
|
|
+ StringUtils.YES_VALUE.equals(x.getDgqwgWzws()) &&
|
|
|
|
|
+ StringUtils.YES_VALUE.equals(x.getDgqwgAzlg())) {
|
|
|
|
|
+ x.setWsjbjsd("无");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ x.setWsjbjsd("有");
|
|
|
|
|
+ }
|
|
|
|
|
+ BusDmcgyq busDmcgyq = baseMapper.getInfo(x.getGyqId());
|
|
|
|
|
+ BusDmcgyq query = new BusDmcgyq();
|
|
|
|
|
+ query.setXingbie(busDmcgyq.getXingbie());
|
|
|
|
|
+ query.setFxmc(busDmcgyq.getFxmc());
|
|
|
|
|
+ query.setDeptStationId(busDmcgyq.getDeptStationId());
|
|
|
|
|
+ List<BusDmcgyq> busDmcgyqList = baseMapper.getList(query);
|
|
|
|
|
|
|
|
- if(x.getDgqclG1() != null) {
|
|
|
|
|
- BusJcbDmcgyq g1detail = new BusJcbDmcgyq();
|
|
|
|
|
- x.setGyqNumber("G1");
|
|
|
|
|
- x.setScz(x.getDgqclG1());
|
|
|
|
|
- x.setCzlc(getCzlc(busDmcgyqList,"G1"));
|
|
|
|
|
- BeanUtils.copyBeanProp(g1detail, x);
|
|
|
|
|
- resultList.add(g1detail);
|
|
|
|
|
- }
|
|
|
|
|
- if(x.getDgqclG2() != null) {
|
|
|
|
|
- BusJcbDmcgyq g2detail = new BusJcbDmcgyq();
|
|
|
|
|
- x.setGyqNumber("G2");
|
|
|
|
|
- x.setScz(x.getDgqclG2());
|
|
|
|
|
- x.setCzlc(getCzlc(busDmcgyqList,"G2"));
|
|
|
|
|
- BeanUtils.copyBeanProp(g2detail, x);
|
|
|
|
|
- resultList.add(g2detail);
|
|
|
|
|
- }
|
|
|
|
|
- if(x.getDgqclG3() != null) {
|
|
|
|
|
- BusJcbDmcgyq g3detail = new BusJcbDmcgyq();
|
|
|
|
|
- x.setGyqNumber("G3");
|
|
|
|
|
- x.setScz(x.getDgqclG3());
|
|
|
|
|
- x.setCzlc(getCzlc(busDmcgyqList,"G3"));
|
|
|
|
|
- BeanUtils.copyBeanProp(g3detail, x);
|
|
|
|
|
- resultList.add(g3detail);
|
|
|
|
|
- }
|
|
|
|
|
- if(x.getDgqclG4() != null) {
|
|
|
|
|
- BusJcbDmcgyq g4detail = new BusJcbDmcgyq();
|
|
|
|
|
- x.setGyqNumber("G4");
|
|
|
|
|
- x.setScz(x.getDgqclG4());
|
|
|
|
|
- x.setCzlc(getCzlc(busDmcgyqList,"G4"));
|
|
|
|
|
- BeanUtils.copyBeanProp(g4detail, x);
|
|
|
|
|
- resultList.add(g4detail);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (x.getDgqclG1() != null) {
|
|
|
|
|
+ BusJcbDmcgyq g1detail = new BusJcbDmcgyq();
|
|
|
|
|
+ x.setGyqNumber("G1");
|
|
|
|
|
+ x.setScz(x.getDgqclG1());
|
|
|
|
|
+ x.setCzlc(getCzlc(busDmcgyqList, "G1"));
|
|
|
|
|
+ BeanUtils.copyBeanProp(g1detail, x);
|
|
|
|
|
+ resultList.add(g1detail);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (x.getDgqclG2() != null) {
|
|
|
|
|
+ BusJcbDmcgyq g2detail = new BusJcbDmcgyq();
|
|
|
|
|
+ x.setGyqNumber("G2");
|
|
|
|
|
+ x.setScz(x.getDgqclG2());
|
|
|
|
|
+ x.setCzlc(getCzlc(busDmcgyqList, "G2"));
|
|
|
|
|
+ BeanUtils.copyBeanProp(g2detail, x);
|
|
|
|
|
+ resultList.add(g2detail);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (x.getDgqclG3() != null) {
|
|
|
|
|
+ BusJcbDmcgyq g3detail = new BusJcbDmcgyq();
|
|
|
|
|
+ x.setGyqNumber("G3");
|
|
|
|
|
+ x.setScz(x.getDgqclG3());
|
|
|
|
|
+ x.setCzlc(getCzlc(busDmcgyqList, "G3"));
|
|
|
|
|
+ BeanUtils.copyBeanProp(g3detail, x);
|
|
|
|
|
+ resultList.add(g3detail);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (x.getDgqclG4() != null) {
|
|
|
|
|
+ BusJcbDmcgyq g4detail = new BusJcbDmcgyq();
|
|
|
|
|
+ x.setGyqNumber("G4");
|
|
|
|
|
+ x.setScz(x.getDgqclG4());
|
|
|
|
|
+ x.setCzlc(getCzlc(busDmcgyqList, "G4"));
|
|
|
|
|
+ BeanUtils.copyBeanProp(g4detail, x);
|
|
|
|
|
+ resultList.add(g4detail);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private String getCzlc(List<BusDmcgyq> busDmcgyqList, String type) {
|
|
private String getCzlc(List<BusDmcgyq> busDmcgyqList, String type) {
|
|
|
- return busDmcgyqList.stream()
|
|
|
|
|
- .filter(bus -> bus.getSbbh().equals(type))
|
|
|
|
|
- .map(bus -> bus.getCzlc()==null?"":bus.getCzlc().toString())
|
|
|
|
|
- .findFirst().orElse("");
|
|
|
|
|
|
|
+ return busDmcgyqList.stream()
|
|
|
|
|
+ .filter(bus -> bus.getSbbh().equals(type))
|
|
|
|
|
+ .map(bus -> bus.getCzlc() == null ? "" : bus.getCzlc().toString())
|
|
|
|
|
+ .findFirst().orElse("");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private BusJcbDmcgyq transData(BusJcbDmcgyq x, String gyqNumber) {
|
|
private BusJcbDmcgyq transData(BusJcbDmcgyq x, String gyqNumber) {
|
|
|
- if(StringUtils.YES_VALUE.equals(x.getBspwgAzlg()) &&
|
|
|
|
|
- StringUtils.YES_VALUE.equals(x.getBspwgBsqx()) &&
|
|
|
|
|
- StringUtils.YES_VALUE.equals(x.getDgqwgBmqj()) &&
|
|
|
|
|
- StringUtils.YES_VALUE.equals(x.getDgqwgWzws()) &&
|
|
|
|
|
- StringUtils.YES_VALUE.equals(x.getDgqwgAzlg())) {
|
|
|
|
|
|
|
+ if (StringUtils.YES_VALUE.equals(x.getBspwgAzlg()) &&
|
|
|
|
|
+ StringUtils.YES_VALUE.equals(x.getBspwgBsqx()) &&
|
|
|
|
|
+ StringUtils.YES_VALUE.equals(x.getDgqwgBmqj()) &&
|
|
|
|
|
+ StringUtils.YES_VALUE.equals(x.getDgqwgWzws()) &&
|
|
|
|
|
+ StringUtils.YES_VALUE.equals(x.getDgqwgAzlg())) {
|
|
|
x.setWsjbjsd("无");
|
|
x.setWsjbjsd("无");
|
|
|
} else {
|
|
} else {
|
|
|
x.setWsjbjsd("有");
|
|
x.setWsjbjsd("有");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if("G1".equals(gyqNumber)) {
|
|
|
|
|
|
|
+ if ("G1".equals(gyqNumber)) {
|
|
|
x.setScz(x.getDgqclG1());
|
|
x.setScz(x.getDgqclG1());
|
|
|
}
|
|
}
|
|
|
- if("G2".equals(gyqNumber)) {
|
|
|
|
|
|
|
+ if ("G2".equals(gyqNumber)) {
|
|
|
x.setScz(x.getDgqclG2());
|
|
x.setScz(x.getDgqclG2());
|
|
|
}
|
|
}
|
|
|
- if("G3".equals(gyqNumber)) {
|
|
|
|
|
|
|
+ if ("G3".equals(gyqNumber)) {
|
|
|
x.setScz(x.getDgqclG3());
|
|
x.setScz(x.getDgqclG3());
|
|
|
}
|
|
}
|
|
|
- if("G4".equals(gyqNumber)) {
|
|
|
|
|
|
|
+ if ("G4".equals(gyqNumber)) {
|
|
|
x.setScz(x.getDgqclG4());
|
|
x.setScz(x.getDgqclG4());
|
|
|
}
|
|
}
|
|
|
return x;
|
|
return x;
|
|
@@ -302,6 +299,7 @@ public class BusJcbDmcgyqServiceImpl extends BusJcabServiceImpl implements IBusJ
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 查询明细列表
|
|
* 查询明细列表
|
|
|
|
|
+ *
|
|
|
* @param query 查询参数
|
|
* @param query 查询参数
|
|
|
* @return 数据记录明细
|
|
* @return 数据记录明细
|
|
|
*/
|
|
*/
|
|
@@ -313,6 +311,7 @@ public class BusJcbDmcgyqServiceImpl extends BusJcabServiceImpl implements IBusJ
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 查询汇总列表
|
|
* 查询汇总列表
|
|
|
|
|
+ *
|
|
|
* @param query 查询参数
|
|
* @param query 查询参数
|
|
|
* @return 汇总数据
|
|
* @return 汇总数据
|
|
|
*/
|
|
*/
|