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

邛崃需求

parent c9c577c0
...@@ -30,7 +30,7 @@ public enum LeaveTypeEnum { ...@@ -30,7 +30,7 @@ public enum LeaveTypeEnum {
育儿假(19, "育儿假"), 育儿假(19, "育儿假"),
调回单位(20, "调回单位"), 调回单位(20, "调回单位"),
探亲假(21, "探亲假"), 探亲假(21, "探亲假"),
其他(22, "其他"), 其他(22, "其他"),
上年公休结余(23, "上年公休结余"), 上年公休结余(23, "上年公休结余"),
独生子女陪护假(24, "独生子女陪护假,"), 独生子女陪护假(24, "独生子女陪护假,"),
陪护假(25, "陪护假"), 陪护假(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 { ...@@ -86,6 +86,14 @@ public class WindowWorkmanPerformEntity extends WindowWorkmanPerformVo {
* 窗口编号 * 窗口编号
*/ */
private String windowCode; private String windowCode;
/**
* 考核季度
*/
private Integer season;
/**
* 时间类型(0,按月,1按季度,2按年)
*/
private Integer timeType;
/** /**
* 窗口人员考核汇总明细信息 * 窗口人员考核汇总明细信息
*/ */
...@@ -130,5 +138,7 @@ public class WindowWorkmanPerformEntity extends WindowWorkmanPerformVo { ...@@ -130,5 +138,7 @@ public class WindowWorkmanPerformEntity extends WindowWorkmanPerformVo {
this.fillDate = new Date(); this.fillDate = new Date();
this.fillStatus = 0; this.fillStatus = 0;
this.windowCode = ""; this.windowCode = "";
this.season = null;
this.timeType = 0;
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.window.model; package com.mortals.xhx.module.window.model;
import java.util.List;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformEntity; import com.mortals.xhx.module.window.model.WindowWorkmanPerformEntity;
...@@ -8,7 +7,7 @@ import com.mortals.xhx.module.window.model.WindowWorkmanPerformEntity; ...@@ -8,7 +7,7 @@ import com.mortals.xhx.module.window.model.WindowWorkmanPerformEntity;
* 窗口人员考核汇总登记查询对象 * 窗口人员考核汇总登记查询对象
* *
* @author zxfei * @author zxfei
* @date 2024-01-27 * @date 2025-04-08
*/ */
public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity { public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -219,6 +218,36 @@ public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity { ...@@ -219,6 +218,36 @@ public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity {
/** 窗口编号排除列表 */ /** 窗口编号排除列表 */
private List <String> windowCodeNotList; 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) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<WindowWorkmanPerformQuery> orConditionList; private List<WindowWorkmanPerformQuery> orConditionList;
...@@ -1389,6 +1418,168 @@ public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity { ...@@ -1389,6 +1418,168 @@ public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity {
this.windowCodeNotList = windowCodeNotList; 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 * @param id
...@@ -2084,6 +2275,114 @@ public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity { ...@@ -2084,6 +2275,114 @@ public class WindowWorkmanPerformQuery extends WindowWorkmanPerformEntity {
return this; 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) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -48,5 +48,13 @@ public class WindowPerformAllVo extends BaseEntityLong { ...@@ -48,5 +48,13 @@ public class WindowPerformAllVo extends BaseEntityLong {
* 窗口编号 * 窗口编号
*/ */
private String windowCode; 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 { ...@@ -22,4 +22,13 @@ public class WindowPerformVo extends BaseEntityLong {
private String formName = WorkmanPerformTypeEnum.市政务服务大厅窗口考核登记表.getDesc(); private String formName = WorkmanPerformTypeEnum.市政务服务大厅窗口考核登记表.getDesc();
private Integer formType = WorkmanPerformTypeEnum.市政务服务大厅窗口考核登记表.getValue(); 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 ...@@ -45,6 +45,8 @@ public interface WindowOwnerService extends ICRUDService<WindowOwnerEntity, Long
Rest<List<StaffEntity>> getWindowPerson(Long windowId, Context context); 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); Rest<List<String>> getPerformMonthList(Context context);
/** /**
......
...@@ -9,6 +9,7 @@ import com.mortals.framework.model.OrderCol; ...@@ -9,6 +9,7 @@ import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.base.system.user.service.UserService; 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.code.YesNoEnum;
import com.mortals.xhx.common.pdu.RespData; import com.mortals.xhx.common.pdu.RespData;
import com.mortals.xhx.common.pdu.window.WindowPdu; import com.mortals.xhx.common.pdu.window.WindowPdu;
...@@ -238,6 +239,89 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -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 @Override
public Rest<List<String>> getPerformMonthList(Context context) { public Rest<List<String>> getPerformMonthList(Context context) {
Set<String> collectSet = new HashSet<>(); Set<String> collectSet = new HashSet<>();
...@@ -245,14 +329,15 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD ...@@ -245,14 +329,15 @@ public class WindowOwnerServiceImpl extends AbstractCRUDServiceImpl<WindowOwnerD
WindowPerformQuery windowPerformQuery = new WindowPerformQuery(); WindowPerformQuery windowPerformQuery = new WindowPerformQuery();
windowPerformQuery.setOwnerId(context.getUser().getCustomerId()); windowPerformQuery.setOwnerId(context.getUser().getCustomerId());
windowPerformQuery.setOrderColList(Arrays.asList(new OrderCol("year", OrderCol.DESCENDING), new OrderCol("month", OrderCol.DESCENDING))); 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(); Set<String> performMonthSet = collect.keySet();
collectSet.addAll(performMonthSet); collectSet.addAll(performMonthSet);
//查询所有窗口人员汇总表 //查询所有窗口人员汇总表
WindowWorkmanPerformQuery windowWorkmanPerformQuery = new WindowWorkmanPerformQuery(); WindowWorkmanPerformQuery windowWorkmanPerformQuery = new WindowWorkmanPerformQuery();
windowWorkmanPerformQuery.setOwnerId(context.getUser().getCustomerId()); 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()); collectSet.addAll(workmanMonthSet.keySet());
//perform 排序 降序 //perform 排序 降序
......
...@@ -153,6 +153,8 @@ public class WindowPerformServiceImpl extends AbstractCRUDServiceImpl<WindowPerf ...@@ -153,6 +153,8 @@ public class WindowPerformServiceImpl extends AbstractCRUDServiceImpl<WindowPerf
windowWorkmanPerformQuery.setMonth(query.getMonth()); windowWorkmanPerformQuery.setMonth(query.getMonth());
windowWorkmanPerformQuery.setWindowCode(query.getWindowCode()); windowWorkmanPerformQuery.setWindowCode(query.getWindowCode());
windowWorkmanPerformQuery.setWindowName(query.getWindowName()); windowWorkmanPerformQuery.setWindowName(query.getWindowName());
windowWorkmanPerformQuery.setSeason(query.getSeason());
windowWorkmanPerformQuery.setTimeType(query.getTimeType());
List<WindowWorkmanPerformEntity> windowWorkmanPerformEntities = windowWorkmanPerformService.find(windowWorkmanPerformQuery); List<WindowWorkmanPerformEntity> windowWorkmanPerformEntities = windowWorkmanPerformService.find(windowWorkmanPerformQuery);
if (!ObjectUtils.isEmpty(windowWorkmanPerformEntities)) { if (!ObjectUtils.isEmpty(windowWorkmanPerformEntities)) {
......
...@@ -179,6 +179,54 @@ public class WindowOwnerController extends BaseCRUDJsonBodyMappingController<Win ...@@ -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; ...@@ -2,10 +2,7 @@ package com.mortals.xhx.module.window.web;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.common.code.CheckStatusEnum; import com.mortals.xhx.common.code.*;
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.module.window.model.WindowWorkmanPerformEntity; import com.mortals.xhx.module.window.model.WindowWorkmanPerformEntity;
import com.mortals.xhx.module.window.service.WindowWorkmanPerformService; import com.mortals.xhx.module.window.service.WindowWorkmanPerformService;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -34,6 +31,7 @@ public class WindowWorkmanPerformController extends BaseCRUDJsonBodyMappingContr ...@@ -34,6 +31,7 @@ public class WindowWorkmanPerformController extends BaseCRUDJsonBodyMappingContr
this.addDict(model, "fillStatus", FillStatusEnum.getEnumMap()); this.addDict(model, "fillStatus", FillStatusEnum.getEnumMap());
this.addDict(model, "manageCheckResult", WindowCheckResultEnum.getEnumMap()); this.addDict(model, "manageCheckResult", WindowCheckResultEnum.getEnumMap());
this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap()); this.addDict(model, "checkStatus", CheckStatusEnum.getEnumMap());
this.addDict(model, "timeType", TimeTypeEnum.getEnumMap());
super.init(model, context); super.init(model, context);
} }
......
...@@ -22,8 +22,5 @@ ...@@ -22,8 +22,5 @@
<property name="showSql" value="false" /> <property name="showSql" value="false" />
</plugin> </plugin>
<!-- <plugin interceptor="com.mortals.framework.thirty.dm.DmTransInterceptor">-->
<!-- <property name="showSql" value="false" />-->
<!-- </plugin>-->
</plugins> </plugins>
</configuration> </configuration>
\ No newline at end of file
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
<result property="updateUserId" column="updateUserId" /> <result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="windowCode" column="windowCode" /> <result property="windowCode" column="windowCode" />
<result property="season" column="season" />
<result property="timeType" column="timeType" />
<collection property="windowWorkmanPerformDetailList" column="id" ofType="WindowWorkmanPerformDetailEntity" javaType="ArrayList" select="getWindowWorkmanPerformDetailByPerformId"></collection> <collection property="windowWorkmanPerformDetailList" column="id" ofType="WindowWorkmanPerformDetailEntity" javaType="ArrayList" select="getWindowWorkmanPerformDetailByPerformId"></collection>
</resultMap> </resultMap>
<resultMap type="WindowWorkmanPerformDetailEntity" id="WindowWorkmanPerformDetailEntity-Map"> <resultMap type="WindowWorkmanPerformDetailEntity" id="WindowWorkmanPerformDetailEntity-Map">
...@@ -51,8 +53,6 @@ ...@@ -51,8 +53,6 @@
<result property="salaId" column="salaId" /> <result property="salaId" column="salaId" />
<result property="salaName" column="salaName" /> <result property="salaName" column="salaName" />
</resultMap> </resultMap>
<!-- 表所有列 --> <!-- 表所有列 -->
<sql id="_columns"> <sql id="_columns">
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
...@@ -119,6 +119,12 @@ ...@@ -119,6 +119,12 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowCode') or colPickMode == 1 and data.containsKey('windowCode')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowCode') or colPickMode == 1 and data.containsKey('windowCode')))">
a.windowCode, a.windowCode,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('season') or colPickMode == 1 and data.containsKey('season')))">
a.season,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('timeType') or colPickMode == 1 and data.containsKey('timeType')))">
a.timeType,
</if>
</trim> </trim>
</sql> </sql>
<!-- 子表所有列 --> <!-- 子表所有列 -->
...@@ -130,18 +136,18 @@ ...@@ -130,18 +136,18 @@
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="WindowWorkmanPerformEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="WindowWorkmanPerformEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_window_workman_perform insert into mortals_xhx_window_workman_perform
(year,month,windowId,windowName,ownerId,ownerName,deptId,deptName,salaId,salaName,remark,annex,annexUrl,fillDate,fillStatus,createUserId,createTime,updateUserId,updateTime,windowCode) (year,month,windowId,windowName,ownerId,ownerName,deptId,deptName,salaId,salaName,remark,annex,annexUrl,fillDate,fillStatus,createUserId,createTime,updateUserId,updateTime,windowCode,season,timeType)
VALUES VALUES
(#{year},#{month},#{windowId},#{windowName},#{ownerId},#{ownerName},#{deptId},#{deptName},#{salaId},#{salaName},#{remark},#{annex},#{annexUrl},#{fillDate},#{fillStatus},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{windowCode}) (#{year},#{month},#{windowId},#{windowName},#{ownerId},#{ownerName},#{deptId},#{deptName},#{salaId},#{salaName},#{remark},#{annex},#{annexUrl},#{fillDate},#{fillStatus},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{windowCode},#{season},#{timeType})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_window_workman_perform insert into mortals_xhx_window_workman_perform
(year,month,windowId,windowName,ownerId,ownerName,deptId,deptName,salaId,salaName,remark,annex,annexUrl,fillDate,fillStatus,createUserId,createTime,updateUserId,updateTime,windowCode) (year,month,windowId,windowName,ownerId,ownerName,deptId,deptName,salaId,salaName,remark,annex,annexUrl,fillDate,fillStatus,createUserId,createTime,updateUserId,updateTime,windowCode,season,timeType)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.year},#{item.month},#{item.windowId},#{item.windowName},#{item.ownerId},#{item.ownerName},#{item.deptId},#{item.deptName},#{item.salaId},#{item.salaName},#{item.remark},#{item.annex},#{item.annexUrl},#{item.fillDate},#{item.fillStatus},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.windowCode}) (#{item.year},#{item.month},#{item.windowId},#{item.windowName},#{item.ownerId},#{item.ownerName},#{item.deptId},#{item.deptName},#{item.salaId},#{item.salaName},#{item.remark},#{item.annex},#{item.annexUrl},#{item.fillDate},#{item.fillStatus},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.windowCode},#{item.season},#{item.timeType})
</foreach> </foreach>
</insert> </insert>
...@@ -238,6 +244,18 @@ ...@@ -238,6 +244,18 @@
<if test="(colPickMode==0 and data.containsKey('windowCode')) or (colPickMode==1 and !data.containsKey('windowCode'))"> <if test="(colPickMode==0 and data.containsKey('windowCode')) or (colPickMode==1 and !data.containsKey('windowCode'))">
a.windowCode=#{data.windowCode}, a.windowCode=#{data.windowCode},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('season')) or (colPickMode==1 and !data.containsKey('season'))">
a.season=#{data.season},
</if>
<if test="(colPickMode==0 and data.containsKey('seasonIncrement')) or (colPickMode==1 and !data.containsKey('seasonIncrement'))">
a.season=ifnull(a.season,0) + #{data.seasonIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('timeType')) or (colPickMode==1 and !data.containsKey('timeType'))">
a.timeType=#{data.timeType},
</if>
<if test="(colPickMode==0 and data.containsKey('timeTypeIncrement')) or (colPickMode==1 and !data.containsKey('timeTypeIncrement'))">
a.timeType=ifnull(a.timeType,0) + #{data.timeTypeIncrement},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -435,6 +453,30 @@ ...@@ -435,6 +453,30 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="season=(case" suffix="ELSE season end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('season')) or (colPickMode==1 and !item.containsKey('season'))">
when a.id=#{item.id} then #{item.season}
</when>
<when test="(colPickMode==0 and item.containsKey('seasonIncrement')) or (colPickMode==1 and !item.containsKey('seasonIncrement'))">
when a.id=#{item.id} then ifnull(a.season,0) + #{item.seasonIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="timeType=(case" suffix="ELSE timeType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('timeType')) or (colPickMode==1 and !item.containsKey('timeType'))">
when a.id=#{item.id} then #{item.timeType}
</when>
<when test="(colPickMode==0 and item.containsKey('timeTypeIncrement')) or (colPickMode==1 and !item.containsKey('timeTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.timeType,0) + #{item.timeTypeIncrement}
</when>
</choose>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -495,6 +537,7 @@ ...@@ -495,6 +537,7 @@
</trim> </trim>
<include refid="_orderCols_"/> <include refid="_orderCols_"/>
</select> </select>
<!-- 获取子列表 --> <!-- 获取子列表 -->
<select id="getWindowWorkmanPerformDetailByPerformId" parameterType="java.lang.Long" resultMap="WindowWorkmanPerformDetailEntity-Map"> <select id="getWindowWorkmanPerformDetailByPerformId" parameterType="java.lang.Long" resultMap="WindowWorkmanPerformDetailEntity-Map">
select <include refid="_columns_sub"/> select <include refid="_columns_sub"/>
...@@ -504,8 +547,6 @@ ...@@ -504,8 +547,6 @@
</trim> </trim>
</select> </select>
<!-- 获取 --> <!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int"> <select id="getListCount" parameterType="paramDto" resultType="int">
select count(1) select count(1)
...@@ -554,6 +595,10 @@ ...@@ -554,6 +595,10 @@
<!-- 条件映射-代参数 --> <!-- 条件映射-代参数 -->
<sql id="_condition_param_"> <sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/> <bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="permissionSql != null and permissionSql != ''">
${permissionSql}
</if>
<if test="conditionParamRef.containsKey('id')"> <if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null"> <if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id} ${_conditionType_} a.id=#{${_conditionParam_}.id}
...@@ -1042,6 +1087,60 @@ ...@@ -1042,6 +1087,60 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('season')">
<if test="conditionParamRef.season != null ">
${_conditionType_} a.season = #{${_conditionParam_}.season}
</if>
<if test="conditionParamRef.season == null">
${_conditionType_} a.season is null
</if>
</if>
<if test="conditionParamRef.containsKey('seasonList') and conditionParamRef.seasonList.size() > 0">
${_conditionType_} a.season in
<foreach collection="conditionParamRef.seasonList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('seasonNotList') and conditionParamRef.seasonNotList.size() > 0">
${_conditionType_} a.season not in
<foreach collection="conditionParamRef.seasonNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('seasonStart') and conditionParamRef.seasonStart != null">
${_conditionType_} a.season <![CDATA[ >= ]]> #{${_conditionParam_}.seasonStart}
</if>
<if test="conditionParamRef.containsKey('seasonEnd') and conditionParamRef.seasonEnd != null">
${_conditionType_} a.season <![CDATA[ <= ]]> #{${_conditionParam_}.seasonEnd}
</if>
<if test="conditionParamRef.containsKey('timeType')">
<if test="conditionParamRef.timeType != null ">
${_conditionType_} a.timeType = #{${_conditionParam_}.timeType}
</if>
<if test="conditionParamRef.timeType == null">
${_conditionType_} a.timeType is null
</if>
</if>
<if test="conditionParamRef.containsKey('timeTypeList') and conditionParamRef.timeTypeList.size() > 0">
${_conditionType_} a.timeType in
<foreach collection="conditionParamRef.timeTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('timeTypeNotList') and conditionParamRef.timeTypeNotList.size() > 0">
${_conditionType_} a.timeType not in
<foreach collection="conditionParamRef.timeTypeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('timeTypeStart') and conditionParamRef.timeTypeStart != null">
${_conditionType_} a.timeType <![CDATA[ >= ]]> #{${_conditionParam_}.timeTypeStart}
</if>
<if test="conditionParamRef.containsKey('timeTypeEnd') and conditionParamRef.timeTypeEnd != null">
${_conditionType_} a.timeType <![CDATA[ <= ]]> #{${_conditionParam_}.timeTypeEnd}
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -1116,6 +1215,20 @@ ...@@ -1116,6 +1215,20 @@
</foreach> </foreach>
, ,
</if> </if>
<if test="conditionParamRef.containsKey('seasonList') and conditionParamRef.seasonList.size() > 0">
field(a.season,
<foreach collection="conditionParamRef.seasonList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('timeTypeList') and conditionParamRef.timeTypeList.size() > 0">
field(a.timeType,
<foreach collection="conditionParamRef.timeTypeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=","> <foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
a.${item.colName} ${item.sortKind} a.${item.colName} ${item.sortKind}
...@@ -1194,6 +1307,20 @@ ...@@ -1194,6 +1307,20 @@
</foreach> </foreach>
, ,
</if> </if>
<if test="conditionParamRef.containsKey('seasonList') and conditionParamRef.seasonList.size() > 0">
field(a.season,
<foreach collection="conditionParamRef.seasonList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('timeTypeList') and conditionParamRef.timeTypeList.size() > 0">
field(a.timeType,
<foreach collection="conditionParamRef.timeTypeList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix=""> <trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')"> <if test="orderCol.containsKey('id')">
a.id a.id
...@@ -1300,6 +1427,16 @@ ...@@ -1300,6 +1427,16 @@
<if test='orderCol.windowCode != null and "DESC".equalsIgnoreCase(orderCol.windowCode)'>DESC</if> <if test='orderCol.windowCode != null and "DESC".equalsIgnoreCase(orderCol.windowCode)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('season')">
a.season
<if test='orderCol.season != null and "DESC".equalsIgnoreCase(orderCol.season)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('timeType')">
a.timeType
<if test='orderCol.timeType != null and "DESC".equalsIgnoreCase(orderCol.timeType)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
......
...@@ -1382,3 +1382,9 @@ PRIMARY KEY (`id`) ...@@ -1382,3 +1382,9 @@ PRIMARY KEY (`id`)
-- 2025-04-02 -- 2025-04-02
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_xhx_staff ADD COLUMN `dingUserId` varchar(128) COMMENT '钉钉userId'; 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