Commit e792f4e7 authored by 廖旭伟's avatar 廖旭伟

新增功能:窗口绩效汇总登记表

parent 414ffd28
...@@ -12,6 +12,9 @@ import com.mortals.xhx.module.staff.model.*; ...@@ -12,6 +12,9 @@ import com.mortals.xhx.module.staff.model.*;
import com.mortals.xhx.module.staff.service.StaffPerformStatService; import com.mortals.xhx.module.staff.service.StaffPerformStatService;
import com.mortals.xhx.module.staff.service.StaffPerformSummaryService; import com.mortals.xhx.module.staff.service.StaffPerformSummaryService;
import com.mortals.xhx.module.staff.service.StaffService; import com.mortals.xhx.module.staff.service.StaffService;
import com.mortals.xhx.module.window.model.WindowPerformSummaryEntity;
import com.mortals.xhx.module.window.model.WindowPerformSummaryQuery;
import com.mortals.xhx.module.window.service.WindowPerformSummaryService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -38,6 +41,8 @@ public class StaffPerformInitDataTaskImpl implements ITaskExcuteService { ...@@ -38,6 +41,8 @@ public class StaffPerformInitDataTaskImpl implements ITaskExcuteService {
private HolidayService holidayService; private HolidayService holidayService;
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired
private WindowPerformSummaryService windowPerformSummaryService;
@Override @Override
public void excuteTask(ITask task) throws AppException { public void excuteTask(ITask task) throws AppException {
...@@ -161,6 +166,13 @@ public class StaffPerformInitDataTaskImpl implements ITaskExcuteService { ...@@ -161,6 +166,13 @@ public class StaffPerformInitDataTaskImpl implements ITaskExcuteService {
}); });
staffPerformSummaryService.save(summaryList); staffPerformSummaryService.save(summaryList);
} }
//初始化部门窗口绩效
List<WindowPerformSummaryEntity> list = windowPerformSummaryService.find(new WindowPerformSummaryQuery().year(year).month(month));
if(CollectionUtils.isEmpty(list)) {
windowPerformSummaryService.initWindowPerformSummary(year,month);
}
} }
} }
......
package com.mortals.xhx.module.window.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.window.model.WindowPerformSummaryEntity;
import java.util.List;
/**
* 窗口绩效汇总登记Dao
* 窗口绩效汇总登记 DAO接口
*
* @author zxfei
* @date 2025-03-10
*/
public interface WindowPerformSummaryDao extends ICRUDDao<WindowPerformSummaryEntity,Long>{
}
package com.mortals.xhx.module.window.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.window.dao.WindowPerformSummaryDao;
import com.mortals.xhx.module.window.model.WindowPerformSummaryEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 窗口绩效汇总登记DaoImpl DAO接口
*
* @author zxfei
* @date 2025-03-10
*/
@Repository("windowPerformSummaryDao")
public class WindowPerformSummaryDaoImpl extends BaseCRUDDaoMybatis<WindowPerformSummaryEntity,Long> implements WindowPerformSummaryDao {
}
package com.mortals.xhx.module.window.model;
import java.math.BigDecimal;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.window.model.vo.WindowPerformSummaryVo;
import lombok.Data;
/**
* 窗口绩效汇总登记实体对象
*
* @author zxfei
* @date 2025-03-10
*/
@Data
public class WindowPerformSummaryEntity extends WindowPerformSummaryVo {
private static final long serialVersionUID = 1L;
/**
* 考核年度
*/
@Excel(name = "考核年度")
private Integer year;
/**
* 考核月份
*/
@Excel(name = "考核月份")
private Integer month;
/**
* 入驻部门id
*/
private Long deptId;
/**
* 入驻部门名称
*/
@Excel(name = "入驻部门(单位名称)")
private String deptName;
/**
* 窗口建设得分
*/
@Excel(name = "窗口建设得分")
private BigDecimal ckjsdf;
/**
* 重点任务推进得分
*/
@Excel(name = "重点任务推进得分")
private BigDecimal zdrwdf;
/**
* 加分
*/
@Excel(name = "加分")
private BigDecimal addTotalScore;
/**
* 合计得分
*/
@Excel(name = "合计得分")
private BigDecimal sumScore;
/**
* 评选建议
*/
@Excel(name = "评选建议", readConverterExp = "0=无,1=红旗窗口")
private Integer suggestion;
/**
* 备注
*/
@Excel(name = "备注")
private String remark;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof WindowPerformSummaryEntity) {
WindowPerformSummaryEntity tmp = (WindowPerformSummaryEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.year = DateUtil.year(new Date());
this.month = DateUtil.month(new Date())+1;
this.deptId = null;
this.deptName = "";
this.ckjsdf = null;
this.zdrwdf = null;
this.addTotalScore = BigDecimal.ZERO;
this.sumScore = BigDecimal.ZERO;
this.suggestion = 0;
this.remark = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.window.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.window.model.WindowPerformSummaryEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 窗口绩效汇总登记视图对象
*
* @author zxfei
* @date 2025-03-10
*/
@Data
public class WindowPerformSummaryVo extends BaseEntityLong {
/** 序号,主键,自增长列表 */
private List <Long> idList;
}
\ No newline at end of file
package com.mortals.xhx.module.window.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.window.model.WindowPerformSummaryEntity;
import com.mortals.xhx.module.window.dao.WindowPerformSummaryDao;
/**
* WindowPerformSummaryService
*
* 窗口绩效汇总登记 service接口
*
* @author zxfei
* @date 2025-03-10
*/
public interface WindowPerformSummaryService extends ICRUDService<WindowPerformSummaryEntity,Long>{
WindowPerformSummaryDao getDao();
/***
* 初始化绩效数据
* @param year
* @param month
*/
void initWindowPerformSummary(int year,int month);
}
\ No newline at end of file
package com.mortals.xhx.module.window.service.impl;
import com.mortals.xhx.module.window.model.WindowPerformSummaryQuery;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.function.Function;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.window.dao.WindowPerformSummaryDao;
import com.mortals.xhx.module.window.model.WindowPerformSummaryEntity;
import com.mortals.xhx.module.window.service.WindowPerformSummaryService;
import lombok.extern.slf4j.Slf4j;
/**
* WindowPerformSummaryService
* 窗口绩效汇总登记 service实现
*
* @author zxfei
* @date 2025-03-10
*/
@Service("windowPerformSummaryService")
@Slf4j
public class WindowPerformSummaryServiceImpl extends AbstractCRUDServiceImpl<WindowPerformSummaryDao, WindowPerformSummaryEntity, Long> implements WindowPerformSummaryService {
@Override
public void initWindowPerformSummary(int year, int month) {
List<WindowPerformSummaryEntity> addList = new ArrayList<>();
String[] depts = {"市公安局出入境管理支队", "市医保局", "市人力资源社会保障局", "市住房公积金中心叙州区管理部", "市应急管理局", "市公安局交警支队", "市市场监管局", "市不动产登记中心", "市交通运输局", "市住房城乡建设局", "市自然资源规划局", "市水利局", "宜宾市税务局", "宜宾市消防救援支队", "叙州区住房保障和房地产事务中心", "市民政局", "市生态环境局", "市卫生健康委", "市司法局", "市公安局治安(户政)支队", "市国动办", "市发展改革委", "中行宜宾叙府支行", "邮政公司叙州区分公司", "市合力公证处", "宜宾市商业银行", "市气象局", "国网叙州供电分公司", "市文广旅游局", "市退役军人局", "市商务局", "市科技局", "市邮政管理局", "市烟草专卖局", "市教育体育局", "市地震监测中心", "市委统战部(市民宗局、市侨务办)", "市宣传部(市新闻出版局﹤市版权局﹥)", "市委办(市档案局)", "市委编办", "市经济和信息化局", "市竹业林业局", "市农业农村局", "市残联", "市财政局", "市中医药管理局", "宜宾华润燃气有限公司", "宜宾农村商业银行", "市金融工作局"};
for(String deptName:depts){
WindowPerformSummaryEntity entity = new WindowPerformSummaryEntity();
entity.initAttrValue();
entity.setYear(year);
entity.setMonth(month);
entity.setDeptName(deptName);
entity.setCreateTime(new Date());
entity.setCreateUserId(1L);
addList.add(entity);
}
this.save(addList);
}
}
\ No newline at end of file
package com.mortals.xhx.module.window.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.window.model.WindowPerformSummaryEntity;
import com.mortals.xhx.module.window.service.WindowPerformSummaryService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* 窗口绩效汇总登记
*
* @author zxfei
* @date 2025-03-10
*/
@RestController
@RequestMapping("window/perform/summary")
public class WindowPerformSummaryController extends BaseCRUDJsonBodyMappingController<WindowPerformSummaryService,WindowPerformSummaryEntity,Long> {
@Autowired
private ParamService paramService;
public WindowPerformSummaryController(){
super.setModuleDesc( "窗口绩效汇总登记");
}
@Override
protected void init(Map<String, Object> model, Context context) {
Map<String, String> suggestion = new HashMap<>();
suggestion.put("0","无");
suggestion.put("1","红旗窗口");
this.addDict(model, "suggestion", suggestion);
super.init(model, context);
}
// @Override
// protected void doListAfter(WindowPerformSummaryEntity query, List<WindowPerformSummaryEntity> list, Context context) throws AppException {
// super.doListAfter(query, list, context);
// if(CollectionUtils.isEmpty(list)) {
// if (query.getYear() != null && query.getMonth() != null) {
// this.service.initWindowPerformSummary(query.getYear(),query.getMonth());
// }
// }
// }
}
\ No newline at end of file
...@@ -1349,4 +1349,30 @@ ALTER TABLE `mortals_xhx_staff_perform_summary` ...@@ -1349,4 +1349,30 @@ ALTER TABLE `mortals_xhx_staff_perform_summary`
-- ---------------------------- -- ----------------------------
ALTER TABLE `mortals_xhx_staff_perform_summary` ALTER TABLE `mortals_xhx_staff_perform_summary`
ADD COLUMN `auditLevel` varchar(128) COMMENT '政务服务管理科审核等次' AFTER `sumScore`, ADD COLUMN `auditLevel` varchar(128) COMMENT '政务服务管理科审核等次' AFTER `sumScore`,
ADD COLUMN `recommend` varchar(128) COMMENT '服务明星推荐' AFTER `auditLevel`; ADD COLUMN `recommend` varchar(128) COMMENT '服务明星推荐' AFTER `auditLevel`;
\ No newline at end of file
-- ----------------------------
-- 2025-03-10窗口绩效汇总登记表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_window_perform_summary`;
CREATE TABLE mortals_xhx_window_perform_summary(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`year` int(8) COMMENT '考核年度',
`month` int(4) COMMENT '考核月份',
`deptId` bigint(20) COMMENT '入驻部门id',
`deptName` varchar(256) COMMENT '入驻部门名称',
`ckjsdf` decimal(10,2) COMMENT '窗口建设得分',
`zdrwdf` decimal(10,2) COMMENT '重点任务推进得分',
`addTotalScore` decimal(10,2) COMMENT '加分',
`sumScore` decimal(10,2) COMMENT '合计得分',
`suggestion` int(4) COMMENT '评选建议',
`remark` varchar(256) COMMENT '备注',
`createUserId` bigint(20) COMMENT '创建用户',
`createTime` datetime COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
,KEY `year` (`year`) USING BTREE
,KEY `deptName` (`deptName`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='窗口绩效汇总登记';
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment