From f1784dfbee1b2e9d3340e6b72eb9bebea2baa9cf Mon Sep 17 00:00:00 2001 From: zhouxy Date: Wed, 31 Dec 2025 22:19:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=8A=A8=E5=9B=9E=E9=80=80=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BizRemListController.java | 13 +- .../controller/EBaseinfoController.java | 27 +- .../controller/ToincludeabnController.java | 13 +- .../aiccs/abnormal/entity/EBaseinfo.java | 7 - .../aiccs/abnormal/entity/TSAbnList.java | 18 - .../aiccs/abnormal/entity/Toincludeabn.java | 7 +- .../abnormal/mapper/EBaseinfoMapper.java | 8 - .../abnormal/service/EBaseinfoService.java | 12 - .../abnormal/service/IGzaiccodeService.java | 2 - .../service/impl/EBaseinfoServiceImpl.java | 49 --- .../service/impl/GzaiccodeServiceImpl.java | 48 +-- .../service/impl/TSBizDissentServiceImpl.java | 90 +---- .../service/impl/TSBizRemListServiceImpl.java | 100 +----- .../service/impl/TSBizSpeListServiceImpl.java | 54 +-- .../aiccs/asyncTask/RevokeAsyncTask.java | 144 ++------ .../market/controller/InitController.java | 10 +- .../impl/TSUsualInspectServiceImpl.java | 2 +- .../aiccs/revoke/mapper/BizRevEntMapper.java | 4 - .../revoke/service/BizRevEntService.java | 18 - .../service/impl/BizRevEntServiceImpl.java | 10 - .../service/impl/CreateFileServiceImpl.java | 257 ++++++--------- .../BizSerIllegalRemAppController.java | 18 +- .../BizSerIllegalRemController.java | 92 +++--- .../entity/TSSerIllegalList.java | 7 - .../impl/TSBizSerIllegalServiceImpl.java | 2 - .../aiccs/common/util/ConstantsUtil.java | 19 +- .../schedule/AttachmentUploadSchedule.java | 20 +- .../mapper/aiccs/abnormal/EBaseinfoMapper.xml | 307 ++++++++---------- .../mapper/aiccs/abnormal/TSAbnListMapper.xml | 41 ++- .../aiccs/market/TSUsualInspectMapper.xml | 150 ++++----- .../mapper/aiccs/revoke/BizRevEntMapper.xml | 38 +-- .../seriousillegal/TSSerIllegalListMapper.xml | 49 ++- .../statistic/StatisticsResultMapper.xml | 25 +- 33 files changed, 506 insertions(+), 1155 deletions(-) diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/BizRemListController.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/BizRemListController.java index c52477d..bd3e2c0 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/BizRemListController.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/BizRemListController.java @@ -262,13 +262,8 @@ public class BizRemListController extends BaseController implements ServletConte List> list = new ArrayList<>(); TSAbnList tsAbnList = tsAbnListService.getById(abnlistid); - - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); - wrapper.eq(EBaseinfo::getPripid, tsAbnList.getPripid()); - EBaseinfo eBaseinfo = eBaseinfoService.getOne(wrapper); - String userOrg = StringUtils.substring(aicUser.getRegionID(), 0, 6); - String unitCode = gzaiccodeService.changeUnitCn(eBaseinfo.getRegorg(), eBaseinfo.getRegorgCn()); + String unitCode = gzaiccodeService.changeUnitCn(tsAbnList.getDecorg(), tsAbnList.getIntoDecorg()); boolean flag = false; if (StringUtils.isNotBlank(unitCode)) { if (unitCode.equals("440100") || unitCode.equals("440101")) { @@ -280,7 +275,9 @@ public class BizRemListController extends BaseController implements ServletConte } } if (flag) { - + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(EBaseinfo::getPripid, tsAbnList.getPripid()); + EBaseinfo eBaseinfo = eBaseinfoService.getOne(wrapper); if (com.chinaweal.aiccs.common.util.StringUtils.notEquals(userOrg, com.chinaweal.aiccs.common.util.StringUtils.substring(eBaseinfo.getRegorg(), 0, 6))) { Map resultMap = new HashMap(); @@ -288,7 +285,7 @@ public class BizRemListController extends BaseController implements ServletConte resultMap.put("entname", tsAbnList.getEntname()); resultMap.put("pripid", tsAbnList.getPripid()); resultMap.put("abnlistid", abnlistid); - resultMap.put("reason", "登记机关与当前用户所属机关不匹配!"); + resultMap.put("reason", "列入机关与当前用户所属机关不匹配!"); list.add(resultMap); return RestResult.ok(list); } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/EBaseinfoController.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/EBaseinfoController.java index 1a588ac..28404f4 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/EBaseinfoController.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/EBaseinfoController.java @@ -1,5 +1,6 @@ package com.chinaweal.aiccs.aiccs.abnormal.controller; + import cn.hutool.core.util.URLUtil; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.ExcelWriter; @@ -46,7 +47,6 @@ import com.chinaweal.aiccs.org.service.TUsersService; import com.chinaweal.aicorg.model.AICUser; import com.chinaweal.solr.entity.EBaseInfoSolrBean; import com.chinaweal.solr.template.SolrSearchTemplate; -import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery; import com.chinaweal.youfool.framework.springboot.exception.custom.BusinessException; import com.chinaweal.youfool.framework.springboot.mybatis.plus.page.PageRequestDto; import com.chinaweal.youfool.framework.springboot.rest.RestResult; @@ -77,6 +77,7 @@ import java.util.*; import static com.baomidou.mybatisplus.core.toolkit.Wrappers.lambdaQuery; + /** *

* 前端控制器 @@ -644,9 +645,16 @@ public class EBaseinfoController extends BaseController { @GetMapping("/list") public RestResult> list(String uscc, String entName) { - // 使用自定义SQL查询替换原来的简单查询 - List list = eBaseinfoService.getEBaseinfoListWithPunInfo(uscc, entName); - + LambdaQueryWrapper lqw = lambdaQuery(); + if (StringUtils.isNotBlank(uscc)) { + if (StringUtils.isUscc(uscc)) { + lqw.eq(EBaseinfo::getUniscid, uscc); + } else { + lqw.eq(EBaseinfo::getRegno, uscc); + } + } + lqw.eq(StringUtils.isNotBlank(entName), EBaseinfo::getEntname, entName); + List list = eBaseinfoService.list(lqw); for (EBaseinfo eBaseinfo : list) { // 中文渲染 // 经营状态 @@ -1195,8 +1203,8 @@ public class EBaseinfoController extends BaseController { // 执行查询 IPage page = eBaseinfoService.queryForcedLogoutEntList( - new Page<>(pageRequestDto.getCurPage(), pageRequestDto.getPageSize()), - customParamMap + new Page<>(pageRequestDto.getCurPage(), pageRequestDto.getPageSize()), + customParamMap ); return RestResult.ok(page); @@ -1250,11 +1258,4 @@ public class EBaseinfoController extends BaseController { response.getWriter().write("导出失败:" + e.getMessage()); } } - - @ApiOperation(value = "5.分页查询市场主体基本信息", position = 5) - @PostMapping("/listEBaseinfo") - public RestResult> listEBaseinfo(@RequestBody BaseQuery query) { - IPage data = eBaseinfoService.listEBaseinfo(query); - return RestResult.ok(data); - } } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/ToincludeabnController.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/ToincludeabnController.java index 572c09b..6ecbf9b 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/ToincludeabnController.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/controller/ToincludeabnController.java @@ -106,11 +106,6 @@ public class ToincludeabnController extends BaseController { String pripid = one.getPripid(); String uniscid = one.getUniscid(); - if ("2".equals(includeType)) { - includeType = "4"; - }else if ("1".equals(includeType)) { - includeType = "2"; - } //地址的,列异中和已列异不生成线索 if ("4".equals(includeType)) { LambdaQueryWrapper abnWrapper = new LambdaQueryWrapper<>(); @@ -302,12 +297,6 @@ public class ToincludeabnController extends BaseController { String pripid = one.getPripid(); String uniscid = one.getUniscid(); - if ("2".equals(includeType)) { - includeType = "4"; - }else if ("1".equals(includeType)) { - includeType = "2"; - } - //地址的,列异中和已列异不生成线索 if ("4".equals(includeType)) { LambdaQueryWrapper abnWrapper = new LambdaQueryWrapper<>(); @@ -336,7 +325,7 @@ public class ToincludeabnController extends BaseController { toincludeabn.setRegno(regno); toincludeabn.setIncludeType(includeType); toincludeabn.setDataFromId(dataFromId); - toincludeabn.setDataFrom("3"); + toincludeabn.setDataFrom("2"); toincludeabn.setState("0"); toincludeabn.setRegEntryUserName(regEntryUserName); toincludeabn.setRegEntryUserId(regEntryUserId); diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/EBaseinfo.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/EBaseinfo.java index 75be46c..a12b673 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/EBaseinfo.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/EBaseinfo.java @@ -570,16 +570,9 @@ public class EBaseinfo extends Model { @TableField(exist = false) private String reportYear; - @TableField(exist = false) - private String caseId; - @Override protected Serializable pkVal() { return this.pripid; } - - @ApiModelProperty("查询统一社会信用代码/注册码") - @TableField(exist = false) - private String searchUscc; } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/TSAbnList.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/TSAbnList.java index d6f9503..ec358b4 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/TSAbnList.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/TSAbnList.java @@ -309,24 +309,6 @@ public class TSAbnList extends Model { @TableField("contactMethodOrg") private String contactMethodOrg; - /** - * 抽查检查线索来源 - */ - @TableField("CLUETYPE") - private String clueType; - - /** - * 线索来源业务ID - */ - @TableField("CLUEID") - private String clueId; - - /** - * 线索来源业务ID - */ - @TableField("ISCHECK") - private String ischeck; - @Override protected Serializable pkVal() { return this.abnlistid; diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/Toincludeabn.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/Toincludeabn.java index 0eb9bcb..d0d953d 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/Toincludeabn.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/entity/Toincludeabn.java @@ -52,9 +52,10 @@ public class Toincludeabn { /** * 列异类型 - * 1.未按规定公示应当公示的信息 - * 2.通过登记的住所(经营场所〉无法联系 - * 3.不配合检查情节严重 + * 2.未按规定公示应当公示的信息 + * 3.公示信息隐瞒真实情况弄虚作假 + * 4.通过登记的住所(经营场所〉无法联系 + * 6.不配合检查情节严重 */ @TableField("includeType") private String includeType; diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/mapper/EBaseinfoMapper.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/mapper/EBaseinfoMapper.java index 695e1a4..0384d50 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/mapper/EBaseinfoMapper.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/mapper/EBaseinfoMapper.java @@ -191,12 +191,4 @@ public interface EBaseinfoMapper extends BaseMapper { IPage queryForcedLogoutEntList(IPage page, @Param("customParamMap") Map customParamMap); List exportQzzxEntList(@Param("paramMap") Map paramMap); - - /** - * 根据惩罚信息查询企业基本信息列表 - * @param uscc 统一社会信用代码 - * @param entName 企业名称 - * @return 企业基本信息列表 - */ - List selectEBaseinfoListWithPunInfo(@Param("uscc") String uscc, @Param("entName") String entName); } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/EBaseinfoService.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/EBaseinfoService.java index b5a7c80..79ead20 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/EBaseinfoService.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/EBaseinfoService.java @@ -12,7 +12,6 @@ import com.chinaweal.aiccs.aiccs.market.entity.AreaSlice; import com.chinaweal.aiccs.crgs.moveinDetails.entity.EAlterRecoder; import com.chinaweal.aicorg.model.AICUser; import com.chinaweal.solr.entity.EBaseInfoSolrBean; -import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery; import com.chinaweal.youfool.framework.springboot.mybatis.plus.BaseService; import org.apache.poi.hssf.usermodel.HSSFWorkbook; @@ -210,15 +209,4 @@ public interface EBaseinfoService extends BaseService { List exportQzzxEntList(Map paramMap); - - /** - * 根据惩罚信息查询企业基本信息列表 - * @param uscc 统一社会信用代码或注册号 - * @param entName 企业名称 - * @return 企业基本信息列表 - */ - List getEBaseinfoListWithPunInfo(String uscc, String entName); - - IPage listEBaseinfo(BaseQuery query); - } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/IGzaiccodeService.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/IGzaiccodeService.java index dcc43ce..8c448c9 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/IGzaiccodeService.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/IGzaiccodeService.java @@ -82,8 +82,6 @@ public interface IGzaiccodeService extends IService { */ List getChildStationList(String parentid); - List byPermissionListHandleUserListYZ(String priPID, String illegalRemoveAccept, String decorg, String decorgCn); - // /** // * 根据层级获取机关列表 // * @param parentid diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/EBaseinfoServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/EBaseinfoServiceImpl.java index bb573da..9e634bc 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/EBaseinfoServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/EBaseinfoServiceImpl.java @@ -4,7 +4,6 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -54,7 +53,6 @@ import com.chinaweal.aicorg.model.AICUser; import com.chinaweal.aicorg.services.OrgUM; import com.chinaweal.solr.entity.EBaseInfoSolrBean; import com.chinaweal.solr.template.SolrSearchTemplate; -import com.chinaweal.youfool.framework.springboot.base.query.BaseQuery; import com.chinaweal.youfool.framework.springboot.exception.custom.BusinessException; import com.chinaweal.youfool.framework.springboot.mybatis.plus.BaseServiceImpl; import com.chinaweal.youfool.framework.springboot.rest.ResultCode; @@ -1591,51 +1589,4 @@ public class EBaseinfoServiceImpl extends BaseServiceImpl exportQzzxEntList(Map paramMap) { return baseMapper.exportQzzxEntList(paramMap); } - - @Override - public List getEBaseinfoListWithPunInfo(String uscc, String entName) { - return baseMapper.selectEBaseinfoListWithPunInfo(uscc, entName); - } - - @Override - public IPage listEBaseinfo(BaseQuery query) { - EBaseinfo entity = query.getEntity(EBaseinfo.class); - Page page = query.getPage(); - - String uniscId = entity.getUniscid(); - String entName = entity.getEntname(); - String searchUscc = entity.getSearchUscc(); - //输入了条件才会查询 - if(com.chinaweal.aiccs.common.util.StringUtils.isNotEmpty(uniscId) - || com.chinaweal.aiccs.common.util.StringUtils.isNotEmpty(entName) - || com.chinaweal.aiccs.common.util.StringUtils.isNotEmpty(searchUscc)){ - LambdaQueryWrapper lambdaQueryWrapper = Wrappers.lambdaQuery(); - if(com.chinaweal.aiccs.common.util.StringUtils.isNotEmpty(uniscId)) - lambdaQueryWrapper.eq(EBaseinfo::getUniscid, uniscId); - if(com.chinaweal.aiccs.common.util.StringUtils.isNotEmpty(entName)) - lambdaQueryWrapper.eq(EBaseinfo::getEntname, entName); - page = page(page, lambdaQueryWrapper); - if(com.chinaweal.aiccs.common.util.StringUtils.isNotEmpty(searchUscc)) - lambdaQueryWrapper.eq(EBaseinfo::getUniscid, searchUscc) - .or().eq(EBaseinfo::getRegno, searchUscc); - page = page(page, lambdaQueryWrapper); - -// page.getRecords().forEach(record -> { -// QueryWrapper queryWrapper = new QueryWrapper<>(); -// //查属地机关中文 -// String supervisedeptid = record.getSupervisedeptid(); -// if(com.chinaweal.aiccs.common.util.StringUtils.isNotEmpty(supervisedeptid)){ -// queryWrapper.lambda().eq(TOrgUnits::getOrgNumber, supervisedeptid.length() == 6 ? supervisedeptid + "000" : supervisedeptid) -// .eq(TOrgUnits::getDeleted, '0'); -// List list = tOrgUnitsService.list(queryWrapper); -// if (list.size() > 0) { -// TOrgUnits tOrgunits = list.get(0); -// record.setLocaladmCn(tOrgunits.getOrgUnitName()); -// } -// } -// }); - } - - return page; - } } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/GzaiccodeServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/GzaiccodeServiceImpl.java index d29eb54..16135a5 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/GzaiccodeServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/GzaiccodeServiceImpl.java @@ -26,7 +26,6 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -107,14 +106,14 @@ public class GzaiccodeServiceImpl extends ServiceImpl unitCodeUserList = orgUM.findUsersByOrgAndPermission(orgByUnitCode.getPrimaryKey(), permission); @@ -175,7 +174,7 @@ public class GzaiccodeServiceImpl extends ServiceImpl getChildStationList(String parentid) { return baseMapper.getChildStationList(null,parentid); } - - @Override - public List byPermissionListHandleUserListYZ(String pripid, String permission, String decorg, String decorgCn) { - List userList = new ArrayList<>(); - EBaseinfo eBaseinfo = eBaseinfoService.getById(pripid); - String acceptRegorg = eBaseinfo.getAcceptRegorg() == null?"":eBaseinfo.getAcceptRegorg(); //受理机关 - String regulatory = eBaseinfo.getSuporg(); //属地监管所 - String unitCode = changeUnitCn(decorg, decorgCn); //列入机关 - - if (unitCode != null) { - if(unitCode.equals("440108")){ //列入机关编码为440108的,列入机关为黄埔区局 - unitCode = "440112"; - } - if (!unitCode.equals("440101")&&!unitCode.equals("440100")&&!unitCode.equals("440129")) { //列入机关为区局 - //谁列入谁移出 - AICOrg orgByUnitCode = orgUM.findOrgByRegion(unitCode); - if(orgByUnitCode != null && StringUtils.isNotBlank(orgByUnitCode.getPrimaryKey())){ - List unitCodeUserList = orgUM.findUsersByOrgAndPermission(orgByUnitCode.getPrimaryKey(), permission); - if(unitCodeUserList != null) - userList.addAll(unitCodeUserList); - } - //属地监管所有经办权限人员 - if(StringUtils.isNotBlank(regulatory)) { - AICOrg orgByRegulatory = orgUM.findOrgByRegion(regulatory); - if (orgByRegulatory != null && StringUtils.isNotBlank(orgByRegulatory.getPrimaryKey())) { - List regulatoryUserList = orgUM.findUsersByOrgAndPermission(orgByRegulatory.getPrimaryKey(), permission); - if (regulatoryUserList != null) userList.addAll(regulatoryUserList); - } - } - } else if (unitCode.equals("440129") || acceptRegorg.equals("440129")) { - //列入机关为市局,判断列入机关或者受理机关是不是属于市局注册二处 - userList = tUsersService.findUsersByDeptAndPermission(orgUM.findOrgByRegion("djc2").getPrimaryKey(), permission); - } else { - //其余分给市局(440101)有修复经办权限的人员,排除注册二处 - userList = tUsersService.findUsersByUnitAndUnDepAndPermission(orgUM.findOrgByRegion("440101").getPrimaryKey(), orgUM.findOrgByRegion("djc2").getPrimaryKey(), permission); - } - } - if(userList != null) - userList.forEach(each -> each.setPassword(null)); - return userList == null ? new ArrayList<>() : userList; - } } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/TSBizDissentServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/TSBizDissentServiceImpl.java index 1cf6656..a7236ab 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/TSBizDissentServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/TSBizDissentServiceImpl.java @@ -13,8 +13,6 @@ import com.chinaweal.aiccs.aiccs.business.entity.TSTaskList; import com.chinaweal.aiccs.aiccs.business.service.TSTaskListService; import com.chinaweal.aiccs.aiccs.business.service.WorkFlowService; import com.chinaweal.aiccs.aiccs.inspect.service.TSWorkNoService; -import com.chinaweal.aiccs.aicris.forgiveprudent.entity.RanInsResult; -import com.chinaweal.aiccs.aicris.forgiveprudent.mapper.RanInsResultMapper; import com.chinaweal.aiccs.common.constant.BaseDataConstant; import com.chinaweal.aiccs.common.util.*; import com.chinaweal.aiccs.org.service.AicorgService; @@ -27,12 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; -import javax.annotation.Resource; -import java.sql.Timestamp; import java.time.LocalDate; import java.time.LocalDateTime; -import java.time.ZoneId; -import java.util.Date; import java.util.List; import java.util.UUID; import java.util.stream.Collectors; @@ -71,16 +65,6 @@ public class TSBizDissentServiceImpl extends ServiceImpl selectbizDissentList(TSBizDissent tsBizDissentModel) { @@ -123,75 +107,21 @@ public class TSBizDissentServiceImpl extends ServiceImpl() - .set(TSAbnList::getOperatestatus, "1") - .set(TSAbnList::getRemSponsor, null) - .set(TSAbnList::getRemdate, null) - .set(TSAbnList::getRemreasons, null) - .set(TSAbnList::getRemexcpres, null) - .set(TSAbnList::getRemDecorg, null) - .set(TSAbnList::getReDecorg, null) - .set(TSAbnList::getRemRemark, null) - .set(TSAbnList::getLauptime, LocalDateTime.now()) - .eq(TSAbnList::getAbnlistid, tsAbnList.getAbnlistid())); + .set(TSAbnList::getOperatestatus, "1") + .set(TSAbnList::getRemSponsor, null) + .set(TSAbnList::getRemdate, null) + .set(TSAbnList::getRemreasons, null) + .set(TSAbnList::getRemexcpres, null) + .set(TSAbnList::getRemDecorg, null) + .set(TSAbnList::getReDecorg, null) + .set(TSAbnList::getRemRemark, null) + .set(TSAbnList::getLauptime, LocalDateTime.now()) + .eq(TSAbnList::getAbnlistid, tsAbnList.getAbnlistid())); } else { // 列入经营异常异议 tsAbnList.setOperatestatus("2");//撤销 tsAbnList.setLauptime(LocalDateTime.now()); abnListService.updateById(tsAbnList); tsBizDissentModel.setStatus("2"); - -// // 第一步:用tsAbnListModel的主键查询TSBizSpeList信息 -// LambdaQueryWrapper speListWrapper = new LambdaQueryWrapper<>(); -// speListWrapper.eq(TSBizSpeList::getSpelistid, tsAbnList.getAbnlistid()); -// TSBizSpeList tsBizSpeList = tsBizSpeListService.getOne(speListWrapper); -// -// if (tsBizSpeList != null && tsBizSpeList.getToIncludeId() != null) { -// // 获取Toincludeabn信息 -// Toincludeabn toincludeabn = toincludeabnService.getById(tsBizSpeList.getToIncludeId()); -// -// // 第二步:如果Toincludeabn的字段dataFrom等于2 -// if (toincludeabn != null && "2".equals(toincludeabn.getDataFrom())) { -// // 第三步:查询AICRIS.RANINSRESULT,用Toincludeabn的dataFromId作为resultId查询对应的数据 -// LambdaQueryWrapper ranInsWrapper = new LambdaQueryWrapper<>(); -// ranInsWrapper.eq(RanInsResult::getResultId, toincludeabn.getDataFromId()); -// RanInsResult ranInsResult = ranInsResultMapper.selectOne(ranInsWrapper); -// -// // 更新RanInsResult的pubexpdate字段的值为当前时间 -// if (ranInsResult != null) { -// ranInsResultMapper.updatePubexpdateToNow(ranInsResult.getResultId()); -// -// // 第四步:新增一条Drraninsrescre的数据插入到数据库中 -// Drraninsrescre drraninsrescre = new Drraninsrescre(); -// drraninsrescre.setCreId(UUID.randomUUID().toString()); -// drraninsrescre.setCheckResId(ranInsResult.getResultId()); -// drraninsrescre.setEntName(tsBizSpeList.getEntname()); -// drraninsrescre.setPripid(ranInsResult.getPripid()); -// drraninsrescre.setUniScid(ranInsResult.getUniScid()); -// -// TSBizRemList tsBizRemListModel = bizRemListService.getOne(new LambdaQueryWrapper().eq(TSBizRemList::getAbnlistid, tsAbnList.getAbnlistid()) -// .eq(TSBizRemList::getHandleStatus, "2")); -// // 类型转换:LocalDateTime转Date -// if (tsBizRemListModel.getApplyTime() != null) { -// try { -// long millis = tsBizRemListModel.getApplyTime().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli(); -// drraninsrescre.setRepairDate(new Date(millis)); -// } catch (Exception e) { -// // 如果转换失败,使用当前时间 -// drraninsrescre.setRepairDate(new Date()); -// } -// } -// drraninsrescre.setRepAuth(tsAbnList.getDecorg()); -// drraninsrescre.setRepAuthCn(tsAbnList.getIntoDecorg()); -// drraninsrescre.setRepDate(new Date()); -// drraninsrescre.setRepState("2"); // 已修复 -// drraninsrescre.setEndRea(tsAbnList.getRemreasons()); -// drraninsrescre.setSExtFromnode("440000"); -// drraninsrescre.setSExtDatatime(new Timestamp(System.currentTimeMillis())); -// -// drraninsrescreService.save(drraninsrescre); -// } -// } -// } - } } tsWritModel.setWritstype(worgNoType); diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/TSBizRemListServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/TSBizRemListServiceImpl.java index 0b3b4a2..d32ac87 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/TSBizRemListServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/abnormal/service/impl/TSBizRemListServiceImpl.java @@ -6,19 +6,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.chinaweal.aiccs.aiccs.abnormal.entity.*; import com.chinaweal.aiccs.aiccs.abnormal.mapper.TSBizRemListMapper; import com.chinaweal.aiccs.aiccs.abnormal.service.*; - -import com.chinaweal.aiccs.aiccs.abnormal.entity.TSBizSpeList; -import com.chinaweal.aiccs.aiccs.abnormal.service.TSBizSpeListService; -import com.chinaweal.aiccs.aicris.forgiveprudent.entity.RanInsResult; -import com.chinaweal.aiccs.aiccs.abnormal.entity.Drraninsrescre; -import com.chinaweal.aiccs.aiccs.abnormal.entity.Toincludeabn; -import com.chinaweal.aiccs.aiccs.abnormal.service.ToincludeabnService; - -import java.sql.Timestamp; -import java.time.ZoneId; -import java.time.LocalDateTime; -import java.util.Date; -import java.time.LocalDate; import com.chinaweal.aiccs.aiccs.auditing.entity.TSOpinion; import com.chinaweal.aiccs.aiccs.auditing.mapper.TSOpinionMapper; import com.chinaweal.aiccs.aiccs.auditing.service.TSOpinionService; @@ -62,7 +49,6 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.io.File; -import java.sql.Timestamp; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.Month; @@ -72,10 +58,7 @@ import java.util.List; import java.util.Map; import java.util.UUID; -import static cn.afterturn.easypoi.excel.entity.enmus.CellValueType.Date; import static com.chinaweal.aiccs.common.base.controller.BaseController.getLoginUser; -import com.chinaweal.aiccs.aicris.forgiveprudent.mapper.RanInsResultMapper; -import com.chinaweal.aiccs.aiccs.abnormal.service.DrraninsrescreService; /** *

@@ -139,19 +122,6 @@ public class TSBizRemListServiceImpl extends ServiceImpl bizRemListModelList, TSOpinion opinionModel, String nextNodeID, String[] nextPerformerids, String[] nextPerformerNames) { try { @@ -314,73 +284,11 @@ public class TSBizRemListServiceImpl extends ServiceImpl speListWrapper = new LambdaQueryWrapper<>(); - speListWrapper.eq(TSBizSpeList::getSpelistid, tsAbnListModel.getAbnlistid()); - TSBizSpeList tsBizSpeList = tsBizSpeListService.getOne(speListWrapper); - - if (tsBizSpeList != null && tsBizSpeList.getToIncludeId() != null) { - // 获取Toincludeabn信息 - Toincludeabn toincludeabn = toincludeabnService.getById(tsBizSpeList.getToIncludeId()); - - // 第二步:如果Toincludeabn的字段dataFrom等于2 - if (toincludeabn != null && "2".equals(toincludeabn.getDataFrom())) { - // 第三步:查询AICRIS.RANINSRESULT,用Toincludeabn的dataFromId作为resultId查询对应的数据 - LambdaQueryWrapper ranInsWrapper = new LambdaQueryWrapper<>(); - ranInsWrapper.eq(RanInsResult::getResultId, toincludeabn.getDataFromId()); - RanInsResult ranInsResult = ranInsResultMapper.selectOne(ranInsWrapper); - - // 更新RanInsResult的pubexpdate字段的值为当前时间 - if (ranInsResult != null) { - ranInsResultMapper.updatePubexpdateToNow(ranInsResult.getResultId()); - - // 第四步:新增一条Drraninsrescre的数据插入到数据库中 - Drraninsrescre drraninsrescre = new Drraninsrescre(); - drraninsrescre.setCreId(UUID.randomUUID().toString()); - drraninsrescre.setCheckResId(ranInsResult.getResultId()); - drraninsrescre.setEntName(tsBizSpeList.getEntname()); - drraninsrescre.setPripid(ranInsResult.getPripid()); - drraninsrescre.setUniScid(ranInsResult.getUniScid()); - - // 类型转换:LocalDateTime转Date - if (tsBizRemListModel.getApplyTime() != null) { - try { - long millis = tsBizRemListModel.getApplyTime().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli(); - drraninsrescre.setRepairDate(new Date(millis)); - } catch (Exception e) { - // 如果转换失败,使用当前时间 - drraninsrescre.setRepairDate(new Date()); - } - } - drraninsrescre.setRepAuth(tsAbnListModel.getDecorg()); - drraninsrescre.setRepAuthCn(tsAbnListModel.getIntoDecorg()); - drraninsrescre.setRepDate(new Date()); - drraninsrescre.setRepState("1"); // 已修复 - drraninsrescre.setEndRea(tsAbnListModel.getRemreasons()); - drraninsrescre.setSExtFromnode("440000"); - drraninsrescre.setSExtDatatime(new Timestamp(System.currentTimeMillis())); - - drraninsrescreService.save(drraninsrescre); - } - } - } - - } if (FlowUtil.EXPTLISTWORKFLOW_OVEREXPTLIST.equals(nextNodeID)) { tsBizRemListModel.setApprovaldate(now); //核准时间 @@ -920,7 +828,7 @@ public class TSBizRemListServiceImpl extends ServiceImpl0前进 @@ -954,8 +862,8 @@ public class TSBizRemListServiceImpl extends ServiceImpl @@ -119,10 +116,6 @@ public class TSBizSpeListServiceImpl extends ServiceImpl bizSpeList) { if (StringUtils.isBlank(taskListModel.getTasklistid())) { @@ -223,7 +216,7 @@ public class TSBizSpeListServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(RanInsResult::getResultId, includeAbn.getDataFromId()); - - RanInsResult ranInsResult = ranInsResultMapper.selectOne(queryWrapper); - - // 第四步:如果查到RanInsResult,只更新其pubexpdate字段为null - if (ranInsResult != null) { - ranInsResultMapper.updatePubexpdateToNull(ranInsResult.getResultId()); - } - //当只有地址列异时才需要记录线索来源 - if ("4".equals(includeAbn.getIncludeType())) { - tsAbnListModel.setClueType("DR_RANINSRES"); - tsAbnListModel.setClueId(includeAbn.getDataFromId()); - } - }else if ("3".equals(includeAbn.getDataFrom())) {//一码联查 - - // 第三步:查询AICRIS.RANINSRESULT表,用Toincludeabn的dataFromId作为resultId查询对应数据 - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(RanInsResult::getResultId, includeAbn.getDataFromId()); - - RanInsResult ranInsResult = ranInsResultMapper.selectOne(queryWrapper); - - // 第四步:如果查到RanInsResult,只更新其pubexpdate字段为null - if (ranInsResult != null) { - ranInsResultMapper.updatePubexpdateToNull(ranInsResult.getResultId()); - } - - if ("4".equals(includeAbn.getIncludeType())) { - tsAbnListModel.setClueType("E_PUB_SPOTCHECK"); - tsAbnListModel.setClueId(includeAbn.getDataFromId()); - } - } - } } - - - // each.setApprovaldate(LocalDate.now());//核准日期 // each.setStatus("2"); // 9 受理中、1 审批中、2 已通过、3 不通过 // updateById(each); @@ -1359,7 +1309,7 @@ public class TSBizSpeListServiceImpl extends ServiceImpl> epriPersonList = eBaseinfoService.queryEpriPersonList(each.getPripid()); // if (epriPersonList.size() > 0) { // Map epriPerson = epriPersonList.get(0); diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/asyncTask/RevokeAsyncTask.java b/src/main/java/com/chinaweal/aiccs/aiccs/asyncTask/RevokeAsyncTask.java index 435def5..21d8494 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/asyncTask/RevokeAsyncTask.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/asyncTask/RevokeAsyncTask.java @@ -91,7 +91,7 @@ public class RevokeAsyncTask { .eq(Tswrittemplate::getIsTemplate, "0") .eq(Tswrittemplate::getWritsType, WorkNoUtil.WORKNOTYPE_32); Tswrittemplate tswrittemplate = tswrittemplateService.getOne(wrapper); - String content = tswrittemplate != null ? tswrittemplate.getContent() : ""; + String content = tswrittemplate.getContent(); String areaName = ConstantsUtil.getAreaName(userOrgCode); String decOrgName = gzaiccodeService.getNameByCode(userOrgCode); @@ -99,7 +99,7 @@ public class RevokeAsyncTask { map.put("noAttach", "noAttach"); Integer total = list.size(); Integer count = 0; // 初始化 count 为 0 - int maxRetries = 20; // 保持原有的最大重试次数20次 + int maxRetries = 50; // 增加最大重试次数 int retryCount = 0; // 当前重试次数 List failedEntNames = new ArrayList<>(); // 记录失败的企业名 Map enterpriseRetryCounts = new HashMap<>(); // 记录每个企业的重试次数 @@ -145,17 +145,14 @@ public class RevokeAsyncTask { continue; } - BizRevEnt bizRevEntModel = null; - TSWrit tsWritModel = null; - TSAttachment attachmentModel = null; - try { + map.put("htmlContent", content); - bizRevEntModel = new BizRevEnt(); + BizRevEnt bizRevEntModel = new BizRevEnt(); bizRevEntModel.setRevlistid(bizRevEnt.getRevlistid()); // 生成文书号 - tsWritModel = new TSWrit(); + TSWrit tsWritModel = new TSWrit(); tsWritModel.setWritsid(UUID.randomUUID().toString()); String workNoType = WorkNoUtil.WORKNOTYPE_32; tsWritModel.setBizseq(bizseq); @@ -180,37 +177,19 @@ public class RevokeAsyncTask { } else { path = "static" + File.separator + "template" + File.separator + "hearingNoticeNS.docx"; } - - String pdfPath = null; - boolean pdfGenerated = false; - try { - pdfPath = createFileService.createPdf(bizseq, fileName, "13", path, map); - pdfGenerated = true; - } catch (Exception pdfEx) { - LOGGER.error("业务号{}的企业{}生成PDF文件时发生异常:", bizseq, bizRevEnt.getEntname(), pdfEx); - throw new RuntimeException("PDF文件生成失败: " + pdfEx.getMessage(), pdfEx); - } finally { - // 无论成功与否都要清理临时变量 - fileName = null; - path = null; - } + String pdfPath = createFileService.createPdf(bizseq, fileName, "13", path, map); // 验证PDF文件是否成功生成 - if (!pdfGenerated || pdfPath == null || pdfPath.trim().isEmpty()) { - pdfPath = null; + if (pdfPath == null || pdfPath.trim().isEmpty()) { throw new RuntimeException("PDF文件生成失败,返回路径为空"); } - // 清理临时变量 - fileName = null; - path = null; - // 更新文书、企业、附件信息 tsWritModel.setPath(pdfPath); bizRevEntModel.setIshearingpublish("1"); bizRevEntModel.setHearingpublishdate(nowDate); - attachmentModel = new TSAttachment(); + TSAttachment attachmentModel = new TSAttachment(); attachmentModel.setAttachmentid(bizRevEnt.getAttachmentid()); attachmentModel.setTemppath(pdfPath); @@ -226,11 +205,6 @@ public class RevokeAsyncTask { enterpriseRetryCounts.put(bizRevEnt.getPripid(), entRetryCount + 1); LOGGER.error("业务号{}的企业{}处理听证告知书时出错(第{}次重试):", bizseq, bizRevEnt.getEntname(), entRetryCount + 1, e); - } finally { - // 显式清理对象引用,帮助GC - bizRevEntModel = null; - tsWritModel = null; - attachmentModel = null; } } @@ -238,18 +212,10 @@ public class RevokeAsyncTask { if (count < total) { // 计算剩余未处理的企业数 int remaining = total - count; - // 根据重试次数和剩余数量动态调整等待时间,减少等待时间避免长时间占用内存 - long waitTime = Math.min(3000, 500 + (retryCount * 50) + (remaining * 100)); // 最长等待3秒 + // 根据重试次数和剩余数量动态调整等待时间 + long waitTime = Math.min(10000, 3000 + (retryCount * 200) + (remaining * 500)); // 最长等待10秒 LOGGER.info("仍有 {} 家企业未处理,等待 {} 毫秒后重试", remaining, waitTime); Thread.sleep(waitTime); - - // 清理map中的临时数据,减少内存占用 - map.remove("htmlContent"); - map.remove("writsno"); - map.remove("areaName"); - map.remove("entname"); - map.remove("addr"); - map.remove("pripid"); } } @@ -265,18 +231,6 @@ public class RevokeAsyncTask { LOGGER.info("》》》》》》》》》》》》业务号为{}生成听证告知书附件总耗时:{}《《《《《《《《《", bizseq, System.currentTimeMillis() - timeMilles); - - // 清理大对象引用,帮助GC - list = null; - map = null; - wrapper = null; - tswrittemplate = null; - content = null; - areaName = null; - decOrgName = null; - failedEntNames = null; - enterpriseRetryCounts = null; - caseDB = null; } catch (Exception e) { LOGGER.error("业务号{}异步生成听证告知书整体流程异常:", bizseq, e); } @@ -302,13 +256,13 @@ public class RevokeAsyncTask { .eq(Tswrittemplate::getIsTemplate, "0") .eq(Tswrittemplate::getWritsType, WorkNoUtil.WORKNOTYPE_33); Tswrittemplate tswrittemplate = tswrittemplateService.getOne(wrapper); - String content = tswrittemplate != null ? tswrittemplate.getContent() : ""; + String content = tswrittemplate.getContent(); String areaName = ConstantsUtil.getAreaName(userOrgCode); map.put("noAttach", "noAttach"); Integer total = list.size(); Integer count = 0; // 初始化已处理企业数 - int maxRetries = 20; // 保持原有的最大重试次数20次 + int maxRetries = 50; // 增加最大重试次数 int retryCount = 0; // 当前重试次数 List failedEntNames = new ArrayList<>(); // 记录失败的企业名 Map enterpriseRetryCounts = new HashMap<>(); // 记录每个企业的重试次数 @@ -348,21 +302,17 @@ public class RevokeAsyncTask { continue; } - BizRevEnt bizRevEntModel = null; - TSWrit tsWritModel = null; - TSAttachment attachmentModel = null; - Revokelist revokelistModel = null; - EBaseinfo eBaseinfo = null; - try { - bizRevEntModel = new BizRevEnt(); + + BizRevEnt bizRevEntModel = new BizRevEnt(); bizRevEntModel.setRevlistid(bizRevEnt.getRevlistid()); map.put("htmlContent", content); // 获取企业基本信息 - LambdaQueryWrapper eBaseinfoWrapper = new LambdaQueryWrapper<>(); - eBaseinfoWrapper.eq(EBaseinfo::getPripid, bizRevEnt.getPripid()); - eBaseinfo = eBaseinfoService.getOne(eBaseinfoWrapper); + EBaseinfo eBaseinfo = eBaseinfoService.getOne( + new LambdaQueryWrapper() + .eq(EBaseinfo::getPripid, bizRevEnt.getPripid()) + ); if (eBaseinfo == null) { throw new RuntimeException("未找到企业基本信息,pripid: " + bizRevEnt.getPripid()); } @@ -378,7 +328,7 @@ public class RevokeAsyncTask { map.put("areaName", areaName); // 生成文书 - tsWritModel = new TSWrit(); + TSWrit tsWritModel = new TSWrit(); tsWritModel.setWritsid(UUID.randomUUID().toString()); String workNoType = WorkNoUtil.WORKNOTYPE_33; // 批量吊销行政处罚决定书 tsWritModel.setBizseq(bizseq); @@ -395,24 +345,10 @@ public class RevokeAsyncTask { String path = (!userOrgCode.equals("440115") && !userOrgCode.equals("440110")) ? "static" + File.separator + "template" + File.separator + "punishDecision.docx" : "static" + File.separator + "template" + File.separator + "punishDecisionNS.docx"; - - String pdfPath = null; - boolean pdfGenerated = false; - try { - pdfPath = createFileService.createPdf(bizseq, fileName, "14", path, map); - pdfGenerated = true; - } catch (Exception pdfEx) { - LOGGER.error("业务号{}的企业{}生成PDF文件时发生异常:", bizseq, bizRevEnt.getEntname(), pdfEx); - throw new RuntimeException("PDF文件生成失败: " + pdfEx.getMessage(), pdfEx); - } finally { - // 无论成功与否都要清理临时变量 - fileName = null; - path = null; - } + String pdfPath = createFileService.createPdf(bizseq, fileName, "14", path, map); // 验证PDF文件是否成功生成 - if (!pdfGenerated || pdfPath == null || pdfPath.trim().isEmpty()) { - pdfPath = null; + if (pdfPath == null || pdfPath.trim().isEmpty()) { throw new RuntimeException("PDF文件生成失败,返回路径为空"); } @@ -421,11 +357,11 @@ public class RevokeAsyncTask { bizRevEntModel.setIsdecisionpublish("1"); // 标记为已生成决定书 bizRevEntModel.setDecisionpublishdate(nowDate); - attachmentModel = new TSAttachment(); + TSAttachment attachmentModel = new TSAttachment(); attachmentModel.setAttachmentid(bizRevEnt.getAttachmentid()); attachmentModel.setTemppath(pdfPath); - revokelistModel = new Revokelist(); + Revokelist revokelistModel = new Revokelist(); revokelistModel.setRevlistid(bizRevEnt.getRevlistid()); revokelistModel.setWritsid(tsWritModel.getWritsid()); @@ -441,13 +377,6 @@ public class RevokeAsyncTask { enterpriseRetryCounts.put(bizRevEnt.getPripid(), entRetryCount + 1); LOGGER.error("业务号{}的企业{}处理处罚决定书时出错(第{}次重试):", bizseq, bizRevEnt.getEntname(), entRetryCount + 1, e); - } finally { - // 显式清理对象引用,帮助GC - bizRevEntModel = null; - tsWritModel = null; - attachmentModel = null; - revokelistModel = null; - eBaseinfo = null; } } @@ -455,23 +384,10 @@ public class RevokeAsyncTask { if (count < total) { // 计算剩余未处理的企业数 int remaining = total - count; - // 根据重试次数和剩余数量动态调整等待时间,减少等待时间避免长时间占用内存 - long waitTime = Math.min(3000, 500 + (retryCount * 50) + (remaining * 100)); // 最长等待3秒 + // 根据重试次数和剩余数量动态调整等待时间 + long waitTime = Math.min(10000, 3000 + (retryCount * 200) + (remaining * 500)); // 最长等待10秒 LOGGER.info("仍有 {} 家企业未处理,等待 {} 毫秒后重试", remaining, waitTime); Thread.sleep(waitTime); - - // 清理map中的临时数据,减少内存占用 - map.remove("htmlContent"); - map.remove("entName"); - map.remove("uniscid"); - map.remove("lerep"); - map.remove("cerno"); - map.remove("estdate"); - map.remove("entCerName"); - map.remove("dom"); - map.remove("pripid"); - map.remove("writsno"); - map.remove("areaName"); } } @@ -488,16 +404,6 @@ public class RevokeAsyncTask { LOGGER.info("》》》》》》》》》》》》业务号为{}生成决定书附件总耗时:{}《《《《《《《《《", bizseq, System.currentTimeMillis() - timeMilles); - - // 清理大对象引用,帮助GC - list = null; - map = null; - wrapper = null; - tswrittemplate = null; - content = null; - areaName = null; - failedEntNames = null; - enterpriseRetryCounts = null; } catch (Exception e) { LOGGER.error("业务号{}异步生成决定书附件任务异常:", bizseq, e); // 不抛出InterruptedException,让方法继续执行推送任务 diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/market/controller/InitController.java b/src/main/java/com/chinaweal/aiccs/aiccs/market/controller/InitController.java index 8709849..0169460 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/market/controller/InitController.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/market/controller/InitController.java @@ -51,11 +51,11 @@ public class InitController { 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(300), namedThreadFactory); - @PreDestroy - public void destroy() { - statsThreadPool.shutdown(); - DisableEntListManage.timer.cancel(); - } +// @PreDestroy +// public void contextDestroyed(ServletContextEvent sce) { +// statsThreadPool.shutdown(); +// DisableEntListManage.timer.cancel(); +// } @Resource private InitService initService; diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/market/service/impl/TSUsualInspectServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/market/service/impl/TSUsualInspectServiceImpl.java index 7e9a483..0c4d158 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/market/service/impl/TSUsualInspectServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/market/service/impl/TSUsualInspectServiceImpl.java @@ -240,7 +240,7 @@ public class TSUsualInspectServiceImpl extends BaseServiceImpl { List selectBizEntAttachList(@Param("bizseq") String bizseq, @Param("attachType")String attachType); - List selectBizEntAttachListWithPagination(@Param("bizseq") String bizseq, @Param("attachType")String attachType, @Param("offset") int offset, @Param("limit") int limit); - - int countBizEntAttach(@Param("bizseq") String bizseq, @Param("attachType")String attachType); - // List selectFirstEnt(String bizseq); } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/BizRevEntService.java b/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/BizRevEntService.java index 115b9d2..4e2c5d7 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/BizRevEntService.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/BizRevEntService.java @@ -30,23 +30,5 @@ public interface BizRevEntService extends BaseService { */ List getBizEntAttachList(String bizseq, String attachType); - /** - * 分页获取业务主体及生成的附件关联列表 - * @param bizseq - * @param attachType - * @param offset - * @param limit - * @return - */ - List getBizEntAttachListWithPagination(String bizseq, String attachType, int offset, int limit); - - /** - * 统计业务主体及生成的附件关联列表数量 - * @param bizseq - * @param attachType - * @return - */ - int countBizEntAttach(String bizseq, String attachType); - boolean insertOrUpdateBatch(List list); } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/impl/BizRevEntServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/impl/BizRevEntServiceImpl.java index cc689f6..5c5ce12 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/impl/BizRevEntServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/impl/BizRevEntServiceImpl.java @@ -46,14 +46,4 @@ public class BizRevEntServiceImpl extends BaseServiceImpl getBizEntAttachList(String bizseq, String attachType) { return baseMapper.selectBizEntAttachList(bizseq,attachType); } - - @Override - public List getBizEntAttachListWithPagination(String bizseq, String attachType, int offset, int limit) { - return baseMapper.selectBizEntAttachListWithPagination(bizseq, attachType, offset, limit); - } - - @Override - public int countBizEntAttach(String bizseq, String attachType) { - return baseMapper.countBizEntAttach(bizseq, attachType); - } } diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/impl/CreateFileServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/impl/CreateFileServiceImpl.java index 7c6ed74..eba669d 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/impl/CreateFileServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/revoke/service/impl/CreateFileServiceImpl.java @@ -796,12 +796,15 @@ public class CreateFileServiceImpl implements CreateFileService { String title = path.substring(path.lastIndexOf(File.separator) + 1,path.lastIndexOf(Constant.DOT)); String ext = ".docx"; String urlFileName = UUID.randomUUID().toString() + ext; - - ByteArrayOutputStream wordOs = null; try { - wordOs = new ByteArrayOutputStream(); // word输出流 + ByteArrayOutputStream wordOs = new ByteArrayOutputStream(); // word输出流 String resource = CreateFileServiceImpl.class.getClassLoader().getResource(path).getPath(); +// String realPath = CommonConfig.getUploadPath(); +// realPath += File.separator + bizseq; +// File dir = new File(realPath + File.separator + title); +// dir.mkdirs(); + //配置 // html内容处理 String htmlContent = map.get("htmlContent").toString(); @@ -827,29 +830,15 @@ public class CreateFileServiceImpl implements CreateFileService { } map.put("htmlContent",list); String wordpath = bizseq + File.separator + title + File.separator + urlFileName; - - // 使用try-with-resources确保资源正确关闭 - try (XWPFTemplate template = XWPFTemplate.compile(resource)) { - template.render(map).write(wordOs); - } - + XWPFTemplate.compile(resource).render(map).write(wordOs); FileStorageService fileStorageService = SpringUtil.getBean(FileStorageService.class); fileStorageService.writeFromStream(CommonConfig.getUploadPath() + File.separator + wordpath, new ByteArrayInputStream(wordOs.toByteArray())); +// XWPFTemplate.compile(resource).render(map).writeToFile(realPath + File.separator + title + File.separator + urlFileName); } catch (Exception e) { e.printStackTrace(); throw new BusinessException("附件生成出错"); - } finally { - // 确保流被正确关闭以释放内存 - if (wordOs != null) { - try { - wordOs.close(); - } catch (Exception e) { - log.warn("关闭ByteArrayOutputStream时出错", e); - } - } } - if (StringUtils.isBlank(fileName)) { fileName = title + ext; }else if(fileName.lastIndexOf(Constant.DOT) > -1){ @@ -915,10 +904,8 @@ public class CreateFileServiceImpl implements CreateFileService { String title = path.substring(path.lastIndexOf(File.separator) + 1,path.lastIndexOf(Constant.DOT)); String ext = ".pdf"; String urlFileName = UUID.randomUUID().toString() + ext; - - ByteArrayOutputStream wordOs = null; try { - wordOs = new ByteArrayOutputStream(); // word输出流 + ByteArrayOutputStream wordOs = new ByteArrayOutputStream(); // word输出流 String resource = CreateFileServiceImpl.class.getClassLoader().getResource(path).getPath(); //配置 @@ -946,28 +933,13 @@ public class CreateFileServiceImpl implements CreateFileService { } map.put("htmlContent",list); String pdfPath = CommonConfig.getUploadPath() + File.separator + "BatchRevocation" + File.separator + bizseq + File.separator + title + File.separator + urlFileName; - - // 使用try-with-resources确保资源正确关闭 - try (XWPFTemplate template = XWPFTemplate.compile(resource)) { - template.render(map).write(wordOs); - } - + XWPFTemplate.compile(resource).render(map).write(wordOs); PdfUtil.convertDocx2Pdf(wordOs,pdfPath); } catch (Exception e) { e.printStackTrace(); throw new BusinessException("批吊附件文书pdf上传失败"); - } finally { - // 确保流被正确关闭以释放内存 - if (wordOs != null) { - try { - wordOs.close(); - } catch (Exception e) { - log.warn("关闭ByteArrayOutputStream时出错", e); - } - } } - if (StringUtils.isBlank(fileName)) { fileName = urlFileName; }else if(fileName.lastIndexOf(Constant.DOT) > -1){ @@ -1029,9 +1001,8 @@ public class CreateFileServiceImpl implements CreateFileService { @Override public ServletOutputStream createPdfStream(String bizseq, String fileName, String attachtype, String path, Map map, ServletOutputStream os) { if (StringUtils.isNotBlank(bizseq)) { - ByteArrayOutputStream wordOs = null; try { - wordOs = new ByteArrayOutputStream(); // word输出流 + ByteArrayOutputStream wordOs = new ByteArrayOutputStream(); // word输出流 String resource = CreateFileServiceImpl.class.getClassLoader().getResource(path).getPath(); //配置 @@ -1058,25 +1029,11 @@ public class CreateFileServiceImpl implements CreateFileService { } } map.put("htmlContent", list); - - // 使用try-with-resources确保资源正确关闭 - try (XWPFTemplate template = XWPFTemplate.compile(resource)) { - template.render(map).write(wordOs); - } - + XWPFTemplate.compile(resource).render(map).write(wordOs); ServletOutputStream pdfOs = PdfUtil.convertDocx2PdfStream(wordOs, os); return pdfOs; } catch (Exception e) { e.printStackTrace(); - } finally { - // 确保流被正确关闭以释放内存 - if (wordOs != null) { - try { - wordOs.close(); - } catch (Exception e) { - log.warn("关闭ByteArrayOutputStream时出错", e); - } - } } } return null; @@ -1084,104 +1041,13 @@ public class CreateFileServiceImpl implements CreateFileService { @Override public void createDocxWithModel(String bizseq, String fileName, String attachtype, String path, Map map) { - if(StringUtils.isNotBlank(bizseq)) { - // 标题 - String title = path.substring(path.lastIndexOf(File.separator) + 1,path.lastIndexOf(Constant.DOT)); - String ext = ".docx"; - String urlFileName = UUID.randomUUID().toString() + ext; - - ByteArrayOutputStream wordOs = null; - try { - wordOs = new ByteArrayOutputStream(); // word输出流 - String resource = CreateFileServiceImpl.class.getClassLoader().getResource(path).getPath(); - - //配置 - // html内容处理 - String htmlContent = map.get("htmlContent").toString(); - Document htmldoc = Jsoup.parse(htmlContent); - Elements links = htmldoc.getElementsByTag("p"); - ArrayList list = new ArrayList<>(); - for (Element link : links) { - if(link.getElementsByAttributeValue("style","text-align:right;").size() > 0){ - Elements value = link.getElementsByAttributeValue("style", "text-align:right;"); - HashMap map2 = new HashMap<>(); - map2.put("rightContent",value.text().trim()); - list.add(map2); - }else { - HashMap map1 = new HashMap<>(); - map1.put("pragraph", link.text().trim()); - list.add(map1); - } - } - map.put("htmlContent",list); - - HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy(); - Configure config = Configure.newBuilder() - .bind("nameList", policy).build(); - - String wordpath = bizseq + File.separator + title + File.separator + urlFileName; - - // 使用try-with-resources确保资源正确关闭 - try (XWPFTemplate template = XWPFTemplate.compile(resource,config)) { - template.render(map).write(wordOs); - } - - String filePath = CommonConfig.getUploadPath() + File.separator + "BatchRevocation" + File.separator + wordpath; - // 案件终结报告可能存在多次修改更新,更新时覆盖原来的文件,使用map的oldPath - if(map.get("oldPath") != null && StringUtils.isNotEmpty(map.get("oldPath").toString())){ - filePath = map.get("oldPath").toString(); - } - fileStorageService.writeFromStream(filePath, new ByteArrayInputStream(wordOs.toByteArray())); - if( map.get("noAttach") != null && map.get("noAttach").toString().equals("noAttach")){ - return; - } - } catch (Exception e) { - e.printStackTrace(); - } finally { - // 确保流被正确关闭以释放内存 - if (wordOs != null) { - try { - wordOs.close(); - } catch (Exception e) { - log.warn("关闭ByteArrayOutputStream时出错", e); - } - } - } - - if (StringUtils.isBlank(fileName)) { - fileName = title + ext; - }else if(fileName.lastIndexOf(Constant.DOT) > -1){ - fileName = fileName.substring(0, fileName.lastIndexOf(Constant.DOT)) + ext; - }else { - fileName = fileName + ext; - } - String tempPath = CommonConfig.getUploadPath() + File.separator + "BatchRevocation" + File.separator + bizseq + File.separator + title + File.separator + urlFileName; - TSAttachment tsAttachmentModel = new TSAttachment(); - tsAttachmentModel.setCreatetype("1");// 文件为系统生成 - tsAttachmentModel.setBizseq(bizseq); - tsAttachmentModel.setPripid(StringUtils.EMPTY); - tsAttachmentModel.setFileext(ext); - tsAttachmentModel.setFilename(fileName); - tsAttachmentModel.setTemppath(tempPath); - tsAttachmentModel.setUploaddate(LocalDate.now()); - tsAttachmentModel.setAttachtype(attachtype);// 审批表 - // 没有加上传者及id 要改 - attachmentService.save(tsAttachmentModel); - - } - } - - @Override - public void createCasePdfWithModel(String bizseq, String fileName, String attachtype, String path, Map map) { if(StringUtils.isNotBlank(bizseq)) { // 标题 String title = path.substring(path.lastIndexOf(File.separator) + 1,path.lastIndexOf(Constant.DOT)); - String ext = ".pdf"; + String ext = ".docx"; String urlFileName = UUID.randomUUID().toString() + ext; - - ByteArrayOutputStream wordOs = null; try { - wordOs = new ByteArrayOutputStream(); // word输出流 + ByteArrayOutputStream wordOs = new ByteArrayOutputStream(); // word输出流 String resource = CreateFileServiceImpl.class.getClassLoader().getResource(path).getPath(); //配置 @@ -1208,12 +1074,87 @@ public class CreateFileServiceImpl implements CreateFileService { Configure config = Configure.newBuilder() .bind("nameList", policy).build(); - String pdfPath = bizseq + File.separator + title + File.separator + urlFileName; +// XWPFTemplate.compile(resource).render(map).writeToFile(realPath + File.separator + title + File.separator + urlFileName); - // 使用try-with-resources确保资源正确关闭 - try (XWPFTemplate template = XWPFTemplate.compile(resource,config)) { - template.render(map).write(wordOs); + String wordpath = bizseq + File.separator + title + File.separator + urlFileName; + XWPFTemplate.compile(resource,config).render(map).write(wordOs); + String filePath = CommonConfig.getUploadPath() + File.separator + "BatchRevocation" + File.separator + wordpath; + // 案件终结报告可能存在多次修改更新,更新时覆盖原来的文件,使用map的oldPath + if(map.get("oldPath") != null && StringUtils.isNotEmpty(map.get("oldPath").toString())){ + filePath = map.get("oldPath").toString(); } + fileStorageService.writeFromStream(filePath, new ByteArrayInputStream(wordOs.toByteArray())); + if( map.get("noAttach") != null && map.get("noAttach").toString().equals("noAttach")){ + return; + } + } catch (Exception e) { + e.printStackTrace(); + } + if (StringUtils.isBlank(fileName)) { + fileName = title + ext; + }else if(fileName.lastIndexOf(Constant.DOT) > -1){ + fileName = fileName.substring(0, fileName.lastIndexOf(Constant.DOT)) + ext; + }else { + fileName = fileName + ext; + } + String tempPath = CommonConfig.getUploadPath() + File.separator + "BatchRevocation" + File.separator + bizseq + File.separator + title + File.separator + urlFileName; + TSAttachment tsAttachmentModel = new TSAttachment(); + tsAttachmentModel.setCreatetype("1");// 文件为系统生成 + tsAttachmentModel.setBizseq(bizseq); + tsAttachmentModel.setPripid(StringUtils.EMPTY); + tsAttachmentModel.setFileext(ext); + tsAttachmentModel.setFilename(fileName); + tsAttachmentModel.setTemppath(tempPath); + tsAttachmentModel.setUploaddate(LocalDate.now()); + tsAttachmentModel.setAttachtype(attachtype);// 审批表 + // 没有加上传者及id 要改 + attachmentService.save(tsAttachmentModel); + + } + } + + @Override + public void createCasePdfWithModel(String bizseq, String fileName, String attachtype, String path, Map map) { + if(StringUtils.isNotBlank(bizseq)) { + // 标题 + String title = path.substring(path.lastIndexOf(File.separator) + 1,path.lastIndexOf(Constant.DOT)); + String ext = ".pdf"; + String urlFileName = UUID.randomUUID().toString() + ext; + try { + ByteArrayOutputStream wordOs = new ByteArrayOutputStream(); // word输出流 + String resource = CreateFileServiceImpl.class.getClassLoader().getResource(path).getPath(); + + //配置 + // html内容处理 + String htmlContent = map.get("htmlContent").toString(); + Document htmldoc = Jsoup.parse(htmlContent); + Elements links = htmldoc.getElementsByTag("p"); + ArrayList list = new ArrayList<>(); + for (Element link : links) { + if(link.getElementsByAttributeValue("style","text-align:right;").size() > 0){ + Elements value = link.getElementsByAttributeValue("style", "text-align:right;"); + HashMap map2 = new HashMap<>(); + map2.put("rightContent",value.text().trim()); + list.add(map2); + }else { + HashMap map1 = new HashMap<>(); + map1.put("pragraph", link.text().trim()); + list.add(map1); + } + } + map.put("htmlContent",list); + +// HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy(); + + HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy(); + Configure config = Configure.newBuilder() +// .bind("htmlContent",htmlRenderPolicy) + .bind("nameList", policy).build(); + +// XWPFTemplate.compile(resource).render(map).writeToFile(realPath + File.separator + title + File.separator + urlFileName); + + String pdfPath = bizseq + File.separator + title + File.separator + urlFileName; + XWPFTemplate.compile(resource,config).render(map).write(wordOs); String filePath = CommonConfig.getUploadPath() + File.separator + "BatchRevocation" + File.separator + pdfPath; // 案件终结报告可能存在多次修改更新,更新时覆盖原来的文件,使用map的oldPath @@ -1227,17 +1168,7 @@ public class CreateFileServiceImpl implements CreateFileService { } catch (Exception e) { e.printStackTrace(); throw new BusinessException(e.getMessage()); - } finally { - // 确保流被正确关闭以释放内存 - if (wordOs != null) { - try { - wordOs.close(); - } catch (Exception e) { - log.warn("关闭ByteArrayOutputStream时出错", e); - } - } } - if (StringUtils.isBlank(fileName)) { fileName = title + ext; }else if(fileName.lastIndexOf(Constant.DOT) > -1){ @@ -1285,7 +1216,7 @@ public class CreateFileServiceImpl implements CreateFileService { .replaceAll(" ", " ") .replaceAll("\\n", "") .replaceAll("
", "\n"); - Document htmlDoc = Jsoup.parse(html); + org.jsoup.nodes.Document htmlDoc = Jsoup.parse(html); Elements nodes = htmlDoc.body().children(); XWPFParagraph xwpfParagraph = doc.createParagraph(); diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/controller/BizSerIllegalRemAppController.java b/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/controller/BizSerIllegalRemAppController.java index d11d967..8c857f8 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/controller/BizSerIllegalRemAppController.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/controller/BizSerIllegalRemAppController.java @@ -199,8 +199,8 @@ public class BizSerIllegalRemAppController { public RestResult> listYzwf(@RequestParam String uscc, String regNo) { LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); lqw.and(w -> w.eq(StringUtils.isNotBlank(uscc), TSSerIllegalList::getUniscid, uscc) - .or().eq(StringUtils.isNotBlank(regNo), TSSerIllegalList::getRegno, regNo) - ).and(w -> w.isNull(TSSerIllegalList::getRemdate)) + .or().eq(StringUtils.isNotBlank(regNo), TSSerIllegalList::getRegno, regNo) + ).and(w -> w.isNull(TSSerIllegalList::getRemdate)) .isNull(TSSerIllegalList::getRemdate) .orderByAsc(TSSerIllegalList::getAbntime); List list = tsSerIllegalListService.list(lqw); @@ -339,7 +339,7 @@ public class BizSerIllegalRemAppController { //根据主体机关和权限标识,分配对应部门,拿到对应的用户列表 TSSerIllegalList tsSerIllegalListModel = tsSerIllegalListService.getById(illegallistid); - List userIdList = iGzaiccodeService.byPermissionListHandleUserListYZ(tsSerIllegalListModel.getPripid(), + List userIdList = iGzaiccodeService.byPermissionListHandleUserList(tsSerIllegalListModel.getPripid(), "illegalRemoveAccept", tsSerIllegalListModel.getDecorg(), null).stream().map(AICUser::getPrimaryKey).collect(Collectors.toList()); if (userIdList == null || userIdList.isEmpty()) { log.error("分派失败,受理人列表为空,tsSerIllegalListModel为:{},权限为:{}", tsSerIllegalListModel, "illegalRemoveAccept"); @@ -535,7 +535,7 @@ public class BizSerIllegalRemAppController { result.put("illegalList",illegalLists);//严重违法失信企业信息 //根据主体机关和权限标识,分配对应部门,拿到对应的用户列表 - List userList = iGzaiccodeService.byPermissionListHandleUserListYZ(eBaseinfo.getPripid(), "illegalRemoveAccept", illegalList.getDecorg(), illegalList.getDecorgCn()); + List userList = iGzaiccodeService.byPermissionListHandleUserList(eBaseinfo.getPripid(), "illegalRemoveAccept", illegalList.getDecorg(), illegalList.getDecorgCn()); if (userList == null || userList.isEmpty()) { log.error("分派失败,受理人列表为空,illegalList为:{},权限为:{}", illegalList, "illegalRemoveAccept"); @@ -570,8 +570,8 @@ public class BizSerIllegalRemAppController { public RestResult listBizSerIllegalRemByPhoneOrName(@RequestParam String applicantidOrCerno, @RequestParam String phone, String name) { LambdaQueryWrapper lqwTbtr = Wrappers.lambdaQuery(); lqwTbtr.and(i -> i.eq(TSBizSerIllegalRem::getApplicantNo, phone) - .or().eq(StringUtils.isNotBlank(applicantidOrCerno), TSBizSerIllegalRem::getApplicantId, applicantidOrCerno) - .or().eq(StringUtils.isNotBlank(applicantidOrCerno), TSBizSerIllegalRem::getCerno, applicantidOrCerno)) + .or().eq(StringUtils.isNotBlank(applicantidOrCerno), TSBizSerIllegalRem::getApplicantId, applicantidOrCerno) + .or().eq(StringUtils.isNotBlank(applicantidOrCerno), TSBizSerIllegalRem::getCerno, applicantidOrCerno)) .like(StringUtils.isNotBlank(name), TSBizSerIllegalRem::getEntName, name) .isNotNull(TSBizSerIllegalRem::getBizSeq).ne(TSBizSerIllegalRem::getBizSeq,""); List tsBizSerIllegalRems = tsBizSerIllegalRemService.list(lqwTbtr); @@ -580,8 +580,8 @@ public class BizSerIllegalRemAppController { resultMap.put("TSBizSerIllegalRemList", tsBizSerIllegalRems); LambdaQueryWrapper lqwTbr=Wrappers.lambdaQuery(); lqwTbr.and(i -> i.eq(TSBizRemList::getApplicantNo, phone) - .or().eq(StringUtils.isNotBlank(applicantidOrCerno), TSBizRemList::getApplicantId, applicantidOrCerno) - .or().eq(StringUtils.isNotBlank(applicantidOrCerno), TSBizRemList::getCerno, applicantidOrCerno)) + .or().eq(StringUtils.isNotBlank(applicantidOrCerno), TSBizRemList::getApplicantId, applicantidOrCerno) + .or().eq(StringUtils.isNotBlank(applicantidOrCerno), TSBizRemList::getCerno, applicantidOrCerno)) .like(StringUtils.isNotBlank(name), TSBizRemList::getEntname, name) .isNotNull(TSBizRemList::getBizseq).ne(TSBizRemList::getBizseq,""); List tsBizRemLists = tsBizRemListService.list(lqwTbr); @@ -673,7 +673,7 @@ public class BizSerIllegalRemAppController { //根据主体机关和权限标识,分配对应部门,拿到对应的用户列表 tsSerIllegalListModel = tsSerIllegalListService.getById(illegallistid); - List userIdList = iGzaiccodeService.byPermissionListHandleUserListYZ(tsSerIllegalListModel.getPripid(), + List userIdList = iGzaiccodeService.byPermissionListHandleUserList(tsSerIllegalListModel.getPripid(), "illegalRemoveAccept", tsSerIllegalListModel.getDecorg(), null).stream().map(AICUser::getPrimaryKey).collect(Collectors.toList()); if (userIdList == null || userIdList.isEmpty()) { log.error("分派失败,受理人列表为空,tsSerIllegalListModel为:{},权限为:{}", tsSerIllegalListModel, "illegalRemoveAccept"); diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/controller/BizSerIllegalRemController.java b/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/controller/BizSerIllegalRemController.java index 403cb17..e4973d1 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/controller/BizSerIllegalRemController.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/controller/BizSerIllegalRemController.java @@ -359,7 +359,7 @@ public class BizSerIllegalRemController extends BaseController implements Servle @Transactional @RequestMapping(value = "/serIllegalRemTransfer.do") public RestResult serIllegalRemTransfer(HttpServletRequest request, String bizSerRemID, - String tasklistid, String transferOrg, String opinion){ + String tasklistid, String transferOrg, String opinion){ AICUser user = getLoginUser(request); if (user == null) return RestResult.error(ResultCode.USER_NOT_LOGGED_IN); Map resultMap = new HashMap<>(); @@ -504,7 +504,7 @@ public class BizSerIllegalRemController extends BaseController implements Servle // 存在转办记录的话,要更新转办记录的流程节点id LambdaQueryWrapper opinionWrapper = new LambdaQueryWrapper<>(); opinionWrapper.eq(TSOpinion::getBizseq, tsBizSerIllegalRemModel.getBizSeq()) - .eq(TSOpinion::getOpiniontype, "55"); + .eq(TSOpinion::getOpiniontype, "55"); List tsOpinions = opinionService.list(opinionWrapper); if (CollectionUtils.isNotEmpty(tsOpinions)) { for (TSOpinion each : tsOpinions) { @@ -688,7 +688,7 @@ public class BizSerIllegalRemController extends BaseController implements Servle String bizseq = tsBizSerIllegalRem.getBizSeq(); TSSerIllegalList illegalList = tsSerIllegalListService.getById(tsBizSerIllegalRem.getIllegalListID()); // 先获取所有有权限的人 - List userList = iGzaiccodeService.byPermissionListHandleUserListYZ(tsBizSerIllegalRem.getPriPID(), "illegalRemoveAccept", illegalList.getDecorg(), illegalList.getDecorgCn()); + List userList = iGzaiccodeService.byPermissionListHandleUserList(tsBizSerIllegalRem.getPriPID(), "illegalRemoveAccept", illegalList.getDecorg(), illegalList.getDecorgCn()); if (userList == null || userList.isEmpty()) { log.error("分派失败,权限用户列表为空,illegalList为:{},权限为:{}", illegalList, "illegalRemoveAccept"); throw new BusinessException("权限用户列表为空!"); @@ -983,8 +983,8 @@ public class BizSerIllegalRemController extends BaseController implements Servle //获取转办记录 LambdaQueryWrapper opinionWrapper = new LambdaQueryWrapper<>(); opinionWrapper.eq(TSOpinion::getBizseq, list.get(0).getBizSeq()) - .eq(TSOpinion::getOpiniontype, "55") - .orderByAsc(TSOpinion::getHandledate); + .eq(TSOpinion::getOpiniontype, "55") + .orderByAsc(TSOpinion::getHandledate); List tsOpinions = opinionService.list(opinionWrapper); List orgName = new ArrayList<>(); if (CollectionUtils.isNotEmpty(tsOpinions)) { @@ -1212,58 +1212,58 @@ public class BizSerIllegalRemController extends BaseController implements Servle try { - //删除待办 - List tsTaskLists = taskListService.selectTaskListByBizseqid(bizSeq); - if(CollectionUtils.isNotEmpty(tsTaskLists)){ + //删除待办 + List tsTaskLists = taskListService.selectTaskListByBizseqid(bizSeq); + if(CollectionUtils.isNotEmpty(tsTaskLists)){ - boolean isExist = false; - if (tsTaskLists.size() > 1) { + boolean isExist = false; + if (tsTaskLists.size() > 1) { + for (int i = 0; i < tsTaskLists.size(); i++) { + if (user.getPrimaryKey().equals(tsTaskLists.get(i).getSignuserid())) { + tsTaskLists.remove(tsTaskLists.get(i)); + isExist = true; + break; + } + } + if (isExist){ for (int i = 0; i < tsTaskLists.size(); i++) { - if (user.getPrimaryKey().equals(tsTaskLists.get(i).getSignuserid())) { - tsTaskLists.remove(tsTaskLists.get(i)); - isExist = true; - break; - } - } - if (isExist){ - for (int i = 0; i < tsTaskLists.size(); i++) { - taskListService.removeById(tsTaskLists.get(i).getTasklistid()); - } - }else { - throw new BusinessException("业务办理错误"); + taskListService.removeById(tsTaskLists.get(i).getTasklistid()); } + }else { + throw new BusinessException("业务办理错误"); + } - }else { - if(tsTaskLists.size()>0 && user.getPrimaryKey().equals(tsTaskLists.get(0).getSignuserid())) { - throw new BusinessException("业务已在办理中"); - } + }else { + if(tsTaskLists.size()>0 && user.getPrimaryKey().equals(tsTaskLists.get(0).getSignuserid())) { + throw new BusinessException("业务已在办理中"); } } - //删除移除业务 - List tsBizSerIllegalRem = tsBizSerIllegalRemService.selectbizRembizseq(bizSeq); - if (CollectionUtils.isNotEmpty(tsBizSerIllegalRem)){ - boolean isExist = false; - if (tsBizSerIllegalRem.size() > 1) { + } + //删除移除业务 + List tsBizSerIllegalRem = tsBizSerIllegalRemService.selectbizRembizseq(bizSeq); + if (CollectionUtils.isNotEmpty(tsBizSerIllegalRem)){ + boolean isExist = false; + if (tsBizSerIllegalRem.size() > 1) { + for (int i = 0; i < tsBizSerIllegalRem.size(); i++) { + if (user.getPrimaryKey().equals(tsBizSerIllegalRem.get(i).getRemSponsorIllegal())) { + tsBizSerIllegalRem.remove(tsBizSerIllegalRem.get(i)); + isExist = true; + break; + } + } + if (isExist){ for (int i = 0; i < tsBizSerIllegalRem.size(); i++) { - if (user.getPrimaryKey().equals(tsBizSerIllegalRem.get(i).getRemSponsorIllegal())) { - tsBizSerIllegalRem.remove(tsBizSerIllegalRem.get(i)); - isExist = true; - break; - } - } - if (isExist){ - for (int i = 0; i < tsBizSerIllegalRem.size(); i++) { - tsBizRemListService.removeById(tsBizSerIllegalRem.get(i).getBizSerRemID()); - } - }else { - throw new BusinessException("业务办理错误"); + tsBizRemListService.removeById(tsBizSerIllegalRem.get(i).getBizSerRemID()); } }else { - if(tsBizSerIllegalRem.size()>0 && !user.getPrimaryKey().equals(tsBizSerIllegalRem.get(0).getRemSponsorIllegal())) { - throw new BusinessException("业务在办理中"); - } + throw new BusinessException("业务办理错误"); + } + }else { + if(tsBizSerIllegalRem.size()>0 && !user.getPrimaryKey().equals(tsBizSerIllegalRem.get(0).getRemSponsorIllegal())) { + throw new BusinessException("业务在办理中"); } } + } }catch (Exception e){ e.printStackTrace(); diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/entity/TSSerIllegalList.java b/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/entity/TSSerIllegalList.java index 47b0b1d..921cf59 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/entity/TSSerIllegalList.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/entity/TSSerIllegalList.java @@ -317,13 +317,6 @@ public class TSSerIllegalList extends Model { // @TableField("sourcetype") // private String sourceType; - /** - * 行政处罚id - */ -// @TableField("caseId") - @TableField(exist = false) - private String caseId; - @Override protected Serializable pkVal() { return this.illegallistid; diff --git a/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/service/impl/TSBizSerIllegalServiceImpl.java b/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/service/impl/TSBizSerIllegalServiceImpl.java index 430322f..38e9470 100644 --- a/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/service/impl/TSBizSerIllegalServiceImpl.java +++ b/src/main/java/com/chinaweal/aiccs/aiccs/seriousillegal/service/impl/TSBizSerIllegalServiceImpl.java @@ -520,7 +520,6 @@ public class TSBizSerIllegalServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq("BIZSEQ", report.getBizseq()) - .eq("PRIPID", report.getPripid()) - .eq("WRITSTYPE", "33"); + .eq("PRIPID", report.getPripid()) + .eq("WRITSTYPE", "33"); TSWrit tswrit = tswritMapper.selectOne(queryWrapper); if (tswrit == null || StrUtil.isBlank(tswrit.getWritsno())) { @@ -468,8 +468,7 @@ public class AttachmentUploadSchedule { // 2. 构建JSON数组格式的List(服务端期望数组) List ayjbrList = new ArrayList<>(); if (StringUtils.isNotBlank(handlerUserId)) { - ayjbrList.add("ab024041b1604d87bc7fb592c0a6153f"); // 加入用户ID(如:"D0915586-E9A0-4CF7-AB47-69FE71CA4CFB") - ayjbrList.add("eb74f3cefb5f47a8bc751405a6605ada"); + ayjbrList.add(handlerUserId); // 加入用户ID(如:"D0915586-E9A0-4CF7-AB47-69FE71CA4CFB") } ayxx.put("ayjbr", ayjbrList); // 案源经办人 ayxx.put("jdcjr", Arrays.asList(tsCase.getHandlerId(), tsCase.getAssistantId())); // 决策层级人 @@ -643,12 +642,7 @@ public class AttachmentUploadSchedule { cfjdxx.put("cCfyj", report.getPenbasis()); cfjdxx.put("cZyclsshly", ""); cfjdxx.put("dCljdrq", report.getPendecissdate().toString()); - List zfryList = new ArrayList<>(); - if (StringUtils.isNotBlank(handlerUserId)) { - zfryList.add("ab024041b1604d87bc7fb592c0a6153f"); // 加入用户ID(如:"D0915586-E9A0-4CF7-AB47-69FE71CA4CFB") - zfryList.add("eb74f3cefb5f47a8bc751405a6605ada"); - } - cfjdxx.put("cZfry",zfryList); + cfjdxx.put("cZfry", Arrays.asList(tsCase.getHandlerId())); cfjdxx.put("nCqjqczcfsy", ""); cfjdxx.put("cCfzl", createUserIdJsonArray(Arrays.asList("18"))); cfjdxx.put("cXzcfnr", "吊销营业执照"); @@ -749,7 +743,7 @@ public class AttachmentUploadSchedule { // Map wsItem = createWsItem(fileName, base64Content, report); Map wsItem = new HashMap<>(); - wsItem.put("fileName", fileName.replaceAll("\\.PDF$", ".pdf")); + wsItem.put("fileName", fileName); wsItem.put("fileType", "application/pdf"); wsItem.put("content", base64Content); wsItem.put("wswh", report.getPendecno()); // 文书文号 @@ -860,7 +854,7 @@ public class AttachmentUploadSchedule { } } -/** + /** * 创建用户ID列表的JSON数组字符串 * @param userIds 用户ID列表 * @return JSON数组格式的字符串,如:["user_id1", "user_id2"] diff --git a/src/main/resources/mybatis/mapper/aiccs/abnormal/EBaseinfoMapper.xml b/src/main/resources/mybatis/mapper/aiccs/abnormal/EBaseinfoMapper.xml index 24ff21c..03b70e1 100644 --- a/src/main/resources/mybatis/mapper/aiccs/abnormal/EBaseinfoMapper.xml +++ b/src/main/resources/mybatis/mapper/aiccs/abnormal/EBaseinfoMapper.xml @@ -74,7 +74,6 @@ - @@ -307,24 +306,24 @@ update aiccs.e_baseinfo set regulatory_temp = null, - regulatory_name_temp = null, - sareacode_temp = null, - sareaname_temp = null, - suporg = null, - update_time = CURRENT_TIMESTAMP, - update_by = 'system' + regulatory_name_temp = null, + sareacode_temp = null, + sareaname_temp = null, + suporg = null, + update_time = CURRENT_TIMESTAMP, + update_by = 'system' where pripid = #{pripid} update aiccs.e_baseinfo e set - regulatory_temp = #{orgNumber}, - suporg = #{orgNumber}, - regulatory_name_temp = (select orgUnitName from cxaicorg.t_orgunits where orgNumber = #{orgNumber}), - sareacode_temp = #{sliceId}, - sareaname_temp = #{sliceName}, - update_time = CURRENT_TIMESTAMP, - update_by = 'system' + regulatory_temp = #{orgNumber}, + suporg = #{orgNumber}, + regulatory_name_temp = (select orgUnitName from cxaicorg.t_orgunits where orgNumber = #{orgNumber}), + sareacode_temp = #{sliceId}, + sareaname_temp = #{sliceName}, + update_time = CURRENT_TIMESTAMP, + update_by = 'system' where e.pripid = #{pripid} @@ -641,91 +640,91 @@ @@ -775,7 +774,7 @@ #{each} - and t.SPECAUSE = '4' and t.OPERATESTATUS = '1' + and t.SPECAUSE = '4' and t.OPERATESTATUS = '1' and t.abntime < #{customParamMap.abntime} @@ -788,10 +787,10 @@ FROM (SELECT DISTINCT PRIPID FROM tsabnlist t WHERE t.ENTTYPE in - - #{each} - - and t.SPECAUSE = '4' and t.OPERATESTATUS = '1' + + #{each} + + and t.SPECAUSE = '4' and t.OPERATESTATUS = '1' and t.abntime < #{customParamMap.abntime} @@ -800,7 +799,7 @@ INNER JOIN trentbaseinfo tr on e.REGNO = tr.REGISTNO - where 1=1 + where 1=1 and tr.REPORTYEAR = #{customParamMap.yearReport} @@ -936,7 +935,7 @@ #{each} - and t.specause = '4' and t.OPERATESTATUS = '1' and t.ENTTYPE in + and t.specause = '4' and t.OPERATESTATUS = '1' and t.ENTTYPE in #{each} @@ -953,7 +952,7 @@ #{each} - and t.specause = '4' and t.OPERATESTATUS = '1' and t.ENTTYPE in + and t.specause = '4' and t.OPERATESTATUS = '1' and t.ENTTYPE in #{each} @@ -1032,19 +1031,19 @@ - and tr.REPORTYEAR >= #{customParamMap.nbyear} + and tr.REPORTYEAR >= #{customParamMap.nbyear} - and tr.REPORTYEAR < #{customParamMap.nbyear} + and tr.REPORTYEAR < #{customParamMap.nbyear} select eb.* from crgs.e_pri_person ep - left join aiccs.e_baseinfo eb on ep.pripid = eb.pripid + left join aiccs.e_baseinfo eb on ep.pripid = eb.pripid where ep.name = #{name} and ep.cerno = #{cerno} @@ -1468,23 +1467,23 @@ @@ -1595,25 +1594,5 @@ - - diff --git a/src/main/resources/mybatis/mapper/aiccs/abnormal/TSAbnListMapper.xml b/src/main/resources/mybatis/mapper/aiccs/abnormal/TSAbnListMapper.xml index 4ed0fe3..d7db17d 100644 --- a/src/main/resources/mybatis/mapper/aiccs/abnormal/TSAbnListMapper.xml +++ b/src/main/resources/mybatis/mapper/aiccs/abnormal/TSAbnListMapper.xml @@ -38,9 +38,6 @@ - - - @@ -733,9 +730,9 @@ @@ -819,7 +816,7 @@ select t.ABNLISTID, t.PRIPID, t.REGNO, t.DECORG, t.intoDecorg,t.intoRemark from tsabnlist t left join e_baseinfo e on e.PRIPID = t.PRIPID where e.REGSTATE = '5' and t.OPERATESTATUS = '1' and e.ENTTYPE not in ('9100','9200') - and ( t.intoRemark is null || t.intoRemark not like '%主体已撤销登记%') + and ( t.intoRemark is null || t.intoRemark not like '%主体已撤销登记%') select * from aiccs.tsabnlist where pripid = #{pripid} - and date_format(abntime, '%Y-%m-%d') = #{date} + and date_format(abntime, '%Y-%m-%d') = #{date} select 其它.*, 现场核查.*, 投诉处理.* from - (select - 0 as "业户认领-认领户数", - 0 as "业户认领-未认领", - 0 as "业户认领-认领率", - 0 as "国家(省)局执照-录入", - 0 as "国家(省)局执照-移交") 其它, + (select + 0 as "业户认领-认领户数", + 0 as "业户认领-未认领", + 0 as "业户认领-认领率", + 0 as "国家(省)局执照-录入", + 0 as "国家(省)局执照-移交") 其它, - (select - count(case when status = '1' then 1 else null end) as "现场核查-检查总数", - 0 as "现场核查-过期检查数", - 0 as "现场核查-过期未检查数", - 0 as "现场核查-检查率", - -- 新编码映射:0=未发现问题 - count(case when status = '1' and inspectResult = '0' then 1 else null end) as "现场核查-未发现问题", - -- 新编码映射:1=未按规定公示应当公示的信息 - count(case when status = '1' and inspectResult = '1' then 1 else null end) as "现场核查-未按规定公示应当公示的信息", - -- 旧编码3(公示信息作假)删除,无需保留 - 0 as "现场核查-公示信息隐瞒真实情况弄虚作假", - -- 新编码映射:2=通过登记的住所(经营场所)无法联系 - count(case when status = '1' and inspectResult = '2' then 1 else null end) as "现场核查-通过登记的住所(经营场所)无法联系", - -- 新编码映射:5=发现问题,依法责令立即改正或者限期改正 - count(case when status = '1' and inspectResult = '5' then 1 else null end) as "现场核查-发现问题,依法责令立即改正或者限期改正", - -- 新编码映射:3=不配合检查情节严重 - count(case when status = '1' and inspectResult = '3' then 1 else null end) as "现场核查-不配合检查情节严重", - -- 新编码映射:4=未发现开展本次抽查涉及的经营活动 - count(case when status = '1' and inspectResult = '4' then 1 else null end) as "现场核查-未发现开展本次抽查涉及的经营活动", - -- 新编码映射:6=发现问题,待后续调查处理 - count(case when status = '1' and inspectResult = '6' then 1 else null end) as "现场核查-发现问题,待后续调查处理", - -- 新增编码:7=合格 - count(case when status = '1' and inspectResult = '7' then 1 else null end) as "现场核查-合格", - -- 新增编码:8=不合格 - count(case when status = '1' and inspectResult = '8' then 1 else null end) as "现场核查-不合格", - -- 新增编码:9=其他情况 - count(case when status = '1' and inspectResult = '9' then 1 else null end) as "现场核查-其他情况" - from tsusualinspect where inspectOrg = #{orgCode}) 现场核查, + (select + count(case when status = '1' then 1 else null end) as "现场核查-检查总数", + 0 as "现场核查-过期检查数", + 0 as "现场核查-过期未检查数", + 0 as "现场核查-检查率", + count(case when status = '1' and inspectResult = '1' then 1 else null end) as "现场核查-未发现问题", + count(case when status = '1' and inspectResult = '2' then 1 else null end) as "现场核查-未按规定公示应当公示的信息", + count(case when status = '1' and inspectResult = '3' then 1 else null end) as "现场核查-公示信息隐瞒真实情况弄虚作假", + count(case when status = '1' and inspectResult = '4' then 1 else null end) as "现场核查-通过登记住所(经营场所)无法联系", + count(case when status = '1' and inspectResult = '5' then 1 else null end) as "现场核查-发现问题已责令改正", + count(case when status = '1' and inspectResult = '6' then 1 else null end) as "现场核查-不配合检查情节严重", + count(case when status = '1' and inspectResult = '7' then 1 else null end) as "现场核查-未发现开展本次检查涉及的经营活动", + count(case when status = '1' and inspectResult = '8' then 1 else null end) as "现场核查-发现问题待后续处理" + from tsusualinspect where inspectOrg = #{orgCode}) 现场核查, - (select - count(case when status = '1' then 1 else null end) as "投诉处理-检查总数", - 0 as "投诉处理-过期检查数", - 0 as "投诉处理-检查率", - -- 新编码映射:0=未发现问题 - count(case when status = '1' and inspectResult = '0' then 1 else null end) as "投诉处理-未发现问题", - -- 新编码映射:1=未按规定公示应当公示的信息 - count(case when status = '1' and inspectResult = '1' then 1 else null end) as "投诉处理-未按规定公示应当公示的信息", - -- 旧编码3(公示信息作假)删除,无需保留 - 0 as "投诉处理-公示信息隐瞒真实情况弄虚作假", - -- 新编码映射:2=通过登记的住所(经营场所)无法联系 - count(case when status = '1' and inspectResult = '2' then 1 else null end) as "投诉处理-通过登记的住所(经营场所)无法联系", - -- 新编码映射:5=发现问题,依法责令立即改正或者限期改正 - count(case when status = '1' and inspectResult = '5' then 1 else null end) as "投诉处理-发现问题,依法责令立即改正或者限期改正", - -- 新编码映射:3=不配合检查情节严重 - count(case when status = '1' and inspectResult = '3' then 1 else null end) as "投诉处理-不配合检查情节严重", - -- 新编码映射:4=未发现开展本次抽查涉及的经营活动 - count(case when status = '1' and inspectResult = '4' then 1 else null end) as "投诉处理-未发现开展本次抽查涉及的经营活动", - -- 新编码映射:6=发现问题,待后续调查处理 - count(case when status = '1' and inspectResult = '6' then 1 else null end) as "投诉处理-发现问题,待后续调查处理", - -- 新增编码:7=合格 - count(case when status = '1' and inspectResult = '7' then 1 else null end) as "投诉处理-合格", - -- 新增编码:8=不合格 - count(case when status = '1' and inspectResult = '8' then 1 else null end) as "投诉处理-不合格", - -- 新增编码:9=其他情况 - count(case when status = '1' and inspectResult = '9' then 1 else null end) as "投诉处理-其他情况" - from tssueinspect where inspectOrg = #{orgCode}) 投诉处理 + (select + count(case when status = '1' then 1 else null end) as "投诉处理-检查总数", + 0 as "投诉处理-过期检查数", + 0 as "投诉处理-检查率", + count(case when status = '1' and inspectResult = '1' then 1 else null end) as "投诉处理-未发现问题", + count(case when status = '1' and inspectResult = '2' then 1 else null end) as "投诉处理-未按规定公示应当公示的信息", + count(case when status = '1' and inspectResult = '3' then 1 else null end) as "投诉处理-公示信息隐瞒真实情况弄虚作假", + count(case when status = '1' and inspectResult = '4' then 1 else null end) as "投诉处理-通过登记住所(经营场所)无法联系", + count(case when status = '1' and inspectResult = '5' then 1 else null end) as "投诉处理-发现问题已责令改正", + count(case when status = '1' and inspectResult = '6' then 1 else null end) as "投诉处理-不配合检查情节严重", + count(case when status = '1' and inspectResult = '7' then 1 else null end) as "投诉处理-未发现开展本次检查涉及的经营活动", + count(case when status = '1' and inspectResult = '8' then 1 else null end) as "投诉处理-发现问题待后续处理" + from tssueinspect where inspectOrg = #{orgCode}) 投诉处理 select - r.scheckid as bizseq, - e.sentid as pripid, - e.sentregno as regno, - e.sentname as entname, - e.sdom as dom, - e.sprincipal as legalname, - case - when SRESULTTYPECODE = '5' then '6' - when SRESULTTYPECODE = '6' then '' - else SRESULTTYPECODE end as inspectResult, - r.sresulttypename as inspectResultStr, - r.sresulttypename as inspectContent, - e.sunitname as inspectOrgName, - e.dtcheckdate as inspectDate, - e.sunitid as inspectorg, - e.suserid as inspectorid, - e.susername as inspector + r.scheckid as bizseq, + e.sentid as pripid, + e.sentregno as regno, + e.sentname as entname, + e.sdom as dom, + e.sprincipal as legalname, + case + when SRESULTTYPECODE = '5' then '6' + when SRESULTTYPECODE = '6' then '' + else SRESULTTYPECODE end as inspectResult, + r.sresulttypename as inspectResultStr, + r.sresulttypename as inspectContent, + e.sunitname as inspectOrgName, + e.dtcheckdate as inspectDate, + e.sunitid as inspectorg, + e.suserid as inspectorid, + e.susername as inspector from tfdb.tb_dsm_spot_check_result r - left join tfdb.tb_dsm_spot_check_entity e on r.scheckid = e.scheckid + left join tfdb.tb_dsm_spot_check_entity e on r.scheckid = e.scheckid where e.sentid = #{pripid} diff --git a/src/main/resources/mybatis/mapper/aiccs/revoke/BizRevEntMapper.xml b/src/main/resources/mybatis/mapper/aiccs/revoke/BizRevEntMapper.xml index bd46d51..063d91b 100644 --- a/src/main/resources/mybatis/mapper/aiccs/revoke/BizRevEntMapper.xml +++ b/src/main/resources/mybatis/mapper/aiccs/revoke/BizRevEntMapper.xml @@ -37,13 +37,13 @@ NOOPENSTATE, INSERTTIME, LAUPTIME,PRE_PUN_DEC_WRITSNO,PRE_HEAR_NOT_WRITSNO - - - - - - - + + + + + + + insert into biz_rev_ent (REVLISTID,PRE_PUN_DEC_WRITSNO,LAUPTIME) values @@ -57,31 +57,13 @@ - - - - diff --git a/src/main/resources/mybatis/mapper/aiccs/seriousillegal/TSSerIllegalListMapper.xml b/src/main/resources/mybatis/mapper/aiccs/seriousillegal/TSSerIllegalListMapper.xml index eb894df..be64d40 100644 --- a/src/main/resources/mybatis/mapper/aiccs/seriousillegal/TSSerIllegalListMapper.xml +++ b/src/main/resources/mybatis/mapper/aiccs/seriousillegal/TSSerIllegalListMapper.xml @@ -45,7 +45,6 @@ - @@ -69,7 +68,7 @@ ILLEGALLISTID, BIZSEQ, ABNLISTID, PRIPID, REGNO, ENTNAME, SERILLREA, UNISCID, ABNTIME, REMEXCPRES, REMDATE, DECORG, DECORGCN, AREA_CODE, LAUPTIME, LOSTCREDITEXPLAIN, LOSTCREDITEXPLAINREM, ReconsiderationOrg, GovernmentOrg, intoSponsorIllegal, remSponsorIllegal, LitiOrg, batchAndCase, operationStatus, REMDECORG, REMDECORGCN, INTOWRITID, - REMWRITID,intoSponsorIllegalId,ycbizseq,ISREV,REVOP,ISHEA,HEAOP,JUDDOCTITLE,JUDDOCNO,isshow,caseId + REMWRITID,intoSponsorIllegalId,ycbizseq,ISREV,REVOP,ISHEA,HEAOP,JUDDOCTITLE,JUDDOCNO,isshow select t.tasklistid, t.workflowid, t.bizseqid as bizseq, e.pripid, e.entname as entName, e.uniscid, - e.regno as regNo, e.name as leRepName, e.enttype, e.opscope,t.bustype, e.dom as address, n.currentnode as currNodeId + e.regno as regNo, e.name as leRepName, e.enttype, e.opscope,t.bustype, e.dom as address, n.currentnode as currNodeId from tstasklist t, tstwfprocessnode n, e_baseinfo e, tsbizserillegal biz where t.bizseqid = biz.bizseq and e.pripid = biz.pripid union all select t.tasklistid, t.workflowid, t.bizseqid as bizseq, e.pripid, e.entname as entName, e.uniscid, - e.regno as regNo, e.name as leRepName, e.enttype, e.opscope,t.bustype, e.dom as address, n.currentnode as currNodeId + e.regno as regNo, e.name as leRepName, e.enttype, e.opscope,t.bustype, e.dom as address, n.currentnode as currNodeId from tstasklist t, tstwfprocessnode n, e_baseinfo e, tsbizserillegaldiss biz where t.bizseqid = biz.bizseq and e.pripid = biz.pripid union all select t.tasklistid, t.workflowid, t.bizseqid as bizseq, e.pripid, e.entname as entName, e.uniscid, - e.regno as regNo, e.name as leRepName, e.enttype, e.opscope, t.bustype, e.dom as address, n.currentnode as currNodeId + e.regno as regNo, e.name as leRepName, e.enttype, e.opscope, t.bustype, e.dom as address, n.currentnode as currNodeId from tstasklist t, tstwfprocessnode n, e_baseinfo e, tsbizserillegal biz where t.bizseqid = biz.bizseq and e.pripid = biz.pripid @@ -364,7 +363,7 @@ and ( e.uniscid like concat('%', #{params.uscc} ,'%') - or + or e.regno like concat('%', #{params.uscc} ,'%') ) @@ -457,24 +456,24 @@ select * from aiccs.tsserillegallist t where operationStatus = '2' - and REMDATE >= '2021-10-10' - and REMEXCPRES = '4' - and remSponsorIllegal = '系统自动移出' - and abnlistid is not null + and REMDATE >= '2021-10-10' + and REMEXCPRES = '4' + and remSponsorIllegal = '系统自动移出' + and abnlistid is not null diff --git a/src/main/resources/mybatis/mapper/aiccs/statistic/StatisticsResultMapper.xml b/src/main/resources/mybatis/mapper/aiccs/statistic/StatisticsResultMapper.xml index 142ddc6..b86edfb 100644 --- a/src/main/resources/mybatis/mapper/aiccs/statistic/StatisticsResultMapper.xml +++ b/src/main/resources/mybatis/mapper/aiccs/statistic/StatisticsResultMapper.xml @@ -220,7 +220,7 @@ @@ -229,7 +229,7 @@ @@ -244,19 +244,16 @@