Commit 90b4d0e1 authored by “yiyousong”'s avatar “yiyousong”
parents 3ce6740c 5f535641
This diff is collapsed.
......@@ -1295,6 +1295,46 @@ data|Object|数据|-
```
### 同步站点相关事项
**请求URL:** site/syncGovMatterBySiteId
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 同步站点相关事项
**请求参数:**
参数名称|类型|备注|必填|其它
id|Long|站点id|是|-
**请求样例:**
```
{“id”:3}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
data|Object|数据|-
**响应消息样例:**
```
{
"code":1,
"msg":"成功"
}
```
### 根据区域查询站点列表
**请求URL:** site/getFlatSitesByAreaCode
......
......@@ -25,7 +25,7 @@
</activation>
<properties>
<profiles.active>develop</profiles.active>
<profiles.server.ip>192.168.0.98</profiles.server.ip>
<profiles.server.ip>127.0.0.1</profiles.server.ip>
<profiles.server.port>17211</profiles.server.port>
<profiles.nginx.port>11071</profiles.nginx.port>
<profiles.server.gatewayport>11078</profiles.server.gatewayport>
......
......@@ -45,7 +45,7 @@ fi
if [ -e "$BASEDIR" ]
then
JAVA_OPTS="-Xms1024M -Xmx1024M -Xss256K -XX:+UseAdaptiveSizePolicy -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:GCTimeRatio=39 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$GC_PATH -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=$HS_ERR_PATH -XX:HeapDumpPath=$HEAP_DUMP_PATH"
JAVA_OPTS="-Xms1024M -Xmx2048M -Xss256K -XX:+UseAdaptiveSizePolicy -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:GCTimeRatio=39 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$GC_PATH -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=$HS_ERR_PATH -XX:HeapDumpPath=$HEAP_DUMP_PATH"
fi
CLASSPATH=$CLASSPATH_PREFIX:
......
package com.mortals.xhx.common.utils;
import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.xhx.ManagerBaseApplication;
import com.mortals.xhx.common.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.dept.service.DeptService;
......@@ -10,16 +12,22 @@ 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.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteMatterEntity;
import com.mortals.xhx.module.site.model.SiteQuery;
import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.site.service.SiteService;
import lombok.AllArgsConstructor;
import lombok.CustomLog;
import lombok.extern.apachecommons.CommonsLog;
import lombok.extern.slf4j.Slf4j;
import javax.xml.transform.Source;
import java.util.List;
import java.util.stream.Collectors;
@AllArgsConstructor
@Slf4j
@CommonsLog
public class SyncGovMatterDetailThread implements Runnable {
private MatterService matterService;
......@@ -28,23 +36,56 @@ public class SyncGovMatterDetailThread implements Runnable {
private DeptService deptService;
private SiteMatterService siteMatterService;
private SiteEntity siteEntity;
private Context context;
@Override
public void run() {
log.info("同步站点事项开始.....");
Rest<String> deptRest = deptService.syncDeptBySiteId(siteEntity.getId(), context);
log.info("同步站点部门:"+ JSON.toJSONString(deptRest));
Rest<String> rest = siteService.syncMatterBySiteId(siteEntity.getId(), context);
log.info("syncMatterBySiteId:"+ JSON.toJSONString(rest));
log.info("同步事项列表:"+ JSON.toJSONString(rest));
if(rest.getCode()== YesNoEnum.YES.getValue()){
List<MatterEntity> matterEntityList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()).haveGetMatterInfo("false").source(SourceEnum.政务网.getValue()));
matterEntityList.parallelStream().forEach(matterEntity -> {
List<MatterEntity> matterEntityList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()).source(SourceEnum.政务网.getValue()));
List<MatterEntity> unSyncDetailMatterList = matterEntityList.stream().filter(f -> f.getHaveGetMatterInfo().equalsIgnoreCase("false")).collect(Collectors.toList());
log.info("同步站点事项到站点.....");
//查询站点事项相关
List<SiteEntity> siteEntities = siteService.find(new SiteQuery().areaCode(siteEntity.getAreaCode()));
//删除站点与政务事项相关项
for (SiteEntity site : siteEntities) {
siteMatterService.deleteBysiteIdAndSource(site.getId(),SourceEnum.政务网.getValue(), context);
}
//重新添加
for (SiteEntity site : siteEntities) {
List<SiteMatterEntity> siteMatterList = matterEntityList.stream().map(item -> {
return matterService.switchMatterToSiteMatterr(item, site.getId(), context).getData();
}).filter(f -> f != null).collect(Collectors.toList());
List<List<SiteMatterEntity>> partition = ListUtil.partition(siteMatterList, 100);
for (List<SiteMatterEntity> rests : partition) {
siteMatterService.save(rests);
}
}
log.info("同步站点事项到站点完成.....");
log.info("同步站点事项详细条数....."+unSyncDetailMatterList.size());
/* for (MatterEntity matterEntity : matterEntityList) {
matterService.buildMatterDetail(matterEntity, context);
matterService.update(matterEntity,context);
}*/
unSyncDetailMatterList.parallelStream().forEach(matterEntity -> {
matterService.buildMatterDetail(matterEntity, context);
matterService.update(matterEntity,context);
});
}
log.info("同步站点事项结束.....");
}
}
......@@ -7,7 +7,10 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.HttpUtil;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.utils.MatterHtmlParseUtil;
import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.dept.dao.DeptDao;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
......@@ -54,6 +57,11 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
@Autowired
private MattersDeptService mattersDeptService;
@Override
protected String getExtKey(DeptEntity data) {
return data.getDeptNumber();
}
@Override
public void syncDept(String areaCode, Context context) {
List<MattersDeptEntity> deptList = mattersDeptService.find(new MattersDeptQuery());
......@@ -83,49 +91,32 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
SiteEntity siteEntity = siteService.get(siteId, context);
if (!ObjectUtils.isEmpty(siteEntity)) {
String areaCode = siteEntity.getAreaCode();
String exp = "//ul[@class='bm-list']//li";
Map<String, String> params = new HashMap<>();
params.put("areaCode",areaCode);
// url += "?areaCode=" + areaCode;
String html;
Object result;
try {
html = HttpUtil.doGet(url, params);
//html = HttpUtil.get(url);
HtmlCleaner hc = new HtmlCleaner();
TagNode tn = hc.clean(html);
Document dom = new DomSerializer(new CleanerProperties()).createDOM(tn);
XPath xPath = XPathFactory.newInstance().newXPath();
result = xPath.evaluate(exp, dom, XPathConstants.NODESET);
if (result instanceof NodeList) {
NodeList nodeList = (NodeList) result;
for (int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
String deptName = node.getAttributes().getNamedItem("title").getNodeValue();
String href = StringEscapeUtils.unescapeHtml4(node.getFirstChild().getAttributes().getNamedItem("href").getNodeValue());
UrlBuilder builder = UrlBuilder.ofHttp(href, CharsetUtil.CHARSET_UTF_8);
String deptCode = builder.getQuery().get("deptCode").toString();
params.put("areaCode", areaCode);
//根据站点添加部门信息,部门编号存在时候不添加
DeptEntity deptExistEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context);
if (ObjectUtils.isEmpty(deptExistEntity)) {
DeptEntity deptEntity = new DeptEntity();
deptEntity.initAttrValue();
deptEntity.setDeptNumber(deptCode);
deptEntity.setSiteId(siteId);
deptEntity.setName(deptName);
deptEntity.setCreateTime(new Date());
deptEntity.setCreateUserId(1L);
deptService.save(deptEntity, context);
}
}
}
}
Rest<Map<String, String>> rest = MatterHtmlParseUtil.syncDeptBySiteId(params, url);
if (rest.getCode() == YesNoEnum.YES.getValue()) {
rest.getData().entrySet().stream().forEach(item -> {
String deptCode = item.getKey();
String deptName = item.getValue();
catch (Exception e) {
log.error("同步部门异常!siteId:" + siteId, e);
return Rest.fail(e.getMessage());
DeptEntity deptExistEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context);
if (ObjectUtils.isEmpty(deptExistEntity)) {
DeptEntity deptEntity = new DeptEntity();
deptEntity.initAttrValue();
deptEntity.setDeptNumber(deptCode);
deptEntity.setSiteId(siteId);
deptEntity.setName(deptName);
deptEntity.setCreateTime(new Date());
deptEntity.setCreateUserId(1L);
deptService.save(deptEntity, context);
}
});
} else {
return Rest.fail(rest.getMsg());
}
} else {
return Rest.fail("当前站点不存在!");
}
return Rest.ok("当前站点同步添加部门成功!");
}
......
......@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterAcceptVo;
* 事项受理条件实体对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterAcceptEntity extends MatterAcceptVo {
......@@ -21,6 +21,10 @@ public class MatterAcceptEntity extends MatterAcceptVo {
*/
private Long matterId;
/**
* 事项编码
*/
private String matterCode;
/**
* 事项名称
*/
private String matterName;
......@@ -51,6 +55,20 @@ public class MatterAcceptEntity extends MatterAcceptVo {
this.matterId = matterId;
}
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称
* @return String
*/
......@@ -115,6 +133,7 @@ public class MatterAcceptEntity extends MatterAcceptVo {
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName());
sb.append(",content:").append(getContent());
sb.append(",source:").append(getSource());
......@@ -125,6 +144,8 @@ public class MatterAcceptEntity extends MatterAcceptVo {
this.matterId = 0L;
this.matterCode = "";
this.matterName = "";
this.content = "";
......
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterAcceptEntity;
* 事项受理条件查询对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterAcceptQuery extends MatterAcceptEntity {
/** 开始 主键,自增长 */
......@@ -33,6 +33,9 @@ public class MatterAcceptQuery extends MatterAcceptEntity {
/** 基础事项表id列表 */
private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */
private List<String> matterNameList;
......@@ -211,6 +214,21 @@ public class MatterAcceptQuery extends MatterAcceptEntity {
this.matterIdList = matterIdList;
}
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 事项名称
* @return matterNameList
......@@ -524,6 +542,25 @@ public class MatterAcceptQuery extends MatterAcceptEntity {
}
/**
* 设置 事项编码
* @param matterCode
*/
public MatterAcceptQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterAcceptQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/**
* 设置 事项名称
* @param matterName
......
......@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterChargesVo;
* 事项收费标准实体对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterChargesEntity extends MatterChargesVo {
......@@ -21,6 +21,10 @@ public class MatterChargesEntity extends MatterChargesVo {
*/
private Long matterId;
/**
* 事项编码
*/
private String matterCode;
/**
* 事项名称
*/
private String matterName;
......@@ -51,6 +55,20 @@ public class MatterChargesEntity extends MatterChargesVo {
this.matterId = matterId;
}
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称
* @return String
*/
......@@ -93,6 +111,9 @@ public class MatterChargesEntity extends MatterChargesVo {
this.source = source;
}
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -112,6 +133,7 @@ public class MatterChargesEntity extends MatterChargesVo {
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName());
sb.append(",content:").append(getContent());
sb.append(",source:").append(getSource());
......@@ -122,6 +144,8 @@ public class MatterChargesEntity extends MatterChargesVo {
this.matterId = 0L;
this.matterCode = "";
this.matterName = "";
this.content = "";
......
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterChargesEntity;
* 事项收费标准查询对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterChargesQuery extends MatterChargesEntity {
/** 开始 主键,自增长 */
......@@ -33,6 +33,9 @@ public class MatterChargesQuery extends MatterChargesEntity {
/** 事项基础表matter id列表 */
private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */
private List<String> matterNameList;
......@@ -211,6 +214,21 @@ public class MatterChargesQuery extends MatterChargesEntity {
this.matterIdList = matterIdList;
}
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 事项名称
* @return matterNameList
......@@ -524,6 +542,25 @@ public class MatterChargesQuery extends MatterChargesEntity {
}
/**
* 设置 事项编码
* @param matterCode
*/
public MatterChargesQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterChargesQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/**
* 设置 事项名称
* @param matterName
......
......@@ -11,7 +11,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumFileEntity;
* 事项申请材料实体对象
*
* @author zxfei
* @date 2022-01-17
* @date 2022-11-16
*/
public class MatterDatumEntity extends MatterDatumVo {
......@@ -21,6 +21,10 @@ public class MatterDatumEntity extends MatterDatumVo {
* 事项id
*/
private Long matterId;
/**
* 事项编码
*/
private String matterCode;
/**
* 事项名称
*/
......@@ -123,6 +127,20 @@ public class MatterDatumEntity extends MatterDatumVo {
public void setMatterId(Long matterId){
this.matterId = matterId;
}
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称
* @return String
......@@ -433,6 +451,7 @@ public class MatterDatumEntity extends MatterDatumVo {
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName());
sb.append(",materialName:").append(getMaterialName());
sb.append(",isMust:").append(getIsMust());
......@@ -460,7 +479,9 @@ public class MatterDatumEntity extends MatterDatumVo {
this.matterId = null;
this.matterName = "";
this.matterCode = "";
this.matterName = "";
this.materialName = "";
......@@ -476,11 +497,11 @@ public class MatterDatumEntity extends MatterDatumVo {
this.paperNum = 1;
this.paperGg = "";
this.paperGg = "";
this.jianmMs = "无";
this.sealWay = "";
this.sealWay = "";
this.isjianm = "是";
......@@ -490,11 +511,11 @@ public class MatterDatumEntity extends MatterDatumVo {
this.materialSourceSm = "";
this.remarkSub = "";
this.remarkSub = "";
this.clauseContent = "";
this.clauseContent = "";
this.summary = "";
this.summary = "";
this.remark = "";
......
......@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterDatumFileVo;
* 材料附件实体对象
*
* @author zxfei
* @date 2022-01-17
* @date 2022-11-16
*/
public class MatterDatumFileEntity extends MatterDatumFileVo {
......@@ -20,6 +20,14 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
* 材料id
*/
private Long datumId;
/**
* 事项编码
*/
private String matterCode;
/**
* 材料名
*/
private String materialName;
/**
* 附件名称
*/
......@@ -29,17 +37,17 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
*/
private String fileUrl;
/**
* 附件类型 (1.示例样表,2.空白表格)
* 附件本地下载地址
*/
private Integer filetype;
private String localFileUrl;
/**
* 附件来源 (0.政务网,1.自定义)
* 附件类型 (示例样表.示例样表,空白表格.空白表格)
*/
private Integer source;
private String filetype;
/**
* 材料名
* 附件来源 (0.政务网,1.自定义)
*/
private String materialName;
private Integer source;
......@@ -58,6 +66,34 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
public void setDatumId(Long datumId){
this.datumId = datumId;
}
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 材料名
* @return String
*/
public String getMaterialName(){
return materialName;
}
/**
* 设置 材料名
* @param materialName
*/
public void setMaterialName(String materialName){
this.materialName = materialName;
}
/**
* 获取 附件名称
* @return String
......@@ -87,17 +123,31 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
this.fileUrl = fileUrl;
}
/**
* 获取 附件类型 (1.示例样表,2.空白表格)
* @return Integer
* 获取 附件本地下载地址
* @return String
*/
public String getLocalFileUrl(){
return localFileUrl;
}
/**
* 设置 附件本地下载地址
* @param localFileUrl
*/
public void setLocalFileUrl(String localFileUrl){
this.localFileUrl = localFileUrl;
}
/**
* 获取 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @return String
*/
public Integer getFiletype(){
public String getFiletype(){
return filetype;
}
/**
* 设置 附件类型 (1.示例样表,2.空白表格)
* 设置 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @param filetype
*/
public void setFiletype(Integer filetype){
public void setFiletype(String filetype){
this.filetype = filetype;
}
/**
......@@ -114,20 +164,6 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
public void setSource(Integer source){
this.source = source;
}
/**
* 获取 材料名
* @return String
*/
public String getMaterialName(){
return materialName;
}
/**
* 设置 材料名
* @param materialName
*/
public void setMaterialName(String materialName){
this.materialName = materialName;
}
......@@ -151,11 +187,13 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",datumId:").append(getDatumId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",materialName:").append(getMaterialName());
sb.append(",fileName:").append(getFileName());
sb.append(",fileUrl:").append(getFileUrl());
sb.append(",localFileUrl:").append(getLocalFileUrl());
sb.append(",filetype:").append(getFiletype());
sb.append(",source:").append(getSource());
sb.append(",materialName:").append(getMaterialName());
return sb.toString();
}
......@@ -163,14 +201,18 @@ public class MatterDatumFileEntity extends MatterDatumFileVo {
this.datumId = null;
this.fileName = null;
this.matterCode = "";
this.fileUrl = null;
this.materialName = "";
this.filetype = 1;
this.fileName = "";
this.source = 1;
this.fileUrl = "";
this.materialName = "";
this.localFileUrl = "";
this.filetype = "示例样表";
this.source = 1;
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumFileEntity;
* 材料附件查询对象
*
* @author zxfei
* @date 2022-01-17
* @date 2022-11-16
*/
public class MatterDatumFileQuery extends MatterDatumFileEntity {
/** 开始 主键,自增长 */
......@@ -33,23 +33,23 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
/** 材料id列表 */
private List <Long> datumIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 材料名 */
private List<String> materialNameList;
/** 附件名称 */
private List<String> fileNameList;
/** 附件下载地址 */
private List<String> fileUrlList;
/** 开始 附件类型 (1.示例样表,2.空白表格) */
private Integer filetypeStart;
/** 附件本地下载地址 */
private List<String> localFileUrlList;
/** 结束 附件类型 (1.示例样表,2.空白表格) */
private Integer filetypeEnd;
/** 增加 附件类型 (1.示例样表,2.空白表格) */
private Integer filetypeIncrement;
/** 附件类型 (1.示例样表,2.空白表格)列表 */
private List <Integer> filetypeList;
/** 附件类型 (示例样表.示例样表,空白表格.空白表格) */
private List<String> filetypeList;
/** 开始 附件来源 (0.政务网,1.自定义) */
private Integer sourceStart;
......@@ -87,9 +87,6 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
/** 结束 修改时间 */
private String updateTimeEnd;
/** 材料名 */
private List<String> materialNameList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<MatterDatumFileQuery> orConditionList;
......@@ -226,6 +223,36 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
this.datumIdList = datumIdList;
}
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 材料名
* @return materialNameList
*/
public List<String> getMaterialNameList(){
return this.materialNameList;
}
/**
* 设置 材料名
* @param materialNameList
*/
public void setMaterialNameList(List<String> materialNameList){
this.materialNameList = materialNameList;
}
/**
* 获取 附件名称
* @return fileNameList
......@@ -257,69 +284,35 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
this.fileUrlList = fileUrlList;
}
/**
* 获取 开始 附件类型 (1.示例样表,2.空白表格)
* @return filetypeStart
* 获取 附件本地下载地址
* @return localFileUrlList
*/
public Integer getFiletypeStart(){
return this.filetypeStart;
public List<String> getLocalFileUrlList(){
return this.localFileUrlList;
}
/**
* 设置 开始 附件类型 (1.示例样表,2.空白表格)
* @param filetypeStart
* 设置 附件本地下载地址
* @param localFileUrlList
*/
public void setFiletypeStart(Integer filetypeStart){
this.filetypeStart = filetypeStart;
public void setLocalFileUrlList(List<String> localFileUrlList){
this.localFileUrlList = localFileUrlList;
}
/**
* 获取 结束 附件类型 (1.示例样表,2.空白表格)
* @return $filetypeEnd
*/
public Integer getFiletypeEnd(){
return this.filetypeEnd;
}
/**
* 设置 结束 附件类型 (1.示例样表,2.空白表格)
* @param filetypeEnd
*/
public void setFiletypeEnd(Integer filetypeEnd){
this.filetypeEnd = filetypeEnd;
}
/**
* 获取 增加 附件类型 (1.示例样表,2.空白表格)
* @return filetypeIncrement
*/
public Integer getFiletypeIncrement(){
return this.filetypeIncrement;
}
/**
* 设置 增加 附件类型 (1.示例样表,2.空白表格)
* @param filetypeIncrement
*/
public void setFiletypeIncrement(Integer filetypeIncrement){
this.filetypeIncrement = filetypeIncrement;
}
/**
* 获取 附件类型 (1.示例样表,2.空白表格)
* 获取 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @return filetypeList
*/
public List<Integer> getFiletypeList(){
public List<String> getFiletypeList(){
return this.filetypeList;
}
/**
* 设置 附件类型 (1.示例样表,2.空白表格)
* 设置 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @param filetypeList
*/
public void setFiletypeList(List<Integer> filetypeList){
public void setFiletypeList(List<String> filetypeList){
this.filetypeList = filetypeList;
}
/**
* 获取 开始 附件来源 (0.政务网,1.自定义)
* @return sourceStart
......@@ -512,21 +505,6 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 材料名
* @return materialNameList
*/
public List<String> getMaterialNameList(){
return this.materialNameList;
}
/**
* 设置 材料名
* @param materialNameList
*/
public void setMaterialNameList(List<String> materialNameList){
this.materialNameList = materialNameList;
}
/**
* 设置 主键,自增长
* @param id
......@@ -618,6 +596,44 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
}
/**
* 设置 事项编码
* @param matterCode
*/
public MatterDatumFileQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterDatumFileQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/**
* 设置 材料名
* @param materialName
*/
public MatterDatumFileQuery materialName(String materialName){
setMaterialName(materialName);
return this;
}
/**
* 设置 材料名
* @param materialNameList
*/
public MatterDatumFileQuery materialNameList(List<String> materialNameList){
this.materialNameList = materialNameList;
return this;
}
/**
* 设置 附件名称
* @param fileName
......@@ -655,47 +671,40 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
return this;
}
/**
* 设置 附件类型 (1.示例样表,2.空白表格)
* @param filetype
*/
public MatterDatumFileQuery filetype(Integer filetype){
setFiletype(filetype);
return this;
}
/**
* 设置 开始 附件类型 (1.示例样表,2.空白表格)
* @param filetypeStart
* 设置 附件本地下载地址
* @param localFileUrl
*/
public MatterDatumFileQuery filetypeStart(Integer filetypeStart){
this.filetypeStart = filetypeStart;
public MatterDatumFileQuery localFileUrl(String localFileUrl){
setLocalFileUrl(localFileUrl);
return this;
}
/**
* 设置 结束 附件类型 (1.示例样表,2.空白表格)
* @param filetypeEnd
* 设置 附件本地下载地址
* @param localFileUrlList
*/
public MatterDatumFileQuery filetypeEnd(Integer filetypeEnd){
this.filetypeEnd = filetypeEnd;
public MatterDatumFileQuery localFileUrlList(List<String> localFileUrlList){
this.localFileUrlList = localFileUrlList;
return this;
}
/**
* 设置 增加 附件类型 (1.示例样表,2.空白表格)
* @param filetypeIncrement
* 设置 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @param filetype
*/
public MatterDatumFileQuery filetypeIncrement(Integer filetypeIncrement){
this.filetypeIncrement = filetypeIncrement;
public MatterDatumFileQuery filetype(String filetype){
setFiletype(filetype);
return this;
}
/**
* 设置 附件类型 (1.示例样表,2.空白表格)
* 设置 附件类型 (示例样表.示例样表,空白表格.空白表格)
* @param filetypeList
*/
public MatterDatumFileQuery filetypeList(List<Integer> filetypeList){
public MatterDatumFileQuery filetypeList(List<String> filetypeList){
this.filetypeList = filetypeList;
return this;
}
......@@ -792,25 +801,6 @@ public class MatterDatumFileQuery extends MatterDatumFileEntity {
}
/**
* 设置 材料名
* @param materialName
*/
public MatterDatumFileQuery materialName(String materialName){
setMaterialName(materialName);
return this;
}
/**
* 设置 材料名
* @param materialNameList
*/
public MatterDatumFileQuery materialNameList(List<String> materialNameList){
this.materialNameList = materialNameList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -7,7 +7,7 @@ import com.mortals.xhx.module.matter.model.MatterDatumEntity;
* 事项申请材料查询对象
*
* @author zxfei
* @date 2022-01-17
* @date 2022-11-16
*/
public class MatterDatumQuery extends MatterDatumEntity {
/** 开始 主键,自增长 */
......@@ -34,6 +34,9 @@ public class MatterDatumQuery extends MatterDatumEntity {
/** 事项id列表 */
private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */
private List<String> matterNameList;
......@@ -272,6 +275,21 @@ public class MatterDatumQuery extends MatterDatumEntity {
this.matterIdList = matterIdList;
}
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 事项名称
* @return matterNameList
......@@ -889,6 +907,25 @@ public class MatterDatumQuery extends MatterDatumEntity {
}
/**
* 设置 事项编码
* @param matterCode
*/
public MatterDatumQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterDatumQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/**
* 设置 事项名称
* @param matterName
......
......@@ -13,7 +13,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterVo;
* 基础事项实体对象
*
* @author zxfei
* @date 2022-10-13
* @date 2022-11-16
*/
public class MatterEntity extends MatterVo {
......@@ -55,6 +55,10 @@ public class MatterEntity extends MatterVo {
* 部门编号
*/
private String deptCode;
/**
* 部门名称
*/
private String deptName;
/**
* 行政权力编号
*/
......@@ -474,6 +478,24 @@ public class MatterEntity extends MatterVo {
this.deptCode = deptCode;
}
/**
* 获取 部门名称
*
* @return String
*/
public String getDeptName() {
return deptName;
}
/**
* 设置 部门名称
*
* @param deptName
*/
public void setDeptName(String deptName) {
this.deptName = deptName;
}
/**
* 获取 行政权力编号
*
......@@ -1616,7 +1638,7 @@ public class MatterEntity extends MatterVo {
@Override
public boolean equals(Object obj) {
if (obj == "") return false;
if (obj == null) return false;
if (obj instanceof MatterEntity) {
MatterEntity tmp = (MatterEntity) obj;
if (this.getId() == tmp.getId()) {
......@@ -1637,6 +1659,7 @@ public class MatterEntity extends MatterVo {
sb.append(",matterNo:").append(getMatterNo());
sb.append(",areaCode:").append(getAreaCode());
sb.append(",deptCode:").append(getDeptCode());
sb.append(",deptName:").append(getDeptName());
sb.append(",powerCode:").append(getPowerCode());
sb.append(",themeCode:").append(getThemeCode());
sb.append(",usertypeCode:").append(getUsertypeCode());
......@@ -1723,6 +1746,8 @@ public class MatterEntity extends MatterVo {
this.deptCode = "";
this.deptName = "";
this.powerCode = "";
this.themeCode = "";
......@@ -1847,6 +1872,6 @@ public class MatterEntity extends MatterVo {
this.sort = 0;
this.source = 1;
this.source = 0;
}
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterFlowlimitVo;
* 事项办理流程实体对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterFlowlimitEntity extends MatterFlowlimitVo {
......@@ -21,6 +21,10 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo {
*/
private Long matterId;
/**
* 事项编码
*/
private String matterCode;
/**
* 事项名称
*/
private String matterName;
......@@ -63,6 +67,20 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo {
this.matterId = matterId;
}
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称
* @return String
*/
......@@ -169,6 +187,7 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo {
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName());
sb.append(",flowName:").append(getFlowName());
sb.append(",flowTime:").append(getFlowTime());
......@@ -182,6 +201,8 @@ public class MatterFlowlimitEntity extends MatterFlowlimitVo {
this.matterId = 0L;
this.matterCode = "";
this.matterName = "";
this.flowName = "";
......
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterFlowlimitEntity;
* 事项办理流程查询对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterFlowlimitQuery extends MatterFlowlimitEntity {
/** 开始 主键,自增长 */
......@@ -33,6 +33,9 @@ public class MatterFlowlimitQuery extends MatterFlowlimitEntity {
/** 事项基础表id列表 */
private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */
private List<String> matterNameList;
......@@ -220,6 +223,21 @@ public class MatterFlowlimitQuery extends MatterFlowlimitEntity {
this.matterIdList = matterIdList;
}
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 事项名称
* @return matterNameList
......@@ -578,6 +596,25 @@ public class MatterFlowlimitQuery extends MatterFlowlimitEntity {
}
/**
* 设置 事项编码
* @param matterCode
*/
public MatterFlowlimitQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterFlowlimitQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/**
* 设置 事项名称
* @param matterName
......
......@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterIntermediaryVo;
* 事项中介服务实体对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterIntermediaryEntity extends MatterIntermediaryVo {
......@@ -21,6 +21,10 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
*/
private Long matterId;
/**
* 事项编码
*/
private String matterCode;
/**
* 事项名称
*/
private String matterName;
......@@ -37,7 +41,7 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
*/
private String intermediaryRequestTime;
/**
* 备注
* 内容
*/
private String remark;
/**
......@@ -63,6 +67,20 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
this.matterId = matterId;
}
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称
* @return String
*/
......@@ -119,14 +137,14 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
this.intermediaryRequestTime = intermediaryRequestTime;
}
/**
* 获取 备注
* 获取 内容
* @return String
*/
public String getRemark(){
return remark;
}
/**
* 设置 备注
* 设置 内容
* @param remark
*/
public void setRemark(String remark){
......@@ -169,6 +187,7 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName());
sb.append(",title:").append(getTitle());
sb.append(",intermediaryRequest:").append(getIntermediaryRequest());
......@@ -182,15 +201,17 @@ public class MatterIntermediaryEntity extends MatterIntermediaryVo {
this.matterId = 0L;
this.matterName = null;
this.matterCode = "";
this.matterName = "";
this.title = null;
this.title = "";
this.intermediaryRequest = null;
this.intermediaryRequest = "";
this.intermediaryRequestTime = null;
this.intermediaryRequestTime = "";
this.remark = null;
this.remark = "";
this.source = 0;
}
......
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterIntermediaryEntity;
* 事项中介服务查询对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
/** 开始 主键,自增长 */
......@@ -33,6 +33,9 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
/** 事项matter id列表 */
private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */
private List<String> matterNameList;
......@@ -45,7 +48,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
/** 服务时限 */
private List<String> intermediaryRequestTimeList;
/** 备注 */
/** 内容 */
private List<String> remarkList;
/** 开始 事项来源,(0.政务网,1.自定义) */
......@@ -220,6 +223,21 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
this.matterIdList = matterIdList;
}
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 事项名称
* @return matterNameList
......@@ -281,7 +299,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
this.intermediaryRequestTimeList = intermediaryRequestTimeList;
}
/**
* 获取 备注
* 获取 内容
* @return remarkList
*/
public List<String> getRemarkList(){
......@@ -289,7 +307,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
}
/**
* 设置 备注
* 设置 内容
* @param remarkList
*/
public void setRemarkList(List<String> remarkList){
......@@ -578,6 +596,25 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
}
/**
* 设置 事项编码
* @param matterCode
*/
public MatterIntermediaryQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterIntermediaryQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/**
* 设置 事项名称
* @param matterName
......@@ -655,7 +692,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
/**
* 设置 备注
* 设置 内容
* @param remark
*/
public MatterIntermediaryQuery remark(String remark){
......@@ -664,7 +701,7 @@ public class MatterIntermediaryQuery extends MatterIntermediaryEntity {
}
/**
* 设置 备注
* 设置 内容
* @param remarkList
*/
public MatterIntermediaryQuery remarkList(List<String> remarkList){
......
......@@ -7,7 +7,7 @@ import com.mortals.xhx.module.matter.model.MatterEntity;
* 基础事项查询对象
*
* @author zxfei
* @date 2022-10-13
* @date 2022-11-16
*/
public class MatterQuery extends MatterEntity {
/** 开始 序号,主键,自增长 */
......@@ -58,6 +58,9 @@ public class MatterQuery extends MatterEntity {
/** 部门编号 */
private List<String> deptCodeList;
/** 部门名称 */
private List<String> deptNameList;
/** 行政权力编号 */
private List<String> powerCodeList;
......@@ -578,6 +581,21 @@ public class MatterQuery extends MatterEntity {
public void setDeptCodeList(List<String> deptCodeList){
this.deptCodeList = deptCodeList;
}
/**
* 获取 部门名称
* @return deptNameList
*/
public List<String> getDeptNameList(){
return this.deptNameList;
}
/**
* 设置 部门名称
* @param deptNameList
*/
public void setDeptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
}
/**
* 获取 行政权力编号
* @return powerCodeList
......@@ -2173,6 +2191,25 @@ public class MatterQuery extends MatterEntity {
}
/**
* 设置 部门名称
* @param deptName
*/
public MatterQuery deptName(String deptName){
setDeptName(deptName);
return this;
}
/**
* 设置 部门名称
* @param deptNameList
*/
public MatterQuery deptNameList(List<String> deptNameList){
this.deptNameList = deptNameList;
return this;
}
/**
* 设置 行政权力编号
* @param powerCode
......
......@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterQuestionVo;
* 事项常见问题实体对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterQuestionEntity extends MatterQuestionVo {
......@@ -21,6 +21,10 @@ public class MatterQuestionEntity extends MatterQuestionVo {
*/
private Long matterId;
/**
* 事项编码
*/
private String matterCode;
/**
* 事项名称
*/
private String matterName;
......@@ -29,7 +33,7 @@ public class MatterQuestionEntity extends MatterQuestionVo {
*/
private String question;
/**
* 回答
* 常见问题
*/
private String answer;
/**
......@@ -55,6 +59,20 @@ public class MatterQuestionEntity extends MatterQuestionVo {
this.matterId = matterId;
}
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称
* @return String
*/
......@@ -83,14 +101,14 @@ public class MatterQuestionEntity extends MatterQuestionVo {
this.question = question;
}
/**
* 获取 回答
* 获取 常见问题
* @return String
*/
public String getAnswer(){
return answer;
}
/**
* 设置 回答
* 设置 常见问题
* @param answer
*/
public void setAnswer(String answer){
......@@ -133,6 +151,7 @@ public class MatterQuestionEntity extends MatterQuestionVo {
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName());
sb.append(",question:").append(getQuestion());
sb.append(",answer:").append(getAnswer());
......@@ -144,6 +163,8 @@ public class MatterQuestionEntity extends MatterQuestionVo {
this.matterId = 0L;
this.matterCode = "";
this.matterName = "";
this.question = "";
......
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterQuestionEntity;
* 事项常见问题查询对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterQuestionQuery extends MatterQuestionEntity {
/** 开始 主键,自增长 */
......@@ -33,13 +33,16 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
/** 事项基础表matter id列表 */
private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */
private List<String> matterNameList;
/** 问题 */
private List<String> questionList;
/** 回答 */
/** 常见问题 */
private List<String> answerList;
/** 开始 事项来源,(0.政务网,1.自定义) */
......@@ -214,6 +217,21 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
this.matterIdList = matterIdList;
}
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 事项名称
* @return matterNameList
......@@ -245,7 +263,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
this.questionList = questionList;
}
/**
* 获取 回答
* 获取 常见问题
* @return answerList
*/
public List<String> getAnswerList(){
......@@ -253,7 +271,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
}
/**
* 设置 回答
* 设置 常见问题
* @param answerList
*/
public void setAnswerList(List<String> answerList){
......@@ -542,6 +560,25 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
}
/**
* 设置 事项编码
* @param matterCode
*/
public MatterQuestionQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterQuestionQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/**
* 设置 事项名称
* @param matterName
......@@ -581,7 +618,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
/**
* 设置 回答
* 设置 常见问题
* @param answer
*/
public MatterQuestionQuery answer(String answer){
......@@ -590,7 +627,7 @@ public class MatterQuestionQuery extends MatterQuestionEntity {
}
/**
* 设置 回答
* 设置 常见问题
* @param answerList
*/
public MatterQuestionQuery answerList(List<String> answerList){
......
......@@ -10,7 +10,7 @@ import com.mortals.xhx.module.matter.model.vo.MatterSetbaseVo;
* 事项设定依据实体对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterSetbaseEntity extends MatterSetbaseVo {
......@@ -21,6 +21,10 @@ public class MatterSetbaseEntity extends MatterSetbaseVo {
*/
private Long matterId;
/**
* 事项编码
*/
private String matterCode;
/**
* 事项名称
*/
private String matterName;
......@@ -63,6 +67,20 @@ public class MatterSetbaseEntity extends MatterSetbaseVo {
this.matterId = matterId;
}
/**
* 获取 事项编码
* @return String
*/
public String getMatterCode(){
return matterCode;
}
/**
* 设置 事项编码
* @param matterCode
*/
public void setMatterCode(String matterCode){
this.matterCode = matterCode;
}
/**
* 获取 事项名称
* @return String
*/
......@@ -169,6 +187,7 @@ public class MatterSetbaseEntity extends MatterSetbaseVo {
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId());
sb.append(",matterCode:").append(getMatterCode());
sb.append(",matterName:").append(getMatterName());
sb.append(",policyName:").append(getPolicyName());
sb.append(",policyType:").append(getPolicyType());
......@@ -182,6 +201,8 @@ public class MatterSetbaseEntity extends MatterSetbaseVo {
this.matterId = 0L;
this.matterCode = "";
this.matterName = "";
this.policyName = "";
......
......@@ -6,7 +6,7 @@ import com.mortals.xhx.module.matter.model.MatterSetbaseEntity;
* 事项设定依据查询对象
*
* @author zxfei
* @date 2022-01-12
* @date 2022-11-16
*/
public class MatterSetbaseQuery extends MatterSetbaseEntity {
/** 开始 主键,自增长 */
......@@ -33,6 +33,9 @@ public class MatterSetbaseQuery extends MatterSetbaseEntity {
/** 事项matter id列表 */
private List <Long> matterIdList;
/** 事项编码 */
private List<String> matterCodeList;
/** 事项名称 */
private List<String> matterNameList;
......@@ -220,6 +223,21 @@ public class MatterSetbaseQuery extends MatterSetbaseEntity {
this.matterIdList = matterIdList;
}
/**
* 获取 事项编码
* @return matterCodeList
*/
public List<String> getMatterCodeList(){
return this.matterCodeList;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public void setMatterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
}
/**
* 获取 事项名称
* @return matterNameList
......@@ -578,6 +596,25 @@ public class MatterSetbaseQuery extends MatterSetbaseEntity {
}
/**
* 设置 事项编码
* @param matterCode
*/
public MatterSetbaseQuery matterCode(String matterCode){
setMatterCode(matterCode);
return this;
}
/**
* 设置 事项编码
* @param matterCodeList
*/
public MatterSetbaseQuery matterCodeList(List<String> matterCodeList){
this.matterCodeList = matterCodeList;
return this;
}
/**
* 设置 事项名称
* @param matterName
......
......@@ -4,6 +4,7 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.site.model.SiteMatterEntity;
import org.w3c.dom.Document;
import java.util.Map;
......@@ -56,4 +57,13 @@ public interface MatterService extends ICRUDCacheService<MatterEntity,Long> {
Rest<String> buildMatterDetail(MatterEntity matterEntity, Context context);
/**
* 添加业务到站点
* @param matterEntity
* @param siteId
* @param context
*/
Rest<SiteMatterEntity> switchMatterToSiteMatterr(MatterEntity matterEntity, Long siteId, Context context);
}
\ No newline at end of file
package com.mortals.xhx.module.site.model;
import com.mortals.xhx.module.site.model.vo.SiteMatterVo;
/**
* 站点事项实体对象
*
* @author zxfei
* @date 2022-01-20
* @date 2022-11-16
*/
public class SiteMatterEntity extends SiteMatterVo {
......@@ -28,6 +27,10 @@ public class SiteMatterEntity extends SiteMatterVo {
* 事项名称
*/
private String matterName;
/**
* 事项编码
*/
private String matterCode;
/**
* 部门ID
*/
......@@ -36,6 +39,18 @@ public class SiteMatterEntity extends SiteMatterVo {
* 部门名称
*/
private String deptName;
/**
* 事项类型
*/
private String eventTypeShow;
/**
* 事项来源
*/
private Integer source;
/**
* 部门编号
*/
private String deptCode;
......@@ -96,6 +111,20 @@ public class SiteMatterEntity extends SiteMatterVo {
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
......@@ -124,6 +153,48 @@ public class SiteMatterEntity extends SiteMatterVo {
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;
}
......@@ -150,8 +221,12 @@ public class SiteMatterEntity extends SiteMatterVo {
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());
return sb.toString();
}
......@@ -159,14 +234,22 @@ public class SiteMatterEntity extends SiteMatterVo {
this.siteId = null;
this.siteName = null;
this.siteName = "";
this.matterId = null;
this.matterName = null;
this.matterName = "";
this.matterCode = "";
this.deptId = null;
this.deptName = null;
this.deptName = "";
this.eventTypeShow = "";
this.source = 0;
this.deptCode = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.site.service;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.site.model.SiteMatterEntity;
/**
......@@ -10,5 +11,5 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity;
* @date 2022-01-12
*/
public interface SiteMatterService extends ICRUDService<SiteMatterEntity,Long>{
void deleteBysiteIdAndSource(Long siteId,Integer source, Context context);
}
\ No newline at end of file
......@@ -74,4 +74,6 @@ public interface SiteService extends ICRUDCacheService<SiteEntity, Long> {
Rest<String> syncMatterBySiteId(Long siteId, Context context);
void deleteBysiteIdAndSource(Long siteId,Integer source, Context context);
}
\ No newline at end of file
......@@ -12,7 +12,9 @@ import com.mortals.xhx.module.site.model.SiteMatterEntity;
import com.mortals.xhx.module.site.service.SiteMatterService;
import org.springframework.util.ObjectUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* SiteMatterService
......@@ -42,4 +44,12 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
});
super.findAfter(params, pageInfo, context, list);
}
@Override
public void deleteBysiteIdAndSource(Long siteId, Integer source, Context context) {
Map<String, Object> condition = new HashMap<>();
condition.put("siteId", siteId);
condition.put("source", source);
this.dao.delete(condition);
}
}
\ No newline at end of file
package com.mortals.xhx.module.site.service.impl;
import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.URLUtil;
import com.alibaba.fastjson.JSON;
import com.mortals.framework.ap.GlobalSysInfo;
......@@ -11,7 +10,6 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.HttpUtil;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.AreaLevelDxTypeEnum;
......@@ -25,13 +23,10 @@ import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaQuery;
import com.mortals.xhx.module.area.service.AreaService;
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.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.model.MattersEntity;
import com.mortals.xhx.module.matters.model.MattersQuery;
import com.mortals.xhx.module.matters.service.MattersService;
import com.mortals.xhx.module.model.model.ModelEntity;
import com.mortals.xhx.module.model.model.ModelQuery;
......@@ -43,25 +38,14 @@ import com.mortals.xhx.module.site.model.SiteTreeSelect;
import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.poi.ss.formula.functions.T;
import org.htmlcleaner.CleanerProperties;
import org.htmlcleaner.DomSerializer;
import org.htmlcleaner.HtmlCleaner;
import org.htmlcleaner.TagNode;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_HTTP_IMAGE_URL;
......@@ -73,9 +57,9 @@ import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_HTTP_IMAGE_URL;
* @date 2022-01-12
*/
@Service("siteService")
@Slf4j
public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteEntity, Long> implements SiteService {
protected Log log = LogFactory.getLog(this.getClass());
// private List<SiteTreeSelect> siteTreeList;
/**
* 根据用户id 暂存对应站点树 默认0为全站点树
......@@ -151,7 +135,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
}
}
//查詢指定的站點ids
log.info("siteQuery==>{}", JSON.toJSONString(siteQuery));
log.info(String.format("siteQuery==>%s", JSON.toJSONString(siteQuery)));
List<SiteEntity> siteList = this.find(siteQuery);
//如果是管理员 默认全部站点
if (context.getUser().isAdmin()) {
......@@ -438,18 +422,28 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
Rest<List<MatterEntity>> matterAllRest = this.getMatterAllListByGOV(params, pageNum, context);
if (total != matterAllRest.getData().size()) {
log.warn("抓取事项数量不一致,total:{} ,cursize:{}", total, matterAllRest.getData().size());
log.warn(String.format("抓取事项数量不一致,抓取计划:%d条 ,实际抓取:%d条", total, matterAllRest.getData().size()));
}
if (matterAllRest.getCode() == YesNoEnum.YES.getValue()) {
List<MatterEntity> govMatterList = matterAllRest.getData();
List<MatterEntity> localMatterList = matterService.find(new MatterQuery().areaCode(siteEntity.getAreaCode()));
List<MatterEntity> subList = this.subList(govMatterList, localMatterList);
log.info("需要添加事项数量====" + subList.size());
//差集进行插入并更新详细数据
if (!ObjectUtils.isEmpty(subList)) {
log.info("insert subList size:" + subList.size());
int count = matterService.save(subList, context);
log.info("insert subList size success:" +count);
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, 50);
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);
}*/
}
}
}
......@@ -457,6 +451,14 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
return Rest.ok("同步事项条数成功!");
}
@Override
public void deleteBysiteIdAndSource(Long siteId, Integer source, Context context) {
Map<String, Object> condition = new HashMap<>();
condition.put("siteId", siteId);
condition.put("source", source);
this.dao.delete(condition);
}
public List<MatterEntity> subList(List<MatterEntity> firstList, List<MatterEntity> secondList) {
Set<String> secondSet = secondList.parallelStream().map(e -> e.getMatterNo()).collect(Collectors.toSet());
......
......@@ -22,6 +22,7 @@ import com.mortals.xhx.module.model.service.ModelService;
import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteQuery;
import com.mortals.xhx.module.site.model.SiteTreeSelect;
import com.mortals.xhx.module.site.service.SiteMatterService;
import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
......@@ -57,6 +58,8 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
private DeptService deptService;
@Autowired
private SiteService siteService;
@Autowired
private SiteMatterService siteMatterService;
public SiteController() {
super.setFormClass(SiteForm.class);
......@@ -265,17 +268,21 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
* 同步站点事项数据
*/
@PostMapping(value = "syncGovMatterBySiteId")
@UnAuth
public String syncMatterBySiteId(@RequestBody SiteQuery site) {
JSONObject jsonObject = new JSONObject();
String busiDesc = "同步站点事项数据" + this.getModuleDesc();
try {
SiteEntity siteEntity = this.service.get(site.getId(), getContext());
//启动
if(ObjectUtils.isEmpty(siteEntity)){
throw new AppException("当前站点为空!");
}
boolean bool = cacheService.setnx(RedisCacheKeys.getFlowDistributedLockKey() + siteEntity.getAreaCode(), siteEntity.getAreaCode(), 60L);
if (!bool) {
throw new AppException("当前正在同步事项数据中,请勿重复提交!");
}
ThreadPool.getInstance().execute(new SyncGovMatterDetailThread(matterService, siteService, deptService, siteEntity, getContext()));
ThreadPool.getInstance().execute(new SyncGovMatterDetailThread(matterService, siteService, deptService, siteMatterService, siteEntity, getContext()));
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "同步站点事项数据命令下发成功!");
......
......@@ -7,6 +7,7 @@
<resultMap type="MatterAcceptEntity" id="MatterAcceptEntity-Map">
<id property="id" column="id" />
<result property="matterId" column="matterId" />
<result property="matterCode" column="matterCode" />
<result property="matterName" column="matterName" />
<result property="content" column="content" />
<result property="source" column="source" />
......@@ -21,46 +22,49 @@
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id,
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId as matterId,
a.matterId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName as matterName,
a.matterName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('content') or colPickMode == 1 and data.containsKey('content')))">
a.content as content,
a.content,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source as source,
a.source,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime,
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId,
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime,
a.updateTime,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterAcceptEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_accept
(matterId,matterName,content,source,createTime,createUserId,updateTime)
(matterId,matterCode,matterName,content,source,createTime,createUserId,updateTime)
VALUES
(#{matterId},#{matterName},#{content},#{source},#{createTime},#{createUserId},#{updateTime})
(#{matterId},#{matterCode},#{matterName},#{content},#{source},#{createTime},#{createUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_accept
(matterId,matterName,content,source,createTime,createUserId,updateTime)
(matterId,matterCode,matterName,content,source,createTime,createUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.matterName},#{item.content},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
(#{item.matterId},#{item.matterCode},#{item.matterName},#{item.content},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach>
</insert>
......@@ -76,6 +80,9 @@
<if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))">
a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName},
</if>
......@@ -124,6 +131,13 @@
</choose>
</foreach>
</trim>
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
......@@ -320,6 +334,21 @@
</if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
......@@ -444,6 +473,11 @@
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterName')">
a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
......
......@@ -7,6 +7,7 @@
<resultMap type="MatterChargesEntity" id="MatterChargesEntity-Map">
<id property="id" column="id" />
<result property="matterId" column="matterId" />
<result property="matterCode" column="matterCode" />
<result property="matterName" column="matterName" />
<result property="content" column="content" />
<result property="source" column="source" />
......@@ -21,46 +22,49 @@
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id,
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId as matterId,
a.matterId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName as matterName,
a.matterName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('content') or colPickMode == 1 and data.containsKey('content')))">
a.content as content,
a.content,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source as source,
a.source,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime,
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId,
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime,
a.updateTime,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterChargesEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_charges
(matterId,matterName,content,source,createTime,createUserId,updateTime)
(matterId,matterCode,matterName,content,source,createTime,createUserId,updateTime)
VALUES
(#{matterId},#{matterName},#{content},#{source},#{createTime},#{createUserId},#{updateTime})
(#{matterId},#{matterCode},#{matterName},#{content},#{source},#{createTime},#{createUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_charges
(matterId,matterName,content,source,createTime,createUserId,updateTime)
(matterId,matterCode,matterName,content,source,createTime,createUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.matterName},#{item.content},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
(#{item.matterId},#{item.matterCode},#{item.matterName},#{item.content},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach>
</insert>
......@@ -76,6 +80,9 @@
<if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))">
a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName},
</if>
......@@ -124,6 +131,13 @@
</choose>
</foreach>
</trim>
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
......@@ -320,6 +334,21 @@
</if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
......@@ -444,6 +473,11 @@
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterName')">
a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
......
......@@ -7,6 +7,7 @@
<resultMap type="MatterFlowlimitEntity" id="MatterFlowlimitEntity-Map">
<id property="id" column="id" />
<result property="matterId" column="matterId" />
<result property="matterCode" column="matterCode" />
<result property="matterName" column="matterName" />
<result property="flowName" column="flowName" />
<result property="flowTime" column="flowTime" />
......@@ -24,55 +25,58 @@
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id as id,
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterId') or colPickMode == 1 and data.containsKey('matterId')))">
a.matterId as matterId,
a.matterId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterCode') or colPickMode == 1 and data.containsKey('matterCode')))">
a.matterCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterName') or colPickMode == 1 and data.containsKey('matterName')))">
a.matterName as matterName,
a.matterName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowName') or colPickMode == 1 and data.containsKey('flowName')))">
a.flowName as flowName,
a.flowName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowTime') or colPickMode == 1 and data.containsKey('flowTime')))">
a.flowTime as flowTime,
a.flowTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowLimit') or colPickMode == 1 and data.containsKey('flowLimit')))">
a.flowLimit as flowLimit,
a.flowLimit,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowDesc') or colPickMode == 1 and data.containsKey('flowDesc')))">
a.flowDesc as flowDesc,
a.flowDesc,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('source') or colPickMode == 1 and data.containsKey('source')))">
a.source as source,
a.source,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime as createTime,
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId as createUserId,
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime as updateTime,
a.updateTime,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterFlowlimitEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_sys_matter_flowlimit
(matterId,matterName,flowName,flowTime,flowLimit,flowDesc,source,createTime,createUserId,updateTime)
(matterId,matterCode,matterName,flowName,flowTime,flowLimit,flowDesc,source,createTime,createUserId,updateTime)
VALUES
(#{matterId},#{matterName},#{flowName},#{flowTime},#{flowLimit},#{flowDesc},#{source},#{createTime},#{createUserId},#{updateTime})
(#{matterId},#{matterCode},#{matterName},#{flowName},#{flowTime},#{flowLimit},#{flowDesc},#{source},#{createTime},#{createUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_sys_matter_flowlimit
(matterId,matterName,flowName,flowTime,flowLimit,flowDesc,source,createTime,createUserId,updateTime)
(matterId,matterCode,matterName,flowName,flowTime,flowLimit,flowDesc,source,createTime,createUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.matterId},#{item.matterName},#{item.flowName},#{item.flowTime},#{item.flowLimit},#{item.flowDesc},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
(#{item.matterId},#{item.matterCode},#{item.matterName},#{item.flowName},#{item.flowTime},#{item.flowLimit},#{item.flowDesc},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach>
</insert>
......@@ -88,6 +92,9 @@
<if test="(colPickMode==0 and data.containsKey('matterIdIncrement')) or (colPickMode==1 and !data.containsKey('matterIdIncrement'))">
a.matterId=ifnull(a.matterId,0) + #{data.matterIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('matterCode')) or (colPickMode==1 and !data.containsKey('matterCode'))">
a.matterCode=#{data.matterCode},
</if>
<if test="(colPickMode==0 and data.containsKey('matterName')) or (colPickMode==1 and !data.containsKey('matterName'))">
a.matterName=#{data.matterName},
</if>
......@@ -145,6 +152,13 @@
</choose>
</foreach>
</trim>
<trim prefix="matterCode=(case" suffix="ELSE matterCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterCode')) or (colPickMode==1 and !item.containsKey('matterCode'))">
when a.id=#{item.id} then #{item.matterCode}
</if>
</foreach>
</trim>
<trim prefix="matterName=(case" suffix="ELSE matterName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('matterName')) or (colPickMode==1 and !item.containsKey('matterName'))">
......@@ -362,6 +376,21 @@
</if>
<if test="conditionParamRef.containsKey('matterCode')">
<if test="conditionParamRef.matterCode != null and conditionParamRef.matterCode != ''">
${_conditionType_} a.matterCode like #{${_conditionParam_}.matterCode}
</if>
<if test="conditionParamRef.matterCode == null">
${_conditionType_} a.matterCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('matterCodeList')">
${_conditionType_} a.matterCode in
<foreach collection="conditionParamRef.matterCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('matterName')">
<if test="conditionParamRef.matterName != null and conditionParamRef.matterName != ''">
${_conditionType_} a.matterName like #{${_conditionParam_}.matterName}
......@@ -531,6 +560,11 @@
<if test='orderCol.matterId != null and "DESC".equalsIgnoreCase(orderCol.matterId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterCode')">
a.matterCode
<if test='orderCol.matterCode != null and "DESC".equalsIgnoreCase(orderCol.matterCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('matterName')">
a.matterName
<if test='orderCol.matterName != null and "DESC".equalsIgnoreCase(orderCol.matterName)'>DESC</if>
......
{
"base-local": {
"baseUrl": "http://127.0.0.1:17214/base"
"baseUrl": "http://127.0.0.1:17211/base"
},
"base-dev": {
"baseUrl": "http://192.168.0.60:17211/base"
......
......@@ -86,7 +86,7 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"id":3
"id":7
}
......
......@@ -5,7 +5,7 @@ Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"password":"adsmile",
"securityCode":"8888"
}
......
......@@ -24,12 +24,12 @@
<profiles.active>develop</profiles.active>
<profiles.server.port>17212</profiles.server.port>
<profiles.queue.type>rabbitmq</profiles.queue.type>
<profiles.rabbitmq.host>192.168.0.218</profiles.rabbitmq.host>
<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.rabbitmq.username>root_mq</profiles.rabbitmq.username>
<profiles.rabbitmq.password>xhx@2022</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
<profiles.nacos.server-addr>192.168.0.218:8848</profiles.nacos.server-addr>
<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.level>INFO</profiles.log.level>
......
......@@ -74,4 +74,14 @@ public interface UserService extends ICRUDService<UserEntity,Long>{
*/
void synchSitesAuth() throws AppException;
/**
* 重置密码
*
* @param loginName
* @param newPwd
* @return
* @throws AppException
*/
boolean resetUserPwd(String loginName, String newPwd , Context context) throws AppException;
}
\ No newline at end of file
......@@ -289,6 +289,27 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
});
}
@Override
public boolean resetUserPwd(String loginName, String newPwd, Context context) throws AppException {
if(context==null){
throw new AppException("登录过期!");
}
if(context.getUser().getId()!=1){
throw new AppException("当前用户非管理员,不能使用此功能");
}
UserEntity sysUser = this.findByLoginName(loginName);
if (sysUser == null || !sysUser.getLoginName().equals(loginName)) {
throw new AppException("帐号错误!");
}
try {
sysUser.setLoginPwd(SecurityUtil.md5DoubleEncoding(newPwd));
} catch (Exception e) {
throw new AppException("密码转换异常!", e);
}
dao.update(sysUser);
return true;
}
private void updateRedisUserSession(UserEntity userEntity) {
Set<String> keys = cacheService.scan(Constant.LOGIN_TOKEN_KEY + userEntity.getId());
keys.forEach(key -> {
......
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