Commit e768ba01 authored by zhangyingbin's avatar zhangyingbin

修改 气瓶安全追溯系统,液化石油气瓶,总览页面,地图上充装企业许可有效期时间已经超时,地图标点依然为正常图标 的问题

parent 8c6e7dad
......@@ -34,4 +34,11 @@ public interface CylinderUnitMapper extends BaseMapper<CylinderUnit> {
Integer getWarnNum(String code);
Integer getWarnNumByAppId(String appId);
/**
* 根据creditCode查询该企业是否存在许可超期
* @param creditCode 统一社会信用代码
* @return
*/
Integer getLicenseOutOfDate(String creditCode);
}
......@@ -24,4 +24,7 @@
select count(1) from view_cylider_outofdate v where v.app_id =#{appId}
</select>
<select id="getLicenseOutOfDate" resultType="java.lang.Integer">
select count(1) from view_unit_outofdate v where v.credit_code = #{creditCode}
</select>
</mapper>
......@@ -43,6 +43,8 @@ public class CylinderUnitController extends BaseController {
@Autowired
ICylinderInfoService iCylinderInfoService;
/**
* 通过regionCode查询气瓶企业
*
......@@ -59,11 +61,14 @@ public class CylinderUnitController extends BaseController {
unitList.stream().forEach(t -> {
CylinderUnitDto temp = new CylinderUnitDto();
BeanUtils.copyProperties(t, temp);
temp.setOutOfDate(false);
int num = cylinderUnitServiceImpl.getWarnNumByAppId(t.getAppId());
if (num > 0) {
temp.setOutOfDate(true);
} else {
temp.setOutOfDate(false);
}
num = cylinderUnitServiceImpl.getLicenseOutOfDate(temp.getCreditCode());
if(num > 0){
temp.setOutOfDate(true);
}
result.add(temp);
});
......
......@@ -137,4 +137,13 @@ public class CylinderUnitServiceImpl extends BaseService<CylinderUnitDto, Cylind
tzBaseEnterpriseInfoDto.setRegUnitIcDto(regUnitIcDto);
return tzBaseEnterpriseInfoDto;
}
/**
* 根据creditCode查询该企业是否存在许可超期
* @param creditCode 统一社会信用代码
* @return
*/
public Integer getLicenseOutOfDate(String creditCode){
return baseMapper.getLicenseOutOfDate(creditCode);
}
}
\ No newline at end of file
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