Преглед на файлове

干部试用期届满考核

lizeyu преди 5 месеца
родител
ревизия
726d922ab1

+ 87 - 0
src/main/java/com/ghsc/partybuild/controller/LeaderAssessController.java

@@ -204,4 +204,91 @@ public class LeaderAssessController {
         return res;
     }
 
+    @RequestMapping(value = "/export2", method = RequestMethod.GET)
+    public void export2(HttpServletResponse response, int assessType,
+                        @RequestParam(required = false) String name, @RequestParam(required = false) String idCard,
+                        @RequestParam(required = false) String position, @RequestParam(required = false) String grade,
+                        @RequestParam(required = false) String beginDate, @RequestParam(required = false) String endDate,
+                        @RequestParam(required = false) String assessBeginDate, @RequestParam(required = false) String assessEndDate) throws Exception {
+        /**查询数据**/
+        List<LeaderAssessVo> dataList = leaderAssessService.getList(1, 10000, assessType, null, name, idCard, position, grade, beginDate, endDate, assessBeginDate, assessEndDate).getList();
+
+        ExcelHelper excelHelper = new ExcelHelper();
+        ExcelHelper.ExcelData data = excelHelper.new ExcelData();
+
+        List<CfDictionary> leaderTeamTypeList = dictionaryService.getDictionaryListByDicTypeKey("assessType");
+        String title = dictionaryService.getDicByKey(assessType, leaderTeamTypeList).getDicvalue();
+
+        data.setName(title);
+        List<String> titles = new ArrayList();
+        titles.add("序号");
+        titles.add("姓名");
+        titles.add("性别");
+        titles.add("身份证号");
+        titles.add("出生年月");
+        titles.add("学历");
+        titles.add("职称");
+        titles.add("参加工作时间");
+        titles.add("现任职务");
+        titles.add("试用期开始日期");
+        titles.add("试用期期满日期");
+        titles.add("考核开始时间");
+        titles.add("考核结束时间");
+        titles.add("考核结果");
+        data.setTitles(titles);
+
+        int index = 1;
+        List<List<Object>> rows = new ArrayList();
+        for (LeaderAssessVo item : dataList) {
+            List<Object> row = new ArrayList();
+            row.add(index++);
+            row.add(item.getName());
+            row.add(item.getSexname());
+            row.add(item.getIdcard());
+            row.add(item.getBirthdate());
+            row.add(item.getEducation());
+            row.add(item.getJobtitle());
+            row.add(item.getWorkdate());
+            row.add(item.getPosition());
+            row.add(item.getBegindate());
+            row.add(item.getEnddate());
+            row.add(item.getAssessbegindate());
+            row.add(item.getAssessenddate());
+            row.add(item.getResult());
+
+            rows.add(row);
+        }
+        data.setRows(rows);
+
+        excelHelper.exportExcel(response, title + "导出.xlsx", data);
+    }
+
+    @ResponseBody
+    @RequestMapping("/import2")
+    public RequsetData<List<LeaderAssessVo>> importLeaderAssess2(@RequestBody Map<String, Object> reqMap) {
+        RequsetData<List<LeaderAssessVo>> res = new RequsetData<>();
+        List<LeaderAssessVo> errorInfo = new ArrayList<>();
+        String message = "";
+        try {
+            List<LeaderAssessVo> dataList = JsonMapper.jsonToObject(reqMap.get("dataList").toString(), new TypeReference<List<LeaderAssessVo>>() {
+            });
+
+            int assessType = Integer.parseInt(reqMap.get("assessType").toString());
+
+            errorInfo = leaderAssessService.importLeaderAssess2(assessType, dataList, userService.getLoginUser().getUserid());
+        } catch (Exception e) {
+            e.printStackTrace();
+            message = e.toString();
+        }
+        if (errorInfo.size() <= 0 && stringUtils.IsNullOrEmpty(message)) {
+            res.setSuccess(true);
+            res.setMsg("操作成功!");
+        } else {
+            res.setSuccess(false);
+            res.setMsg("操作失败!" + message);
+            res.setItem(errorInfo);
+        }
+        return res;
+    }
+
 }

+ 2 - 0
src/main/java/com/ghsc/partybuild/service/LeaderAssessService.java

@@ -17,4 +17,6 @@ public interface LeaderAssessService {
     int delete(List<String> idList);
 
     List<LeaderAssessVo> importLeaderAssess(int assessType, List<LeaderAssessVo> dataList, String userID) throws Exception;
+    
+    List<LeaderAssessVo> importLeaderAssess2(int assessType, List<LeaderAssessVo> dataList, String userID) throws Exception;
 }

+ 93 - 0
src/main/java/com/ghsc/partybuild/service/impl/LeaderAssessServiceImpl.java

@@ -225,4 +225,97 @@ public class LeaderAssessServiceImpl implements LeaderAssessService {
         return errorList;
     }
 
