Bläddra i källkod

Merge branch 'master' of http://8.137.121.180:10880/longping/subject_gxj

Wayne 4 månader sedan
förälder
incheckning
9c2f050f8a
15 ändrade filer med 269 tillägg och 181 borttagningar
  1. 1 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/WorkbenchMapper.java
  2. 6 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/WorkbenchMapper.xml
  3. 1 1
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoService.java
  4. 4 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubRptContService.java
  5. 169 169
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java
  6. 9 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubRptContServiceImpl.java
  7. 36 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/EditSubInfoGxjDataVO.java
  8. 4 0
      projects/src/main/java/com/rtrh/projects/web/controller/projects/ProjectsOverdueController.java
  9. 4 4
      projects/src/main/java/com/rtrh/projects/web/controller/projects/api/ProWeekReportApiController.java
  10. 15 1
      projects/src/main/java/com/rtrh/projects/web/controller/projects/api/ProjMonthReportApiController.java
  11. 5 2
      projects/src/main/java/com/rtrh/projects/web/controller/reportforms/AnnualPlanController.java
  12. 1 0
      projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoController.java
  13. 5 1
      projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java
  14. 7 1
      projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoApiController.java
  15. 2 2
      projects/src/main/webapp/vmodules/project/weekReport.jsp

+ 1 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/WorkbenchMapper.java

@@ -39,6 +39,7 @@ public interface WorkbenchMapper {
 	List<Map<String,Object>> getYbList(@Param("varkind")String varkind,@Param("varbegin")String varbegin,@Param("varend")String varend,@Param("vardesc")String vardesc,@Param("varstatus")String varstatus
 	,@Param("varjsdd")String varjsdd,@Param("varlogin")String varlogin,@Param("varpage")Integer varpage,@Param("varnum")Integer varnum,@Param("outtotal")Integer outtotal);
 
+	List<Map<String,Object>> geYbFgwtList(@Param("queryVO")RptContQueryVO queryVO,@Param("pageNo")Integer pageNo, @Param("pageSize") Integer pageSize);
 
 	List<Map<String,Object>> getWeekAndMonthAlarm( @Param("loginName")String loginName);
 

+ 6 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/WorkbenchMapper.xml

@@ -18,6 +18,12 @@
 			)
 	</select>
 
