Browse Source

机构新增需求变更

develop
wangsixiang 9 months ago
parent
commit
c1d5291aad
  1. 3
      zc-business/src/main/java/com/zc/business/controller/DcOrganizationController.java
  2. 1
      zc-business/src/main/java/com/zc/business/service/impl/DcOrganizationServiceImpl.java
  3. 9
      zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml

3
zc-business/src/main/java/com/zc/business/controller/DcOrganizationController.java

@ -89,6 +89,9 @@ public class DcOrganizationController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody DcOrganization dcOrganization)
{
if (dcOrganization.getParentId()==null){
return AjaxResult.error("参数错误");
}
return toAjax(dcOrganizationService.insertDcOrganization(dcOrganization));
}

1
zc-business/src/main/java/com/zc/business/service/impl/DcOrganizationServiceImpl.java

@ -84,6 +84,7 @@ public class DcOrganizationServiceImpl implements IDcOrganizationService
public int insertDcOrganization(DcOrganization dcOrganization)
{
dcOrganization.setCreateTime(DateUtils.getNowDate());
dcOrganization.setOrganizationType(2);//注入类型为驻点
return dcOrganizationMapper.insertDcOrganization(dcOrganization);
}

9
zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml

@ -46,14 +46,11 @@
order by warning.warning_time desc
</select>
<select id="selectSectionPerceivedEventsList" resultType="hashmap">
select s.section_name sectionName,
(select COUNT(1) FROM `dc_warning` as w where
DATE_FORMAT(w.warning_time,'%Y-%m-%d')=DATE_FORMAT(#{warningTime},'%Y-%m-%d')
and mark.stake_mark=w.stake_mark)number from dc_warning as w
select s.section_name sectionName,COUNT(1) number from dc_warning as w
left JOIN dc_stake_mark as mark ON mark.stake_mark=w.stake_mark and mark.direction=w.direction
LEFT JOIN dc_road_section as s ON mark.section_id=s.id
where mark.stake_mark is not null
group by w.stake_mark
where mark.stake_mark is not null and DATE_FORMAT(w.warning_time,'%Y-%m-%d')='2024-02-26'
group by sectionName
HAVING number !=0
order by number desc
</select>

Loading…
Cancel
Save