+    public List<LeaderAssessVo> importLeaderAssess2(int assessType, List<LeaderAssessVo> dataList, String userID) throws Exception {
+
+        dataList = dataList.stream().filter(it -> !"".equals(it.getName())).collect(Collectors.toList());
+        if (dataList.size() <= 0) {
+            throw new Exception("请添加导入数据");
+        }
+
+        List<String> nameList = dataList.stream().filter(it -> !stringUtils.IsNullOrEmpty(it.getName())).map(it -> it.getName().trim()).collect(Collectors.toList());
+        if (nameList.stream().distinct().count() != nameList.size()) {
+            throw new Exception("导入数据存在相同姓名,请修改后重新导入!");
+        }
+
+        List<CfDictionary> assessTypeList = dictionaryService.getDictionaryListByDicTypeKey("assessType");
+        List<CfDictionary> dicSexList = dictionaryService.getDictionaryListByDicTypeKey("dic_sex");
+
+        List<LeaderAssessVo> errorList = new ArrayList<>();
+        List<LwLeaderAssess> resultList = new ArrayList<>();
+        for (int i = 0; i < dataList.size(); i++) {
+            LeaderAssessVo item = dataList.get(i);
+
+            String errorInfo = "";
+
+            item.setSex(dictionaryService.getDickeyByName(item.getSexname(), dicSexList));
+            item.setAssesstype(dictionaryService.getDickeyByName(item.getAssesstypename(), assessTypeList));
+
+            if (stringUtils.IsNullOrEmpty(item.getName()))
+                errorInfo += "请填写姓名!";
+            if (item.getSex() == null)
+                errorInfo += "请根据单元格下拉选项选择性别!";
+            if (stringUtils.IsNullOrEmpty(item.getIdcard()))
+                errorInfo += "请填写身份证号!";
+            if (stringUtils.IsNullOrEmpty(item.getPosition()))
+                errorInfo += "请填写现任职务!";
+            if (stringUtils.IsNullOrEmpty(item.getBegindate())) {
+                errorInfo += "请填写试用期开始日期!";
+            } else {
+                if (stringUtils.valueOf(item.getBegindate()).length() != 6)
+                    errorInfo += "试用期开始日期格式错误!";
+            }
+            if (stringUtils.IsNullOrEmpty(item.getEnddate())) {
+                errorInfo += "请填写试用期期满日期!";
+            } else {
+                if (stringUtils.valueOf(item.getEnddate()).length() != 6)
+                    errorInfo += "试用期期满日期格式错误!";
+            }
+            if (stringUtils.IsNullOrEmpty(item.getAssessbegindate())) {
+                errorInfo += "请填写考核开始时间!";
+            } else {
+                if (stringUtils.valueOf(item.getAssessbegindate()).length() != 6)
+                    errorInfo += "考核开始时间格式错误!";
+            }
+            if (stringUtils.IsNullOrEmpty(item.getAssessenddate())) {
+                errorInfo += "请填写考核结束时间!";
+            } else {
+                if (stringUtils.valueOf(item.getAssessenddate()).length() != 6)
+                    errorInfo += "考核结束时间格式错误!";
+            }
+
+            if (stringUtils.IsNullOrEmpty(errorInfo)) {
+                LwLeaderAssess model = new LeaderAssessVo();
+                model.setName(item.getName());
+                model.setSex(item.getSex());
+                model.setIdcard(item.getIdcard());
+                model.setBirthdate(item.getBirthdate());
+                model.setEducation(item.getEducation());
+                model.setJobtitle(item.getJobtitle());
+                model.setWorkdate(item.getWorkdate());
+                model.setPosition(item.getPosition());
+                model.setBegindate(item.getBegindate());
+                model.setEnddate(item.getEnddate());
+                model.setAssessbegindate(item.getAssessbegindate());
+                model.setAssessenddate(item.getAssessenddate());
+                model.setResult(item.getResult());
+                resultList.add(model);
+            } else {
+                item.setErrorInfo("第" + (i + 1) + "行," + errorInfo);
+                errorList.add(item);
+            }
+        }
+
+        if (errorList.size() <= 0) {
+            resultList.forEach(item -> {
+                item.setId(UUID.randomUUID().toString());
+                item.setAssesstype(assessType);
+                item.setCreateuserid(userID);
+                item.setCreatetime(new Date());
+                leaderAssessMapper.insert(item);
+            });
+        }
+
+        return errorList;
+    }
+
 }

+ 12 - 12
src/main/resources/static/app/main/app.js