+	<select id="geYbFgwtList"  resultType="java.util.Map" statementType="CALLABLE" useCache="false">
+		call total_get_yb_g_list(
+			#{queryVO.varkind},#{queryVO.varbegin},#{queryVO.varend},#{queryVO.vardesc},#{queryVO.varstatus},#{queryVO.varjsdd},#{queryVO.varlogin},#{pageNo},#{pageSize},#{queryVO.outtotal,mode=OUT,jdbcType=INTEGER}
+			)
+	</select>
+
 	<select id="getWeekAndMonthAlarm" resultType="java.util.Map" statementType="CALLABLE" useCache="false">
 		call total_waring_data(#{loginName})
 	</select>

+ 1 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoService.java

@@ -254,7 +254,7 @@ public interface SubInfoService {
 	 * 保存项目信息编辑信息
 	 * @param vo
 	 */
-	void saveEditSubInfoData(EditSubInfoDataVO vo, LoginUserVO userVO);
+	void saveEditSubInfoData(EditSubInfoGxjDataVO vo, LoginUserVO userVO);
 
 	/**
 	 * 变更开工状态

+ 4 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubRptContService.java

@@ -9,6 +9,7 @@ import com.rtrh.projects.modules.projects.enums.RptContKindEnum;
 import com.rtrh.projects.modules.projects.po.RptCont;
 import com.rtrh.projects.modules.projects.vo.*;
 import com.rtrh.projects.modules.system.vo.LoginUserVO;
+import org.springframework.web.bind.annotation.RequestBody;
 
 public interface SubRptContService {
 
@@ -17,6 +18,9 @@ public interface SubRptContService {
 	List<RptCont> getListBySubId(String subId, RptContKindEnum kind,Date startDate,Date endDate);
 
 	List<Map<String, Object>> ListQuery(String varkind, String varbegin, String varend, String vardesc, String varstatus, String varjsdd, String varlogin,Integer varpage, Integer varnum, Integer outtotal);
+
+	Page listQuery(Page page, RptContQueryVO queryVO);
+
 	List<Map<String,Object>> ListQueryWeekAndMonthAlarm(String loginName);
 
 	void saveReport(WeekContentVO vo, LoginUserVO loginUserVO, RptContKindEnum contKindEnum);

+ 169 - 169
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java

@@ -1690,9 +1690,9 @@ public class SubInfoServiceImpl implements SubInfoService {
 
     @Override
     @Transactional
-    public void saveEditSubInfoData(EditSubInfoDataVO vo, LoginUserVO userVO) {
+    public void saveEditSubInfoData(EditSubInfoGxjDataVO vo, LoginUserVO userVO) {
         if (vo.getSubInfo() != null) {
-            SubInfoVO subInfo = vo.getSubInfo();
+            SubInfoGxj subInfo = vo.getSubInfo();
             if (subNameExits(subInfo.getSubName(), subInfo.getId())) {
                 throw new RuntimeException("项目名称已存在");
             }
@@ -1724,29 +1724,29 @@ public class SubInfoServiceImpl implements SubInfoService {
             }
 
             //项目类型
-            if (!Objects.equals(old.getKind(), subInfo.getKind())) {
-
-                String[] kind = Optional.ofNullable(old.getKind()).orElse("").split(",");
-                String kindName = "";
-                for (String item : kind) {
-                    String oneKineName = tSysTableService.getTitleByKindAndCode(SysTableKind.XMLX, item);
-                    if (StringUtil.isNotEmpty(oneKineName)) {
-                        kindName += oneKineName + " ";
-                    }
-                }
-
-                String[] kind2 = subInfo.getKind().toString().split(",");
-                String kindName2 = "";
-                for (String item : kind2) {
-                    String oneKineName = tSysTableService.getTitleByKindAndCode(SysTableKind.XMLX, item);
-                    if (StringUtil.isNotEmpty(oneKineName)) {
-                        kindName2 += oneKineName + " ";
-                    }
-                }
-
-
-                subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "kind", "项目类型", "", kindName, kindName2, null, userVO.getLoginName(), new Date(), "修改");
-            }
+            // if (!Objects.equals(old.getKind(), subInfo.getKind())) {
+            //
+            //     String[] kind = Optional.ofNullable(old.getKind()).orElse("").split(",");
+            //     String kindName = "";
+            //     for (String item : kind) {
+            //         String oneKineName = tSysTableService.getTitleByKindAndCode(SysTableKind.XMLX, item);
+            //         if (StringUtil.isNotEmpty(oneKineName)) {
+            //             kindName += oneKineName + " ";
+            //         }
+            //     }
+            //
+            //     String[] kind2 = subInfo.getKind().toString().split(",");
+            //     String kindName2 = "";
+            //     for (String item : kind2) {
+            //         String oneKineName = tSysTableService.getTitleByKindAndCode(SysTableKind.XMLX, item);
+            //         if (StringUtil.isNotEmpty(oneKineName)) {
+            //             kindName2 += oneKineName + " ";
+            //         }
+            //     }
+            //
+            //
+            //     subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "kind", "项目类型", "", kindName, kindName2, null, userVO.getLoginName(), new Date(), "修改");
+            // }
 
 
             //投资类型
@@ -1759,13 +1759,13 @@ public class SubInfoServiceImpl implements SubInfoService {
                 subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "amt_total", "总投资金额(万元)", "", old.getAmtTotal() + "", subInfo.getAmtTotal() + "", subInfo.getAmtTotal().subtract(old.getAmtTotal()), userVO.getLoginName(), new Date(), "修改");
             }
 
-            //项目资金来源(万元):
-
-            if ((old.getAmtComptotal() == null ? BigDecimal.ZERO : old.getAmtComptotal()).compareTo(subInfo.getAmtComptotal() == null ? BigDecimal.ZERO : subInfo.getAmtComptotal()) != 0) {
-                //到位资金
-                subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "amt_comptotal", "到位资金(万元)", "", old.getAmtComptotal() == null ? "" : old.getAmtComptotal() + "", subInfo.getAmtComptotal() == null ? "" : subInfo.getAmtComptotal() + "", (subInfo.getAmtComptotal() == null ? new BigDecimal(0) : subInfo.getAmtComptotal()).subtract((old.getAmtComptotal() == null ? new BigDecimal(0) : old.getAmtComptotal())), userVO.getLoginName(), new Date(), "修改");
-
-            }
+            // //项目资金来源(万元):
+            //
+            // if ((old.getAmtComptotal() == null ? BigDecimal.ZERO : old.getAmtComptotal()).compareTo(subInfo.getAmtComptotal() == null ? BigDecimal.ZERO : subInfo.getAmtComptotal()) != 0) {
+            //     //到位资金
+            //     subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "amt_comptotal", "到位资金(万元)", "", old.getAmtComptotal() == null ? "" : old.getAmtComptotal() + "", subInfo.getAmtComptotal() == null ? "" : subInfo.getAmtComptotal() + "", (subInfo.getAmtComptotal() == null ? new BigDecimal(0) : subInfo.getAmtComptotal()).subtract((old.getAmtComptotal() == null ? new BigDecimal(0) : old.getAmtComptotal())), userVO.getLoginName(), new Date(), "修改");
+            //
+            // }
 
             SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
 
@@ -1812,16 +1812,16 @@ public class SubInfoServiceImpl implements SubInfoService {
 
             //监管单位
 
-            if (!Objects.equals(old.getMainId(), subInfo.getMainId())) {
-
-                String oldmainId = old.getMainId() == null ? "" : old.getMainId();
-                String subInfoMainId = subInfo.getMainId() == null ? "" : subInfo.getMainId();
-
-                String oldMainName = Optional.ofNullable(jUnitDao.findById(oldmainId)).orElse(new JUnit()).getTitle();
-                String subInfoMainName = Optional.ofNullable(jUnitDao.findById(subInfoMainId)).orElse(new JUnit()).getTitle();
-
-                subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "main_id", "监管单位", "", oldMainName, subInfoMainName, null, userVO.getLoginName(), new Date(), "修改");
-            }
+            // if (!Objects.equals(old.getMainId(), subInfo.getMainId())) {
+            //
+            //     String oldmainId = old.getMainId() == null ? "" : old.getMainId();
+            //     String subInfoMainId = subInfo.getMainId() == null ? "" : subInfo.getMainId();
+            //
+            //     String oldMainName = Optional.ofNullable(jUnitDao.findById(oldmainId)).orElse(new JUnit()).getTitle();
+            //     String subInfoMainName = Optional.ofNullable(jUnitDao.findById(subInfoMainId)).orElse(new JUnit()).getTitle();
+            //
+            //     subDataLogService.saveOrUpdate(Identities.uuid(), subInfo.getId(), SubLogEnum.XMXX.getCode(), "main_id", "监管单位", "", oldMainName, subInfoMainName, null, userVO.getLoginName(), new Date(), "修改");
+            // }
 
             //修改建设地点 对应修改审批单位
    /*         DetachedCriteria detachedCriteria = DetachedCriteria.forClass(SubPreNew.class);
@@ -1850,134 +1850,134 @@ public class SubInfoServiceImpl implements SubInfoService {
             subInfoDao.update(old);
 
             //资金来源
-            List<SubSourceVO> amtSource = subInfo.getSubSource();
-            if (CollectionUtil.isNotEmpty(amtSource)) {
-                List<SubSource> saveData = new ArrayList<>();
-                for (SubSourceVO sourceVO : amtSource) {
-                    if (StringUtil.isEmpty(sourceVO.getId())) {
-                        subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), "", sourceVO.getAmt() + "", sourceVO.getAmt(), userVO.getLoginName(), new Date(), "新增");
-                        sourceVO.setSubId(old.getId());
-                        sourceVO.setId(Identities.uuid());
-                        sourceVO.setState("1");
-                    } else {
-                        SubSource subSourceOld = subSourceDao.findById(sourceVO.getId());
-                        BigDecimal oldAmtLy = Optional.ofNullable(subSourceOld.getAmt()).orElse(BigDecimal.ZERO);
-                        BigDecimal voAmtLy = Optional.ofNullable(sourceVO.getAmt()).orElse(BigDecimal.ZERO);
-                        if (oldAmtLy.compareTo(voAmtLy) != 0) {
-                            subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), subSourceOld.getAmt() + "", sourceVO.getAmt() + "", voAmtLy.subtract(oldAmtLy), userVO.getLoginName(), new Date(), "修改");
-                        }
-                        if (sourceVO.getLogicDeleteFlag() == 1) {
-                            subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), subSourceOld.getAmt() + "", "", new BigDecimal(0).subtract(oldAmtLy), userVO.getLoginName(), new Date(), "删除");
-                        }
-                        subSourceDao.delete(subSourceOld.getId());
-                        sourceVO.setAmtPay(subSourceOld.getAmtPay());
-                        sourceVO.setPlanDate(subSourceOld.getPlanDate());
-                        sourceVO.setState(subSourceOld.getState());
-                    }
-                    SubSource subSource = new SubSource();
-                    BeanUtils.copyProperties(sourceVO, subSource);
-                    subSource.setId(Identities.uuid());
-                    saveData.add(subSource);
-                }
-                for (int i = 0; i < saveData.size(); i++) {
-                    if (saveData.get(i).getLogicDeleteFlag() == 0) {
-                        SubSource source = saveData.get(i);
-                        source.setAmtXd(subSourceDetailDao.sumAmt(source.getSubId(), source.getSourceId(), null, "2").get("amtSj"));
-                        source.setAmtSb(subSourceDetailDao.sumAmt(source.getSubId(), source.getSourceId(), null, "1").get("amtSj"));
-                    }
-                }
-                subSourceDao.saveOrUpdateAll(saveData);
-            }
-        }
-        if (vo.getManage() != null) {
-            //保存监管单位
-            SubInfoJgDwVO manageVO = vo.getManage();
-            List<SubManage> list = manageVO.getManage();
-            if (CollectionUtil.isNotEmpty(list)) {
-                for (SubManage manage : list) {
-                    if (StringUtil.isEmpty(manage.getId())) {
-                        manage.setId(Identities.uuid());
-                        String newManageName = jUnitDao.findById(manage.getManageId()).getTitle();
-                        String newDepartName = StringUtil.isEmpty(manage.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(manage.getDepartId())).orElse(new JDepart()).getTitle();
-                        //String newDepartName=jDepartDao.findById(manage.getDepartId())==null?"":jDepartDao.findById(manage.getDepartId()).getTitle();
-                        newDepartName = (newDepartName == null ? "" : newDepartName);
-                        subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", "", newManageName + "/" + newDepartName, null, userVO.getLoginName(), new Date(), "新增");
-
-                    } else {
-
-
-                        SubManage subManageOld = subManageDao.findById(manage.getId());
-                        if (!(StringUtil.isNotEmpty(subManageOld.getManageId()) ? subManageOld.getManageId() : "").equals(manage.getManageId()) || !(StringUtil.isNotEmpty(subManageOld.getDepartId()) ? subManageOld.getDepartId() : "").equals(manage.getDepartId())) {
-                            //获取监管单位,跟部门名称
-                            String oldManageName = StringUtil.isEmpty(subManageOld.getManageId()) ? "" : Optional.ofNullable(jUnitDao.findById(subManageOld.getManageId())).orElse(new JUnit()).getTitle();
-                            String newManageName = jUnitDao.findById(manage.getManageId()).getTitle();
-
-                            String oldDepartName = StringUtil.isEmpty(subManageOld.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(subManageOld.getDepartId())).orElse(new JDepart()).getTitle();
-//							String newDepartName=jDepartDao.findById(manage.getDepartId())==null?"":jDepartDao.findById(manage.getDepartId()).getTitle();
-                            String newDepartName = StringUtil.isEmpty(manage.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(manage.getDepartId())).orElse(new JDepart()).getTitle();
-
-
-                            newDepartName = (newDepartName == null ? "" : newDepartName);
-                            oldDepartName = (oldDepartName == null ? "" : oldDepartName);
-                            subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", oldManageName + "/" + oldDepartName, newManageName + "/" + newDepartName, null, userVO.getLoginName(), new Date(), "修改");
-                        }
-
-
-                        if (manage.getLogicDeleteFlag() == 1) {
-                            //获取监管单位,跟部门名称
-                            String oldManageName = StringUtil.isEmpty(subManageOld.getManageId()) ? "" : Optional.ofNullable(jUnitDao.findById(subManageOld.getManageId())).orElse(new JUnit()).getTitle();
-                            String oldDepartName = StringUtil.isEmpty(subManageOld.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(subManageOld.getDepartId())).orElse(new JDepart()).getTitle();
-                            oldDepartName = (oldDepartName == null ? "" : oldDepartName);
-                            subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", oldManageName + "/" + oldDepartName, "", null, userVO.getLoginName(), new Date(), "删除");
-                        }
-
-                        //				subManageDao.delete(subManageOld);
-                        subManageDao.delete(manage.getId());
-
-                        //设置新id
-                        manage.setId(Identities.uuid());
-
-                    }
-                    manage.setSubId(manageVO.getSubId());
-                }
-                subManageDao.saveOrUpdateAll(list);
-            }
-        }
-        if (vo.getPlanList() != null) {
-            //保存计划信息
-            SubListPlanVO planVO = vo.getPlanList();
-            SubInfo subInfo = subInfoDao.findById(planVO.getSubId());
-            //重新保存已完成的实际金额置零
-            subInfo.setAmtComp(BigDecimal.ZERO);
-            //已完成进度和实际完成进度置零
-            subInfo.setNumComp(BigDecimal.ZERO);
-            subInfo.setNumTotal(BigDecimal.ZERO);
-            List<SubPlan> planList = planVO.getList();
-            //计划
-            BigDecimal numTotal = new BigDecimal(0);
-            BigDecimal endTotal = new BigDecimal(0);
-            if (CollectionUtil.isNotEmpty(planList)) {
-                for (SubPlan plan : planList) {
-                    plan.setSubId(subInfo.getId());
-                    if (StringUtil.isEmpty(plan.getId())) {
-                        plan.setId(Identities.uuid());
-                    }
-                    if (!Objects.equals(plan.getLogicDeleteFlag(), 1)) {
-                        if (StringUtil.isEmpty(plan.getStatusSp())) {
-                            plan.setStatusSp(SubPlanStatusEnum.WKG.getKey());
-                        } else if (Objects.equals(plan.getStatusSp(), SubPlanStatusEnum.YWG.getKey())) {
-                            endTotal = endTotal.add(plan.getNumRate());
-                        }
-                        //权重累加为总进度值
-                        numTotal = numTotal.add(plan.getNumRate());
-                    }
-                }
-                subPlanDao.saveOrUpdateAll(planList);
-            }
-            subInfo.setNumComp(endTotal);
-            subInfo.setNumTotal(numTotal);
-            subInfoDao.update(subInfo);
+            // List<SubSourceVO> amtSource = subInfo.getSubSource();
+            // if (CollectionUtil.isNotEmpty(amtSource)) {
+            //     List<SubSource> saveData = new ArrayList<>();
+            //     for (SubSourceVO sourceVO : amtSource) {
+            //         if (StringUtil.isEmpty(sourceVO.getId())) {
+            //             subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), "", sourceVO.getAmt() + "", sourceVO.getAmt(), userVO.getLoginName(), new Date(), "新增");
+            //             sourceVO.setSubId(old.getId());
+            //             sourceVO.setId(Identities.uuid());
+            //             sourceVO.setState("1");
+            //         } else {
+            //             SubSource subSourceOld = subSourceDao.findById(sourceVO.getId());
+            //             BigDecimal oldAmtLy = Optional.ofNullable(subSourceOld.getAmt()).orElse(BigDecimal.ZERO);
+            //             BigDecimal voAmtLy = Optional.ofNullable(sourceVO.getAmt()).orElse(BigDecimal.ZERO);
+            //             if (oldAmtLy.compareTo(voAmtLy) != 0) {
+            //                 subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), subSourceOld.getAmt() + "", sourceVO.getAmt() + "", voAmtLy.subtract(oldAmtLy), userVO.getLoginName(), new Date(), "修改");
+            //             }
+            //             if (sourceVO.getLogicDeleteFlag() == 1) {
+            //                 subDataLogService.saveOrUpdate(Identities.uuid(), old.getId(), SubLogEnum.XMXX.getCode(), "amt_ly" + sourceVO.getSourceId(), "资金来源", sourceVO.getSourceName(), subSourceOld.getAmt() + "", "", new BigDecimal(0).subtract(oldAmtLy), userVO.getLoginName(), new Date(), "删除");
+            //             }
+            //             subSourceDao.delete(subSourceOld.getId());
+            //             sourceVO.setAmtPay(subSourceOld.getAmtPay());
+            //             sourceVO.setPlanDate(subSourceOld.getPlanDate());
+            //             sourceVO.setState(subSourceOld.getState());
+            //         }
+            //         SubSource subSource = new SubSource();
+            //         BeanUtils.copyProperties(sourceVO, subSource);
+            //         subSource.setId(Identities.uuid());
+            //         saveData.add(subSource);
+            //     }
+            //     for (int i = 0; i < saveData.size(); i++) {
+            //         if (saveData.get(i).getLogicDeleteFlag() == 0) {
+            //             SubSource source = saveData.get(i);
+            //             source.setAmtXd(subSourceDetailDao.sumAmt(source.getSubId(), source.getSourceId(), null, "2").get("amtSj"));
+            //             source.setAmtSb(subSourceDetailDao.sumAmt(source.getSubId(), source.getSourceId(), null, "1").get("amtSj"));
+            //         }
+            //     }
+            //     subSourceDao.saveOrUpdateAll(saveData);
+            // }
         }
+//         if (vo.getManage() != null) {
+//             //保存监管单位
+//             SubInfoJgDwVO manageVO = vo.getManage();
+//             List<SubManage> list = manageVO.getManage();
+//             if (CollectionUtil.isNotEmpty(list)) {
+//                 for (SubManage manage : list) {
+//                     if (StringUtil.isEmpty(manage.getId())) {
+//                         manage.setId(Identities.uuid());
+//                         String newManageName = jUnitDao.findById(manage.getManageId()).getTitle();
+//                         String newDepartName = StringUtil.isEmpty(manage.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(manage.getDepartId())).orElse(new JDepart()).getTitle();
+//                         //String newDepartName=jDepartDao.findById(manage.getDepartId())==null?"":jDepartDao.findById(manage.getDepartId()).getTitle();
+//                         newDepartName = (newDepartName == null ? "" : newDepartName);
+//                         subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", "", newManageName + "/" + newDepartName, null, userVO.getLoginName(), new Date(), "新增");
+//
+//                     } else {
+//
+//
+//                         SubManage subManageOld = subManageDao.findById(manage.getId());
+//                         if (!(StringUtil.isNotEmpty(subManageOld.getManageId()) ? subManageOld.getManageId() : "").equals(manage.getManageId()) || !(StringUtil.isNotEmpty(subManageOld.getDepartId()) ? subManageOld.getDepartId() : "").equals(manage.getDepartId())) {
+//                             //获取监管单位,跟部门名称
+//                             String oldManageName = StringUtil.isEmpty(subManageOld.getManageId()) ? "" : Optional.ofNullable(jUnitDao.findById(subManageOld.getManageId())).orElse(new JUnit()).getTitle();
+//                             String newManageName = jUnitDao.findById(manage.getManageId()).getTitle();
+//
+//                             String oldDepartName = StringUtil.isEmpty(subManageOld.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(subManageOld.getDepartId())).orElse(new JDepart()).getTitle();
+// //							String newDepartName=jDepartDao.findById(manage.getDepartId())==null?"":jDepartDao.findById(manage.getDepartId()).getTitle();
+//                             String newDepartName = StringUtil.isEmpty(manage.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(manage.getDepartId())).orElse(new JDepart()).getTitle();
+//
+//
+//                             newDepartName = (newDepartName == null ? "" : newDepartName);
+//                             oldDepartName = (oldDepartName == null ? "" : oldDepartName);
+//                             subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", oldManageName + "/" + oldDepartName, newManageName + "/" + newDepartName, null, userVO.getLoginName(), new Date(), "修改");
+//                         }
+//
+//
+//                         if (manage.getLogicDeleteFlag() == 1) {
+//                             //获取监管单位,跟部门名称
+//                             String oldManageName = StringUtil.isEmpty(subManageOld.getManageId()) ? "" : Optional.ofNullable(jUnitDao.findById(subManageOld.getManageId())).orElse(new JUnit()).getTitle();
+//                             String oldDepartName = StringUtil.isEmpty(subManageOld.getDepartId()) ? "" : Optional.ofNullable(jDepartDao.findById(subManageOld.getDepartId())).orElse(new JDepart()).getTitle();
+//                             oldDepartName = (oldDepartName == null ? "" : oldDepartName);
+//                             subDataLogService.saveOrUpdate(Identities.uuid(), manageVO.getSubId(), SubLogEnum.XMXX.getCode(), "manage_id", "监管单位", "", oldManageName + "/" + oldDepartName, "", null, userVO.getLoginName(), new Date(), "删除");
+//                         }
+//
+//                         //				subManageDao.delete(subManageOld);
+//                         subManageDao.delete(manage.getId());
+//
+//                         //设置新id
+//                         manage.setId(Identities.uuid());
+//
+//                     }
+//                     manage.setSubId(manageVO.getSubId());
+//                 }
+//                 subManageDao.saveOrUpdateAll(list);
+//             }
+//         }
+//         if (vo.getPlanList() != null) {
+//             //保存计划信息
+//             SubListPlanVO planVO = vo.getPlanList();
+//             SubInfo subInfo = subInfoDao.findById(planVO.getSubId());
+//             //重新保存已完成的实际金额置零
+//             subInfo.setAmtComp(BigDecimal.ZERO);
+//             //已完成进度和实际完成进度置零
+//             subInfo.setNumComp(BigDecimal.ZERO);
+//             subInfo.setNumTotal(BigDecimal.ZERO);
+//             List<SubPlan> planList = planVO.getList();
+//             //计划
+//             BigDecimal numTotal = new BigDecimal(0);
+//             BigDecimal endTotal = new BigDecimal(0);
+//             if (CollectionUtil.isNotEmpty(planList)) {
+//                 for (SubPlan plan : planList) {
+//                     plan.setSubId(subInfo.getId());
+//                     if (StringUtil.isEmpty(plan.getId())) {
+//                         plan.setId(Identities.uuid());
+//                     }
+//                     if (!Objects.equals(plan.getLogicDeleteFlag(), 1)) {
+//                         if (StringUtil.isEmpty(plan.getStatusSp())) {
+//                             plan.setStatusSp(SubPlanStatusEnum.WKG.getKey());
+//                         } else if (Objects.equals(plan.getStatusSp(), SubPlanStatusEnum.YWG.getKey())) {
+//                             endTotal = endTotal.add(plan.getNumRate());
+//                         }
+//                         //权重累加为总进度值
+//                         numTotal = numTotal.add(plan.getNumRate());
+//                     }
+//                 }
+//                 subPlanDao.saveOrUpdateAll(planList);
+//             }
+//             subInfo.setNumComp(endTotal);
+//             subInfo.setNumTotal(numTotal);
+//             subInfoDao.update(subInfo);
+//         }
 
     }
 

+ 9 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubRptContServiceImpl.java

@@ -98,6 +98,15 @@ public class SubRptContServiceImpl implements SubRptContService {
 		return data;
 	}
 
+	@Override
+	@TargetDataSource("secondary")
+	public Page listQuery(Page page, RptContQueryVO queryVO) {
+		List<Map<String, Object>> list =workbenchMapper.geYbFgwtList(queryVO, page.getPageNo(), page.getPageSize());
+		page.setList(list);
+		page.setTotalCount(queryVO.getOuttotal());
+		return page;
+	}
+
 	@Override
 	public List<Map<String, Object>> ListQueryWeekAndMonthAlarm(String loginName) {
 		return workbenchMapper.getWeekAndMonthAlarm(loginName);

+ 36 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/EditSubInfoGxjDataVO.java

@@ -0,0 +1,36 @@
+package com.rtrh.projects.modules.projects.vo;
+
+import com.rtrh.projects.modules.projects.po.SubInfoGxj;
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+public class EditSubInfoGxjDataVO {
+
+	/**
+	 * 项目基本信息
+	 */
+	private SubInfoGxj subInfo;
+
+	/**
+	 * 计划信息
+	 */
+	private SubListPlanVO planList;
+
+	/**
+	 * 监管单位
+	 */
+	private SubInfoJgDwVO manage;
+
+
+	/**
+	 * 资金来源Id
+	 */
+	private String zjlyId;
+
+	/**
+	 * 1 申报资金  2下达资金
+	 */
+	private String cat;
+}

+ 4 - 0
projects/src/main/java/com/rtrh/projects/web/controller/projects/ProjectsOverdueController.java

@@ -4,11 +4,15 @@ import java.math.BigDecimal;
 import java.util.*;
 
 import com.rtrh.core.repository.Page;
+import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
 import com.rtrh.projects.modules.projects.po.SubInfoGxj;
 import com.rtrh.projects.modules.projects.service.*;
 import com.rtrh.projects.modules.projects.vo.PreWarnDataQueryVO;
 import com.rtrh.projects.modules.projects.vo.SubInfoVO;
 import com.rtrh.projects.modules.projects.vo.SubPreNewResultVO;
+import com.rtrh.projects.web.log.Log;
+import com.rtrh.projects.web.log.WebLogAspect;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;

+ 4 - 4
projects/src/main/java/com/rtrh/projects/web/controller/projects/api/ProWeekReportApiController.java

@@ -53,7 +53,7 @@ public class ProWeekReportApiController extends BaseController {
 	@Autowired
 	private WeekAndMonthFileService weekAndMonthFileService;
 
-	@PostMapping(value="/queryReport")
+	/*@PostMapping(value="/queryReport")
 	public ListMessage queryReport(@RequestBody Page page, @RequestBody RptContQueryVO queryVO) {
 		ListMessage message = new ListMessage();
 		queryVO.setVarlogin(getCurUser().getLoginName());
@@ -66,9 +66,9 @@ public class ProWeekReportApiController extends BaseController {
 			message.add(e.getMessage());
 		}
 		return message;
-	}
+	}*/
 
-	/*@PostMapping(value="/queryReport")
+	@PostMapping(value="/queryReport")
 	public ListMessage queryReport(@RequestBody Page page, @RequestBody RptContQueryVO queryVO) {
 		ListMessage message = new ListMessage();
 		try {
@@ -80,7 +80,7 @@ public class ProWeekReportApiController extends BaseController {
 			message.add(e.getMessage());
 		}
 		return message;
-	}*/
+	}
 
 	@PostMapping(value="/saveReport")
 	@Log("周报保存")

+ 15 - 1
projects/src/main/java/com/rtrh/projects/web/controller/projects/api/ProjMonthReportApiController.java

@@ -58,7 +58,7 @@ public class ProjMonthReportApiController extends BaseController {
 	private WeekAndMonthFileService weekAndMonthFileService;
 
 
-	@PostMapping(value="/queryReport")
+	/*@PostMapping(value="/queryReport")
 	public ListMessage queryReport(@RequestBody Page page, @RequestBody RptContQueryVO queryVO) {
 		ListMessage message = new ListMessage();
 		queryVO.setVarlogin(getCurUser().getLoginName());
@@ -71,6 +71,20 @@ public class ProjMonthReportApiController extends BaseController {
 			message.add(e.getMessage());
 		}
 		return message;
+	}*/
+
+	@PostMapping(value="/queryReport")
+	public ListMessage queryReport(@RequestBody Page page, @RequestBody RptContQueryVO queryVO) {
+		ListMessage message = new ListMessage();
+		try {
+			queryVO.setVarlogin(getCurUser().getLoginName());
+			Page pageData = subRptContService.listQuery(page, queryVO);
+			message.add(pageData.getList(), pageData.getTotalCount());
+		} catch (Exception e) {
+			logger.error("",e);
+			message.add(e.getMessage());
+		}
+		return message;
 	}
 
 	@PostMapping(value="/saveReport")

+ 5 - 2
projects/src/main/java/com/rtrh/projects/web/controller/reportforms/AnnualPlanController.java

@@ -7,6 +7,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Objects;
 
+import com.rtrh.projects.modules.system.service.ISubInduService;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -43,12 +44,14 @@ public class AnnualPlanController extends BaseController {
     private TSysTableService tSysTableService;
     @Autowired
     private JUnitService jUnitService;
-
+    @Autowired
+    private ISubInduService subInduService;
 
 
     @GetMapping(value = "/index")
     public ModelAndView test(ModelMap model,String subName) {
-        model.put("HYFL", tSysTableService.getByKind(SysTableKind.HYFL));
+//        model.put("HYFL", tSysTableService.getByKind(SysTableKind.HYFL));
+        model.put("HYFL", subInduService.queryTreeALl());
         model.put("XMLX", tSysTableService.getByKind(SysTableKind.XMLX));
         model.put("JSXZ", tSysTableService.getByKind(SysTableKind.JSXZ));
         model.put("JSDD", tSysTableService.getByKind(SysTableKind.JSDD));

+ 1 - 0
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoController.java

@@ -864,6 +864,7 @@ public class SubInfoController extends BaseController {
     }
 
     @GetMapping("editSubInfo2")
+    @Log("用户点击项目信息编辑按钮,编辑项目信息")
     public ModelAndView editSubInfo2(String subId, ModelMap model, String queryType) {
         model.put("id", subId);
 

+ 5 - 1
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java

@@ -46,6 +46,7 @@ import com.rtrh.projects.modules.utils.QualificationsDeclareCellWriteHandler;
 //import com.rtrh.projects.modules.utils.StringUtils;
 import com.rtrh.projects.outapi.result.JsonResult;
 import com.rtrh.projects.web.log.Log;
+import com.rtrh.projects.web.log.WebLogAspect;
 import com.rtrh.projects.web.util.ExcelStyleUtil;
 import com.rtrh.projects.web.util.SheetData;
 import com.rtrh.projects.web.util.SheetHead;
@@ -876,7 +877,8 @@ public class SubInfoExportController extends BaseController {
      * @param response
      */
     @PostMapping("/exportDetailExcel")
-    public void exportDetailExcel(HttpServletResponse response, @RequestBody SubInfoQueryTzVO queryVO) {
+    public void exportDetailExcel(@RequestBody SubInfoQueryTzVO queryVO) {
+        WebLogAspect.content.set(String.format("用户点击项目四库管理%s导出明细", StringUtils.isBlank(queryVO.getStatus()) ? "项目总库" : SubInfoStatusEnum.getDesc(queryVO.getStatus())));
         queryVO.setSubjectAuthIds(getSubjectIds());
         List<SubInfoGxj> list = subInfoQueryService.queryAll(getCurUser().getLoginUser(), queryVO);
         // 行业字典
@@ -1119,6 +1121,8 @@ public class SubInfoExportController extends BaseController {
     @PostMapping("/exportTotalExcelByStatus")
     @Log("4库导出总表")
     public void exportTotalExcelByStatus(@RequestBody SubInfoQueryTzVO vo) {
+        WebLogAspect.content.set(String.format("用户点击项目四库管理%s导出总表",
+                StringUtils.isBlank(vo.getStatus()) ? "项目总库" : SubInfoStatusEnum.getDesc(vo.getStatus())));
         vo.setSubjectAuthIds(getSubjectIds());
         // 查询数据以及字典
         List<SubInfoTotalExcel> list = subInfoService.exportTotalExcelByStatus(vo);

+ 7 - 1
projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoApiController.java

@@ -10,6 +10,7 @@ import cn.hutool.core.lang.Assert;
 import com.rtrh.common.util.Identities;
 import com.rtrh.projects.modules.projects.dao.*;
 import com.rtrh.projects.modules.projects.enums.StatusEnum;
+import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
 import com.rtrh.projects.modules.projects.po.*;
 import com.rtrh.projects.modules.projects.service.*;
 import com.rtrh.projects.modules.projects.vo.*;
@@ -19,7 +20,9 @@ import com.rtrh.projects.modules.system.service.SubDataLogService;
 import com.rtrh.projects.modules.utils.DateUtils;
 import com.rtrh.projects.vo.subject.*;
 import com.rtrh.projects.web.log.Log;
+import com.rtrh.projects.web.log.WebLogAspect;
 import com.team.security.TeamShiroUser;
+import org.apache.commons.lang3.StringUtils;
 import org.hibernate.criterion.Criterion;
 import org.hibernate.criterion.DetachedCriteria;
 import org.hibernate.criterion.Restrictions;
@@ -768,7 +771,7 @@ public class SubInfoApiController extends BaseController {
      */
     @PostMapping("saveEditSubInfo")
     @Log("保存项目信息")
-    public Message saveEditSubInfo(@RequestBody EditSubInfoDataVO vo) {
+    public Message saveEditSubInfo(@RequestBody EditSubInfoGxjDataVO vo) {
         Message message = new Message();
         try {
             subInfoService.saveEditSubInfoData(vo, getCurUser().getLoginUser());
@@ -1311,7 +1314,10 @@ public class SubInfoApiController extends BaseController {
     }
 
     @PostMapping(value = "/moveDb")
+    @Log("移入")
     public Message moveDb(@RequestBody MoveDbParamVo vo) {
+        WebLogAspect.content.set(String.format("用户点击项目四库管理移入%s库",
+                StringUtils.isBlank(vo.getStatus()) ? "项目总" : SubInfoStatusEnum.getDesc(vo.getStatus())));
         Message message = new Message();
         try {
             Assert.notBlank(vo.getId(), "项目ID不能为空");

+ 2 - 2
projects/src/main/webapp/vmodules/project/weekReport.jsp

@@ -669,8 +669,8 @@
                     vardesc:$("[name='proName']").val(),
                     varstatus:$("[name='isDo']").val(),
                     varjsdd: $("[name='jsdd']").val(),
-                    varpage: self.pageNo,
-                    varnum: self.pageSize,
+                    pageNo: self.pageNo,
+                    pageSize: self.pageSize,
                     outtotal: 1,
 
                 };