Commit d4b3d7c4 authored by tianbo's avatar tianbo

修改气瓶企业统计所属区域字段

parent 5440238c
......@@ -65,5 +65,5 @@ public class CylinderTableDto {
/**
* 所属区域
*/
private String developerAgency;
private String regionName;
}
......@@ -95,7 +95,7 @@ public class CylinderDateInfoServiceImpl extends BaseService<CylinderDateInfoDto
temp.setCylinderTagInfo(tags);
temp.setCylinderInfo(cylinder);
temp.setCylinderTotal(total);
temp.setDeveloperAgency(token.getDeveloperAgency());
temp.setRegionName(token.getDeveloperAgency());
result.add(temp);
}
return result;
......@@ -104,21 +104,21 @@ public class CylinderDateInfoServiceImpl extends BaseService<CylinderDateInfoDto
public Page<CylinderTableDto> selectTodayDatePage(String pageNumber, String pageSize,String developerAgency, String unitName) {
public Page<CylinderTableDto> selectTodayDatePage(String pageNumber, String pageSize,String regionName, String unitName) {
Page<CylinderTableDto> page = new Page<>();
List<CylinderTableDto> result = new ArrayList<>();
Page<CylinderUnit> cylinderUnitPage = new Page<>(Long.parseLong(pageNumber), Long.parseLong(pageSize));
LambdaQueryWrapper<CylinderUnit> lambda = new QueryWrapper<CylinderUnit>().lambda();
if (!ObjectUtils.isEmpty(developerAgency)){
lambda.like(CylinderUnit::getDeveloperAgency, developerAgency);
if (!ObjectUtils.isEmpty(regionName)){
lambda.like(CylinderUnit::getRegionName, regionName);
}
if (!ObjectUtils.isEmpty(unitName)){
lambda.like(CylinderUnit::getUnitName, unitName);
}
IPage<CylinderUnit> cylinderUnitIPage = cylinderUnitMapper.selectPage(cylinderUnitPage, lambda);
for (CylinderUnit token : cylinderUnitIPage.getRecords()) {
for (CylinderUnit unit : cylinderUnitIPage.getRecords()) {
CylinderTableDto temp = new CylinderTableDto();
temp.setUnitName(token.getUnitName());
temp.setUnitName(unit.getUnitName());
// 获取气瓶基本信息
Integer cylinderUnit = 0;
Integer cylinder = 0;
......@@ -130,7 +130,7 @@ public class CylinderDateInfoServiceImpl extends BaseService<CylinderDateInfoDto
Integer examine = 0;
Integer total = 0;
// 获取气瓶基本信息
List<CylinderDateInfo> list = this.list(new LambdaQueryWrapper<CylinderDateInfo>().eq(CylinderDateInfo::getAppId, token.getAppId()));
List<CylinderDateInfo> list = this.list(new LambdaQueryWrapper<CylinderDateInfo>().eq(CylinderDateInfo::getAppId, unit.getAppId()));
for (CylinderDateInfo info : list) {
cylinder += info.getCylinderInfo();
cylinderUnit += info.getCylinderUnit();
......@@ -151,7 +151,7 @@ public class CylinderDateInfoServiceImpl extends BaseService<CylinderDateInfoDto
temp.setCylinderTagInfo(tags);
temp.setCylinderInfo(cylinder);
temp.setCylinderTotal(total);
temp.setDeveloperAgency(token.getDeveloperAgency());
temp.setRegionName(unit.getRegionName());
result.add(temp);
}
page.setRecords(result);
......@@ -204,16 +204,16 @@ public class CylinderDateInfoServiceImpl extends BaseService<CylinderDateInfoDto
this.createWithModel(temp);
} else {
list.forEach( info -> {
String appid = token.getAppId();
String appId = token.getAppId();
// 获取气瓶基本信息
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<CylinderInfo>().eq(CylinderInfo::getAppId,appid).between(CylinderInfo::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<CylinderUnit>().eq(CylinderUnit::getAppId,appid).between(CylinderUnit::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<CylinderTags>().eq(CylinderTags::getAppId,appid).between(CylinderTags::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<CylinderInspection>().eq(CylinderInspection::getAppId,appid).between(CylinderInspection::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<CylinderFilling>().eq(CylinderFilling::getAppId,appid).between(CylinderFilling::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<CylinderFillingRecord>().eq(CylinderFillingRecord::getAppId,appid).between(CylinderFillingRecord::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<CylinderFillingCheck>().eq(CylinderFillingCheck::getAppId,appid).between(CylinderFillingCheck::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<CylinderFillingExamine>().eq(CylinderFillingExamine::getAppId,appid).between(CylinderFillingExamine::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinder = cylinderInfoService.count(new LambdaQueryWrapper<CylinderInfo>().eq(CylinderInfo::getAppId,appId).between(CylinderInfo::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer cylinderUnit = cylinderUnitService.count(new LambdaQueryWrapper<CylinderUnit>().eq(CylinderUnit::getAppId,appId).between(CylinderUnit::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer tags = cylinderTagsService.count(new LambdaQueryWrapper<CylinderTags>().eq(CylinderTags::getAppId,appId).between(CylinderTags::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer inspection = cylinderInspectionService.count(new LambdaQueryWrapper<CylinderInspection>().eq(CylinderInspection::getAppId,appId).between(CylinderInspection::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer filling = cylinderFillingService.count(new LambdaQueryWrapper<CylinderFilling>().eq(CylinderFilling::getAppId,appId).between(CylinderFilling::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingRecord = cylinderFillingRecordService.count(new LambdaQueryWrapper<CylinderFillingRecord>().eq(CylinderFillingRecord::getAppId,appId).between(CylinderFillingRecord::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer fillingCheck = cylinderFillingCheckService.count(new LambdaQueryWrapper<CylinderFillingCheck>().eq(CylinderFillingCheck::getAppId,appId).between(CylinderFillingCheck::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer examine = cylinderFillingExamineService.count(new LambdaQueryWrapper<CylinderFillingExamine>().eq(CylinderFillingExamine::getAppId,appId).between(CylinderFillingExamine::getSyncDate,todayStr + " 00:00:00",todayStr + " 23:59:59"));
Integer total = cylinder + cylinderUnit + tags + inspection+filling+fillingRecord+fillingCheck+examine;
info.setCylinderExamineInfo(examine);
info.setCylinderUnit(cylinderUnit);
......
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