|
|
|
@ -12,6 +12,8 @@ import com.zdxt.code.domain.*; |
|
|
|
import com.zdxt.code.domain.dto.StatisticalPanelDto; |
|
|
|
import com.zdxt.code.mapper.StatisticalPanelMapper; |
|
|
|
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.stereotype.Service; |
|
|
|
|
|
|
|
@ -319,6 +321,9 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService { |
|
|
|
lastDeptTotal = statisticalPanelMapper.statisticalPanelProgramWithDept(statisticsIndicatorPart); |
|
|
|
statisticsIndicatorPart.setDeptId(""); |
|
|
|
} |
|
|
|
//发布检查计划部门数量
|
|
|
|
Integer lastGroupByDeptTotal=statisticalPanelMapper.statisticalPanelProgramGroupByDept(statisticsIndicatorPart1); |
|
|
|
Integer nowGroupByDeptTotal=statisticalPanelMapper.statisticalPanelProgramGroupByDept(statisticsIndicatorPart1); |
|
|
|
|
|
|
|
List<StatisticsIndicatorPart> statisticsIndicatorParts = new ArrayList<>(); |
|
|
|
//返回结果
|
|
|
|
@ -328,10 +333,16 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService { |
|
|
|
statisticsIndicatorPart3.setHuan((allTotal-lastAllTotal)); |
|
|
|
statisticsIndicatorParts.add(statisticsIndicatorPart3); |
|
|
|
|
|
|
|
//行政检查计划
|
|
|
|
/*//行政检查计划
|
|
|
|
StatisticsIndicatorPart statisticsIndicatorPart5 = new StatisticsIndicatorPart(); |
|
|
|
statisticsIndicatorPart5.setTotal(allTotal); |
|
|
|
statisticsIndicatorPart5.setHuan((allTotal-lastAllTotal)); |
|
|
|
statisticsIndicatorParts.add(statisticsIndicatorPart5);*/ |
|
|
|
|
|
|
|
//发布检查计划部门数量
|
|
|
|
StatisticsIndicatorPart statisticsIndicatorPart5 = new StatisticsIndicatorPart(); |
|
|
|
statisticsIndicatorPart5.setTotal(nowGroupByDeptTotal); |
|
|
|
statisticsIndicatorPart5.setHuan((nowGroupByDeptTotal-lastGroupByDeptTotal)); |
|
|
|
statisticsIndicatorParts.add(statisticsIndicatorPart5); |
|
|
|
|
|
|
|
//本单位检查计划统计
|
|
|
|
@ -423,7 +434,7 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService { |
|
|
|
return statisticsIndicatorPart; |
|
|
|
} |
|
|
|
public String takeDeptId(){ |
|
|
|
//获取该帐号执法证件号
|
|
|
|
/*//获取该帐号执法证件号
|
|
|
|
String lawCertificateNum=userApi.getCurrentUser().getLawCertificateNum(); |
|
|
|
if(lawCertificateNum!=null&&!"".equals(lawCertificateNum)){ |
|
|
|
//通过该帐号的执法证件号去查该帐号执法人员表中的信息
|
|
|
|
@ -435,7 +446,26 @@ public class StatisticalPaneServiceImpl implements StatisticalPaneService { |
|
|
|
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; |
|
|
|
} |
|
|
|
|
|
|
|
|