手动回退版本

This commit is contained in:
zhouxy 2025-12-31 22:19:01 +08:00
parent 720b5f9a17
commit f1784dfbee
33 changed files with 506 additions and 1155 deletions

View File

@ -262,13 +262,8 @@ public class BizRemListController extends BaseController implements ServletConte
List<Map<String, String>> list = new ArrayList<>();
TSAbnList tsAbnList = tsAbnListService.getById(abnlistid);
LambdaQueryWrapper<EBaseinfo> 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<EBaseinfo> 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<String, String> resultMap = new HashMap<String, String>();
@ -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);
}

View File

@ -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;
/**
* <p>
* 前端控制器
@ -644,9 +645,16 @@ public class EBaseinfoController extends BaseController {
@GetMapping("/list")
public RestResult<List<EBaseinfo>> list(String uscc, String entName) {
// 使用自定义SQL查询替换原来的简单查询
List<EBaseinfo> list = eBaseinfoService.getEBaseinfoListWithPunInfo(uscc, entName);
LambdaQueryWrapper<EBaseinfo> 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<EBaseinfo> list = eBaseinfoService.list(lqw);
for (EBaseinfo eBaseinfo : list) {
// 中文渲染
// 经营状态
@ -1195,8 +1203,8 @@ public class EBaseinfoController extends BaseController {
// 执行查询
IPage<QzzxEntDto> 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<IPage<EBaseinfo>> listEBaseinfo(@RequestBody BaseQuery<EBaseinfo> query) {
IPage<EBaseinfo> data = eBaseinfoService.listEBaseinfo(query);
return RestResult.ok(data);
}
}

View File

@ -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<TSAbnList> 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<TSAbnList> 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);

View File

@ -570,16 +570,9 @@ public class EBaseinfo extends Model<EBaseinfo> {
@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;
}

View File

@ -309,24 +309,6 @@ public class TSAbnList extends Model<TSAbnList> {
@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;

View File

@ -52,9 +52,10 @@ public class Toincludeabn {
/**
* 列异类型
* 1.未按规定公示应当公示的信息
* 2.通过登记的住所经营场所无法联系
* 3.不配合检查情节严重
* 2.未按规定公示应当公示的信息
* 3.公示信息隐瞒真实情况弄虚作假
* 4.通过登记的住所经营场所无法联系
* 6.不配合检查情节严重
*/
@TableField("includeType")
private String includeType;

View File

@ -191,12 +191,4 @@ public interface EBaseinfoMapper extends BaseMapper<EBaseinfo> {
IPage<QzzxEntDto> queryForcedLogoutEntList(IPage<QzzxEntDto> page, @Param("customParamMap") Map<String, Object> customParamMap);
List<QzzxEntDto> exportQzzxEntList(@Param("paramMap") Map<String, Object> paramMap);
/**
* 根据惩罚信息查询企业基本信息列表
* @param uscc 统一社会信用代码
* @param entName 企业名称
* @return 企业基本信息列表
*/
List<EBaseinfo> selectEBaseinfoListWithPunInfo(@Param("uscc") String uscc, @Param("entName") String entName);
}

View File

@ -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<EBaseinfo> {
List<QzzxEntDto> exportQzzxEntList(Map<String, Object> paramMap);
/**
* 根据惩罚信息查询企业基本信息列表
* @param uscc 统一社会信用代码或注册号
* @param entName 企业名称
* @return 企业基本信息列表
*/
List<EBaseinfo> getEBaseinfoListWithPunInfo(String uscc, String entName);
IPage<EBaseinfo> listEBaseinfo(BaseQuery<EBaseinfo> query);
}

View File

@ -82,8 +82,6 @@ public interface IGzaiccodeService extends IService<Gzaiccode> {
*/
List<CascadeTreeNode> getChildStationList(String parentid);
List<AICUser> byPermissionListHandleUserListYZ(String priPID, String illegalRemoveAccept, String decorg, String decorgCn);
// /**
// * 根据层级获取机关列表
// * @param parentid

View File

@ -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<EBaseinfoMapper, EBase
public List<QzzxEntDto> exportQzzxEntList(Map<String, Object> paramMap) {
return baseMapper.exportQzzxEntList(paramMap);
}
@Override
public List<EBaseinfo> getEBaseinfoListWithPunInfo(String uscc, String entName) {
return baseMapper.selectEBaseinfoListWithPunInfo(uscc, entName);
}
@Override
public IPage<EBaseinfo> listEBaseinfo(BaseQuery<EBaseinfo> query) {
EBaseinfo entity = query.getEntity(EBaseinfo.class);
Page<EBaseinfo> 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<EBaseinfo> 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<TOrgUnits> 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<TOrgUnits> list = tOrgUnitsService.list(queryWrapper);
// if (list.size() > 0) {
// TOrgUnits tOrgunits = list.get(0);
// record.setLocaladmCn(tOrgunits.getOrgUnitName());
// }
// }
// });
}
return page;
}
}

View File

@ -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<GzaiccodeMapper, Gzaiccode
EBaseinfo eBaseinfo = eBaseinfoService.getById(pripid);
String acceptRegorg = eBaseinfo.getAcceptRegorg() == null?"":eBaseinfo.getAcceptRegorg(); //受理机关
String regulatory = eBaseinfo.getSuporg(); //属地监管所
String unitCode = changeUnitCn(eBaseinfo.getRegorg(), eBaseinfo.getRegorgCn()); //登记机关
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<AICUser> unitCodeUserList = orgUM.findUsersByOrgAndPermission(orgByUnitCode.getPrimaryKey(), permission);
@ -175,7 +174,7 @@ public class GzaiccodeServiceImpl extends ServiceImpl<GzaiccodeMapper, Gzaiccode
} else if (unitCn.contains("番禺")) {
unitCode = "440126";
} else if (unitCn.contains("广州市市场监督管理局") || unitCn.contains("广州市工商行政管理局")){
unitCode = "440100";
unitCode = "440101";
} else if(unitCn.contains("广州市工商行政管理局机场分局")){
unitCode = "440129";
}
@ -212,45 +211,4 @@ public class GzaiccodeServiceImpl extends ServiceImpl<GzaiccodeMapper, Gzaiccode
public List<CascadeTreeNode> getChildStationList(String parentid) {
return baseMapper.getChildStationList(null,parentid);
}
@Override
public List<AICUser> byPermissionListHandleUserListYZ(String pripid, String permission, String decorg, String decorgCn) {
List<AICUser> 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<AICUser> 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<AICUser> 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;
}
}

View File

