Bläddra i källkod

fix 年度履职报告计算分数

Administrator 1 år sedan
förälder
incheckning
10c83fc6a8

+ 15 - 25
ruoyi-admin/src/main/java/com/ruoyi/web/controller/assessment/ZxAssessmentController.java

@@ -33,20 +33,17 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/zx/assessment")
-public class ZxAssessmentController extends BaseController
-{
+public class ZxAssessmentController extends BaseController {
     @Autowired
     private IZxAssessmentService zxAssessmentService;
 
-/**
- * 查询政协评价考核列表
- */
-@PreAuthorize("@ss.hasPermi('zxAssessment:assessment:list')")
-@GetMapping("/list")
-    public TableDataInfo list(ZxAssessment zxAssessment)
-    {
+    /**
+     * 查询政协评价考核列表
+     */
+    @PreAuthorize("@ss.hasPermi('zxAssessment:assessment:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ZxAssessment zxAssessment) {
 
-        startPage();
         List<ZxAssessment> list = zxAssessmentService.selectZxAssessmentList(zxAssessment);
         return getDataTable(list);
     }
@@ -56,8 +53,7 @@ public class ZxAssessmentController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('zxAssessment:assessment:list')")
     @GetMapping("/list/exclude/{assessmentId}")
-    public AjaxResult excludeChild(@PathVariable(value = "assessmentId", required = false) Long assessmentId)
-    {
+    public AjaxResult excludeChild(@PathVariable(value = "assessmentId", required = false) Long assessmentId) {
         List<ZxAssessment> zxAssessments = zxAssessmentService.selectZxAssessmentList(new ZxAssessment());
         zxAssessments.removeIf(d -> d.getAssessmentId().intValue() == assessmentId || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), assessmentId + ""));
         return success(zxAssessments);
@@ -68,8 +64,7 @@ public class ZxAssessmentController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('zxAssessment:assessment:query')")
     @GetMapping(value = "/{assessmentId}")
-    public AjaxResult getInfo(@PathVariable("assessmentId") Long assessmentId)
-    {
+    public AjaxResult getInfo(@PathVariable("assessmentId") Long assessmentId) {
         return success(zxAssessmentService.selectZxAssessmentByAssessmentId(assessmentId));
     }
 
@@ -79,10 +74,8 @@ public class ZxAssessmentController extends BaseController
     @PreAuthorize("@ss.hasPermi('zxAssessment:assessment:add')")
     @Log(title = "政协评价考核", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody ZxAssessment zxAssessment)
-    {
-        if (! zxAssessmentService.checkAssessmentProjectUnique(zxAssessment))
-        {
+    public AjaxResult add(@RequestBody ZxAssessment zxAssessment) {
+        if (!zxAssessmentService.checkAssessmentProjectUnique(zxAssessment)) {
             return error("新增考核规则'" + zxAssessment.getAssessmentProject() + "'失败,考核规则已存在");
         }
         return toAjax(zxAssessmentService.insertZxAssessment(zxAssessment));
@@ -94,12 +87,10 @@ public class ZxAssessmentController extends BaseController
     @PreAuthorize("@ss.hasPermi('zxAssessment:assessment:edit')")
     @Log(title = "政协评价考核", businessType = BusinessType.UPDATE)
     @PostMapping("/put")
-    public AjaxResult edit(@RequestBody ZxAssessment zxAssessment)
-    {
-        if (! zxAssessmentService.checkAssessmentProjectUnique(zxAssessment))
-        {
+    public AjaxResult edit(@RequestBody ZxAssessment zxAssessment) {
+/*        if (!zxAssessmentService.checkAssessmentProjectUnique(zxAssessment)) {
             return error("修改考核规则'" + zxAssessment.getAssessmentProject() + "'失败,考核规则已存在");
-        }
+        }*/
         return toAjax(zxAssessmentService.updateZxAssessment(zxAssessment));
     }
 
@@ -109,8 +100,7 @@ public class ZxAssessmentController extends BaseController
     @PreAuthorize("@ss.hasPermi('zxAssessment:assessment:remove')")
     @Log(title = "政协评价考核", businessType = BusinessType.DELETE)
     @GetMapping("/delete/{assessmentIds}")
-    public AjaxResult remove(@PathVariable Long[] assessmentIds)
-    {
+    public AjaxResult remove(@PathVariable Long[] assessmentIds) {
         return toAjax(zxAssessmentService.deleteZxAssessmentByAssessmentIds(assessmentIds));
     }
 }

+ 14 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/activity/ZxActivity.java

@@ -3,6 +3,7 @@ package com.ruoyi.system.domain.activity;
 import java.util.List;
 import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.system.domain.ZxFj;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -74,6 +75,19 @@ public class ZxActivity extends BaseEntity
      */
     private Long userId;
 
+    /**
+     * 附件
+     */
+    private List<ZxFj> zxFjListFj;
+
+    public List<ZxFj> getZxFjListFj() {
+        return zxFjListFj;
+    }
+
+    public void setZxFjListFj(List<ZxFj> zxFjListFj) {
+        this.zxFjListFj = zxFjListFj;
+    }
+
     public Long getUserId() {
         return userId;
     }

+ 57 - 18
ruoyi-system/src/main/java/com/ruoyi/system/domain/assessment/ZxAssessment.java

@@ -1,10 +1,14 @@
 package com.ruoyi.system.domain.assessment;
 
+import com.ruoyi.common.core.domain.entity.SysDept;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * 政协评价考核对象 zx_assessment
  * 
@@ -26,9 +30,13 @@ public class ZxAssessment extends BaseEntity
     @Excel(name = "祖级列表")
     private String ancestors;
 
-    /** 考核项目 */
+    /** 考核项目名称 */
     @Excel(name = "考核项目")
     private String assessmentProject;
+    /**
+     * 考核项目id
+     */
+    private String assessmentProjectId;
 
     /** 考核标准 */
     @Excel(name = "考核标准")
@@ -37,10 +45,14 @@ public class ZxAssessment extends BaseEntity
     /** 考核类型 */
     @Excel(name = "考核类型")
     private String assessmentType;
+    /**
+     * 子类考核类型(字典值value值)
+     */
+    private String assessmentTypeId;
 
     /** 项目总分 */
     @Excel(name = "项目总分")
-    private String assessmentTotal;
+    private Long assessmentTotal;
 
     /** 分数类型 1:加分 2:减分 */
     @Excel(name = "分数类型 1:加分 2:减分")
@@ -48,7 +60,7 @@ public class ZxAssessment extends BaseEntity
 
     /** 单项分数 */
     @Excel(name = "单项分数")
-    private String assessmentScore;
+    private Long assessmentScore;
 
     /** 参与次数 */
     @Excel(name = "参与次数")
@@ -62,7 +74,34 @@ public class ZxAssessment extends BaseEntity
     @Excel(name = "是否启用", readConverterExp = "Y=代表启用,n=代表不启用")
     private String isUse;
 
-    public void setAssessmentId(Long assessmentId) 
+    /** 子考核 */
+    private List<ZxAssessment> children = new ArrayList<ZxAssessment>();
+
+    public List<ZxAssessment> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<ZxAssessment> children) {
+        this.children = children;
+    }
+
+    public String getAssessmentTypeId() {
+        return assessmentTypeId;
+    }
+
+    public void setAssessmentTypeId(String assessmentTypeId) {
+        this.assessmentTypeId = assessmentTypeId;
+    }
+
+    public String getAssessmentProjectId() {
+        return assessmentProjectId;
+    }
+
+    public void setAssessmentProjectId(String assessmentProjectId) {
+        this.assessmentProjectId = assessmentProjectId;
+    }
+
+    public void setAssessmentId(Long assessmentId)
     {
         this.assessmentId = assessmentId;
     }
@@ -116,16 +155,24 @@ public class ZxAssessment extends BaseEntity
     {
         return assessmentType;
     }
-    public void setAssessmentTotal(String assessmentTotal) 
-    {
+
+    public Long getAssessmentTotal() {
+        return assessmentTotal;
+    }
+
+    public void setAssessmentTotal(Long assessmentTotal) {
         this.assessmentTotal = assessmentTotal;
     }
 
-    public String getAssessmentTotal() 
-    {
-        return assessmentTotal;
+    public Long getAssessmentScore() {
+        return assessmentScore;
+    }
+
+    public void setAssessmentScore(Long assessmentScore) {
+        this.assessmentScore = assessmentScore;
     }
-    public void setScoreType(String scoreType) 
+
+    public void setScoreType(String scoreType)
     {
         this.scoreType = scoreType;
     }
@@ -134,15 +181,7 @@ public class ZxAssessment extends BaseEntity
     {
         return scoreType;
     }
-    public void setAssessmentScore(String assessmentScore) 
-    {
-        this.assessmentScore = assessmentScore;
-    }
 
-    public String getAssessmentScore() 
-    {
-        return assessmentScore;
-    }
     public void setAssessmentCount(String assessmentCount) 
     {
         this.assessmentCount = assessmentCount;

+ 13 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/conference/ZxConference.java

@@ -3,6 +3,7 @@ package com.ruoyi.system.domain.conference;
 import java.util.List;
 import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.system.domain.ZxFj;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -66,6 +67,18 @@ public class ZxConference extends BaseEntity
      */
     private String conferenceQr;
 
+    /**
+     * 附件
+     */
+    private List<ZxFj> zxFjListFj;
+
+    public List<ZxFj> getZxFjListFj() {
+        return zxFjListFj;
+    }
+
+    public void setZxFjListFj(List<ZxFj> zxFjListFj) {
+        this.zxFjListFj = zxFjListFj;
+    }
     public String getConferenceType() {
         return conferenceType;
     }

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/mapper/ZxAssessmentMapper.java

@@ -37,7 +37,7 @@ public interface ZxAssessmentMapper
      * @return 结果
      */
     public int insertZxAssessment(ZxAssessment zxAssessment);
-    public ZxAssessment checkAssessmentProjectUnique(@Param("assessmentProject") String assessmentProject, @Param("assessmentId") Long assessmentId);
+    public ZxAssessment checkAssessmentProjectUnique(@Param("AssessmentTypeId") String assessmentTypeId, @Param("parentId") Long parentId);
 
     /**
      * 修改政协评价考核

+ 303 - 46
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MemberInfoServiceImpl.java

@@ -1,15 +1,21 @@
 package com.ruoyi.system.service.impl;
 
 
+import com.ruoyi.common.core.domain.BaseEntity;
 import com.ruoyi.common.core.domain.entity.SysDictData;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.system.domain.ProposalInfo;
 import com.ruoyi.system.domain.activity.ZxActivity;
+import com.ruoyi.system.domain.activity.ZxActivityUser;
+import com.ruoyi.system.domain.assessment.ZxAssessment;
+import com.ruoyi.system.domain.bonus.ZxBonus;
 import com.ruoyi.system.domain.conference.ZxConference;
+import com.ruoyi.system.domain.conference.ZxConferenceUser;
 import com.ruoyi.system.domain.member.MemberInfo;
 import com.ruoyi.system.domain.member.MemberInfoTree;
 import com.ruoyi.system.domain.speak.ZxSpeak;
+import com.ruoyi.system.domain.sqmy.SqmyInfo;
 import com.ruoyi.system.domain.vo.MemberInfoVo;
 import com.ruoyi.system.mapper.*;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -20,16 +26,19 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
+
+import static com.ruoyi.common.constant.CommonConstants.*;
+import static java.math.BigInteger.ZERO;
 
 /**
  * 委员信息Service业务层处理
- * 
+ *
  * @author boman
  * @date 2024-03-07
  */
 @Service
-public class MemberInfoServiceImpl implements IMemberInfoService 
-{
+public class MemberInfoServiceImpl implements IMemberInfoService {
     @Autowired
     private MemberInfoMapper memberInfoMapper;
     @Autowired
@@ -42,18 +51,26 @@ public class MemberInfoServiceImpl implements IMemberInfoService
     @Autowired
     private ProposalInfoMapper proposalInfoMapper;
 
+    @Autowired
+    private SqmyInfoMapper sqmyInfoMapper;
+
     @Autowired
     private SysDictDataMapper dictDataMapper;
 
+    @Autowired
+    private ZxAssessmentMapper zxAssessmentMapper;
+    @Autowired
+    private ZxBonusMapper zxBonusMapper;
+
+
     /**
      * 查询委员信息
-     * 
+     *
      * @param memberId 委员信息主键
      * @return 委员信息
      */
     @Override
-    public MemberInfo selectMemberInfoByMemberId(Long memberId)
-    {
+    public MemberInfo selectMemberInfoByMemberId(Long memberId) {
         return memberInfoMapper.selectMemberInfoByMemberId(memberId);
     }
 
@@ -62,27 +79,25 @@ public class MemberInfoServiceImpl implements IMemberInfoService
      */
     @Override
     public MemberInfoVo getInfoJop(MemberInfo memberInfos) {
-        MemberInfoVo  memberInfoVo = new MemberInfoVo();
+        MemberInfoVo memberInfoVo = new MemberInfoVo();
         MemberInfo memberInfo = memberInfoMapper.selectMemberInfoByMemberId(memberInfos.getMemberId());
         memberInfoVo.setMemberInfo(memberInfo);
-        //todo 提案/社情民意还有联民提案的
         ZxConference zxConference = new ZxConference();
         zxConference.setUserId(SecurityUtils.getUserId());
         List<ZxConference> zxConferences = zxConferenceMapper.selectZxConferenceList(zxConference);
-
-        if (zxConferences != null){
+        if (zxConferences != null) {
             memberInfoVo.setZxConferenceList(zxConferences);
         }
         ZxActivity zxActivity = new ZxActivity();
         zxActivity.setUserId(SecurityUtils.getUserId());
         List<ZxActivity> zxActivities = zxActivityMapper.selectZxActivityList(zxActivity);
-        if (zxActivities != null){
+        if (zxActivities != null) {
             memberInfoVo.setZxActivityList(zxActivities);
         }
         ZxSpeak zxSpeak = new ZxSpeak();
         zxSpeak.setUserId(SecurityUtils.getUserId());
         List<ZxSpeak> zxSpeaks = zxSpeakMapper.selectZxSpeakList(zxSpeak);
-        if (zxSpeaks != null){
+        if (zxSpeaks != null) {
             memberInfoVo.setZxSpeakList(zxSpeaks);
         }
         return memberInfoVo;
@@ -93,49 +108,295 @@ public class MemberInfoServiceImpl implements IMemberInfoService
      */
     @Override
     public MemberInfoVo getMemberReport(MemberInfo memberInfo) {
-        MemberInfoVo  memberInfoVo = new MemberInfoVo();
+        MemberInfoVo memberInfoVo = new MemberInfoVo();
         //查询出委员信息
         Long userId = memberInfo.getUserId();
         MemberInfo memberInfoSelect = memberInfoMapper.selectMemberInfoByUserId(memberInfo.getUserId());
         memberInfoVo.setMemberInfo(memberInfoSelect);
         //履职状况初始化
-        Map<String,Object> map = new HashMap<>();
+        Map<String, Object> map = new HashMap<>();
         //提案
-        map.put("proposalInfoNum",0);
+        map.put("proposalInfoNum", 0);
         //社情民意
-        map.put("sqmyInfoNum",0);
+        map.put("sqmyInfoNum", 0);
         //会议
-        map.put("conferenceNum",0);
+        map.put("conferenceNum", 0);
         //活动
-        map.put("activityNum",0);
+        map.put("activityNum", 0);
         //发言数量
-        map.put("speakNum",0);
-        map.put("proposalInfoScore",0);
-        map.put("sqmyInfoScore",0);
-        map.put("conferenceScore",0);
-        map.put("activityScore",0);
-        map.put("speakScore",0);
+        map.put("speakNum", 0);
+        //提案分数
+        map.put("proposalInfoScore", 0);
+        map.put("sqmyInfoScore", 0);
+        map.put("conferenceScore", 0);
+        map.put("activityScore", 0);
+        map.put("speakScore", 0);
+        //加分
+        map.put("zxBonusScore", 0);
+        //查询履职考核标准
+        List<ZxAssessment> zxAssessments = zxAssessmentMapper.selectZxAssessmentList(new ZxAssessment());
+        //查询提案情况
         ProposalInfo proposalInfo = new ProposalInfo();
         proposalInfo.setProposalUserId(userId);
-        //查询履职情况
         List<ProposalInfo> proposalInfos = proposalInfoMapper.selectProposalInfoListByUser(proposalInfo);
-        if (proposalInfos != null && proposalInfos.size() > 0){
-
-        }
+        memberInfoVo.setProposalInfoList(proposalInfos);
         //查询社情民意
+        SqmyInfo sqmyInfo = new SqmyInfo();
+        sqmyInfo.setSqmyUserId(userId);
+        List<SqmyInfo> sqmyInfos = sqmyInfoMapper.selectSqmyInfoList(sqmyInfo);
+        memberInfoVo.setSqmyInfoList(sqmyInfos);
+        //查询政协会议
+        ZxConference zxConference = new ZxConference();
+        zxConference.setUserId(SecurityUtils.getUserId());
+        List<ZxConference> zxConferences = zxConferenceMapper.selectZxConferenceList(zxConference);
+        memberInfoVo.setZxConferenceList(zxConferences);
+        //查询活动
+        ZxActivity zxActivity = new ZxActivity();
+        zxActivity.setUserId(SecurityUtils.getUserId());
+        List<ZxActivity> zxActivities = zxActivityMapper.selectZxActivityList(zxActivity);
+        memberInfoVo.setZxActivityList(zxActivities);
+        //查询发言不计算分
+        ZxSpeak zxSpeak = new ZxSpeak();
+        zxSpeak.setUserId(SecurityUtils.getUserId());
+        List<ZxSpeak> zxSpeaks = zxSpeakMapper.selectZxSpeakList(zxSpeak);
+        memberInfoVo.setZxSpeakList(zxSpeaks);
+        //计算得分
+        if (zxAssessments != null && zxAssessments.size() > 0) {
+            //获取分值上限
+            long assessmentTotal = 0L;
+            //定义当前分数
+            long nowScore = 0L;
+            //设置的单项分数
+            long assessmentScore = 0L;
+            //符合条件的项目数量
+            long proposalCount = 0L;
+            //计算提案得分
+            if (proposalInfos != null && proposalInfos.size() > 0) {
+                //获取分值上限
+                assessmentTotal = zxAssessments.stream().filter(e -> "assessment_proposal".equals(e.getAssessmentProjectId()) && 0 == e.getParentId()).collect(Collectors.toList())
+                        .get(0).getAssessmentTotal();
+                //先去查询这个人是否有个人提案立案
+                proposalCount = proposalInfos.stream().filter(e -> e.getProposalUserId().equals(userId) && e.getIsJointly().equals(ONE) && !ONE.equals(e.getProposalProgress()) && !THR.equals(e.getProposalProgress())).count();
+                if (proposalCount > 0) {
+                    //获取对应类型的分值
+                    assessmentScore = zxAssessments.stream().filter(e -> "assessment_proposal".equals(e.getAssessmentProjectId()) && ONE.equals(e.getAssessmentTypeId())).collect(Collectors.toList())
+                            .get(0).getAssessmentScore();
+                    //计算当前分数
+                    nowScore = nowScore + proposalCount * assessmentScore;
+                }
+                //当前分数小于上限值,继续找下一个条件
+                if (nowScore < assessmentTotal) {
+                    //查询这个人是否有个人提案未立案
+                    proposalCount = proposalInfos.stream().filter(e -> e.getProposalUserId().equals(userId) && e.getIsJointly().equals(ONE) && (ONE.equals(e.getProposalProgress()) || THR.equals(e.getProposalProgress()))).count();
+                    if (proposalCount > 0) {
+                        //获取对应类型的分值
+                        assessmentScore = zxAssessments.stream().filter(e -> "assessment_proposal".equals(e.getAssessmentProjectId()) && TWO.equals(e.getAssessmentTypeId())).collect(Collectors.toList())
+                                .get(0).getAssessmentScore();
+                        //计算当前分数
+                        nowScore = nowScore + proposalCount * assessmentScore;
+                    }
+                }
+                //当前分数小于上限值,继续找下一个条件
+                if (nowScore < assessmentTotal) {
+                    //查询这个人是否有联名提案、集体提案立案的,第一提案人,召集人
+                    proposalCount = proposalInfos.stream().filter(e -> e.getProposalUserId().equals(userId) && "0".equals(e.getIsJointly()) && !ONE.equals(e.getProposalProgress()) && !THR.equals(e.getProposalProgress())).count();
+                    if (proposalCount > 0) {
+                        //获取对应类型的分值
+                        assessmentScore = zxAssessments.stream().filter(e -> "assessment_proposal".equals(e.getAssessmentProjectId()) && THR.equals(e.getAssessmentTypeId())).collect(Collectors.toList())
+                                .get(0).getAssessmentScore();
+                        //计算当前分数
+                        nowScore = nowScore + proposalCount * assessmentScore;
+                    }
+                }
+                //当前分数小于上限值,继续找下一个条件
+                if (nowScore < assessmentTotal) {
+                    //查询这个人是否有联名提案、集体提案立案的,其余联名、参与者
+                    proposalCount = proposalInfos.stream().filter(e -> !e.getProposalUserId().equals(userId) && "0".equals(e.getIsJointly()) && !ONE.equals(e.getProposalProgress()) && !THR.equals(e.getProposalProgress())).count();
+                    if (proposalCount > 0) {
+                        //获取对应类型的分值
+                        assessmentScore = zxAssessments.stream().filter(e -> "assessment_proposal".equals(e.getAssessmentProjectId()) && FOR.equals(e.getAssessmentTypeId())).collect(Collectors.toList())
+                                .get(0).getAssessmentScore();
+                        //计算当前分数
+                        nowScore = nowScore + proposalCount * assessmentScore;
+                    }
+                }
+                //当前分数小于上限值,继续找下一个条件
+                if (nowScore < assessmentTotal) {
+                    //查询这个人是否有未立案联名提案、集体提案参与者
+                    proposalCount = proposalInfos.stream().filter(e -> !e.getProposalUserId().equals(userId) && "0".equals(e.getIsJointly()) && (ONE.equals(e.getProposalProgress()) || THR.equals(e.getProposalProgress()))).count();
+                    if (proposalCount > 0) {
+                        //获取对应类型的分值
+                        assessmentScore = zxAssessments.stream().filter(e -> "assessment_proposal".equals(e.getAssessmentProjectId()) && FOR.equals(e.getAssessmentTypeId())).collect(Collectors.toList())
+                                .get(0).getAssessmentScore();
+                        //计算当前分数
+                        nowScore = nowScore + proposalCount * assessmentScore;
+                    }
+                }
+                if (nowScore > assessmentTotal) {
+                    nowScore = assessmentTotal;
+                }
+                map.put("proposalInfoScore", nowScore);
+            }
+            //计算社情民义的分值
+            if (sqmyInfos != null && sqmyInfos.size() > 0) {
+                //获取分值上限
+                assessmentTotal = zxAssessments.stream().filter(e -> "proposal_sqmy".equals(e.getAssessmentProjectId()) && 0 == e.getParentId()).collect(Collectors.toList())
+                        .get(0).getAssessmentTotal();
+                //定义当前分数
+                nowScore = 0L;
+                //查询这个人撰写并上报社情民意信息,被采用
+                proposalCount = sqmyInfos.stream().filter(e -> e.getSqmyUserId().equals(userId) && "0".equals(e.getIsRecord())).count();
+                if (proposalCount > 0) {
+                    //获取对应类型的分值
+                    assessmentScore = zxAssessments.stream().filter(e -> "proposal_sqmy".equals(e.getAssessmentProjectId()) && ONE.equals(e.getAssessmentTypeId())).collect(Collectors.toList())
+                            .get(0).getAssessmentScore();
+                    //计算当前分数
+                    nowScore = nowScore + proposalCount * assessmentScore;
+                }
+                //当前分数小于上限值,继续找下一个条件
+                if (nowScore < assessmentTotal) {
+                    //查询这个人撰写并上报社情民意信息,未采用
+                    proposalCount = sqmyInfos.stream().filter(e -> e.getSqmyUserId().equals(userId) && ONE.equals(e.getIsRecord())).count();
+                    if (proposalCount > 0) {
+                        //获取对应类型的分值
+                        assessmentScore = zxAssessments.stream().filter(e -> "proposal_sqmy".equals(e.getAssessmentProjectId()) && TWO.equals(e.getAssessmentTypeId())).collect(Collectors.toList())
+                                .get(0).getAssessmentScore();
+                        //计算当前分数
+                        nowScore = nowScore + proposalCount * assessmentScore;
+                    }
+                }
+                if (nowScore > assessmentTotal) {
+                    nowScore = assessmentTotal;
+                }
+                map.put("sqmyInfoScore", nowScore);
+            }
+            //计算会议分值
+            if (zxConferences != null && zxConferences.size() > 0) {
+                //查询会议默认所有人一开始的20分,缺勤扣分
+                //获取分值上限
+                assessmentTotal = zxAssessments.stream().filter(e -> "assessment_conference".equals(e.getAssessmentProjectId()) && 0 == e.getParentId()).collect(Collectors.toList())
+                        .get(0).getAssessmentTotal();
+                //定义当前分数
+                nowScore = 0L;
+                //查询这个人是否有全体会议期间,无故缺席大会或分组讨论
+                List<ZxConference> collect = zxConferences.stream().filter(e -> e.getConferenceType().equals(ONE)).collect(Collectors.toList());
+                if (collect.size() > 0) {
+                    for (ZxConference conference : collect) {
+                        List<ZxConferenceUser> zxConferenceUserList = conference.getZxConferenceUserList();
+                        if (zxConferenceUserList != null && zxConferenceUserList.size() > 0) {
+                            //获取到不参加会议的数量
+                            proposalCount = proposalCount + zxConferenceUserList.stream().filter(e -> "N".equals(e.getIsJoin())).count();
+                        }
+                    }
+                    if (proposalCount > 0) {
+                        //获取对应类型的分值
+                        assessmentScore = zxAssessments.stream().filter(e -> "assessment_conference".equals(e.getAssessmentProjectId()) && ONE.equals(e.getAssessmentTypeId())).collect(Collectors.toList())
+                                .get(0).getAssessmentScore();
+                        //计算当前分数
+                        nowScore = nowScore + proposalCount * assessmentScore;
+                    }
+                }
+                //查询这个人是否无故缺席市政协办公室,各专委会,各界别组织召开的其他会议和学习培训活动
+                List<ZxConference> collectTwo = zxConferences.stream().filter(e -> !e.getConferenceType().equals(ONE)).collect(Collectors.toList());
+                if (collectTwo.size() > 0) {
+                    for (ZxConference conference : collectTwo) {
+                        List<ZxConferenceUser> zxConferenceUserList = conference.getZxConferenceUserList();
+                        if (zxConferenceUserList != null && zxConferenceUserList.size() > 0) {
+                            //获取到不参加会议的数量
+                            proposalCount = proposalCount + zxConferenceUserList.stream().filter(e -> "N".equals(e.getIsJoin())).count();
+                        }
+                    }
+                    if (proposalCount > 0) {
+                        //获取对应类型的分值
+                        assessmentScore = zxAssessments.stream().filter(e -> "assessment_conference".equals(e.getAssessmentProjectId()) && TWO.equals(e.getAssessmentTypeId())).collect(Collectors.toList())
+                                .get(0).getAssessmentScore();
+                        //计算当前分数
+                        nowScore = nowScore + proposalCount * assessmentScore;
+                    }
+                }
+                //判断分是否扣完
+                nowScore = assessmentTotal + nowScore;
+                if (nowScore < 0) {
+                    nowScore = 0;
+                }
+                map.put("sqmyInfoScore", nowScore);
+            }
+            //计算活动分值
+            if (zxActivities != null && zxActivities.size() > 0) {
+                //定义当前分数
+                nowScore = 0L;
+                //先去查询是否有学习培训活动未参加
+                List<ZxActivity> collect = zxActivities.stream().filter(e -> e.getActivityType().equals(ONE)).collect(Collectors.toList());
+                if (collect.size() > 0) {
+                    for (ZxActivity activity : collect) {
+                        List<ZxActivityUser> zxActivityUserList = activity.getZxActivityUserList();
+                        if (zxActivityUserList != null && zxActivityUserList.size() > 0) {
+                            //获取到不参加会议的数量
+                            proposalCount = proposalCount + zxActivityUserList.stream().filter(e -> "N".equals(e.getIsJoin())).count();
+                        }
+                    }
+                    if (proposalCount > 0) {
+                        //获取对应类型的分值
+                        assessmentScore = zxAssessments.stream().filter(e -> "assessment_conference".equals(e.getAssessmentProjectId()) && TWO.equals(e.getAssessmentTypeId())).collect(Collectors.toList())
+                                .get(0).getAssessmentScore();
+                        //计算当前分数
+                        nowScore = nowScore + proposalCount * assessmentScore;
+                    }
+                    Object sqmyInfoScore = map.get("sqmyInfoScore");
+                    if (Integer.parseInt(sqmyInfoScore.toString()) > 0) {
+                        //判断分是否扣完
+                        nowScore = assessmentTotal + nowScore;
+                        if (nowScore < 0) {
+                            nowScore = 0;
+                        }
+                        map.put("sqmyInfoScore", nowScore);
+                    }
+                }
+                nowScore = 0L;
+                //获取分值上限
+                assessmentTotal = zxAssessments.stream().filter(e -> "assessment_activity".equals(e.getAssessmentProjectId()) && 0 == e.getParentId()).collect(Collectors.toList())
+                        .get(0).getAssessmentTotal();
+                //获取所有活动设置的子类分项
+                List<ZxAssessment> collectZxAssessment = zxAssessments.stream().filter(e -> "assessment_activity".equals(e.getAssessmentProjectId()) && 0 != e.getParentId()).collect(Collectors.toList());
+                if (collectZxAssessment.size() > 0) {
+                    for (ZxAssessment zxAssessment : collectZxAssessment) {
+                        //获取到的对应活动分数
+                        Long assessmentScore1 = zxAssessment.getAssessmentScore();
+                        //判断是否参加过对应活动
+                        String assessmentTypeId = zxAssessment.getAssessmentTypeId();
+                        //获取参与数量
+                        proposalCount = zxActivities.stream().filter(e -> e.getActivityType().equals(assessmentTypeId)).count();
+                        if (proposalCount > 0) {
+                            nowScore = nowScore + assessmentScore1;
+                        }
+                    }
+                    if (nowScore > assessmentTotal) {
+                        nowScore = assessmentTotal;
+                    }
+                    map.put("activityScore", nowScore);
+                }
+            }
+            //计算加分
+            ZxBonus zxBonus = new ZxBonus();
+            zxBonus.setUserId(userId);
+            List<ZxBonus> zxBonuses = zxBonusMapper.selectZxBonusList(zxBonus);
+            if (zxBonuses != null && zxBonuses.size() > 0){
+                long zxBonusNum = zxBonuses.stream().filter(e -> e.getScore() != null).mapToLong(BaseEntity::getScore).sum();
+                map.put("zxBonusScore",zxBonusNum);
+            }
+        }
         memberInfoVo.setMap(map);
         return memberInfoVo;
     }
 
     /**
      * 查询委员信息列表
-     * 
+     *
      * @param memberInfo 委员信息
      * @return 委员信息
      */
     @Override
-    public List<MemberInfo> selectMemberInfoList(MemberInfo memberInfo)
-    {
+    public List<MemberInfo> selectMemberInfoList(MemberInfo memberInfo) {
         return memberInfoMapper.selectMemberInfoList(memberInfo);
     }
 
@@ -146,9 +407,9 @@ public class MemberInfoServiceImpl implements IMemberInfoService
     public List<MemberInfoTree> buildMemberInfoTreeSelect(List<MemberInfo> memberInfo) {
         //查询字典值,政协委员级别
         List<MemberInfoTree> memberInfoTreeList = new ArrayList<>();
-        if (memberInfo != null && memberInfo.size() >0){
+        if (memberInfo != null && memberInfo.size() > 0) {
             List<SysDictData> dictDataList = dictDataMapper.selectDictDataByType("grade");
-            if (dictDataList !=null && dictDataList.size() >0){
+            if (dictDataList != null && dictDataList.size() > 0) {
                 for (SysDictData sysDictData : dictDataList) {
                     MemberInfoTree memberInfoTree = new MemberInfoTree();
                     memberInfoTree.setUserId(sysDictData.getDictValue());
@@ -160,7 +421,7 @@ public class MemberInfoServiceImpl implements IMemberInfoService
                     String id = memberInfoTree.getUserId();
                     List<MemberInfo> memberInfoList = new ArrayList<>();
                     for (MemberInfo info : memberInfo) {
-                        if (info.getGrade().contains(id)){
+                        if (info.getGrade().contains(id)) {
                             memberInfoList.add(info);
                         }
                     }
@@ -173,13 +434,12 @@ public class MemberInfoServiceImpl implements IMemberInfoService
 
     /**
      * 新增委员信息
-     * 
+     *
      * @param memberInfo 委员信息
      * @return 结果
      */
     @Override
-    public int insertMemberInfo(MemberInfo memberInfo)
-    {
+    public int insertMemberInfo(MemberInfo memberInfo) {
         memberInfo.setUserId(SecurityUtils.getUserId());
         memberInfo.setCreateTime(DateUtils.getNowDate());
         return memberInfoMapper.insertMemberInfo(memberInfo);
@@ -187,38 +447,35 @@ public class MemberInfoServiceImpl implements IMemberInfoService
 
     /**
      * 修改委员信息
-     * 
+     *
      * @param memberInfo 委员信息
      * @return 结果
      */
     @Override
-    public int updateMemberInfo(MemberInfo memberInfo)
-    {
+    public int updateMemberInfo(MemberInfo memberInfo) {
         memberInfo.setUpdateTime(DateUtils.getNowDate());
         return memberInfoMapper.updateMemberInfo(memberInfo);
     }
 
     /**
      * 批量删除委员信息
-     * 
+     *
      * @param memberIds 需要删除的委员信息主键
      * @return 结果
      */
     @Override
-    public int deleteMemberInfoByMemberIds(Long[] memberIds)
-    {
+    public int deleteMemberInfoByMemberIds(Long[] memberIds) {
         return memberInfoMapper.deleteMemberInfoByMemberIds(memberIds);
     }
 
     /**
      * 删除委员信息信息
-     * 
+     *
      * @param memberId 委员信息主键
      * @return 结果
      */
     @Override
-    public int deleteMemberInfoByMemberId(Long memberId)
-    {
+    public int deleteMemberInfoByMemberId(Long memberId) {
         return memberInfoMapper.deleteMemberInfoByMemberId(memberId);
     }
 }

+ 35 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZxActivityServiceImpl.java

@@ -3,10 +3,13 @@ package com.ruoyi.system.service.impl;
 
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.domain.ZxFj;
 import com.ruoyi.system.domain.activity.ZxActivity;
 import com.ruoyi.system.domain.activity.ZxActivityUser;
 import com.ruoyi.system.domain.conference.ZxConference;
 import com.ruoyi.system.domain.conference.ZxConferenceUser;
+import com.ruoyi.system.domain.notice.ZxNotice;
+import com.ruoyi.system.mapper.ZxFjMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.common.utils.StringUtils;
@@ -17,6 +20,8 @@ import com.ruoyi.system.service.IZxActivityService;
 import java.util.ArrayList;
 import java.util.List;
 
+import static com.ruoyi.common.constant.CommonConstants.THR;
+
 /**
  * 政协活动Service业务层处理
  *
@@ -28,6 +33,9 @@ public class ZxActivityServiceImpl implements IZxActivityService {
     @Autowired
     private ZxActivityMapper zxActivityMapper;
 
+    @Autowired
+    private ZxFjMapper zxFjMapper;
+
     /**
      * 查询政协活动
      *
@@ -95,6 +103,7 @@ public class ZxActivityServiceImpl implements IZxActivityService {
         zxActivity.setCreateTime(DateUtils.getNowDate());
         int rows = zxActivityMapper.insertZxActivity(zxActivity);
         insertZxActivityUser(zxActivity);
+        insertZxFj(zxActivity);
         return rows;
     }
 
@@ -118,7 +127,9 @@ public class ZxActivityServiceImpl implements IZxActivityService {
     public int updateZxActivity(ZxActivity zxActivity) {
         zxActivity.setUpdateTime(DateUtils.getNowDate());
         zxActivityMapper.deleteZxActivityUserByActivityId(zxActivity.getActivityId());
+        zxFjMapper.deleteZxFjBySourceId(zxActivity.getActivityId());
         insertZxActivityUser(zxActivity);
+        insertZxFj(zxActivity);
         return zxActivityMapper.updateZxActivity(zxActivity);
     }
 
@@ -167,4 +178,28 @@ public class ZxActivityServiceImpl implements IZxActivityService {
             }
         }
     }
+
+    /**
+     * 新增活动附件关联信息
+     */
+    public void insertZxFj(ZxActivity zxActivity)
+    {
+        List<ZxFj> zxFjListFj = zxActivity.getZxFjListFj();
+        Long activityId = zxActivity.getActivityId();
+        if (StringUtils.isNotNull(zxFjListFj))
+        {
+            List<ZxFj> list = new ArrayList<ZxFj>();
+            for (ZxFj zxFj : zxFjListFj)
+            {
+                zxFj.setType(THR);
+                zxFj.setMainId(activityId);
+                zxFj.setSourceId(activityId);
+                list.add(zxFj);
+            }
+            if (list.size() > 0)
+            {
+                zxFjMapper.batchZxFj(list);
+            }
+        }
+    }
 }

+ 5 - 5
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZxAssessmentServiceImpl.java

@@ -58,12 +58,12 @@ public class ZxAssessmentServiceImpl implements IZxAssessmentService
     @Override
     public int insertZxAssessment(ZxAssessment zxAssessment)
     {
-        ZxAssessment info = zxAssessmentMapper.selectZxAssessmentByAssessmentId(zxAssessment.getAssessmentId());
+/*        ZxAssessment info = zxAssessmentMapper.selectZxAssessmentByAssessmentId(zxAssessment.getAssessmentId());
         // 如果父节点不为正常状态,则不允许新增子节点
         if (!UserConstants.YES.equals(info.getIsUse()))
         {
             throw new ServiceException("停用,不允许新增");
-        }
+        }*/
         zxAssessment.setCreateTime(DateUtils.getNowDate());
         return zxAssessmentMapper.insertZxAssessment(zxAssessment);
     }
@@ -76,9 +76,9 @@ public class ZxAssessmentServiceImpl implements IZxAssessmentService
      */
     @Override
     public boolean checkAssessmentProjectUnique(ZxAssessment zxAssessment) {
-        Long assessmentId = StringUtils.isNull(zxAssessment.getAssessmentId()) ? -1L : zxAssessment.getAssessmentId();
-        ZxAssessment info = zxAssessmentMapper.checkAssessmentProjectUnique(zxAssessment.getAssessmentProject(), zxAssessment.getParentId());
-        if (StringUtils.isNotNull(info) && info.getAssessmentId().longValue() != assessmentId.longValue())
+        String assessmentTypeId = StringUtils.isNull(zxAssessment.getAssessmentTypeId()) ? "-1" : zxAssessment.getAssessmentTypeId();
+        ZxAssessment info = zxAssessmentMapper.checkAssessmentProjectUnique(assessmentTypeId, zxAssessment.getParentId());
+        if (StringUtils.isNotNull(info) && !info.getAssessmentTypeId().equals(assessmentTypeId))
         {
             return UserConstants.NOT_UNIQUE;
         }

+ 36 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZxConferenceServiceImpl.java

@@ -5,8 +5,11 @@ import com.ruoyi.common.config.RuoYiConfig;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.QRCodeUtils;
 import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.domain.ZxFj;
 import com.ruoyi.system.domain.conference.ZxConference;
 import com.ruoyi.system.domain.conference.ZxConferenceUser;
+import com.ruoyi.system.domain.notice.ZxNotice;
+import com.ruoyi.system.mapper.ZxFjMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.common.utils.StringUtils;
@@ -17,6 +20,9 @@ import com.ruoyi.system.service.IZxConferenceService;
 import java.util.ArrayList;
 import java.util.List;
 
+import static com.ruoyi.common.constant.CommonConstants.FOR;
+import static com.ruoyi.common.constant.CommonConstants.THR;
+
 /**
  * 政协会议活动Service业务层处理
  *
@@ -27,6 +33,8 @@ import java.util.List;
 public class ZxConferenceServiceImpl implements IZxConferenceService {
     @Autowired
     private ZxConferenceMapper zxConferenceMapper;
+    @Autowired
+    private ZxFjMapper zxFjMapper;
 
     /**
      * 查询政协会议活动
@@ -99,6 +107,7 @@ public class ZxConferenceServiceImpl implements IZxConferenceService {
         zxConference.setCreateTime(DateUtils.getNowDate());
         int rows = zxConferenceMapper.insertZxConference(zxConference);
         insertZxConferenceUser(zxConference);
+        insertZxFj(zxConference);
         try {
             String imagePath= QRCodeUtils.encode(zxConference.getConferenceId().toString(), null, RuoYiConfig.getUploadQrPath(), true);
             zxConference.setConferenceQr(imagePath);
@@ -121,7 +130,9 @@ public class ZxConferenceServiceImpl implements IZxConferenceService {
         //todo 给参会人员发送短信
         zxConference.setUpdateTime(DateUtils.getNowDate());
         zxConferenceMapper.deleteZxConferenceUserByConferenceId(zxConference.getConferenceId());
+        zxFjMapper.deleteZxFjBySourceId(zxConference.getConferenceId());
         insertZxConferenceUser(zxConference);
+        insertZxFj(zxConference);
         return zxConferenceMapper.updateZxConference(zxConference);
     }
 
@@ -179,4 +190,29 @@ public class ZxConferenceServiceImpl implements IZxConferenceService {
             }
         }
     }
+
+    /**
+     * 新增政协会议附件关联信息
+     *
+     */
+    public void insertZxFj(ZxConference zxConference)
+    {
+        List<ZxFj> zxFjListFj = zxConference.getZxFjListFj();
+        Long conferenceId = zxConference.getConferenceId();
+        if (StringUtils.isNotNull(zxFjListFj))
+        {
+            List<ZxFj> list = new ArrayList<ZxFj>();
+            for (ZxFj zxFj : zxFjListFj)
+            {
+                zxFj.setType(FOR);
+                zxFj.setMainId(conferenceId);
+                zxFj.setSourceId(conferenceId);
+                list.add(zxFj);
+            }
+            if (list.size() > 0)
+            {
+                zxFjMapper.batchZxFj(list);
+            }
+        }
+    }
 }

+ 6 - 0
ruoyi-system/src/main/resources/mapper/system/ProposalInfoMapper.xml

@@ -56,6 +56,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isAgree"    column="isAgree"    />
         <result property="deptId"    column="deptId"    />
         <result property="dwType"    column="dwType"    />
+        <collection  property="proposalUserList"   javaType="java.util.List"  resultMap="ProposalUserResult" />
+    </resultMap>
+
+    <resultMap type="ProposalUser" id="ProposalUserResult">
+        <result property="isAgree"    column="is_agree"    />
     </resultMap>
 
     <sql id="selectProposalInfoVo">
@@ -127,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>
         <if test="isAgree != null  and isAgree != ''"> and u.is_agree = #{isAgree}</if>
         <if test="type != null  and type != ''"> and u.type = #{type}</if>
+        <if test="userId != null  "> and u.user_id = #{userId}</if>
         <if test="proposalNumber != null  and proposalNumber != ''"> and p.proposal_number = #{proposalNumber}</if>
         <if test="title != null  and title != ''"> and p.title = #{title}</if>
         <if test="proposalName != null  and proposalName != ''"> and p.proposal_name like concat('%', #{proposalName}, '%')</if>

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml

@@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
 			</if>
 	    </where>
+		order by create_time desc
 	</select>
 	
 	<select id="selectDictTypeAll" resultMap="SysDictTypeResult">

+ 20 - 4
ruoyi-system/src/main/resources/mapper/system/ZxActivityMapper.xml

@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap id="ZxActivityZxActivityUserResult" type="ZxActivity" extends="ZxActivityResult">
         <collection property="zxActivityUserList" notNullColumn="sub_activity_id" javaType="java.util.List" resultMap="ZxActivityUserResult" />
+        <collection property="zxFjListFj" notNullColumn="fj_source_id" javaType="java.util.List" resultMap="ZxFjResult" />
     </resultMap>
 
     <resultMap type="ZxActivityUser" id="ZxActivityUserResult">
@@ -44,16 +45,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="remark"    column="sub_remark"    />
     </resultMap>
 
+    <resultMap type="ZxFj" id="ZxFjResult">
+        <result property="id"    column="fj_id"    />
+        <result property="mainId"    column="fj_main_id"    />
+        <result property="sourceId"    column="fj_source_id"    />
+        <result property="name"    column="fj_name"    />
+        <result property="url"    column="fj_url"    />
+        <result property="type"    column="fj_type"    />
+        <result property="stytle"    column="fj_stytle"    />
+        <result property="remark"    column="fj_remark"    />
+    </resultMap>
+
     <sql id="selectZxActivityVo">
         select activity_id, activity_title, activity_date, activity_time, activity_address, activity_type, activity_details, publish_time, publish_dept, publish_dept_id, create_by, create_time, update_by, update_time, remark from zx_activity
     </sql>
 
-    <select id="selectZxActivityList" parameterType="ZxActivity" resultMap="ZxActivityResult">
+    <select id="selectZxActivityList" parameterType="ZxActivity" resultMap="ZxActivityZxActivityUserResult">
         select a.activity_id, a.activity_title, a.activity_date, a.activity_time, a.activity_address, a.activity_type, a.activity_details, a.publish_time, a.publish_dept, a.publish_dept_id, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
-        b.activity_id as sub_activity_id, b.user_id as sub_user_id, b.user_name as sub_user_name, b.post_name as sub_post_name, b.user_level as sub_user_level, b.reply_time as sub_reply_time, b.is_join as sub_is_join, b.leave_type as sub_leave_type, b.leave_reason as sub_leave_reason, b.sign_in as sub_sign_in, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark
+        b.activity_id as sub_activity_id, b.user_id as sub_user_id, b.user_name as sub_user_name, b.post_name as sub_post_name, b.user_level as sub_user_level, b.reply_time as sub_reply_time, b.is_join as sub_is_join, b.leave_type as sub_leave_type, b.leave_reason as sub_leave_reason, b.sign_in as sub_sign_in, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark,
+        f.id as fj_id,f.main_id as fj_main_id, f.source_id as fj_source_id, f.name as fj_name, f.url as fj_url, f.type as fj_type,f.stytle as fj_stytle
         from zx_activity a
         left join zx_activity_user b on b.activity_id = a.activity_id
-        <where>  
+        left join zx_fj f on f.source_id = a.activity_id
+        <where>
             <if test="activityTitle != null  and activityTitle != ''"> and a.activity_title = #{activityTitle}</if>
             <if test="activityDate != null "> and a.activity_date = #{activityDate}</if>
             <if test="activityTime != null  and activityTime != ''"> and a.activity_time = #{activityTime}</if>
@@ -73,9 +87,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <select id="selectZxActivityByActivityId" parameterType="Long" resultMap="ZxActivityZxActivityUserResult">
         select a.activity_id, a.activity_title, a.activity_date, a.activity_time, a.activity_address, a.activity_type, a.activity_details, a.publish_time, a.publish_dept, a.publish_dept_id, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
- b.activity_id as sub_activity_id, b.user_id as sub_user_id, b.user_name as sub_user_name, b.post_name as sub_post_name, b.user_level as sub_user_level, b.reply_time as sub_reply_time, b.is_join as sub_is_join, b.leave_type as sub_leave_type, b.leave_reason as sub_leave_reason, b.sign_in as sub_sign_in, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark
+        b.activity_id as sub_activity_id, b.user_id as sub_user_id, b.user_name as sub_user_name, b.post_name as sub_post_name, b.user_level as sub_user_level, b.reply_time as sub_reply_time, b.is_join as sub_is_join, b.leave_type as sub_leave_type, b.leave_reason as sub_leave_reason, b.sign_in as sub_sign_in, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark,
+        f.id as fj_id,f.main_id as fj_main_id, f.source_id as fj_source_id, f.name as fj_name, f.url as fj_url, f.type as fj_type,f.stytle as fj_stytle
         from zx_activity a
         left join zx_activity_user b on b.activity_id = a.activity_id
+        left join zx_fj f on f.source_id = a.activity_id
         where a.activity_id = #{activityId}
     </select>
     <select id="selectZxActivityUserByActivityId" resultMap="ZxActivityUserResult">

+ 12 - 2
ruoyi-system/src/main/resources/mapper/system/ZxAssessmentMapper.xml

@@ -9,8 +9,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="parentId"    column="parent_id"    />
         <result property="ancestors"    column="ancestors"    />
         <result property="assessmentProject"    column="assessment_project"    />
+        <result property="assessmentProjectId"    column="assessment_project_id"    />
         <result property="assessmentStandard"    column="assessment_standard"    />
         <result property="assessmentType"    column="assessment_type"    />
+        <result property="assessmentTypeId"    column="assessment_type_id"    />
         <result property="assessmentTotal"    column="assessment_total"    />
         <result property="scoreType"    column="score_type"    />
         <result property="assessmentScore"    column="assessment_score"    />
@@ -25,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectZxAssessmentVo">
-        select assessment_id, parent_id, ancestors, assessment_project, assessment_standard, assessment_type, assessment_total, score_type, assessment_score, assessment_count, assessment_explain, is_use, create_by, create_time, update_by, update_time, remark from zx_assessment
+        select assessment_id, parent_id, ancestors, assessment_project,assessment_project_id,assessment_type_id, assessment_standard, assessment_type, assessment_total, score_type, assessment_score, assessment_count, assessment_explain, is_use, create_by, create_time, update_by, update_time, remark from zx_assessment
     </sql>
 
     <select id="selectZxAssessmentList" parameterType="ZxAssessment" resultMap="ZxAssessmentResult">
@@ -34,8 +36,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="parentId != null "> and parent_id = #{parentId}</if>
             <if test="ancestors != null  and ancestors != ''"> and ancestors = #{ancestors}</if>
             <if test="assessmentProject != null  and assessmentProject != ''"> and assessment_project = #{assessmentProject}</if>
+            <if test="assessmentProjectId != null  and assessmentProjectId != ''"> and assessment_project_id = #{assessmentProjectId}</if>
             <if test="assessmentStandard != null  and assessmentStandard != ''"> and assessment_standard = #{assessmentStandard}</if>
             <if test="assessmentType != null  and assessmentType != ''"> and assessment_type = #{assessmentType}</if>
+            <if test="assessmentTypeId != null  and assessmentTypeId != ''"> and assessment_type_id = #{assessmentTypeId}</if>
             <if test="assessmentTotal != null  and assessmentTotal != ''"> and assessment_total = #{assessmentTotal}</if>
             <if test="scoreType != null  and scoreType != ''"> and score_type = #{scoreType}</if>
             <if test="assessmentScore != null  and assessmentScore != ''"> and assessment_score = #{assessmentScore}</if>
@@ -51,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     <select id="checkAssessmentProjectUnique" resultMap="ZxAssessmentResult">
         <include refid="selectZxAssessmentVo"/>
-        where assessment_project = #{assessmentProject} and and parent_id = #{parentId} and is_use = 'Y' limit 1
+        where assessment_type_id = #{assessmentTypeId} and  parent_id = #{parentId} and is_use = 'Y' limit 1
     </select>
 
     <insert id="insertZxAssessment" parameterType="ZxAssessment" useGeneratedKeys="true" keyProperty="assessmentId">
@@ -60,8 +64,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="parentId != null">parent_id,</if>
             <if test="ancestors != null">ancestors,</if>
             <if test="assessmentProject != null and assessmentProject != ''">assessment_project,</if>
+            <if test="assessmentProjectId != null and assessmentProjectId != ''">assessment_project_id,</if>
             <if test="assessmentStandard != null and assessmentStandard != ''">assessment_standard,</if>
             <if test="assessmentType != null and assessmentType != ''">assessment_type,</if>
+            <if test="assessmentTypeId != null and assessmentTypeId != ''">assessment_type_id,</if>
             <if test="assessmentTotal != null and assessmentTotal != ''">assessment_total,</if>
             <if test="scoreType != null and scoreType != ''">score_type,</if>
             <if test="assessmentScore != null and assessmentScore != ''">assessment_score,</if>
@@ -78,8 +84,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="parentId != null">#{parentId},</if>
             <if test="ancestors != null">#{ancestors},</if>
             <if test="assessmentProject != null and assessmentProject != ''">#{assessmentProject},</if>
+            <if test="assessmentProjectId != null and assessmentProjectId != ''">#{assessmentProjectId},</if>
             <if test="assessmentStandard != null and assessmentStandard != ''">#{assessmentStandard},</if>
             <if test="assessmentType != null and assessmentType != ''">#{assessmentType},</if>
+            <if test="assessmentTypeId != null and assessmentTypeId != ''">#{assessmentTypeId},</if>
             <if test="assessmentTotal != null and assessmentTotal != ''">#{assessmentTotal},</if>
             <if test="scoreType != null and scoreType != ''">#{scoreType},</if>
             <if test="assessmentScore != null and assessmentScore != ''">#{assessmentScore},</if>
@@ -100,8 +108,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="parentId != null">parent_id = #{parentId},</if>
             <if test="ancestors != null">ancestors = #{ancestors},</if>
             <if test="assessmentProject != null and assessmentProject != ''">assessment_project = #{assessmentProject},</if>
+            <if test="assessmentProjectId != null and assessmentProjectId != ''">assessment_project_id = #{assessmentProjectId},</if>
             <if test="assessmentStandard != null and assessmentStandard != ''">assessment_standard = #{assessmentStandard},</if>
             <if test="assessmentType != null and assessmentType != ''">assessment_type = #{assessmentType},</if>
+            <if test="assessmentTypeId != null and assessmentTypeId != ''">assessment_type_id = #{assessmentTypeId},</if>
             <if test="assessmentTotal != null and assessmentTotal != ''">assessment_total = #{assessmentTotal},</if>
             <if test="scoreType != null and scoreType != ''">score_type = #{scoreType},</if>
             <if test="assessmentScore != null and assessmentScore != ''">assessment_score = #{assessmentScore},</if>

+ 19 - 3
ruoyi-system/src/main/resources/mapper/system/ZxConferenceMapper.xml

@@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap id="ZxConferenceZxConferenceUserResult" type="ZxConference" extends="ZxConferenceResult">
         <collection property="zxConferenceUserList" notNullColumn="sub_conference_id" javaType="java.util.List" resultMap="ZxConferenceUserResult" />
+        <collection property="zxFjListFj" notNullColumn="fj_source_id" javaType="java.util.List" resultMap="ZxFjResult" />
     </resultMap>
 
     <resultMap type="ZxConferenceUser" id="ZxConferenceUserResult">
@@ -43,15 +44,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="remark"    column="sub_remark"    />
     </resultMap>
 
+    <resultMap type="ZxFj" id="ZxFjResult">
+        <result property="id"    column="fj_id"    />
+        <result property="mainId"    column="fj_main_id"    />
+        <result property="sourceId"    column="fj_source_id"    />
+        <result property="name"    column="fj_name"    />
+        <result property="url"    column="fj_url"    />
+        <result property="type"    column="fj_type"    />
+        <result property="stytle"    column="fj_stytle"    />
+        <result property="remark"    column="fj_remark"    />
+    </resultMap>
+
     <sql id="selectZxConferenceVo">
         select conference_id, conference_title, conference_date,conference_type, conference_time, conference_address, publish_time,conference_qr, create_by, create_time, update_by, update_time, remark from zx_conference
     </sql>
 
-    <select id="selectZxConferenceList" parameterType="ZxConference" resultMap="ZxConferenceResult">
+    <select id="selectZxConferenceList" parameterType="ZxConference" resultMap="ZxConferenceZxConferenceUserResult">
         select a.conference_id, a.conference_title, a.conference_date,a.conference_type, a.conference_time, a.conference_address, a.publish_time,a.conference_qr, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
-        b.conference_id as sub_conference_id, b.user_id as sub_user_id, b.user_name as sub_user_name, b.post_name as sub_post_name, b.user_level as sub_user_level, b.reply_time as sub_reply_time, b.is_join as sub_is_join, b.leave_type as sub_leave_type, b.leave_reason as sub_leave_reason,b.sign_in as sub_sign_in, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark
+        b.conference_id as sub_conference_id, b.user_id as sub_user_id, b.user_name as sub_user_name, b.post_name as sub_post_name, b.user_level as sub_user_level, b.reply_time as sub_reply_time, b.is_join as sub_is_join, b.leave_type as sub_leave_type, b.leave_reason as sub_leave_reason,b.sign_in as sub_sign_in, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark,
+        f.id as fj_id,f.main_id as fj_main_id, f.source_id as fj_source_id, f.name as fj_name, f.url as fj_url, f.type as fj_type,f.stytle as fj_stytle
         from zx_conference a
         left join zx_conference_user b on b.conference_id = a.conference_id
+        left join zx_fj f on f.source_id = a.conference_id
         <where>  
             <if test="conferenceTitle != null  and conferenceTitle != ''"> and a.conference_title = #{conferenceTitle}</if>
             <if test="conferenceDate != null "> and a.conference_date = #{conferenceDate}</if>
@@ -68,9 +82,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <select id="selectZxConferenceByConferenceId" parameterType="Long" resultMap="ZxConferenceZxConferenceUserResult">
         select a.conference_id, a.conference_title,a.conference_qr,a.conference_type, a.conference_date, a.conference_time, a.conference_address, a.publish_time, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
- b.conference_id as sub_conference_id, b.user_id as sub_user_id, b.user_name as sub_user_name, b.post_name as sub_post_name, b.user_level as sub_user_level, b.reply_time as sub_reply_time, b.is_join as sub_is_join, b.leave_type as sub_leave_type, b.leave_reason as sub_leave_reason,b.sign_in as sub_sign_in, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark
+ b.conference_id as sub_conference_id, b.user_id as sub_user_id, b.user_name as sub_user_name, b.post_name as sub_post_name, b.user_level as sub_user_level, b.reply_time as sub_reply_time, b.is_join as sub_is_join, b.leave_type as sub_leave_type, b.leave_reason as sub_leave_reason,b.sign_in as sub_sign_in, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark,
+        f.id as fj_id,f.main_id as fj_main_id, f.source_id as fj_source_id, f.name as fj_name, f.url as fj_url, f.type as fj_type,f.stytle as fj_stytle
         from zx_conference a
         left join zx_conference_user b on b.conference_id = a.conference_id
+        left join zx_fj f on f.source_id = a.conference_id
         where a.conference_id = #{conferenceId}
     </select>
     <select id="selectZxConferenceUserByConferenceId" resultMap="ZxConferenceUserResult">

+ 20 - 3
ruoyi-system/src/main/resources/mapper/system/ZxNoticeMapper.xml

@@ -25,6 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap id="ZxNoticeZxUserNoticeResult" type="ZxNotice" extends="ZxNoticeResult">
         <collection property="zxUserNoticeList" notNullColumn="sub_user_id" javaType="java.util.List" resultMap="ZxUserNoticeResult" />
+        <collection property="zxFjListFj" notNullColumn="fj_source_id" javaType="java.util.List" resultMap="ZxFjResult" />
+
     </resultMap>
 
     <resultMap type="ZxUserNotice" id="ZxUserNoticeResult">
@@ -35,17 +37,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="sub_create_time"    />
     </resultMap>
 
+    <resultMap type="ZxFj" id="ZxFjResult">
+        <result property="id"    column="fj_id"    />
+        <result property="mainId"    column="fj_main_id"    />
+        <result property="sourceId"    column="fj_source_id"    />
+        <result property="name"    column="fj_name"    />
+        <result property="url"    column="fj_url"    />
+        <result property="type"    column="fj_type"    />
+        <result property="stytle"    column="fj_stytle"    />
+        <result property="remark"    column="fj_remark"    />
+    </resultMap>
+
     <sql id="selectZxNoticeVo">
         select zx_notice_id, notice_title, notice_type, notice_content, status, issuer, issuer_dept, issuer_dept_id, issuer_time, create_by, create_time, update_by, update_time, remark from zx_notice
     </sql>
 
-    <select id="selectZxNoticeList" parameterType="ZxNotice" resultMap="ZxNoticeResult">
+    <select id="selectZxNoticeList" parameterType="ZxNotice" resultMap="ZxNoticeZxUserNoticeResult">
             select * from ( select a.zx_notice_id, a.notice_title, a.notice_type, a.notice_content, a.status, a.issuer,
             a.issuer_dept, a.issuer_dept_id, a.issuer_time, a.create_by, a.create_time, a.update_by, a.update_time,
             a.remark,
-            IFNULL( b.zx_notice_type, 'N' ) as type
+            IFNULL( b.zx_notice_type, 'N' ) as type,
+            f.id as fj_id,f.main_id as fj_main_id, f.source_id as fj_source_id, f.name as fj_name, f.url as fj_url, f.type as fj_type,f.stytle as fj_stytle
             from zx_notice a
             left join zx_user_notice b on b.zx_notice_id = a.zx_notice_id
+            left join zx_fj f on f.source_id = a.zx_notice_id
             <where>
             <if test="zxNoticeId != null">and a.zx_notice_id = #{zxNoticeId}</if>
             <if test="noticeTitle != null  and noticeTitle != ''">and a.notice_title = #{noticeTitle}</if>
@@ -66,9 +81,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <select id="selectZxNoticeByZxNoticeId" parameterType="Long" resultMap="ZxNoticeZxUserNoticeResult">
         select a.zx_notice_id, a.notice_title, a.notice_type, a.notice_content, a.status, a.issuer, a.issuer_dept, a.issuer_dept_id, a.issuer_time, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
-        b.user_id as sub_user_id, b.user_name as sub_user_name,b.zx_notice_type as sub_zx_notice_type, b.zx_notice_id as sub_zx_notice_id, b.create_time as sub_create_time
+        b.user_id as sub_user_id, b.user_name as sub_user_name,b.zx_notice_type as sub_zx_notice_type, b.zx_notice_id as sub_zx_notice_id, b.create_time as sub_create_time,
+        f.id as fj_id,f.main_id as fj_main_id, f.source_id as fj_source_id, f.name as fj_name, f.url as fj_url, f.type as fj_type,f.stytle as fj_stytle
         from zx_notice a
         left join zx_user_notice b on b.zx_notice_id = a.zx_notice_id
+        left join zx_fj f on f.source_id = a.zx_notice_id
         where a.zx_notice_id = #{zxNoticeId}
     </select>