Commit faec8751 authored by “yiyousong”'s avatar “yiyousong”
parents 9d209097 b72555b2
...@@ -4938,6 +4938,7 @@ size|Integer|每页条数|否|- ...@@ -4938,6 +4938,7 @@ size|Integer|每页条数|否|-
name|String|部门名称|否|- name|String|部门名称|否|-
deptAbb|String|部门简称|否|- deptAbb|String|部门简称|否|-
deptNumber|String|部门编号|否|- deptNumber|String|部门编号|否|-
filter|Integer|是否过滤没有事项的部门(0.否,1.是)|否|-
**请求样例:** **请求样例:**
......
...@@ -14,4 +14,7 @@ public class MidReq{ ...@@ -14,4 +14,7 @@ public class MidReq{
private String body; private String body;
private String path;
} }
package com.mortals.xhx.busiz.rsp;
import lombok.Data;
/**
* @author karlhoo
*/
@Data
public class MidResp {
private String appId;
private String appKey;
private String timeStamp;
private String nonce;
private String secretKey;
private String sign;
}
...@@ -4,9 +4,11 @@ import cn.hutool.core.codec.Base64; ...@@ -4,9 +4,11 @@ import cn.hutool.core.codec.Base64;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.URLUtil;
import cn.hutool.crypto.digest.DigestAlgorithm; import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester; import cn.hutool.crypto.digest.Digester;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import cn.hutool.http.Method;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth; import com.mortals.framework.annotation.UnAuth;
...@@ -60,6 +62,9 @@ import java.util.stream.Collectors; ...@@ -60,6 +62,9 @@ import java.util.stream.Collectors;
@Slf4j @Slf4j
public class MidSignApiController { public class MidSignApiController {
@Value("${mid.midUrl:http://172.15.28.117:9000}")
private String midUrl;
@Value("${mid.appId:01C67D56D0630517}") @Value("${mid.appId:01C67D56D0630517}")
private String appId; private String appId;
...@@ -124,4 +129,57 @@ public class MidSignApiController { ...@@ -124,4 +129,57 @@ public class MidSignApiController {
} }
} }
/**
* 透传请求
* @param midReq
* @return
*/
@PostMapping(value = "trans")
@UnAuth
public Rest<String> trans(@RequestBody MidReq midReq) {
try {
Map<String, String> headerMap = new HashMap<>();
StringBuilder signSb = new StringBuilder();
headerMap.put("appId", appId);
headerMap.put("appKey", appKey);
String timeStamp = System.currentTimeMillis() + "";
headerMap.put("timeStamp", timeStamp);
String nonce = RandomUtil.randomNumbers(6);
headerMap.put("nonce", nonce);
headerMap.put("secretKey", secretKey);
if("post".equalsIgnoreCase(midReq.getMethod())){
JSONObject object1 = JSONObject.parseObject(midReq.getBody());
headerMap.put("body", object1.toJSONString());
}else if("get".equalsIgnoreCase(midReq.getMethod())){
/* HashMap<String, String> paramsMap = JSON.parseObject(midReq.getBody(), HashMap.class);
if (!paramsMap.isEmpty()) {
for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
headerMap.put(entry.getKey(), entry.getValue());
}
}*/
}
signSb.append("appId").append("=").append(headerMap.get("appId")).append("&");
signSb.append("appKey").append("=").append(headerMap.get("appKey")).append("&");
signSb.append("body").append("=").append(headerMap.get("body")).append("&");
signSb.append("nonce").append("=").append(headerMap.get("nonce")).append("&");
signSb.append("secretKey").append("=").append(headerMap.get("secretKey")).append("&");
signSb.append("timeStamp").append("=").append(headerMap.get("timeStamp")).append("&");
String signStr = signSb.substring(0, signSb.length() - 1);
log.info("签名源字符串: " + signStr);
String sign = EncryptionUtils.SHA256(signStr);
log.info("签名计算结果: " + sign);
headerMap.put("sign", sign);
//请求转发
String fullUrl = URLUtil.completeUrl(midUrl, midReq.getPath());
String body = HttpUtil.createRequest(Method.POST, fullUrl).headerMap(headerMap, true).body(headerMap.get("body")).execute().body();
return Rest.ok(body);
} catch (Exception e) {
log.error("透传请求异常",e);
return Rest.fail("透传请求异常!");
}
}
} }
...@@ -51,10 +51,40 @@ public class MatterHtmlParseUtil { ...@@ -51,10 +51,40 @@ public class MatterHtmlParseUtil {
return Rest.ok(resultMap); return Rest.ok(resultMap);
} }
public static Rest<Map<String, Integer>> statSiteMatterDeptCount(Map<String, String> params, String url) {
String matterTotalExp = "//input[@id=\"result_countDept\"]";
String matterPageExp = "//input[@id=\"pageNumDept\"]";
Map<String, Integer> resultMap = new HashMap<>();
try {
Document dom = Jsoup.connect(url).data(params).get();
Elements elements = dom.selectXpath(matterTotalExp);
if (elements.size() > 0) {
Integer total = elements.get(0) == null ? 0 : DataUtil.converStr2Int(elements.get(0).attr("value"), 0);
resultMap.put("total", total);
}
elements = dom.selectXpath(matterPageExp);
if (elements.size() > 0) {
Integer pageNum = elements.get(0) == null ? 0 : DataUtil.converStr2Int(elements.get(0).attr("value"), 0);
resultMap.put("pageNum", pageNum);
}
} catch (Exception e) {
log.error("获取事项数量异常!params:" + JSON.toJSONString(params), e);
return Rest.fail(e.getMessage());
}
return Rest.ok(resultMap);
}
public static Rest<List<MatterEntity>> getMatterList(Map<String, String> params, String url) { public static Rest<List<MatterEntity>> getMatterList(Map<String, String> params, String url) {
String matterListExp = "//div[@class=\"sx_list\"]//span[1]"; String matterListExp = "//div[@class=\"sx_list\"]//span[1]";
String matterListLiExp = "//div[@class=\"sx_list\"]//li/a[1]"; String matterListLiExp = "//div[@class=\"sx_list\"]//li/a[1]";
List<MatterEntity> matterEntityList = new ArrayList<>(); List<MatterEntity> matterEntityList = new ArrayList<>();
String evaluationUrl = "";
String netApplyUrl = "";
String href = "";
try { try {
Document dom = Jsoup.connect(url).data(params).get(); Document dom = Jsoup.connect(url).data(params).get();
//System.out.println(dom.html()); //System.out.println(dom.html());
...@@ -66,7 +96,7 @@ public class MatterHtmlParseUtil { ...@@ -66,7 +96,7 @@ public class MatterHtmlParseUtil {
continue; continue;
} }
String title = element.attr("title"); String title = element.attr("title");
String href = element.firstElementChild().attr("href"); href = element.firstElementChild().attr("href");
//element.child() //element.child()
if (href.equalsIgnoreCase("javascript:void(0)")) { if (href.equalsIgnoreCase("javascript:void(0)")) {
...@@ -74,18 +104,22 @@ public class MatterHtmlParseUtil { ...@@ -74,18 +104,22 @@ public class MatterHtmlParseUtil {
} }
//抓取申请与评价页面地址 //抓取申请与评价页面地址
Element nextElementSibling = element.nextElementSibling(); Element nextElementSibling = element.nextElementSibling();
Elements elementsA = nextElementSibling.children();
String evaluationUrl = ""; //Elements elementsA = nextElementSibling.selectXpath("//a");
String netApplyUrl = "";
Elements elementsA = nextElementSibling.selectXpath("//a");
if (elementsA != null) { if (elementsA != null) {
for (Element tempElement : elementsA) { for (Element tempElement : elementsA) {
if (tempElement.text().trim().equals("好差评")) { if ("办事指南".equals(tempElement.text().trim())) {
String onclick = tempElement.attr("onclick");
List<String> list = ReUtil.findAllGroup0("'(.*?)'", onclick);
if (list.size() > 1) {
href = StrUtil.subBetween(list.get(0), "'", "'");
}
}
if ("好差评".equals(tempElement.text().trim())) {
String onclick = tempElement.attr("onclick"); String onclick = tempElement.attr("onclick");
evaluationUrl = StrUtil.subBetween(onclick, "evaluation('", "')"); evaluationUrl = StrUtil.subBetween(onclick, "evaluation('", "')");
} }
if (tempElement.text().trim().equals("申请")) { if ("申请".equals(tempElement.text().trim())) {
String onclick = tempElement.attr("onclick"); String onclick = tempElement.attr("onclick");
List<String> list = ReUtil.findAllGroup0("'(.*?)'", onclick); List<String> list = ReUtil.findAllGroup0("'(.*?)'", onclick);
if (list.size() > 4) { if (list.size() > 4) {
...@@ -94,6 +128,11 @@ public class MatterHtmlParseUtil { ...@@ -94,6 +128,11 @@ public class MatterHtmlParseUtil {
} }
} }
} }
if (ObjectUtils.isEmpty(href)) {
log.info("error href ,title:" + title);
}
buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl); buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl);
} }
...@@ -104,14 +143,23 @@ public class MatterHtmlParseUtil { ...@@ -104,14 +143,23 @@ public class MatterHtmlParseUtil {
continue; continue;
} }
String title = element.attr("title"); String title = element.attr("title");
String href = element.attr("href"); href = element.attr("href");
//抓取申请与评价页面地址 //抓取申请与评价页面地址
String evaluationUrl = "";
String netApplyUrl = "";
Element nextElementSibling = element.nextElementSibling(); Element nextElementSibling = element.nextElementSibling();
if (nextElementSibling != null) { if (nextElementSibling != null) {
Elements elementsA = nextElementSibling.selectXpath("//a");
Elements elementsA = nextElementSibling.children();
//Elements elementsA = nextElementSibling.selectXpath("//a");
for (Element tempElement : elementsA) { for (Element tempElement : elementsA) {
if ("办事指南".equals(tempElement.text().trim())) {
String onclick = tempElement.attr("onclick");
if(ObjectUtils.isEmpty(onclick)) continue;
List<String> list = ReUtil.findAllGroup0("'(.*?)'", onclick);
if (list.size() > 1) {
href = StrUtil.subBetween(list.get(0), "'", "'");
}
}
if ("好差评".equals(tempElement.text().trim())) { if ("好差评".equals(tempElement.text().trim())) {
String onclick = tempElement.attr("onclick"); String onclick = tempElement.attr("onclick");
evaluationUrl = StrUtil.subBetween(onclick, "evaluation('", "')"); evaluationUrl = StrUtil.subBetween(onclick, "evaluation('", "')");
...@@ -123,6 +171,11 @@ public class MatterHtmlParseUtil { ...@@ -123,6 +171,11 @@ public class MatterHtmlParseUtil {
netApplyUrl = StrUtil.subBetween(list.get(3), "'", "'"); netApplyUrl = StrUtil.subBetween(list.get(3), "'", "'");
} }
} }
if (ObjectUtils.isEmpty(href)) {
log.info("error href ,title:" + title);
}
} }
} }
buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl); buildMatter(matterEntityList, title, href, evaluationUrl, netApplyUrl);
...@@ -243,17 +296,19 @@ public class MatterHtmlParseUtil { ...@@ -243,17 +296,19 @@ public class MatterHtmlParseUtil {
// System.out.println(JSON.toJSONString(allList)); // System.out.println(JSON.toJSONString(allList));
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<>(); HashMap<String, String> params = new HashMap<>();
params.put("areaCode", "510110006007"); params.put("areaCode", "511500000000");
params.put("dxType", "56"); params.put("dxType", "3");
params.put("deptCode", ""); params.put("deptCode", "");
params.put("searchtext", ""); params.put("searchtext", "");
params.put("type", "2");//类型 2.部门 1.主题 3.热度
params.put("taskType", ""); params.put("taskType", "");
params.put("pageno", "1"); // params.put("pageno", "1");
Rest<Map<String, Integer>> rest = MatterHtmlParseUtil.statSiteMatterCount(params, url); Rest<Map<String, Integer>> rest = MatterHtmlParseUtil.statSiteMatterDeptCount(params, url);
System.out.println(JSON.toJSONString(rest)); System.out.println(JSON.toJSONString(rest));*/
/*
List<MatterEntity> allList = new ArrayList<>(); List<MatterEntity> allList = new ArrayList<>();
String url1 = "http://www.sczwfw.gov.cn/jiq/interface/item/tags"; String url1 = "http://www.sczwfw.gov.cn/jiq/interface/item/tags";
...@@ -282,6 +337,7 @@ public class MatterHtmlParseUtil { ...@@ -282,6 +337,7 @@ public class MatterHtmlParseUtil {
Rest<Map<String, String>> rest1 = MatterHtmlParseUtil.syncDeptBySiteId(params, url); Rest<Map<String, String>> rest1 = MatterHtmlParseUtil.syncDeptBySiteId(params, url);
System.out.println(JSON.toJSONString(rest1)); System.out.println(JSON.toJSONString(rest1));
*/
} }
......
...@@ -69,15 +69,15 @@ public class SyncGovMatterDetailThread implements Runnable { ...@@ -69,15 +69,15 @@ public class SyncGovMatterDetailThread implements Runnable {
@Override @Override
public void run() { public void run() {
log.info("同步站点事项开始....."); log.info("同步站点事项开始.....");
Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity, context); // Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity, context);
log.info("同步站点部门:" + JSON.toJSONString(deptRest)); // log.info("同步站点部门:" + JSON.toJSONString(deptRest));
Rest<String> rest = siteService.syncMatterBySiteId(siteEntity, context); Rest<String> rest = siteService.syncMatterBySiteId(siteEntity, context);
AreaEntity areaEntity = areaService.getCache(siteEntity.getAreaCode()); AreaEntity areaEntity = areaService.getCache(siteEntity.getAreaCode());
log.info("同步事项列表:" + JSON.toJSONString(rest)); log.info("同步事项列表:" + JSON.toJSONString(rest));
if (rest.getCode() == YesNoEnum.YES.getValue()) { if (rest.getCode() == YesNoEnum.YES.getValue()) {
List<MatterEntity> matterEntityList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()).source(SourceEnum.政务网.getValue())); List<MatterEntity> matterEntityList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()).source(SourceEnum.政务网.getValue()));
List<MatterEntity> unSyncDetailMatterList = matterEntityList.stream() List<MatterEntity> unSyncDetailMatterList = matterEntityList.stream()
//.filter(f -> f.getHaveGetMatterInfo().equalsIgnoreCase("false")) .filter(f -> f.getHaveGetMatterInfo().equalsIgnoreCase("false"))
.collect(Collectors.toList()); .collect(Collectors.toList());
//查询站点事项相关 //查询站点事项相关
......
...@@ -6,6 +6,10 @@ import com.mortals.framework.service.ITaskExcuteService; ...@@ -6,6 +6,10 @@ import com.mortals.framework.service.ITaskExcuteService;
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.service.MatterService;
import com.mortals.xhx.module.matters.service.MattersService;
import com.mortals.xhx.module.site.model.SiteMatterQuery; import com.mortals.xhx.module.site.model.SiteMatterQuery;
import com.mortals.xhx.module.site.service.SiteMatterService; import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.site.service.SiteService; import com.mortals.xhx.module.site.service.SiteService;
...@@ -25,7 +29,7 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService { ...@@ -25,7 +29,7 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService {
@Autowired @Autowired
private DeptService deptService; private DeptService deptService;
@Autowired @Autowired
private SiteMatterService siteMatterService; private MatterService matterService;
@Override @Override
...@@ -33,11 +37,16 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService { ...@@ -33,11 +37,16 @@ public class StatSiteDeptMatterTaskImpl implements ITaskExcuteService {
log.info("开始同步事项列表!"); log.info("开始同步事项列表!");
List<DeptEntity> deptEntities = deptService.find(new DeptQuery()); List<DeptEntity> deptEntities = deptService.find(new DeptQuery());
for (DeptEntity deptEntity : deptEntities) { for (DeptEntity deptEntity : deptEntities) {
int total = siteMatterService.count(new SiteMatterQuery().deptId(deptEntity.getId()), null); int total = matterService.count(new MatterQuery().deptCode(deptEntity.getDeptNumber()), null);
if (total > 0) { if (total > 0) {
deptEntity.setTotal(total); DeptEntity deptQuery = new DeptEntity();
deptEntity.setUpdateTime(new Date()); deptQuery.setTotal(total);
deptService.update(deptEntity, null); deptQuery.setUpdateTime(new Date());
DeptEntity condition = new DeptEntity();
condition.setId(deptEntity.getId());
deptService.getDao().update(deptQuery, condition);
// deptService.update(deptEntity, null);
} }
} }
......
...@@ -28,7 +28,7 @@ import java.util.List; ...@@ -28,7 +28,7 @@ import java.util.List;
* 同步用户 * 同步用户
*/ */
@Slf4j @Slf4j
@Service("SyncUserTask") //@Service("SyncUserTask")
public class SyncUserTaskImpl implements ITaskExcuteService { public class SyncUserTaskImpl implements ITaskExcuteService {
@Autowired @Autowired
...@@ -48,8 +48,6 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -48,8 +48,6 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
userService.updateUserList(list.getData().getData()); userService.updateUserList(list.getData().getData());
//resourceService.updateUserList(); //resourceService.updateUserList();
/* UserPdu userPdu = new UserPdu(); /* UserPdu userPdu = new UserPdu();
......
...@@ -17,8 +17,10 @@ import com.mortals.framework.model.PageInfo; ...@@ -17,8 +17,10 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.base.system.upload.service.UploadService; import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.Constant; import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.pdu.app.AppPdu;
import com.mortals.xhx.common.utils.BeanUtil; import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.ZipUtils; import com.mortals.xhx.common.utils.ZipUtils;
import com.mortals.xhx.feign.app.device.IAppFeign;
import com.mortals.xhx.module.app.model.*; import com.mortals.xhx.module.app.model.*;
import com.mortals.xhx.module.app.service.*; import com.mortals.xhx.module.app.service.*;
import com.mortals.xhx.module.site.model.SiteEntity; import com.mortals.xhx.module.site.model.SiteEntity;
...@@ -65,6 +67,8 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -65,6 +67,8 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
private AppInfoTempleteFieldService appInfoTempleteFieldService; private AppInfoTempleteFieldService appInfoTempleteFieldService;
@Autowired @Autowired
private AppVersionService appVersionService; private AppVersionService appVersionService;
@Autowired
private IAppFeign appFeign;
@Override @Override
protected void findAfter(AppEntity params, PageInfo pageInfo, Context context, List<AppEntity> list) throws AppException { protected void findAfter(AppEntity params, PageInfo pageInfo, Context context, List<AppEntity> list) throws AppException {
...@@ -320,6 +324,12 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -320,6 +324,12 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
entity.setFilePath(null); entity.setFilePath(null);
entity.setFileName(null); entity.setFileName(null);
//判断如果应用下架,通知自助服务终端
if(entity.getShelves()==YesNoEnum.NO.getValue()){
AppPdu appPdu = new AppPdu();
appPdu.setAppId(entity.getId());
appFeign.forbidden(appPdu);
}
int iRet = this.dao.update(entity); int iRet = this.dao.update(entity);
if (iRet == 0) { if (iRet == 0) {
throw new AppException(-1002, "更新失败!"); throw new AppException(-1002, "更新失败!");
......
...@@ -36,7 +36,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE ...@@ -36,7 +36,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE
private BaseAreaService baseAreaService; private BaseAreaService baseAreaService;
/* @Override @Override
public void putCache(String key, AreaEntity data) { public void putCache(String key, AreaEntity data) {
super.putCache(key, data); super.putCache(key, data);
//加载孩子关系 //加载孩子关系
...@@ -47,7 +47,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE ...@@ -47,7 +47,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE
cacheService.lpush(childKey, item); cacheService.lpush(childKey, item);
}); });
} }
}*/ }
@Override @Override
protected String getExtKey(AreaEntity data) { protected String getExtKey(AreaEntity data) {
......
...@@ -5,6 +5,7 @@ import com.mortals.framework.model.Context; ...@@ -5,6 +5,7 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDCacheService; import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.business.model.BusinessEntity; import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.dept.dao.DeptDao;
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.model.vo.DeptVo; import com.mortals.xhx.module.dept.model.vo.DeptVo;
...@@ -23,6 +24,7 @@ import java.util.Map; ...@@ -23,6 +24,7 @@ import java.util.Map;
*/ */
public interface DeptService extends ICRUDCacheService<DeptEntity, Long> { public interface DeptService extends ICRUDCacheService<DeptEntity, Long> {
DeptDao getDao();
/** /**
* 同步政务网部门数据 * 同步政务网部门数据
......
...@@ -156,6 +156,19 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -156,6 +156,19 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
} }
/**
* @param entity
* @param model
* @param context
* @throws AppException
*/
@Override
protected void saveBefore(DeptEntity entity, Map<String, Object> model, Context context) throws AppException {
DeptEntity deptEntity = this.service.selectOne(new DeptQuery().deptNumber(entity.getDeptNumber()));
if(!ObjectUtils.isEmpty(deptEntity)){
throw new AppException("部门编码已存在!");
}
entity.setSource(1);
super.saveBefore(entity, model, context);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.matter.model; package com.mortals.xhx.module.matter.model;
import java.util.*;
import java.util.List; import java.util.List;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
...@@ -1694,7 +1692,7 @@ public class MatterEntity extends MatterVo { ...@@ -1694,7 +1692,7 @@ public class MatterEntity extends MatterVo {
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return Objects.hash(this.areaCode, this.matterNo);
} }
@Override @Override
...@@ -1702,7 +1700,7 @@ public class MatterEntity extends MatterVo { ...@@ -1702,7 +1700,7 @@ public class MatterEntity extends MatterVo {
if (obj == null) return false; if (obj == null) return false;
if (obj instanceof MatterEntity) { if (obj instanceof MatterEntity) {
MatterEntity tmp = (MatterEntity) obj; MatterEntity tmp = (MatterEntity) obj;
if (this.getId() == tmp.getId()) { if ((this.getAreaCode()+this.matterNo).equals(tmp.getAreaCode()+tmp.matterNo)) {
return true; return true;
} }
} }
......
...@@ -85,7 +85,6 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu ...@@ -85,7 +85,6 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
@Override @Override
protected void findAfter(SiteBusinessEntity params, PageInfo pageInfo, Context context, List<SiteBusinessEntity> list) throws AppException { protected void findAfter(SiteBusinessEntity params, PageInfo pageInfo, Context context, List<SiteBusinessEntity> list) throws AppException {
if (!ObjectUtils.isEmpty(params.getIdNotList())) { if (!ObjectUtils.isEmpty(params.getIdNotList())) {
//排除掉已经存在的ids //排除掉已经存在的ids
log.info("idNotList:{}", JSON.toJSONString(params.getIdNotList())); log.info("idNotList:{}", JSON.toJSONString(params.getIdNotList()));
...@@ -103,15 +102,15 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu ...@@ -103,15 +102,15 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
//子节点已经全部选中,删除父节点 //子节点已经全部选中,删除父节点
iterator.remove(); iterator.remove();
pageInfo.setTotalResult(pageInfo.getTotalResult() - 1); pageInfo.setTotalResult(pageInfo.getTotalResult() - 1);
} else { } else {
childs.stream().forEach(item1 -> { childs.stream().forEach(item1 -> {
buildChildBusiness(item1); buildChildBusiness(item1);
}); });
item.setChildren(childs); item.setChildren(childs);
buildChildBusiness(item);
} }
} }
buildChildBusiness(item);
} }
} else { } else {
list.stream().peek(item -> { list.stream().peek(item -> {
...@@ -187,10 +186,6 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu ...@@ -187,10 +186,6 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
//删除 //删除
businessService.remove(mainIds,context); businessService.remove(mainIds,context);
} }
} }
......
...@@ -27,6 +27,7 @@ import com.mortals.xhx.module.area.model.AreaEntity; ...@@ -27,6 +27,7 @@ import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaQuery; import com.mortals.xhx.module.area.model.AreaQuery;
import com.mortals.xhx.module.area.service.AreaService; import com.mortals.xhx.module.area.service.AreaService;
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.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.MatterEntity;
import com.mortals.xhx.module.matter.model.MatterQuery; import com.mortals.xhx.module.matter.model.MatterQuery;
...@@ -368,14 +369,14 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -368,14 +369,14 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
private List<SiteTreeSelect> getSiteTreeSelects(String userId) { private List<SiteTreeSelect> getSiteTreeSelects(String userId) {
String siteTreeSelectStr = cacheService.hget(USER_SITE_TREE, userId, String.class); String siteTreeSelectStr = cacheService.hget(USER_SITE_TREE, userId, String.class);
log.info("userId:{},siteTreeSelectStr:{}",userId,siteTreeSelectStr); log.info("userId:{},siteTreeSelectStr:{}", userId, siteTreeSelectStr);
//反序列化树对象 //反序列化树对象
if(ObjectUtils.isEmpty(siteTreeSelectStr)){ if (ObjectUtils.isEmpty(siteTreeSelectStr)) {
return new ArrayList<>(); return new ArrayList<>();
} }
JSONArray jsonArray = JSON.parseArray(siteTreeSelectStr); JSONArray jsonArray = JSON.parseArray(siteTreeSelectStr);
if(ObjectUtils.isEmpty(jsonArray)){ if (ObjectUtils.isEmpty(jsonArray)) {
return new ArrayList<>(); return new ArrayList<>();
} }
List<SiteTreeSelect> collect = jsonArray.stream().map(item -> { List<SiteTreeSelect> collect = jsonArray.stream().map(item -> {
...@@ -554,32 +555,100 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -554,32 +555,100 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
return Rest.ok(allList); return Rest.ok(allList);
} }
private List<MatterEntity> getMatters(HashMap<String, String> params, Context context) {
String url = GlobalSysInfo.getParamValue(Constant.GOV_MATTER_PAGELIST_URL, "http://www.sczwfw.gov.cn/jiq/interface/item/tags");
Rest<Map<String, Integer>> restStat = MatterHtmlParseUtil.statSiteMatterCount(params, url);
if (restStat.getCode() == YesNoEnum.YES.getValue()) {
Integer pageNum = restStat.getData().getOrDefault("pageNum", 0);
Integer total = restStat.getData().getOrDefault("total", 0);
//获取事项全列表
Rest<List<MatterEntity>> matterAllRest = this.getMatterAllListByGOV(params, pageNum, context);
if (matterAllRest.getCode() == YesNoEnum.YES.getValue()) {
return matterAllRest.getData();
}
}
return new ArrayList<MatterEntity>();
}
@Override @Override
public Rest<String> syncMatterBySiteId(SiteEntity siteEntity, Context context) { public Rest<String> syncMatterBySiteId(SiteEntity siteEntity, Context context) {
//根据站点中区域编码 查询当前是否已经存在事项 //根据站点中区域编码 查询当前是否已经存在事项
//根据站点区域编码查询政务网事项列表 //根据站点区域编码查询政务网事项列表
AreaEntity areaEntity = areaService.getCache(siteEntity.getAreaCode()); AreaEntity areaEntity = areaService.getCache(siteEntity.getAreaCode());
String dxType = AreaLevelDxTypeEnum.getByValue(areaEntity == null ? 2 : areaEntity.getAreaLevel()).getDesc(); //String dxType = AreaLevelDxTypeEnum.getByValue(areaEntity == null ? 2 : areaEntity.getAreaLevel()).getDesc();
String url = GlobalSysInfo.getParamValue(Constant.GOV_MATTER_PAGELIST_URL, "http://www.sczwfw.gov.cn/jiq/interface/item/tags"); // String dxType="2";
//String dxType = "3";
List<MatterEntity> govMatterList = new ArrayList<>();
List<DeptEntity> deptEntities = deptService.find(new DeptQuery().siteId(siteEntity.getId()).source(0));
for (DeptEntity deptEntity : deptEntities) {
HashMap<String, String> params = new HashMap<>(); HashMap<String, String> params = new HashMap<>();
params.put("areaCode", areaEntity.getAreaCode());
params.put("dxType", "6");
params.put("deptCode", deptEntity.getDeptNumber());
params.put("searchtext", "");
params.put("taskType", "");
List<MatterEntity> deptMatterList = this.getMatters(params, context);
if (!ObjectUtils.isEmpty(deptMatterList)) {
govMatterList.addAll(deptMatterList);
}
}
/* HashMap<String, String> params = new HashMap<>();
params.put("dxType", dxType); params.put("dxType", dxType);
params.put("areaCode", siteEntity.getAreaCode()); params.put("areaCode", siteEntity.getAreaCode());
params.put("deptCode", ""); params.put("deptCode", "");
params.put("searchtext", ""); params.put("searchtext", "");
params.put("taskType", ""); params.put("taskType", "");
params.put("pageno", "1"); params.put("pageno", "1");
params.put("type", "2");
Rest<Map<String, Integer>> restStat = MatterHtmlParseUtil.statSiteMatterCount(params, url); List<MatterEntity> govMatterList = this.getMatters(params, context);
dxType = "3";
params = new HashMap<>();
params.put("dxType", dxType);
params.put("areaCode", siteEntity.getAreaCode());
params.put("deptCode", "");
params.put("searchtext", "");
params.put("taskType", "");
params.put("pageno", "1");
params.put("type", "2");
List<MatterEntity> mattersTwo = this.getMatters(params, context);
govMatterList.addAll(mattersTwo);*/
List<MatterEntity> localMatterList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()));
List<MatterEntity> subList = this.subList(govMatterList, localMatterList);
log.info("抓取事项总数:{}需要添加事项数量:{}", govMatterList.size(), subList.size());
subList = subList.stream().distinct().collect(Collectors.toList());
log.info("需要添加事项过滤后数量:{}" , subList.size());
//差集进行插入并更新详细数据
if (!ObjectUtils.isEmpty(subList)) {
for (MatterEntity matterEntity : subList) {
DeptEntity deptCache = deptService.getExtCache(matterEntity.getDeptCode());
matterEntity.setDeptName(deptCache == null ? "" : deptCache.getName());
matterService.save(matterEntity, context);
}
/* List<List<MatterEntity>> partition = ListUtil.partition(subList, 100);
for (List<MatterEntity> matterEntityList : partition) {
log.info("insert subList size:" + matterEntityList.size());
int count = matterService.save(matterEntityList, context);
log.info("insert subList size success:" + count);
}*/
}
/* Rest<Map<String, Integer>> restStat = MatterHtmlParseUtil.statSiteMatterDeptCount(params, url);
if (restStat.getCode() == YesNoEnum.YES.getValue()) { if (restStat.getCode() == YesNoEnum.YES.getValue()) {
Integer pageNum = restStat.getData().getOrDefault("pageNum", 0); Integer pageNum = restStat.getData().getOrDefault("pageNum", 0);
Integer total = restStat.getData().getOrDefault("total", 0); Integer total = restStat.getData().getOrDefault("total", 0);
//获取事项全列表 //获取事项全列表
Rest<List<MatterEntity>> matterAllRest = this.getMatterAllListByGOV(params, pageNum, context); Rest<List<MatterEntity>> matterAllRest = this.getMatterAllListByGOV(params, pageNum, context);
if (total != matterAllRest.getData().size()) {
log.warn(String.format("抓取事项数量不一致,抓取计划:%d条 ,实际抓取:%d条", total, matterAllRest.getData().size()));
}
if (matterAllRest.getCode() == YesNoEnum.YES.getValue()) { if (matterAllRest.getCode() == YesNoEnum.YES.getValue()) {
List<MatterEntity> govMatterList = matterAllRest.getData(); List<MatterEntity> govMatterList = matterAllRest.getData();
List<MatterEntity> localMatterList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode())); List<MatterEntity> localMatterList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()));
...@@ -602,7 +671,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -602,7 +671,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
} }
} }
} }
*/
return Rest.ok("同步事项条数成功!"); return Rest.ok("同步事项条数成功!");
} }
......
...@@ -41,9 +41,6 @@ import java.util.regex.Pattern; ...@@ -41,9 +41,6 @@ import java.util.regex.Pattern;
@Service("siteThemeService") @Service("siteThemeService")
public class SiteThemeServiceImpl extends AbstractCRUDServiceImpl<SiteThemeDao, SiteThemeEntity, Long> implements SiteThemeService { public class SiteThemeServiceImpl extends AbstractCRUDServiceImpl<SiteThemeDao, SiteThemeEntity, Long> implements SiteThemeService {
@Autowired
private SiteService siteService;
@Override @Override
public Rest<String> syncThemeBySiteId(SiteEntity siteEntity, Context context) { public Rest<String> syncThemeBySiteId(SiteEntity siteEntity, Context context) {
...@@ -151,16 +148,21 @@ public class SiteThemeServiceImpl extends AbstractCRUDServiceImpl<SiteThemeDao, ...@@ -151,16 +148,21 @@ public class SiteThemeServiceImpl extends AbstractCRUDServiceImpl<SiteThemeDao,
public static void main(String[] args) { public static void main(String[] args) {
String str = "changeTheme('005', '1')"; String str = "ywblurl('http://www.sczwfw.gov.cn/jiq/front/transition/ywTransToDetail?areaCode=511500000000&amp;itemCode=511A0141700000-511500000000-000-125112007566044888-1-00&amp;taskType=1&amp;deptCode=511501-17','在公路增设或改造平面交叉道口审批')";
/*
String reg = "'.*?'"; String reg = "'.*?'";
Pattern compile = Pattern.compile(reg); Pattern compile = Pattern.compile(reg);
*/
List<String> allGroups = ReUtil.findAllGroup0(compile, str); List<String> allGroups = ReUtil.findAllGroup0("'(.*?)'", str);
allGroups.forEach(item -> { allGroups.forEach(item -> {
System.out.println(item); // System.out.println(item);
}); });
System.out.println(allGroups.get(0));
} }
} }
\ No newline at end of file
...@@ -184,7 +184,7 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W ...@@ -184,7 +184,7 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
} }
private void pushChangeMsg(Long windowId) { private void pushChangeMsg(Long windowId) {
log.info("pushChangeMsg:{}", JSON.toJSONString(windowId)); // log.info("pushChangeMsg:{}", JSON.toJSONString(windowId));
String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://172.15.28.116:8090"); String phpUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://172.15.28.116:8090");
phpUrl += "/api/window/winNameChange"; phpUrl += "/api/window/winNameChange";
HashMap<String, Object> paramsMap = new HashMap<>(); HashMap<String, Object> paramsMap = new HashMap<>();
......
...@@ -50,7 +50,7 @@ Accept: application/json ...@@ -50,7 +50,7 @@ Accept: application/json
###区域查看 ###区域查看
GET {{baseUrl}}/area/getListByRootId?rootId=6182157d00ce41559e001a89d87f4057 GET {{baseUrl}}/area/getListByRootId?rootId=0
Accept: application/json Accept: application/json
......
...@@ -4,9 +4,7 @@ POST {{baseUrl}}/dept/list ...@@ -4,9 +4,7 @@ POST {{baseUrl}}/dept/list
Content-Type: application/json Content-Type: application/json
{ {
"name":"qwudiq" , "filter":1 ,
"deptAbb":"zudynx" ,
"deptNumber":"w2q60e" ,
"page":1, "page":1,
"size":10 "size":10
} }
......
package com.mortals.xhx.common.pdu.app;
import com.mortals.framework.model.BaseEntityLong;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* appPdu对象
*
* @author zxfei
* @date 2022-10-26
*/
@Data
public class AppPdu {
/**
* appId
*/
private Long appId;
}
\ No newline at end of file
package com.mortals.xhx.feign.app.device;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.common.pdu.app.AppPdu;
import com.mortals.xhx.feign.IFeign;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
/**
* 设备 Feign接口
*
* @author zxfei
* @date 2022-10-26
*/
@FeignClient(name = "sst-manager", path = "/sst", fallbackFactory = AppFeignFallbackFactory.class)
public interface IAppFeign extends IFeign {
/**
* 设备保存更新
*
* @param appPdu
* @return
*/
@PostMapping(value = "/apps/forbidden")
Rest<Void> forbidden(@RequestBody AppPdu appPdu);
}
@Slf4j
@Component
class AppFeignFallbackFactory implements FallbackFactory<IAppFeign> {
@Override
public IAppFeign create(Throwable t) {
return new IAppFeign() {
@Override
public Rest<Void> forbidden(AppPdu appPdu) {
return Rest.fail("暂时无法通知,请稍后再试!");
}
};
}
}
This diff is collapsed.
...@@ -264,10 +264,6 @@ export default { ...@@ -264,10 +264,6 @@ export default {
}, },
//状态 //状态
style: [ style: [
{
key: 0,
name: "排队中",
},
{ {
key: 1, key: 1,
name: "办理中", name: "办理中",
...@@ -280,7 +276,6 @@ export default { ...@@ -280,7 +276,6 @@ export default {
//Form数据列表 //Form数据列表
tableList: [], tableList: [],
obj: { obj: {
0: "排队中",
1: "办理中", 1: "办理中",
4: "办理完成", 4: "办理完成",
}, },
...@@ -380,6 +375,7 @@ export default { ...@@ -380,6 +375,7 @@ export default {
//用户模态框 //用户模态框
async openDeclarant(item) { async openDeclarant(item) {
await getPeopleanalyse({ await getPeopleanalyse({
idcard: item.people_idcard,
peopleid: item.peopleid, peopleid: item.peopleid,
time: this.searchForm.time, time: this.searchForm.time,
}).then((res) => { }).then((res) => {
......
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
> >
<span <span
><i class="lable">叫号设备:</i ><i class="lable">叫号设备:</i
>{{ dataList.window_fromnum || "--" }}</span >{{ dataList.call_name || "--" }}</span
> >
</div> </div>
</div> </div>
......
<template> <template>
<div class="businessModal" ref="businessModal"> <div class="businessModal" ref="businessModal">
<a-modal :title="modalInfo.title" width="400px" :visible="modalInfo.visible" <a-modal :title="modalInfo.title" :visible="modalInfo.visible" :confirmLoading="modalInfo.confirmLoading"
:confirmLoading="modalInfo.confirmLoading" @cancel="modalClose" :centered="true" :destroyOnClose="true" @cancel="modalClose" :centered="true" :destroyOnClose="true" :getContainer="() => $refs.businessModal">
:getContainer="() => $refs.businessModal">
<div class="content"> <div class="content">
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
<em v-if="dataList.matterlist">关联事项({{ dataList.matterlist.length }}</em> <em v-if="dataList.matterlist">关联事项({{ dataList.matterlist.length }}</em>
<p> <p>
<template v-for="item in dataList.matterlist"> <template v-for="item in dataList.matterlist">
<p>{{ item }}</p> <p>* {{ item }}</p>
</template> </template>
</p> </p>
<h4> <h4>
<span>受理次数<br /><i>{{ dataList.slcount }}</i></span> <span>受理次数<br /><i>{{ dataList.slcount }}</i></span>
<span>办结次数<br /><i>{{ dataList.bjcount }}</i></span> <span>办结次数<br /><i>{{ dataList.bjcount }}</i></span>
<span>好评率<br /><i>{{ dataList.hplv }}</i></span> <span>好评率<br /><i>{{ dataList.hplv }}%</i></span>
</h4> </h4>
</div> </div>
<template slot="footer"> <template slot="footer">
...@@ -50,7 +49,7 @@ export default { ...@@ -50,7 +49,7 @@ export default {
h1 { h1 {
font-size: 17px; font-size: 17px;
color: #139bfd; color: #139bfd;
padding: 20px; padding: 0 20px 20px 20px;
} }
em { em {
...@@ -64,10 +63,12 @@ export default { ...@@ -64,10 +63,12 @@ export default {
p { p {
padding: 3px 20px; padding: 3px 20px;
font-size: 16px; font-size: 16px;
width: 500px; width: 100%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
} }
h4 { h4 {
......
<template> <template>
<div class="userModal" ref="userModal"> <div class="userModal" ref="userModal">
<a-modal <a-modal :title="modalInfo.title" :width="modalInfo.width" :visible="modalInfo.visible"
:title="modalInfo.title" :confirmLoading="modalInfo.confirmLoading" @cancel="modalClose" :centered="true" :destroyOnClose="true"
:width="modalInfo.width" :getContainer="() => $refs.userModal">
:visible="modalInfo.visible"
:confirmLoading="modalInfo.confirmLoading"
@cancel="modalClose"
:centered="true"
:destroyOnClose="true"
:getContainer="() => $refs.userModal"
>
<div class="content"> <div class="content">
<h1>{{ dataList.people_name}}</h1> <h1>{{ dataList.people_name }}</h1>
<p> <p>
<span>{{ dataList.people_sex }}</span> <span>{{ dataList.people_sex }}</span>
<span>{{ dataList.age }}</span> <span>{{ dataList.age }}</span>
<span>{{ dataList.people_phone }}</span> <span>{{ dataList.people_phone }}</span>
</p> </p>
<h2> <h2>
<span <span>预约次数<br /><i>{{ dataList.ordernum }}</i></span>
>预约次数<br /><i>{{ dataList.ordernum }}</i></span <span>排队次数<br /><i>{{ dataList.quenum }}</i></span>
> <span>关联业务<br /><i>{{ dataList.bus_num }}</i></span>
<span
>排队次数<br /><i>{{ dataList.quenum }}</i></span
>
<span
>关联业务<br /><i>{{ dataList.bus_num}}</i></span
>
</h2> </h2>
</div> </div>
<template slot="footer"> <template slot="footer">
<a-button type="primary" ghost @click="openBlockchain">查看TA的数据画像</a-button> <a-button type="primary" ghost @click="openBlockchain">查看TA的数据画像</a-button>
<a-button type="primary" ghost @click="openBlockchain" <a-button type="primary" ghost @click="openBlockchain">区块链信息</a-button>
>区块链信息</a-button
>
</template> </template>
</a-modal> </a-modal>
<Blockchain ref="Blockchain" /> <Blockchain ref="Blockchain" />
...@@ -48,14 +33,14 @@ export default { ...@@ -48,14 +33,14 @@ export default {
name: "PortalAdminVueUserInfo", name: "PortalAdminVueUserInfo",
data() { data() {
return { return {
dataList:[], dataList: [],
}; };
}, },
components: { components: {
Blockchain, Blockchain,
}, },
mounted() {}, mounted() { },
methods: { methods: {
openBlockchain() { openBlockchain() {
// this.$refs.Blockchain.modalInfo.visible = true; // this.$refs.Blockchain.modalInfo.visible = true;
...@@ -69,30 +54,35 @@ export default { ...@@ -69,30 +54,35 @@ export default {
.userModal { .userModal {
.content { .content {
h1 { h1 {
padding: 20px; padding: 0 20px;
color: #3bacfd; color: #3bacfd;
font-size: 18px; font-size: 18px;
} }
p { p {
padding: 20px; padding: 20px;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
span { span {
& + span { &+span {
margin-left: 30px; margin-left: 30px;
} }
} }
} }
h2 { h2 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 20px; padding: 20px;
background: #f3faff; background: #f3faff;
span { span {
font-size: 16px; font-size: 16px;
text-align: center; text-align: center;
i { i {
color: #3bacfd; color: #3bacfd;
font-style: normal; font-style: normal;
...@@ -100,6 +90,7 @@ export default { ...@@ -100,6 +90,7 @@ export default {
} }
} }
} }
.ant-modal-body { .ant-modal-body {
padding: 0 !important; padding: 0 !important;
min-height: 300px !important; min-height: 300px !important;
......
<template> <template>
<div class="workPeopleModal" ref="workPeopleModal"> <div class="workPeopleModal" ref="workPeopleModal">
<a-modal :title="modalInfo.title" width="500px" :visible="modalInfo.visible" <a-modal :title="modalInfo.title" :visible="modalInfo.visible" :confirmLoading="modalInfo.confirmLoading"
:confirmLoading="modalInfo.confirmLoading" @cancel="modalClose" :centered="true" :destroyOnClose="true" @cancel="modalClose" :centered="true" :destroyOnClose="true" :getContainer="() => $refs.workPeopleModal">
:getContainer="() => $refs.workPeopleModal">
<div class="content"> <div class="content">
<div class="workInfo"> <div class="workInfo">
<div class="left"> <div class="left">
...@@ -15,14 +14,14 @@ ...@@ -15,14 +14,14 @@
<span><i class="lable">所属部门:</i>{{ infoData.deptName || "--" }}</span> <span><i class="lable">所属部门:</i>{{ infoData.deptName || "--" }}</span>
<span><i class="lable">政治面貌:</i>{{ $codeMap.politicalStatus[infoData.politicalstatus] || "--" }}</span> <span><i class="lable">政治面貌:</i>{{ $codeMap.politicalStatus[infoData.politicalstatus] || "--" }}</span>
<span><i class="lable">电话:</i>{{ infoData.mobile || "--" }}</span> <span><i class="lable">电话:</i>{{ infoData.mobile || "--" }}</span>
<span><i class="lable">星级:</i>{{ infoData.starlevel +'' || "--" }} </span> <span v-show="infoData.starlevel"><i class="lable">星级:</i>{{ infoData.starlevel + '' || "--" }} </span>
</div> </div>
</div> </div>
</div> </div>
<h2> <h2>
<span>受理业务<br /><i>{{ infoData.slbusiness || "0" }}</i></span> <span>受理业务<br /><i>{{ infoData.slbusiness || "0" }}</i></span>
<span>评价次数<br /><i>{{ infoData.pjnum || "0" }}</i></span> <span>评价次数<br /><i>{{ infoData.pjnum || "0" }}</i></span>
<span>好评率<br /><i>{{ infoData.hplv || "0" }}</i></span> <span>好评率<br /><i>{{ infoData.hplv + '%' || "--" }}</i></span>
</h2> </h2>
</div> </div>
<template slot="footer"> <template slot="footer">
...@@ -72,6 +71,7 @@ export default { ...@@ -72,6 +71,7 @@ export default {
width: 100px; width: 100px;
padding: 0 10px; padding: 0 10px;
img { img {
max-height: 120px; max-height: 120px;
width: 100%; width: 100%;
...@@ -94,6 +94,9 @@ export default { ...@@ -94,6 +94,9 @@ export default {
display: inline-block; display: inline-block;
width: 49%; width: 49%;
padding: 2px 0; padding: 2px 0;
overflow: hidden; // 溢出部分隐藏
white-space: nowrap; // 文字不换行
text-overflow: ellipsis; // 显示省略号
.lable { .lable {
display: inline-block; display: inline-block;
......
...@@ -2,27 +2,17 @@ ...@@ -2,27 +2,17 @@
<div class="queueRecord-Container"> <div class="queueRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button <a-button :loading="btnLoading" type="success" @click="handleExportTable">
:loading="btnLoading"
type="success"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b <b>取号次数:<i>{{ tablePagination.total }}</i></b>
>叫号次数:<i>{{ tablePagination.total }}</i></b
>
<sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub> <sub>统计时间段:{{ searchForm.time[0] }}~{{ searchForm.time[1] }}</sub>
</div> </div>
<span> <span>
<a-space> <a-space>
<a-select v-model="searchForm.id" style="width: 120px"> <a-select v-model="searchForm.id" style="width: 120px">
<a-select-option value=""> 全部设备 </a-select-option> <a-select-option value=""> 全部设备 </a-select-option>
<a-select-option <a-select-option v-for="item in deviceData" :key="item.id" :value="item.id">
v-for="item in deviceData"
:key="item.id"
:value="item.id"
>
{{ item.name }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
...@@ -34,10 +24,7 @@ ...@@ -34,10 +24,7 @@
</a-select> </a-select>
<a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time"> <a-range-picker valueFormat="YYYY-MM-DD" v-model="searchForm.time">
</a-range-picker> </a-range-picker>
<a-input <a-input v-model="searchForm.flownum" placeholder="请输入排队编号搜索">
v-model="searchForm.flownum"
placeholder="请输入排队编号搜索"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-button type="primary" @click="handleSearch">搜索</a-button> <a-button type="primary" @click="handleSearch">搜索</a-button>
...@@ -46,21 +33,11 @@ ...@@ -46,21 +33,11 @@
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table <a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" }" :scroll="{ y: 590 }" :pagination="tablePagination" @change="changeTablePage" :loading="tableLoading"
:scroll="{ y: 590 }" :columns="tableHeaders" :dataSource="tableList">
:pagination="tablePagination"
@change="changeTablePage"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableList"
>
<!-- 序号 --> <!-- 序号 -->
<span slot="num" slot-scope="text, record, index">{{ <span slot="num" slot-scope="text, record, index">{{
(tablePagination.current - 1) * tablePagination.pageSize + index + 1 (tablePagination.current - 1) * tablePagination.pageSize + index + 1
...@@ -82,11 +59,7 @@ ...@@ -82,11 +59,7 @@
</template> </template>
<!-- 办理业务 --> <!-- 办理业务 -->
<template slot="business" slot-scope="text"> <template slot="business" slot-scope="text">
<a <a v-if="text.business" @click="openBusiness(text.business, text.businessid)">{{ text.business }}</a>
v-if="text.business"
@click="openBusiness(text.business, text.businessid)"
>{{ text.business }}</a
>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
<!-- 办理开始时间 --> <!-- 办理开始时间 -->
...@@ -118,13 +91,11 @@ ...@@ -118,13 +91,11 @@
</template> </template>
<!-- 状态 --> <!-- 状态 -->
<template slot="style" slot-scope="text"> <template slot="style" slot-scope="text">
<span <span :class="{
:class="{
'stand-line': text.style === 0, 'stand-line': text.style === 0,
'on-transact': text.style === 1, 'on-transact': text.style === 1,
'on-end': text.style === 4, 'on-end': text.style === 4,
}" }">
>
{{ $codeMap.queueState[text.style] }} {{ $codeMap.queueState[text.style] }}
</span> </span>
</template> </template>
...@@ -381,6 +352,7 @@ export default { ...@@ -381,6 +352,7 @@ export default {
//用户模态框 //用户模态框
async openDeclarant(item) { async openDeclarant(item) {
await getPeopleanalyse({ await getPeopleanalyse({
idcard: item.people_idcard,
peopleid: item.peopleid, peopleid: item.peopleid,
time: this.searchForm.time, time: this.searchForm.time,
}).then((res) => { }).then((res) => {
......
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