buzhanyi hace 2 años
padre
commit
030909cd9c

+ 1 - 1
purchase-admin/src/main/java/com/ozs/web/controller/statisticalAnalysis/StatisticalAnalysisController.java

@@ -106,7 +106,7 @@ public class StatisticalAnalysisController extends BaseController {
         return AjaxResult.success(resVos);
     }
 
-    @ApiOperation(value = "执行滞后采购项目情况")
+    @ApiOperation(value = "执行滞后分析")
     @PostMapping("/countProjectExceed")
     //@PreAuthorize("@ss.hasPermi('statistical:countProjectExceed')")
     @Log(title = ModularConstans.statisticalAnalysis, businessType = BusinessType.QUERY)

+ 6 - 0
purchase-system/src/main/java/com/ozs/plan/doman/PlanQuarter.java

@@ -141,6 +141,12 @@ public class PlanQuarter {
      * 请求根据字段 appDelete 判断,值是true就是已申请
      */
     private String appDelete;
+    /**
+     * 是否可以申请撤销
+     * 请求根据字段 appDeleteDo 判断,值是true就是可以申请
+     */
+    @TableField(exist = false)
+    private String appDeleteDo;
     /**
      * 发函状态(0:未发函或已处理,1:确认发函)
      */

+ 6 - 0
purchase-system/src/main/java/com/ozs/plan/doman/PlanYears.java

@@ -134,6 +134,12 @@ public class PlanYears {
      * 请求根据字段 appDelete 判断,值是true就是已申请
      */
     private String appDelete;
+    /**
+     * 是否可以申请撤销
+     * 请求根据字段 appDeleteDo 判断,值是true就是可以申请
+     */
+    @TableField(exist = false)
+    private String appDeleteDo;
     /**
      * 发函状态(0:未发函或已处理,1:确认发函)
      */

+ 5 - 0
purchase-system/src/main/java/com/ozs/plan/doman/vo/responseVo/PlanQuarterResponseVo.java

@@ -98,6 +98,11 @@ public class PlanQuarterResponseVo implements Serializable {
      * 请求根据字段 appDelete 判断,值是true就是已申请
      */
     private String appDelete;
+    /**
+     * 是否可以申请撤销
+     * 请求根据字段 appDeleteDo 判断,值是true就是可以申请
+     */
+    private String appDeleteDo;
     /**
      * 计划调整情况及理由--->如计划需要变更,在填写申请修改时需填写调整情况及理由,审核单位审核通过后显示
      */

+ 10 - 5
purchase-system/src/main/java/com/ozs/plan/doman/vo/responseVo/PlanYearsResponseVo.java

@@ -93,6 +93,16 @@ public class PlanYearsResponseVo implements Serializable {
     private String projectAttr;
     @Excel(name = "项目属性")
     private String projectAttrStr;
+    /**
+     * 处理申请撤销
+     * 请求根据字段 appDelete 判断,值是true就是已申请
+     */
+    private String appDelete;
+    /**
+     * 是否可以申请撤销
+     * 请求根据字段 appDeleteDo 判断,值是true就是可以申请
+     */
+    private String appDeleteDo;
     /**
      * 退回原因--->审核不通过就是退回
      */
@@ -117,11 +127,6 @@ public class PlanYearsResponseVo implements Serializable {
     private String projectStatus;
     @Excel(name = "项目状态")
     private String projectStatusStr;
-    /**
-     * 处理申请撤销
-     * 请求根据字段 appDelete 判断,值是true就是已申请
-     */
-    private String appDelete;
     /**
      * 发函状态(0:未发函或已处理,1:确认发函)
      */

+ 12 - 0
purchase-system/src/main/java/com/ozs/plan/service/impl/PlanYearsServiceImpl.java

@@ -1221,6 +1221,18 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
                     }
                 }
             }
+            //是否可以申请撤销
+            //需求待填制可以申请,需求建档就不能申请
+            PlanQuarter byPlanYearId = planQuarterMapper.getByPlanYearId(planYear.getPlanYearId());
+            if (!ObjectUtils.isEmpty(byPlanYearId)) {
+                PmDemand demand = demandService.selectByPlanId(byPlanYearId.getPlanPracticalId());
+                if (!ObjectUtils.isEmpty(demand) && !demand.getProjectStatus().equals(PmProjectStatus.DEMAND_WAIT_FILL.getCode())) {
+                    planYear.setAppDeleteDo("false");
+                } else {
+                    planYear.setAppDeleteDo("true");
+                }
+            }
+
             BeanUtils.copyProperties(planYear, responseVo);
             try {
                 responseVo.setTipsMessage(planYearsGetTips(responseVo, thresholdMap, alertTimeMap));

+ 22 - 1
purchase-system/src/main/java/com/ozs/pm/mapper/PmDemandMapper.java

@@ -99,7 +99,28 @@ public interface PmDemandMapper extends BaseMapper<PmDemand> {
      *
      * @return
      */
-    StatisticalChartsResVo countProjectExceed(@Param("vo") PmDemandReqVo pmDemandReqVo);
+    StatisticalChartsResVo countProjectExceedThisYear(@Param("vo") PmDemandReqVo pmDemandReqVo);
+
+    /**
+     * 本季度所有的逾期项目数
+     *
+     * @return
+     */
+    StatisticalChartsResVo countProjectExceedThisQua(@Param("vo") PmDemandReqVo pmDemandReqVo);
+
+    /**
+     * 本月份所有的逾期项目数
+     *
+     * @return
+     */
+    StatisticalChartsResVo countProjectExceedThisMonth(@Param("vo") PmDemandReqVo pmDemandReqVo);
+
+    /**
+     * 累计积压的执行滞后采购任务数
+     *
+     * @return
+     */
+    StatisticalChartsResVo countProjectExceedAllNum(@Param("vo") PmDemandReqVo pmDemandReqVo);
 
     /**
      * 年度逾期项目数量

+ 47 - 41
purchase-system/src/main/java/com/ozs/pm/service/impl/PmDemandServiceImpl.java

@@ -336,11 +336,11 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
 
                 //专家意见反馈
                 LambdaQueryWrapper<PmExpertFeedback> pmExpertFeedbackLambdaQueryWrapper = new LambdaQueryWrapper<>();
-                pmExpertFeedbackLambdaQueryWrapper.eq(PmExpertFeedback::getDemandId,demandId);
+                pmExpertFeedbackLambdaQueryWrapper.eq(PmExpertFeedback::getDemandId, demandId);
                 PmExpertFeedback pmExpertFeedback = pmExpertFeedbackService.getOne(pmExpertFeedbackLambdaQueryWrapper);
-                if(!ObjectUtils.isEmpty(pmExpertFeedback)){
+                if (!ObjectUtils.isEmpty(pmExpertFeedback)) {
                     PmExpertFeedbackResVo pmExpertFeedbackResVo = new PmExpertFeedbackResVo();
-                    BeanUtils.copyProperties(pmExpertFeedback,pmExpertFeedbackResVo);
+                    BeanUtils.copyProperties(pmExpertFeedback, pmExpertFeedbackResVo);
 
                     List<SysFileInfo> fileInfos = getSysFileInfoList(pmExpertFeedbackResVo.getId(), SysFileRefEnum.PM_EXPERT_FEEDBACK.getType());
                     if (!ObjectUtils.isEmpty(fileInfos)) {
@@ -351,11 +351,11 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
 
                 //采购文件编制审核
                 LambdaQueryWrapper<PmProcurementDocumentsReview> pmProcurementDocumentsReviewLambdaQueryWrapper = new LambdaQueryWrapper<>();
-                pmProcurementDocumentsReviewLambdaQueryWrapper.eq(PmProcurementDocumentsReview::getDemandId,demandId);
+                pmProcurementDocumentsReviewLambdaQueryWrapper.eq(PmProcurementDocumentsReview::getDemandId, demandId);
                 PmProcurementDocumentsReview pmProcurementDocumentsReview = pmProcurementDocumentsReviewService.getOne(pmProcurementDocumentsReviewLambdaQueryWrapper);
-                if(!ObjectUtils.isEmpty(pmProcurementDocumentsReview)){
+                if (!ObjectUtils.isEmpty(pmProcurementDocumentsReview)) {
                     PmProcurementDocumentsReviewResVo pmProcurementDocumentsReviewResVo = new PmProcurementDocumentsReviewResVo();
-                    BeanUtils.copyProperties(pmProcurementDocumentsReview,pmProcurementDocumentsReviewResVo);
+                    BeanUtils.copyProperties(pmProcurementDocumentsReview, pmProcurementDocumentsReviewResVo);
 
                     List<SysFileInfo> fileInfos = getSysFileInfoList(pmProcurementDocumentsReviewResVo.getId(), SysFileRefEnum.PM_BID_FILE.getType());
                     if (!ObjectUtils.isEmpty(fileInfos)) {
@@ -387,15 +387,15 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
 
                 //标前质疑投诉
                 LambdaQueryWrapper<PmCallQuestion> pmCallQuestionLambdaQueryWrapper = new LambdaQueryWrapper<>();
-                pmCallQuestionLambdaQueryWrapper.eq(PmCallQuestion::getDemandId,demandId)
-                        .eq(PmCallQuestion::getType,'0').orderByDesc(PmCallQuestion::getCallQuestionTime);
-                List<PmCallQuestion>  pmCallQuestionList = pmCallQuestionService.list(pmCallQuestionLambdaQueryWrapper);
-                if(!ObjectUtils.isEmpty(pmCallQuestionList)){
+                pmCallQuestionLambdaQueryWrapper.eq(PmCallQuestion::getDemandId, demandId)
+                        .eq(PmCallQuestion::getType, '0').orderByDesc(PmCallQuestion::getCallQuestionTime);
+                List<PmCallQuestion> pmCallQuestionList = pmCallQuestionService.list(pmCallQuestionLambdaQueryWrapper);
+                if (!ObjectUtils.isEmpty(pmCallQuestionList)) {
                     List<PmCallQuestionResVo> pmCallQuestionResVoList = new ArrayList<>();
                     List<SysFileInfo> fileInfosAll = new ArrayList<>();
-                    for(PmCallQuestion pmCallQuestion : pmCallQuestionList){
+                    for (PmCallQuestion pmCallQuestion : pmCallQuestionList) {
                         PmCallQuestionResVo pmCallQuestionResVo = new PmCallQuestionResVo();
-                        BeanUtils.copyProperties(pmCallQuestion,pmCallQuestionResVo);
+                        BeanUtils.copyProperties(pmCallQuestion, pmCallQuestionResVo);
                         List<SysFileInfo> fileInfos = getSysFileInfoList(pmCallQuestionResVo.getId(), SysFileRefEnum.PM_PRE_BID_CALL_QUESTION.getType());
                         if (!ObjectUtils.isEmpty(fileInfos)) {
                             fileInfosAll.addAll(fileInfos);
@@ -439,15 +439,15 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
 
                 //标后质疑
                 LambdaQueryWrapper<PmCallQuestion> pmCallQuestionLambdaQueryWrapper2 = new LambdaQueryWrapper<>();
-                pmCallQuestionLambdaQueryWrapper2.eq(PmCallQuestion::getDemandId,demandId)
-                        .eq(PmCallQuestion::getType,'1').orderByDesc(PmCallQuestion::getCallQuestionTime);
-                List<PmCallQuestion>  pmCallQuestionList2 = pmCallQuestionService.list(pmCallQuestionLambdaQueryWrapper2);
-                if(!ObjectUtils.isEmpty(pmCallQuestionList2)){
+                pmCallQuestionLambdaQueryWrapper2.eq(PmCallQuestion::getDemandId, demandId)
+                        .eq(PmCallQuestion::getType, '1').orderByDesc(PmCallQuestion::getCallQuestionTime);
+                List<PmCallQuestion> pmCallQuestionList2 = pmCallQuestionService.list(pmCallQuestionLambdaQueryWrapper2);
+                if (!ObjectUtils.isEmpty(pmCallQuestionList2)) {
                     List<PmCallQuestionResVo> pmCallQuestionResVoList = new ArrayList<>();
                     List<SysFileInfo> fileInfosAll = new ArrayList<>();
-                    for(PmCallQuestion pmCallQuestion : pmCallQuestionList2){
+                    for (PmCallQuestion pmCallQuestion : pmCallQuestionList2) {
                         PmCallQuestionResVo pmCallQuestionResVo = new PmCallQuestionResVo();
-                        BeanUtils.copyProperties(pmCallQuestion,pmCallQuestionResVo);
+                        BeanUtils.copyProperties(pmCallQuestion, pmCallQuestionResVo);
                         List<SysFileInfo> fileInfos = getSysFileInfoList(pmCallQuestionResVo.getId(), SysFileRefEnum.PM_BID_CALL_QEUSTION_FILE.getType());
                         if (!ObjectUtils.isEmpty(fileInfos)) {
                             fileInfosAll.addAll(fileInfos);
@@ -479,7 +479,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
                         }
 
 
-                        if("1".equals(pmBidFailure.getCallQuestion())){ //有质疑
+                        if ("1".equals(pmBidFailure.getCallQuestion())) { //有质疑
                             PmCallQuestionResVo pmCallQuestionResVo = new PmCallQuestionResVo();
                             pmCallQuestionResVo.setCallQuestion(pmBidFailure.getCallQuestion());
                             pmCallQuestionResVo.setCallQuestionTime(pmBidFailure.getCallQuestionTime());
@@ -650,39 +650,39 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
                 }
 
                 LambdaQueryWrapper<PmExpertFeedback> pmExpertFeedbackLambdaQueryWrapper = new LambdaQueryWrapper<>();
-                pmExpertFeedbackLambdaQueryWrapper.eq(PmExpertFeedback::getDemandId,vo.getDemandId());
+                pmExpertFeedbackLambdaQueryWrapper.eq(PmExpertFeedback::getDemandId, vo.getDemandId());
                 PmExpertFeedback pmExpertFeedback = this.pmExpertFeedbackService.getOne(pmExpertFeedbackLambdaQueryWrapper);
-                if(pmExpertFeedback != null){
+                if (pmExpertFeedback != null) {
                     vo.setProjectNumber(pmExpertFeedback.getProjectNumber());
                     vo.setDocumentReviewTime(pmExpertFeedback.getDocumentReviewTime());
                 }
 
                 LambdaQueryWrapper<PmProcurementDocumentsReview> pmProcurementDocumentsReviewLambdaQueryWrapper = new LambdaQueryWrapper<>();
-                pmProcurementDocumentsReviewLambdaQueryWrapper.eq(PmProcurementDocumentsReview::getDemandId,vo.getDemandId());
+                pmProcurementDocumentsReviewLambdaQueryWrapper.eq(PmProcurementDocumentsReview::getDemandId, vo.getDemandId());
                 PmProcurementDocumentsReview pmProcurementDocumentsReview = this.pmProcurementDocumentsReviewService.getOne(pmProcurementDocumentsReviewLambdaQueryWrapper);
-                if(pmProcurementDocumentsReview != null){
+                if (pmProcurementDocumentsReview != null) {
                     vo.setProcurementOfficeApprovalTime(pmProcurementDocumentsReview.getProcurementOfficeApprovalTime());
                 }
 
-                if(Integer.parseInt(vo.getProjectStatus()) > 12 && Integer.parseInt(vo.getProjectStatus()) != 18){
+                if (Integer.parseInt(vo.getProjectStatus()) > 12 && Integer.parseInt(vo.getProjectStatus()) != 18) {
                     LambdaQueryWrapper<PmReleaseAnnouncement> pmReleaseAnnouncementLambdaQueryWrapper = new LambdaQueryWrapper<>();
-                    pmReleaseAnnouncementLambdaQueryWrapper.eq(PmReleaseAnnouncement::getDemandId,vo.getDemandId())
+                    pmReleaseAnnouncementLambdaQueryWrapper.eq(PmReleaseAnnouncement::getDemandId, vo.getDemandId())
                             .orderByDesc(PmReleaseAnnouncement::getReleaseTime)
-                             .last(" limit 1");
+                            .last(" limit 1");
                     PmReleaseAnnouncement pmReleaseAnnouncement = this.pmReleaseAnnouncementService.getOne(pmReleaseAnnouncementLambdaQueryWrapper);
-                    if(pmReleaseAnnouncement != null){
+                    if (pmReleaseAnnouncement != null) {
                         vo.setAnnouncementReleaseTime(pmReleaseAnnouncement.getReleaseTime());
                         vo.setTenderOpenTime(pmReleaseAnnouncement.getTenderOpenTime());
                     }
                 }
 
-                if(Integer.parseInt(vo.getProjectStatus()) > 15  && Integer.parseInt(vo.getProjectStatus()) != 16 && Integer.parseInt(vo.getProjectStatus()) != 18){
+                if (Integer.parseInt(vo.getProjectStatus()) > 15 && Integer.parseInt(vo.getProjectStatus()) != 16 && Integer.parseInt(vo.getProjectStatus()) != 18) {
                     LambdaQueryWrapper<PmBidWinning> pmBidWinningLambdaQueryWrapper = new LambdaQueryWrapper<>();
-                    pmBidWinningLambdaQueryWrapper.eq(PmBidWinning::getDemandId,vo.getDemandId()).eq(PmBidWinning::getStatus,BidWinningStatus.NORMAL.getCode())
+                    pmBidWinningLambdaQueryWrapper.eq(PmBidWinning::getDemandId, vo.getDemandId()).eq(PmBidWinning::getStatus, BidWinningStatus.NORMAL.getCode())
                             .orderByDesc(PmBidWinning::getBidAnnouncementTime)
                             .last(" limit 1");
                     PmBidWinning pmBidWinning = this.pmBidWinningService.getOne(pmBidWinningLambdaQueryWrapper);
-                    if(pmBidWinning != null){
+                    if (pmBidWinning != null) {
                         vo.setBidAnnouncementTime(pmBidWinning.getBidAnnouncementTime());
                     }
                 }
@@ -947,11 +947,11 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public boolean uploadFile(Long redId, Integer fileType, List<SysFileRef> sysFileRefs, String upateBy,boolean delOld) {
+    public boolean uploadFile(Long redId, Integer fileType, List<SysFileRef> sysFileRefs, String upateBy, boolean delOld) {
 
         if (!ObjectUtils.isEmpty(sysFileRefs)) {
             //删除老的
-            if(delOld){
+            if (delOld) {
                 QueryWrapper<SysFileRef> queryWrapper = new QueryWrapper<>();
                 queryWrapper.lambda().eq(SysFileRef::getRedId, redId)
                         .eq(SysFileRef::getType, fileType);
@@ -983,7 +983,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean uploadFile(Long redId, Integer fileType, List<SysFileRef> sysFileRefs, String upateBy) {
-        return uploadFile(redId, fileType, sysFileRefs, upateBy,false);
+        return uploadFile(redId, fileType, sysFileRefs, upateBy, false);
     }
 
     @Override
@@ -1974,16 +1974,22 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
     public AjaxResult countProjectExceed(PmDemandReqVo pmDemandReqVo) {
         //是-1就是查询自己及子孙级以下,否则只查询指定部门
         pmDemandReqVo.setDeptList(isQueryAll(pmDemandReqVo.getPurchaseDeptId()));
-        HashMap<String, String> resMap = new HashMap<>();
+        List<StatisticalChartsResVo> resVos = new ArrayList<>();
         //执行滞后采购项目:本年度所有的逾期项目数
         //预算金额:本年度所有逾期项目累加的预算金额
-        StatisticalChartsResVo resVo = pmDemandMapper.countProjectExceed(pmDemandReqVo);
-        resMap.put("执行滞后采购项目", resVo.getNum() + "");
-        resMap.put("预算金额", resVo.getEvaluationTotal() + "");
-        //滞后项目数量占比:指本年度逾期项目数量/本年度所有项目数量
-        Integer thisYear = pmDemandMapper.countThisYear(pmDemandReqVo);
-        resMap.put("滞后项目数量占比", getPercent(resVo.getNum(), thisYear));
-        return AjaxResult.success(resMap);
+        StatisticalChartsResVo resVo = pmDemandMapper.countProjectExceedThisYear(pmDemandReqVo);
+        resVo.setColumnName("本年度执行滞后任务新增数量");
+        resVos.add(resVo);
+        StatisticalChartsResVo resVo2 = pmDemandMapper.countProjectExceedThisQua(pmDemandReqVo);
+        resVo2.setColumnName("本季度执行滞后任务新增数量");
+        resVos.add(resVo2);
+        StatisticalChartsResVo resVo3 = pmDemandMapper.countProjectExceedThisMonth(pmDemandReqVo);
+        resVo3.setColumnName("本月执行滞后任务新增数量");
+        resVos.add(resVo3);
+        StatisticalChartsResVo resVo4 = pmDemandMapper.countProjectExceedAllNum(pmDemandReqVo);
+        resVo4.setColumnName("累计积压的执行滞后采购任务数");
+        resVos.add(resVo4);
+        return AjaxResult.success(resVos);
     }
 
     /**

+ 70 - 28
purchase-system/src/main/resources/mapper/pm/PmDemandMapper.xml

@@ -150,7 +150,52 @@
         AND evaluation &gt; #{vo.evaluation}
     </select>
 
-    <select id="countProjectExceed" parameterType="com.ozs.pm.doman.vo.requestVo.PmDemandReqVo"
+    <select id="countProjectExceedThisYear" parameterType="com.ozs.pm.doman.vo.requestVo.PmDemandReqVo"
+            resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo">
+        SELECT COUNT(demand_id) num, ifnull(sum(evaluation), 0) evaluationTotal
+        FROM `pm_demand`
+        WHERE purchase_dept_id in
+        <foreach collection="vo.deptList" item="item" index="index"
+                 separator="," open="(" close=")">
+            #{item}
+        </foreach>
+        AND (real_demand_commit_time > plan_demand_sub_time
+        or real_purchase_finish_time > plan_purchase_finish_time
+        or real_deliver_time > plan_deliver_time)
+        and YEAR(create_time) = YEAR(NOW())
+    </select>
+
+    <select id="countProjectExceedThisQua" parameterType="com.ozs.pm.doman.vo.requestVo.PmDemandReqVo"
+            resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo">
+        SELECT COUNT(demand_id) num, ifnull(sum(evaluation), 0) evaluationTotal
+        FROM `pm_demand`
+        WHERE purchase_dept_id in
+        <foreach collection="vo.deptList" item="item" index="index"
+                 separator="," open="(" close=")">
+            #{item}
+        </foreach>
+        AND (real_demand_commit_time > plan_demand_sub_time
+        or real_purchase_finish_time > plan_purchase_finish_time
+        or real_deliver_time > plan_deliver_time)
+        and quarter(create_time) = quarter(NOW())
+    </select>
+
+    <select id="countProjectExceedThisMonth" parameterType="com.ozs.pm.doman.vo.requestVo.PmDemandReqVo"
+            resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo">
+        SELECT COUNT(demand_id) num, ifnull(sum(evaluation), 0) evaluationTotal
+        FROM `pm_demand`
+        WHERE purchase_dept_id in
+        <foreach collection="vo.deptList" item="item" index="index"
+                 separator="," open="(" close=")">
+            #{item}
+        </foreach>
+        AND (real_demand_commit_time > plan_demand_sub_time
+        or real_purchase_finish_time > plan_purchase_finish_time
+        or real_deliver_time > plan_deliver_time)
+        and MONTH(create_time) = MONTH(NOW())
+    </select>
+
+    <select id="countProjectExceedAllNum" parameterType="com.ozs.pm.doman.vo.requestVo.PmDemandReqVo"
             resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo">
         SELECT COUNT(demand_id) num, ifnull(sum(evaluation), 0) evaluationTotal
         FROM `pm_demand`
@@ -162,7 +207,6 @@
         AND (real_demand_commit_time > plan_demand_sub_time
         or real_purchase_finish_time > plan_purchase_finish_time
         or real_deliver_time > plan_deliver_time)
-        and DATE_FORMAT(create_time, '%Y') = YEAR(NOW())
     </select>
 
     <select id="countThisYear" parameterType="com.ozs.pm.doman.vo.requestVo.PmDemandReqVo"
@@ -174,7 +218,7 @@
                  separator="," open="(" close=")">
             #{item}
         </foreach>
-        AND DATE_FORMAT(create_time, '%Y') = YEAR(NOW())
+        AND YEAR(create_time) = YEAR(NOW())
     </select>
 
     <select id="countProjectExceedYear" parameterType="com.ozs.pm.doman.vo.requestVo.PmDemandReqVo"
@@ -254,7 +298,7 @@
         </foreach>
         AND find_in_set('1', project_attr)
         AND `project_status` = #{vo.projectStatus}
-        AND DATE_FORMAT(create_time, '%Y') = year(now())
+        AND YEAR(create_time ) = year(now())
     </select>
 
     <select id="countMajorProjectExceed" resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo">
@@ -269,7 +313,7 @@
         or real_purchase_finish_time > plan_purchase_finish_time
         or real_deliver_time > plan_deliver_time)
         AND find_in_set('1', project_attr)
-        and DATE_FORMAT(create_time, '%Y') = YEAR(NOW())
+        and YEAR(create_time ) = YEAR(NOW())
     </select>
 
     <select id="taskQuantityYear" parameterType="com.ozs.pm.doman.vo.requestVo.PmDemandReqVo"
@@ -279,19 +323,17 @@
         WHERE find_in_set('1'
             , project_attr)
           AND `project_status` = #{code}
-          and DATE_FORMAT(create_time
-                  , '%Y') = YEAR(NOW())
+          and YEAR(create_time) = YEAR(NOW())
     </select>
 
     <select id="taskQuantityLastYear" resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo"
             parameterType="java.lang.String">
-        SELECT YEAR (NOW()) - 1 columnName, COUNT (demand_id) num
+        SELECT YEAR(NOW()) - 1 columnName, COUNT(demand_id) num
         FROM `pm_demand`
         WHERE find_in_set('1'
             , project_attr)
           AND `project_status` = #{code}
-          and DATE_FORMAT(create_time
-            , '%Y') = YEAR (NOW()) - 1
+          and YEAR(create_time) = YEAR(NOW()) - 1
     </select>
 
     <select id="countEveryStatusNum" parameterType="com.ozs.pm.doman.vo.requestVo.PmDemandReqVo"
@@ -304,7 +346,7 @@
             #{item}
         </foreach>
         AND `project_status` IN (9, 10, 11, 12, 13, 14,15,16,17)
-        and DATE_FORMAT(create_time, '%Y') = YEAR(NOW())
+        and YEAR(create_time) = YEAR(NOW())
         GROUP BY project_status
     </select>
 
@@ -326,7 +368,7 @@
                  separator="," open="(" close=")">
             #{item}
         </foreach>
-        AND find_in_set('1', project_attr) AND DATE_FORMAT(create_time, '%Y') =YEAR(NOW()) - 1 ) de
+        AND find_in_set('1', project_attr) AND YEAR(create_time) =YEAR(NOW()) - 1 ) de
         WHERE d.demand_id = c.demand_id
         AND find_in_set('1', d.project_attr)
         AND d.purchase_dept_id in
@@ -334,11 +376,11 @@
                  separator="," open="(" close=")">
             #{item}
         </foreach>
-        AND DATE_FORMAT(d.create_time, '%Y') = YEAR(NOW()) - 1
+        AND YEAR(d.create_time) = YEAR(NOW()) - 1
     </select>
 
     <select id="countProjectMajorByYear" resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo">
-        SELECT DATE_FORMAT(create_time, '%Y') columnName, COUNT(demand_id) num
+        SELECT YEAR(create_time) columnName, COUNT(demand_id) num
         FROM `pm_demand`
         WHERE purchase_dept_id in
         <foreach collection="vo.deptList" item="item" index="index"
@@ -346,7 +388,7 @@
             #{item}
         </foreach>
         AND find_in_set('1', project_attr)
-        GROUP BY DATE_FORMAT(create_time, '%Y')
+        GROUP BY YEAR(create_time)
         order by create_time asc
     </select>
 
@@ -372,7 +414,7 @@
         </foreach>
         AND find_in_set('1', project_attr)
         and QUARTER(create_time) = #{quarter}
-        AND DATE_FORMAT(create_time, '%Y') = #{year}
+        AND YEAR(create_time) = #{year}
     </select>
 
     <!-- 正常推进项目 -->
@@ -555,7 +597,7 @@
             or real_purchase_finish_time > plan_purchase_finish_time
             or real_deliver_time > plan_deliver_time)
           AND find_in_set('1', project_attr)
-          and DATE_FORMAT(create_time, '%Y') = YEAR(NOW())
+          and YEAR(create_time) = YEAR(NOW())
     </select>
 
     <select id="purchaseProjectDistribution" parameterType="com.ozs.pm.doman.vo.requestVo.PmDemandReqVo"
@@ -644,7 +686,7 @@
             #{item}
         </foreach>
         AND `project_status` IN (6,7,8,9,10,11,12,13,14,15, 16, 17)
-        and DATE_FORMAT(create_time, '%Y') = YEAR(NOW())-1
+        and YEAR(create_time) = YEAR(NOW())-1
     </select>
 
     <select id="selectSTSThisYear" resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo">
@@ -656,7 +698,7 @@
             #{item}
         </foreach>
         AND `project_status` &gt; 4
-        and DATE_FORMAT(create_time, '%Y') = YEAR(NOW())
+        and YEAR(create_time) = YEAR(NOW())
     </select>
 
     <select id="selectmeiJiDu" resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo"
@@ -693,7 +735,7 @@
             #{item}
         </foreach>
         AND `project_status` &gt; 4
-        and DATE_FORMAT(create_time, '%Y') = YEAR(NOW())
+        and YEAR(create_time) = YEAR(NOW())
     </select>
 
     <select id="selectCGThisMonth" resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo"
@@ -707,14 +749,14 @@
                  separator="," open="(" close=")">
             #{item}
         </foreach>
-        AND project_status &gt; 16 AND DATE_FORMAT(create_time, '%Y') =MONTH(NOW()) ) de
+        AND project_status &gt; 16 AND MONTH(create_time) =MONTH(NOW()) ) de
         where d.demand_id = c.demand_id and purchase_dept_id in
         <foreach collection="vo.deptList" item="item" index="index"
                  separator="," open="(" close=")">
             #{item}
         </foreach>
         AND d.project_status &gt; 16
-        AND DATE_FORMAT(d.create_time, '%Y') = MONTH(NOW())
+        AND MONTH(d.create_time) = MONTH(NOW())
     </select>
 
     <select id="selectCGThisQua" resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo"
@@ -728,14 +770,14 @@
                  separator="," open="(" close=")">
             #{item}
         </foreach>
-        AND project_status &gt; 17 AND DATE_FORMAT(create_time, '%Y') =QUARTER(NOW()) ) de
+        AND project_status &gt; 17 AND QUARTER(create_time) =QUARTER(NOW()) ) de
         WHERE d.demand_id = c.demand_id and purchase_dept_id in
         <foreach collection="vo.deptList" item="item" index="index"
                  separator="," open="(" close=")">
             #{item}
         </foreach>
         AND d.project_status &gt; 17
-        AND DATE_FORMAT(d.create_time, '%Y') = QUARTER(NOW())
+        AND QUARTER(d.create_time) = QUARTER(NOW())
     </select>
 
     <select id="selectZJLastYear" resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo"
@@ -749,14 +791,14 @@
                  separator="," open="(" close=")">
             #{item}
         </foreach>
-        AND project_status IN (17,18) AND DATE_FORMAT(create_time, '%Y') = YEAR(NOW())-1 ) de
+        AND project_status IN (17,18) AND YEAR(create_time) = YEAR(NOW())-1 ) de
         WHERE d.demand_id = c.demand_id and purchase_dept_id in
         <foreach collection="vo.deptList" item="item" index="index"
                  separator="," open="(" close=")">
             #{item}
         </foreach>
         AND d.project_status IN (17,18)
-        AND DATE_FORMAT(d.create_time, '%Y') = YEAR(NOW())-1
+        AND YEAR(d.create_time) = YEAR(NOW())-1
     </select>
 
     <select id="selectTBThisYear" resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo"
@@ -770,14 +812,14 @@
                  separator="," open="(" close=")">
             #{item}
         </foreach>
-        AND project_status &gt; 17 AND DATE_FORMAT(create_time, '%Y') = YEAR(NOW()) ) de
+        AND project_status &gt; 17 AND YEAR(create_time) = YEAR(NOW()) ) de
         WHERE d.demand_id = c.demand_id and purchase_dept_id in
         <foreach collection="vo.deptList" item="item" index="index"
                  separator="," open="(" close=")">
             #{item}
         </foreach>
         AND d.project_status &gt; 17
-        AND DATE_FORMAT(d.create_time, '%Y') = YEAR(NOW())
+        AND YEAR(d.create_time) = YEAR(NOW())
     </select>
 
     <select id="selectCCThisYear" resultType="com.ozs.pm.doman.vo.responseVo.StatisticalChartsResVo"