@ -1,5 +1,7 @@
package com.zdxt.code.service.impl ;
package com.zdxt.code.service.impl ;
import com.zdxt.auth.feign.UserApi ;
import com.zdxt.auth.project.system.dept.service.IDeptService ;
import com.zdxt.code.domain.* ;
import com.zdxt.code.domain.* ;
import com.zdxt.code.service.* ;
import com.zdxt.code.service.* ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Autowired ;
@ -27,6 +29,14 @@ public class StatisticalPaneImpl implements StatisticalPaneService {
private IEnforcementRegistrationService enforcementRegistrationService ;
private IEnforcementRegistrationService enforcementRegistrationService ;
@Autowired
@Autowired
private IEnterpriseInformationService iEnterpriseInformationService ;
private IEnterpriseInformationService iEnterpriseInformationService ;
@Autowired
private UserApi userApi ;
@Autowired
private IZfztjdm111915Service iZfztjdm111915Service ;
@Autowired
private IZfryjdm2405301Service iZfryjdm2405301Service ;
@Autowired
private IDeptService iDeptService ;
/ * *
/ * *
* 企业 - - 无权限
* 企业 - - 无权限
@ -72,12 +82,13 @@ public class StatisticalPaneImpl implements StatisticalPaneService {
}
}
/ * *
/ * *
* 执法检查 - - 本单位执法检查需设权限未设
* 执法检查 - - 本单位执法检查已设权限
* @param statisticsIndicatorPart
* @param statisticsIndicatorPart
* @return
* @return
* /
* /
@Override
@Override
public StatisticsIndicatorPart registration ( StatisticsIndicatorPart statisticsIndicatorPart ) {
public StatisticsIndicatorPart registration ( StatisticsIndicatorPart statisticsIndicatorPart ) {
String deptId = takeDeptId ( ) ;
StatisticsIndicatorPart sNow = nowDataMake ( statisticsIndicatorPart ) ;
StatisticsIndicatorPart sNow = nowDataMake ( statisticsIndicatorPart ) ;
StatisticsIndicatorPart sLast = lastDataMake ( statisticsIndicatorPart , sNow . getBeginTime ( ) ) ;
StatisticsIndicatorPart sLast = lastDataMake ( statisticsIndicatorPart , sNow . getBeginTime ( ) ) ;
EnforcementRegistration enforcementRegistrationNow = new EnforcementRegistration ( ) ;
EnforcementRegistration enforcementRegistrationNow = new EnforcementRegistration ( ) ;
@ -99,9 +110,13 @@ public class StatisticalPaneImpl implements StatisticalPaneService {
p2 . setTotal ( uniteListNow . size ( ) ) ;
p2 . setTotal ( uniteListNow . size ( ) ) ;
p2 . setHuan ( uniteListNow . size ( ) - uniteListLast . size ( ) ) ;
p2 . setHuan ( uniteListNow . size ( ) - uniteListLast . size ( ) ) ;
StatisticsIndicatorPart p3 = new StatisticsIndicatorPart ( ) ;
StatisticsIndicatorPart p3 = new StatisticsIndicatorPart ( ) ;
enforcementRegistrationNow . setDeptQx ( deptId ) ;
enforcementRegistrationLast . setDeptQx ( deptId ) ;
List < EnforcementRegistration > qxNow = enforcementRegistrationService . selectEnforcementRegistrationList1 ( enforcementRegistrationNow ) ;
List < EnforcementRegistration > qxLast = enforcementRegistrationService . selectEnforcementRegistrationList1 ( enforcementRegistrationLast ) ;
p3 . setName ( "本单位检查数量" ) ;
p3 . setName ( "本单位检查数量" ) ;
p3 . setTotal ( now . size ( ) ) ;
p3 . setTotal ( qxN ow. size ( ) ) ;
p3 . setHuan ( now . size ( ) - last . size ( ) ) ;
p3 . setHuan ( qxN ow. size ( ) - qxL ast. size ( ) ) ;
StatisticsIndicatorPart p = new StatisticsIndicatorPart ( ) ;
StatisticsIndicatorPart p = new StatisticsIndicatorPart ( ) ;
List < StatisticsIndicatorPart > statisticsIndicatorPartList = new ArrayList < > ( ) ;
List < StatisticsIndicatorPart > statisticsIndicatorPartList = new ArrayList < > ( ) ;
p . setName ( "执法检查" ) ;
p . setName ( "执法检查" ) ;
@ -112,12 +127,13 @@ public class StatisticalPaneImpl implements StatisticalPaneService {
return p ;
return p ;
}
}
/ * *
/ * *
* 预警部分 - - 本部门需设权限未 设
* 预警部分 - - 本部门需设权限已 设
* @param statisticsIndicatorPart
* @param statisticsIndicatorPart
* @return
* @return
* /
* /
@Override
@Override
public StatisticsIndicatorPart warning ( StatisticsIndicatorPart statisticsIndicatorPart ) {
public StatisticsIndicatorPart warning ( StatisticsIndicatorPart statisticsIndicatorPart ) {
String deptId = takeDeptId ( ) ;
StatisticsIndicatorPart sNow = nowDataMake ( statisticsIndicatorPart ) ;
StatisticsIndicatorPart sNow = nowDataMake ( statisticsIndicatorPart ) ;
StatisticsIndicatorPart sLast = lastDataMake ( statisticsIndicatorPart , sNow . getBeginTime ( ) ) ;
StatisticsIndicatorPart sLast = lastDataMake ( statisticsIndicatorPart , sNow . getBeginTime ( ) ) ;
LawEnforcementWarningList warningStatisticsNow = new LawEnforcementWarningList ( ) ;
LawEnforcementWarningList warningStatisticsNow = new LawEnforcementWarningList ( ) ;
@ -139,9 +155,13 @@ public class StatisticalPaneImpl implements StatisticalPaneService {
p2 . setTotal ( mapNow . size ( ) ) ;
p2 . setTotal ( mapNow . size ( ) ) ;
p2 . setHuan ( mapNow . size ( ) - mapLast . size ( ) ) ;
p2 . setHuan ( mapNow . size ( ) - mapLast . size ( ) ) ;
StatisticsIndicatorPart p3 = new StatisticsIndicatorPart ( ) ;
StatisticsIndicatorPart p3 = new StatisticsIndicatorPart ( ) ;
warningStatisticsNow . setDeptQx ( deptId ) ;
warningStatisticsLast . setDeptQx ( deptId ) ;
List < LawEnforcementWarningList > qxNow = iLawEnforcementWarningListService . selectLawEnforcementWarningListList2 ( warningStatisticsNow ) ;
List < LawEnforcementWarningList > qxLast = iLawEnforcementWarningListService . selectLawEnforcementWarningListList2 ( warningStatisticsLast ) ;
p3 . setName ( "本单位发布预警数量" ) ;
p3 . setName ( "本单位发布预警数量" ) ;
p3 . setTotal ( lListNow1 . size ( ) ) ;
p3 . setTotal ( qxNow . size ( ) ) ;
p3 . setHuan ( lListNow1 . size ( ) - lListLast1 . size ( ) ) ;
p3 . setHuan ( qxNow . size ( ) - qxLast . size ( ) ) ;
StatisticsIndicatorPart p = new StatisticsIndicatorPart ( ) ;
StatisticsIndicatorPart p = new StatisticsIndicatorPart ( ) ;
List < StatisticsIndicatorPart > statisticsIndicatorPartList = new ArrayList < > ( ) ;
List < StatisticsIndicatorPart > statisticsIndicatorPartList = new ArrayList < > ( ) ;
p . setName ( "执法预警" ) ;
p . setName ( "执法预警" ) ;
@ -270,4 +290,17 @@ public class StatisticalPaneImpl implements StatisticalPaneService {
}
}
return statisticsIndicatorPart ;
return statisticsIndicatorPart ;
}
}
public String takeDeptId ( ) {
//获取该帐号执法证件号
String lawCertificateNum = userApi . getCurrentUser ( ) . getLawCertificateNum ( ) ;
if ( lawCertificateNum ! = null & & ! "" . equals ( lawCertificateNum ) ) {
//通过该帐号的执法证件号去查该帐号执法人员表中的信息
String zzjgdm = iZfryjdm2405301Service . selectZfryByZfCode ( lawCertificateNum ) . getZzjgdm ( ) ;
if ( zzjgdm ! = null & & ! "" . equals ( zzjgdm ) ) {
//从信息中获取组织机构代码,以此查询sys_dept中的dept_Id
return iDeptService . selectDeptByCreditcode ( zzjgdm ) . getDeptId ( ) ;
}
}
return null ;
}
}
}