@ -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<TSBizDissentMapper, TSB
private OrgUM orgUM;
@Autowired
private WorkFlowService workFlowService;
@Autowired
private TSBizSpeListService tsBizSpeListService;
@Autowired
private ToincludeabnService toincludeabnService;
@Resource
private RanInsResultMapper ranInsResultMapper;
@Autowired
private DrraninsrescreService drraninsrescreService;
@Autowired
private TSBizRemListService bizRemListService;
@Override
public List<TSBizDissent> selectbizDissentList(TSBizDissent tsBizDissentModel) {
@ -123,75 +107,21 @@ public class TSBizDissentServiceImpl extends ServiceImpl<TSBizDissentMapper, TSB
TSAbnList tsAbnList = abnListService.getById(tsBizDissentModel.getAbnlistid());
if (BaseDataConstant.BUSTNESS_TYPE_REM_ABN_OBJECTION.equals(taskListModel.getBustype())) { // 移出经营异常异议
abnListService.update(tsAbnList, new LambdaUpdateWrapper<TSAbnList>()
.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<TSBizSpeList> 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<RanInsResult> 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<TSBizRemList>().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);

View File

@ -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;
/**
* <p>
@ -139,19 +122,6 @@ public class TSBizRemListServiceImpl extends ServiceImpl<TSBizRemListMapper, TSB
@Autowired
private ITPyBlacklistService iTPyBlacklistService;
// 添加新的服务依赖
@Autowired
private TSBizSpeListService tsBizSpeListService;
@Autowired
private ToincludeabnService toincludeabnService;
@Resource
private RanInsResultMapper ranInsResultMapper;
@Autowired
private DrraninsrescreService drraninsrescreService;
@Override
public TSTaskList saveBizRemListAuditProcess(AICUser user, TSTaskList taskListModel, List<TSBizRemList> bizRemListModelList, TSOpinion opinionModel, String nextNodeID, String[] nextPerformerids, String[] nextPerformerNames) {
try {
@ -314,73 +284,11 @@ public class TSBizRemListServiceImpl extends ServiceImpl<TSBizRemListMapper, TSB
}
}
if (abnListModel != null) {
if (abnListModel.getClueType() != null) {
tsAbnListModel.setIscheck("1");
}else {
tsAbnListModel.setIscheck("2");
}
}
abnListService.saveOrUpdate(tsAbnListModel);
tsBizRemListModel.setApprovaldate(now); //核准时间
tsBizRemListModel.setStatus("2"); // 9 受理中、1 审批中、2 已通过、3 不通过
tsBizRemListModel.setLauptime(LocalDateTime.now());
updateById(tsBizRemListModel);
// 第一步用tsAbnListModel的主键查询TSBizSpeList信息
LambdaQueryWrapper<TSBizSpeList> 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<RanInsResult> 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 ServiceImpl<TSBizRemListMapper, TSB
}
}
}
if (StringUtils.isBlank(nextPerformerids)) {
if (com.chinaweal.aiccs.common.util.StringUtils.isBlank(nextPerformerids)) {
TSTwfProcessNode processNode1 = workFlowService.findCurrentNode(taskListModel.getWorkflowid());
int order = WorkFlowUtil.checkNextOrder(processNode1.getCurrentnode(), nextNodeID);
// 通过order判断为回退还是前进 >0前进
@ -954,8 +862,8 @@ public class TSBizRemListServiceImpl extends ServiceImpl<TSBizRemListMapper, TSB
//发送
String[] ids = StringUtils.split(nextPerformerids, Constant.COMMA);
String[] names = StringUtils.split(nextPerformerNames, Constant.COMMA);
String[] ids = com.chinaweal.aiccs.common.util.StringUtils.split(nextPerformerids, Constant.COMMA);
String[] names = com.chinaweal.aiccs.common.util.StringUtils.split(nextPerformerNames, Constant.COMMA);
try {
TSTaskList tsTaskList = saveBizRemListAuditProcess(user, taskListModel, tsBizRemLists, opinionModel, nextNodeID, ids, names);
@ -1021,7 +929,7 @@ public class TSBizRemListServiceImpl extends ServiceImpl<TSBizRemListMapper, TSB
updateById(bizRemList);
}
}
if (ids.length == 1 && StringUtils.equals(user.getPrimaryKey(), ids[0])) {
if (ids.length == 1 && com.chinaweal.aiccs.common.util.StringUtils.equals(user.getPrimaryKey(), ids[0])) {
resultMap.put("bizseq", tsBizRemListModel.getBizseq());
resultMap.put("nextNodeId", nextNodeID);
resultMap.put("taskListId", tasklistid);

View File

@ -12,8 +12,6 @@ import com.chinaweal.aiccs.aiccs.abnormal.entity.dto.AbnProcessDto;
import com.chinaweal.aiccs.aiccs.abnormal.entity.vo.TSBizSpeListVO;
import com.chinaweal.aiccs.aiccs.abnormal.mapper.TSBizSpeListMapper;
import com.chinaweal.aiccs.aiccs.abnormal.service.*;
import com.chinaweal.aiccs.aicris.forgiveprudent.entity.RanInsResult;
import com.chinaweal.aiccs.aicris.forgiveprudent.mapper.RanInsResultMapper;
import com.chinaweal.aiccs.aiccs.auditing.mapper.TSOpinionMapper;
import com.chinaweal.aiccs.aiccs.auditing.service.TSOpinionService;
import com.chinaweal.aiccs.aiccs.business.entity.TSTwfProcessNode;
@ -53,7 +51,6 @@ import java.io.OutputStream;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*;
import com.chinaweal.aiccs.aicris.forgiveprudent.service.RanInsResultService;
/**
* <p>
@ -119,10 +116,6 @@ public class TSBizSpeListServiceImpl extends ServiceImpl<TSBizSpeListMapper, TSB
@Resource
private AbnSerSmsLogService abnSerSmsLogService;
// 用于操作RanInsResult实体的Mapper
@Resource
private RanInsResultMapper ranInsResultMapper;
@Override
public TSTaskList saveAbnListAccept(AICUser user, TSTaskList taskListModel, List<TSBizSpeList> bizSpeList) {
if (StringUtils.isBlank(taskListModel.getTasklistid())) {
@ -223,7 +216,7 @@ public class TSBizSpeListServiceImpl extends ServiceImpl<TSBizSpeListMapper, TSB
tsAbnListModel.setLitiOrg(bizSpeListModel.getLitiOrg());
tsAbnListModel.setIntoSponsor(bizSpeListModel.getIntoSponsor()); // 主办人(列入)
if(StringUtils.isNotEmpty(bizSpeListModel.getRemark()) && !bizSpeListModel.getRemark().equals("null"))
tsAbnListModel.setIntoRemark(bizSpeListModel.getRemark());
tsAbnListModel.setIntoRemark(bizSpeListModel.getRemark());
tsAbnListModel.setAreaCode(orgCode);// 区码值
tsAbnListModel.setOperatestatus("1");
tsAbnListService.save(tsAbnListModel);
@ -1289,50 +1282,7 @@ public class TSBizSpeListServiceImpl extends ServiceImpl<TSBizSpeListMapper, TSB
toincludeabn.setToIncludeId(each.getToIncludeId());
toincludeabn.setUpdateTime(LocalDateTime.now());
toincludeabnService.updateById(toincludeabn);// 更新拟列入表中数据状态
// 第一步通过each.getToIncludeId()查询Toincludeabn信息
Toincludeabn includeAbn = toincludeabnService.getById(each.getToIncludeId());
if (includeAbn != null) {
// 第二步如果Toincludeabn的dataFrom等于2
if ("2".equals(includeAbn.getDataFrom())) {//双随机
// 第三步查询AICRIS.RANINSRESULT表用Toincludeabn的dataFromId作为resultId查询对应数据
LambdaQueryWrapper<RanInsResult> 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<RanInsResult> 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<TSBizSpeListMapper, TSB
tsAbnListModel.setLauptime(LocalDateTime.now());
tsAbnLists.add(tsAbnListModel);
i++;
//获取法人手机号码
//获取法人手机号码
// List<Map<String,String>> epriPersonList = eBaseinfoService.queryEpriPersonList(each.getPripid());
// if (epriPersonList.size() > 0) {
// Map<String,String> epriPerson = epriPersonList.get(0);

View File

@ -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<String> failedEntNames = new ArrayList<>(); // 记录失败的企业名
Map<String, Integer> 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<String> failedEntNames = new ArrayList<>(); // 记录失败的企业名
Map<String, Integer> 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<EBaseinfo> eBaseinfoWrapper = new LambdaQueryWrapper<>();
eBaseinfoWrapper.eq(EBaseinfo::getPripid, bizRevEnt.getPripid());
eBaseinfo = eBaseinfoService.getOne(eBaseinfoWrapper);
EBaseinfo eBaseinfo = eBaseinfoService.getOne(
new LambdaQueryWrapper<EBaseinfo>()
.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让方法继续执行推送任务

View File

@ -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;

View File

@ -240,7 +240,7 @@ public class TSUsualInspectServiceImpl extends BaseServiceImpl<TSUsualInspectMap
//更新关联信用修复的代办期限时间
if ( model.getXyxfbizSeq() != null && !"".equals(model.getXyxfbizSeq())) {
TSTaskList tsTaskListxyxf = taskListService.lambdaQuery().eq(TSTaskList::getBizseqid, model.getXyxfbizSeq()).one();
tsTaskListxyxf.setDeadlineDate(HolidaysUtil.getNextWorkingDay(4));
tsTaskListxyxf.setDeadlineDate(HolidaysUtil.getNextWorkingDay(5));
taskListService.updateById(tsTaskListxyxf);
}

View File

@ -23,9 +23,5 @@ public interface BizRevEntMapper extends BaseMapper<BizRevEnt> {
List<BizRevEntAttachDto> selectBizEntAttachList(@Param("bizseq") String bizseq, @Param("attachType")String attachType);
List<BizRevEntAttachDto> 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<Tsbizrevlist> selectFirstEnt(String bizseq);
}

View File

@ -30,23 +30,5 @@ public interface BizRevEntService extends BaseService<BizRevEnt> {
*/
List<BizRevEntAttachDto> getBizEntAttachList(String bizseq, String attachType);
/**
* 分页获取业务主体及生成的附件关联列表
* @param bizseq
* @param attachType
* @param offset
* @param limit
* @return
*/
List<BizRevEntAttachDto> getBizEntAttachListWithPagination(String bizseq, String attachType, int offset, int limit);
/**
* 统计业务主体及生成的附件关联列表数量
* @param bizseq
* @param attachType
* @return
*/
int countBizEntAttach(String bizseq, String attachType);
boolean insertOrUpdateBatch(List<BizRevEnt> list);
}

View File

@ -46,14 +46,4 @@ public class BizRevEntServiceImpl extends BaseServiceImpl<BizRevEntMapper, BizRe
public List<BizRevEntAttachDto> getBizEntAttachList(String bizseq, String attachType) {
return baseMapper.selectBizEntAttachList(bizseq,attachType);
}
@Override
public List<BizRevEntAttachDto> 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);
}
}