@@ -3286,41 +3286,41 @@
         }).state("home.leaderAssessList2", {
             url: "leaderAssessList2",
             params: {"assessType": 2},
-            templateUrl: "../main/leaderwork/leaderassess/list.html?" + window.sysVersion,
-            controller: "leaderAssessListCtrl",
+            templateUrl: "../main/leaderwork/leaderassess2/list.html?" + window.sysVersion,
+            controller: "leaderAssessList2Ctrl",
             resolve: {
                 load: ['$ocLazyLoad', function ($ocLazyLoad) {
-                    return $ocLazyLoad.load('../main/leaderwork/leaderassess/list.js?' + window.sysVersion);
+                    return $ocLazyLoad.load('../main/leaderwork/leaderassess2/list.js?' + window.sysVersion);
                 }]
             }
         }).state("home.leaderAssessEdit2", {
             url: "leaderAssessEdit2",
             params: {"assessType": 2},
-            templateUrl: "../main/leaderwork/leaderassess/edit.html?" + window.sysVersion,
-            controller: "leaderAssessEditCtrl",
+            templateUrl: "../main/leaderwork/leaderassess2/edit.html?" + window.sysVersion,
+            controller: "leaderAssessEdit2Ctrl",
             resolve: {
                 load: ['$ocLazyLoad', function ($ocLazyLoad) {
-                    return $ocLazyLoad.load('../main/leaderwork/leaderassess/edit.js?' + window.sysVersion);
+                    return $ocLazyLoad.load('../main/leaderwork/leaderassess2/edit.js?' + window.sysVersion);
                 }]
             }
         }).state("home.leaderAssessAdd2", {
             url: "leaderAssessAdd2",
             params: {"assessType": 2},
-            templateUrl: "../main/leaderwork/leaderassess/edit.html?" + window.sysVersion,
-            controller: "leaderAssessEditCtrl",
+            templateUrl: "../main/leaderwork/leaderassess2/edit.html?" + window.sysVersion,
+            controller: "leaderAssessEdit2Ctrl",
             resolve: {
                 load: ['$ocLazyLoad', function ($ocLazyLoad) {
-                    return $ocLazyLoad.load('../main/leaderwork/leaderassess/edit.js?' + window.sysVersion);
+                    return $ocLazyLoad.load('../main/leaderwork/leaderassess2/edit.js?' + window.sysVersion);
                 }]
             }
         }).state("home.leaderAssessDetail2", {
             url: "leaderAssessDetail2",
             params: {"assessType": 2},
-            templateUrl: "../main/leaderwork/leaderassess/detail.html?" + window.sysVersion,
-            controller: "leaderAssessDetailCtrl",
+            templateUrl: "../main/leaderwork/leaderassess2/detail.html?" + window.sysVersion,
+            controller: "leaderAssessDetail2Ctrl",
             resolve: {
                 load: ['$ocLazyLoad', function ($ocLazyLoad) {
-                    return $ocLazyLoad.load('../main/leaderwork/leaderassess/detail.js?' + window.sysVersion);
+                    return $ocLazyLoad.load('../main/leaderwork/leaderassess2/detail.js?' + window.sysVersion);
                 }]
             }
         }).state("home.leaderReshuffle", {

+ 1 - 0
src/main/resources/static/app/main/leaderwork/leaderassess/edit.html

@@ -126,6 +126,7 @@
                             <th>考核结果<span style="color: red">*</span></th>
                             <td ng-class="{ 'has-error' : this.leaderAssessForm.result.$invalid &&  this.leaderAssessForm.$submitted}">
                                 <input type="text" class="form-control" name="result"
+                                       autocomplete="off" autoclose="true"
                                        ng-model="dataModel.result" ng-required="true"/>
                                 <span ng-show="this.leaderAssessForm.result.$invalid &&  this.leaderAssessForm.$submitted"
                                       class="error">必填.</span>

+ 8 - 2
src/main/resources/static/app/main/leaderwork/leaderassess/list.html

@@ -188,8 +188,14 @@
                                     <td class="text-center">{{it.assessbegindate}}</td>
                                     <td class="text-center">{{it.assessenddate}}</td>
                                     <td class="text-center">{{it.gradetypename}}</td>
-                                    <td class="text-center">{{it.result}}</td>
-                                    <td class="text-center">{{it.content}}</td>
+                                    <td class="text-center"
+                                        style="min-width: 150px !important;word-wrap: break-word;word-break: break-all;white-space: normal;">
+                                        {{it.result}}
+                                    </td>
+                                    <td class="text-center"
+                                        style="min-width: 150px !important;word-wrap: break-word;word-break: break-all;white-space: normal;">
+                                        {{it.content}}
+                                    </td>
                                 </tr>
                                 <tr ng-if="dataList.length<=0">
                                     <td colspan="18" style="text-align:center">暂无数据</td>

+ 1 - 1
src/main/resources/static/app/main/leaderwork/leaderassess/list.js

@@ -3,7 +3,7 @@
         $state.params = $bsRouterState.$params($scope);
         $scope.loginUserId = AuthUser.getUser().Id;
         $scope.isShow = false;
-        $scope.assessType = $state.params.assessType;
+        $scope.assessType = $state.params.assessType;// 1-干部任期届满考核;2-干部试用期届满考核
         $scope.pageId = "leaderAssessList" + $scope.assessType;
         $scope.tabNameAdd = "home.leaderAssessAdd" + $scope.assessType;
         $scope.tabNameEdit = "home.leaderAssessEdit" + $scope.assessType;

+ 48 - 0
src/main/resources/static/app/main/leaderwork/leaderassess2/detail.html

@@ -0,0 +1,48 @@
+<titlemenu></titlemenu>
+<div class="dj-card">
+    <div class="dj-body" activate-input activate-select>
+        <div class="card">
+                <div class="dj-formtable">
+                    <table class="dj-table dj-table3">
+                        <tr>
+                            <th>姓名</th>
+                            <td>{{dataModel.name}}</td>
+                            <th>身份证号</th>
+                            <td>{{dataModel.idcard}}</td>
+                            <th>性别</th>
+                            <td>{{dataModel.sexname}}</td>
+                        </tr>
+                        <tr>
+                            <th>出生年月</th>
+                            <td>{{dataModel.birthdate}}</td>
+                            <th>学历</th>
+                            <td>{{dataModel.education}}</td>
+                            <th>参加工作时间</th>
+                            <td>{{dataModel.workdate}}</td>
+                        </tr>
+                        <tr>
+                            <th>任期日期</th>
+                            <td>{{dataModel.begindate}}~{{dataModel.enddate}}</td>
+                            <th>职称</th>
+                            <td>{{dataModel.jobtitle}}</td>
+                            <th>现任职务</th>
+                            <td>{{dataModel.position}}</td>
+                        </tr>
+                        <tr>
+                            <th>考核时间</th>
+                            <td>{{dataModel.assessbegindate}}~{{dataModel.assessenddate}}</td>
+                            <th>考核结果</th>
+                            <td>{{dataModel.result}}</td>
+                            <td></td>
+                            <td></td>
+                        </tr>
+                    </table>
+                </div>
+                <bsfiles ng-model="reqFileModel"/>
+                <div class="form_foot">
+                    <button type="button" class="btn btn-default" ng-click="pagechange()">取消</button>
+                </div>
+            </form>
+        </div>
+    </div>
+</div>

+ 36 - 0
src/main/resources/static/app/main/leaderwork/leaderassess2/detail.js

@@ -0,0 +1,36 @@
+(function ($app) {
+    $app.module('gtPartyApp').controller('leaderAssessDetail2Ctrl', function ($scope, $http, $modal, $ocLazyLoad, $alert, $loading, $state, $bsRouterState, AuthUser, $timeout, $excel, $partySelect, $filter) {
+        $scope.editParams = $bsRouterState.$params($scope);
+        $scope.dataModel = {};
+
+        $scope.reqFileModel = {
+            selectdata: {FileRefID: '', pageindex: 1, pagesize: 10, ptotal: 0},//查询参数:FileRefID为文件关联ID
+            filetype: 71,//文件类型
+            items: [],//列表数据地址
+            readonly: true,//是否只能查看
+            title: '相关文件',
+            addFileButton: '上传'
+        };
+
+        $scope.getData = function () {
+            $http
+            ({
+                method: 'get', url: "../../api/leaderWork/leaderassess/get",
+                params: {
+                    'id': $scope.editParams.id
+                }
+            }).then(function (result) {
+                $scope.dataModel = result.data.item;
+                $scope.reqFileModel.selectdata.FileRefID = $scope.dataModel.id;
+            }, function (resp) {
+                $scope.showMsg('错误', '服务器错误:' + resp.data);
+            });
+        };
+
+        $scope.getData();
+
+        $scope.pagechange = function () {
+            $bsRouterState.$closeTab($scope);
+        };
+    });
+})(angular);

+ 137 - 0
src/main/resources/static/app/main/leaderwork/leaderassess2/edit.html

@@ -0,0 +1,137 @@
+<titlemenu></titlemenu>
+<div class="dj-card">
+    <div class="dj-body" activate-input activate-select>
+        <div class="card">
+            <form class="form-horizontal" role="form" id="leaderAssessForm"
+                  name="leaderAssessForm" ng-submit="save(leaderAssessForm.$valid)" novalidate>
+                <div class="dj-formtable">
+                    <table class="dj-table dj-table3">
+                        <tr>
+                            <th>姓名<span style="color: red">*</span></th>
+                            <td ng-class="{ 'has-error' : this.leaderAssessForm.name.$invalid &&  this.leaderAssessForm.$submitted}">
+                                <input type="text" class="form-control" name="name"
+                                       autocomplete="off" autoclose="true"
+                                       ng-model="dataModel.name" ng-required="true"/>
+                                <span ng-show="this.leaderAssessForm.name.$invalid &&  this.leaderAssessForm.$submitted"
+                                      class="error">必填.</span>
+                            </td>
+                            <th>身份证号<span style="color: red">*</span></th>
+                            <td ng-class="{ 'has-error' : this.leaderAssessForm.idcard.$invalid &&  this.leaderAssessForm.$submitted}">
+                                <input type="text" class="form-control" name="idcard"
+                                       autocomplete="off" autoclose="true" maxlength="18"
+                                       ng-model="dataModel.idcard" ng-required="true"/>
+                                <span ng-show="this.leaderAssessForm.idcard.$invalid &&  this.leaderAssessForm.$submitted"
+                                      class="error">必填.</span>
+                            </td>
+                            <th>性别</th>
+                            <td>
+                                <select class="form-control show-tick" ng-model="dataModel.sex"
+                                        ng-options="type.dickey as type.dicvalue for type in sexList"
+                                        class="form-control" name="sex">
+                                    <option value="" selected>--请选择--</option>
+                                </select>
+                            </td>
+                        </tr>
+                        <tr>
+                            <th>出生年月</th>
+                            <td>
+                                <input name="birthdate" class="form-control"
+                                       autocomplete="off" autoclose="true"
+                                       data-date-format="yyyyMM" data-date-type="string"
+                                       data-start-view="1" data-min-view="1"
+                                       ng-model="dataModel.birthdate"
+                                       placeholder="" bs-datepicker/>
+                            </td>
+                            <th>学历</th>
+                            <td>
+                                <input type="text" class="form-control" name="education"
+                                       autocomplete="off" autoclose="true"
+                                       ng-model="dataModel.education"/>
+                            </td>
+                            <th>参加工作时间</th>
+                            <td>
+                                <input name="workdate" class="form-control"
+                                       autocomplete="off" autoclose="true"
+                                       data-date-format="yyyyMM" data-date-type="string"
+                                       data-start-view="1" data-min-view="1"
+                                       ng-model="dataModel.workdate"
+                                       placeholder="" bs-datepicker/>
+                                <span ng-show="this.leaderAssessForm.workdate.$invalid &&  this.leaderAssessForm.$submitted"
+                                      class="error">必填.</span>
+                            </td>
+                        </tr>
+                        <tr>
+                            <th>试用期日期<span style="color: red;">*</span></th>
+                            <td ng-class="{ 'has-error' : (this.leaderAssessForm.begindate.$invalid || this.leaderAssessForm.enddate.$invalid) &&  this.leaderAssessForm.$submitted}">
+                                <input style="width: 90px;display: inline;" name="begindate" class="form-control"
+                                       autocomplete="off" autoclose="true"
+                                       data-date-format="yyyyMM" data-date-type="string"
+                                       data-start-view="1" data-min-view="1"
+                                       ng-model="dataModel.begindate"
+                                       ng-required="true" placeholder="" bs-datepicker/>
+                                ~
+                                <input style="width: 90px;display: inline;" name="enddate" class="form-control"
+                                       autocomplete="off" autoclose="true"
+                                       data-date-format="yyyyMM" data-date-type="string"
+                                       data-start-view="1" data-min-view="1"
+                                       ng-model="dataModel.enddate"
+                                       ng-required="true" placeholder="" bs-datepicker/>
+                                <span ng-show="(this.leaderAssessForm.begindate.$invalid || this.leaderAssessForm.enddate.$invalid) &&  this.leaderAssessForm.$submitted"
+                                      class="error">必填.</span>
+                            </td>
+                            <th>职称</th>
+                            <td>
+                                <input type="text" class="form-control" name="jobtitle"
+                                       autocomplete="off" autoclose="true"
+                                       ng-model="dataModel.jobtitle"/>
+                            </td>
+                            <th>现任职务<span style="color: red">*</span></th>
+                            <td ng-class="{ 'has-error' : this.leaderAssessForm.position.$invalid &&  this.leaderAssessForm.$submitted}">
+                                <input type="text" class="form-control" name="position"
+                                       autocomplete="off" autoclose="true"
+                                       ng-model="dataModel.position" ng-required="true"/>
+                                <span ng-show="this.leaderAssessForm.position.$invalid &&  this.leaderAssessForm.$submitted"
+                                      class="error">必填.</span>
+                            </td>
+                        </tr>
+                        <tr>
+                            <th>考核时间<span style="color: red;">*</span></th>
+                            <td ng-class="{ 'has-error' : (this.leaderAssessForm.assessbegindate.$invalid || this.leaderAssessForm.assessenddate.$invalid) &&  this.leaderAssessForm.$submitted}">
+                                <input style="width: 90px;display: inline;" name="assessbegindate" class="form-control"
+                                       autocomplete="off" autoclose="true"
+                                       data-date-format="yyyyMM" data-date-type="string"
+                                       data-start-view="1" data-min-view="1"
+                                       ng-model="dataModel.assessbegindate"
+                                       ng-required="true" placeholder="" bs-datepicker/>
+                                ~
+                                <input style="width: 90px;display: inline;" name="assessenddate" class="form-control"
+                                       autocomplete="off" autoclose="true"
+                                       data-date-format="yyyyMM" data-date-type="string"
+                                       data-start-view="1" data-min-view="1"
+                                       ng-model="dataModel.assessenddate"
+                                       ng-required="true" placeholder="" bs-datepicker/>
+                                <span ng-show="(this.leaderAssessForm.assessbegindate.$invalid || this.leaderAssessForm.assessenddate.$invalid) &&  this.leaderAssessForm.$submitted"
+                                      class="error">必填.</span>
+                            </td>
+                            <th>考核结果<span style="color: red">*</span></th>
+                            <td ng-class="{ 'has-error' : this.leaderAssessForm.result.$invalid &&  this.leaderAssessForm.$submitted}">
+                                <input type="text" class="form-control" name="result"
+                                       autocomplete="off" autoclose="true"
+                                       ng-model="dataModel.result" ng-required="true"/>
+                                <span ng-show="this.leaderAssessForm.result.$invalid &&  this.leaderAssessForm.$submitted"
+                                      class="error">必填.</span>
+                            </td>
+                            <td></td>
+                            <td></td>
+                        </tr>
+                    </table>
+                </div>
+                <bsfiles ng-model="reqFileModel"/>
+                <div class="form_foot">
+                    <button type="button" class="btn btn-default" ng-click="pagechange()">取消</button>
+                    <button type="submit" class="btn btn-primary" form="leaderAssessForm">保存</button>
+                </div>
+            </form>
+        </div>
+    </div>
+</div>

+ 90 - 0
src/main/resources/static/app/main/leaderwork/leaderassess2/edit.js

@@ -0,0 +1,90 @@
+(function ($app) {
+    $app.module('gtPartyApp').controller('leaderAssessEdit2Ctrl', function ($scope, $http, $modal, $ocLazyLoad, $alert, $loading, $state, $bsRouterState, AuthUser, $timeout, $excel, $partySelect, $filter) {
+        $scope.editParams = $bsRouterState.$params($scope);
+        $scope.dataModel = {};
+        $scope.sexList = [];
+        $scope.gradeTypeList = [];
+
+        $scope.reqFileModel = {
+            selectdata: {FileRefID: '', pageindex: 1, pagesize: 10, ptotal: 0},//查询参数:FileRefID为文件关联ID
+            filetype: 71,//文件类型
+            items: [],//列表数据地址
+            readonly: false,//是否只能查看
+            title: '相关文件',
+            addFileButton: '上传'
+        };
+
+        $scope.getData = function () {
+            $http
+            ({
+                method: 'get', url: "../../api/leaderWork/leaderassess/get",
+                params: {
+                    'id': $scope.editParams.id
+                }
+            }).then(function (result) {
+                $scope.dataModel = result.data.item;
+                $scope.dataModel.assesstype = $scope.editParams.assessType;
+                $scope.reqFileModel.selectdata.FileRefID = $scope.dataModel.id;
+                $scope.getSexList();
+                $scope.getGradeTypeList();
+            }, function (resp) {
+                $scope.showMsg('错误', '服务器错误:' + resp.data);
+            });
+        };
+
+        $scope.save = function (isflag) {
+            if (isflag) {
+                $loading.show();
+                $http({
+                    method: "post",
+                    url: "../../api/leaderWork/leaderassess/save",
+                    data: $scope.dataModel
+                }).then(function (result) {
+                    $loading.hide();
+                    if (result.data.success) {
+                        $scope.showMsg('成功', "操作成功");
+                        //重新刷新列表
+                        $scope.pagechange();
+                        $scope.$emit("tabReloadData", {name: 'leaderAssessList2Ctrl', data: 1});
+                    } else {
+                        $scope.showMsg('失败', result.data.msg);
+                    }
+                }, function (resp) {
+                    $loading.hide();
+                    $scope.showMsg('错误', '服务器错误:' + resp.data);
+                });
+            }
+        };
+
+        $scope.getSexList = function () {
+            $http({
+                method: 'get',
+                url: '../../api/dictionary/getDictionaryListByDicTypeKey',
+                params: {
+                    dicTypeKey: 'dic_sex'
+                }
+            }).then(function (result) {
+                $scope.sexList = result.data;
+            });
+        };
+
+        $scope.getGradeTypeList = function () {
+            $http({
+                method: 'get',
+                url: '../../api/dictionary/getDictionaryListByDicTypeKey',
+                params: {
+                    dicTypeKey: 'gradeType'
+                }
+            }).then(function (result) {
+                $scope.gradeTypeList = result.data;
+            });
+        };
+
+        $scope.pagechange = function () {
+            $bsRouterState.$closeTab($scope);
+        };
+
+        $scope.getData();
+
+    });
+})(angular);

+ 206 - 0
src/main/resources/static/app/main/leaderwork/leaderassess2/list.html

@@ -0,0 +1,206 @@
+<titlemenu></titlemenu>
+<div class="dj-list">
+    <div class="dj-list-body">
+        <div class="dj-list-content">
+            <div class="card">
+                <div activate-input activate-select class="header search-header">
+                    <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">
+                                                <input name="name" class="form-control" type="text"
+                                                       ng-keypress="($event.which === 13)?search():0"
+                                                       ng-model="selectparams.name"
+                                                       placeholder=""/>
+
+                                            </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">
+                                                <input name="idCard" class="form-control" type="text"
+                                                       ng-keypress="($event.which === 13)?search():0"
+                                                       ng-model="selectparams.idCard" maxlength="18"
+                                                       placeholder=""/>
+                                            </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">
+                                                <input name="position" class="form-control" type="text"
+                                                       ng-keypress="($event.which === 13)?search():0"
+                                                       ng-model="selectparams.position"
+                                                       placeholder=""/>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="row clearfix form-inline" ng-if="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">
+                                                <input name="assessBeginDate" class="form-control fm-ct-first"
+                                                       autocomplete="off"
+                                                       autoclose="true"
+                                                       data-date-format="yyyyMM" data-date-type="string"
+                                                       data-min-view="1" data-start-view="1"
+                                                       ng-model="selectparams.assessBeginDate"
+                                                       ng-change="search()"
+                                                       placeholder="" bs-datepicker/>
+                                                <input name="assessEndDate" class="form-control fm-ct-last"
+                                                       autocomplete="off"
+                                                       autoclose="true"
+                                                       data-date-format="yyyyMM" data-date-type="string"
+                                                       data-min-view="1" data-start-view="1"
+                                                       ng-model="selectparams.assessEndDate"
+                                                       ng-change="search()"
+                                                       placeholder="" bs-datepicker/>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </form>
+                        </div>
+                        <div class="search-btn" style="margin-right: 20px;">
+                            <div style="min-width: 13em">
+                                <span class="moreSpan" ng-click="isShow = !isShow"
+                                      style='padding-right:1em;cursor:pointer;'>
+                                    {{isShow ? "收起" : "更多"}}<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"
+                                        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="add()">新增
+                            </button>
+                            <button class="btn btn-default1"
+                                    ng-click="delete()">删除
+                            </button>
+                            <button class="btn btn-default1"
+                                    ng-click="import()">导入
+                            </button>
+                            <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 class="th-rownum">
+                                        <div>序号</div>
+                                    </th>
+                                    <th>姓名</th>
+                                    <th>性别</th>
+                                    <th>身份证号</th>
+                                    <th>出生年月</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 class="text-center" td-rownum index="$index" pageindex="selectparams.pageindex"
+                                        pagesize="selectparams.pagesize"></td>
+                                    <td class="text-center">{{it.name}}</td>
+                                    <td class="text-center">{{it.sexname}}</td>
+                                    <td class="text-center">{{it.idcard}}</td>
+                                    <td class="text-center">{{it.birthdate}}</td>
+                                    <td class="text-center">{{it.education}}</td>
+                                    <td class="text-center">{{it.jobtitle}}</td>
+                                    <td class="text-center">{{it.workdate}}</td>
+                                    <td class="text-center">{{it.position}}</td>
+                                    <td class="text-center">{{it.begindate}}</td>
+                                    <td class="text-center">{{it.enddate}}</td>
+                                    <td class="text-center">{{it.assessbegindate}}</td>
+                                    <td class="text-center">{{it.assessenddate}}</td>
+                                    <td class="text-center"
+                                        style="min-width: 150px !important;word-wrap: break-word;word-break: break-all;white-space: normal;">
+                                        {{it.result}}
+                                    </td>
+                                </tr>
+                                <tr ng-if="dataList.length<=0">
+                                    <td colspan="18" 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>
+                                <tr>
+                                    <th>操作</th>
+                                </tr>
+                                </thead>
+                                <tbody>
+                                <tr ng-repeat="it in dataList" zero-table-height>
+                                    <td>
+                                        <button class="btn td-btn bg-light-green waves-effect"
+                                                ng-click="detail(it.id)"
+                                                title="查看">
+                                            查看
+                                        </button>
+                                        <button class="btn td-btn bg-light-green waves-effect"
+                                                ng-click="edit(it.id)"
+                                                title="修改">
+                                            修改
+                                        </button>
+                                    </td>
+                                </tr>
+                                <tr ng-if="pageInfo.ptotal==0">
+                                    <td colspan="1" style="text-align:center">无</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>

+ 210 - 0
src/main/resources/static/app/main/leaderwork/leaderassess2/list.js

@@ -0,0 +1,210 @@
+(function ($app) {
+    $app.module('gtPartyApp').controller('leaderAssessList2Ctrl', function ($scope, $http, $modal, $ocLazyLoad, $alert, $loading, $state, $bsRouterState, AuthUser, $timeout, $excel, $partySelect, $filter) {
+        $state.params = $bsRouterState.$params($scope);
+        $scope.loginUserId = AuthUser.getUser().Id;
+        $scope.isShow = false;
+        $scope.assessType = $state.params.assessType;// 1-干部任期届满考核;2-干部试用期届满考核
+        $scope.pageId = "leaderAssessList" + $scope.assessType;
+        $scope.tabNameAdd = "home.leaderAssessAdd" + $scope.assessType;
+        $scope.tabNameEdit = "home.leaderAssessEdit" + $scope.assessType;
+        $scope.tabNameDetail = "home.leaderAssessDetail" + $scope.assessType;
+
+        $scope.dataList = [];
+        $scope.selectparams = {
+            pageindex: 1,
+            pagesize: 10,
+            assessType: $scope.assessType,
+            name: '',
+            idCard: '',
+            position: '',
+            grade: '',
+            beginDate: null,
+            endDate: null,
+            assessBeginDate: null,
+            assessEndDate: null
+        };
+        $scope.resetSelectparams = angular.copy($scope.selectparams);
+        $scope.pageInfo = {ptotal: 0};
+        $scope.gradeTypeList = [];
+
+        $scope.$on('tabChildReloadData', function (event, data) {
+            if (data.name == 'leaderAssessList2Ctrl') {
+                $scope.getList();
+            }
+        });
+
+        //加载列表数据
+        $scope.getList = function () {
+            $http
+            ({
+                method: 'get', url: '../../api/leaderWork/leaderassess/getList', params: $scope.selectparams
+            }).then(function (result) {
+                $scope.dataList = result.data.item.list;
+                $scope.pageInfo.ptotal = result.data.item.total;
+            }, function (res) {
+                $scope.showMsg('错误', '服务器错误');
+            });
+        };
+
+        $scope.search = function () {
+            $scope.getList();
+        };
+
+        $scope.export = function () {
+            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/leaderWork/leaderassess/export2' + params);
+        };
+
+        $scope.excelConfig = {
+            filetype: 1,
+            columns: {
+                '姓名': 'name',
+                '性别': 'sexname',
+                '身份证号': 'idcard',
+                '出生年月': 'birthdate',
+                '学历': 'education',
+                '职称': 'jobtitle',
+                '参加工作时间': 'workdate',
+                '现任职务': 'position',
+                '试用期开始日期': 'begindate',
+                '试用期期满日期': 'enddate',
+                '考核开始时间': 'assessbegindate',
+                '考核结束时间': 'assessenddate',
+                '考核结果': 'result'
+            },
+            errorcolumns: {
+                'name': '姓名',
+                'idcard': '身份证号',
+                'position': '现任职务',
+                'education': '学历',
+                'errorInfo': '错误信息'
+            },
+            readonly: false,
+            templateUrl: '/doc/template/' + ($scope.assessType == 1 ? "干部任期届满考核导入模板.xlsx" : "干部试用期届满考核导入模板.xlsx")
+        };
+
+        $scope.import = function () {
+            $excel.addFile($scope.excelConfig).then(function (items) {
+                $loading.show();
+                $http({
+                    method: "post",
+                    url: "../../api/leaderWork/leaderassess/import2",
+                    data: {
+                        dataList: JSON.stringify(items),
+                        assessType: $scope.assessType
+                    }
+                }).then(function (result) {
+                    $loading.hide();
+                    if (result.data.success) {
+                        $scope.getList();
+                        $scope.showMsg('成功', result.data.msg, 3);
+                    } else {
+                        if (result.data.item.length > 0) {
+                            $scope.showMsg('错误', '导入失败,存在错误数据,请修改后重新导入!', 20);
+                            $excel.showErrorInfo(result.data.item);
+                        } else {
+                            $scope.showMsg(result.data.msg);
+                        }
+                    }
+                }, function (resp) {
+                    $loading.hide();
+                    $scope.showMsg('错误', '服务器错误');
+                });
+            });
+        };
+
+        $scope.delete = function (id) {
+            var ids = [];
+            if (id)
+                ids.push(id);
+            else
+                ids = $scope.dataList.filter(it => it.rowChecked == true).map(it => it.id);
+
+            if (ids.length == 0) {
+                $scope.showMsg('消息', "请选择需要删除的数据");
+                return false;
+            }
+
+            if (confirm("确定删除?")) {
+                $loading.show();
+                $http({
+                    method: "post",
+                    url: "../../api/leaderWork/leaderassess/delete",
+                    data: {
+                        ids: JSON.stringify(ids)
+                    }
+                }).then(function (result) {
+                    $loading.hide();
+                    if (result.data.success) {
+                        $scope.showMsg('成功', result.data.msg);
+                        //重新刷新列表
+                        $scope.getList();
+                    } else {
+                        $scope.showMsg('失败', result.data.msg);
+                    }
+                }, function (resp) {
+                    $scope.showMsg('错误', '服务器错误');
+                });
+            }
+        };
+
+        $scope.add = function () {
+            $bsRouterState.$closeTabName($scope.tabNameAdd);
+            $timeout(function () {
+                $bsRouterState.go($scope.tabNameAdd, {
+                    id: '',
+                    assessType: $scope.assessType
+                });
+            }, 100);
+        };
+
+        $scope.edit = function (id) {
+            $bsRouterState.$closeTabName($scope.tabNameEdit);
+            $timeout(function () {
+                $bsRouterState.go($scope.tabNameEdit, {
+                    id: id,
+                    assessType: $scope.assessType
+                });
+            }, 100);
+        };
+
+        $scope.detail = function (id) {
+            $bsRouterState.$closeTabName($scope.tabNameDetail);
+            $timeout(function () {
+                $bsRouterState.go($scope.tabNameDetail, {
+                    id: id,
+                    assessType: $scope.assessType
+                });
+            }, 100);
+        };
+
+        $scope.getGradeTypeList = function () {
+            $http({
+                method: 'get',
+                url: '../../api/dictionary/getDictionaryListByDicTypeKey',
+                params: {
+                    dicTypeKey: 'gradeType'
+                }
+            }).then(function (result) {
+                $scope.gradeTypeList = result.data;
+            });
+        };
+
+        $scope.$watch("selectparams.pageindex", function (newVal, oldVal) {
+            if ($scope.pageInfo.ptotal > 0) {
+                $scope.getList();
+            }
+        });
+        $scope.reset = function () {
+            $scope.selectparams = angular.copy($scope.resetSelectparams);
+            $scope.getList();
+        };
+
+        $scope.getList();
+        $scope.getGradeTypeList();
+    });
+})(angular);