Commit 35d4afc3 authored by “yiyousong”'s avatar “yiyousong”
parents 10a9ec99 98daeee4
......@@ -218,3 +218,12 @@ ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `serviceApiParams` v
-- ----------------------------
ALTER TABLE mortals_sys_window_hall ADD COLUMN `siteId` bigint(20) default '1' COMMENT '站点Id';
-- ----------------------------
2024-01-03
-- ----------------------------
ALTER TABLE mortals_sys_site_matter ADD COLUMN `agent` tinyint(2) DEFAULT '0' COMMENT '代办帮办(0.否,1.是)';
ALTER TABLE mortals_sys_site_matter ADD COLUMN `agentName` varchar(64) COMMENT '代办姓名';
ALTER TABLE mortals_sys_site_matter ADD COLUMN `agentPhone` varchar(32) COMMENT '代办电话';
ALTER TABLE mortals_sys_site_matter ADD COLUMN `agentPost` varchar(64) COMMENT '职务';
......@@ -52,7 +52,7 @@ public class UploadController extends BaseController {
@RequestMapping(value = "commonupload")
public String doFileUpload(MultipartFile file, @RequestParam(value = "prePath",defaultValue = "file/fileupload") String prePath) {
public String doFileUpload(MultipartFile file, @RequestParam(value = "prePath",defaultValue = "/file/fileupload") String prePath) {
Map<String, Object> model = new HashMap<>();
String jsonStr = "";
try {
......
......@@ -237,13 +237,13 @@ public class MatterHtmlParseUtil {
public static void main(String[] args) {
/* String url = "http://www.sczwfw.gov.cn/jiq/interface/item/tags";
String url = "http://www.sczwfw.gov.cn/jiq/interface/item/tags";
HashMap<String, String> params = new HashMap<>();
params.put("dxType", "21");
params.put("areaCode", "510107000000");
params.put("dxType", "54");
params.put("areaCode", "511503003999");
params.put("deptCode", "");
params.put("searchtext", "");
params.put("pageno", "5");
params.put("pageno", "1");
params.put("taskType", "");
Rest<List<MatterEntity>> rest = MatterHtmlParseUtil.getMatterList(params, url);
......
......@@ -152,8 +152,13 @@ public class SyncGovMatterDetailThread implements Runnable {
Rest<String> townThemeRest = siteThemeMatterService.syncTownThemeMatterBySiteId(siteEntity, dxType, context);
log.info("同步站点乡镇主题事项:" + JSON.toJSONString(townThemeRest));
} else {
cacheService.hdel(RedisCacheKeys.getSyncMatterLockKey() + siteEntity.getAreaCode(), siteEntity.getAreaCode());
try {
cacheService.del(RedisCacheKeys.getSyncMatterLockKey() + siteEntity.getAreaCode(), siteEntity.getAreaCode());
log.info("同步站点乡镇主题事项失败:" + themeTownRest.getData());
}catch (Exception e){
log.error("同步站点乡镇主题事项失败",e);
}
}
}
log.info("同步站点事项结束.....");
......
......@@ -50,7 +50,7 @@ public class SyncHolidayTaskImpl implements ITaskExcuteService {
@Autowired
private HolidayService holidayService;
@Value("${holidayUrl:https://timor.tech/api/holiday/year/2023}")
@Value("${holidayUrl:https://timor.tech/api/holiday/year/2024}")
private String holidayUrl;
......@@ -63,6 +63,7 @@ public class SyncHolidayTaskImpl implements ITaskExcuteService {
private void syncHoliday() throws AppException {
holidayUrl += DateUtil.year(new Date());
log.info("holidayUrl:{}", holidayUrl);
String holidayJson = HttpUtil.get(holidayUrl);
ObjectMapper mapper = new ObjectMapper();
......
package com.mortals.xhx.module.site.model;
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.site.model.vo.SiteMatterVo;
import lombok.Data;
/**
* 站点事项实体对象
*
* @author zxfei
* @date 2023-04-12
* @date 2024-01-04
*/
@Data
public class SiteMatterEntity extends SiteMatterVo {
private static final long serialVersionUID = 1L;
......@@ -32,10 +35,6 @@ public class SiteMatterEntity extends SiteMatterVo {
* 事项名称
*/
private String matterName;
/**
* 事项编码
*/
private String matterCode;
/**
* 部门ID
*/
......@@ -44,6 +43,10 @@ public class SiteMatterEntity extends SiteMatterVo {
* 部门名称
*/
private String deptName;
/**
* 事项编码
*/
private String matterCode;
/**
* 事项类型
*/
......@@ -52,10 +55,6 @@ public class SiteMatterEntity extends SiteMatterVo {
* 事项来源
*/
private Integer source;
/**
* 部门编号
*/
private String deptCode;
/**
* 热门(0.否,1.是)
*/
......@@ -64,182 +63,26 @@ public class SiteMatterEntity extends SiteMatterVo {
* 显示(0.否,1.是)
*/
private Integer display;
public SiteMatterEntity(){}
/**
* 获取 站点ID
* @return Long
*/
public Long getSiteId(){
return siteId;
}
/**
* 设置 站点ID
* @param siteId
*/
public void setSiteId(Long siteId){
this.siteId = siteId;
}
/**
* 获取 站点名称
* @return String
*/
public String getSiteName(){
return siteName;
}
/**
* 设置 站点名称
* @param siteName
*/
public void setSiteName(String siteName){
this.siteName = siteName;
}
/**
* 获取 事项ID
* @return Long
*/
public Long getMatterId(){
return matterId;
}
/**
* 设置 事项ID
* @param matterId
*/
public void setMatterId(Long matterId){
this.matterId = matterId;
}
/**
* 获取 事项名称
* @return String
*/
public String getMatterName(){
return matterName;
}
/**
* 设置 事项名称
* @param matterName
*/
public void setMatterName(String matterName){
this.matterName = matterName;
}
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 部门ID
* @return Long
*/
public Long getDeptId(){
return deptId;
}
/**
* 设置 部门ID
* @param deptId
*/
public void setDeptId(Long deptId){
this.deptId = deptId;
}
/**
* 获取 部门名称
* @return String
*/
public String getDeptName(){
return deptName;
}
/**
* 设置 部门名称
* @param deptName
*/
public void setDeptName(String deptName){
this.deptName = deptName;
}
/**
* 获取 事项类型
* @return String
*/
public String getEventTypeShow(){
return eventTypeShow;
}
/**
* 设置 事项类型
* @param eventTypeShow
*/
public void setEventTypeShow(String eventTypeShow){
this.eventTypeShow = eventTypeShow;
}
/**
* 获取 事项来源
* @return Integer
*/
public Integer getSource(){
return source;
}
/**
* 设置 事项来源
* @param source
*/
public void setSource(Integer source){
this.source = source;
}
/**
* 获取 部门编号
* @return String
*/
public String getDeptCode(){
return deptCode;
}
/**
* 设置 部门编号
* @param deptCode
* 部门编号
*/
public void setDeptCode(String deptCode){
this.deptCode = deptCode;
}
private String deptCode;
/**
* 获取 热门(0.否,1.是)
* @return Integer
* 代办帮办(0.否,1.是)
*/
public Integer getHot(){
return hot;
}
private Integer agent;
/**
* 设置 热门(0.否,1.是)
* @param hot
* 代办姓名
*/
public void setHot(Integer hot){
this.hot = hot;
}
private String agentName;
/**
* 获取 显示(0.否,1.是)
* @return Integer
* 代办电话
*/
public Integer getDisplay(){
return display;
}
private String agentPhone;
/**
* 设置 显示(0.否,1.是)
* @param display
* 职务
*/
public void setDisplay(Integer display){
this.display = display;
}
private String agentPost;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -256,47 +99,22 @@ public class SiteMatterEntity extends SiteMatterVo {
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",siteId:").append(getSiteId());
sb.append(",siteName:").append(getSiteName());
sb.append(",matterId:").append(getMatterId());
sb.append(",matterName:").append(getMatterName());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",deptId:").append(getDeptId());
sb.append(",deptName:").append(getDeptName());
sb.append(",eventTypeShow:").append(getEventTypeShow());
sb.append(",source:").append(getSource());
sb.append(",deptCode:").append(getDeptCode());
sb.append(",hot:").append(getHot());
sb.append(",display:").append(getDisplay());
return sb.toString();
}
public void initAttrValue(){
this.siteId = null;
this.siteName = null;
this.siteName = "";
this.matterId = null;
this.matterName = null;
this.matterCode = null;
this.matterName = "";
this.deptId = null;
this.deptName = null;
this.eventTypeShow = null;
this.deptName = "";
this.matterCode = "";
this.eventTypeShow = "";
this.source = 0;
this.deptCode = null;
this.hot = 0;
this.display =1;
this.display = 0;
this.deptCode = "";
this.agent = 0;
this.agentName = "";
this.agentPhone = "";
this.agentPost = "";
}
}
\ No newline at end of file
......@@ -53,4 +53,10 @@ public class SiteBusinessVo extends BaseEntityLong {
private List<Long> idNotList;
/** 业务ID列表 */
private List <Long> businessIdList;
/** 业务ID排除列表 */
private List <Long> businessIdNotList;
}
\ No newline at end of file
......@@ -435,8 +435,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
PageInfo pageInfo = new PageInfo();
pageInfo.setCurrPage(1);
pageInfo.setPrePageResult(10);
return siteEntities;
}
......
......@@ -160,27 +160,18 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
String busiDesc = "根据区域编码查询站点列表" + this.getModuleDesc();
try {
if (!ObjectUtils.isEmpty(site.getSiteName())) {
// SiteEntity siteEntity = this.service.selectOne(new SiteQuery().siteName(site.getSiteName()));
List<SiteEntity> siteEntities = this.service.find(new SiteQuery().siteName(site.getSiteName()));
if (!ObjectUtils.isEmpty(siteEntities)) {
site.setAreaCodeList(siteEntities.stream().map(i -> i.getAreaCode()).collect(Collectors.toList()));
}
/* if (!ObjectUtils.isEmpty(siteEntity)) {
site.setAreaCode(siteEntity.getAreaCode());
}*/
}
if (!ObjectUtils.isEmpty(site.getAreaName())) {
//AreaEntity areaEntity = areaService.selectOne(new AreaQuery().name(site.getAreaName()));
List<AreaEntity> areaEntities = areaService.find(new AreaQuery().name(site.getAreaName()));
if (!ObjectUtils.isEmpty(areaEntities)) {
// site.setAreaCode(areaEntity.getAreaCode());
site.setAreaCodeList(areaEntities.stream().map(i -> i.getAreaCode()).collect(Collectors.toList()));
}
}
if (ObjectUtils.isEmpty(site.getAreaCodeList())) {
site.setAreaCodeList(Arrays.asList(site.getAreaCode()));
}
......@@ -189,9 +180,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
}).distinct().collect(Collectors.toList());
//List<SiteEntity> siteEntityList = this.service.getFlatSitesByAreaCode(site.getAreaCode(), getContext());
if (!ObjectUtils.isEmpty(site.getSiteName())) {
/* if (!ObjectUtils.isEmpty(site.getSiteName())) {
siteEntityList = siteEntityList.stream().filter(item -> site.getSiteName().equals(item.getSiteName())).collect(Collectors.toList());
}
}*/
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
......
......@@ -155,7 +155,9 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
@Override
protected void updateAfter(SkinBaseEntity entity, Context context) throws AppException {
saveSkinFields(entity, context);
super.updateBefore(entity, context);
SendSkinRefreshTask sendSkinRefreshTask = new SendSkinRefreshTask();
ThreadPool.getInstance().execute(sendSkinRefreshTask);
}
private void saveSkinFields(SkinBaseEntity entity, Context context) {
......@@ -202,6 +204,8 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
}
private void genTemplateCss(SkinBaseEntity entity, Context context) {
//加载模板,合成模板数据
Map data = new HashMap();
......@@ -222,7 +226,7 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
InputStream inputStream = new ByteArrayInputStream(sw.toString().getBytes(Constant.UTF8));
MultipartFile file = getMultipartFile(inputStream, "file.css");
String filePath = uploadService.saveFileUpload(file, "file/fileupload", context.getUser());
String filePath = uploadService.saveFileUpload(file, "/file/fileupload", context.getUser());
entity.setCssFilePath(filePath);
} catch (Exception e) {
......
......@@ -93,7 +93,6 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
this.findAfter(entity, pageInfo, context, result.getList());
if (!ObjectUtils.isEmpty(result.getList())) {
cacheService.set(KEY_SEARCH_SITEBUSINESSID_CACHE + siteBusinessId, JSON.toJSONString(result), KEY_SEARCH_TIMEOUTT_CACHE);
}
}
} else if (!ObjectUtils.isEmpty(query.getWindowId())) {
......@@ -134,14 +133,15 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
@Override
protected void findAfter(WindowBusinessEntity entity, PageInfo pageInfo, Context context, List<WindowBusinessEntity> list) throws AppException {
Map<Long, WindowEntity> collect = windowService.getCacheList().stream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n));
// Map<Long, WindowEntity> collect = windowService.getCacheList().stream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n));
//Map<Long, WindowEntity> collect = windowService.findToMap(new WindowQuery(), context);
Map<Long, WindowHallEntity> windowHallEntityMap = windowHallService.getCacheList().stream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n));
//Map<Long, WindowHallEntity> windowHallEntityMap = windowHallService.find(new WindowHallQuery(), context).parallelStream().collect(Collectors.toMap(x -> x.getWindowId(), Function.identity()));
Map<Long, WindowHallEntity> windowHallEntityMap = windowHallService.getCacheList().stream().collect(Collectors.toMap(x -> x.getWindowId(), y -> y, (o, n) -> n));
// Map<Long, WindowHallEntity> windowHallEntityMap = windowHallService.find(new WindowHallQuery(), context).parallelStream().collect(Collectors.toMap(x -> x.getWindowId(), Function.identity()));
Iterator iterator = list.iterator();
while (iterator.hasNext()) {
WindowBusinessEntity item = (WindowBusinessEntity) iterator.next();
WindowEntity windowEntity = collect.get(item.getWindowId());
//WindowEntity windowEntity = collect.get(item.getWindowId());
WindowEntity windowEntity = windowService.getCache(item.getWindowId().toString());
if (!ObjectUtils.isEmpty(item.getWindowId()) && !ObjectUtils.isEmpty(windowEntity)) {
item.setDeptId(windowEntity.getDeptId());
item.setDeptName(windowEntity.getDeptName());
......
......@@ -19,7 +19,7 @@
</plugin>
<plugin interceptor="com.mortals.framework.thirty.mybatis.LogInterceptor">
<property name="enableExecutorTime" value="true" />
<property name="showSql" value="true" />
<property name="showSql" value="false" />
</plugin>
</plugins>
</configuration>
\ No newline at end of file
......@@ -90,7 +90,7 @@ POST {{baseUrl}}/site/getFlatSitesByAreaCode
Content-Type: application/json
{
"areaCode":"511502000000"
"siteName": "%高新%"
}
###根据区域等级获取站点列表
......@@ -98,7 +98,7 @@ POST {{baseUrl}}/site/getAreaSitesByAreaLevel
Content-Type: application/json
{
"siteName":"徐州区办事处"
"siteName":"%高新%"
}
###站点列表
......@@ -115,7 +115,7 @@ POST {{baseUrl}}/site/syncGovMatterBySiteId
Content-Type: application/json
{
"id":1
"id":23
}
......
......@@ -11,7 +11,7 @@ Content-Type: application/json
POST {{baseUrl}}/window/business/interlist
Content-Type: application/json
{"siteBusinessId":2,"size":-1,"searchCache": 1}
{"siteBusinessId":212,"searchCache": 1}
###窗口业务列表缓存2
POST {{baseUrl}}/window/business/interlist
......
package com.mortals.xhx.base.framework.filter;
import cn.hutool.core.net.NetUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.AccessLogPdu;
......@@ -22,8 +20,6 @@ import org.springframework.cloud.gateway.support.ServerWebExchangeUtils;
import org.springframework.core.Ordered;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
......@@ -42,7 +38,6 @@ import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import java.nio.charset.StandardCharsets;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -53,7 +48,7 @@ import java.util.Map;
* @description:
**/
@Slf4j
//@Component
@Component
public class AccessLogFilter implements GlobalFilter, Ordered {
@Value("${spring.application.name:gateway}")
private String appName;
......@@ -106,7 +101,7 @@ public class AccessLogFilter implements GlobalFilter, Ordered {
accessLogPdu.setLogTime(new Date());
accessLogPdu.setMethod(request.getMethodValue());
log.info("origin uri:{} host:{} port:{},contentLens", requestPath, request.getHeaders().getHost().getHostName(), request.getHeaders().getHost().getPort(),request.getHeaders().getContentLength());
// log.info("origin uri:{} host:{} port:{},contentLens", requestPath, request.getHeaders().getHost().getHostName(), request.getHeaders().getHost().getPort(),request.getHeaders().getContentLength());
MediaType mediaType = request.getHeaders().getContentType();
if (request.getHeaders().getContentLength() > 1024 * 64) {
......@@ -226,7 +221,7 @@ public class AccessLogFilter implements GlobalFilter, Ordered {
@Override
public Flux<DataBuffer> getBody() {
log.info("outputMessage.getBody() contentLength:");
// log.info("outputMessage.getBody() contentLength:");
return outputMessage.getBody();
}
};
......
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