Browse Source

综合分析修改

v4
zouyx 2 years ago
parent
commit
92e2e5b2b9
  1. 3
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html
  2. 7
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalPanelMapper.java
  3. 34
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java
  4. 14
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

3
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/statisticalPanel.html

@ -279,7 +279,8 @@
</div> </div>
<div class="panel-card-bottom"> <div class="panel-card-bottom">
<div class="panel-card-left"> <div class="panel-card-left">
<div class="cont-title">行政检查计划数量</div> <!--<div class="cont-title">行政检查计划数量</div>-->
<div class="cont-title">发布检查计划部门数量</div>
<div class="cont-total"><b><span id="program-xz-total">1,005</span></b><span>个</span></div> <div class="cont-total"><b><span id="program-xz-total">1,005</span></b><span>个</span></div>
<div class="percent-tag"> <div class="percent-tag">
<!-- <span class="data-fall">&#8595</span>--> <!-- <span class="data-fall">&#8595</span>-->

7
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/StatisticalPanelMapper.java

@ -39,4 +39,11 @@ public interface StatisticalPanelMapper {
*/ */
Integer statisticalPanelProgramWithDept(StatisticsIndicatorPart statisticsIndicatorPart); Integer statisticalPanelProgramWithDept(StatisticsIndicatorPart statisticsIndicatorPart);
/**
* 查询本单位检查计划数量以部门分组计数
* @param statisticsIndicatorPart
* @return
*/
Integer statisticalPanelProgramGroupByDept(StatisticsIndicatorPart statisticsIndicatorPart);
} }

34
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/StatisticalPaneServiceImpl.java

@ -12,6 +12,8 @@ import com.zdxt.code.domain.*;
import com.zdxt.code.domain.dto.StatisticalPanelDto; import com.zdxt.code.domain.dto.StatisticalPanelDto;
import com.zdxt.code.mapper.StatisticalPanelMapper; import com.zdxt.code.mapper.StatisticalPanelMapper;
import com.zdxt.code.service.*; import com.zdxt.code.service.*;
import com.zdxt.domain.auth.Dept;
import com.zdxt.domain.auth.User;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -319,6 +321,9 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
lastDeptTotal = statisticalPanelMapper.statisticalPanelProgramWithDept(statisticsIndicatorPart); lastDeptTotal = statisticalPanelMapper.statisticalPanelProgramWithDept(statisticsIndicatorPart);
statisticsIndicatorPart.setDeptId(""); statisticsIndicatorPart.setDeptId("");
} }
//发布检查计划部门数量
Integer lastGroupByDeptTotal=statisticalPanelMapper.statisticalPanelProgramGroupByDept(statisticsIndicatorPart1);
Integer nowGroupByDeptTotal=statisticalPanelMapper.statisticalPanelProgramGroupByDept(statisticsIndicatorPart1);
List<StatisticsIndicatorPart> statisticsIndicatorParts = new ArrayList<>(); List<StatisticsIndicatorPart> statisticsIndicatorParts = new ArrayList<>();
//返回结果 //返回结果
@ -328,10 +333,16 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
statisticsIndicatorPart3.setHuan((allTotal-lastAllTotal)); statisticsIndicatorPart3.setHuan((allTotal-lastAllTotal));
statisticsIndicatorParts.add(statisticsIndicatorPart3); statisticsIndicatorParts.add(statisticsIndicatorPart3);
//行政检查计划 /*//行政检查计划
StatisticsIndicatorPart statisticsIndicatorPart5 = new StatisticsIndicatorPart(); StatisticsIndicatorPart statisticsIndicatorPart5 = new StatisticsIndicatorPart();
statisticsIndicatorPart5.setTotal(allTotal); statisticsIndicatorPart5.setTotal(allTotal);
statisticsIndicatorPart5.setHuan((allTotal-lastAllTotal)); statisticsIndicatorPart5.setHuan((allTotal-lastAllTotal));
statisticsIndicatorParts.add(statisticsIndicatorPart5);*/
//发布检查计划部门数量
StatisticsIndicatorPart statisticsIndicatorPart5 = new StatisticsIndicatorPart();
statisticsIndicatorPart5.setTotal(nowGroupByDeptTotal);
statisticsIndicatorPart5.setHuan((nowGroupByDeptTotal-lastGroupByDeptTotal));
statisticsIndicatorParts.add(statisticsIndicatorPart5); statisticsIndicatorParts.add(statisticsIndicatorPart5);
//本单位检查计划统计 //本单位检查计划统计
@ -423,7 +434,7 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
return statisticsIndicatorPart; return statisticsIndicatorPart;
} }
public String takeDeptId(){ public String takeDeptId(){
//获取该帐号执法证件号 /*//获取该帐号执法证件号
String lawCertificateNum=userApi.getCurrentUser().getLawCertificateNum(); String lawCertificateNum=userApi.getCurrentUser().getLawCertificateNum();
if(lawCertificateNum!=null&&!"".equals(lawCertificateNum)){ if(lawCertificateNum!=null&&!"".equals(lawCertificateNum)){
//通过该帐号的执法证件号去查该帐号执法人员表中的信息 //通过该帐号的执法证件号去查该帐号执法人员表中的信息
@ -435,7 +446,26 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService {
return iDeptService.selectDeptByCreditcode(zzjgdm).getDeptId(); return iDeptService.selectDeptByCreditcode(zzjgdm).getDeptId();
} }
} }
}*/
//获取该帐号的deptId
Long userId=userApi.getCurrentUser().getUserId();
//通过该帐号的deptId查找对应的组织机构代码(creditcode)
UserBean user=userApi.getUserByUserId(userId);
String deptId=user.getDeptId();
if(deptId!=null&&!"".equals(deptId)){
Dept dept=iDeptService.selectDeptById(deptId);
if(dept.getCreditcode()!=null&&!"".equals(dept.getCreditcode())){//如果creditcode!=null则return 对应的deptId
return deptId;
}else {//如果creditcode==null则该部门不是执法部门,则查找其父部门的组织机构代码,直至其creditcode!=null为止
while (dept.getParentId()!=null&&!"".equals(dept.getParentId())&&!"null".equals(dept.getParentId())){
dept=iDeptService.selectDeptById(dept.getParentId());
if(dept.getCreditcode()!=null&&!"".equals(dept.getCreditcode())){
return dept.getDeptId();
}
}
}
} }
//若deptId==null或者creditcode!=到底都为空则return null
return null; return null;
} }

14
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/StatisticalPanelMapper.xml

@ -73,7 +73,19 @@
AND time_type is not null AND time_type is not null
</where> </where>
</select> </select>
<select id="statisticalPanelProgramGroupByDept" resultType="integer" parameterType="StatisticsIndicatorPart">
select count(*) from(select count(*) from enforcement_inspection_program
<where>
<if test="beginTime != null and beginTime != '' ">
<![CDATA[ AND create_time >= #{beginTime} ]]>
</if>
<if test="endTime != null and endTime != '' ">
<![CDATA[ AND create_time <= #{endTime} ]]>
</if>
AND time_type is not null
</where>
group by bureau_dept_id) s
</select>
</mapper> </mapper>
Loading…
Cancel
Save