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

修改热门词汇

parent a2724d90
Pipeline #2413 canceled with stages
package com.mortals.xhx.module.matter.dao; package com.mortals.xhx.module.matter.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import java.util.List; import java.util.List;
/** /**
...@@ -11,6 +13,4 @@ import java.util.List; ...@@ -11,6 +13,4 @@ import java.util.List;
* @date 2022-09-27 * @date 2022-09-27
*/ */
public interface MatterDao extends ICRUDDao<MatterEntity,Long>{ public interface MatterDao extends ICRUDDao<MatterEntity,Long>{
} }
package com.mortals.xhx.module.matter.dao.ibatis; package com.mortals.xhx.module.matter.dao.ibatis;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.ParamDto;
import com.mortals.framework.model.Result;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.matter.dao.MatterDao; import com.mortals.xhx.module.matter.dao.MatterDao;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis; import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List; import java.util.List;
/** /**
* 事项申请材料DaoImpl DAO接口 * 事项申请材料DaoImpl DAO接口
* *
* @author zxfei * @author zxfei
* @date 2022-09-27 * @date 2022-09-27
*/ */
@Repository("matterDao") @Repository("matterDao")
public class MatterDaoImpl extends BaseCRUDDaoMybatis<MatterEntity,Long> implements MatterDao { public class MatterDaoImpl extends BaseCRUDDaoMybatis<MatterEntity, Long> implements MatterDao {
} }
package com.mortals.xhx.module.matter.service; package com.mortals.xhx.module.matter.service;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
/** /**
...@@ -24,4 +27,6 @@ public interface MatterService extends ICRUDService<MatterEntity,Long>{ ...@@ -24,4 +27,6 @@ public interface MatterService extends ICRUDService<MatterEntity,Long>{
* @param id * @param id
*/ */
Rest<String> recommend(Long id,Context context); Rest<String> recommend(Long id,Context context);
} }
\ No newline at end of file
...@@ -3,11 +3,14 @@ package com.mortals.xhx.module.matter.service.impl; ...@@ -3,11 +3,14 @@ package com.mortals.xhx.module.matter.service.impl;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.MatterSourceEnum; import com.mortals.xhx.common.code.MatterSourceEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.ParamKey; import com.mortals.xhx.common.key.ParamKey;
import com.mortals.xhx.common.pdu.site.SitePdu;
import com.mortals.xhx.common.utils.StringUtils; import com.mortals.xhx.common.utils.StringUtils;
import com.mortals.xhx.feign.site.ISiteFeign;
import com.mortals.xhx.module.matter.model.MatterDatumEntity; import com.mortals.xhx.module.matter.model.MatterDatumEntity;
import com.mortals.xhx.module.matter.model.MatterDatumQuery; import com.mortals.xhx.module.matter.model.MatterDatumQuery;
import com.mortals.xhx.module.matter.model.MatterQuery; import com.mortals.xhx.module.matter.model.MatterQuery;
...@@ -43,6 +46,8 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -43,6 +46,8 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
private SheetMatterService sheetMatterService; private SheetMatterService sheetMatterService;
@Autowired @Autowired
private MatterDatumService matterDatumService; private MatterDatumService matterDatumService;
@Autowired
private ISiteFeign siteFeign;
@Override @Override
protected void findAfter(MatterEntity entity, PageInfo pageInfo, Context context, List<MatterEntity> list) throws AppException { protected void findAfter(MatterEntity entity, PageInfo pageInfo, Context context, List<MatterEntity> list) throws AppException {
...@@ -155,4 +160,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter ...@@ -155,4 +160,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
matterDatumService.removeList(matterDatumlist, context); matterDatumService.removeList(matterDatumlist, context);
super.removeAfter(ids, context, result); super.removeAfter(ids, context, result);
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.sheet.dao; package com.mortals.xhx.module.sheet.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.sheet.model.SheetMatterEntity; import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
/** /**
...@@ -12,5 +17,8 @@ import com.mortals.xhx.module.sheet.model.SheetMatterEntity; ...@@ -12,5 +17,8 @@ import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
*/ */
public interface SheetMatterDao extends ICRUDDao<SheetMatterEntity,Long>{ public interface SheetMatterDao extends ICRUDDao<SheetMatterEntity,Long>{
String SQLID_SUB_LIST = "getSubList";
String SQLID_SUB_COUNT = "getSubListCount";
Result<SheetMatterEntity> getSubList(SheetMatterEntity matterQuery, PageInfo pageInfo);
} }
...@@ -2,10 +2,18 @@ package com.mortals.xhx.module.sheet.dao.ibatis; ...@@ -2,10 +2,18 @@ package com.mortals.xhx.module.sheet.dao.ibatis;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis; import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.ParamDto;
import com.mortals.framework.model.Result;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.sheet.dao.SheetMatterDao; import com.mortals.xhx.module.sheet.dao.SheetMatterDao;
import com.mortals.xhx.module.sheet.model.SheetMatterEntity; import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.ArrayList;
import java.util.List;
/** /**
* 基础事项DaoImpl DAO接口 * 基础事项DaoImpl DAO接口
* *
...@@ -16,5 +24,28 @@ import org.springframework.stereotype.Repository; ...@@ -16,5 +24,28 @@ import org.springframework.stereotype.Repository;
public class SheetMatterDaoImpl extends BaseCRUDDaoMybatis<SheetMatterEntity,Long> implements SheetMatterDao { public class SheetMatterDaoImpl extends BaseCRUDDaoMybatis<SheetMatterEntity,Long> implements SheetMatterDao {
@Override
public Result<SheetMatterEntity> getSubList(SheetMatterEntity matterQuery, PageInfo pageInfo) {
Result<SheetMatterEntity> result = new Result();
ParamDto paramDto = this.getQueryParam(matterQuery);
int count = this.getSubCount(paramDto);
List list = null;
if (count == 0) {
list = new ArrayList();
} else if (pageInfo.getPrePageResult() == -1) {
list = this.getSqlSession().selectList(this.getSqlId(SQLID_SUB_LIST), paramDto);
} else {
RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
list = this.getSqlSession().selectList(this.getSqlId(SQLID_SUB_LIST), this.cpyQueryParamDto(paramDto), rowBounds);
}
pageInfo.setTotalResult(count);
result.setPageInfo(pageInfo);
result.setList(list);
return result;
}
public int getSubCount(ParamDto paramDto) {
return this.getSqlSession().selectOne(this.getSqlId(SQLID_SUB_COUNT), this.cpyQueryParamDto(paramDto));
}
} }
package com.mortals.xhx.module.sheet.service; package com.mortals.xhx.module.sheet.service;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.sheet.model.SheetMatterEntity; import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
/** /**
* SheetMatterService * SheetMatterService
* * <p>
* 基础事项 service接口 * 基础事项 service接口
* *
* @author zxfei * @author zxfei
* @date 2022-09-27 * @date 2022-09-27
*/ */
public interface SheetMatterService extends ICRUDService<SheetMatterEntity,Long>{ public interface SheetMatterService extends ICRUDService<SheetMatterEntity, Long> {
Result<SheetMatterEntity> findSubList(SheetMatterEntity matterQuery, PageInfo pageInfo, Context context);
} }
\ No newline at end of file
package com.mortals.xhx.module.sheet.service.impl; package com.mortals.xhx.module.sheet.service.impl;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.pdu.site.SitePdu;
import com.mortals.xhx.feign.site.ISiteFeign;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.sheet.dao.SheetMatterDao; import com.mortals.xhx.module.sheet.dao.SheetMatterDao;
import com.mortals.xhx.module.sheet.model.SheetMatterEntity; import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
import com.mortals.xhx.module.sheet.service.SheetMatterService; import com.mortals.xhx.module.sheet.service.SheetMatterService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
/** /**
* SheetMatterService * SheetMatterService
* 基础事项 service实现 * 基础事项 service实现
* *
* @author zxfei * @author zxfei
* @date 2022-09-27 * @date 2022-09-27
*/ */
@Service("sheetMatterService") @Service("sheetMatterService")
public class SheetMatterServiceImpl extends AbstractCRUDServiceImpl<SheetMatterDao, SheetMatterEntity, Long> implements SheetMatterService { public class SheetMatterServiceImpl extends AbstractCRUDServiceImpl<SheetMatterDao, SheetMatterEntity, Long> implements SheetMatterService {
@Autowired
private ISiteFeign siteFeign;
@Override
public Result<SheetMatterEntity> findSubList(SheetMatterEntity matterQuery, PageInfo pageInfo, Context context) throws AppException {
Rest<SitePdu> rest = siteFeign.info(matterQuery.getSiteId());
if (rest.getCode() == YesNoEnum.YES.getValue()) {
if (ObjectUtils.isEmpty(matterQuery.getAreaCode())) {
matterQuery.setAreaCode(rest.getData() == null ? null : rest.getData().getAreaCode());
}
} else {
return new Result<>();
}
return this.dao.getSubList(matterQuery, pageInfo);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.sheet.web; package com.mortals.xhx.module.sheet.web;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.pdu.site.SitePdu; import com.mortals.xhx.common.pdu.site.SitePdu;
import com.mortals.xhx.feign.site.ISiteFeign; import com.mortals.xhx.feign.site.ISiteFeign;
import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.sheet.model.SheetMatterEntity; import com.mortals.xhx.module.sheet.model.SheetMatterEntity;
import com.mortals.xhx.module.sheet.service.SheetMatterService; import com.mortals.xhx.module.sheet.service.SheetMatterService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import static com.mortals.framework.ap.SysConstains.MESSAGE_INFO;
import static com.mortals.framework.ap.SysConstains.PAGEINFO_KEY;
/** /**
* *
* 基础事项 * 基础事项
...@@ -87,4 +97,32 @@ public class SheetMatterController extends BaseCRUDJsonBodyMappingController<She ...@@ -87,4 +97,32 @@ public class SheetMatterController extends BaseCRUDJsonBodyMappingController<She
} }
super.doListBefore(query, model, context); super.doListBefore(query, model, context);
} }
@PostMapping(value = "sublist")
@UnAuth
public Rest<Object> sublist(@RequestBody SheetMatterEntity query) {
Rest<Object> ret = new Rest<>();
Map<String, Object> model = new HashMap<>();
Context context = this.getContext();
String busiDesc = "查询差集" + this.getModuleDesc();
int code=VALUE_RESULT_SUCCESS;
try {
PageInfo pageInfo = buildPageInfo(query);
Result<SheetMatterEntity> result = this.getService().findSubList(query, pageInfo, context);
model.put(KEY_RESULT_DATA, result.getList());
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
model.put(MESSAGE_INFO, busiDesc + "成功");
recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
}
this.init(model, context);
ret.setCode(code);
ret.setData(model);
ret.setMsg(model.get(MESSAGE_INFO) == null ? "" : model.remove(MESSAGE_INFO).toString());
return ret;
}
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.sheet.dao.ibatis.SheetMatterDaoImpl">
<select id="getSubListCount" parameterType="paramDto" resultType="int">
SELECT
count( 1 )
FROM
mortals_sys_sheet_matter AS a
LEFT JOIN ( SELECT matterCode FROM mortals_xhx_matter WHERE siteId = #{condition.siteId} ) AS b ON a.matterNo = b.matterCode
<trim suffixOverrides="where" suffix="">
where b.matterCode IS NULL and
<trim prefixOverrides="and" prefix="">
<if test="condition.areaCode!=null and condition.areaCode!=''">
and a.areaCode = #{condition.areaCode,jdbcType=VARCHAR}
</if>
<if test="condition.deptCode!=null and condition.deptCode!=''">
and a.deptCode = #{condition.deptCode,jdbcType=VARCHAR}
</if>
<if test="condition.matterName != null and condition.matterName != ''">
and a.matterName like #{condition.matterName}
</if>
<if test="condition.matterFullName != null and condition.matterFullName != ''">
and a.matterFullName like #{condition.matterFullName}
</if>
</trim>
</trim>
</select>
<!-- 获取事项差集列表列表 -->
<select id="getSubList" parameterType="paramDto" resultMap="MatterEntity-Map">
select
<include refid="_columns"/>
FROM
mortals_sys_sheet_matter AS a
LEFT JOIN ( SELECT matterCode FROM mortals_xhx_matter WHERE siteId = #{condition.siteId} ) AS b ON a.matterNo = b.matterCode
<trim suffixOverrides="where" suffix="">
where b.matterCode IS NULL and
<trim prefixOverrides="and" prefix="">
<if test="condition.areaCode!=null and condition.areaCode!=''">
and a.areaCode = #{condition.areaCode,jdbcType=VARCHAR}
</if>
<if test="condition.deptCode!=null and condition.deptCode!=''">
and a.deptCode = #{condition.deptCode,jdbcType=VARCHAR}
</if>
<if test="condition.matterName != null and condition.matterName != ''">
and a.matterName like #{condition.matterName}
</if>
<if test="condition.matterFullName != null and condition.matterFullName != ''">
and a.matterFullName like #{condition.matterFullName}
</if>
</trim>
</trim>
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment