Commit cfa5e0a4 authored by 赵啸非's avatar 赵啸非

添加窗口无人值守

parent 267cba6a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
-- ---------------------------- -- ----------------------------
2023-2-21 2023-2-21
-- ---------------------------- -- ----------------------------
ALTER TABLE mortals_sys_window ADD COLUMN `duty` tinyint (1) COMMENT '无人值守(1.是,0.否)' AFTER hongqi; ALTER TABLE mortals_sys_window ADD COLUMN `duty` tinyint (1) default 0 COMMENT '无人值守(1.是,0.否)' AFTER hongqi;
ALTER TABLE mortals_sys_window ADD COLUMN `dutyContent` varchar (256) COMMENT '显示内容' AFTER duty; ALTER TABLE mortals_sys_window ADD COLUMN `dutyContent` varchar (256) default "" COMMENT '显示内容' AFTER duty;
ALTER TABLE mortals_sys_window ADD COLUMN `dutyEnglish` varchar (256) COMMENT '显示英文' AFTER dutyContent; ALTER TABLE mortals_sys_window ADD COLUMN `dutyEnglish` varchar (256) default "" COMMENT '显示英文' AFTER dutyContent;
...@@ -12,6 +12,7 @@ import com.mortals.framework.web.BaseJsonBodyController; ...@@ -12,6 +12,7 @@ import com.mortals.framework.web.BaseJsonBodyController;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery; import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery; import com.mortals.xhx.module.matter.model.MatterQuery;
import com.mortals.xhx.module.matter.model.vo.MatterInfo; import com.mortals.xhx.module.matter.model.vo.MatterInfo;
import com.mortals.xhx.module.matter.service.MatterService; import com.mortals.xhx.module.matter.service.MatterService;
...@@ -66,6 +67,8 @@ public class DemoWebApiController { ...@@ -66,6 +67,8 @@ public class DemoWebApiController {
private WindowMatterService windowMatterService; private WindowMatterService windowMatterService;
@Autowired @Autowired
private DeptService deptService; private DeptService deptService;
@Autowired
private MatterService matterService;
@PostMapping(value = "testGov") @PostMapping(value = "testGov")
...@@ -103,6 +106,23 @@ public class DemoWebApiController { ...@@ -103,6 +106,23 @@ public class DemoWebApiController {
return Rest.ok(cookieStr); return Rest.ok(cookieStr);
} }
@PostMapping(value = "reEventShow")
@UnAuth
public Rest<String> reEventShow() {
List<SiteMatterEntity> siteMatterEntities = siteMatterService.find(new SiteMatterQuery());
for (SiteMatterEntity siteMatterEntity : siteMatterEntities) {
if(ObjectUtils.isEmpty(siteMatterEntity.getEventTypeShow())){
MatterEntity matterEntity = matterService.get(siteMatterEntity.getMatterId());
if(!ObjectUtils.isEmpty(matterEntity)&&!ObjectUtils.isEmpty(matterEntity.getEventTypeShow())){
siteMatterEntity.setEventTypeShow(matterEntity.getEventTypeShow());
siteMatterService.update(siteMatterEntity);
}
}
}
return Rest.ok();
}
@PostMapping(value = "reDepts") @PostMapping(value = "reDepts")
@UnAuth @UnAuth
......
...@@ -34,4 +34,7 @@ public class SiteMatterVo extends BaseEntityLong { ...@@ -34,4 +34,7 @@ public class SiteMatterVo extends BaseEntityLong {
*/ */
private String areaCode; private String areaCode;
/** 事项类型排除列表 */
private List <String> eventTypeShowNotList;
} }
\ No newline at end of file
package com.mortals.xhx.module.site.web; package com.mortals.xhx.module.site.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.framework.web.BasePhpCRUDJsonMappingController; import com.mortals.framework.web.BasePhpCRUDJsonMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.site.model.SiteMatterEntity; import com.mortals.xhx.module.site.model.SiteMatterEntity;
import com.mortals.xhx.module.site.service.SiteMatterService; import com.mortals.xhx.module.site.service.SiteMatterService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Map;
/** /**
* 站点事项 * 站点事项
* *
...@@ -27,4 +33,19 @@ public class SiteMatterController extends BaseCRUDJsonBodyMappingController<Site ...@@ -27,4 +33,19 @@ public class SiteMatterController extends BaseCRUDJsonBodyMappingController<Site
super.setModuleDesc("站点事项"); super.setModuleDesc("站点事项");
} }
/**
* @param query
* @param model
* @param context
* @throws AppException
*/
@Override
protected void doListBefore(SiteMatterEntity query, Map<String, Object> model, Context context) throws AppException {
super.doListBefore(query, model, context);
if(ObjectUtils.isEmpty(query.getEventTypeShowNotList())){
ArrayList<String> notList = new ArrayList<>();
notList.add("行政处罚");
query.setEventTypeShowNotList(notList);
}
}
} }
\ No newline at end of file
...@@ -21,9 +21,8 @@ Content-Type: application/json ...@@ -21,9 +21,8 @@ Content-Type: application/json
{ {
"siteId": 1, "siteId": 1,
"eventTypeShowNotList": ["行政处罚"],
"page": 1, "page": 1,
"size": 10 "size": 100
} }
###微官网事项列表 ###微官网事项列表
......
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