|
@@ -83,11 +83,11 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
ZsyzSbbzb zsyzSbbzb = zsyzSbbzbService.selectZsyzSbbzbById(zsyzShyj.getXmId());
|
|
|
if (zsyzSbbzb != null && TWO.equals(zsyzSbbzb.getProgress())) {
|
|
|
//如果项目进度是2,项目承接,招商中心不能审核
|
|
|
- return AjaxResult.error("当前项目已被指派,等待相关部门审核");
|
|
|
+ return AjaxResult.error("当前项目已被指派,等待相关部门审核" );
|
|
|
}
|
|
|
if (zsyzSbbzb != null && TWO.equals(zsyzSbbzb.getXmStatus())) {
|
|
|
//如果项目状态是2已通过
|
|
|
- return AjaxResult.error("当前项目已审核");
|
|
|
+ return AjaxResult.error("当前项目已审核" );
|
|
|
}
|
|
|
if (zsyzSbbzb != null) {
|
|
|
if (TWO.equals(shjg)) {
|
|
@@ -95,8 +95,8 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
zsyzSbbzb.setXmStatus(TWO);
|
|
|
zsyzSbbzb.setShjg(ONE);
|
|
|
String sfwlhxxxm = zsyzSbbzb.getSfwlhxxxm();
|
|
|
- if ("S".equals(sfwlhxxxm)){
|
|
|
- zsyzSbbzb.setSfwlhxxxm("Y");
|
|
|
+ if ("S".equals(sfwlhxxxm)) {
|
|
|
+ zsyzSbbzb.setSfwlhxxxm("Y" );
|
|
|
}
|
|
|
zsyzSbbzbMapper.updateZsyzSbbzbProgress(zsyzSbbzb);
|
|
|
} else if (THR.equals(shjg)) {
|
|
@@ -126,21 +126,22 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
zsyzLcjlMapper.insertZsyzLcjl(zsyzLcjl);
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
- return AjaxResult.error("未查询到当前项目信息");
|
|
|
+ return AjaxResult.error("未查询到当前项目信息" );
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 省库项目审核
|
|
|
+ *
|
|
|
* @param zsyzSkxm
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
public AjaxResult sksh(ZsyzSkxm zsyzSkxm) {
|
|
|
ZsyzSkxm zsyzSkxmOld = zsyzSkxmMapper.selectZsyzSkxmById(zsyzSkxm.getId());
|
|
|
- if (zsyzSkxmOld != null){
|
|
|
+ if (zsyzSkxmOld != null) {
|
|
|
String isSh = zsyzSkxmOld.getIsSh();
|
|
|
- if (!ONE.equals(isSh)){
|
|
|
- return AjaxResult.error("当前项目已审核");
|
|
|
+ if (!ONE.equals(isSh)) {
|
|
|
+ return AjaxResult.error("当前项目已审核" );
|
|
|
}
|
|
|
}
|
|
|
zsyzSkxm.setShTime(DateUtils.getNowDate());
|
|
@@ -155,6 +156,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
|
|
|
/**
|
|
|
* 获取行政规划
|
|
|
+ *
|
|
|
* @param pid
|
|
|
* @return
|
|
|
*/
|
|
@@ -179,20 +181,20 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
roleName = roles.get(0).getRoleKey();
|
|
|
}
|
|
|
if (!CJD.equals(roleName)) {
|
|
|
- return AjaxResult.error("当前用户不是承接地角色");
|
|
|
+ return AjaxResult.error("当前用户不是承接地角色" );
|
|
|
}
|
|
|
|
|
|
//判断项目阶段
|
|
|
String progress = zsyzShyj.getXmjd();
|
|
|
if (!TWO.equals(progress)) {
|
|
|
- return AjaxResult.error("当前项目进度异常,承接地无法审核");
|
|
|
+ return AjaxResult.error("当前项目进度异常,承接地无法审核" );
|
|
|
}
|
|
|
//判断该项目的承接地是否是该用户
|
|
|
ZsyzSbbzb zsyzSbbzb1 = zsyzSbbzbMapper.selectZsyzSbbzbById(zsyzShyj.getXmId());
|
|
|
if (zsyzSbbzb1 != null) {
|
|
|
Long cjdId = zsyzSbbzb1.getCjdId();
|
|
|
if (!SecurityUtils.getDeptId().equals(cjdId)) {
|
|
|
- return AjaxResult.error("您不是当前项目得指定承接地,无法审核");
|
|
|
+ return AjaxResult.error("您不是当前项目得指定承接地,无法审核" );
|
|
|
}
|
|
|
}
|
|
|
//获取审核结果
|
|
@@ -202,7 +204,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
zsyzProjectDept.setXmId(zsyzShyj.getXmId());
|
|
|
zsyzProjectDept.setDeptId(SecurityUtils.getDeptId());
|
|
|
zsyzProjectDept.setDeptType(ONE);
|
|
|
- zsyzProjectDept.setIsDel("N");
|
|
|
+ zsyzProjectDept.setIsDel("N" );
|
|
|
|
|
|
List<ZsyzProjectDept> zsyzProjectDepts = projectDeptService.selectZsyzProjectDeptList(zsyzProjectDept);
|
|
|
ZsyzProjectDept zsyzProjectDept1 = zsyzProjectDepts.get(0);
|
|
@@ -212,9 +214,9 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
|
|
|
String isHf = zsyzProjectDept1.getIsHf();
|
|
|
if (StringUtils.isNotEmpty(isHf) && "Y".equals(isHf)) {
|
|
|
- return AjaxResult.error("当前项目已经回复过");
|
|
|
+ return AjaxResult.error("当前项目已经回复过" );
|
|
|
}
|
|
|
- zsyzProjectDept1.setIsHf("Y");
|
|
|
+ zsyzProjectDept1.setIsHf("Y" );
|
|
|
//更改主表信息
|
|
|
ZsyzSbbzb zsyzSbbzb = new ZsyzSbbzb();
|
|
|
zsyzSbbzb.setId(zsyzShyj.getXmId());
|
|
@@ -222,7 +224,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
//获取该项目要素部门的指派信息
|
|
|
zsyzProjectDept.setDeptId(null);
|
|
|
zsyzProjectDept.setDeptType(TWO);
|
|
|
- zsyzProjectDept.setIsDel("N");
|
|
|
+ zsyzProjectDept.setIsDel("N" );
|
|
|
List<ZsyzProjectDept> zsyzProjectDeptsYsbm = projectDeptService.selectZsyzProjectDeptList(zsyzProjectDept);
|
|
|
//修改中间表数据
|
|
|
projectDeptService.updateZsyzProjectDept(zsyzProjectDept1);
|
|
@@ -232,7 +234,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
//承接地审核通过去查询中间表 是否所有指派的要素部门都回复且通过
|
|
|
if (zsyzProjectDeptsYsbm != null && zsyzProjectDeptsYsbm.size() > 0) {
|
|
|
Map<String, List<ZsyzProjectDept>> collect = zsyzProjectDeptsYsbm.stream().collect(Collectors.groupingBy(ZsyzProjectDept::getIsHf));
|
|
|
- List<ZsyzProjectDept> yList = collect.get("Y");
|
|
|
+ List<ZsyzProjectDept> yList = collect.get("Y" );
|
|
|
if (yList != null && zsyzProjectDeptsYsbm.size() == yList.size()) {
|
|
|
//说明都回复过
|
|
|
Map<String, List<ZsyzProjectDept>> shjpMap = yList.stream().collect(Collectors.groupingBy(ZsyzProjectDept::getShjg));
|
|
@@ -265,7 +267,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
//需要去中间表zsyz_project_dept判断要素部门是否都回复过
|
|
|
if (zsyzProjectDeptsYsbm != null && zsyzProjectDeptsYsbm.size() > 0) {
|
|
|
Map<String, List<ZsyzProjectDept>> collect = zsyzProjectDeptsYsbm.stream().collect(Collectors.groupingBy(ZsyzProjectDept::getIsHf));
|
|
|
- List<ZsyzProjectDept> yList = collect.get("Y");
|
|
|
+ List<ZsyzProjectDept> yList = collect.get("Y" );
|
|
|
if (yList != null && zsyzProjectDeptsYsbm.size() == yList.size()) {
|
|
|
//说明都回复过 项目回到 项目首谈已审核,清空承接地信息
|
|
|
zsyzSbbzb.setProgress(ONE);
|
|
@@ -274,7 +276,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
//清空要素部门和引资单位中间表
|
|
|
projectDeptService.deleteZsyzProjectDeptByXmId(zsyzShyj.getXmId());
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
//如果没有要素部门 项目回到 项目首谈已审核,清空承接地信息
|
|
|
zsyzSbbzb.setProgress(ONE);
|
|
|
zsyzSbbzb.setXmStatus(TWO);
|
|
@@ -325,30 +327,30 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
roleName = roles.get(0).getRoleKey();
|
|
|
}
|
|
|
if (!YSBM.equals(roleName)) {
|
|
|
- return AjaxResult.error("当前用户不是要素部门角色");
|
|
|
+ return AjaxResult.error("当前用户不是要素部门角色" );
|
|
|
}
|
|
|
//判断项目阶段
|
|
|
String progress = zsyzShyj.getXmjd();
|
|
|
if (!TWO.equals(progress)) {
|
|
|
- return AjaxResult.error("当前项目进度异常,要素部门无法审核");
|
|
|
+ return AjaxResult.error("当前项目进度异常,要素部门无法审核" );
|
|
|
}
|
|
|
//判断是否回复过
|
|
|
ZsyzProjectDept zsyzProjectDept = new ZsyzProjectDept();
|
|
|
zsyzProjectDept.setXmId(zsyzShyj.getXmId());
|
|
|
zsyzProjectDept.setDeptId(SecurityUtils.getDeptId());
|
|
|
zsyzProjectDept.setDeptType(TWO);
|
|
|
- zsyzProjectDept.setIsDel("N");
|
|
|
+ zsyzProjectDept.setIsDel("N" );
|
|
|
List<ZsyzProjectDept> zsyzProjectDepts = projectDeptService.selectZsyzProjectDeptList(zsyzProjectDept);
|
|
|
- if (zsyzProjectDepts == null || zsyzProjectDepts.size() == 0){
|
|
|
- return AjaxResult.error("您不是当前项目得指定的部门,无法审核");
|
|
|
+ if (zsyzProjectDepts == null || zsyzProjectDepts.size() == 0) {
|
|
|
+ return AjaxResult.error("您不是当前项目得指定的部门,无法审核" );
|
|
|
}
|
|
|
ZsyzProjectDept zsyzProjectDept1 = zsyzProjectDepts.get(0);
|
|
|
if (zsyzProjectDept1 != null && "Y".equals(zsyzProjectDept1.getIsHf())) {
|
|
|
- return AjaxResult.error("当前项目已经回复过");
|
|
|
+ return AjaxResult.error("当前项目已经回复过" );
|
|
|
}
|
|
|
//审核结果
|
|
|
String shjg = zsyzShyj.getShjg();
|
|
|
- zsyzProjectDept1.setIsHf("Y");
|
|
|
+ zsyzProjectDept1.setIsHf("Y" );
|
|
|
zsyzProjectDept1.setShjg(shjg);
|
|
|
zsyzProjectDept1.setShyj(zsyzShyj.getShyj());
|
|
|
//定义主表修改对象
|
|
@@ -393,7 +395,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
//要素部门有多个
|
|
|
//判断除我外是否全部回复
|
|
|
Map<String, List<ZsyzProjectDept>> collect = zsyzProjectDeptsYsbm.stream().collect(Collectors.groupingBy(ZsyzProjectDept::getIsHf));
|
|
|
- List<ZsyzProjectDept> yList = collect.get("Y");
|
|
|
+ List<ZsyzProjectDept> yList = collect.get("Y" );
|
|
|
if (yList != null && (zsyzProjectDeptsYsbm.size() - 1) == yList.size()) {
|
|
|
Map<String, List<ZsyzProjectDept>> shjpMap = yList.stream().collect(Collectors.groupingBy(ZsyzProjectDept::getShjg));
|
|
|
// 判断是否都同意
|
|
@@ -452,7 +454,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
} else {
|
|
|
//要素部门有多个
|
|
|
Map<String, List<ZsyzProjectDept>> collect = zsyzProjectDeptsYsbm.stream().collect(Collectors.groupingBy(ZsyzProjectDept::getIsHf));
|
|
|
- List<ZsyzProjectDept> yList = collect.get("Y");
|
|
|
+ List<ZsyzProjectDept> yList = collect.get("Y" );
|
|
|
if (yList != null && (zsyzProjectDeptsYsbm.size() - 1) == yList.size()) {
|
|
|
//说明出我之外都回复过
|
|
|
//判断承接地是否回复过
|
|
@@ -500,6 +502,97 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
@Override
|
|
|
public AjaxResult census(ZsyzSbbzb zsyzSbbzb) {
|
|
|
Map<String, Object> paramsMap = zsyzSbbzb.getParams();
|
|
|
+ if (paramsMap != null && paramsMap.size() > 0) {
|
|
|
+ Object year = paramsMap.get("year" );
|
|
|
+ if (ObjectUtils.isNotEmpty(year)) {
|
|
|
+ paramsMap.put("beginTime" , year + "0101" );
|
|
|
+ paramsMap.put("endTime" , year + "1231" );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Long deptId = SecurityUtils.getDeptId();
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ //定义返回值
|
|
|
+ int sk = 0;
|
|
|
+ int st = 0;
|
|
|
+ //int cj = 0;
|
|
|
+ int qy = 0;
|
|
|
+ int kg = 0;
|
|
|
+ int tc = 0;
|
|
|
+ int ps = 0;
|
|
|
+ int all = 0;
|
|
|
+ SysUser currentUser = SecurityUtils.getLoginUser().getUser();
|
|
|
+ List<ZsyzSbbzb> zsyzSbbzbs = new ArrayList<>();
|
|
|
+ String roleKey = "";
|
|
|
+ // 如果是超级管理员/管理员,则不过滤数据
|
|
|
+ List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
|
|
+ if (roles != null && roles.size() > 0) {
|
|
|
+ roleKey = roles.get(0).getRoleKey();
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(currentUser) && (currentUser.isAdmin() || MANAGE.equals(roleKey) || LEADER.equals(roleKey))) {
|
|
|
+ //如果是admin/或者平台管理员/或者领导 获取到所有数据
|
|
|
+ //zsyzSbbzbs = zsyzSbbzbMapper.selectZsyzSbbzbList(zsyzSbbzb);
|
|
|
+ st = zsyzSbbzbMapper.selectZsyzSbbzbCount(zsyzSbbzb);
|
|
|
+ qy = zsyzSbbzbMapper.selectZsyzQyxxCount(zsyzSbbzb);
|
|
|
+ kg = zsyzSbbzbMapper.selectZsyzKgxxCount(zsyzSbbzb);
|
|
|
+ tc = zsyzSbbzbMapper.selectZsyzTcxxCount(zsyzSbbzb);
|
|
|
+ //统计领导批示项目数量
|
|
|
+ ps = zsyzSbbzbMapper.selectZsyzLdpsCount(zsyzSbbzb);
|
|
|
+ //查询省库数据
|
|
|
+ ZsyzSkxm zsyzSkxm = new ZsyzSkxm();
|
|
|
+ zsyzSkxm.setDeptId(deptId);
|
|
|
+ zsyzSkxm.setParams(paramsMap);
|
|
|
+ List<ZsyzSkxm> zsyzSkxms = zsyzSkxmMapper.selectZsyzSkxmList(zsyzSkxm);
|
|
|
+ if (zsyzSkxms != null && zsyzSkxms.size() > 0) {
|
|
|
+ sk = zsyzSkxms.size();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //如果不是admin/或者平台管理员 判断是什么角色
|
|
|
+ //如果是FALSE 则包含承接地
|
|
|
+ if (CJD.equals(roleKey)) {
|
|
|
+ //只查询承接地数据和自己上报的线索
|
|
|
+ zsyzSbbzb.setCjdId(deptId);
|
|
|
+ st = zsyzSbbzbMapper.selectZsyzSbbzbCjdCount(zsyzSbbzb);
|
|
|
+ qy = zsyzSbbzbMapper.selectZsyzQyxxCount(zsyzSbbzb);
|
|
|
+ kg = zsyzSbbzbMapper.selectZsyzKgxxCount(zsyzSbbzb);
|
|
|
+ tc = zsyzSbbzbMapper.selectZsyzTcxxCount(zsyzSbbzb);
|
|
|
+ //统计领导批示项目数量
|
|
|
+ ps = zsyzSbbzbMapper.selectZsyzLdpsCount(zsyzSbbzb);
|
|
|
+ } else {
|
|
|
+ zsyzSbbzb.setDeptId(deptId);
|
|
|
+ //查询指派给要素和自己上报的线索
|
|
|
+ zsyzSbbzbs = zsyzSbbzbMapper.selectZsyzSbbzbListByZp(zsyzSbbzb);
|
|
|
+ if (zsyzSbbzbs.size() > 0){
|
|
|
+ st = zsyzSbbzbs.size();
|
|
|
+ }
|
|
|
+ qy = zsyzSbbzbMapper.selectZsyzQyxxCountByZp(zsyzSbbzb);
|
|
|
+ kg = zsyzSbbzbMapper.selectZsyzKgxxCountByZp(zsyzSbbzb);
|
|
|
+ tc = zsyzSbbzbMapper.selectZsyzTcxxCountByZp(zsyzSbbzb);
|
|
|
+ ps = zsyzSbbzbMapper.selectZsyzLdpsCountByZp(zsyzSbbzb);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ map.put(ST, st);
|
|
|
+ //map.put(CJ, cj);
|
|
|
+ map.put(QY, qy);
|
|
|
+ map.put(KG, kg);
|
|
|
+ map.put(TC, tc);
|
|
|
+ map.put(SK, sk);
|
|
|
+ //问题项目,只要是被驳回的都是问题项目
|
|
|
+ ZsyzSbbzb zsyzSbbzbWt = new ZsyzSbbzb();
|
|
|
+ zsyzSbbzbWt.setXmStatus(THR);
|
|
|
+ zsyzSbbzbWt.setParams(paramsMap);
|
|
|
+ List<ZsyzSbbzb> zsyzSbbzbsWt = zsyzSbbzbService.selectZsyzSbbzbList(zsyzSbbzbWt);
|
|
|
+ int wt = 0;
|
|
|
+ if (zsyzSbbzbsWt != null) {
|
|
|
+ wt = zsyzSbbzbsWt.size();
|
|
|
+ }
|
|
|
+ map.put("wt" , wt);
|
|
|
+ map.put("ps" , ps);
|
|
|
+ map.put("all" , st+qy+kg+tc+sk);
|
|
|
+ return AjaxResult.success(map);
|
|
|
+ /**
|
|
|
+ * 老版本代码 没有按年度,按进度单独统计
|
|
|
+ */
|
|
|
+/* Map<String, Object> paramsMap = zsyzSbbzb.getParams();
|
|
|
Object year = paramsMap.get("year");
|
|
|
if (ObjectUtils.isNotEmpty(year)){
|
|
|
paramsMap.put("beginTime",year+"0101");
|
|
@@ -606,7 +699,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
}
|
|
|
map.put("ps", ps);
|
|
|
map.put("all", all);
|
|
|
- return AjaxResult.success(map);
|
|
|
+ return AjaxResult.success(map);*/
|
|
|
}
|
|
|
|
|
|
//首页统计折线图
|
|
@@ -614,12 +707,102 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
public AjaxResult censusXy(String year) {
|
|
|
//1.创建一个放所有日期的集合
|
|
|
List<String> dates = new ArrayList();
|
|
|
- dates.add("第一季度");
|
|
|
- dates.add("第二季度");
|
|
|
- dates.add("第三季度");
|
|
|
- dates.add("第四季度");
|
|
|
+ dates.add("第一季度" );
|
|
|
+ dates.add("第二季度" );
|
|
|
+ dates.add("第三季度" );
|
|
|
+ dates.add("第四季度" );
|
|
|
Map map = new HashMap(2);
|
|
|
- map.put("x", dates);
|
|
|
+ map.put("x" , dates);
|
|
|
+ Map<String, List<Integer>> yMpa = new HashMap();
|
|
|
+ List<Integer> stList = new ArrayList();
|
|
|
+ List<Integer> qyList = new ArrayList();
|
|
|
+ List<Integer> kgList = new ArrayList();
|
|
|
+ List<Integer> tcList = new ArrayList();
|
|
|
+ //查询对应季度所有正常的项目
|
|
|
+ List<Map<String, Object>> dateList = new ArrayList<>();
|
|
|
+
|
|
|
+ Map<String, Object> timeMapOne = new HashMap<>(2);
|
|
|
+ Map<String, Object> timeMapTwo = new HashMap<>(2);
|
|
|
+ Map<String, Object> timeMapThr = new HashMap<>(2);
|
|
|
+ Map<String, Object> timeMapFor = new HashMap<>(2);
|
|
|
+ timeMapOne.put("beginTime" , year + "0101" );
|
|
|
+ timeMapOne.put("endTime" , year + "0331" );
|
|
|
+ timeMapTwo.put("beginTime" , year + "0401" );
|
|
|
+ timeMapTwo.put("endTime" , year + "0630" );
|
|
|
+ timeMapThr.put("beginTime" , year + "0701" );
|
|
|
+ timeMapThr.put("endTime" , year + "0930" );
|
|
|
+ timeMapFor.put("beginTime" , year + "1001" );
|
|
|
+ timeMapFor.put("endTime" , year + "1231" );
|
|
|
+ dateList.add(timeMapOne);
|
|
|
+ dateList.add(timeMapTwo);
|
|
|
+ dateList.add(timeMapThr);
|
|
|
+ dateList.add(timeMapFor);
|
|
|
+ Long deptId = SecurityUtils.getDeptId();
|
|
|
+ for (int i = 0; i < 4; i++) {
|
|
|
+ ZsyzSbbzb zsyzSbbzb = new ZsyzSbbzb();
|
|
|
+ //设置日期
|
|
|
+ zsyzSbbzb.setParams(dateList.get(i));
|
|
|
+ //定义返回值
|
|
|
+ int st = 0;
|
|
|
+ int qy = 0;
|
|
|
+ int kg = 0;
|
|
|
+ int tc = 0;
|
|
|
+ SysUser currentUser = SecurityUtils.getLoginUser().getUser();
|
|
|
+ List<ZsyzSbbzb> zsyzSbbzbs = new ArrayList<>();
|
|
|
+ String roleKey = "";
|
|
|
+ // 如果是超级管理员/管理员,则不过滤数据
|
|
|
+ List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
|
|
|
+ if (roles != null && roles.size() > 0) {
|
|
|
+ roleKey = roles.get(0).getRoleKey();
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotNull(currentUser) && (currentUser.isAdmin() || MANAGE.equals(roleKey) || LEADER.equals(roleKey))) {
|
|
|
+ //如果是admin/或者平台管理员/或者领导 获取到所有数据
|
|
|
+ st = zsyzSbbzbMapper.selectZsyzSbbzbCount(zsyzSbbzb);
|
|
|
+ qy = zsyzSbbzbMapper.selectZsyzQyxxCount(zsyzSbbzb);
|
|
|
+ kg = zsyzSbbzbMapper.selectZsyzKgxxCount(zsyzSbbzb);
|
|
|
+ tc = zsyzSbbzbMapper.selectZsyzTcxxCount(zsyzSbbzb);
|
|
|
+ } else {
|
|
|
+ //如果不是admin/或者平台管理员 判断是什么角色
|
|
|
+ //如果是FALSE 则包含承接地
|
|
|
+ if (CJD.equals(roleKey)) {
|
|
|
+ //只查询承接地数据和自己上报的线索
|
|
|
+ zsyzSbbzb.setCjdId(deptId);
|
|
|
+ st = zsyzSbbzbMapper.selectZsyzSbbzbCjdCount(zsyzSbbzb);
|
|
|
+ qy = zsyzSbbzbMapper.selectZsyzQyxxCount(zsyzSbbzb);
|
|
|
+ kg = zsyzSbbzbMapper.selectZsyzKgxxCount(zsyzSbbzb);
|
|
|
+ tc = zsyzSbbzbMapper.selectZsyzTcxxCount(zsyzSbbzb);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ zsyzSbbzb.setDeptId(deptId);
|
|
|
+ //查询指派给要素和自己上报的线索
|
|
|
+ zsyzSbbzbs = zsyzSbbzbMapper.selectZsyzSbbzbListByZp(zsyzSbbzb);
|
|
|
+ if (zsyzSbbzbs.size() > 0){
|
|
|
+ st = zsyzSbbzbs.size();
|
|
|
+ }
|
|
|
+ qy = zsyzSbbzbMapper.selectZsyzQyxxCountByZp(zsyzSbbzb);
|
|
|
+ kg = zsyzSbbzbMapper.selectZsyzKgxxCountByZp(zsyzSbbzb);
|
|
|
+ tc = zsyzSbbzbMapper.selectZsyzTcxxCountByZp(zsyzSbbzb);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ stList.add(st);
|
|
|
+ qyList.add(qy);
|
|
|
+ kgList.add(kg);
|
|
|
+ tcList.add(tc);
|
|
|
+ }
|
|
|
+ yMpa.put(ST, stList);
|
|
|
+ yMpa.put(QY, qyList);
|
|
|
+ yMpa.put(KG, kgList);
|
|
|
+ yMpa.put(TC, tcList);
|
|
|
+ map.put("y" , yMpa);
|
|
|
+ return AjaxResult.success(map);
|
|
|
+/* //1.创建一个放所有日期的集合
|
|
|
+ List<String> dates = new ArrayList();
|
|
|
+ dates.add("第一季度" );
|
|
|
+ dates.add("第二季度" );
|
|
|
+ dates.add("第三季度" );
|
|
|
+ dates.add("第四季度" );
|
|
|
+ Map map = new HashMap(2);
|
|
|
+ map.put("x" , dates);
|
|
|
Map<String, List<Integer>> yMpa = new HashMap();
|
|
|
List<Integer> st = new ArrayList();
|
|
|
List<Integer> cj = new ArrayList();
|
|
@@ -633,14 +816,14 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
Map<String, Object> timeMapTwo = new HashMap<>(2);
|
|
|
Map<String, Object> timeMapThr = new HashMap<>(2);
|
|
|
Map<String, Object> timeMapFor = new HashMap<>(2);
|
|
|
- timeMapOne.put("beginTime", year + "0101");
|
|
|
- timeMapOne.put("endTime", year + "0331");
|
|
|
- timeMapTwo.put("beginTime", year + "0401");
|
|
|
- timeMapTwo.put("endTime", year + "0630");
|
|
|
- timeMapThr.put("beginTime", year + "0701");
|
|
|
- timeMapThr.put("endTime", year + "0930");
|
|
|
- timeMapFor.put("beginTime", year + "1001");
|
|
|
- timeMapFor.put("endTime", year + "1231");
|
|
|
+ timeMapOne.put("beginTime" , year + "0101" );
|
|
|
+ timeMapOne.put("endTime" , year + "0331" );
|
|
|
+ timeMapTwo.put("beginTime" , year + "0401" );
|
|
|
+ timeMapTwo.put("endTime" , year + "0630" );
|
|
|
+ timeMapThr.put("beginTime" , year + "0701" );
|
|
|
+ timeMapThr.put("endTime" , year + "0930" );
|
|
|
+ timeMapFor.put("beginTime" , year + "1001" );
|
|
|
+ timeMapFor.put("endTime" , year + "1231" );
|
|
|
dateList.add(timeMapOne);
|
|
|
dateList.add(timeMapTwo);
|
|
|
dateList.add(timeMapThr);
|
|
@@ -688,8 +871,8 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
yMpa.put(QY, qy);
|
|
|
yMpa.put(KG, kg);
|
|
|
yMpa.put(TC, tc);
|
|
|
- map.put("y", yMpa);
|
|
|
- return AjaxResult.success(map);
|
|
|
+ map.put("y" , yMpa);
|
|
|
+ return AjaxResult.success(map);*/
|
|
|
}
|
|
|
|
|
|
|
|
@@ -709,7 +892,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
if (zsyzSbbzb != null) {
|
|
|
Long cjdId = zsyzSbbzb.getCjdId();
|
|
|
if (cjdId != null) {
|
|
|
- return AjaxResult.error("该线索已指派了承接地,请勿重复指派");
|
|
|
+ return AjaxResult.error("该线索已指派了承接地,请勿重复指派" );
|
|
|
}
|
|
|
}
|
|
|
//把这个项目的指派中间表数据,全部删除
|
|
@@ -748,7 +931,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
}
|
|
|
}
|
|
|
if (sendSmsConfigs.size() > 0) {
|
|
|
- AsyncManager.me().execute(AsyncFactory.sendSms(sendSmsConfigs, "SMS_271465081"));
|
|
|
+ AsyncManager.me().execute(AsyncFactory.sendSms(sendSmsConfigs, "SMS_271465081" ));
|
|
|
}
|
|
|
}
|
|
|
zsyzSbbzbMapper.updateZsyzSbbzbCjd(zsyzSbbzbCjd);
|
|
@@ -784,7 +967,7 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
}
|
|
|
}
|
|
|
if (sendSmsConfigs.size() > 0) {
|
|
|
- AsyncManager.me().execute(AsyncFactory.sendSms(sendSmsConfigs, "SMS_271465081"));
|
|
|
+ AsyncManager.me().execute(AsyncFactory.sendSms(sendSmsConfigs, "SMS_271465081" ));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -823,10 +1006,10 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
String xmStatus = zsyzSbbzb.getXmStatus();
|
|
|
//只有项目状态是已通过
|
|
|
if (!TWO.equals(xmStatus)) {
|
|
|
- return AjaxResult.error("当前状态不能撤回");
|
|
|
+ return AjaxResult.error("当前状态不能撤回" );
|
|
|
}
|
|
|
if (TWO.equals(progress)) {
|
|
|
- return AjaxResult.error("当前项目进度不能撤回");
|
|
|
+ return AjaxResult.error("当前项目进度不能撤回" );
|
|
|
}
|
|
|
zsyzSbbzb.setXmStatus(ONE);
|
|
|
zsyzSbbzbMapper.updateZsyzSbbzbProgress(zsyzSbbzb);
|
|
@@ -840,17 +1023,18 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
zsyzLcjl.setDeptName(deptName);
|
|
|
zsyzLcjl.setProgress(progress);
|
|
|
zsyzLcjl.setXmStatus(zsyzSbbzb.getXmStatus());
|
|
|
- zsyzLcjl.setRemark("撤回操作");
|
|
|
+ zsyzLcjl.setRemark("撤回操作" );
|
|
|
zsyzLcjlMapper.insertZsyzLcjl(zsyzLcjl);
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 招商引资_情况月统计表
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
//@Override
|
|
|
- public List<Map<String, Object>> statisticsMonth(String year,String month) {
|
|
|
+ public List<Map<String, Object>> statisticsMonth(String year, String month) {
|
|
|
//Long deptId = SecurityUtils.getDeptId();
|
|
|
//SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>();
|
|
@@ -872,56 +1056,56 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
//获取所有部门
|
|
|
List<SysDept> sysDeptList = sysDeptMapper.selectDeptList(new SysDept());
|
|
|
//查询本年所有线索审核通过的项目线索
|
|
|
- List<ZsyzSbbzb> zsyzSbbzbList = zsyzSbbzbMapper.selectZsyzSbbzbListTz(year,null);
|
|
|
+ List<ZsyzSbbzb> zsyzSbbzbList = zsyzSbbzbMapper.selectZsyzSbbzbListTz(year, null);
|
|
|
//将所有项目数据分部门存放
|
|
|
Map<Long, List<ZsyzSbbzb>> zsyzSbbzbBmMap = zsyzSbbzbList.stream().collect(Collectors.groupingBy(ZsyzSbbzb::getDeptId));
|
|
|
|
|
|
for (SysDept sysDept : sysDeptList) {
|
|
|
//部门不为产业链县干招商组,市直部门,承接地,市级领导,要素部门一级部门时纳入统计
|
|
|
- if(sysDept.getDeptId()!=101 && sysDept.getDeptId()!=102 && sysDept.getDeptId()!=103 && sysDept.getDeptId()!=200 && sysDept.getDeptId()!=201){
|
|
|
+ if (sysDept.getDeptId() != 101 && sysDept.getDeptId() != 102 && sysDept.getDeptId() != 103 && sysDept.getDeptId() != 200 && sysDept.getDeptId() != 201) {
|
|
|
Map<String, Object> mapMonth = new HashMap<>();
|
|
|
- mapMonth.put("name",sysDept.getDeptName());
|
|
|
- if(zsyzQktjBmMap.get(sysDept.getDeptId())!=null && zsyzQktjBmMap.get(sysDept.getDeptId()).size()>0){
|
|
|
+ mapMonth.put("name" , sysDept.getDeptName());
|
|
|
+ if (zsyzQktjBmMap.get(sysDept.getDeptId()) != null && zsyzQktjBmMap.get(sysDept.getDeptId()).size() > 0) {
|
|
|
//部门存在数据
|
|
|
- Long zswcYear =0L;//招商外出天数(年)
|
|
|
- Long sjksYear =0L;//对接客商次数(年)
|
|
|
- Long zswcMonth =0L;//招商外出天数(年)
|
|
|
- Long sjksMonth =0L;//对接客商次数(年)
|
|
|
+ Long zswcYear = 0L;//招商外出天数(年)
|
|
|
+ Long sjksYear = 0L;//对接客商次数(年)
|
|
|
+ Long zswcMonth = 0L;//招商外出天数(年)
|
|
|
+ Long sjksMonth = 0L;//对接客商次数(年)
|
|
|
for (ZsyzQktj qktj : zsyzQktjBmMap.get(sysDept.getDeptId())) {
|
|
|
zswcYear = zswcYear + qktj.getNumberOutings();
|
|
|
sjksYear = sjksYear + qktj.getNumberDocking();
|
|
|
- if(qktj.getMonth().equals(month)){
|
|
|
+ if (qktj.getMonth().equals(month)) {
|
|
|
zswcMonth = qktj.getNumberOutings();
|
|
|
sjksMonth = qktj.getNumberDocking();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- mapMonth.put("zswcMonth",zswcMonth);//招商外出天数(月)
|
|
|
- mapMonth.put("sjksMonth",sjksMonth);//对接客商次数(月)
|
|
|
- mapMonth.put("zswcYear",zswcYear);//招商外出天数(年)
|
|
|
- mapMonth.put("sjksYear",sjksYear);//对接客商次数(年)
|
|
|
- }else{
|
|
|
+ mapMonth.put("zswcMonth" , zswcMonth);//招商外出天数(月)
|
|
|
+ mapMonth.put("sjksMonth" , sjksMonth);//对接客商次数(月)
|
|
|
+ mapMonth.put("zswcYear" , zswcYear);//招商外出天数(年)
|
|
|
+ mapMonth.put("sjksYear" , sjksYear);//对接客商次数(年)
|
|
|
+ } else {
|
|
|
//部门不存在数据
|
|
|
- mapMonth.put("zswcMonth",0);//招商外出天数(月)
|
|
|
- mapMonth.put("zswcYear",0);//招商外出天数(年)
|
|
|
- mapMonth.put("sjksMonth",0);//对接客商次数(月)
|
|
|
- mapMonth.put("sjksYear",0);//对接客商次数(年)
|
|
|
+ mapMonth.put("zswcMonth" , 0);//招商外出天数(月)
|
|
|
+ mapMonth.put("zswcYear" , 0);//招商外出天数(年)
|
|
|
+ mapMonth.put("sjksMonth" , 0);//对接客商次数(月)
|
|
|
+ mapMonth.put("sjksYear" , 0);//对接客商次数(年)
|
|
|
}
|
|
|
|
|
|
- if(zsyzSbbzbBmMap.get(sysDept.getDeptId())!=null && zsyzSbbzbBmMap.get(sysDept.getDeptId()).size()>0){
|
|
|
+ if (zsyzSbbzbBmMap.get(sysDept.getDeptId()) != null && zsyzSbbzbBmMap.get(sysDept.getDeptId()).size() > 0) {
|
|
|
Long yxxsMonth = 0L;//有效线索(月)
|
|
|
Long yxxsYear = Long.valueOf(zsyzSbbzbBmMap.get(sysDept.getDeptId()).size());//有效线索(年)
|
|
|
for (ZsyzSbbzb zsyzSbbzb : zsyzSbbzbBmMap.get(sysDept.getDeptId())) {
|
|
|
- if(zsyzSbbzb.getShsj().contains(year+"-"+month)){
|
|
|
+ if (zsyzSbbzb.getShsj().contains(year + "-" + month)) {
|
|
|
yxxsMonth++;
|
|
|
}
|
|
|
}
|
|
|
- mapMonth.put("yxxsMonth",yxxsMonth);//有效线索(月)
|
|
|
- mapMonth.put("yxxsYear",yxxsYear);//有效线索(年)
|
|
|
+ mapMonth.put("yxxsMonth" , yxxsMonth);//有效线索(月)
|
|
|
+ mapMonth.put("yxxsYear" , yxxsYear);//有效线索(年)
|
|
|
|
|
|
- }else{
|
|
|
- mapMonth.put("yxxsMonth",0);//有效线索(月)
|
|
|
- mapMonth.put("yxxsYear",0);//有效线索(年)
|
|
|
+ } else {
|
|
|
+ mapMonth.put("yxxsMonth" , 0);//有效线索(月)
|
|
|
+ mapMonth.put("yxxsYear" , 0);//有效线索(年)
|
|
|
}
|
|
|
mapList.add(mapMonth);
|
|
|
}
|
|
@@ -929,31 +1113,31 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
}
|
|
|
//合计
|
|
|
Map<String, Object> mapMonth = new HashMap<>();
|
|
|
- mapMonth.put("name","合计");
|
|
|
- Long zswcYear =0L;//招商外出天数(年)
|
|
|
- Long zswcMonth =0L;//招商外出天数(月)
|
|
|
- Long sjksYear =0L;//对接客商次数(年)
|
|
|
- Long sjksMonth =0L;//对接客商次数(月)
|
|
|
+ mapMonth.put("name" , "合计" );
|
|
|
+ Long zswcYear = 0L;//招商外出天数(年)
|
|
|
+ Long zswcMonth = 0L;//招商外出天数(月)
|
|
|
+ Long sjksYear = 0L;//对接客商次数(年)
|
|
|
+ Long sjksMonth = 0L;//对接客商次数(月)
|
|
|
Long yxxsMonth = 0L;//有效线索(月)
|
|
|
Long yxxsYear = 0L;//有效线索(年)
|
|
|
|
|
|
for (Map<String, Object> stringObjectMap : mapList) {
|
|
|
- zswcYear =zswcYear + Long.valueOf(stringObjectMap.get("zswcYear").toString()) ;
|
|
|
- zswcMonth =zswcMonth + Long.valueOf(stringObjectMap.get("zswcMonth").toString());
|
|
|
- sjksYear =sjksYear + Long.valueOf(stringObjectMap.get("sjksYear").toString());
|
|
|
- sjksMonth =sjksMonth + Long.valueOf(stringObjectMap.get("sjksMonth").toString());
|
|
|
- yxxsMonth =yxxsMonth + Long.valueOf(stringObjectMap.get("yxxsMonth").toString());
|
|
|
- yxxsYear =yxxsYear + Long.valueOf(stringObjectMap.get("yxxsYear").toString());
|
|
|
+ zswcYear = zswcYear + Long.valueOf(stringObjectMap.get("zswcYear" ).toString());
|
|
|
+ zswcMonth = zswcMonth + Long.valueOf(stringObjectMap.get("zswcMonth" ).toString());
|
|
|
+ sjksYear = sjksYear + Long.valueOf(stringObjectMap.get("sjksYear" ).toString());
|
|
|
+ sjksMonth = sjksMonth + Long.valueOf(stringObjectMap.get("sjksMonth" ).toString());
|
|
|
+ yxxsMonth = yxxsMonth + Long.valueOf(stringObjectMap.get("yxxsMonth" ).toString());
|
|
|
+ yxxsYear = yxxsYear + Long.valueOf(stringObjectMap.get("yxxsYear" ).toString());
|
|
|
}
|
|
|
- mapMonth.put("zswcMonth",zswcMonth);//招商外出天数(月)
|
|
|
- mapMonth.put("zswcYear",zswcYear);//招商外出天数(年)
|
|
|
- mapMonth.put("sjksMonth",sjksMonth);//对接客商次数(月)
|
|
|
- mapMonth.put("sjksYear",sjksYear);//对接客商次数(年)
|
|
|
- mapMonth.put("yxxsMonth",yxxsMonth);//有效线索(月)
|
|
|
- mapMonth.put("yxxsYear",yxxsYear);//有效线索(年)
|
|
|
+ mapMonth.put("zswcMonth" , zswcMonth);//招商外出天数(月)
|
|
|
+ mapMonth.put("zswcYear" , zswcYear);//招商外出天数(年)
|
|
|
+ mapMonth.put("sjksMonth" , sjksMonth);//对接客商次数(月)
|
|
|
+ mapMonth.put("sjksYear" , sjksYear);//对接客商次数(年)
|
|
|
+ mapMonth.put("yxxsMonth" , yxxsMonth);//有效线索(月)
|
|
|
+ mapMonth.put("yxxsYear" , yxxsYear);//有效线索(年)
|
|
|
mapList.add(mapMonth);
|
|
|
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//只查看自己部门数据
|
|
|
//查找年份的所有数据
|
|
|
ZsyzQktj zsyzQktj = new ZsyzQktj();
|
|
@@ -961,55 +1145,55 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
zsyzQktj.setDeptId(currentUser.getDeptId());
|
|
|
List<ZsyzQktj> zsyzQktjList = zsyzQktjMapper.selectZsyzQktjList(zsyzQktj);
|
|
|
//查询本年当前部门所有线索审核通过的项目线索
|
|
|
- List<ZsyzSbbzb> zsyzSbbzbList = zsyzSbbzbMapper.selectZsyzSbbzbListTz(year,currentUser.getDeptId());
|
|
|
+ List<ZsyzSbbzb> zsyzSbbzbList = zsyzSbbzbMapper.selectZsyzSbbzbListTz(year, currentUser.getDeptId());
|
|
|
Map<String, Object> mapMonth = new HashMap<>();
|
|
|
- mapMonth.put("name",currentUser.getDept().getDeptName());
|
|
|
- mapMonth.put("zswcMonth",0);//招商外出天数(月)
|
|
|
- mapMonth.put("sjksMonth",0);//对接客商次数(月)
|
|
|
- Long zswcYear =0L;//招商外出天数(年)
|
|
|
- Long sjksYear =0L;//对接客商次数(年)
|
|
|
+ mapMonth.put("name" , currentUser.getDept().getDeptName());
|
|
|
+ mapMonth.put("zswcMonth" , 0);//招商外出天数(月)
|
|
|
+ mapMonth.put("sjksMonth" , 0);//对接客商次数(月)
|
|
|
+ Long zswcYear = 0L;//招商外出天数(年)
|
|
|
+ Long sjksYear = 0L;//对接客商次数(年)
|
|
|
for (ZsyzQktj qktj : zsyzQktjList) {
|
|
|
zswcYear = zswcYear + qktj.getNumberOutings();
|
|
|
sjksYear = sjksYear + qktj.getNumberDocking();
|
|
|
}
|
|
|
- mapMonth.put("zswcYear",zswcYear);//招商外出天数(年)
|
|
|
- mapMonth.put("sjksYear",sjksYear);//对接客商次数(年)
|
|
|
+ mapMonth.put("zswcYear" , zswcYear);//招商外出天数(年)
|
|
|
+ mapMonth.put("sjksYear" , sjksYear);//对接客商次数(年)
|
|
|
//统计线索数量
|
|
|
Long yxxsMonth = 0L;//有效线索(月)
|
|
|
Long yxxsYear = Long.valueOf(zsyzSbbzbList.size());//有效线索(年)
|
|
|
for (ZsyzSbbzb zsyzSbbzb : zsyzSbbzbList) {
|
|
|
- if(zsyzSbbzb.getShsj().contains(year+"-"+month)){
|
|
|
+ if (zsyzSbbzb.getShsj().contains(year + "-" + month)) {
|
|
|
yxxsMonth++;
|
|
|
}
|
|
|
}
|
|
|
- mapMonth.put("yxxsMonth",yxxsMonth);//有效线索(月)
|
|
|
- mapMonth.put("yxxsYear",yxxsYear);//有效线索(年)
|
|
|
+ mapMonth.put("yxxsMonth" , yxxsMonth);//有效线索(月)
|
|
|
+ mapMonth.put("yxxsYear" , yxxsYear);//有效线索(年)
|
|
|
mapList.add(mapMonth);
|
|
|
|
|
|
//合计
|
|
|
Map<String, Object> mapMonthhj = new HashMap<>();
|
|
|
- mapMonth.put("name","合计");
|
|
|
- Long zswcYearhj =0L;//招商外出天数(年)
|
|
|
- Long zswcMonthhj =0L;//招商外出天数(月)
|
|
|
- Long sjksYearhj =0L;//对接客商次数(年)
|
|
|
- Long sjksMonthhj =0L;//对接客商次数(月)
|
|
|
+ mapMonth.put("name" , "合计" );
|
|
|
+ Long zswcYearhj = 0L;//招商外出天数(年)
|
|
|
+ Long zswcMonthhj = 0L;//招商外出天数(月)
|
|
|
+ Long sjksYearhj = 0L;//对接客商次数(年)
|
|
|
+ Long sjksMonthhj = 0L;//对接客商次数(月)
|
|
|
Long yxxsMonthhj = 0L;//有效线索(月)
|
|
|
Long yxxsYearhj = 0L;//有效线索(年)
|
|
|
|
|
|
for (Map<String, Object> stringObjectMap : mapList) {
|
|
|
- zswcYearhj =zswcYearhj + Long.valueOf(stringObjectMap.get("zswcYear").toString()) ;
|
|
|
- zswcMonthhj =zswcMonthhj + Long.valueOf(stringObjectMap.get("zswcMonth").toString());
|
|
|
- sjksYearhj =sjksYearhj + Long.valueOf(stringObjectMap.get("sjksYear").toString());
|
|
|
- sjksMonthhj =sjksMonthhj + Long.valueOf(stringObjectMap.get("sjksMonth").toString());
|
|
|
- yxxsMonthhj =yxxsMonthhj + Long.valueOf(stringObjectMap.get("yxxsMonth").toString());
|
|
|
- yxxsYearhj =yxxsYearhj + Long.valueOf(stringObjectMap.get("yxxsYear").toString());
|
|
|
+ zswcYearhj = zswcYearhj + Long.valueOf(stringObjectMap.get("zswcYear" ).toString());
|
|
|
+ zswcMonthhj = zswcMonthhj + Long.valueOf(stringObjectMap.get("zswcMonth" ).toString());
|
|
|
+ sjksYearhj = sjksYearhj + Long.valueOf(stringObjectMap.get("sjksYear" ).toString());
|
|
|
+ sjksMonthhj = sjksMonthhj + Long.valueOf(stringObjectMap.get("sjksMonth" ).toString());
|
|
|
+ yxxsMonthhj = yxxsMonthhj + Long.valueOf(stringObjectMap.get("yxxsMonth" ).toString());
|
|
|
+ yxxsYearhj = yxxsYearhj + Long.valueOf(stringObjectMap.get("yxxsYear" ).toString());
|
|
|
}
|
|
|
- mapMonthhj.put("zswcMonth",zswcMonthhj);//招商外出天数(月)
|
|
|
- mapMonthhj.put("zswcYear",zswcYearhj);//招商外出天数(年)
|
|
|
- mapMonthhj.put("sjksMonth",sjksMonthhj);//对接客商次数(月)
|
|
|
- mapMonthhj.put("sjksYear",sjksYearhj);//对接客商次数(年)
|
|
|
- mapMonthhj.put("yxxsMonth",yxxsMonthhj);//有效线索(月)
|
|
|
- mapMonthhj.put("yxxsYear",yxxsYearhj);//有效线索(年)
|
|
|
+ mapMonthhj.put("zswcMonth" , zswcMonthhj);//招商外出天数(月)
|
|
|
+ mapMonthhj.put("zswcYear" , zswcYearhj);//招商外出天数(年)
|
|
|
+ mapMonthhj.put("sjksMonth" , sjksMonthhj);//对接客商次数(月)
|
|
|
+ mapMonthhj.put("sjksYear" , sjksYearhj);//对接客商次数(年)
|
|
|
+ mapMonthhj.put("yxxsMonth" , yxxsMonthhj);//有效线索(月)
|
|
|
+ mapMonthhj.put("yxxsYear" , yxxsYearhj);//有效线索(年)
|
|
|
mapList.add(mapMonthhj);
|
|
|
}
|
|
|
return mapList;
|
|
@@ -1018,10 +1202,11 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
|
|
|
/**
|
|
|
* 招商引资_情况月统计表
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<Map<String, Object>> statisticsMonthNew(String year,String month) {
|
|
|
+ public List<Map<String, Object>> statisticsMonthNew(String year, String month) {
|
|
|
//Long deptId = SecurityUtils.getDeptId();
|
|
|
//SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>();
|
|
@@ -1053,37 +1238,37 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
//获取所有部门
|
|
|
List<SysDept> sysDeptList = sysDeptMapper.selectDeptList(new SysDept());
|
|
|
//查询本年所有线索审核通过的项目线索
|
|
|
- List<ZsyzSbbzb> zsyzSbbzbList = zsyzSbbzbMapper.selectZsyzSbbzbListTz(year,null);
|
|
|
+ List<ZsyzSbbzb> zsyzSbbzbList = zsyzSbbzbMapper.selectZsyzSbbzbListTz(year, null);
|
|
|
//将所有项目数据分部门存放
|
|
|
Map<Long, List<ZsyzSbbzb>> zsyzSbbzbBmMap = zsyzSbbzbList.stream().collect(Collectors.groupingBy(ZsyzSbbzb::getDeptId));
|
|
|
|
|
|
//合计
|
|
|
- int zswcYearhjc =0;//招商外出次数(年)
|
|
|
- int zswcYearhj =0;//招商外出天数(年)
|
|
|
- int zswcMonthjc =0;//招商外出次数(月)
|
|
|
- int zswcMonthj =0;//招商外出天数(月)
|
|
|
- int sjksYearhj =0;//对接客商次数(年)
|
|
|
- int sjksMonthj =0;//对接客商次数(月)
|
|
|
+ int zswcYearhjc = 0;//招商外出次数(年)
|
|
|
+ int zswcYearhj = 0;//招商外出天数(年)
|
|
|
+ int zswcMonthjc = 0;//招商外出次数(月)
|
|
|
+ int zswcMonthj = 0;//招商外出天数(月)
|
|
|
+ int sjksYearhj = 0;//对接客商次数(年)
|
|
|
+ int sjksMonthj = 0;//对接客商次数(月)
|
|
|
int yxxsMonthj = 0;//有效线索(月)
|
|
|
int yxxsYearhj = 0;//有效线索(年)
|
|
|
|
|
|
for (SysDept sysDept : sysDeptList) {
|
|
|
//部门不为产业链县干招商组,市直部门,承接地,市级领导,要素部门一级部门时纳入统计
|
|
|
- if(sysDept.getDeptId()!=101 && sysDept.getDeptId()!=102 && sysDept.getDeptId()!=103 && sysDept.getDeptId()!=200 && sysDept.getDeptId()!=201){
|
|
|
+ if (sysDept.getDeptId() != 101 && sysDept.getDeptId() != 102 && sysDept.getDeptId() != 103 && sysDept.getDeptId() != 200 && sysDept.getDeptId() != 201) {
|
|
|
Map<String, Object> mapMonth = new HashMap<>();
|
|
|
- mapMonth.put("name",sysDept.getDeptName());
|
|
|
- int zswcMonth =0;//招商外出天数(月)
|
|
|
- int zswcMonthc =0;//招商外出次数(月)
|
|
|
- int zswcYear =0;//招商外出天数(年)
|
|
|
- int zswcYearc =0;//招商外出次数(年)
|
|
|
- int sjksMonth =0;//对接客商次数(月)
|
|
|
- int sjksYear =0;//对接客商次数(年)
|
|
|
+ mapMonth.put("name" , sysDept.getDeptName());
|
|
|
+ int zswcMonth = 0;//招商外出天数(月)
|
|
|
+ int zswcMonthc = 0;//招商外出次数(月)
|
|
|
+ int zswcYear = 0;//招商外出天数(年)
|
|
|
+ int zswcYearc = 0;//招商外出次数(年)
|
|
|
+ int sjksMonth = 0;//对接客商次数(月)
|
|
|
+ int sjksYear = 0;//对接客商次数(年)
|
|
|
//计算外出招商数据
|
|
|
- if(zsyzWczsBmMap.get(sysDept.getDeptId())!=null && zsyzWczsBmMap.get(sysDept.getDeptId()).size()>0){
|
|
|
+ if (zsyzWczsBmMap.get(sysDept.getDeptId()) != null && zsyzWczsBmMap.get(sysDept.getDeptId()).size() > 0) {
|
|
|
zswcYearc = zsyzWczsBmMap.get(sysDept.getDeptId()).size();
|
|
|
for (ZsyzWczs wczs : zsyzWczsBmMap.get(sysDept.getDeptId())) {
|
|
|
zswcYear = zswcYear + wczs.getNumberOutings();
|
|
|
- if(wczs.getMonth().equals(month)){
|
|
|
+ if (wczs.getMonth().equals(month)) {
|
|
|
zswcMonthc++;
|
|
|
zswcMonth = zswcMonth + wczs.getNumberOutings();
|
|
|
}
|
|
@@ -1091,19 +1276,19 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
}
|
|
|
}
|
|
|
//计算对接客商数据
|
|
|
- if(zsyzDjksBmMap.get(sysDept.getDeptId())!=null && zsyzDjksBmMap.get(sysDept.getDeptId()).size()>0){
|
|
|
+ if (zsyzDjksBmMap.get(sysDept.getDeptId()) != null && zsyzDjksBmMap.get(sysDept.getDeptId()).size() > 0) {
|
|
|
sjksYear = zsyzDjksBmMap.get(sysDept.getDeptId()).size();
|
|
|
for (ZsyzDjks djks : zsyzDjksBmMap.get(sysDept.getDeptId())) {
|
|
|
- if(djks.getMonth().equals(month)){
|
|
|
+ if (djks.getMonth().equals(month)) {
|
|
|
sjksMonth++;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- mapMonth.put("zswcMonth",zswcMonthc+"/"+zswcMonth);//招商外出天数/次数(月)
|
|
|
- mapMonth.put("sjksMonth",sjksMonth);//对接客商次数(月)
|
|
|
- mapMonth.put("zswcYear",zswcYearc+"/"+zswcYear);//招商外出天数/次数(年)
|
|
|
- mapMonth.put("sjksYear",sjksYear);//对接客商次数(年)
|
|
|
+ mapMonth.put("zswcMonth" , zswcMonthc + "/" + zswcMonth);//招商外出天数/次数(月)
|
|
|
+ mapMonth.put("sjksMonth" , sjksMonth);//对接客商次数(月)
|
|
|
+ mapMonth.put("zswcYear" , zswcYearc + "/" + zswcYear);//招商外出天数/次数(年)
|
|
|
+ mapMonth.put("sjksYear" , sjksYear);//对接客商次数(年)
|
|
|
|
|
|
zswcYearhjc = zswcYearhjc + zswcYearc;
|
|
|
zswcYearhj = zswcYearhj + zswcYear;
|
|
@@ -1113,23 +1298,23 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
sjksMonthj = sjksMonthj + sjksMonth;
|
|
|
|
|
|
|
|
|
- if(zsyzSbbzbBmMap.get(sysDept.getDeptId())!=null && zsyzSbbzbBmMap.get(sysDept.getDeptId()).size()>0){
|
|
|
+ if (zsyzSbbzbBmMap.get(sysDept.getDeptId()) != null && zsyzSbbzbBmMap.get(sysDept.getDeptId()).size() > 0) {
|
|
|
int yxxsMonth = 0;//有效线索(月)
|
|
|
int yxxsYear = zsyzSbbzbBmMap.get(sysDept.getDeptId()).size();//有效线索(年)
|
|
|
for (ZsyzSbbzb zsyzSbbzb : zsyzSbbzbBmMap.get(sysDept.getDeptId())) {
|
|
|
- if(zsyzSbbzb.getShsj().contains(year+"-"+month)){
|
|
|
+ if (zsyzSbbzb.getShsj().contains(year + "-" + month)) {
|
|
|
yxxsMonth++;
|
|
|
}
|
|
|
}
|
|
|
- mapMonth.put("yxxsMonth",yxxsMonth);//有效线索(月)
|
|
|
- mapMonth.put("yxxsYear",yxxsYear);//有效线索(年)
|
|
|
+ mapMonth.put("yxxsMonth" , yxxsMonth);//有效线索(月)
|
|
|
+ mapMonth.put("yxxsYear" , yxxsYear);//有效线索(年)
|
|
|
|
|
|
yxxsMonthj = yxxsMonthj + yxxsMonth;
|
|
|
yxxsYearhj = yxxsYearhj + yxxsYear;
|
|
|
|
|
|
- }else{
|
|
|
- mapMonth.put("yxxsMonth",0);//有效线索(月)
|
|
|
- mapMonth.put("yxxsYear",0);//有效线索(年)
|
|
|
+ } else {
|
|
|
+ mapMonth.put("yxxsMonth" , 0);//有效线索(月)
|
|
|
+ mapMonth.put("yxxsYear" , 0);//有效线索(年)
|
|
|
}
|
|
|
mapList.add(mapMonth);
|
|
|
|
|
@@ -1140,16 +1325,16 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
|
|
|
//合计
|
|
|
Map<String, Object> mapMonth = new HashMap<>();
|
|
|
- mapMonth.put("name","合计");
|
|
|
- mapMonth.put("zswcMonth",zswcMonthjc+"/"+zswcMonthj);//招商外出天数/次数(月)
|
|
|
- mapMonth.put("zswcYear",zswcYearhjc+"/"+zswcYearhj);//招商外出天数/次数(年)
|
|
|
- mapMonth.put("sjksMonth",sjksMonthj);//对接客商次数(月)
|
|
|
- mapMonth.put("sjksYear",sjksYearhj);//对接客商次数(年)
|
|
|
- mapMonth.put("yxxsMonth",yxxsMonthj);//有效线索(月)
|
|
|
- mapMonth.put("yxxsYear",yxxsYearhj);//有效线索(年)
|
|
|
+ mapMonth.put("name" , "合计" );
|
|
|
+ mapMonth.put("zswcMonth" , zswcMonthjc + "/" + zswcMonthj);//招商外出天数/次数(月)
|
|
|
+ mapMonth.put("zswcYear" , zswcYearhjc + "/" + zswcYearhj);//招商外出天数/次数(年)
|
|
|
+ mapMonth.put("sjksMonth" , sjksMonthj);//对接客商次数(月)
|
|
|
+ mapMonth.put("sjksYear" , sjksYearhj);//对接客商次数(年)
|
|
|
+ mapMonth.put("yxxsMonth" , yxxsMonthj);//有效线索(月)
|
|
|
+ mapMonth.put("yxxsYear" , yxxsYearhj);//有效线索(年)
|
|
|
mapList.add(mapMonth);
|
|
|
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//只查看自己部门数据
|
|
|
//查找年份的所有数据
|
|
|
//外出招商
|
|
@@ -1165,22 +1350,22 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
List<ZsyzDjks> zsyzDjksList = zsyzDjksMapper.selectZsyzDjksList(zsyzDjks);
|
|
|
|
|
|
//查询本年当前部门所有线索审核通过的项目线索
|
|
|
- List<ZsyzSbbzb> zsyzSbbzbList = zsyzSbbzbMapper.selectZsyzSbbzbListTz(year,currentUser.getDeptId());
|
|
|
+ List<ZsyzSbbzb> zsyzSbbzbList = zsyzSbbzbMapper.selectZsyzSbbzbListTz(year, currentUser.getDeptId());
|
|
|
|
|
|
Map<String, Object> mapMonth = new HashMap<>();
|
|
|
- mapMonth.put("name",currentUser.getDept().getDeptName());
|
|
|
- int zswcMonth =0;//招商外出天数(月)
|
|
|
- int zswcMonthc =0;//招商外出次数(月)
|
|
|
- int zswcYear =0;//招商外出天数(年)
|
|
|
- int zswcYearc =0;//招商外出次数(年)
|
|
|
- int sjksMonth =0;//对接客商次数(月)
|
|
|
- int sjksYear =0;//对接客商次数(年)
|
|
|
+ mapMonth.put("name" , currentUser.getDept().getDeptName());
|
|
|
+ int zswcMonth = 0;//招商外出天数(月)
|
|
|
+ int zswcMonthc = 0;//招商外出次数(月)
|
|
|
+ int zswcYear = 0;//招商外出天数(年)
|
|
|
+ int zswcYearc = 0;//招商外出次数(年)
|
|
|
+ int sjksMonth = 0;//对接客商次数(月)
|
|
|
+ int sjksYear = 0;//对接客商次数(年)
|
|
|
|
|
|
//招商外出
|
|
|
zswcYearc = zsyzDjksList.size();
|
|
|
for (ZsyzWczs wczs : zsyzWczsList) {
|
|
|
zswcYear = zswcYear + wczs.getNumberOutings();
|
|
|
- if(wczs.getMonth().equals(month)){
|
|
|
+ if (wczs.getMonth().equals(month)) {
|
|
|
zswcMonthc++;
|
|
|
zswcMonth = zswcMonth + wczs.getNumberOutings();
|
|
|
}
|
|
@@ -1190,36 +1375,36 @@ public class ZsyzCommonServiceImpL implements IZsyzCommonService {
|
|
|
//对接客商
|
|
|
sjksYear = zsyzDjksList.size();
|
|
|
for (ZsyzDjks djks : zsyzDjksList) {
|
|
|
- if(djks.getMonth().equals(month)){
|
|
|
+ if (djks.getMonth().equals(month)) {
|
|
|
sjksMonth++;
|
|
|
}
|
|
|
}
|
|
|
- mapMonth.put("zswcMonth",zswcMonthc+"/"+zswcMonth);//招商外出天数/次数(月)
|
|
|
- mapMonth.put("sjksMonth",sjksMonth);//对接客商次数(月)
|
|
|
- mapMonth.put("zswcYear",zswcYearc+"/"+zswcYear);//招商外出天数/次数(年)
|
|
|
- mapMonth.put("sjksYear",sjksYear);//对接客商次数(年)
|
|
|
+ mapMonth.put("zswcMonth" , zswcMonthc + "/" + zswcMonth);//招商外出天数/次数(月)
|
|
|
+ mapMonth.put("sjksMonth" , sjksMonth);//对接客商次数(月)
|
|
|
+ mapMonth.put("zswcYear" , zswcYearc + "/" + zswcYear);//招商外出天数/次数(年)
|
|
|
+ mapMonth.put("sjksYear" , sjksYear);//对接客商次数(年)
|
|
|
|
|
|
//统计线索数量
|
|
|
int yxxsMonth = 0;//有效线索(月)
|
|
|
int yxxsYear = zsyzSbbzbList.size();//有效线索(年)
|
|
|
for (ZsyzSbbzb zsyzSbbzb : zsyzSbbzbList) {
|
|
|
- if(zsyzSbbzb.getShsj().contains(year+"-"+month)){
|
|
|
+ if (zsyzSbbzb.getShsj().contains(year + "-" + month)) {
|
|
|
yxxsMonth++;
|
|
|
}
|
|
|
}
|
|
|
- mapMonth.put("yxxsMonth",yxxsMonth);//有效线索(月)
|
|
|
- mapMonth.put("yxxsYear",yxxsYear);//有效线索(年)
|
|
|
+ mapMonth.put("yxxsMonth" , yxxsMonth);//有效线索(月)
|
|
|
+ mapMonth.put("yxxsYear" , yxxsYear);//有效线索(年)
|
|
|
mapList.add(mapMonth);
|
|
|
|
|
|
//合计
|
|
|
Map<String, Object> mapMonthhj = new HashMap<>();
|
|
|
- mapMonthhj.put("name","合计");
|
|
|
- mapMonthhj.put("zswcMonth",zswcMonthc+"/"+zswcMonth);//招商外出天数/次数(月)
|
|
|
- mapMonthhj.put("sjksMonth",sjksMonth);//对接客商次数(月)
|
|
|
- mapMonthhj.put("zswcYear",zswcYearc+"/"+zswcYear);//招商外出天数/次数(年)
|
|
|
- mapMonthhj.put("sjksYear",sjksYear);//对接客商次数(年)
|
|
|
- mapMonthhj.put("yxxsMonth",yxxsMonth);//有效线索(月)
|
|
|
- mapMonthhj.put("yxxsYear",yxxsYear);//有效线索(年)
|
|
|
+ mapMonthhj.put("name" , "合计" );
|
|
|
+ mapMonthhj.put("zswcMonth" , zswcMonthc + "/" + zswcMonth);//招商外出天数/次数(月)
|
|
|
+ mapMonthhj.put("sjksMonth" , sjksMonth);//对接客商次数(月)
|
|
|
+ mapMonthhj.put("zswcYear" , zswcYearc + "/" + zswcYear);//招商外出天数/次数(年)
|
|
|
+ mapMonthhj.put("sjksYear" , sjksYear);//对接客商次数(年)
|
|
|
+ mapMonthhj.put("yxxsMonth" , yxxsMonth);//有效线索(月)
|
|
|
+ mapMonthhj.put("yxxsYear" , yxxsYear);//有效线索(年)
|
|
|
mapList.add(mapMonthhj);
|
|
|
}
|
|
|
return mapList;
|