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

邛崃需求

parent c9c577c0
......@@ -30,7 +30,7 @@ public enum LeaveTypeEnum {
育儿假(19, "育儿假"),
调回单位(20, "调回单位"),
探亲假(21, "探亲假"),
其他(22, "其他"),
其他(22, "其他"),
上年公休结余(23, "上年公休结余"),
独生子女陪护假(24, "独生子女陪护假,"),
陪护假(25, "陪护假"),
......
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
public enum TimeTypeEnum {
按月(0, "按月"),
按季度(1, "按季度"),
按年(2, "按年");
private Integer value;
private String desc;
TimeTypeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static TimeTypeEnum getByValue(Integer value) {
for (TimeTypeEnum timeTypeEnum : TimeTypeEnum.values()) {
if (timeTypeEnum.getValue() == value) {
return timeTypeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (TimeTypeEnum item : TimeTypeEnum.values()) {
try {
boolean hasE = false;
for (Integer e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
......@@ -86,6 +86,14 @@ public class WindowWorkmanPerformEntity extends WindowWorkmanPerformVo {
* 窗口编号
*/
private String windowCode;
/**
* 考核季度
*/
private Integer season;
/**
* 时间类型(0,按月,1按季度,2按年)
*/
private Integer timeType;
/**
* 窗口人员考核汇总明细信息
*/
......@@ -130,5 +138,7 @@ public class WindowWorkmanPerformEntity extends WindowWorkmanPerformVo {
this.fillDate = new Date();
this.fillStatus = 0;
this.windowCode = "";
this.season = null;
this.timeType = 0;
}
}
\ No newline at end of file
package com.mortals.xhx.module.window.model;
import java.util.List;
import java.util.Date;
import java.util.List;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformEntity;
......@@ -8,7 +7,7 @@ import com.mortals.xhx.module.window.model.WindowWorkmanPerformEntity;
* 窗口人员考核汇总登记查询对象
*
* @author zxfei
* @date 2024-01-27
* @date 2025-04-08
*/
public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity {
/** 开始 序号,主键,自增长 */
......@@ -219,6 +218,36 @@ public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity {
/** 窗口编号排除列表 */
private List <String> windowCodeNotList;
/** 开始 考核季度 */
private Integer seasonStart;
/** 结束 考核季度 */
private Integer seasonEnd;
/** 增加 考核季度 */
private Integer seasonIncrement;
/** 考核季度列表 */
private List <Integer> seasonList;
/** 考核季度排除列表 */
private List <Integer> seasonNotList;
/** 开始 时间类型(0,按月,1按季度,2按年) */
private Integer timeTypeStart;
/** 结束 时间类型(0,按月,1按季度,2按年) */
private Integer timeTypeEnd;
/** 增加 时间类型(0,按月,1按季度,2按年) */
private Integer timeTypeIncrement;
/** 时间类型(0,按月,1按季度,2按年)列表 */
private List <Integer> timeTypeList;
/** 时间类型(0,按月,1按季度,2按年)排除列表 */
private List <Integer> timeTypeNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<WindowWorkmanPerformQuery> orConditionList;
......@@ -1389,6 +1418,168 @@ public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity {
this.windowCodeNotList = windowCodeNotList;
}
/**
* 获取 开始 考核季度
* @return seasonStart
*/
public Integer getSeasonStart(){
return this.seasonStart;
}
/**
* 设置 开始 考核季度
* @param seasonStart
*/
public void setSeasonStart(Integer seasonStart){
this.seasonStart = seasonStart;
}
/**
* 获取 结束 考核季度
* @return $seasonEnd
*/
public Integer getSeasonEnd(){
return this.seasonEnd;
}
/**
* 设置 结束 考核季度
* @param seasonEnd
*/
public void setSeasonEnd(Integer seasonEnd){
this.seasonEnd = seasonEnd;
}
/**
* 获取 增加 考核季度
* @return seasonIncrement
*/
public Integer getSeasonIncrement(){
return this.seasonIncrement;
}
/**
* 设置 增加 考核季度
* @param seasonIncrement
*/
public void setSeasonIncrement(Integer seasonIncrement){
this.seasonIncrement = seasonIncrement;
}
/**
* 获取 考核季度
* @return seasonList
*/
public List<Integer> getSeasonList(){
return this.seasonList;
}
/**
* 设置 考核季度
* @param seasonList
*/
public void setSeasonList(List<Integer> seasonList){
this.seasonList = seasonList;
}
/**
* 获取 考核季度
* @return seasonNotList
*/
public List<Integer> getSeasonNotList(){
return this.seasonNotList;
}
/**
* 设置 考核季度
* @param seasonNotList
*/
public void setSeasonNotList(List<Integer> seasonNotList){
this.seasonNotList = seasonNotList;
}
/**
* 获取 开始 时间类型(0,按月,1按季度,2按年)
* @return timeTypeStart
*/
public Integer getTimeTypeStart(){
return this.timeTypeStart;
}
/**
* 设置 开始 时间类型(0,按月,1按季度,2按年)
* @param timeTypeStart
*/
public void setTimeTypeStart(Integer timeTypeStart){
this.timeTypeStart = timeTypeStart;
}
/**
* 获取 结束 时间类型(0,按月,1按季度,2按年)
* @return $timeTypeEnd
*/
public Integer getTimeTypeEnd(){
return this.timeTypeEnd;
}
/**
* 设置 结束 时间类型(0,按月,1按季度,2按年)
* @param timeTypeEnd
*/
public void setTimeTypeEnd(Integer timeTypeEnd){
this.timeTypeEnd = timeTypeEnd;
}
/**
* 获取 增加 时间类型(0,按月,1按季度,2按年)
* @return timeTypeIncrement
*/
public Integer getTimeTypeIncrement(){
return this.timeTypeIncrement;
}
/**
* 设置 增加 时间类型(0,按月,1按季度,2按年)
* @param timeTypeIncrement
*/
public void setTimeTypeIncrement(Integer timeTypeIncrement){
this.timeTypeIncrement = timeTypeIncrement;
}
/**
* 获取 时间类型(0,按月,1按季度,2按年)
* @return timeTypeList
*/
public List<Integer> getTimeTypeList(){
return this.timeTypeList;
}
/**
* 设置 时间类型(0,按月,1按季度,2按年)
* @param timeTypeList
*/
public void setTimeTypeList(List<Integer> timeTypeList){
this.timeTypeList = timeTypeList;
}
/**
* 获取 时间类型(0,按月,1按季度,2按年)
* @return timeTypeNotList
*/
public List<Integer> getTimeTypeNotList(){
return this.timeTypeNotList;
}
/**
* 设置 时间类型(0,按月,1按季度,2按年)
* @param timeTypeNotList
*/
public void setTimeTypeNotList(List<Integer> timeTypeNotList){
this.timeTypeNotList = timeTypeNotList;
}
/**
* 设置 序号,主键,自增长
* @param id
......@@ -2084,6 +2275,114 @@ public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity {
return this;
}
/**
* 设置 考核季度
* @param season
*/
public WindowWorkmanPerformQuery season(Integer season){
setSeason(season);
return this;
}
/**
* 设置 开始 考核季度
* @param seasonStart
*/
public WindowWorkmanPerformQuery seasonStart(Integer seasonStart){
this.seasonStart = seasonStart;
return this;
}
/**
* 设置 结束 考核季度
* @param seasonEnd
*/
public WindowWorkmanPerformQuery seasonEnd(Integer seasonEnd){
this.seasonEnd = seasonEnd;
return this;
}
/**
* 设置 增加 考核季度
* @param seasonIncrement
*/
public WindowWorkmanPerformQuery seasonIncrement(Integer seasonIncrement){
this.seasonIncrement = seasonIncrement;
return this;
}
/**
* 设置 考核季度
* @param seasonList
*/
public WindowWorkmanPerformQuery seasonList(List<Integer> seasonList){
this.seasonList = seasonList;
return this;
}
/**
* 设置 考核季度
* @param seasonNotList
*/
public WindowWorkmanPerformQuery seasonNotList(List<Integer> seasonNotList){
this.seasonNotList = seasonNotList;
return this;
}
/**
* 设置 时间类型(0,按月,1按季度,2按年)
* @param timeType
*/
public WindowWorkmanPerformQuery timeType(Integer timeType){
setTimeType(timeType);
return this;
}
/**
* 设置 开始 时间类型(0,按月,1按季度,2按年)
* @param timeTypeStart
*/
public WindowWorkmanPerformQuery timeTypeStart(Integer timeTypeStart){
this.timeTypeStart = timeTypeStart;
return this;
}
/**
* 设置 结束 时间类型(0,按月,1按季度,2按年)
* @param timeTypeEnd
*/
public WindowWorkmanPerformQuery timeTypeEnd(Integer timeTypeEnd){
this.timeTypeEnd = timeTypeEnd;
return this;
}
/**
* 设置 增加 时间类型(0,按月,1按季度,2按年)
* @param timeTypeIncrement
*/
public WindowWorkmanPerformQuery timeTypeIncrement(Integer timeTypeIncrement){
this.timeTypeIncrement = timeTypeIncrement;
return this;
}
/**
* 设置 时间类型(0,按月,1按季度,2按年)
* @param timeTypeList
*/
public WindowWorkmanPerformQuery timeTypeList(List<Integer> timeTypeList){
this.timeTypeList = timeTypeList;
return this;
}
/**
* 设置 时间类型(0,按月,1按季度,2按年)
* @param timeTypeNotList
*/
public WindowWorkmanPerformQuery timeTypeNotList(List<Integer> timeTypeNotList){
this.timeTypeNotList = timeTypeNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -48,5 +48,13 @@ public class WindowPerformAllVo extends BaseEntityLong {
* 窗口编号
*/
private String windowCode;
/**
* 考核季度
*/
private Integer season;
/**
* 时间类型(0,按月,1按季度,2按年)
*/
private Integer timeType;
}
\ No newline at end of file
......@@ -22,4 +22,13 @@ public class WindowPerformVo extends BaseEntityLong {
private String formName = WorkmanPerformTypeEnum.市政务服务大厅窗口考核登记表.getDesc();
private Integer formType = WorkmanPerformTypeEnum.市政务服务大厅窗口考核登记表.getValue();
/**
* 考核季度
*/
private Integer season;
/**
* 时间类型(0,按月,1按季度,2按年)
*/
private Integer timeType;
}
\ No newline at end of file
......@@ -45,6 +45,8 @@ public interface WindowOwnerService extends ICRUDService<WindowOwnerEntity, Long
Rest<List<StaffEntity>> getWindowPerson(Long windowId, Context context);
Rest<List<String>> getPerformYearList(Context context);
Rest<List<String>> getPerformSeasonList(Context context);
Rest<List<String>> getPerformMonthList(Context context);
/**
......
......@@ -9,6 +9,7 @@ import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.TimeTypeEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.pdu.RespData;
import com.mortals.xhx.common.pdu.window.WindowPdu;
......@@ -238,6 +239,89 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
}
@Override
public Rest<List<String>> getPerformYearList(Context context) {
Set<String> collectSet = new HashSet<>();
//查询所有窗口汇总表
WindowPerformQuery windowPerformQuery = new WindowPerformQuery();
windowPerformQuery.setOwnerId(context.getUser().getCustomerId());
windowPerformQuery.setOrderColList(Arrays.asList(new OrderCol("year", OrderCol.DESCENDING), new OrderCol("month", OrderCol.DESCENDING)));
Map<String, List<WindowPerformEntity>> collect = windowPerformService.find(windowPerformQuery).stream().collect(Collectors.groupingBy(item -> item.getYear() + "年"));
Set<String> performMonthSet = collect.keySet();
collectSet.addAll(performMonthSet);
//查询所有窗口人员汇总表
WindowWorkmanPerformQuery windowWorkmanPerformQuery = new WindowWorkmanPerformQuery();
windowWorkmanPerformQuery.setOwnerId(context.getUser().getCustomerId());
windowWorkmanPerformQuery.setTimeType(TimeTypeEnum.按年.getValue());
Map<String, List<WindowWorkmanPerformEntity>> workmanMonthSet = windowWorkmanPerformService.find(windowWorkmanPerformQuery).stream().collect(Collectors.groupingBy(item -> item.getYear() + "年"));
collectSet.addAll(workmanMonthSet.keySet());
//perform 排序 降序
List<String> dateList = collectSet.stream().collect(Collectors.toList());
Collections.sort(dateList, new Comparator<String>() {
@Override
public int compare(String object1, String object2) {
return object1.compareTo(object2);
}
});
return Rest.ok(dateList);
}
@Override
public Rest<List<String>> getPerformSeasonList(Context context) {
Set<String> collectSet = new HashSet<>();
//查询所有窗口汇总表
WindowPerformQuery windowPerformQuery = new WindowPerformQuery();
windowPerformQuery.setOwnerId(context.getUser().getCustomerId());
windowPerformQuery.setOrderColList(Arrays.asList(new OrderCol("year", OrderCol.DESCENDING), new OrderCol("month", OrderCol.DESCENDING)));
Map<String, List<WindowPerformEntity>> collect = windowPerformService.find(windowPerformQuery).stream().collect(Collectors.groupingBy(item -> item.getYear() + "年" + getSeasonByMonth(item.getMonth())));
Set<String> performMonthSet = collect.keySet();
collectSet.addAll(performMonthSet);
//查询所有窗口人员汇总表
WindowWorkmanPerformQuery windowWorkmanPerformQuery = new WindowWorkmanPerformQuery();
windowWorkmanPerformQuery.setOwnerId(context.getUser().getCustomerId());
windowWorkmanPerformQuery.setTimeType(TimeTypeEnum.按季度.getValue());
Map<String, List<WindowWorkmanPerformEntity>> workmanMonthSet = windowWorkmanPerformService.find(windowWorkmanPerformQuery).stream().collect(Collectors.groupingBy(item -> item.getYear() + "年" + getSeasonBySeason(item.getSeason())));
collectSet.addAll(workmanMonthSet.keySet());
//perform 排序 降序
List<String> dateList = collectSet.stream().collect(Collectors.toList());
Collections.sort(dateList, new Comparator<String>() {
@Override
public int compare(String object1, String object2) {
return object1.compareTo(object2);
}
});
return Rest.ok(dateList);
}
private String getSeasonByMonth(int month){
if(month<4){
return "一季度";
}else if(month<7){
return "二季度";
}else if(month<10){
return "三季度";
}else {
return "四季度";
}
}
private String getSeasonBySeason(int season){
if(season==1){
return "一季度";
}else if(season==2){
return "二季度";
}else if(season==3){
return "三季度";
}else {
return "四季度";
}
}
@Override
public Rest<List<String>> getPerformMonthList(Context context) {
Set<String> collectSet = new HashSet<>();
......@@ -245,14 +329,15 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
WindowPerformQuery windowPerformQuery = new WindowPerformQuery();
windowPerformQuery.setOwnerId(context.getUser().getCustomerId());
windowPerformQuery.setOrderColList(Arrays.asList(new OrderCol("year", OrderCol.DESCENDING), new OrderCol("month", OrderCol.DESCENDING)));
Map<String, List<WindowPerformEntity>> collect = windowPerformService.find(windowPerformQuery).stream().collect(Collectors.groupingBy(item -> item.getYear() + "-" + item.getMonth()));
Map<String, List<WindowPerformEntity>> collect = windowPerformService.find(windowPerformQuery).stream().collect(Collectors.groupingBy(item -> item.getYear() + "年" + item.getMonth() + "月"));
Set<String> performMonthSet = collect.keySet();
collectSet.addAll(performMonthSet);
//查询所有窗口人员汇总表
WindowWorkmanPerformQuery windowWorkmanPerformQuery = new WindowWorkmanPerformQuery();
windowWorkmanPerformQuery.setOwnerId(context.getUser().getCustomerId());
Map<String, List<WindowWorkmanPerformEntity>> workmanMonthSet = windowWorkmanPerformService.find(windowWorkmanPerformQuery).stream().collect(Collectors.groupingBy(item -> item.getYear() + "-" + item.getMonth()));
windowWorkmanPerformQuery.setTimeType(TimeTypeEnum.按月.getValue());
Map<String, List<WindowWorkmanPerformEntity>> workmanMonthSet = windowWorkmanPerformService.find(windowWorkmanPerformQuery).stream().collect(Collectors.groupingBy(item -> item.getYear() + "年" + item.getMonth() + "月"));
collectSet.addAll(workmanMonthSet.keySet());
//perform 排序 降序
......
......@@ -153,6 +153,8 @@ public class WindowPerformServiceImpl extends AbstractCRUDServiceImpl<WindowPerf
windowWorkmanPerformQuery.setMonth(query.getMonth());
windowWorkmanPerformQuery.setWindowCode(query.getWindowCode());
windowWorkmanPerformQuery.setWindowName(query.getWindowName());
windowWorkmanPerformQuery.setSeason(query.getSeason());
windowWorkmanPerformQuery.setTimeType(query.getTimeType());
List<WindowWorkmanPerformEntity> windowWorkmanPerformEntities = windowWorkmanPerformService.find(windowWorkmanPerformQuery);
if (!ObjectUtils.isEmpty(windowWorkmanPerformEntities)) {
......
......@@ -179,6 +179,54 @@ public class WindowOwnerController extends BaseCRUDJsonBodyMappingController<Win
}
/**
* 查询所有窗口汇总表日期分组
*/
@PostMapping(value = "performYearList")
public String getPerformYearList() {
JSONObject jsonObject = new JSONObject();
String busiDesc = "查询当前负责人负责的窗口列表" + this.getModuleDesc();
try {
Rest<List<String>> performMonthRest = this.service.getPerformYearList(getContext());
if(YesNoEnum.YES.getValue()== performMonthRest.getCode()){
jsonObject.put(KEY_RESULT_DATA, performMonthRest.getData());
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "查询所有窗口汇总表日期分组!");
}
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error("获取异常", e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
jsonObject.put(KEY_RESULT_MSG, super.convertException(e));
}
return jsonObject.toJSONString();
}
/**
* 查询所有窗口汇总表日期分组
*/
@PostMapping(value = "performSeasonList")
public String getPerformSeasonList() {
JSONObject jsonObject = new JSONObject();
String busiDesc = "查询当前负责人负责的窗口列表" + this.getModuleDesc();
try {
Rest<List<String>> performMonthRest = this.service.getPerformSeasonList(getContext());
if(YesNoEnum.YES.getValue()== performMonthRest.getCode()){
jsonObject.put(KEY_RESULT_DATA, performMonthRest.getData());
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "查询所有窗口汇总表日期分组!");
}
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
log.error("获取异常", e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
jsonObject.put(KEY_RESULT_MSG, super.convertException(e));
}
return jsonObject.toJSONString();
}
/**
* 查询所有窗口汇总表日期分组
*/
......
......@@ -2,10 +2,7 @@ package com.mortals.xhx.module.window.web;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.common.code.CheckStatusEnum;
import com.mortals.xhx.common.code.ExamineLevelEnum;
import com.mortals.xhx.common.code.FillStatusEnum;
import com.mortals.xhx.common.code.WindowCheckResultEnum;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformEntity;
import com.mortals.xhx.module.window.service.WindowWorkmanPerformService;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -34,6 +31,7 @@ public class WindowWorkmanPerformController extends BaseCRUDJsonBodyMappingContr
this.addDict(model, "fillStatus", FillStatusEnum.getEnumMap());
this.addDict(model, "manageCheckResult", WindowCheckResultEnum.getEnumMap());
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "timeType", TimeTypeEnum.getEnumMap());
super.init(model, context);
}
......
......@@ -22,8 +22,5 @@
<property name="showSql" value="false" />
</plugin>
<!-- <plugin interceptor="com.mortals.framework.thirty.dm.DmTransInterceptor">-->
<!-- <property name="showSql" value="false" />-->
<!-- </plugin>-->
</plugins>
</configuration>
\ No newline at end of file
......@@ -1382,3 +1382,9 @@ PRIMARY KEY (`id`)
-- 2025-04-02
-- ----------------------------
ALTER TABLE mortals_xhx_staff ADD COLUMN `dingUserId` varchar(128) COMMENT '钉钉userId';
-- ----------------------------
-- 2025-04-08 邛崃需求
-- ----------------------------
ALTER TABLE `mortals_xhx_window_workman_perform` ADD COLUMN `season` int(4) DEFAULT NULL COMMENT '考核季度',ADD COLUMN `timeType` tinyint(2) DEFAULT '0' COMMENT '时间类型(0,按月,1按季度,2按年)';
\ 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