Commit a271270c authored by 朱晨阳's avatar 朱晨阳

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

parents 1d467341 3ed15676
......@@ -178,7 +178,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
@Override
public void customerInfoList() {
try {
String startDate = LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
String startDate = LocalDate.now().minusMonths(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
String endDate = LocalDate.now().plusDays(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
log.info("-------碳银同步项目信息开始: {} ------- ", sdf.format(new Date()));
Map<String, Object> params = MapBuilder.<String, Object>create()
......@@ -465,7 +465,12 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
if (jpInverter == null || StringUtils.isEmpty(jpInverter.getSnCode())) {
return;
}
String startDate = LocalDate.now().minusWeeks(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
String startDate;
if (jpInverter.getUpdateTime() != null) {
startDate = new SimpleDateFormat("yyyy-MM-dd").format(jpInverter.getUpdateTime());
} else {
startDate = LocalDate.now().minusMonths(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
}
String endDate = LocalDate.now().plusDays(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
Map<String, Object> params = MapBuilder.<String, Object>create()
.put("sn", jpInverter.getSnCode())
......@@ -474,11 +479,19 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
.put("startDate", startDate)
.put("endDate", endDate).build();
PageInfo<TanYinAlramInfo> tanYinInveterInfo = tanYinApiUtils.postPage("电站逆变器故障信息", apiUrl + TanYinConstant.inverterAlramUrl, JSON.toJSONString(params), null, TanYinAlramInfo.class);
List<TanYinAlramInfo> tanYinAlramInfos = tanYinInveterInfo.getList();
if (CollectionUtils.isEmpty(tanYinAlramInfos)) {
if (tanYinInveterInfo == null || CollectionUtils.isEmpty(tanYinInveterInfo.getList())) {
log.warn("-------碳银同步电站逆变器故障信息结束: 未获取到逆变器故障信息 ------- ");
return;
}
List<TanYinAlramInfo> tanYinAlramInfos = new ArrayList<>();
tanYinAlramInfos.addAll(tanYinInveterInfo.getList());
if (tanYinInveterInfo.getPages() > 1) {
for (int pageNum = 2; pageNum < tanYinInveterInfo.getPages(); pageNum++) {
params.put("pageNo", pageNum);
PageInfo<TanYinAlramInfo> tanYinInveterInfoPage = tanYinApiUtils.postPage("电站逆变器故障信息", apiUrl + TanYinConstant.inverterAlramUrl, JSON.toJSONString(params), null, TanYinAlramInfo.class);
tanYinAlramInfos.addAll(tanYinInveterInfoPage.getList());
}
}
for (TanYinAlramInfo tanYinAlramInfo : tanYinAlramInfos) {
tanYinAlramInfo.setCreateTime(System.currentTimeMillis());
tanYinAlramInfoMapper.insert(tanYinAlramInfo);
......@@ -486,7 +499,9 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
HYGFJPInverterWarn hygfjpInverterWarn = hygfjpInverterWarnMapper
.selectOne(new QueryWrapper<HYGFJPInverterWarn>().eq("sn_code", tanYinAlramInfo.getSn())
.eq("warn_id", tanYinAlramInfo.getId())
.eq("third_station_id", String.valueOf(tanYinAlramInfo.getProjectNo())));
.eq("third_station_id", String.valueOf(tanYinAlramInfo.getProjectNo()))
.orderByDesc("created_time").last("limit 1")
);
if (com.baomidou.mybatisplus.core.toolkit.ObjectUtils.isEmpty(hygfjpInverterWarn)) {
hygfjpInverterWarn = new HYGFJPInverterWarn();
}
......@@ -500,7 +515,6 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
hygfjpInverterWarn.setRegionalCompaniesCode(jpStation.getRegionalCompaniesCode());
hygfjpInverterWarn.setStationName(jpStation.getName());
hygfjpInverterWarn.setStationState(jpStation.getState());
hygfjpInverterWarn.setCreatedTime(System.currentTimeMillis());
hygfjpInverterWarn.setThirdCode(PVProducerInfoEnum.TANYIN.getCode());
hygfjpInverterWarn.setContent(tanYinAlramInfo.getContent());
hygfjpInverterWarn.setTreatment(tanYinAlramInfo.getSolution());
......@@ -515,7 +529,7 @@ public class TanYinDataAcquisitionServiceImpl implements TanYinDataAcquisitionSe
}
hygfjpInverterWarn.setTimeLong(null);
if ((!ObjectUtils.isEmpty(tanYinAlramInfo.getFaultOccurTime())) && (!ObjectUtils.isEmpty(tanYinAlramInfo.getFaultEndTime()))) {
hygfjpInverterWarn.setTimeLong(this.convertDate(hygfjpInverterWarn.getRecoverTime()) - this.convertDate(hygfjpInverterWarn.getStartTime()));
hygfjpInverterWarn.setTimeLong(this.convertDate(hygfjpInverterWarn.getRecoverTime()) - this.convertDate(hygfjpInverterWarn.getStartTime()));
}
if (ObjectUtils.isEmpty(hygfjpInverterWarn.getCreatedTime())) {
hygfjpInverterWarn.setCreatedTime(System.currentTimeMillis());
......
......@@ -21,14 +21,14 @@ import java.util.Map;
public interface PersonnelBusinessMapper extends BaseMapper<PersonnelBusiness> {
IPage<CompanyDtoUserDto> getCompanyDtoUserDtopage(@Param("dto") CompanyDtoUserDto dto);
Map<String,String> getorgcode(@Param("id")Long id);
Map<String, String> getorgcode(@Param("id") Long id);
//根据平台userid 获取人员所属经销商
UserUnitInformationDto getUserUnitInformationDto(@Param("userId")String userId);
UserUnitInformationDto getUserUnitInformationDto(@Param("userId") String userId);
//根据平台userid 获取运维人员信息
UserUnitInformationDto getMaintenanceUserUnitInformationDto(@Param("userId")String userId);
UserUnitInformationDto getMaintenanceUserUnitInformationDto(@Param("userId") String userId);
String selectUserInfo(Long sequenceNbr);
......@@ -37,6 +37,8 @@ public interface PersonnelBusinessMapper extends BaseMapper<PersonnelBusiness> {
void deletePguByUserId(String userId);
void deleteRoleByUserId(@Param("userId") String userId, @Param("roleId") Long roleId);
void deleteSubByUserId(String userId);
void deleteHpbByFoundationId(Long sequenceNbr);
......@@ -47,5 +49,7 @@ public interface PersonnelBusinessMapper extends BaseMapper<PersonnelBusiness> {
List<String> selectHygfTableName();
int countByUserId(@Param("tableName") String tableName, @Param("userId")String userId);
int countByUserId(@Param("tableName") String tableName, @Param("userId") String userId);
void deleteOrgRoleByUserId(@Param("userId") String userId, @Param("roleId") Long roleId);
}
......@@ -16,7 +16,7 @@ import java.util.List;
* @date 2023-07-15
*/
public interface PowerStationMapper extends BaseMapper<PowerStation> {
@UserEmpower(field ={"regional_companies_code"} ,dealerField={"a.developer_code","a.regional_companies_code","a.developer_user_id"} ,fieldConditions ={"in","in","in"}, relationship="and")
@UserEmpower(field ={"regional_companies_code"} ,dealerField={"developer_code","regional_companies_code","developer_user_id"} ,fieldConditions ={"in","in","in"}, relationship="and")
List<PowerStationDto> queryPage(@Param("powerStationCode") String powerStationCode,
@Param("ownersName")String ownersName,
@Param("serviceAgent")String serviceAgent,
......
......@@ -20,5 +20,5 @@ public interface TdHYGFInverterDayGenerateMapper extends BaseMapper<TdHYGFInvert
List<Map<String,Object>> selectSnCodeList(String startTime, String endTime, List<String> sncodes);
@UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<TdHYGFInverterDayGenerate> selectListPage(List<String> snCodeList, List<String> maxCreatedTimeList);
List<TdHYGFInverterDayGenerate> selectListPage(List<String> snCodeList, List<String> maxCreatedTimeList, String startTime, String endTime);
}
......@@ -69,7 +69,7 @@
</where>
ORDER BY
FIELD(hbga.grid_status, '1', '2', '4', '3'),
hogaa.grid_connection_time desc
hogaa.grid_connection_time desc, hbga.sequence_nbr desc
</select>
......
......@@ -52,7 +52,8 @@
ifnull(icbc.id_card, ph.id_card) as idCard,
ph.amos_user_id,
icbc.open_account_status,
icbc.protocol_status
icbc.protocol_status,
ph.rec_date
FROM
hygf_peasant_household ph LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id
<where>
......@@ -86,8 +87,6 @@
<if test="param.offset != null and param.offset != '' and param.limit != null and param.limit != ''">
LIMIT ${param.offset}, ${param.limit}
</if>
GROUP BY
ph.amos_user_id
ORDER BY
ph.rec_date DESC
</select>
......
......@@ -385,7 +385,7 @@
<if test="dto.amosCompanyCode!=null">
and hygf_jp_station.amos_company_code =#{dto.amosCompanyCode}
</if>
and hygf_jp_station.`state` is not null and hygf_jp_station.`state` in ("在线","报警","离线")
and hygf_jp_station.`state` is not null and hygf_jp_station.`state` in ('在线','报警','离线')
GROUP BY state
</where>
......
......@@ -132,6 +132,14 @@ select ORG_CODE orgCode from privilege_company where privilege_company.SEQUEN
DELETE FROM privilege_group_user WHERE USER_ID=#{userId}
</select>
<delete id="deleteRoleByUserId">
DELETE FROM privilege_group_user WHERE USER_ID=#{userId} AND GROUP_SEQ = #{roleId}
</delete>
<delete id="deleteOrgRoleByUserId">
DELETE FROM privilege_user_org_role WHERE USER_ID=#{userId} AND ROLE_SEQ = #{roleId}
</delete>
<select id="deleteSubByUserId">
DELETE FROM std_user_biz WHERE amos_user_id=#{userId}
</select>
......
......@@ -6,7 +6,7 @@
<select id="getMonthPowerint" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.MonthPower">
SELECT
avg(power) power,
third_station_id thirdStationId
third_sthird_station_id thirdStationId
FROM house_pv_data.td_hygf_jp_station_power_history where created_time <![CDATA[>=]]> today()-1d-8h and created_time <![CDATA[<]]> today()-8h GROUP BY third_station_id
</select>
......@@ -14,15 +14,15 @@
<select id="getSumMonthPower" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.YearPower">
SELECT
sum(power) power,
tation_id thirdStationId
FROM house_pv_data.td_hygf_month_power where year_month=#{date} GROUP BY tation_id
third_station_id thirdStationId
FROM house_pv_data.td_hygf_station_power_month where year_month=#{date} GROUP BY third_station_id
</select>
<select id="getSumYearPower" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.AllPower">
SELECT
sum(power) power,
tation_id thirdStationId
FROM house_pv_data.td_hygf_year_power where year=#{date} GROUP BY tation_id
third_station_id thirdStationId
FROM house_pv_data.td_hygf_station_power_year where year=#{date} GROUP BY third_station_id
</select>
......@@ -44,7 +44,7 @@
SELECT
sum(power)num,
`day` date
FROM house_pv_data.td_hygf_month_power where tation_id in
FROM house_pv_data.td_hygf_station_power_month where third_station_id in
<foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
......@@ -55,7 +55,7 @@
SELECT
sum(power)num,
`month` date
FROM house_pv_data.td_hygf_year_power where tation_id in
FROM house_pv_data.td_hygf_station_power_year where third_station_id in
<foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
......@@ -66,7 +66,7 @@
SELECT
sum(power)num,
`year` date
FROM house_pv_data.td_hygf_all_power where tation_id in
FROM house_pv_data.td_hygf_station_power_all where third_station_id in
<foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
......@@ -77,18 +77,18 @@
SELECT
sum(power)num,
`hour` date
FROM house_pv_data.td_hygf_day_power
FROM house_pv_data.td_hygf_station_power_day
<where>
<if test="dto!=null">
tation_id in
third_station_id in
<foreach collection="dto" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="thirdStationId!=null and thirdStationId != ''">
and tation_id = #{thirdStationId}
and third_station_id = #{thirdStationId}
</if>
</where>
......
......@@ -47,7 +47,7 @@
<where>
created_time >= #{startTime} and created_time &lt;= #{endTime}
<if test="sncodes != null and sncodes.size>0">
sn_code in
and sn_code in
<foreach collection="sncodes" item="sncode" open="(" close=")" separator=",">
#{sncode}
</foreach>
......@@ -63,7 +63,7 @@
house_pv_data.td_hygf_inverter_day_generate
<where>
<if test="snCodeList != null and snCodeList.size>0">
sn_code in
and sn_code in
<foreach collection="snCodeList" item="sncode" open="(" close=")" separator=",">
#{sncode}
</foreach>
......@@ -74,6 +74,12 @@
#{maxCreatedTime}
</foreach>
</if>
<if test="startTime != null">
and created_time >= #{startTime}
</if>
<if test="endTime != null">
and created_time &lt;= #{endTime}
</if>
</where>
order by created_time desc
</select>
......
......@@ -179,7 +179,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
});
PageHelper.startPage(current, size);
List<TdHYGFInverterDayGenerate> tdHYGFInverterDayGenerates = tdHYGFInverterDayGenerateMapper.selectListPage(snCodeList, maxCreatedTimeList);
List<TdHYGFInverterDayGenerate> tdHYGFInverterDayGenerates = tdHYGFInverterDayGenerateMapper.selectListPage(snCodeList, null, startTime, endTime);
tdHYGFInverterDayGenerates.forEach(tdHYGFInverterDayGenerate -> {
Date date1 = new Date(tdHYGFInverterDayGenerate.getCreatedTime());
......
......@@ -25,6 +25,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.privilege.model.GroupUserModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
......@@ -342,11 +343,13 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
LambdaQueryWrapper<PublicAgencyUser> qud = new LambdaQueryWrapper<>();
qud.eq(PublicAgencyUser::getSequenceNbr, id);
PublicAgencyUser publicAgencyUse = publicAgencyUserMapper.selectOne(qud);
LambdaQueryWrapper<PersonnelBusiness> qug = new LambdaQueryWrapper<>();
qug.eq(PersonnelBusiness::getFoundationId, publicAgencyUse.getSequenceNbr());
PersonnelBusiness personnelBusines = personnelBusinessMapper.selectOne(qug);
personnelBusines.setUserType("2");
personnelBusinessMapper.updateById(personnelBusines);
//获取经销商管理员
LambdaQueryWrapper<UnitInfo> qudg = new LambdaQueryWrapper<>();
qudg.eq(UnitInfo::getAmosCompanySeq, personnelBusines.getAmosDealerId());
......@@ -355,17 +358,19 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
LambdaQueryWrapper<PublicAgencyUser> qudx = new LambdaQueryWrapper<>();
qudx.eq(PublicAgencyUser::getAmosUserId, unitInfo.getAdminUserId());
PublicAgencyUser publicAgencyUsex = publicAgencyUserMapper.selectOne(qudx);
LambdaQueryWrapper<PersonnelBusiness> qugf = new LambdaQueryWrapper<>();
qugf.eq(PersonnelBusiness::getFoundationId, publicAgencyUsex.getSequenceNbr());
PersonnelBusiness personnelBusinesx = personnelBusinessMapper.selectOne(qugf);
personnelBusinesx.setUserType("1");
personnelBusinessMapper.updateById(personnelBusinesx);
unitInfo.setAdminLoginName(publicAgencyUse.getAmosUserName());
unitInfo.setAdminPhone(publicAgencyUse.getEmergencyTelephone());
unitInfo.setAdminUserId(publicAgencyUse.getAmosUserId());
unitInfo.setAdminUserName(publicAgencyUse.getRealName());
unitInfoMapper.updateById(unitInfo);
//修改管理员
List<Long> roidx = JSONArray.parseArray(publicAgencyUsex.getRole(), Long.class);
......@@ -410,7 +415,10 @@ public class PersonnelBusinessServiceImpl extends BaseService<PersonnelBusinessD
roid.add(userGroupId);
if (roid.contains(userGroupempty)) {
roid.remove(userGroupempty);
Privilege.groupUserClient.deleteGroupUser(userGroupempty, publicAgencyUsex.getAmosUserId());
// Privilege.groupUserClient.deleteGroupUser(userGroupempty, publicAgencyUsex.getAmosUserId());
personnelBusinessMapper.deleteRoleByUserId(publicAgencyUse.getAmosUserId(),userGroupempty);
personnelBusinessMapper.deleteOrgRoleByUserId(publicAgencyUse.getAmosUserId(),userGroupempty);
}
publicAgencyUse.setRole(JSON.toJSONString(roid));
......
package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -180,6 +181,13 @@ public class IdxBizFanWeightController extends BaseController {
LambdaQueryWrapper<IdxBizFanWeight> qu1 = new LambdaQueryWrapper<>();
qu1.in(!list1.isEmpty(), IdxBizFanWeight::getSequenceNbr, list1);
List<IdxBizFanWeight> list = idxBizFanWeightMapper.selectList(qu1);
//如果区域为一个,则权重只能为1
Integer araeCount = idxBizFanWeightMapper.selectCount(new LambdaQueryWrapper<IdxBizFanWeight>().eq(IdxBizFanWeight::getType, "1"));
if(araeCount == 1 && CollectionUtil.isNotEmpty(list) && list.size()==1 && list.get(0).getType().equals("1")){
if(!"1.0000".equals(value.get("data").toString())){
throw new BadRequest("该区域权重只能配置为1");
}
}
IdxBizFanWeight reviewDto = list.get(0);
LambdaQueryWrapper<IdxBizFanWeight> qu = new LambdaQueryWrapper<>();
//获取所属,同类指标
......
package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.constants.BizConstant;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.biz.amosprojectentity.StdUserEmpower;
import com.yeejoin.amos.boot.module.jxiop.biz.amosprojectmapper.UserEmpowerMapper;
......@@ -191,6 +193,13 @@ public class IdxBizPvWeightController extends BaseController {
LambdaQueryWrapper<IdxBizPvWeight> qu1 = new LambdaQueryWrapper<>();
qu1.in(!list1.isEmpty(), IdxBizPvWeight::getSequenceNbr, list1);
List<IdxBizPvWeight> list = idxBizPvWeightMapper.selectList(qu1);
//如果区域为一个,则权重只能为1
Integer araeCount = idxBizPvWeightMapper.selectCount(new LambdaQueryWrapper<IdxBizPvWeight>().eq(IdxBizPvWeight::getType, "1"));
if(araeCount == 1 &&CollectionUtil.isNotEmpty(list) && list.size()==1 && list.get(0).getType().equals("1")){
if(!"1.0000".equals(value.get("data").toString())){
throw new BadRequest("该区域权重只能配置为1");
}
}
IdxBizPvWeight reviewDto = list.get(0);
LambdaQueryWrapper<IdxBizPvWeight> qu = new LambdaQueryWrapper<>();
//获取所属,同类指标
......
......@@ -102,7 +102,6 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
//限制必须是区间时间段
if(startTime==null||endTime==null){
......
......@@ -73,7 +73,7 @@
count( 1 ) as value
FROM
sjgl_zsj_zsbtz a
INNER JOIN privilege_company b on a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT JOIN privilege_company b on a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
<where>
<if test="parentCode != null and parentCode != ''">
b.ORG_CODE like concat(#{parentCode},'%')
......@@ -89,7 +89,7 @@
count(1) as value
FROM
fdgl_job_main a
INNER JOIN privilege_company b on a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT JOIN privilege_company b on a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
<where>
<if test="parentCode != null and parentCode != ''">
b.ORG_CODE like concat(#{parentCode},'%')
......@@ -110,7 +110,7 @@
else 3 end) as sort
FROM
sjgl_zsj_zsbtz a
INNER JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
<where>
<if test="parentCode != null and parentCode != ''">
AND b.ORG_CODE like concat(#{parentCode},'%')
......@@ -134,7 +134,7 @@
count(1)
FROM
sjgl_zsj_zsbtz a
INNER JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
<where>
<if test="parentCode != null and parentCode != ''">
AND b.ORG_CODE like concat(#{parentCode},'%')
......@@ -165,7 +165,7 @@
else 3 end as sort
FROM
fdgl_job_main a
INNER JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
left join sjgl_zsj_zsbtz c on a.EQUIP_DBID = c.DBID
<where>
<if test="parentCode != null and parentCode != ''">
......@@ -190,7 +190,7 @@
count(1)
FROM
fdgl_job_main a
INNER JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
LEFT JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
<where>
<if test="parentCode != null and parentCode != ''">
AND b.ORG_CODE like concat(#{parentCode},'%')
......
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper">
<select id="getStationCapactityByStationWerks" resultType="Double">
select SUM(CAPACITYL) from sjgl_zsj_zsbtz where WERKS = #{WERKS} and is_del = 0 and CAPACITYL is not null
select SUM(CAPACITYL) from sjgl_zsj_zsbtz where WERKS = #{WERKS} and is_del = 0 and CAPACITYL is not null and CAPACITYL != ''
</select>
<select id="getStationInfoMapByStationWerks" resultType="map">
......
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