View File

@ -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<String, Object> 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<String,Object> 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<Object> 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<String, Object> map2 = new HashMap<>();
map2.put("rightContent",value.text().trim());
list.add(map2);
}else {
HashMap<String, Object> 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<String, Object> 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<String, Object> 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<Object> 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<String, Object> map2 = new HashMap<>();
map2.put("rightContent",value.text().trim());
list.add(map2);
}else {
HashMap<String, Object> 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("&nbsp;", " ")
.replaceAll("\\n", "")
.replaceAll("<br>", "\n");
Document htmlDoc = Jsoup.parse(html);
org.jsoup.nodes.Document htmlDoc = Jsoup.parse(html);
Elements nodes = htmlDoc.body().children();
XWPFParagraph xwpfParagraph = doc.createParagraph();

View File

@ -199,8 +199,8 @@ public class BizSerIllegalRemAppController {
public RestResult<List<TSSerIllegalList>> listYzwf(@RequestParam String uscc, String regNo) {
LambdaQueryWrapper<TSSerIllegalList> 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<TSSerIllegalList> list = tsSerIllegalListService.list(lqw);
@ -339,7 +339,7 @@ public class BizSerIllegalRemAppController {
//根据主体机关和权限标识,分配对应部门,拿到对应的用户列表
TSSerIllegalList tsSerIllegalListModel = tsSerIllegalListService.getById(illegallistid);
List<String> userIdList = iGzaiccodeService.byPermissionListHandleUserListYZ(tsSerIllegalListModel.getPripid(),
List<String> 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<AICUser> userList = iGzaiccodeService.byPermissionListHandleUserListYZ(eBaseinfo.getPripid(), "illegalRemoveAccept", illegalList.getDecorg(), illegalList.getDecorgCn());
List<AICUser> 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<Map> listBizSerIllegalRemByPhoneOrName(@RequestParam String applicantidOrCerno, @RequestParam String phone, String name) {
LambdaQueryWrapper<TSBizSerIllegalRem> 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<TSBizSerIllegalRem> tsBizSerIllegalRems = tsBizSerIllegalRemService.list(lqwTbtr);
@ -580,8 +580,8 @@ public class BizSerIllegalRemAppController {
resultMap.put("TSBizSerIllegalRemList", tsBizSerIllegalRems);
LambdaQueryWrapper<TSBizRemList> 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<TSBizRemList> tsBizRemLists = tsBizRemListService.list(lqwTbr);
@ -673,7 +673,7 @@ public class BizSerIllegalRemAppController {
//根据主体机关和权限标识,分配对应部门,拿到对应的用户列表
tsSerIllegalListModel = tsSerIllegalListService.getById(illegallistid);
List<String> userIdList = iGzaiccodeService.byPermissionListHandleUserListYZ(tsSerIllegalListModel.getPripid(),
List<String> 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");

View File

@ -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<String, Object> resultMap = new HashMap<>();
@ -504,7 +504,7 @@ public class BizSerIllegalRemController extends BaseController implements Servle
// 存在转办记录的话要更新转办记录的流程节点id
LambdaQueryWrapper<TSOpinion> opinionWrapper = new LambdaQueryWrapper<>();
opinionWrapper.eq(TSOpinion::getBizseq, tsBizSerIllegalRemModel.getBizSeq())
.eq(TSOpinion::getOpiniontype, "55");
.eq(TSOpinion::getOpiniontype, "55");
List<TSOpinion> 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<AICUser> userList = iGzaiccodeService.byPermissionListHandleUserListYZ(tsBizSerIllegalRem.getPriPID(), "illegalRemoveAccept", illegalList.getDecorg(), illegalList.getDecorgCn());
List<AICUser> 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<TSOpinion> 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<TSOpinion> tsOpinions = opinionService.list(opinionWrapper);
List<String> orgName = new ArrayList<>();
if (CollectionUtils.isNotEmpty(tsOpinions)) {
@ -1212,58 +1212,58 @@ public class BizSerIllegalRemController extends BaseController implements Servle
try {
//删除待办
List<TSTaskList> tsTaskLists = taskListService.selectTaskListByBizseqid(bizSeq);
if(CollectionUtils.isNotEmpty(tsTaskLists)){
//删除待办
List<TSTaskList> 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> tsBizSerIllegalRem = tsBizSerIllegalRemService.selectbizRembizseq(bizSeq);
if (CollectionUtils.isNotEmpty(tsBizSerIllegalRem)){
boolean isExist = false;
if (tsBizSerIllegalRem.size() > 1) {
}
//删除移除业务
List<TSBizSerIllegalRem> 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();

View File

@ -317,13 +317,6 @@ public class TSSerIllegalList extends Model<TSSerIllegalList> {
// @TableField("sourcetype")
// private String sourceType;
/**
* 行政处罚id
*/
// @TableField("caseId")
@TableField(exist = false)
private String caseId;
@Override
protected Serializable pkVal() {
return this.illegallistid;

View File

@ -520,7 +520,6 @@ public class TSBizSerIllegalServiceImpl extends BaseServiceImpl<TSBizSerIllegall
tsBizSerIllegal.setAbnlistid(tsForIllOperatingBn.getAbnlistid());
tsBizSerIllegal.setIlloperatingid(tsForIllOperatingBn.getIlloperatingid());
}
tsBizSerIllegal.setCaseId(params.getCaseId());
save(tsBizSerIllegal);
//创建启动待办
@ -653,7 +652,6 @@ public class TSBizSerIllegalServiceImpl extends BaseServiceImpl<TSBizSerIllegall
tsSerIllegalList.setIsrev("0");
tsSerIllegalList.setJuddocno(dbTSBizSerIllegal.getJuddocno());
tsSerIllegalList.setJuddoctitle(dbTSBizSerIllegal.getJuddoctitle());
tsSerIllegalList.setCaseId(dbTSBizSerIllegal.getCaseId());
if (dbTSBizSerIllegal.getAbntime() != null) {
//判断是否选择线下纸质的录入,行政处罚有这个需求

View File

@ -125,17 +125,14 @@ public class ConstantsUtil {
SUEINSPECT_INSPECTTYPE_MAP.put("3","网络监测");
SUEINSPECT_INSPECTTYPE_MAP.put("4","委托专业机构开展检查");
// 检查结果映射(新编码规则)
SUEINSPECT_INSPECTRESULT_MAP.put("0","未发现问题");
SUEINSPECT_INSPECTRESULT_MAP.put("1","未按规定公示应当公示的信息");
SUEINSPECT_INSPECTRESULT_MAP.put("2","通过登记的住所(经营场所)无法联系");
SUEINSPECT_INSPECTRESULT_MAP.put("3","不配合检查情节严重");
SUEINSPECT_INSPECTRESULT_MAP.put("4","未发现开展本次抽查涉及的经营活动");
SUEINSPECT_INSPECTRESULT_MAP.put("5","发现问题,依法责令立即改正或者限期改正");
SUEINSPECT_INSPECTRESULT_MAP.put("6","发现问题,待后续调查处理");
SUEINSPECT_INSPECTRESULT_MAP.put("7","合格");
SUEINSPECT_INSPECTRESULT_MAP.put("8","不合格");
SUEINSPECT_INSPECTRESULT_MAP.put("9","其他情况");
SUEINSPECT_INSPECTRESULT_MAP.put("1","未发现问题");
SUEINSPECT_INSPECTRESULT_MAP.put("2","未按规定公示应当公示的信息");
SUEINSPECT_INSPECTRESULT_MAP.put("3","公示信息隐瞒真实情况弄虚作假");
SUEINSPECT_INSPECTRESULT_MAP.put("4","通过登记住所(经营场所)无法联系");
SUEINSPECT_INSPECTRESULT_MAP.put("5","发现问题已责令改正");
SUEINSPECT_INSPECTRESULT_MAP.put("6","不配合检查情节严重");
SUEINSPECT_INSPECTRESULT_MAP.put("7","未发现开展本次检查涉及的经营活动");
SUEINSPECT_INSPECTRESULT_MAP.put("8","发现问题待后续处理");
}

View File

@ -227,7 +227,7 @@ public class AttachmentUploadSchedule {
try (Ftp ftp = new Ftp(ftpConfig, FtpMode.Passive)) {
// 创建临时文件
File tempFile = File.createTempFile("temp", ".tmp", new File(System.getProperty("java.io.tmpdir")));
File tempFile = java.io.File.createTempFile("temp", ".tmp", new File(System.getProperty("java.io.tmpdir")));
String fileName = FileUtil.getName(remotePath);
String dirPath = StrUtil.removeSuffix(remotePath, fileName);
@ -257,8 +257,8 @@ public class AttachmentUploadSchedule {
// 查询TSwrit表获取WRITSNO
QueryWrapper<TSWrit> 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<String> 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<String> 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<String, Object> wsItem = createWsItem(fileName, base64Content, report);
Map<String, Object> 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"]

View File

@ -74,7 +74,6 @@
<result column="ACCEPTREGORG_CN" property="acceptregorgCn" />
<result column="SUPORG" property="suporg" />
<result column="SUPORG_CN" property="suporgCn" />
<result column="caseId" property="caseId" />
</resultMap>
<!-- 通用查询映射结果 -->
<resultMap id="ComplexEntInfoMap" type="com.chinaweal.aiccs.aiccs.abnormal.entity.dto.ComplexEntInfoDto">
@ -307,24 +306,24 @@
<update id="clearRegulatory">
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>
<update id="updateRegulatory">
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}
</update>
<update id="updateEntAreaSliceInfo">
@ -641,91 +640,91 @@
<select id="queryCphStat" parameterType="java.util.Map" resultMap="ComprehensiveStat">
select orgn, orgunitname,
sum(abnlrnum) as abnlrnum,
sum(abnycnum) as abnycnum,
sum(abnyynum) as abnyynum,
sum(leglrnum) as leglrnum,
sum(legyynum) as legyynum,
sum(legycnum) as legycnum,
sum(ualfknum) as ualfknum,
sum(mytrnum) as mytrnum,
sum(wtcznum) as wtcznum,
sum(legxfnum) as legxfnum,
sum(xyfxyynum) as xyfxyynum,
sum(abnkwnum) as abnkwnum,
sum(legkwnum) as legkwnum,
sum(pldxnum) as pldxnum,
sum(cxnum) as cxnum,
sum(fynum) as fynum,
sum(susnum) as susnum,
sum(locknum) as locknum,
sum(unlocknum) as unlocknum
sum(abnlrnum) as abnlrnum,
sum(abnycnum) as abnycnum,
sum(abnyynum) as abnyynum,
sum(leglrnum) as leglrnum,
sum(legyynum) as legyynum,
sum(legycnum) as legycnum,
sum(ualfknum) as ualfknum,
sum(mytrnum) as mytrnum,
sum(wtcznum) as wtcznum,
sum(legxfnum) as legxfnum,
sum(xyfxyynum) as xyfxyynum,
sum(abnkwnum) as abnkwnum,
sum(legkwnum) as legkwnum,
sum(pldxnum) as pldxnum,
sum(cxnum) as cxnum,
sum(fynum) as fynum,
sum(susnum) as susnum,
sum(locknum) as locknum,
sum(unlocknum) as unlocknum
from (
select rs2.orgn, rs2.orgunitname,
rs1.abnlrnum,
rs1.abnycnum,
rs1.abnyynum,
rs1.leglrnum,
rs1.legyynum,
rs1.legycnum,
rs1.ualfknum,
rs1.mytrnum,
rs1.wtcznum,
rs1.legxfnum,
rs1.xyfxyynum,
rs1.abnkwnum,
rs1.legkwnum,
rs1.pldxnum,
rs1.cxnum,
rs1.fynum,
rs1.susnum,
rs1.locknum,
rs1.unlocknum
from (
select SIGNUSERID,
count(case when bustype in ('5','13','11') then 1 else null end) as abnlrnum,
count(case when bustype in ('7','14','12') then 1 else null end) as abnycnum,
count(case when bustype='6' then 1 else null end) as abnyynum,
count(case when bustype='15' then 1 else null end) as leglrnum,
count(case when bustype='16' then 1 else null end) as legyynum,
count(case when bustype='17' then 1 else null end) as legycnum,
count(case when bustype='30' then 1 else null end) as ualfknum,
count(case when bustype='31' then 1 else null end) as mytrnum,
count(case when bustype='32' then 1 else null end) as wtcznum,
count(case when bustype='33' then 1 else null end) as legxfnum,
count(case when bustype='36' then 1 else null end) as xyfxyynum,
count(case when bustype='40' then 1 else null end) as abnkwnum,
count(case when bustype='41' then 1 else null end) as legkwnum,
count(case when bustype='51' then 1 else null end) as pldxnum,
count(case when bustype='52' then 1 else null end) as cxnum,
count(case when bustype='53' then 1 else null end) as fynum,
count(case when bustype='54' then 1 else null end) as susnum,
count(case when bustype='61' then 1 else null end) as locknum,
count(case when bustype='62' then 1 else null end) as unlocknum
from
(select BIZSEQID,BUSTYPE,max(SIGNUSERID) SIGNUSERID from aiccs.tstasklist where BUSSTATUS !=4
<if test="customParamMap.busstatus == 1 ">
and BUSSTATUS = '2'
</if>
<if test="customParamMap.busstatus == 2 ">
and BUSSTATUS = '0'
</if>
<if test="customParamMap.startDate != null and customParamMap.startDate != '' ">
and date_format(SIGNTIME,'%Y-%m-%d') &gt;= #{customParamMap.startDate}
</if>
<if test="customParamMap.endDate != null and customParamMap.endDate != '' ">
and date_format(SIGNTIME,'%Y-%m-%d') &lt;= #{customParamMap.endDate}
</if>
group by bizseqid,BUSTYPE
) t2
group by SIGNUSERID
) rs1 left join (
select rs.*, tog.orgunitname from (
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
) rs left join cxaicorg.t_orgunits tog on rs.orgn = tog.orgNumber
)rs2 on rs1.SIGNUSERID = rs2.userid
where rs2.orgn is not null and rs2.orgunitname is not null
select rs2.orgn, rs2.orgunitname,
rs1.abnlrnum,
rs1.abnycnum,
rs1.abnyynum,
rs1.leglrnum,
rs1.legyynum,
rs1.legycnum,
rs1.ualfknum,
rs1.mytrnum,
rs1.wtcznum,
rs1.legxfnum,
rs1.xyfxyynum,
rs1.abnkwnum,
rs1.legkwnum,
rs1.pldxnum,
rs1.cxnum,
rs1.fynum,
rs1.susnum,
rs1.locknum,
rs1.unlocknum
from (
select SIGNUSERID,
count(case when bustype in ('5','13','11') then 1 else null end) as abnlrnum,
count(case when bustype in ('7','14','12') then 1 else null end) as abnycnum,
count(case when bustype='6' then 1 else null end) as abnyynum,
count(case when bustype='15' then 1 else null end) as leglrnum,
count(case when bustype='16' then 1 else null end) as legyynum,
count(case when bustype='17' then 1 else null end) as legycnum,
count(case when bustype='30' then 1 else null end) as ualfknum,
count(case when bustype='31' then 1 else null end) as mytrnum,
count(case when bustype='32' then 1 else null end) as wtcznum,
count(case when bustype='33' then 1 else null end) as legxfnum,
count(case when bustype='36' then 1 else null end) as xyfxyynum,
count(case when bustype='40' then 1 else null end) as abnkwnum,
count(case when bustype='41' then 1 else null end) as legkwnum,
count(case when bustype='51' then 1 else null end) as pldxnum,
count(case when bustype='52' then 1 else null end) as cxnum,
count(case when bustype='53' then 1 else null end) as fynum,
count(case when bustype='54' then 1 else null end) as susnum,
count(case when bustype='61' then 1 else null end) as locknum,
count(case when bustype='62' then 1 else null end) as unlocknum
from
(select BIZSEQID,BUSTYPE,max(SIGNUSERID) SIGNUSERID from aiccs.tstasklist where BUSSTATUS !=4
<if test="customParamMap.busstatus == 1 ">
and BUSSTATUS = '2'
</if>
<if test="customParamMap.busstatus == 2 ">
and BUSSTATUS = '0'
</if>
<if test="customParamMap.startDate != null and customParamMap.startDate != '' ">
and date_format(SIGNTIME,'%Y-%m-%d') &gt;= #{customParamMap.startDate}
</if>
<if test="customParamMap.endDate != null and customParamMap.endDate != '' ">
and date_format(SIGNTIME,'%Y-%m-%d') &lt;= #{customParamMap.endDate}
</if>
group by bizseqid,BUSTYPE
) t2
group by SIGNUSERID
) rs1 left join (
select rs.*, tog.orgunitname from (
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
) rs left join cxaicorg.t_orgunits tog on rs.orgn = tog.orgNumber
)rs2 on rs1.SIGNUSERID = rs2.userid
where rs2.orgn is not null and rs2.orgunitname is not null
) jg group by orgn, orgunitname
order by orgn asc
</select>
@ -775,7 +774,7 @@
<foreach collection="customParamMap.sole" item="each" separator="," open="(" close=")">
#{each}
</foreach>
and t.SPECAUSE = '4' and t.OPERATESTATUS = '1'
and t.SPECAUSE = '4' and t.OPERATESTATUS = '1'
<if test="customParamMap.abntime != null and customParamMap.abntime != '' ">
and t.abntime &lt; #{customParamMap.abntime}
</if>
@ -788,10 +787,10 @@
FROM (SELECT DISTINCT PRIPID
FROM tsabnlist t
WHERE t.ENTTYPE in
<foreach collection="customParamMap.company" item="each" separator="," open="(" close=")">
#{each}
</foreach>
and t.SPECAUSE = '4' and t.OPERATESTATUS = '1'
<foreach collection="customParamMap.company" item="each" separator="," open="(" close=")">
#{each}
</foreach>
and t.SPECAUSE = '4' and t.OPERATESTATUS = '1'
<if test="customParamMap.abntime != null and customParamMap.abntime != '' ">
and t.abntime &lt; #{customParamMap.abntime}
</if>
@ -800,7 +799,7 @@
INNER JOIN trentbaseinfo tr on e.REGNO = tr.REGISTNO
</otherwise>
</choose>
where 1=1
where 1=1
<if test="customParamMap.yearReport != null and customParamMap.yearReport != '' ">
and tr.REPORTYEAR = #{customParamMap.yearReport}
</if>
@ -936,7 +935,7 @@
<foreach collection="customParamMap.reportYear" item="each" separator="," open="(" close=")">
#{each}
</foreach>
and t.specause = '4' and t.OPERATESTATUS = '1' and t.ENTTYPE in
and t.specause = '4' and t.OPERATESTATUS = '1' and t.ENTTYPE in
<foreach collection="customParamMap.sole" item="each" separator="," open="(" close=")">
#{each}
</foreach>
@ -953,7 +952,7 @@
<foreach collection="customParamMap.reportYear" item="each" separator="," open="(" close=")">
#{each}
</foreach>
and t.specause = '4' and t.OPERATESTATUS = '1' and t.ENTTYPE in
and t.specause = '4' and t.OPERATESTATUS = '1' and t.ENTTYPE in
<foreach collection="customParamMap.company" item="each" separator="," open="(" close=")">
#{each}
</foreach>
@ -1032,19 +1031,19 @@
<!--是否年报-->
<if test="customParamMap.isnb != null and customParamMap.isnb != '' and customParamMap.nbyear != null and customParamMap.nbyear != ''">
<if test="customParamMap.isnb == 'y'.toString()">
and tr.REPORTYEAR >= #{customParamMap.nbyear}
and tr.REPORTYEAR >= #{customParamMap.nbyear}
</if>
<if test="customParamMap.isnb == 'n'.toString()">
and tr.REPORTYEAR &lt; #{customParamMap.nbyear}
and tr.REPORTYEAR &lt; #{customParamMap.nbyear}
</if>
</if>
</select>
<select id="selectYearReport" resultType="com.chinaweal.aiccs.aiccs.abnormal.entity.EBaseinfo">
select <include refid="E_Base_Column_List"/>
from e_baseinfo e
INNER JOIN crgs.trentbaseinfo tr on e.REGNO = tr.RegistNo
where 1=1
select <include refid="E_Base_Column_List"/>
from e_baseinfo e
INNER JOIN crgs.trentbaseinfo tr on e.REGNO = tr.RegistNo
where 1=1
<if test="customParamMap.isGRDZ eq 'NOGRDZ'">
and e.ENTTYPE in
<foreach collection="customParamMap.company" item="each" separator="," open="(" close=")">
@ -1253,13 +1252,13 @@
select distinct BIZSEQID,BUSTYPE,SIGNUSERID, date_format(SIGNTIME,'%Y-%m-%d') as SIGNTIME, rs.zs, rs2.orgn
from aiccs.tstasklist ts
left join (
select BIZSEQ,count(*) as zs from aiccs.tsbizspelist t
where exists (select 1 from aiccs.tstasklist t2 where t.BIZSEQ = t2.BIZSEQID )
group by BIZSEQ
select BIZSEQ,count(*) as zs from aiccs.tsbizspelist t
where exists (select 1 from aiccs.tstasklist t2 where t.BIZSEQ = t2.BIZSEQID )
group by BIZSEQ
) rs on ts.bizseqid = rs.bizseq
left join (
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
) rs2 on ts.SIGNUSERID = rs2.userid
where ts.BUSSTATUS !=4
and ts.BUSTYPE in ('5','13','11','71','72','73')
@ -1285,13 +1284,13 @@
select distinct BIZSEQID,BUSTYPE,SIGNUSERID, date_format(SIGNTIME,'%Y-%m-%d') as SIGNTIME, rs.zs, rs2.orgn
from aiccs.tstasklist ts
left join (
select BIZSEQ,count(*) as zs from aiccs.tsbizserillegal t
where exists (select 1 from aiccs.tstasklist t2 where t.BIZSEQ = t2.BIZSEQID )
group by BIZSEQ
select BIZSEQ,count(*) as zs from aiccs.tsbizserillegal t
where exists (select 1 from aiccs.tstasklist t2 where t.BIZSEQ = t2.BIZSEQID )
group by BIZSEQ
) rs on ts.bizseqid = rs.bizseq
left join (
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
) rs2 on ts.SIGNUSERID = rs2.userid
where ts.BUSSTATUS !=4
and ts.BUSTYPE = '15'
@ -1317,13 +1316,13 @@
select distinct BIZSEQID,BUSTYPE,SIGNUSERID, date_format(SIGNTIME,'%Y-%m-%d') as SIGNTIME, rs.zs, rs2.orgn
from aiccs.tstasklist ts
left join (
select BIZSEQ,count(*) as zs from aiccs.tsbizPunishLock t
where exists (select 1 from aiccs.tstasklist t2 where t.BIZSEQ = t2.BIZSEQID )
group by BIZSEQ
select BIZSEQ,count(*) as zs from aiccs.tsbizPunishLock t
where exists (select 1 from aiccs.tstasklist t2 where t.BIZSEQ = t2.BIZSEQID )
group by BIZSEQ
) rs on ts.bizseqid = rs.bizseq
left join (
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
) rs2 on ts.SIGNUSERID = rs2.userid
where ts.BUSSTATUS !=4
and ts.BUSTYPE = '61'
@ -1349,13 +1348,13 @@
select distinct BIZSEQID,BUSTYPE,SIGNUSERID, date_format(SIGNTIME,'%Y-%m-%d') as SIGNTIME, rs.zs, rs2.orgn
from aiccs.tstasklist ts
left join (
select BIZSEQ,count(*) as zs from aiccs.tsbizpunishunlock t
where exists (select 1 from aiccs.tstasklist t2 where t.BIZSEQ = t2.BIZSEQID )
group by BIZSEQ
select BIZSEQ,count(*) as zs from aiccs.tsbizpunishunlock t
where exists (select 1 from aiccs.tstasklist t2 where t.BIZSEQ = t2.BIZSEQID )
group by BIZSEQ
) rs on ts.bizseqid = rs.bizseq
left join (
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
) rs2 on ts.SIGNUSERID = rs2.userid
where ts.BUSSTATUS !=4
and ts.BUSTYPE = '62'
@ -1385,8 +1384,8 @@
group by BIZSEQ
) rs on ts.bizseqid = rs.bizseq
left join (
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
select tu.userid, left(tog.orgNumber,6) as orgn from cxaicorg.t_users tu
left join cxaicorg.t_orgunits tog on tu.orgunitid = tog.orgunitid
) rs2 on ts.SIGNUSERID = rs2.userid
where ts.BUSSTATUS !=4
and ts.BUSTYPE = '51'
@ -1430,13 +1429,13 @@
<select id="querybyperson" resultMap="BaseResultMap">
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}
</select>
<select id="querybyoperator" resultMap="BaseResultMap">
select eb.* from crgs.e_pb_operator 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}
</select>
@ -1468,23 +1467,23 @@
<!-- 查询法人电话号码 -->
<select id="queryEpriPersonList" resultType="java.util.Map">
select
tel as "phone"
tel as "phone"
from crgs.e_pri_person
where pripid = #{pripid} and lerepsign = '1'
</select>
<select id="listIndividualLocaladm" resultType="java.util.Map">
SELECT aeb.pripid as "pripid",aeb.ENTNAME as "entname",aeb.regulatory_name_temp as "regulatoryName",aeb.regulatory_temp as "regulatory",
pb.LOCALADM as "pdRegulatory",t.ORGUNITNAME as "pdRegulatoryName"
pb.LOCALADM as "pdRegulatory",t.ORGUNITNAME as "pdRegulatoryName"
FROM AICCS.E_BASEINFO aeb LEFT JOIN CRGS.E_PB_BASEINFO pb ON aeb.PRIPID = pb.PRIPID
LEFT join cxaicorg.t_orgunits t ON pb.LOCALADM = t.ORGNUMBER
LEFT join cxaicorg.t_orgunits t ON pb.LOCALADM = t.ORGNUMBER
WHERE aeb.ENTTYPE in('9910','9500') AND aeb.REGSTATE = '1'
AND (
AND (
aeb.REGULATORY_TEMP IS NULL
OR aeb.REGULATORY_TEMP IN ('440104','440105','440106','440110','440111','440112','440121','440122','440125','440126','440103','44010300','440115','440129',
'44010400','44010500','44010600','44011000','44011100','44011200','44012100','44012200','44012500','44012600','44011500','44012900',
'440101','440100','44010100','44010000')
)
OR aeb.REGULATORY_TEMP IN ('440104','440105','440106','440110','440111','440112','440121','440122','440125','440126','440103','44010300','440115','440129',
'44010400','44010500','44010600','44011000','44011100','44011200','44012100','44012200','44012500','44012600','44011500','44012900',
'440101','440100','44010100','44010000')
)
</select>
<!-- 强制注销企业查询结果映射 -->
@ -1595,25 +1594,5 @@
</if>
</select>
<!-- 根据惩罚信息查询企业基本信息列表 -->
<select id="selectEBaseinfoListWithPunInfo" resultMap="BaseResultMap">
SELECT b.*, a.id AS caseId
FROM CRGS.tb_ilc_pun_info_query a
LEFT JOIN aiccs.e_baseinfo b ON a.UNISCID = b.UNISCID
WHERE a.schecktype = '1'
<if test="uscc != null and uscc != ''">
<choose>
<when test='@com.chinaweal.aiccs.common.util.StringUtils@isUscc(uscc)'>
AND b.UNISCID = #{uscc}
</when>
<otherwise>
AND b.REGNO = #{uscc}
</otherwise>
</choose>
</if>
<if test="entName != null and entName != ''">
AND b.ENTNAME = #{entName}
</if>
</select>
</mapper>

View File

@ -38,9 +38,6 @@
<result column="caseSource" property="caseSource"/>
<result column="contactEntity" property="contactEntity"/>
<result column="contactMethodOrg" property="contactMethodOrg"/>
<result column="CLUETYPE" property="clueType"/>
<result column="CLUEID" property="clueId"/>
<result column="ISCHECK" property="ischeck"/>
</resultMap>
<resultMap id="ReasonEntTypeMap" type="com.chinaweal.aiccs.aiccs.abnormal.entity.dto.ReasonEntTypeDto">
@ -733,9 +730,9 @@
</sql>
<select id="queryTSAbnByREMDATE" parameterType="String" resultMap="BaseResultMap">
select * from tsabnlist t where OPERATESTATUS = '0'
and SPECAUSE ='4'
and REMDATE > DATE_SUB(CURDATE(), INTERVAL 1 YEAR)
and PRIPID = #{pripid}
and SPECAUSE ='4'
and REMDATE > DATE_SUB(CURDATE(), INTERVAL 1 YEAR)
and PRIPID = #{pripid}
</select>
<select id="queryOneByPripid" parameterType="String" resultMap="BaseResultMap">
@ -747,21 +744,21 @@
<include refid="Base_Column_List"/>
from tsabnlist
<where>
<if test="params.uniscid != null and params.uniscid != '' ">
and uniscid = #{params.uniscid}
</if>
<if test="params.regno != null and params.regno != '' ">
and regno = #{params.regno}
</if>
<if test="params.entType != null">
<if test="params.entType eq 'individual'">
and enttype in ('9910', '9999')
</if>
<if test="params.entType eq 'farmer'">
and enttype not in ('9910', '9999','8000','8100','8200','8300','9000','99100','99101','99102','99103', '9999')
<if test="params.uniscid != null and params.uniscid != '' ">
and uniscid = #{params.uniscid}
</if>
</if>
and OPERATESTATUS = '1'
<if test="params.regno != null and params.regno != '' ">
and regno = #{params.regno}
</if>
<if test="params.entType != null">
<if test="params.entType eq 'individual'">
and enttype in ('9910', '9999')
</if>
<if test="params.entType eq 'farmer'">
and enttype not in ('9910', '9999','8000','8100','8200','8300','9000','99100','99101','99102','99103', '9999')
</if>
</if>
and OPERATESTATUS = '1'
</where>
order by LAUPTIME desc
</select>
@ -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>
<select id="selectByRemDate" resultType="String">
@ -852,7 +849,7 @@
<select id="queryByPripidAndDate" resultMap="BaseResultMap">
select * from aiccs.tsabnlist where pripid = #{pripid}
and date_format(abntime, '%Y-%m-%d') = #{date}
and date_format(abntime, '%Y-%m-%d') = #{date}
</select>
<select id="statistics" resultType="Map">

View File

@ -4,69 +4,41 @@
<select id="statistics" resultType="java.util.Map">
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>
<select id="getListByPripid" resultType="com.chinaweal.aiccs.aiccs.market.entity.TSUsualInspect">
@ -75,40 +47,40 @@
<select id="queryHistroyListByPripid" resultType="com.chinaweal.aiccs.aiccs.market.entity.TSUsualInspect">
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}
</select>
<select id="getCheckAndRevResult" resultType="com.chinaweal.aiccs.aiccs.revoke.Vo.EnableListAndCheckVo">
select e.uscc, e.entname, e.regOrgCN, e.supOrgCn, t.inspectResult as checkResult,
CASE t.status
WHEN '0' THEN '1'
WHEN '1' THEN '2'
ELSE '0' END as checkStatus,
CASE t.status
WHEN '0' THEN '待检查'
WHEN '1' THEN '已检查'
ELSE '无现场检查任务' END as checkStatusCN from tsusualinspect t
left join tsusualinspectentlist e
on t.bizSeq = e.bizSeq
CASE t.status
WHEN '0' THEN '1'
WHEN '1' THEN '2'
ELSE '0' END as checkStatus,
CASE t.status
WHEN '0' THEN '待检查'
WHEN '1' THEN '已检查'
ELSE '无现场检查任务' END as checkStatusCN from tsusualinspect t
left join tsusualinspectentlist e
on t.bizSeq = e.bizSeq
where e.pripid = #{pripid} and t.source = '批量吊销' and t.status in ('0', '1')
order by t.create_time desc limit 1
</select>

View File

@ -37,13 +37,13 @@
NOOPENSTATE, INSERTTIME, LAUPTIME,PRE_PUN_DEC_WRITSNO,PRE_HEAR_NOT_WRITSNO
</sql>
<!-- <select id="selectFirstEnt" resultType="com.chinaweal.aiccs.aiccs.revoke.entity.Tsbizrevlist">-->
<!-- select <include refid="Base_Column_List"/>-->
<!-- from biz_rev_ent-->
<!-- where BIZSEQ = #{bizseq} and ISREMOVE = '0'-->
<!-- order by INSERTTIME desc-->
<!-- </select>-->
<!-- <select id="selectFirstEnt" resultType="com.chinaweal.aiccs.aiccs.revoke.entity.Tsbizrevlist">-->
<!-- select <include refid="Base_Column_List"/>-->
<!-- from biz_rev_ent-->
<!-- where BIZSEQ = #{bizseq} and ISREMOVE = '0'-->
<!-- order by INSERTTIME desc-->
<!-- </select>-->
<insert id="insertOrUpdateBatch" parameterType="java.util.List">
insert into biz_rev_ent (REVLISTID,PRE_PUN_DEC_WRITSNO,LAUPTIME) values
<foreach collection="list" index="index" item="item" separator=",">
@ -57,31 +57,13 @@
<select id="selectBizEntAttachList" parameterType="java.lang.String" resultType="com.chinaweal.aiccs.aiccs.revoke.entity.dto.BizRevEntAttachDto">
SELECT b.REVLISTID, b.BIZSEQ, b.UNISCID, b.PRIPID, b.REGNO, b.ENTNAME, b.NAME, ENTTYPE, ENTTYPE_CN, b.REMNO, ISREMOVE, REMOVEREASON,
b.REMOVETIME, b.REMHANDLER, ISHEARING, ISHEARINGPUBLISH, HEARINGPUBLISHDATE, ISDECISIONPUBLISH, DECISIONPUBLISHDATE,
NOOPENSTATE, INSERTTIME, b.LAUPTIME,PRE_PUN_DEC_WRITSNO,PRE_HEAR_NOT_WRITSNO,a.ATTACHMENTID
b.REMOVETIME, b.REMHANDLER, ISHEARING, ISHEARINGPUBLISH, HEARINGPUBLISHDATE, ISDECISIONPUBLISH, DECISIONPUBLISHDATE,
NOOPENSTATE, INSERTTIME, b.LAUPTIME,PRE_PUN_DEC_WRITSNO,PRE_HEAR_NOT_WRITSNO,a.ATTACHMENTID
FROM biz_rev_ent b
LEFT JOIN tsattachment a on a.BIZSEQ = b.BIZSEQ and a.pripid = b.pripid
LEFT JOIN tsattachment a on a.BIZSEQ = b.BIZSEQ and a.pripid = b.pripid
WHERE a.BIZSEQ = #{bizseq} and a.ATTACHTYPE = #{attachType} and b.ISREMOVE = '0'
order by INSERTTIME asc
</select>
<select id="selectBizEntAttachListWithPagination" parameterType="java.lang.String" resultType="com.chinaweal.aiccs.aiccs.revoke.entity.dto.BizRevEntAttachDto">
SELECT b.REVLISTID, b.BIZSEQ, b.UNISCID, b.PRIPID, b.REGNO, b.ENTNAME, b.NAME, ENTTYPE, ENTTYPE_CN, b.REMNO, ISREMOVE, REMOVEREASON,
b.REMOVETIME, b.REMHANDLER, ISHEARING, ISHEARINGPUBLISH, HEARINGPUBLISHDATE, ISDECISIONPUBLISH, DECISIONPUBLISHDATE,
NOOPENSTATE, INSERTTIME, b.LAUPTIME,PRE_PUN_DEC_WRITSNO,PRE_HEAR_NOT_WRITSNO,a.ATTACHMENTID
FROM biz_rev_ent b
LEFT JOIN tsattachment a on a.BIZSEQ = b.BIZSEQ and a.pripid = b.pripid
WHERE a.BIZSEQ = #{bizseq} and a.ATTACHTYPE = #{attachType} and b.ISREMOVE = '0'
order by INSERTTIME asc
LIMIT #{offset}, #{limit}
</select>
<select id="countBizEntAttach" parameterType="java.lang.String" resultType="int">
SELECT COUNT(*)
FROM biz_rev_ent b
LEFT JOIN tsattachment a on a.BIZSEQ = b.BIZSEQ and a.pripid = b.pripid
WHERE a.BIZSEQ = #{bizseq} and a.ATTACHTYPE = #{attachType} and b.ISREMOVE = '0'
</select>
</mapper>

View File

@ -45,7 +45,6 @@
<result column="JUDDOCTITLE" property="juddoctitle" />
<result column="JUDDOCNO" property="juddocno" />
<result column="isshow" property="isshow" />
<result column="caseId" property="caseId" />
</resultMap>
<resultMap id="uniTaskListMap" type="com.chinaweal.aiccs.common.base.entity.dto.task.UniTaskListDto">
@ -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
</sql>
<select id="selectEntList" parameterType="com.chinaweal.aiccs.aiccs.seriousillegal.entity.TSSerIllegalList" resultMap="BaseResultMap">
@ -333,21 +332,21 @@
<select id="selectUniIllegalTaskListPage" resultMap="uniTaskListMap">
<!--列入-->
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
<include refid="uniIllegalWhere"/>
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
<include refid="uniIllegalWhere"/>
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
<include refid="uniIllegalWhere"/>
@ -364,7 +363,7 @@
<if test="params.uscc != null and params.uscc != ''">
and (
e.uniscid like concat('%', #{params.uscc} ,'%')
or
or
e.regno like concat('%', #{params.uscc} ,'%')
)
</if>
@ -457,24 +456,24 @@
<select id="queryAbnormalLrList" resultMap="BaseResultMap">
SELECT t.ILLEGALLISTID, t.BIZSEQ, t.ABNLISTID, t.PRIPID, t.REGNO, t.ENTNAME, t.SERILLREA, t.ABNTIME,
t.REMEXCPRES, t.REMDATE, t.DECORG, t.AREA_CODE, t.LAUPTIME, t.LOSTCREDITEXPLAIN, t.LOSTCREDITEXPLAINREM,
t.ReconsiderationOrg, t.GovernmentOrg, t.LitiOrg, t.intoSponsorIllegal, t.remSponsorIllegal ,w.writsno as writsno
t.REMEXCPRES, t.REMDATE, t.DECORG, t.AREA_CODE, t.LAUPTIME, t.LOSTCREDITEXPLAIN, t.LOSTCREDITEXPLAINREM,
t.ReconsiderationOrg, t.GovernmentOrg, t.LitiOrg, t.intoSponsorIllegal, t.remSponsorIllegal ,w.writsno as writsno
from tsserillegallist t,tswrit w
where t.BIZSEQ = w.BIZSEQ
and t.PRIPID = w.PRIPID
and w.WRITSTYPE = '21'
and t.remdate is null
and t.PRIPID = w.PRIPID
and w.WRITSTYPE = '21'
and t.remdate is null
</select>
<select id="queryAbnormalYcList" resultMap="BaseResultMap">
SELECT t.ILLEGALLISTID, t.BIZSEQ, t.ABNLISTID, t.PRIPID, t.REGNO, t.ENTNAME, t.SERILLREA, t.ABNTIME,
t.REMEXCPRES, t.REMDATE, t.DECORG, t.AREA_CODE, t.LAUPTIME, t.LOSTCREDITEXPLAIN, t.LOSTCREDITEXPLAINREM,
t.ReconsiderationOrg, t.GovernmentOrg, t.LitiOrg, t.intoSponsorIllegal, t.remSponsorIllegal ,w.writsno as writsno
t.REMEXCPRES, t.REMDATE, t.DECORG, t.AREA_CODE, t.LAUPTIME, t.LOSTCREDITEXPLAIN, t.LOSTCREDITEXPLAINREM,
t.ReconsiderationOrg, t.GovernmentOrg, t.LitiOrg, t.intoSponsorIllegal, t.remSponsorIllegal ,w.writsno as writsno
from tsserillegallist t,tswrit w
where t.BIZSEQ = w.BIZSEQ
and t.PRIPID = w.PRIPID
and w.WRITSTYPE = '25'
and t.remdate is not null
and t.PRIPID = w.PRIPID
and w.WRITSTYPE = '25'
and t.remdate is not null
</select>
<!-- 严重违法拟列入文书公示 -->
<select id="queryToIllegalByNameList" resultType="com.chinaweal.aiccs.aiccs.abnormal.entity.dto.EntWritsDto">
@ -512,19 +511,19 @@
<select id="queryByzdyc" resultMap="BaseResultMap">
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
</select>
<select id="countBySerill" resultType="int">
select count(*) from aiccs.tsabnlist where
pripid = #{pripid}
and abntime = #{abntime}
and SPECAUSE = #{SPECAUSE}
and SPEREASONS = #{SPEREASONS}
and OPERATESTATUS = #{OPERATESTATUS}
pripid = #{pripid}
and abntime = #{abntime}
and SPECAUSE = #{SPECAUSE}
and SPEREASONS = #{SPEREASONS}
and OPERATESTATUS = #{OPERATESTATUS}
</select>
<insert id="saveabnlistid">

View File

@ -220,7 +220,7 @@
<select id="staticFraudYear" resultType="java.util.Map">
select count(*) num, DATE_FORMAT(bf.create_time, '%Y') years
from (t_fraud_ent fe
join t_biz_fraud bf)
join t_biz_fraud bf)
where ((fe.bizSeq = bf.bizSeq) and (bf.linkType = '4'))
GROUP BY years
</select>
@ -229,7 +229,7 @@
<select id="staticFraudType" resultType="java.util.Map">
select count(*) num, bf.complaintReason
from (t_fraud_ent fe
join t_biz_fraud bf)
join t_biz_fraud bf)
where ((fe.bizSeq = bf.bizSeq) and (bf.linkType = '4'))
GROUP BY bf.complaintReason
</select>
@ -244,19 +244,16 @@
<!-- 协同监管结果分析-->
<select id="staticTsusualinspectType" resultType="java.util.Map">
SELECT
count(case when inspectResult LIKE '%0%' then 1 else null end) zero, -- 0=未发现问题
count(case when inspectResult LIKE '%1%' then 1 else null end) one, -- 1=未按规定公示应当公示的信息
count(case when inspectResult LIKE '%2%' then 1 else null end) two, -- 2=通过登记的住所(经营场所)无法联系
count(case when inspectResult LIKE '%3%' then 1 else null end) three, -- 3=不配合检查情节严重
count(case when inspectResult LIKE '%4%' then 1 else null end) four, -- 4=未发现开展本次抽查涉及的经营活动
count(case when inspectResult LIKE '%5%' then 1 else null end) five, -- 5=发现问题,依法责令立即改正或者限期改正
count(case when inspectResult LIKE '%6%' then 1 else null end) six, -- 6=发现问题,待后续调查处理
count(case when inspectResult LIKE '%7%' then 1 else null end) seven, -- 7=合格
count(case when inspectResult LIKE '%8%' then 1 else null end) eight, -- 8=不合格
count(case when inspectResult LIKE '%9%' then 1 else null end) nine -- 9=其他情况
SELECT count(case when inspectResult LIKE '%1%' then 1 else null end) one,
count(case when inspectResult LIKE '%2%' then 1 else null end) two,
count(case when inspectResult LIKE '%3%' then 1 else null end) three,
count(case when inspectResult LIKE '%4%' then 1 else null end) four,
count(case when inspectResult LIKE '%5%' then 1 else null end) five,
count(case when inspectResult LIKE '%6%' then 1 else null end) six,
count(case when inspectResult LIKE '%7%' then 1 else null end) seven,
count(case when inspectResult LIKE '%8%' then 1 else null end) eight
FROM tsusualinspect
WHERE status = '1';
WHERE status = '1'
-- SELECT inspectResult, count(*) num FROM tsusualinspect WHERE status = '1' GROUP BY inspectResult
</select>