Commit b54f6632 authored by yangyang's avatar yangyang

Merge remote-tracking branch 'origin/developer' into developer

parents 2e618e11 d765cec4
...@@ -150,7 +150,7 @@ public class PreparationMoney extends BaseEntity { ...@@ -150,7 +150,7 @@ public class PreparationMoney extends BaseEntity {
private List<PreparationMoneyLog> preparationMoneyLog; //发货单流水 private List<PreparationMoneyLog> preparationMoneyLog; //发货单流水
@TableField(exist = false) @TableField(exist = false)
private String instance_id; //发货单流水 private String instanceId; //发货单流水
//订单状态 //订单状态
@TableField("order_status") @TableField("order_status")
private String orderStatus; private String orderStatus;
......
...@@ -256,10 +256,10 @@ public class PreparationMoneyController extends BaseController { ...@@ -256,10 +256,10 @@ public class PreparationMoneyController extends BaseController {
@PostMapping(value = "/uploadVoucher") @PostMapping(value = "/uploadVoucher")
@ApiOperation(httpMethod = "POST",value = "上传收获凭证", notes = "上传收获凭证") @ApiOperation(httpMethod = "POST",value = "上传收获凭证", notes = "上传收获凭证")
@GlobalTransactional @GlobalTransactional
public ResponseModel uploadVoucher(@RequestParam(value = "instanceId") String instanceId,PreparationMoney model, String isSubmit) { public ResponseModel uploadVoucher(@RequestParam(value = "instanceId",required = false) String instanceId,@RequestBody PreparationMoney model, String isSubmit) {
preparationMoneyServiceImpl.uploadVoucher(model,instanceId,isSubmit); preparationMoneyServiceImpl.uploadVoucher(model,instanceId,isSubmit);
return CommonResponseNewUtil.failure(); return CommonResponseNewUtil.success();
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
...@@ -270,7 +270,7 @@ public class PreparationMoneyController extends BaseController { ...@@ -270,7 +270,7 @@ public class PreparationMoneyController extends BaseController {
@RequestParam(value = "sequenceNbr") Long sequenceNbr,@RequestBody Map<String, Object> kv) { @RequestParam(value = "sequenceNbr") Long sequenceNbr,@RequestBody Map<String, Object> kv) {
preparationMoneyServiceImpl.excuteFlow(instanceId,kv,sequenceNbr); preparationMoneyServiceImpl.excuteFlow(instanceId,kv,sequenceNbr);
return CommonResponseNewUtil.failure(); return CommonResponseNewUtil.success();
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
...@@ -281,7 +281,7 @@ public class PreparationMoneyController extends BaseController { ...@@ -281,7 +281,7 @@ public class PreparationMoneyController extends BaseController {
hygfReplenishmentService.save(hygfReplenishment); hygfReplenishmentService.save(hygfReplenishment);
preparationMoneyServiceImpl.replenishmentSubmit(hygfReplenishment.getPreparationMoneyId()); preparationMoneyServiceImpl.replenishmentSubmit(hygfReplenishment.getPreparationMoneyId());
return CommonResponseNewUtil.failure(); return CommonResponseNewUtil.success();
} }
...@@ -292,7 +292,7 @@ public class PreparationMoneyController extends BaseController { ...@@ -292,7 +292,7 @@ public class PreparationMoneyController extends BaseController {
public ResponseModel replenishmentRollback(@RequestParam(value = "sequenceNbr") Long sequenceNbr) { public ResponseModel replenishmentRollback(@RequestParam(value = "sequenceNbr") Long sequenceNbr) {
preparationMoneyServiceImpl.replenishmentRollback(sequenceNbr); preparationMoneyServiceImpl.replenishmentRollback(sequenceNbr);
return CommonResponseNewUtil.failure(); return CommonResponseNewUtil.success();
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
...@@ -301,7 +301,7 @@ public class PreparationMoneyController extends BaseController { ...@@ -301,7 +301,7 @@ public class PreparationMoneyController extends BaseController {
@GlobalTransactional @GlobalTransactional
public ResponseModel replenishmentAudit(@RequestParam(value = "sequenceNbr") Long sequenceNbr,@RequestBody Map<String,Object> kv) { public ResponseModel replenishmentAudit(@RequestParam(value = "sequenceNbr") Long sequenceNbr,@RequestBody Map<String,Object> kv) {
preparationMoneyServiceImpl.replenishmentAudit(sequenceNbr,kv); preparationMoneyServiceImpl.replenishmentAudit(sequenceNbr,kv);
return CommonResponseNewUtil.failure(); return CommonResponseNewUtil.success();
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
...@@ -312,7 +312,7 @@ public class PreparationMoneyController extends BaseController { ...@@ -312,7 +312,7 @@ public class PreparationMoneyController extends BaseController {
@RequestParam(value = "isSubmit") String isSubmit, @RequestParam(value = "isSubmit") String isSubmit,
@RequestBody PreparationMoney model) { @RequestBody PreparationMoney model) {
preparationMoneyServiceImpl.submitOrder( model, instanceId, isSubmit); preparationMoneyServiceImpl.submitOrder( model, instanceId, isSubmit);
return CommonResponseNewUtil.failure(); return CommonResponseNewUtil.success();
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
package com.yeejoin.amos.boot.module.hygf.biz.service.impl; package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...@@ -41,6 +42,7 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -41,6 +42,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
...@@ -566,7 +568,11 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto ...@@ -566,7 +568,11 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
} }
up.in(PeasantHousehold::getSequenceNbr, idsH); up.in(PeasantHousehold::getSequenceNbr, idsH);
preparationMoneyMapper.insert(model); preparationMoneyMapper.insert(model);
List<DocumentStation> ids = model.getPeasantHouseholdId();
if (isSubmit.equals("0")) { if (isSubmit.equals("0")) {
if (CollUtil.isEmpty(ids) && ids.isEmpty() ){
throw new BadRequest("提交时选择电站不可为空");
}
up.set(PeasantHousehold::getPreparationMoneyState, ArrivalStateeEnum.待收货.getCode()); up.set(PeasantHousehold::getPreparationMoneyState, ArrivalStateeEnum.待收货.getCode());
up.set(PeasantHousehold::getConstructionState, ArrivalStateeEnum.待收货.getCode()); up.set(PeasantHousehold::getConstructionState, ArrivalStateeEnum.待收货.getCode());
//开启工作流 并执行一步 //开启工作流 并执行一步
...@@ -601,13 +607,15 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto ...@@ -601,13 +607,15 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
peasantHouseholdMapper.update(null, up); peasantHouseholdMapper.update(null, up);
preparationMoneyMapper.updateById(model); preparationMoneyMapper.updateById(model);
//电站信息存储 //电站信息存储
List<DocumentStation> ids = model.getPeasantHouseholdId(); if (CollectionUtil.isNotEmpty(ids) && ids.size()>0){
List<DocumentStation> listDocumentStation = new ArrayList<>(); List<DocumentStation> listDocumentStation = new ArrayList<>();
for (DocumentStation documentStation : ids) { for (DocumentStation documentStation : ids) {
documentStation.setPreparationMoneyId(model.getSequenceNbr()); documentStation.setPreparationMoneyId(model.getSequenceNbr());
listDocumentStation.add(documentStation); listDocumentStation.add(documentStation);
} }
documentStationService.saveBatch(listDocumentStation); documentStationService.saveBatch(listDocumentStation);
}
} else { } else {
//获取经销商单位信息 //获取经销商单位信息
...@@ -638,9 +646,12 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto ...@@ -638,9 +646,12 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
model.setConsigneeRegion(ConsigneeRegion); model.setConsigneeRegion(ConsigneeRegion);
} }
List<DocumentStation> ids = model.getPeasantHouseholdId();
LambdaUpdateWrapper<PeasantHousehold> up = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<PeasantHousehold> up = new LambdaUpdateWrapper<>();
if (isSubmit.equals("0")) { if (isSubmit.equals("0")) {
if (CollUtil.isEmpty(ids) && ids.isEmpty() ){
throw new BadRequest("提交时选择电站不可为空");
}
//更新电站施工状态 //更新电站施工状态
up.set(PeasantHousehold::getPreparationMoneyState, DeliveryStateeEnum.已发货.getCode()); up.set(PeasantHousehold::getPreparationMoneyState, DeliveryStateeEnum.已发货.getCode());
up.set(PeasantHousehold::getConstructionState, DeliveryStateeEnum.已发货.getCode()); up.set(PeasantHousehold::getConstructionState, DeliveryStateeEnum.已发货.getCode());
...@@ -670,6 +681,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto ...@@ -670,6 +681,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
hygfPreparationMoneyAuditingDto.setPreparationMoneyId(model.getSequenceNbr()); hygfPreparationMoneyAuditingDto.setPreparationMoneyId(model.getSequenceNbr());
hygfPreparationMoneyAuditingDto.setPromoter(RequestContext.getExeUserId()); hygfPreparationMoneyAuditingDto.setPromoter(RequestContext.getExeUserId());
hygfPreparationMoneyAuditingService.createWithModel(hygfPreparationMoneyAuditingDto); hygfPreparationMoneyAuditingService.createWithModel(hygfPreparationMoneyAuditingDto);
peasantHouseholdMapper.update(null, up);
} }
...@@ -679,14 +691,15 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto ...@@ -679,14 +691,15 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
up3.eq(DocumentStation::getPreparationMoneyId, model.getSequenceNbr()); up3.eq(DocumentStation::getPreparationMoneyId, model.getSequenceNbr());
documentStationMapper.delete(up3); documentStationMapper.delete(up3);
List<DocumentStation> ids = model.getPeasantHouseholdId();
if (CollectionUtil.isNotEmpty(ids) && ids.size()>0){
List<DocumentStation> listDocumentStation = new ArrayList<>(); List<DocumentStation> listDocumentStation = new ArrayList<>();
for (DocumentStation documentStation : ids) { for (DocumentStation documentStation : ids) {
documentStation.setPreparationMoneyId(model.getSequenceNbr()); documentStation.setPreparationMoneyId(model.getSequenceNbr());
listDocumentStation.add(documentStation); listDocumentStation.add(documentStation);
} }
documentStationService.saveBatch(listDocumentStation); documentStationService.saveBatch(listDocumentStation);
}
} }
...@@ -865,10 +878,14 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto ...@@ -865,10 +878,14 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
//更新电站施工状态 //更新电站施工状态
LambdaUpdateWrapper<PeasantHousehold> up = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<PeasantHousehold> up = new LambdaUpdateWrapper<>();
List<DocumentStation> idsk = model.getPeasantHouseholdId();
List<Long> idsH = new ArrayList<>(); List<Long> idsH = new ArrayList<>();
for (DocumentStation documentStation : idsk) { LambdaQueryWrapper<DocumentStation> stations = new LambdaQueryWrapper<>();
stations.eq(DocumentStation::getPreparationMoneyId,model.getSequenceNbr());
List<DocumentStation> documentStations = documentStationMapper.selectList(stations);
for (DocumentStation documentStation : documentStations) {
idsH.add(documentStation.getStationId()); idsH.add(documentStation.getStationId());
} }
if (kv.getOrDefault("approvalStatus", "").equals("0")) { if (kv.getOrDefault("approvalStatus", "").equals("0")) {
......
...@@ -276,7 +276,7 @@ public class MonitoringMapController extends BaseController { ...@@ -276,7 +276,7 @@ public class MonitoringMapController extends BaseController {
ArrayList<String> stringArrayList = mapRegion.getProvince(); ArrayList<String> stringArrayList = mapRegion.getProvince();
//变量获取所有的场站信息 //变量获取所有的场站信息
for (int i = 0; i < stringArrayList.size(); i++) { for (int i = 0; i < stringArrayList.size(); i++) {
Region region = regionMapper.selectOne(new QueryWrapper<Region>().eq("LEVEL_", 1).like("REGION_NAME", stringArrayList.get(i))); Region region = regionMapper.selectOne(new LambdaQueryWrapper<Region>().eq(Region::getLevel, 1).like(Region::getRegionName, stringArrayList.get(i)));
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().like("belong_area", region.getRegionCode())); List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().like("belong_area", region.getRegionCode()));
stationBasicListAll.addAll(stationBasicList); stationBasicListAll.addAll(stationBasicList);
} }
......
...@@ -416,11 +416,11 @@ public class LargeScreenImpl { ...@@ -416,11 +416,11 @@ public class LargeScreenImpl {
} }
if (data.getDouble("month_generating_capacity") != null) { if (data.getDouble("month_generating_capacity") != null) {
mapdta.put("Moon", df.format(Double.valueOf(data.getDouble("month_generating_capacity")))); mapdta.put("Moon", df.format(Double.valueOf(data.getDouble("month_generating_capacity"))));
mapdta.put("YFD", df.format(Double.valueOf(data.getDouble("day_generating_capacity")))); mapdta.put("YFD", df.format(Double.valueOf(data.getDouble("month_generating_capacity"))));
} }
if (data.getDouble("year_generating_capacity") != null) { if (data.getDouble("year_generating_capacity") != null) {
mapdta.put("Year", df.format(Double.valueOf(data.getDouble("year_generating_capacity")))); mapdta.put("Year", df.format(Double.valueOf(data.getDouble("year_generating_capacity"))));
mapdta.put("NFD", df.format(Double.valueOf(data.getDouble("day_generating_capacity")))); mapdta.put("NFD", df.format(Double.valueOf(data.getDouble("year_generating_capacity"))));
} }
if (data.getString("month_quota_rate") != null) { if (data.getString("month_quota_rate") != null) {
mapdta.put("YJHWC", data.getString("month_quota_rate").replace("%", "")); mapdta.put("YJHWC", data.getString("month_quota_rate").replace("%", ""));
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -140,7 +141,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -140,7 +141,7 @@ public class MonitorServiceImpl implements MonitorService {
*/ */
public List<StationCacheInfoDto> getListStationCacheInfoDto() { public List<StationCacheInfoDto> getListStationCacheInfoDto() {
List<StationCacheInfoDto> stationCacheInfoDtos = new ArrayList<>(); List<StationCacheInfoDto> stationCacheInfoDtos = new ArrayList<>();
List<Region> regionList = regionMapper.selectList(new QueryWrapper<Region>().eq("LEVEL_", 1)); List<Region> regionList = regionMapper.selectList(new LambdaQueryWrapper<Region>().eq(Region::getLevel, 1));
List<MapRegion> mapRegionList = mapRegionMapper.selectList(new QueryWrapper<MapRegion>().isNotNull("name")); List<MapRegion> mapRegionList = mapRegionMapper.selectList(new QueryWrapper<MapRegion>().isNotNull("name"));
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("belong_area").isNotNull("fan_gateway_id")); List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("belong_area").isNotNull("fan_gateway_id"));
for (int i = 0; i < stationBasicList.size(); i++) { for (int i = 0; i < stationBasicList.size(); i++) {
......
...@@ -421,7 +421,7 @@ public class MonitoringServiceImpl { ...@@ -421,7 +421,7 @@ public class MonitoringServiceImpl {
List<StationBasic> stationBasicList = stationBasicMapper List<StationBasic> stationBasicList = stationBasicMapper
.selectList(new QueryWrapper<StationBasic>().isNotNull("belong_area")); .selectList(new QueryWrapper<StationBasic>().isNotNull("belong_area"));
List<MapRegion> mapRegionList = mapRegionMapper.selectList(new QueryWrapper<MapRegion>().isNotNull("name")); List<MapRegion> mapRegionList = mapRegionMapper.selectList(new QueryWrapper<MapRegion>().isNotNull("name"));
List<Region> regionList = regionMapper.selectList(new QueryWrapper<Region>().eq("LEVEL", 1)); List<Region> regionList = regionMapper.selectList(new LambdaQueryWrapper<Region>().eq(Region::getLevel, 1));
mapRegionList.forEach(mapRegion -> { mapRegionList.forEach(mapRegion -> {
MapAreaInfoDto mapAreaInfoDto = new MapAreaInfoDto(); MapAreaInfoDto mapAreaInfoDto = new MapAreaInfoDto();
// 开始处理省份名称-三维与二维的名称有差异 // 开始处理省份名称-三维与二维的名称有差异
...@@ -772,7 +772,7 @@ public class MonitoringServiceImpl { ...@@ -772,7 +772,7 @@ public class MonitoringServiceImpl {
// 变量获取所有的场站信息 // 变量获取所有的场站信息
for (int i = 0; i < stringArrayList.size(); i++) { for (int i = 0; i < stringArrayList.size(); i++) {
Region region = regionMapper Region region = regionMapper
.selectOne(new QueryWrapper<Region>().eq("LEVEL_", 1).like("REGION_NAME", stringArrayList.get(i))); .selectOne(new LambdaQueryWrapper<Region>().eq(Region::getLevel, 1).like(Region::getRegionName, stringArrayList.get(i)));
List<StationBasic> stationBasicList = stationBasicMapper List<StationBasic> stationBasicList = stationBasicMapper
.selectList(new QueryWrapper<StationBasic>().like("belong_area", region.getRegionCode())); .selectList(new QueryWrapper<StationBasic>().like("belong_area", region.getRegionCode()));
stationBasicListAll.addAll(stationBasicList); stationBasicListAll.addAll(stationBasicList);
...@@ -1188,7 +1188,7 @@ public class MonitoringServiceImpl { ...@@ -1188,7 +1188,7 @@ public class MonitoringServiceImpl {
List<HashMap<String, Object>> hashMapList = new ArrayList<>(); List<HashMap<String, Object>> hashMapList = new ArrayList<>();
List<StationBasic> stationBasicList = stationBasicMapper List<StationBasic> stationBasicList = stationBasicMapper
.selectList(new QueryWrapper<StationBasic>().isNotNull("belong_area").isNotNull("fan_gateway_id")); .selectList(new QueryWrapper<StationBasic>().isNotNull("belong_area").isNotNull("fan_gateway_id"));
List<Region> regionList = this.regionMapper.selectList(new QueryWrapper<Region>().eq("level_", 1)); List<Region> regionList = this.regionMapper.selectList(new LambdaQueryWrapper<Region>().eq(Region::getLevel, 1));
regionList.forEach(region -> { regionList.forEach(region -> {
HashMap<String, Object> hashMap = new HashMap<>(); HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("label", region.getRegionName()); hashMap.put("label", region.getRegionName());
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.api.dto.RegionDto; import com.yeejoin.amos.boot.module.jxiop.api.dto.RegionDto;
...@@ -34,10 +35,10 @@ public class RegionServiceImpl extends BaseService<RegionDto,Region,RegionMapper ...@@ -34,10 +35,10 @@ public class RegionServiceImpl extends BaseService<RegionDto,Region,RegionMapper
} }
public Region getRegionByRegionCode ( String regionCode){ public Region getRegionByRegionCode ( String regionCode){
return this.getOne(new QueryWrapper<Region>().eq("REGION_CODE",regionCode)); return this.getOne(new LambdaQueryWrapper<Region>().eq(Region::getRegionCode,regionCode));
} }
//根据regionName获取regionCode //根据regionName获取regionCode
public Region getRegionCodeByRegionName(String regionName) { public Region getRegionCodeByRegionName(String regionName) {
return this.getOne(new QueryWrapper<Region>().like("REGION_NAME",regionName).eq("LEVEL",1)); return this.getOne(new LambdaQueryWrapper<Region>().like(Region::getRegionName,regionName).eq(Region::getLevel,1));
} }
} }
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
( SBMC, 4 ) AS NAME, ( SBMC, 4 ) AS NAME,
GROUP_CONCAT(REPLACE (REPLACE( substring( SBMC, 5 ),'风机系统', '' ) ,"#","" )) as equipNum GROUP_CONCAT(REPLACE (REPLACE( substring( SBMC, 5 ),'风机系统', '' ) ,"#","" )) as equipNum
FROM FROM
`sjgl_zsj_zsbtz` sjgl_zsj_zsbtz
WHERE WHERE
MACHGENRE = #{DATAID} and WERKS = #{WERKS} MACHGENRE = #{DATAID} and WERKS = #{WERKS}
GROUP BY GROUP BY
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
FROM FROM
sjgl_zsj_zsbtz sjgl_zsj_zsbtz
WHERE WHERE
FSB IN ( SELECT DBID FROM `sjgl_zsj_zsbtz` WHERE MACHGENRE = ( SELECT DATAID FROM `tpri_dmp_databook` WHERE DATANAME = #{DATAID} ) AND WERKS = #{WERKS} ) FSB IN ( SELECT DBID FROM sjgl_zsj_zsbtz WHERE MACHGENRE = ( SELECT DATAID FROM tpri_dmp_databook WHERE DATANAME = #{DATAID} ) AND WERKS = #{WERKS} )
) B ) B
GROUP BY GROUP BY
B.FSB B.FSB
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<select id="getEquipQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics"> <select id="getEquipQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics">
SELECT SELECT
WERKS AS `code`, WERKS AS code,
count( QRCODE_COLOR = 'red' OR NULL ) AS redNum, count( QRCODE_COLOR = 'red' OR NULL ) AS redNum,
count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum, count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum,
count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum, count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum,
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<select id="getTaskQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics"> <select id="getTaskQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics">
SELECT SELECT
WERKS AS `code`, WERKS AS code,
count( QRCODE_COLOR = 'red' OR NULL ) AS redNum, count( QRCODE_COLOR = 'red' OR NULL ) AS redNum,
count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum, count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum,
count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum, count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum,
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
<select id="getStatusMonitoring" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.SystemEnumDto"> <select id="getStatusMonitoring" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.SystemEnumDto">
SELECT * FROM `system_enum` WHERE type = #{type} and system_name = #{systemName} SELECT * FROM system_enum WHERE type = #{type} and system_name = #{systemName}
</select> </select>
</mapper> </mapper>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
created_time as createdTime , created_time as createdTime ,
equipmentIndexName equipmentIndexName
FROM FROM
`temporary_data` temporary_data
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId} gatewayId = #{gatewayId}
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
created_time as createdTime , created_time as createdTime ,
equipmentIndexName equipmentIndexName
FROM FROM
`temporary_data` temporary_data
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId} gatewayId = #{gatewayId}
...@@ -51,16 +51,16 @@ ...@@ -51,16 +51,16 @@
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
and gatewayId = #{gatewayId} and gatewayId = #{gatewayId}
</if> </if>
ORDER BY `value` LIMIT 1 ) AS minTime, ORDER BY value LIMIT 1 ) AS minTime,
max( `value` ) AS max, max( value ) AS max,
( SELECT created_time FROM temporary_data WHERE ( SELECT created_time FROM temporary_data WHERE
equipmentIndexName =#{equipmentIndexName} equipmentIndexName =#{equipmentIndexName}
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
and gatewayId = #{gatewayId} and gatewayId = #{gatewayId}
</if> ORDER BY `value` DESC LIMIT 1 ) AS maxTime, </if> ORDER BY value DESC LIMIT 1 ) AS maxTime,
min( `value` ) AS min min( value ) AS min
FROM FROM
`temporary_data` temporary_data
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId} and equipmentIndexName =#{equipmentIndexName} gatewayId = #{gatewayId} and equipmentIndexName =#{equipmentIndexName}
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
SELECT SELECT
* *
FROM FROM
`temporary_data` temporary_data
</select> </select>
</mapper> </mapper>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
( SBMC, 4 ) AS NAME, ( SBMC, 4 ) AS NAME,
GROUP_CONCAT(REPLACE (REPLACE( substring( SBMC, 5 ),'风机系统', '' ) ,"#","" )) as equipNum GROUP_CONCAT(REPLACE (REPLACE( substring( SBMC, 5 ),'风机系统', '' ) ,"#","" )) as equipNum
FROM FROM
`sjgl_zsj_zsbtz` sjgl_zsj_zsbtz
WHERE WHERE
MACHGENRE = #{DATAID} and WERKS = #{WERKS} MACHGENRE = #{DATAID} and WERKS = #{WERKS}
GROUP BY GROUP BY
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
FROM FROM
sjgl_zsj_zsbtz sjgl_zsj_zsbtz
WHERE WHERE
FSB IN ( SELECT DBID FROM `sjgl_zsj_zsbtz` WHERE MACHGENRE = ( SELECT DATAID FROM `tpri_dmp_databook` WHERE DATANAME = #{DATAID} ) AND WERKS = #{WERKS} ) FSB IN ( SELECT DBID FROM sjgl_zsj_zsbtz WHERE MACHGENRE = ( SELECT DATAID FROM tpri_dmp_databook WHERE DATANAME = #{DATAID} ) AND WERKS = #{WERKS} )
) B ) B
GROUP BY GROUP BY
B.FSB B.FSB
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<select id="getEquipQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics"> <select id="getEquipQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics">
SELECT SELECT
WERKS AS `code`, WERKS AS code,
count( QRCODE_COLOR = 'red' OR NULL ) AS redNum, count( QRCODE_COLOR = 'red' OR NULL ) AS redNum,
count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum, count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum,
count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum, count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum,
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<select id="getTaskQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics"> <select id="getTaskQrcodeInfo" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics">
SELECT SELECT
WERKS AS `code`, WERKS AS code,
count( QRCODE_COLOR = 'red' OR NULL ) AS redNum, count( QRCODE_COLOR = 'red' OR NULL ) AS redNum,
count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum, count( QRCODE_COLOR = 'yellow' OR NULL ) AS yellowNum,
count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum, count( QRCODE_COLOR = 'green' OR NULL ) AS greenNum,
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
<select id="getStatusMonitoring" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.SystemEnumDto"> <select id="getStatusMonitoring" resultType="com.yeejoin.amos.boot.module.jxiop.biz.dto.SystemEnumDto">
SELECT * FROM `system_enum` WHERE type = #{type} and system_name = #{systemName} SELECT * FROM system_enum WHERE type = #{type} and system_name = #{systemName}
</select> </select>
</mapper> </mapper>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
created_time as createdTime , created_time as createdTime ,
equipmentIndexName equipmentIndexName
FROM FROM
`temporary_data` temporary_data
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId} gatewayId = #{gatewayId}
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
created_time as createdTime , created_time as createdTime ,
equipmentIndexName equipmentIndexName
FROM FROM
`temporary_data` temporary_data
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId} gatewayId = #{gatewayId}
...@@ -51,16 +51,16 @@ ...@@ -51,16 +51,16 @@
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
and gatewayId = #{gatewayId} and gatewayId = #{gatewayId}
</if> </if>
ORDER BY `value` LIMIT 1 ) AS minTime, ORDER BY value LIMIT 1 ) AS minTime,
max( `value` ) AS max, max( value ) AS max,
( SELECT created_time FROM temporary_data WHERE ( SELECT created_time FROM temporary_data WHERE
equipmentIndexName =#{equipmentIndexName} equipmentIndexName =#{equipmentIndexName}
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
and gatewayId = #{gatewayId} and gatewayId = #{gatewayId}
</if> ORDER BY `value` DESC LIMIT 1 ) AS maxTime, </if> ORDER BY value DESC LIMIT 1 ) AS maxTime,
min( `value` ) AS min min( value ) AS min
FROM FROM
`temporary_data` temporary_data
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
gatewayId = #{gatewayId} and equipmentIndexName =#{equipmentIndexName} gatewayId = #{gatewayId} and equipmentIndexName =#{equipmentIndexName}
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
SELECT SELECT
* *
FROM FROM
`temporary_data` temporary_data
</select> </select>
</mapper> </mapper>
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