Browse Source

考核材料管理

xiaoqiao 8 months ago
parent
commit
7a18b95d8e

+ 35 - 0
src/main/java/com/ghsc/partybuild/controller/CheckDataController.java

@@ -48,6 +48,15 @@ public class CheckDataController {
         return result;
     }
 
+    @ResponseBody
+    @GetMapping("/getCheckScoreList")
+    public RequsetData<PageInfo<HashMap<String, Object>>> getCheckScoreList(int pageindex, int pagesize, Integer year, Integer quarter, String dzzdm
+            , String checkUserName, Float minScore,Float maxScore,Integer recordStatus) {
+        RequsetData<PageInfo<HashMap<String, Object>>> result = new RequsetData<>();
+        result.setItem(checkDataService.getCheckScoreList(pageindex, pagesize,year,  quarter,  dzzdm,  checkUserName,  minScore, maxScore, recordStatus));
+        return result;
+    }
+
     @ResponseBody
     @PostMapping("/saveCheckNameList")
     public RequsetData<Integer> saveCheckNameList(@RequestBody JSONObject mJson) {
@@ -125,6 +134,32 @@ public class CheckDataController {
         return res;
     }
 
+    @ResponseBody
+    @PostMapping("/saveCheckScore")
+    public RequsetData<Integer> saveCheckScore(@RequestBody JSONObject mJson) {
+        RequsetData<Integer> res = new RequsetData<>();
+        try {
+            PtCheckscore item = JSONObject.parseObject(JSONObject.toJSON(mJson.get("dataModel")).toString(), PtCheckscore.class);
+            List<PtCheckquestion> questionList = mJson.getJSONArray("questionList").toJavaList(PtCheckquestion.class);
+
+            item.setCreateuserid(userService.getLoginUser().getUserid());
+            item.setCreateusername(userService.getUserInfobyId(userService.getLoginUser().getUserid()).getName());
+            int id = checkDataService.saveCheckScore(item, questionList);
+            res.setItem(id);
+            res.setMsg("保存成功!");
+        } catch (Exception ex) {
+            res.setMsg("保存失败:" + ex.getMessage());
+            res.setSuccess(false);
+        }
+        return res;
+    }
+    @ResponseBody
+    @GetMapping("/getCheckquestionList")
+    public RequsetData<List<PtCheckquestion> > getCheckquestionList(String scoreId) {
+        RequsetData<List<PtCheckquestion> > result = new RequsetData<>();
+        result.setItem(checkDataService.getCheckquestionList(scoreId));
+        return result;
+    }
     @ResponseBody
     @GetMapping("/getCheckdata")
     public RequsetData<PtCheckdata> getCheckdata(String id) {

+ 2 - 0
src/main/java/com/ghsc/partybuild/mapper/cquery/PtCheckdataCQuery.java

@@ -14,4 +14,6 @@ public interface PtCheckdataCQuery {
     List<HashMap<String,Object>> selectCheckDataList(Integer year, String dzzdm, String remark);
 
     List<HashMap<String,Object>> selectCheckDataFleList(@Param("year") String year);
+
+    List<HashMap<String,Object>> selectCheckScoreList(Integer year, Integer quarter, String dzzdm, String checkUserName, Float minScore,Float maxScore,Integer recordStatus);
 }

+ 61 - 0
src/main/java/com/ghsc/partybuild/model/PtCheckscore.java

@@ -1,6 +1,7 @@
 package com.ghsc.partybuild.model;
 
 import java.math.BigDecimal;
+import java.util.Date;
 
 public class PtCheckscore {
     private String scoreid;
@@ -19,6 +20,18 @@ public class PtCheckscore {
 
     private Integer recordstatus;
 
+    private Date createtime;
+
+    private String createuserid;
+
+    private String createusername;
+
+    private Date updatetime;
+
+    private String updateuserid;
+
+    private String updateusername;
+
     public String getScoreid() {
         return scoreid;
     }
@@ -82,4 +95,52 @@ public class PtCheckscore {
     public void setRecordstatus(Integer recordstatus) {
         this.recordstatus = recordstatus;
     }
+
+    public Date getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(Date createtime) {
+        this.createtime = createtime;
+    }
+
+    public String getCreateuserid() {
+        return createuserid;
+    }
+
+    public void setCreateuserid(String createuserid) {
+        this.createuserid = createuserid == null ? null : createuserid.trim();
+    }
+
+    public String getCreateusername() {
+        return createusername;
+    }
+
+    public void setCreateusername(String createusername) {
+        this.createusername = createusername == null ? null : createusername.trim();
+    }
+
+    public Date getUpdatetime() {
+        return updatetime;
+    }
+
+    public void setUpdatetime(Date updatetime) {
+        this.updatetime = updatetime;
+    }
+
+    public String getUpdateuserid() {
+        return updateuserid;
+    }
+
+    public void setUpdateuserid(String updateuserid) {
+        this.updateuserid = updateuserid == null ? null : updateuserid.trim();
+    }
+
+    public String getUpdateusername() {
+        return updateusername;
+    }
+
+    public void setUpdateusername(String updateusername) {
+        this.updateusername = updateusername == null ? null : updateusername.trim();
+    }
 }

+ 7 - 3
src/main/java/com/ghsc/partybuild/service/CheckDataService.java

@@ -1,8 +1,6 @@
 package com.ghsc.partybuild.service;
 
-import com.ghsc.partybuild.model.PtCheckdata;
-import com.ghsc.partybuild.model.PtChecknamelist;
-import com.ghsc.partybuild.model.PtCheckparty;
+import com.ghsc.partybuild.model.*;
 import com.github.pagehelper.PageInfo;
 
 import java.util.HashMap;
@@ -27,4 +25,10 @@ public interface CheckDataService {
     int saveCheckdata(PtCheckdata item,String userid,String username);
 
     PtCheckdata getCheckdata(String id);
+
+    PageInfo<HashMap<String, Object>> getCheckScoreList(int pageIndex, int pageSize, Integer year, Integer quarter, String dzzdm, String checkUserName, Float minScore,Float maxScore,Integer recordStatus);
+
+    int saveCheckScore(PtCheckscore item, List<PtCheckquestion> questionList);
+
+    List<PtCheckquestion> getCheckquestionList(String scoreId);
 }

+ 104 - 19
src/main/java/com/ghsc/partybuild/service/impl/CheckDataServiceImpl.java

@@ -25,12 +25,16 @@ public class CheckDataServiceImpl implements CheckDataService {
     PtCheckdataCQuery checkdataCQuery;
     @Autowired
     PtCheckdataMapper CheckdataMapper;
+    @Autowired
+    PtCheckscoreMapper checkscoreMapper;
+    @Autowired
+    PtCheckquestionMapper checkquestionMapper;
 
     @Override
-    public PageInfo<HashMap<String, Object>> getCheckNameList(int pageIndex, int pageSize, Integer year, Integer quarter, String dzzdm, String checkUserName, String partyCode,Integer recordStatus) {
+    public PageInfo<HashMap<String, Object>> getCheckNameList(int pageIndex, int pageSize, Integer year, Integer quarter, String dzzdm, String checkUserName, String partyCode, Integer recordStatus) {
 
         PageHelper.startPage(pageIndex, pageSize);
-        List<HashMap<String, Object>> list = checkdataCQuery.selectCheckNameList(year, quarter, dzzdm, checkUserName, partyCode,recordStatus);
+        List<HashMap<String, Object>> list = checkdataCQuery.selectCheckNameList(year, quarter, dzzdm, checkUserName, partyCode, recordStatus);
 
         PageInfo<HashMap<String, Object>> result = new PageInfo(list);
 
@@ -39,58 +43,95 @@ public class CheckDataServiceImpl implements CheckDataService {
 
     @Override
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
-    public int saveCheckNameList(PtChecknamelist item , List<PtCheckparty> checkPartyList){
+    public int saveCheckNameList(PtChecknamelist item, List<PtCheckparty> checkPartyList) {
 
         PtChecknamelist dbItem = checknamelistMapper.selectByPrimaryKey(item.getNameid());
-        if(dbItem==null) {
+        if (dbItem == null) {
             item.setCreatetime(new Date());
             item.setRecordstatus(1);
             item.setNameid(UUID.randomUUID().toString());
             checknamelistMapper.insertSelective(item);
-        }else{
+        } else {
             checknamelistMapper.updateByPrimaryKey(item);
         }
-        PtCheckpartyExample example=new PtCheckpartyExample();
+        PtCheckpartyExample example = new PtCheckpartyExample();
         example.or().andNameidEqualTo(item.getNameid());
         checkpartyMapper.deleteByExample(example);
-        checkPartyList.forEach(it->{
+        checkPartyList.forEach(it -> {
             it.setNameid(item.getNameid());
             it.setPartyid(UUID.randomUUID().toString());
             checkpartyMapper.insertSelective(it);
         });
+        assetrCheckScore(item.getYear(),item.getQuarter(),item.getCheckuserid(),item.getCheckusername(),checkPartyList);
         return 1;
     }
+
+    /**
+     * 生成考核评分
+     * @param year
+     * @param quarter
+     * @param checkUserId
+     * @param checkUserName
+     * @param checkPartyList
+     */
+    private void assetrCheckScore(Integer year, Integer quarter,String checkUserId,String checkUserName, List<PtCheckparty> checkPartyList) {
+        List<String> partyCodes = checkPartyList.stream().map(x -> x.getPartycode()).collect(Collectors.toList());
+        checkPartyList.forEach(party -> {
+            PtCheckscoreExample example = new PtCheckscoreExample();
+            example.or().andYearEqualTo(year).andQuarterEqualTo(quarter).andDzzdmEqualTo(party.getPartycode());
+            PtCheckscore partyScore = checkscoreMapper.selectByExample(example).stream().findFirst().orElse(null);
+            if (partyScore==null) {
+                partyScore =new PtCheckscore();
+                partyScore.setScoreid(UUID.randomUUID().toString());
+                partyScore.setYear(year);
+                partyScore.setQuarter(quarter);
+                partyScore.setCheckuserid(checkUserId);
+                partyScore.setDzzdm(party.getPartycode());
+                partyScore.setCheckusername(checkUserName);
+                partyScore.setRecordstatus(0);
+                checkscoreMapper.insert(partyScore);
+            }else{
+                partyScore.setCheckuserid(UUID.randomUUID().toString());
+                partyScore.setCheckuserid(checkUserId);
+                checkscoreMapper.updateByPrimaryKeySelective(partyScore);
+            }
+        });
+    }
+
     @Override
     @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
-    public  Integer deleteCheckNameList(List<String>  nameIdList){
-        PtCheckpartyExample example=new PtCheckpartyExample();
+    public Integer deleteCheckNameList(List<String> nameIdList) {
+        PtCheckpartyExample example = new PtCheckpartyExample();
         example.or().andNameidIn(nameIdList);
         checkpartyMapper.deleteByExample(example);
 
-        PtChecknamelistExample ckExp=new PtChecknamelistExample();
+        PtChecknamelistExample ckExp = new PtChecknamelistExample();
         ckExp.or().andNameidIn(nameIdList);
         checknamelistMapper.deleteByExample(ckExp);
 
         return 1;
     }
+
     @Override
-    public  Integer changeCheckNameListStatus(List<String>  nameIdList,Integer recordStatus){
-        PtChecknamelist record=new PtChecknamelist();
+    public Integer changeCheckNameListStatus(List<String> nameIdList, Integer recordStatus) {
+        PtChecknamelist record = new PtChecknamelist();
         record.setRecordstatus(recordStatus);
-        PtChecknamelistExample ckExp=new PtChecknamelistExample();
+        PtChecknamelistExample ckExp = new PtChecknamelistExample();
         ckExp.or().andNameidIn(nameIdList);
-        checknamelistMapper.updateByExampleSelective(record,ckExp);
-        return  1;
+        checknamelistMapper.updateByExampleSelective(record, ckExp);
+        return 1;
     }
+
     @Override
     public HashMap<String, Object> getCheckName(String id) {
 
-        List<HashMap<String, Object>> list = checkdataCQuery.selectCheckNameList(null, null, null, null, null,null);
+        List<HashMap<String, Object>> list = checkdataCQuery.selectCheckNameList(null, null, null, null, null, null);
 
-        HashMap<String, Object> item= list.stream().filter(x->x.get("nameid").toString().equals(id)).findFirst().orElse(null);
+        HashMap<String, Object> item = list.stream().filter(x -> x.get("nameid").toString().equals(id)).findFirst().orElse(null);
 
         return item;
     }
+
     @Override
     public PageInfo<HashMap<String, Object>> getCheckDataList(int pageIndex, int pageSize, Integer year, String dzzdm, String remark) {
 
@@ -101,6 +142,7 @@ public class CheckDataServiceImpl implements CheckDataService {
 
         return result;
     }
+
     @Override
     public List<HashMap<String, Object>> getCheckDataFleList(String year) {
 
@@ -108,10 +150,11 @@ public class CheckDataServiceImpl implements CheckDataService {
 
         return list;
     }
+
     @Override
-    public int saveCheckdata(PtCheckdata item,String userid,String username){
+    public int saveCheckdata(PtCheckdata item, String userid, String username) {
         PtCheckdata dbItem = CheckdataMapper.selectByPrimaryKey(item.getDataid());
-        if(dbItem==null){
+        if (dbItem == null) {
             item.setCheckdatauserid(userid);
             item.setCheckdatausername(username);
             item.setRecordstatus(1);
@@ -126,8 +169,50 @@ public class CheckDataServiceImpl implements CheckDataService {
             return CheckdataMapper.updateByPrimaryKeySelective(item);
         }
     }
+
     @Override
     public PtCheckdata getCheckdata(String id) {
         return CheckdataMapper.selectByPrimaryKey(id);
     }
+
+    @Override
+    public PageInfo<HashMap<String, Object>> getCheckScoreList(int pageIndex, int pageSize, Integer year, Integer quarter, String dzzdm, String checkUserName, Float minScore,Float maxScore,Integer recordStatus) {
+
+        PageHelper.startPage(pageIndex, pageSize);
+        List<HashMap<String, Object>> list = checkdataCQuery.selectCheckScoreList( year,  quarter,  dzzdm,  checkUserName,  minScore, maxScore, recordStatus);
+
+        PageInfo<HashMap<String, Object>> result = new PageInfo(list);
+
+        return result;
+    }
+
+    @Override
+    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
+    public int saveCheckScore(PtCheckscore item ,List<PtCheckquestion> questionList) {
+        PtCheckscore dbItem =  checkscoreMapper.selectByPrimaryKey(item.getScoreid());
+        dbItem.setScore(item.getScore());
+        dbItem.setUpdatetime(new Date());
+        dbItem.setUpdateuserid(item.getUpdateuserid());
+        dbItem.setUpdateusername(item.getUpdateusername());
+        dbItem.setRecordstatus(1);
+        checkscoreMapper.updateByPrimaryKeySelective(dbItem);
+
+        PtCheckquestionExample example=new  PtCheckquestionExample();
+        example.or().andScoreidEqualTo(item.getScoreid());
+        checkquestionMapper.deleteByExample(example);
+
+        questionList.forEach(x->{
+            x.setQuestionid(UUID.randomUUID().toString());
+            x.setScoreid(item.getScoreid());
+            checkquestionMapper.insert(x);
+        });
+        return 1;
+    }
+    @Override
+    public  List<PtCheckquestion> getCheckquestionList(String scoreId) {
+
+        PtCheckquestionExample example=new  PtCheckquestionExample();
+        example.or().andScoreidEqualTo(scoreId);
+       return checkquestionMapper.selectByExample(example);
+    }
 }

+ 33 - 0
src/main/resources/mapping/CQuery/PtCheckdataCQuery.xml

@@ -64,4 +64,37 @@
             </if>
         </where>
     </select>
+    <select id="selectCheckScoreList" resultType="java.util.HashMap" parameterType="java.lang.String">
+        select pcs.scoreid, pcs.dzzdm, pcs.year, pcs.quarter, pcs.checkuserid, pcs.checkusername, pcs.score, pcs.recordstatus
+             , pcs.createtime, pcs.createuserid, pcs.createusername, pcs.updatetime, pcs.updateuserid, pcs.updateusername
+             ,ifnull(qn.questionnum,0) questionnum,zz.dzzmc,dic.DICVALUE as recordstatusname from pt_checkscore pcs
+                                                                                                      left join (select pcq.scoreid,count(1) questionnum from pt_checkQuestion pcq group by pcq.scoreId) qn on pcs.scoreId=qn.scoreId
+                                                                                                      inner join  ZZ_ZZQKXX zz on pcs.dzzdm = zz.DZZDM
+                                                                                                      left join CF_DICTIONARY dic on pcs.recordStatus=dic.DICKEY and dic.DICTYPEKEY='checkScoreStatus'
+        inner join (select pcn.year,pcn.quarter, pcn.checkUserId,pcp.partyCode  from pt_checkNameList pcn inner join pt_checkParty pcp on pcn.nameId=pcp.nameId ) cp on pcs.dzzdm=cp.partyCode and pcs.checkUserId=cp.checkUserId
+        and cp.year=pcs.year and cp.quarter=pcs.quarter
+        <where>
+            <if test="year != null">
+                and pcs.year = #{year}
+            </if>
+            <if test="quarter != null">
+                and pcs.quarter = #{quarter}
+            </if>
+            <if test="dzzdm != null and dzzdm != ''">
+                and pcs.dzzdm like concat('%',#{dzzdm},'%')
+            </if>
+            <if test="checkUserName != null and checkUserName != ''">
+                and pcs.checkUserName =#{checkUserName}
+            </if>
+            <if test="minScore != null">
+                and pcs.score >= #{minScore}
+            </if>
+            <if test="maxScore != null">
+                and pcs.score <![CDATA[ <= ]]> #{maxScore}
+            </if>
+            <if test="recordStatus != null">
+                and pcs.recordStatus =#{recordStatus}
+            </if>
+        </where>
+    </select>
 </mapper>

+ 10 - 1
src/main/resources/static/app/main/app.js

@@ -3799,7 +3799,16 @@
                     return $ocLazyLoad.load('../main/party/checkData/list.js?' + window.sysVersion);
                 }]
             }
-        });;
+        }).state("home.checkScore", {
+            url: "checkScore",
+            templateUrl: "../main/party/checkScore/list.html?" + window.sysVersion,
+            controller: "checkScoreCtrl",
+            resolve: {
+                load: ['$ocLazyLoad', function ($ocLazyLoad) {
+                    return $ocLazyLoad.load('../main/party/checkScore/list.js?' + window.sysVersion);
+                }]
+            }
+        });
 
         $bsRouterStateProvider.copyUrlState($stateProvider.getStates());
 

+ 0 - 1
src/main/resources/static/app/main/party/checkNameList/list.js

@@ -23,7 +23,6 @@
             szdzzdm: AuthUser.getUser().DPCode,
             szdzzmc: AuthUser.getUser().DPName,
             dzzdm: '',
-            ldjtjc: '',
             dzzmc: '',
             recordStatus: null,
             year: null,

+ 92 - 0
src/main/resources/static/app/main/party/checkScore/edit.html

@@ -0,0 +1,92 @@
+<div class="modal" tabindex="-1" role="dialog">
+    <div class="modal-dialog" style="width: 900px;">
+        <div class="card">
+            <div class="header">
+                <button type="button" class="close" ng-click="$hide()">&times;</button>
+                <h4 class="modal-title">{{params.title}}</h4>
+            </div>
+            <div activate-input class="body">
+                <form class="form-horizontal" role="form" id="editForm"
+                      name="editForm" ng-submit="save(editForm.$valid)" novalidate>
+                    <div class="dj-formtable">
+                        <table class="dj-table">
+
+                            <tr>
+                                <th>组织名称</th>
+                                <td>
+                                    {{dataModel.dzzmc}}
+                                </td>
+                                <th>年度</th>
+                                <td>
+                                    {{dataModel.year}}
+                                </td>
+                            </tr>
+                            <tr>
+                                <th>季度</th>
+                                <td>
+                                    {{dataModel.quarter}}
+                                </td>
+                                <th>评分</th>
+                                <td colspan="5" ng-class="{ 'focused error' : this.editForm.score.$invalid &&  this.editForm.$submitted}">
+                                    <input name="score" class="form-control"
+                                           ng-required="true" type="number" ng-pattern="/^[0-9]+(.[0-9]{2})?$/" step="0.01"
+                                           ng-model="dataModel.score"/>
+                                    <label ng-show="this.editForm.score.$invalid &&  this.editForm.$submitted"
+                                           class="error">请输入正确评分.</label>
+                                </td>
+                            </tr>
+                        </table>
+                    </div>
+                    <div class="table-responsive list-table-panel">
+                        <div class="list-table-title">
+                            <div class="table-title">
+                                考核检查中出现的问题
+                            </div>
+                            <div class="table-tool">
+                                <button type="button" class="btn btn-primary dropdown-toggle"
+                                        title="添加" ng-if="isVew"
+                                        ng-click="addQuestion()">
+                                    添加
+                                </button>
+                            </div>
+                        </div>
+                        <table class="table table-bordered">
+                            <thead>
+                            <tr>
+                                <th class="text-center" style="width: 100px;">序号</th>
+                                <th>问题名称</th>
+                                <th>问题描述</th>
+                                <th ng-if="isVew">操作</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr ng-repeat="it in questionList|orderBy:'CAREDATE':'desc'">
+                                <td scope="row" class="text-center">{{$index+1}}</td>
+                                <td class="text-center">
+                                    {{it.questionname}}
+                                </td>
+                                <td class="text-center">
+                                    {{it.questiondesc}}
+                                </td>
+                                <td class="text-center" style="width: 200px;" ng-if="isVew">
+                                    <button class="btn td-btn bg-pink waves-effect"
+                                            ng-click="deleteQuestion($index)" title="删除">
+                                        删除
+                                    </button>
+                                </td>
+                            </tr>
+                            <tr ng-if="questionList.length<=0">
+                                <td colspan="6" style="text-align:center">暂无数据</td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </div>
+                    <div class="form_foot" ng-show="isVew">
+                        <button type="button" class="btn btn-default" ng-click="$hide()">取消</button>
+                        <button type="submit" class="btn btn-primary" form="editForm">提交</button>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+</div>

+ 184 - 0
src/main/resources/static/app/main/party/checkScore/list.html

@@ -0,0 +1,184 @@
+<titlemenu></titlemenu>
+<div class="dj-list">
+    <div class="dj-list-body">
+        <div party-tree data-selectdzzdm="selectparams.selectdzzdm" data-selectdzzmc="selectparams.selectdzzmc"
+             data-isshowxz="0"
+             data-parentcode="selectparams.parentcode"
+             data-parentname="selectparams.parentname"
+             data-dzzdm="selectparams.szdzzdm" data-userid="selectparams.userid"
+             data-dzzmc="selectparams.szdzzmc"
+             data-showtogglebtn="true"
+             data-onlyshowdw="selectparams.onlyshow_dw"
+             data-zzfbtype="selectparams.zzfbType"
+             data-isunfold="selectparams.isunfold"
+             data-defaultselected="selectparams.defaultselected"
+        ></div>
+        <div class="dj-list-content">
+            <div class="card">
+                <div activate-input activate-select class="header search-header">
+                    <div fold-partytree data-isunfold="selectparams.isunfold"></div>
+                    <div class="search-param-panel">
+                        <div class="search-input">
+                            <form class="form-horizontal">
+                                <div class="row clearfix form-inline">
+                                    <div class="col-lg-2 col-md-2 dj-label">
+                                        <label>当前选中组织</label>
+                                    </div>
+                                    <div class="col-lg-2 col-md-2">
+                                        <div class="form-group">
+                                            <div class="form-line">
+                                                <div class="input-group input-group-search">
+                                                    <input name="selectdzzmc" type="text" style="min-width: 90px"
+                                                           ng-model="selectparams.selectdzzmc" class="form-control"
+                                                           ng-disabled="true"/>
+                                                    <span class="input-group-addon"
+                                                          ng-click="setisunfold()">选择</span>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="col-lg-2 col-md-2 dj-label">
+                                        <label>年度</label>
+                                    </div>
+                                    <div class="col-lg-2 col-md-2">
+                                        <div class="form-group">
+                                            <div class="form-line">
+                                                <select class="form-control show-tick" ng-model="selectparams.year" ng-change="search()"
+                                                        ng-options="type.dickey as type.dicvalue for type in yearList"
+                                                        class="form-control"
+                                                        name="year">
+                                                    <option value="" selected>--全部--</option>
+                                                </select>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="col-lg-2 col-md-2 dj-label">
+                                        <label>季度</label>
+                                    </div>
+                                    <div class="col-lg-2 col-md-2">
+                                        <div class="form-group">
+                                            <div class="form-line">
+                                                <select class="form-control show-tick" ng-model="selectparams.quarter" ng-change="search()"
+                                                        ng-options="type.dickey as type.dicvalue for type in quarterList"
+                                                        class="form-control"
+                                                        name="quarter">
+                                                    <option value="" selected>--全部--</option>
+                                                </select>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="row clearfix form-inline" ng-show="isShow">
+                                    <div class="col-lg-2 col-md-2 dj-label">
+                                        <label>状态</label>
+                                    </div>
+                                    <div class="col-lg-2 col-md-2">
+                                        <div class="form-group">
+                                            <div class="form-line">
+                                                <select class="form-control show-tick" ng-model="selectparams.recordStatus" ng-change="search()"
+                                                        ng-options="type.dickey as type.dicvalue for type in checkScoreStatusList"
+                                                        class="form-control"
+                                                        name="recordStatus">
+                                                    <option value="" selected>--全部--</option>
+                                                </select>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </form>
+                        </div>
+                        <div class="search-btn" style="margin-right: 20px;">
+                            <div style="min-width: 13em">
+                                <span class="moreSpan" ng-click="isShowClick()" style='padding-right:1em;cursor:pointer;'>{{moreTxt}}<i class="material-icons" style="position: relative;top:7px;">{{isShow ? 'expand_less' : 'expand_more'}}</i></span>
+                                <button class="btn btn-default1"
+                                        ng-click="search()">查询
+                                </button>
+                                <button  class="btn btn-default1 btn-reset"
+                                        ng-click="reset()">重置
+                                </button>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="search-btn" style="margin-right: 20px;">
+                        <div style="float: right">
+                            <button class="btn  btn-default1"
+                                    ng-click="export()">导出
+                            </button>
+                        </div>
+                    </div>
+                </div>
+                <div class="body">
+                    <div class="zero-list-table-panel">
+                        <div class="zero-source-table-div">
+                            <table class="table table-bordered table-striped table-hover js-basic-example dataTable text-nowrap">
+                                <thead>
+                                <tr>
+                                    <th class="th-select" th-select-all datalist="dataList"></th>
+                                    <th>序号</th>
+                                    <th>年度</th>
+                                    <th>季度</th>
+                                    <th>组织名称</th>
+                                    <th>评分</th>
+                                    <th>问题数量</th>
+                                    <th>核查工作人员</th>
+                                    <th>评分时间</th>
+                                    <th>状态</th>
+                                </tr>
+                                </thead>
+                                <tbody>
+                                <tr ng-repeat="it in dataList">
+                                    <td class="text-center">
+                                        <input type="checkbox" id="{{pageId}}_md_checkbox_{{$index+1}}" class="filled-in chk-col-red" ng-model="it.rowChecked" />
+                                        <label class="checkbox_lable" style="top:6px;"
+                                               for="{{pageId}}_md_checkbox_{{$index+1}}"></label>
+                                    </td>
+                                    <td scope="row" class="text-center">
+                                        {{selectparams.pagesize*(selectparams.pageindex-1)+$index+1}}
+                                    </td>
+                                    <td>{{it.year}}</td>
+                                    <td>{{it.quarter}}</td>
+                                    <td class="text-center">{{it.dzzmc}}</td>
+                                    <td>{{it.score}}</td>
+                                    <td>{{it.questionnum}}</td>
+                                    <td>{{it.checkusername}}</td>
+                                    <td>{{it.updatetime|date:'yyyy-MM-dd'}}</td>
+                                    <td>{{it.recordstatusname}}</td>
+                                </tr>
+                                <tr ng-if="pageInfo.ptotal==0">
+                                    <td colspan="9" style="text-align:center">暂无数据</td>
+                                </tr>
+                                </tbody>
+                            </table>
+                        </div>
+                        <div class="zero-target-table-div">
+                            <table class="table table-bordered table-striped table-hover js-basic-example dataTable text-nowrap">
+                                <thead>
+                                <th>操作</th>
+                                </thead>
+                                <tbody>
+                                <tr ng-repeat="it in dataList" zero-table-height>
+                                    <td class="text-center">
+                                        <button
+                                                class="btn td-btn bg-light-green waves-effect"
+                                                ng-click="score(it)"
+                                                title="评分">
+                                            评分
+                                        </button>
+                                        <button
+                                                class="btn td-btn bg-pink waves-effect"
+                                                ng-click="view(it)" title="查看">
+                                            查看
+                                        </button>
+                                    </td>
+                                </tr>
+                                </tbody>
+                            </table>
+                        </div>
+                    </div>
+                    <pagination data-pageindex="selectparams.pageindex" data-pagesize="selectparams.pagesize"
+                                data-ptotal="pageInfo.ptotal"></pagination>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 271 - 0
src/main/resources/static/app/main/party/checkScore/list.js

@@ -0,0 +1,271 @@
+(function ($app) {
+    $app.module('gtPartyApp').controller('checkScoreCtrl', function ($scope, $http, $modal, $ocLazyLoad, $timeout, $alert, $loading, $state, AuthUser, $partySelect, $stateParams, $bsRouterState) {
+        $state.params = $bsRouterState.$params($scope);
+        $scope.isShow = false;
+        $scope.moreTxt = "更多";
+        $scope.pageId = "checkData";
+
+        //定义数据集合
+        $scope.dataList = []; //列表数据
+        $scope.yearList = [];
+
+        //初始化查询参数
+        $scope.selectparams = {
+            isunfold: false,//组织结构树展开收缩
+            'pageindex': 1,
+            'pagesize': 10,
+            'selectdzzdm': '',
+            selectdzzmc: '',
+            defaultselected: $state.params.dzzdm,
+            parentcode: AuthUser.getUser().ParentDpCode,
+            parentname: AuthUser.getUser().ParentDpName,
+            szdzzdm: AuthUser.getUser().DPCode,
+            szdzzmc: AuthUser.getUser().DPName,
+            dzzdm: '',
+            dzzmc: '',
+            quarter: null,
+            recordStatus: null,
+            year: null,
+            minScore: null,
+            maxScore: null,
+            userid: AuthUser.getUser().Id,
+            onlyshow_dw: $stateParams.type == 1 ? 1 : 0,
+            remark: '',
+        };
+
+        $scope.pageInfo = {ptotal: 0};
+        //监视页数变化
+        $scope.$watch("selectparams.pageindex", function (newVal, oldVal) {
+            if ($scope.pageInfo.ptotal > 0) {
+                $scope.loadData();
+            }
+        });
+        //监视党组织选中变化
+        $scope.$watch("selectparams.selectdzzdm", function (newVal, oldVal) {
+            if (newVal != '' && newVal != null) {
+
+                if ($scope.selectparams.defaultselected != "" && $scope.selectparams.defaultselected != null &&
+                    $scope.selectparams.defaultselected != $scope.selectparams.selectdzzdm)
+                    return;
+
+                $scope.selectparams.defaultselected = "";
+
+                $scope.selectparams.dzzdm = $scope.selectparams.selectdzzdm;
+                $scope.loadData();
+            }
+        });
+
+
+        //查询
+        $scope.search = function () {
+            $scope.loadData();
+        };
+        $scope.getYearsList = function () {
+            $http({
+                method: 'get',
+                url: '../../api/dictionary/getDictionaryListByDicTypeKey',
+                params: {dicTypeKey: 'years'}
+            }).then(function (result) {
+                $scope.yearList = result.data;
+            }, function (resp) {
+
+            });
+        };
+        $scope.getYearsList();
+
+        $scope.quarterList = [];
+        $scope.getQuartersList = function () {
+            $http({
+                method: 'get',
+                url: '../../api/dictionary/getQuartersList',
+                params: {}
+            }).then(function (result) {
+                $scope.quarterList = result.data;
+            }, function (resp) {
+
+            });
+        };
+        $scope.getQuartersList();
+
+        $scope.checkScoreStatusList = [];
+        $scope.getCheckScoreStatusList = function () {
+            $http({
+                method: 'get',
+                url: '../../api/dictionary/getDictionaryListByDicTypeKey',
+                params: {dicTypeKey: 'checkScoreStatus'}
+            }).then(function (result) {
+                $scope.checkScoreStatusList = result.data;
+            }, function (resp) {
+
+            });
+        };
+        $scope.getCheckScoreStatusList();
+
+        //加载列表数据
+        $scope.loadData = function () {
+            $http
+            ({
+                method: 'get', url: '../../api/checkdata/getCheckScoreList', params: $scope.selectparams
+            }).then(function (result) {
+                $scope.dataList = result.data.item.list;
+                $scope.pageInfo.ptotal = result.data.item.total;
+            });
+        };
+
+        var editCtrl = function ($scope, $http, $partySelect, AuthUser) {
+            $scope.params = editModal.params;
+            $scope.dataModel = editModal.data;
+            $scope.isView = editModal.isView;
+            $scope.questionList = [];
+
+            $scope.getCheckquestionList = () => {
+                $http
+                ({
+                    method: 'get',
+                    url: '../../api/checkdata/getCheckquestionList',
+                    params: {scoreId: $scope.dataModel.scoreid}
+                }).then(function (result) {
+                    $scope.questionList = result.data.item;
+                });
+            }
+            $scope.getCheckquestionList();
+
+            var questionCtrl = function ($scope, $http, $filter) {
+                $scope.title = questionModal.title;
+                $scope.isNew = questionModal.isNew;
+                $scope.questionModel = angular.copy(questionModal.recordModel);
+
+                //保存
+                $scope.saveQuestion = function (isflag) {
+                    if (isflag) {
+                        if ($scope.isNew) {
+                            $scope.$parent.$parent.questionList.push($scope.questionModel);
+                        } else {
+                            questionModal.recordModel = $scope.questionModel;
+                        }
+                        $scope.$hide();
+                    }
+                };
+            };
+            questionCtrl.$inject = ['$scope', '$http', '$filter'];
+            var questionModal = $modal({
+                resolve: {
+                    load: ['$ocLazyLoad', function ($ocLazyLoad) {
+                    }]
+                },
+                scope: $scope,
+                controller: questionCtrl,
+                templateUrl: '../main/party/checkScore/question.html',
+                show: false,
+                animation: 'am-fade-and-slide-top'
+            });
+            $scope.addQuestion = () => {
+                questionModal.title = '录入考核评分';
+                questionModal.isNew = true;
+                questionModal.recordModel = {};
+                questionModal.$promise.then(questionModal.show);
+            }
+            $scope.deleteQuestion = (index) => {
+                $scope.questionList.splice(index, 1);
+            }
+            //保存
+            $scope.save = function (isflag) {
+                if (isflag) {
+                    $loading.show();
+                    $http({
+                        method: "post",
+                        url: "../../api/checkdata/saveCheckScore",
+                        data: {
+                            dataModel: $scope.dataModel,
+                            questionList: $scope.questionList
+                        }
+                    }).then(function (result) {
+                        $loading.hide();
+                        if (result.data.success) {
+                            $scope.showMsg('成功', result.data.msg);
+                            //重新刷新列表
+                            $scope.loadData();
+                            $scope.$hide();
+                        } else {
+                            $scope.showMsg('失败', result.data.msg);
+                        }
+                    }, function (resp) {
+                        $loading.hide();
+                        $scope.showMsg('错误', '服务器错误');
+                    });
+                }
+            };
+        };
+        editCtrl.$inject = ['$scope', '$http', '$partySelect', 'AuthUser'];
+        //定义模态框
+        var editModal = $modal({
+            resolve: {
+                load: ['$ocLazyLoad', function ($ocLazyLoad) {
+                }]
+            },
+            scope: $scope,
+            controller: editCtrl,
+            templateUrl: '../main/party/checkScore/edit.html',
+            show: false,
+            animation: 'am-fade-and-slide-top'
+        });
+
+        $scope.score = function (it) {
+            editModal.data = it;
+            editModal.params = {
+                title: '录入考核评分'
+            };
+            editModal.$promise.then(editModal.show);
+        };
+        $scope.view = (it) => {
+            editModal.data = it;
+            editModal.isView = true;
+            editModal.params = {
+                title: '查看考核评分'
+            };
+            editModal.$promise.then(editModal.show);
+        }
+        $scope.export = function () {
+            if ($scope.selectparams.dzzdm != "") {
+                var params = "?1=1";
+                for (var p in $scope.selectparams) {
+                    if ($scope.selectparams[p] !== '' && $scope.selectparams[p] !== null)
+                        params += ("&" + p + "=" + encodeURI($scope.selectparams[p]));
+                }
+                window.open('../../api/checkdata/exportCheckData' + params);
+            }
+        };
+
+        $scope.showMsg = function (title, content) {
+            $alert({
+                title: title + ':',
+                content: content,
+                placement: 'top',
+                type: 'info',
+                show: true,
+                duration: 3
+            });
+
+        };
+        $scope.isShowClick = function () {
+            $scope.isShow = !$scope.isShow;
+            if ($scope.moreTxt == "更多") {
+                $scope.moreTxt = "收起";
+            } else if ($scope.moreTxt == "收起") {
+                $scope.moreTxt = "更多";
+            }
+        };
+        $scope.setisunfold = function () {
+            $scope.selectparams.isunfold = !$scope.selectparams.isunfold;
+            $scope.$emit('menudatas.toggle', !$scope.selectparams.isunfold);
+        };
+        $scope.reset = function () {
+            $scope.selectparams.year = null;
+            $scope.selectparams.quarter = null;
+            $scope.selectparams.selectdzzmc = '';
+            $scope.selectparams.minScore = '';
+            $scope.selectparams.maxScore = '';
+            $scope.selectparams.recordStatus = null;
+        }
+    });
+})(angular);

+ 47 - 0
src/main/resources/static/app/main/party/checkScore/question.html

@@ -0,0 +1,47 @@
+<div class="modal" tabindex="-1" role="dialog">
+    <div class="modal-dialog" style="width: 600px;">
+        <div class="card">
+            <div class="header">
+                <button type="button" class="close" ng-click="$hide()">&times;</button>
+                <h4 class="modal-title">{{title}}</h4>
+            </div>
+            <div activate-input class="body">
+                <form class="form-horizontal" role="form" id="questionForm"
+                      name="questionForm" ng-submit="saveQuestion(questionForm.$valid)" novalidate>
+                    <div class="dj-formtable">
+                        <table class="dj-table">
+                            <tr>
+                                <th>问题名称</th>
+                                <td colspan="3"
+                                    ng-class="{ 'focused error' : this.questionForm.questionname.$invalid &&  this.questionForm.$submitted}">
+                                    <input name="questionname" class="form-control"
+                                           ng-required="true" type="text"
+                                           ng-model="questionModel.questionname"/>
+                                    <label ng-show="this.questionForm.questionname.$invalid &&  this.questionForm.$submitted"
+                                           class="error">必填.</label>
+                                </td>
+                            </tr>
+                            </tr>
+                            <tr>
+                            <tr>
+                                <th>问题描述</th>
+                                <td colspan="3"
+                                    ng-class="{ 'focused error' : this.questionForm.questiondesc.$invalid &&  this.recordForm.$submitted}">
+                                    <textarea ng-model="questionModel.questiondesc" name="questiondesc" ng-required="true"
+                                              style="width: 100%;" rows="5"></textarea>
+                                    <label ng-show="this.questionForm.questiondesc.$invalid &&  this.questionForm.$submitted"
+                                           class="error">必填.</label>
+                                </td>
+                            </tr>
+                            </tr>
+                        </table>
+                    </div>
+                    <div class="form_foot">
+                        <button type="button" class="btn btn-default" ng-click="$hide()">取消</button>
+                        <button type="submit" class="btn btn-primary" form="questionForm">提交</button>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+</div>