| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567 |
- package cn.com.goldenwater.dcproj.controller.pblm;
- import cn.com.goldenwater.core.web.BaseController;
- import cn.com.goldenwater.core.web.BaseResponse;
- import cn.com.goldenwater.dcproj.constValue.AdCodeLabel;
- import cn.com.goldenwater.dcproj.constValue.BisInspEnum;
- import cn.com.goldenwater.dcproj.constValue.BisInspObjEnum;
- import cn.com.goldenwater.dcproj.constValue.CommonLabel;
- import cn.com.goldenwater.dcproj.dao.BisInspPblmDao;
- import cn.com.goldenwater.dcproj.dao.BisInspPblmRepeatDao;
- import cn.com.goldenwater.dcproj.dao.BisInspRsvrRgstrRepeatDao;
- import cn.com.goldenwater.dcproj.dto.*;
- import cn.com.goldenwater.dcproj.model.*;
- import cn.com.goldenwater.dcproj.param.*;
- import cn.com.goldenwater.dcproj.service.*;
- import cn.com.goldenwater.dcproj.target.Authority;
- import cn.com.goldenwater.dcproj.utils.AdLevelUtil;
- import cn.com.goldenwater.dcproj.utils.InspPblmUtils;
- import cn.com.goldenwater.dcproj.utils.InspUtils;
- import cn.com.goldenwater.target.CheckException;
- import cn.com.goldenwater.util.common.SqlUtils;
- import com.github.pagehelper.PageInfo;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import io.swagger.annotations.ApiParam;
- import org.apache.commons.lang3.StringUtils;
- import org.apache.poi.ss.usermodel.Row;
- import org.apache.poi.ss.usermodel.Sheet;
- import org.apache.poi.xssf.usermodel.XSSFWorkbook;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.beans.factory.annotation.Value;
- import org.springframework.web.bind.annotation.*;
- import org.springframework.web.multipart.MultipartFile;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import java.io.FileInputStream;
- import java.io.IOException;
- import java.io.InputStream;
- import java.net.URLEncoder;
- import java.text.SimpleDateFormat;
- import java.util.*;
- /**
- * @author lune
- * @date 2019-2-18
- */
- @Api(value = "APP 督查问题管理", tags = "APP 督查问题管理")
- @RestController
- @RequestMapping("/dc/insp/pblm")
- public class BisInspPblmController extends BaseController {
- private Logger logger = LoggerFactory.getLogger(getClass());
- @Autowired
- private OlBisInspOrgService olBisInspOrgService;
- @Autowired
- private BisInspPblmService bisInspPblmService;
- @Autowired
- private ObjInspPblmsService objInspPblmsService;
- @Autowired
- private GwComFileService gwComFileService;
- @Autowired
- private BisInspAllRlationPersService inspAllRlationPersService;
- @Autowired
- private BisZhejiangVillRgstrService bisZhejiangVillRgstrService;
- @Autowired
- private BisInspMfdpRgstrService bisInspMfdpRgstrService;
- @Autowired
- private BisNewVillRgstrService bisNewVillRgstrService;
- @Autowired
- private BisInspWtdstTrackService bisInspWtdstTrackService;
- @Autowired
- private BisInspChmclsUseunitwkService bisInspChmclsUseunitwkService;
- @ApiOperation(value = "添加(修改)督查问题管理")
- @RequestMapping(value = "", method = RequestMethod.POST)
- public BaseResponse<BisInspPblm> insert(@ApiParam(name = "bisInspPblm", value = "bisInspPblm", required = true)
- @RequestBody BisInspPblm bisInspPblm) {
- bisInspPblm.setOrgId(getCurrentOrgId());
- bisInspPblm.setRecPers(getCurrentPersId());
- if (StringUtils.isNotBlank(bisInspPblm.getPblmsTypeId()) &&
- !BisInspEnum.EMPWT.getValue().equals(bisInspPblm.getObjType())) {
- bisInspPblm.setPblmsTypeId(bisInspPblm.getPblmsTypeId().trim());
- ObjInspPblms objInspPblms = objInspPblmsService.get(bisInspPblm.getPblmsTypeId());
- if (objInspPblms != null) {
- bisInspPblm.setInspPblmCode(objInspPblms.getSn());
- bisInspPblm.setInspPblmType(objInspPblms.getSort2());
- bisInspPblm.setCheckPointBz(objInspPblms.getCheckPoint());
- bisInspPblm.setPblmDescBz(objInspPblms.getPblmDesc());
- bisInspPblm.setPblmNameBz(objInspPblms.getInspPblmsName());
- bisInspPblm.setSnNumBz(objInspPblms.getSnNum());
- bisInspPblm.setFileNo(objInspPblms.getAttach());
- bisInspPblm.setFileNoNumber(objInspPblms.getSnNum());
- bisInspPblm.setScore(objInspPblms.getScore());
- bisInspPblm.setSnNum(objInspPblms.getSnNum());
- }
- }
- if (BisInspEnum.VILL2020.getValue().equals(bisInspPblm.getObjType())) {
- if (BisInspObjEnum.CWS2020.getDesc().equals(bisInspPblm.getInspPblmName())) {
- bisInspPblm.setVillType(BisInspObjEnum.CWS2020.getValue());
- }
- if (BisInspObjEnum.CWS2020LAW.getDesc().equals(bisInspPblm.getInspPblmName())) {
- bisInspPblm.setVillType(BisInspObjEnum.CWS2020LAW.getValue());
- }
- if (BisInspObjEnum.CWS2020WATER.getDesc().equals(bisInspPblm.getInspPblmName())) {
- bisInspPblm.setVillType(BisInspObjEnum.CWS2020WATER.getValue());
- }
- }
- if (StringUtils.isNotBlank(bisInspPblm.getPblmId())) {
- // 修改问题
- if (BisInspEnum.EMPWT.getValue().equals(bisInspPblm.getObjType()) ||
- BisInspEnum.EMPWTRUN.getValue().equals(bisInspPblm.getObjType())) {
- if (StringUtils.isBlank(bisInspPblm.getPblmsId())) {
- bisInspPblm.setPblmsId(CommonLabel.INIT_DATA);
- }
- if (StringUtils.isBlank(bisInspPblm.getPblmsTypeId())) {
- bisInspPblm.setPblmsTypeId(CommonLabel.INIT_DATA);
- }
- if (StringUtils.isBlank(bisInspPblm.getQualityTypeId())) {
- bisInspPblm.setQualityTypeId(CommonLabel.INIT_DATA);
- }
- if (StringUtils.isBlank(bisInspPblm.getDefectTypeId())) {
- bisInspPblm.setDefectTypeId(CommonLabel.INIT_DATA);
- }
- }
- bisInspPblmService.updatePblm(bisInspPblm);
- return buildSuccessResponse(200, "修改成功", bisInspPblm);
- }
- bisInspPblmService.insertPblms(bisInspPblm);
- return buildSuccessResponse(bisInspPblm);
- }
- @ApiOperation(value = "问题列表")
- @RequestMapping(value = "/listWithImg", method = RequestMethod.POST)
- public BaseResponse listWithImg(@ApiParam(name = "bisInspPblm", value = "BisInspPblm", required = true)
- @RequestBody PlbmParam pblmParam) {
- pblmParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- pblmParam.setOrgId(getCurrentOrgId());
- pblmParam.setOrderBy("COLL_TIME DESC");
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPageList(pblmParam);
- inspPblmList.getList().forEach(pblm -> {
- List<GwComFile> gwComFileList = gwComFileService.getImgByBizId(pblm.getPblmId(), 1);
- if (null != gwComFileList && gwComFileList.size() > 0) {
- pblm.setImg(gwComFileList.stream()
- .map(GwComFile::getFilePath)
- .filter(StringUtils::isNotBlank)
- .findFirst()
- .map(o -> o.replaceAll("\\\\", "/").replaceAll("//", "/"))
- .orElse(null));
- }
- });
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "批量修改问题状态 比传objid,类型ID,状态值")
- @RequestMapping(value = "/updatePblmState", method = RequestMethod.POST)
- public BaseResponse<List<BisInspPblmParam>> updatePblmState(@ApiParam(name = "bisInspPblm", value = "bisInspPblm", required = true)
- @RequestBody List<BisInspPblmParam> bisInspPblmParams) throws Exception {
- for (BisInspPblmParam bisInspPblm : bisInspPblmParams) {
- bisInspPblmService.updatePblmState(bisInspPblm);
- }
- return buildSuccessResponse(bisInspPblmParams);
- }
- @ApiOperation(value = "根据ID删除和用户id督查问题管理")
- @RequestMapping(value = "/delete/{id}/{presId}", method = RequestMethod.GET)
- public Object delete(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id, @ApiParam(name = "presId", value = "presId", required = true) @PathVariable String presId) {
- BisInspPblm inspPblm = bisInspPblmService.get(id);
- if (inspPblm != null) {
- bisInspPblmService.delete(id);
- Map<String, String> params = new HashMap<>(1);
- params.put("data", "删除成功");
- return buildSuccessResponse(params);
- }
- return buildFailResponse("已删除,该问题清单已经不存在!!");
- }
- @ApiOperation(value = "问题处置通用查询")
- @RequestMapping(value = "/chuzhi/pblmPage", method = RequestMethod.POST)
- public BaseResponse pblmPage(@ApiParam(name = "bisInspVo", value = "bisInspVo", required = true) @RequestBody BisInspVo bisInspVo) {
- bisInspVo.setObjType(String.valueOf(Integer.parseInt(bisInspVo.getObjType())));
- String curPersId = getCurrentPersId();
- BisInspAllRlationPers allRlationPers = inspAllRlationPersService.get(curPersId);
- if (allRlationPers != null && StringUtils.isNotBlank(allRlationPers.getProvince())) {
- String province = allRlationPers.getProvince().replace(AdCodeLabel.START_PARENT_ADCODE, "");
- bisInspVo.setProvince(province);
- }
- String curOrgId = getCurrentOrgId();
- if (StringUtils.isNotBlank(curOrgId)) {
- OlBisInspOrg olBisInspOrg = inspOrgService.get(curOrgId);
- if (olBisInspOrg == null) {
- return buildFailResponse("传入参数有误!");
- }
- bisInspVo.setOrgId("");
- bisInspVo.setBelongOrgId(olBisInspOrg.getOrgId());
- String adCode = olBisInspOrg.getAdCode().replace("00", "");
- bisInspVo.setAdCode(adCode);
- if ("80df1213ad9f493e85a771d6f4b18a17".equals(curPersId)) {
- bisInspVo.setProvince(AdLevelUtil.getAddvcd(olBisInspOrg.getRlcode()));
- }
- PageInfo<BisInspVo> retCountPageInfo = new PageInfo<>();
- if (StringUtils.isNotBlank(bisInspVo.getObjAdCode())) {
- bisInspVo.setObjAdCode(AdLevelUtil.getAddvcd(bisInspVo.getObjAdCode()));
- }
- if (StringUtils.isBlank(bisInspVo.getState()) || "0".equals(bisInspVo.getState())) {
- retCountPageInfo = bisInspPblmService.pblmPage(bisInspVo);
- } else {
- retCountPageInfo = bisInspPblmService.pblmRectPage(bisInspVo);
- }
- return buildSuccessResponse(retCountPageInfo);
- }
- return buildFailResponse("参数缺失");
- }
- @ApiOperation(value = "更新督查问题管理信息")
- @RequestMapping(value = "/update", method = RequestMethod.POST)
- public BaseResponse update(@ApiParam(name = "bisInspPblm", value = "bisInspPblm", required = true)
- @RequestBody BisInspPblm bisInspPblm) {
- insert(bisInspPblm);
- return buildSuccessResponse(bisInspPblm);
- }
- @ApiOperation(value = "查询人饮问题类型")
- @RequestMapping(value = "/findVillType", method = RequestMethod.GET)
- public BaseResponse<List<String>> findVillType() {
- List<String> inspPblmNames = bisInspPblmService.findVillType(getCurrentOrgId());
- return buildSuccessResponse(inspPblmNames);
- }
- @ApiOperation(value = "根据用户id查找分离用户问题如为督查人员问题还是督查办问题统计")
- @RequestMapping(value = "/seperatePblm", method = RequestMethod.GET)
- public BaseResponse<List<PblmRole>> seperatePblm(@ApiParam(name = "persId", value = "persId", required = true) @RequestParam String persId) {
- List<PblmRole> roleList = bisInspPblmService.findPblmByPersId(persId, getCurrentOrgId());
- List<PblmRole> roleListNew = new ArrayList<>();
- for (PblmRole pblmRole : roleList) {
- if ("1".equals(pblmRole.getPerType())) {
- pblmRole.setLength(6);
- } else {
- pblmRole.setLength(12);
- }
- //适配app端
- pblmRole.setId(pblmRole.getId() + "01");
- if (!roleListNew.contains(pblmRole)) {
- roleListNew.add(pblmRole);
- }
- }
- return buildSuccessResponse(roleListNew);
- }
- @ApiOperation(value = "统计小水库问题-问题详情图表-分页")
- @RequestMapping(value = "/countByReverPage", method = RequestMethod.POST)
- public BaseResponse<PageInfo<PblmRetCount>> countByReverPage(@ApiParam(name = "countParam", value = "countParam", required = true) @RequestBody CountParam countParam) {
- countParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- countParam.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(countParam.getpType())) {
- countParam.setpType("1");
- }
- countParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<PblmRetCount> retCountPageInfo = bisInspPblmService.countByReverPage(countParam);
- return buildSuccessResponse(retCountPageInfo);
- }
- @ApiOperation(value = "统计小水闸问题-问题详情图表-分页")
- @RequestMapping(value = "/countByWagaPage", method = RequestMethod.POST)
- public BaseResponse<PageInfo<PblmRetCount>> countByWagaPage(@ApiParam(name = "countParam", value = "countParam", required = true) @RequestBody CountParam countParam) {
- countParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- countParam.setOrgId(getCurrentOrgId());
- countParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<PblmRetCount> retCountPageInfo = bisInspPblmService.countByWagaPage(countParam);
- return buildSuccessResponse(retCountPageInfo);
- }
- @ApiOperation(value = "(督查人员与流域机构共有)统计172重点工程(pType=4工程建设,pType=7工程运行)问题-问题详情图表-分页")
- @RequestMapping(value = "/countByKeyRegPage", method = RequestMethod.POST)
- public BaseResponse<PageInfo<PblmRetCount>> countByKeyRegPage(@ApiParam(name = "countParam", value = "countParam", required = true) @RequestBody CountParam countParam) {
- countParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- countParam.setOrgId(getCurrentOrgId());
- countParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<PblmRetCount> retCountPageInfo = bisInspPblmService.countByKeyRegPage(countParam);
- return buildSuccessResponse(retCountPageInfo);
- }
- @ApiOperation(value = "统计淤地坝问题-问题统计")
- @RequestMapping(value = "/countBySdPage", method = RequestMethod.POST)
- public BaseResponse<PageInfo<PblmRetCount>> countBySdPage(@ApiParam(name = "countParam", value = "countParam", required = true) @RequestBody CountParam countParam) {
- countParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- countParam.setOrgId(getCurrentOrgId());
- countParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<PblmRetCount> pageInfo = bisInspPblmService.countBySdPage(countParam);
- return buildSuccessResponse(pageInfo);
- }
- @ApiOperation(value = "统计水源地问题-问题统计")
- @RequestMapping(value = "/countBySwhsPage", method = RequestMethod.POST)
- public BaseResponse<PageInfo<PblmRetCount>> countBySwhsPage(@ApiParam(name = "countParam", value = "countParam", required = true) @RequestBody CountParam countParam) {
- countParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- countParam.setOrgId(getCurrentOrgId());
- countParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<PblmRetCount> pageInfo = bisInspPblmService.countBySwhsPage(countParam);
- return buildSuccessResponse(pageInfo);
- }
- @ApiOperation(value = "统计取用水户问题-问题统计")
- @RequestMapping(value = "/countByWiuPage", method = RequestMethod.POST)
- public BaseResponse<PageInfo<PblmRetCount>> countByWiuPage(@ApiParam(name = "countParam", value = "countParam", required = true) @RequestBody CountParam countParam) {
- countParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- countParam.setOrgId(getCurrentOrgId());
- countParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<PblmRetCount> pageInfo = bisInspPblmService.countByWiuPage(countParam);
- return buildSuccessResponse(pageInfo);
- }
- @ApiOperation(value = "统计取水保督查问题-问题统计")
- @RequestMapping(value = "/countByPrdPage", method = RequestMethod.POST)
- public BaseResponse<PageInfo<PblmRetCount>> countByPrdPage(@ApiParam(name = "countParam", value = "countParam", required = true) @RequestBody CountParam countParam) {
- countParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- countParam.setOrgId(getCurrentOrgId());
- countParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<PblmRetCount> pageInfo = bisInspPblmService.countByPrdPage(countParam);
- return buildSuccessResponse(pageInfo);
- }
- @ApiOperation(value = "统计河湖四乱核查问题-问题统计")
- @RequestMapping(value = "/countByJsflPage", method = RequestMethod.POST)
- public BaseResponse<PageInfo<PblmRetCount>> countByJsflPage(@ApiParam(name = "countParam", value = "countParam", required = true) @RequestBody CountParam countParam) {
- countParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- countParam.setOrgId(getCurrentOrgId());
- countParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<PblmRetCount> pageInfo = bisInspPblmService.countByJsflPage(countParam);
- return buildSuccessResponse(pageInfo);
- }
- @ApiOperation(value = "统计非法采砂核查问题-问题统计")
- @RequestMapping(value = "/countByJswaPage", method = RequestMethod.POST)
- public BaseResponse<PageInfo<PblmRetCount>> countByJswaPage(@ApiParam(name = "countParam", value = "countParam", required = true) @RequestBody CountParam countParam) {
- countParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- countParam.setOrgId(getCurrentOrgId());
- countParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<PblmRetCount> pageInfo = bisInspPblmService.countByJswaPage(countParam);
- return buildSuccessResponse(pageInfo);
- }
- @ApiOperation(value = "统计人饮工程问题-问题详情图表-分页")
- @RequestMapping(value = "/countByVillPage", method = RequestMethod.POST)
- public BaseResponse<PageInfo<VillCount>> countByVillPage(@ApiParam(name = "countParam", value = "countParam", required = true) @RequestBody CountParam countParam) {
- countParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- countParam.setOrgId(getCurrentOrgId());
- countParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<VillCount> retCountPageInfo = bisInspPblmService.countByVillPage(countParam);
- return buildSuccessResponse(retCountPageInfo);
- }
- @ApiOperation(value = "统计流域机构下人饮问题-问题详情图表")
- @RequestMapping(value = "/countVillByArea/{persId}", method = RequestMethod.GET)
- public BaseResponse<List<VillCount>> countVillByArea(@ApiParam(name = "persId", value = "persId", required = true) @PathVariable String persId) {
- List<VillCount> retCountPageInfo = bisInspPblmService.findVillPblmBYAreaId("002%", persId, getCurrentOrgId(), BisInspEnum.VILL.getValue());
- return buildSuccessResponse(retCountPageInfo);
- }
- @ApiOperation(value = "统计流域机构下小水闸问题-问题详情图表")
- @RequestMapping(value = "/countWagaByArea/{persId}", method = RequestMethod.GET)
- public BaseResponse<List<WagaTotal>> countWagaByArea(@ApiParam(name = "persId", value = "persId", required = true) @PathVariable String persId) {
- List<WagaTotal> retCountPageInfo = bisInspPblmService.findWagaPblmBYAreaId("006%", persId, getCurrentOrgId());
- return buildSuccessResponse(retCountPageInfo);
- }
- @ApiOperation(value = "统计流域机构下水毁问题-问题详情图表")
- @RequestMapping(value = "/countTrackByArea/{persId}", method = RequestMethod.GET)
- public BaseResponse<List<TrackCount>> countTrackByArea(@ApiParam(name = "persId", value = "persId", required = true) @PathVariable String persId) {
- List<TrackCount> retCountPageInfo = bisInspPblmService.findTrackPblmBYAreaId("003%", persId, getCurrentOrgId());
- return buildSuccessResponse(retCountPageInfo);
- }
- @ApiOperation(value = "统计水毁问题-问题详情图表-分页")
- @RequestMapping(value = "/countByTrackPage", method = RequestMethod.POST)
- public BaseResponse<PageInfo<TrackCount>> countByTrackPage(@ApiParam(name = "countParam", value = "countParam", required = true) @RequestBody CountParam countParam) {
- countParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- countParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<TrackCount> retCountPageInfo = bisInspPblmService.countByTrackPage(countParam);
- return buildSuccessResponse(retCountPageInfo);
- }
- @ApiOperation(value = "统计人饮问题-问题详情图表-分页-总计")
- @RequestMapping(value = "/totalVillCount/{persId}", method = RequestMethod.GET)
- public BaseResponse<VillCount> totalVillCount(@ApiParam(name = "persId", value = "persId", required = true) @PathVariable String persId) {
- List<VillTypeCount> typeCountList = bisInspPblmDao.totalCountVill(persId, getCurrentOrgId(), inspOrgService.getProvince(getCurrentOrgId()));
- VillCount villCount = new VillCount();
- villCount.setAdFullName("总计");
- int count = 0;
- for (VillTypeCount typeCount : typeCountList) {
- bisInspPblmService.setVillValue(villCount, typeCount, BisInspEnum.VILL.getValue());
- count += typeCount.getTotal();
- }
- villCount.setTotal(count);
- return buildSuccessResponse(villCount);
- }
- @ApiOperation(value = "统计水毁问题-问题详情图表-分页-总计")
- @RequestMapping(value = "/totalTrackCount/{persId}", method = RequestMethod.GET)
- public BaseResponse<TrackCount> totalTrackCount(@ApiParam(name = "persId", value = "persId", required = true) @PathVariable String persId) {
- List<TrackTypeCount> totalCountTrack = bisInspPblmDao.totalCountTrack(persId, getCurrentOrgId(), inspOrgService.getProvince(getCurrentOrgId()));
- TrackCount trackCount = new TrackCount();
- trackCount.setNm("总计");
- int count = 0;
- for (TrackTypeCount typeCount : totalCountTrack) {
- bisInspPblmService.setValue(trackCount, typeCount);
- count += typeCount.getTotal();
- }
- trackCount.setTotal(count);
- return buildSuccessResponse(trackCount);
- }
- @ApiOperation(value = "统计小水库问题-问题详情图表-分页-总计")
- @RequestMapping(value = "/totalCount/{persId}", method = RequestMethod.GET)
- public BaseResponse<PblmRetCount> countByReverPage(@ApiParam(name = "persId", value = "persId", required = true) @PathVariable String persId
- ) {
- List<CateTotal> cateTotals = bisInspPblmDao.totalCount(persId, "1", inspOrgService.getProvince(getCurrentOrgId()), getCurrentOrgId());
- return buildSuccessResponse(InspUtils.setPblmCount(cateTotals));
- }
- @ApiOperation(value = "统计小水闸问题-问题详情图表-分页-总计")
- @RequestMapping(value = "/totalWagaCount/{persId}", method = RequestMethod.GET)
- public BaseResponse<PblmRetCount> totalWagaCount(@ApiParam(name = "persId", value = "persId", required = true) @PathVariable String persId
- ) {
- List<CateTotal> cateTotals = bisInspPblmDao.totalCount(persId, "6", inspOrgService.getProvince(getCurrentOrgId()), getCurrentOrgId());
- return buildSuccessResponse(InspUtils.setPblmCount(cateTotals));
- }
- @ApiOperation(value = "统计72工程问题-问题详情图表-分页-总计,当流域机构统计时,不需要传入用户")
- @RequestMapping(value = "/totalKeyRegCount/{persId}/{pType}", method = RequestMethod.GET)
- public BaseResponse<PblmRetCount> totalKeyRegCount(@ApiParam(name = "persId", value = "persId", required = true) @PathVariable String persId,
- @ApiParam(name = "pType", value = "pType", required = true) @PathVariable String pType
- ) {
- if ("0".equals(persId)) {
- persId = "";
- }
- List<CateTotal> cateTotals = bisInspPblmDao.totalCount(persId, pType, inspOrgService.getProvince(getCurrentOrgId()), getCurrentOrgId());
- return buildSuccessResponse(InspUtils.setPblmCount(cateTotals));
- }
- @Autowired
- private AttAdXBaseService attAdXBaseService;
- @Autowired
- private BisInspRsvrRgstrService bisInspRsvrRgstrService;
- @Autowired
- private BisInspPblmRepeatDao pblmRepeatDao;
- @Autowired
- private BisInspRsvrRgstrRepeatDao rsvrRgstrRepeatDao;
- @ApiOperation(value = "根据ID获取督查问题管理(单表)")
- @RequestMapping(value = "/{id}", method = RequestMethod.GET)
- public BaseResponse get(@ApiParam(name = "id", value = "id", required = true)
- @PathVariable String id,
- HttpServletRequest request) {
- String repeat = request.getParameter("repeat");
- BisInspPblm bisInspPblm = null;
- if (StringUtils.isBlank(repeat)) {
- bisInspPblm = bisInspPblmService.get(id);
- if (bisInspPblm == null) {
- return buildSuccessResponse();
- }
- } else {
- bisInspPblm = pblmRepeatDao.get(id);
- }
- if (StringUtils.isNotBlank(bisInspPblm.getNm())) {
- bisInspPblm.setSrcDesc(bisInspPblm.getNm());
- }
- if (StringUtils.isNotBlank(bisInspPblm.getVillageCode())) {
- AttAdXBase attAdXBase = attAdXBaseService.get(bisInspPblm.getVillageCode());
- if (attAdXBase != null) {
- bisInspPblm.setSrcDesc(attAdXBase.getAdName());
- }
- }
- if (StringUtils.isNotBlank(bisInspPblm.getRegid()) && BisInspEnum.REVER.getValue().equals(bisInspPblm.getObjType())) {
- BisInspRsvrRgstr bisInspRsvrRgstr = null;
- if (StringUtils.isBlank(repeat)) {
- bisInspRsvrRgstr = bisInspRsvrRgstrService.get(bisInspPblm.getRegid());
- } else {
- bisInspRsvrRgstr = rsvrRgstrRepeatDao.get(bisInspPblm.getRegid());
- }
- if (bisInspRsvrRgstr != null) {
- bisInspPblm.setSrcDesc(bisInspRsvrRgstr.getRsvrNm());
- }
- }
- changePblm(bisInspPblm);
- List<GwComFile> gwComFiles = gwComFileService.findFileByBiz(bisInspPblm.getPblmId());
- bisInspPblm.setGwComFiles(gwComFiles);
- return buildSuccessResponse(bisInspPblm);
- }
- @Autowired
- private BisInspVill2021UsrService bisInspVill2021UsrService;
- @Autowired
- private BisInspVill2021VillService bisInspVill2021VillService;
- @Autowired
- private BisInspVill2021PblmService bisInspVill2021PblmService;
- @Autowired
- private BisInspVill2021CwsService bisInspVill2021CwsService;
- void changePblm(BisInspPblm pblm) {
- if (StringUtils.isBlank(pblm.getRegid())) {
- return;
- }
- BisInspEnum bisInspEnum = BisInspEnum.getEnumByType(pblm.getObjType());
- if (bisInspEnum == null) {
- return;
- }
- switch (bisInspEnum) {
- case VILL2021:
- if (StringUtils.isNotBlank(pblm.getVillType())) {
- switch (pblm.getVillType()) {
- case "251":
- BisInspVill2021Usr vill2021Usr = bisInspVill2021UsrService.get(pblm.getRegid());
- Optional.ofNullable(vill2021Usr).ifPresent(usr -> {
- pblm.setNm(usr.getUsrNm());
- BisInspVill2021Vill vill = bisInspVill2021VillService.get(usr.getVillId());
- Optional.ofNullable(vill).map(BisInspVill2021Vill::getAdCode).ifPresent(adCode -> {
- AttAdXBase adXBase = attAdXBaseService.get(adCode);
- Optional.ofNullable(adXBase).ifPresent(base -> {
- pblm.setAdFullName(base.getAdFullName());
- });
- });
- });
- break;
- case "252":
- BisInspVill2021Cws cws = bisInspVill2021CwsService.get(pblm.getRegid());
- Optional.ofNullable(cws).ifPresent(c -> {
- pblm.setNm(c.getCwsNm());
- if (StringUtils.isNotBlank(c.getAdCode())) {
- AttAdXBase adXBase = attAdXBaseService.get(c.getAdCode());
- Optional.ofNullable(adXBase).ifPresent(base -> {
- pblm.setAdFullName(base.getAdFullName());
- });
- } else {
- pblm.setAdFullName(c.getCwsLoc());
- }
- });
- break;
- case "253":
- BisInspVill2021Pblm vill2021Pblm = bisInspVill2021PblmService.get(pblm.getRegid());
- Optional.ofNullable(vill2021Pblm).ifPresent(p -> {
- pblm.setNm(p.getPblmNm());
- pblm.setAdFullName(p.getLoc());
- });
- break;
- default:
- }
- }
- break;
- case CHMCLS:
- BisInspChmclsUseunitwk bisInspChmclsUseunitwk = bisInspChmclsUseunitwkService.get(pblm.getRegid());
- if (bisInspChmclsUseunitwk != null) {
- pblm.setNm(bisInspChmclsUseunitwk.getDepName());
- }
- break;
- case TRACK:
- BisInspWtdstTrack bisInspWtdstTrack = bisInspWtdstTrackService.get(pblm.getRegid());
- if (bisInspWtdstTrack != null) {
- pblm.setSrcDesc(bisInspWtdstTrack.getAdNm());
- }
- break;
- default:
- }
- }
- @ApiOperation(value = "审核及驳回审核")
- @RequestMapping(value = "/audit/{id}/{dataStat}", method = RequestMethod.GET)
- public Object audit(@ApiParam(name = "id", value = "id", required = true) @PathVariable String id,
- @ApiParam(name = "dataStat", value = "dataStat", required = true) @PathVariable String dataStat) {
- Map<String, String> params = new HashMap<>();
- BisInspPblm bisInspPblm = bisInspPblmService.get(id);
- //审核
- if ("2".equals(dataStat) && "1".equals(bisInspPblm.getDataStat())) {
- bisInspPblm.setDataStat(dataStat);
- bisInspPblmService.update(bisInspPblm);
- params.put("data", "审核完成");
- return buildSuccessResponse(params);
- }
- //退回
- if ("3".equals(dataStat) && "1".equals(bisInspPblm.getDataStat())) {
- bisInspPblm.setDataStat(dataStat);
- bisInspPblmService.update(bisInspPblm);
- params.put("data", "驳回完成");
- return buildSuccessResponse(params);
- }
- return buildFailResponse("数据错误");
- }
- @ApiOperation(value = "问题栏目:问题列表根据当前登录用户id获取需要督查问题列表")
- @RequestMapping(value = "/list/{persId}", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> list(@ApiParam(name = "persId", value = "persId", required = true)
- @PathVariable String persId
- , @RequestBody(required = false) PlbmParam pblmParam) {
- pblmParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- pblmParam.setPresId(persId);
- pblmParam.setOrgId(getCurrentOrgId());
- pblmParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPageList(pblmParam);
- if (inspPblmList.getList() != null) {
- inspPblmList.getList().forEach(bisInspPblm -> {
- if (StringUtils.isNotBlank(bisInspPblm.getRegid()) &&
- BisInspEnum.CHMCLS.getValue().equals(bisInspPblm.getObjType())) {
- BisInspChmclsUseunitwk bisInspChmclsUseunitwk = bisInspChmclsUseunitwkService.get(bisInspPblm.getRegid());
- if (bisInspChmclsUseunitwk != null) {
- bisInspPblm.setNm(bisInspChmclsUseunitwk.getDepName());
- }
- }
- });
- }
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "小水库,行政村,水源地,饮水工程,水毁统计")
- @RequestMapping(value = "/count/{persId}/{adCode}", method = RequestMethod.GET)
- public BaseResponse<List<CountType>> list(@ApiParam(name = "persId", value = "persId", required = true) @PathVariable String persId,
- @ApiParam(name = "adCode", value = "adCode", required = false) @PathVariable(name = "adCode", required = false) String adCode
- ) {
- List<CountType> countTypes = bisInspPblmService.countByType(persId, adCode, getCurrentOrgId());
- return buildSuccessResponse(countTypes);
- }
- @ApiOperation(value = "根据督查组id获取需要督查问题列表,分页")
- @RequestMapping(value = "/page", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> page(@ApiParam(name = "bisInspPblm", value = "BisInspPblm", required = true)
- @RequestBody PlbmParam pblmParam, HttpServletRequest request) {
- pblmParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- pblmParam.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(pblmParam.getTabType())) {
- pblmParam.setTabType(CommonLabel.TAB_TYPE);
- String source = request.getHeader("source");
- if (StringUtils.isNotBlank(source)) {
- pblmParam.setTabType("0");
- }
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- String nowYear = new SimpleDateFormat("yyyy").format(new Date());
- String nowMonth = new SimpleDateFormat("yyyy-MM").format(new Date());
- pblmParam.setNowMonth(nowMonth);
- pblmParam.setNowYear(nowYear);
- pblmParam.setNowTime(nowTime);
- pblmParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = new PageInfo<>();
- if (BisInspEnum.VILL2020.getValue().equals(pblmParam.getObjType())) {
- inspPblmList = bisNewVillRgstrService.findPageList(pblmParam);
- } else if (BisInspEnum.VILLZHEJIANG.getValue().equals(pblmParam.getObjType())) {
- inspPblmList = bisZhejiangVillRgstrService.findPageList(pblmParam);
- } else if (BisInspEnum.MFDP.getValue().equals(pblmParam.getObjType())) {
- inspPblmList = bisInspMfdpRgstrService.findPblmPage(pblmParam);
- } else {
- inspPblmList = bisInspPblmService.findPageList(pblmParam);
- }
- return buildSuccessResponse(inspPblmList);
- }
- @Authority
- @ApiOperation(value = "统计人饮问题-问题详情图表-分页-总计")
- @RequestMapping(value = "/totalVill2020Count/{persId}", method = RequestMethod.GET)
- public BaseResponse<VillCount> totalVill2020Count(@ApiParam(name = "persId", value = "persId", required = true) @PathVariable String persId) {
- List<VillTypeCount> typeCountList = bisInspPblmDao.totalCountVill(persId, BisInspEnum.VILL2020.getValue(), olBisInspOrgService.getProvince(getCurrentOrgId()));
- VillCount villCount = new VillCount();
- villCount.setAdFullName("总计");
- int count = 0;
- for (VillTypeCount typeCount : typeCountList) {
- bisInspPblmService.setVillValue(villCount, typeCount, "25");
- count += typeCount.getTotal();
- }
- villCount.setTotal(count);
- return buildSuccessResponse(villCount);
- }
- @ApiOperation(value = "获取新人饮问题列表-新,villType传1,2,3多个用逗号分隔")
- @RequestMapping(value = "/page/vill2020", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> vill2020(@ApiParam(name = "pblmParam", value = "pblmParam", required = true) @RequestBody PlbmParam pblmParam) {
- pblmParam.setPresId(getCurrentPersId());
- pblmParam.setProvince(olBisInspOrgService.getProvince(getCurrentOrgId()));
- if (StringUtils.isBlank(pblmParam.getTabType())) {
- pblmParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- pblmParam.setNowTime(nowTime);
- pblmParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisNewVillRgstrService.findPageList(pblmParam);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "根据规则id和类型获取对应的问题列表")
- @RequestMapping(value = "/getPblmList/{id}/{type}/{objId}", method = {RequestMethod.GET})
- public BaseResponse<List<BisInspPblm>> getPblmList(@ApiParam(name = "id", value = "规则id", required = true) @PathVariable String id,
- @ApiParam(name = "type", value = "类型", required = true) @PathVariable String type,
- @ApiParam(name = "objId", value = "项目id", required = true) @PathVariable String objId) {
- List<BisInspPblm> list = bisInspPblmService.getPblmList(id, type, objId, getCurrentOrgId());
- return buildSuccessResponse(list);
- }
- @ApiOperation(value = "根据规则id和类型获取对应的问题列表")
- @RequestMapping(value = "/getPblmList/{id}/{type}", method = {RequestMethod.GET})
- public BaseResponse<List<BisInspPblm>> getPblmListById(@ApiParam(name = "id", value = "规则id", required = true) @PathVariable String id,
- @ApiParam(name = "type", value = "类型", required = true) @PathVariable String type) {
- List<BisInspPblm> list = bisInspPblmService.getPblmList(id, type, "", getCurrentOrgId());
- return buildSuccessResponse(list);
- }
- @ApiOperation(value = "获取小水库问题列表-新")
- @RequestMapping(value = "/page/rever", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> rever(@ApiParam(name = "reverParam", value = "reverParam", required = true)
- @RequestBody ReverParam reverParam) {
- if (StringUtils.isBlank(reverParam.getpType())) {
- reverParam.setpType("1");
- }
- if (StringUtils.isBlank(reverParam.getObjType())) {
- reverParam.setObjType("1");
- }
- reverParam.setPersId(getCurrentPersId());
- reverParam.setOrgId(getCurrentOrgId());
- reverParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- if (StringUtils.isBlank(reverParam.getTabType())) {
- reverParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- reverParam.setNowTime(nowTime);
- reverParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findReverPlbmList(reverParam);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @Autowired
- private OlBisInspOrgService inspOrgService;
- @ApiOperation(value = "获取172工程问题列表-新")
- @RequestMapping(value = "/page/keyReg", method = RequestMethod.POST)
- public BaseResponse<PageInfo<KeyRegPblm>> rever(@ApiParam(name = "reverParam", value = "reverParam", required = true) @RequestBody KeyRegPatam keyRegPatam, HttpServletRequest request) {
- if (StringUtils.isNotBlank(keyRegPatam.getProblemType())) {
- keyRegPatam.setInspPblmName(InspUtils.setPlbmName(keyRegPatam.getProblemType()));
- keyRegPatam.setProblemType("");
- }
- if (StringUtils.isBlank(keyRegPatam.getOrderBy())) {
- keyRegPatam.setOrderBy("order by coll_time desc");
- }
- keyRegPatam.setPersId(getCurrentPersId());
- keyRegPatam.setOrgId(getCurrentOrgId());
- keyRegPatam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- if (StringUtils.isBlank(keyRegPatam.getTabType())) {
- keyRegPatam.setTabType(CommonLabel.TAB_TYPE);
- String source = request.getHeader("source");
- if (StringUtils.isNotBlank(source)) {
- keyRegPatam.setTabType("0");
- }
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- keyRegPatam.setNowTime(nowTime);
- keyRegPatam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<KeyRegPblm> inspPblmList = bisInspPblmService.findKeyRegPlbmList(keyRegPatam);
- InspUtils.addLocsNew(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "获取水闸问题列表-新")
- @RequestMapping(value = "/page/waga", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> waga(@ApiParam(name = "wagaParam", value = "wagaParam", required = true) @RequestBody WagaParam wagaParam) {
- wagaParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- wagaParam.setPersId(getCurrentPersId());
- wagaParam.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(wagaParam.getTabType())) {
- wagaParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- wagaParam.setNowTime(nowTime);
- wagaParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findWagaPlbmList(wagaParam);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "通用问题导出xls")
- @RequestMapping(value = "/page/export", method = RequestMethod.POST)
- public void pblmExport(@ApiParam(name = "pblmParam", value = "pblmParam", required = true)
- @RequestBody PblmParam pblmParam, HttpServletResponse response) throws Exception {
- if (StringUtils.isBlank(pblmParam.getpType())) {
- throw new Exception("没有传类型");
- }
- pblmParam.setOrgId(getCurrentOrgId());
- pblmParam.setProvince(inspOrgService.getProvince(pblmParam.getOrgId()));
- bisInspPblmService.exportPblmForExcel(pblmParam, response);
- }
- @ApiOperation(value = "水闸导出问题列表-导出excel")
- @RequestMapping(value = "/page/waga/export", method = RequestMethod.POST)
- public void reverExport(@ApiParam(name = "wagaParam", value = "wagaParam", required = true) @RequestBody WagaParam wagaParam, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(wagaParam.getOrgIds());
- wagaParam.setOrgIds(orgIds);
- wagaParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- wagaParam.setPersId(getCurrentPersId());
- wagaParam.setOrgId(getCurrentOrgId());
- wagaParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findWagaPlbmList(wagaParam);
- InspPblmUtils.Export(response, "waga", pblmList, "水闸名称");
- }
- @ApiOperation(value = "172工程导出问题列表-导出excel")
- @RequestMapping(value = "/page/keyReg/export", method = RequestMethod.POST)
- public void keyRegExport(@ApiParam(name = "wagaParam", value = "wagaParam", required = true) @RequestBody KeyRegPatam keyRegPatam, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(keyRegPatam.getOrgIds());
- keyRegPatam.setOrgIds(orgIds);
- keyRegPatam.setPersId(getCurrentPersId());
- keyRegPatam.setOrgId(getCurrentOrgId());
- keyRegPatam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- if (StringUtils.isBlank(keyRegPatam.getTabType())) {
- keyRegPatam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- keyRegPatam.setNowTime(nowTime);
- keyRegPatam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<KeyRegPblm> pblmList = bisInspPblmDao.findKeyRegPlbmList(keyRegPatam);
- InspPblmUtils.ExportNew(response, "172", pblmList, "172重点工程");
- }
- @Autowired
- private BisInspPblmDao bisInspPblmDao;
- @ApiOperation(value = "问题清单导出xlsx")
- @RequestMapping(value = "/page/problemList/export", method = RequestMethod.POST)
- public void problemListExport(@ApiParam(name = "pblmParam", value = "pblmParam", required = true) @RequestBody PblmParam pblmParam, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- // 设置参数
- String orgIds = InspUtils.setOrgIds(pblmParam.getOrgIds());
- pblmParam.setOrgIds(orgIds);
- pblmParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- pblmParam.setPersId(getCurrentPersId());
- pblmParam.setOrgId(getCurrentOrgId());
- pblmParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- // 获取数据
- List<BisInspPblm> pblmList = bisInspPblmDao.findPblmList(pblmParam);
- // 导出问题清单
- InspPblmUtils.ExportProblemList(response, pblmList, "问题清单");
- }
- @ApiOperation(value = "人饮,水源地,行政村导出问题列表-导出excel")
- @RequestMapping(value = "/page/vill/export", method = RequestMethod.POST)
- public void villExport(@ApiParam(name = "reverParam", value = "reverParam", required = true) @RequestBody VillParam villParam, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(villParam.getOrgIds());
- villParam.setOrgIds(orgIds);
- villParam.setOrgId(getCurrentOrgId());
- villParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- villParam.setPersId(getCurrentPersId());
- villParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findVillPlbmList(villParam);
- String name = "督查对象(区、县)";
- InspPblmUtils.Export(response, "vill", pblmList, name);
- }
- @ApiOperation(value = "小水库导出问题列表-导出excel")
- @RequestMapping(value = "/page/rever/export", method = RequestMethod.POST)
- public void reverExport(@ApiParam(name = "reverParam", value = "reverParam", required = true) @RequestBody ReverParam reverParam, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(reverParam.getOrgIds());
- reverParam.setOrgIds(orgIds);
- reverParam.setOrgId(getCurrentOrgId());
- reverParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- reverParam.setPersId(getCurrentPersId());
- if (StringUtils.isBlank(reverParam.getTabType())) {
- reverParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- reverParam.setNowTime(nowTime);
- reverParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findReverPlbmList(reverParam);
- InspPblmUtils.Export(response, "rever", pblmList, "督查水库名称");
- }
- @ApiOperation(value = "水毁导出问题列表-导出excel")
- @RequestMapping(value = "/page/track/export", method = RequestMethod.POST)
- public void trackExport(@ApiParam(name = "reverParam", value = "reverParam", required = true) @RequestBody TrackParam trackParam, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(trackParam.getOrgIds());
- trackParam.setOrgIds(orgIds);
- trackParam.setPersId(getCurrentPersId());
- trackParam.setOrgId(getCurrentOrgId());
- trackParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- if (StringUtils.isBlank(trackParam.getTabType())) {
- trackParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- trackParam.setNowTime(nowTime);
- trackParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findTrackPlbmList(trackParam);
- InspPblmUtils.Export(response, "track", pblmList, "督查水毁名称");
- }
- @ApiOperation(value = "获取人饮问题列表-新")
- @RequestMapping(value = "/page/vill", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> rever(@ApiParam(name = "villParam", value = "villParam", required = true) @RequestBody VillParam villParam) {
- villParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- villParam.setPersId(getCurrentPersId());
- villParam.setOrgId(getCurrentOrgId());
- villParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findVillPlbmList(villParam);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "获取水毁问题列表-新")
- @RequestMapping(value = "/page/track", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> track(@ApiParam(name = "trackParam", value = "trackParam", required = true) @RequestBody TrackParam trackParam) {
- trackParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- trackParam.setPersId(getCurrentPersId());
- trackParam.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(trackParam.getTabType())) {
- trackParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- trackParam.setNowTime(nowTime);
- trackParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findTrackPlbmList(trackParam);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "地下水问题列表-新")
- @RequestMapping(value = "/page/grw", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> underWater(@ApiParam(name = "waterParam", value = "waterParam", required = true) @RequestBody UnderWaterParam waterParam) {
- waterParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- waterParam.setPersId(getCurrentPersId());
- waterParam.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(waterParam.getTabType())) {
- waterParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- waterParam.setNowTime(nowTime);
- waterParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findWaterPlbmList(waterParam);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "地下水导出问题列表-导出excel")
- @RequestMapping(value = "/page/grw/export", method = RequestMethod.POST)
- public void grwExport(@ApiParam(name = "waterParam", value = "waterParam", required = true) @RequestBody UnderWaterParam waterParam, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(waterParam.getOrgIds());
- waterParam.setOrgIds(orgIds);
- waterParam.setOrgId(getCurrentOrgId());
- waterParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- waterParam.setPersId(getCurrentPersId());
- if (StringUtils.isBlank(waterParam.getTabType())) {
- waterParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- waterParam.setNowTime(nowTime);
- waterParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findWaterPlbmList(waterParam);
- InspPblmUtils.Export(response, "grw", pblmList, "测站名称");
- }
- @ApiOperation(value = "获取列表(分页)")
- @RequestMapping(value = "/queryListByPage", method = {RequestMethod.GET, RequestMethod.POST})
- public BaseResponse<PageInfo<BisInspPblm>> queryListByPage(@RequestBody BisInspPblmParam param) {
- PageInfo<BisInspPblm> list = new PageInfo<>();
- try {
- param.setOrgId(getCurrentOrgId());
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- list = bisInspPblmService.queryListByPage(param);
- } catch (Exception e) {
- e.printStackTrace();
- logger.error(e.getMessage());
- return buildFailResponse(e.getMessage());
- }
- return buildSuccessResponse(list);
- }
- @ApiOperation(value = "获取列表")
- @RequestMapping(value = "/queryList", method = {RequestMethod.GET, RequestMethod.POST})
- public BaseResponse<List<BisInspPblm>> queryList(@RequestBody BisInspPblmParam param) {
- List<BisInspPblm> list = new ArrayList<>();
- try {
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setOrgId(getCurrentOrgId());
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- list = bisInspPblmService.queryList(param);
- } catch (Exception e) {
- e.printStackTrace();
- logger.error(e.getMessage());
- return buildFailResponse(e.getMessage());
- }
- return buildSuccessResponse(list);
- }
- @ApiOperation(value = "新增问题删除原因")
- @RequestMapping(value = "/insertPblmLog", method = RequestMethod.POST)
- public BaseResponse<BisInspPblmDelLog> insertPblmLog(@RequestBody BisInspPblmDelLogDto bisInspPblmDelLogDto) {
- bisInspPblmDelLogDto.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- try {
- BisInspPblmDelLog bisInspPblmDelLog = bisInspPblmService.insertPblmLog(bisInspPblmDelLogDto);
- return buildSuccessResponse(bisInspPblmDelLog);
- } catch (Exception e) {
- e.printStackTrace();
- logger.error(e.getMessage());
- }
- return buildFailResponse();
- }
- @ApiOperation(value = "获取淤地坝问题列表")
- @RequestMapping(value = "/page/sdPblm", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> sdPblm(@ApiParam(name = "reverParam", value = "reverParam", required = true) @RequestBody SdPblmParam param) {
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findSdPblmList(param);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "获取水源地问题列表")
- @RequestMapping(value = "/page/swhsPblm", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> swhsPblm(@RequestBody PblmParam param) {
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPblmList(param);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "获取取用水户问题列表")
- @RequestMapping(value = "/page/wiuPblm", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> wiuPblm(@RequestBody PblmParam param) {
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPblmList(param);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "获取取小水库标准化问题列表")
- @RequestMapping(value = "/page/stnd", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> stndPblm(@RequestBody PblmParam param) {
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPblmList(param);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "获取行政区划取水量问题列表")
- @RequestMapping(value = "/page/cityPblm", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> cityPblm(@RequestBody PblmParam param) {
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setPersId(getCurrentPersId());
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPblmList(param);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "获取节水管理与评价督查问题列表")
- @RequestMapping(value = "/page/svwtPblm", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> svwtPblm(@RequestBody PblmParam param) {
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setPersId(getCurrentPersId());
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPblmList(param);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "问题处理通用接口")
- @RequestMapping(value = "/page/pblm", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> pblm(@RequestBody PblmParam param) {
- if (StringUtils.isBlank(param.getpType())) {
- throw new CheckException("pType为必传参数");
- }
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setPersId(getCurrentPersId());
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPblmList(param);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "水保问题")
- @RequestMapping(value = "/page/prdPblm", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> prdPblm(@RequestBody PblmParam param) {
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setpType("17");
- param.setPersId(getCurrentPersId());
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPblmList(param);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "河湖四乱问题")
- @RequestMapping(value = "/page/jsflPblm", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> jsflPblm(@RequestBody PblmParam param) {
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setpType("18");
- param.setPersId(getCurrentPersId());
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPblmList(param);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "非法采砂问题")
- @RequestMapping(value = "/page/jswaPblm", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> jswaPblm(@RequestBody PblmParam param) {
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setOrgId(getCurrentOrgId());
- param.setpType("19");
- param.setPersId(getCurrentPersId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPblmList(param);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "节水载体复核")
- @RequestMapping(value = "/page/jsztfh/export", method = RequestMethod.POST)
- public void jsztfh(@RequestBody PblmParam param, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(param.getOrgIds());
- param.setOrgIds(orgIds);
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setPersId(getCurrentPersId());
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findPblmList(param);
- String name = "对象名称";
- InspPblmUtils.Export(response, "wtcrr", pblmList, name);
- }
- @ApiOperation(value = "取水许可管理复核")
- @RequestMapping(value = "/page/qsxkglfh/export", method = RequestMethod.POST)
- public void qsxkglfh(@RequestBody PblmParam param, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(param.getOrgIds());
- param.setOrgIds(orgIds);
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setPersId(getCurrentPersId());
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findPblmList(param);
- String name = "对象名称";
- InspPblmUtils.Export(response, "wtgt", pblmList, name);
- }
- @ApiOperation(value = "水资源管理及节水管理复核")
- @RequestMapping(value = "/page/szygljsgl/export", method = RequestMethod.POST)
- public void szygljsgl(@RequestBody PblmParam param, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(param.getOrgIds());
- param.setOrgIds(orgIds);
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setPersId(getCurrentPersId());
- param.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findPblmList(param);
- String name = "对象名称";
- InspPblmUtils.Export(response, "wrws", pblmList, name);
- }
- @ApiOperation(value = "河湖四乱问题导出问题列表-导出excel")
- @RequestMapping(value = "/page/jsflPblm/export", method = RequestMethod.POST)
- public void jsflPblmExport(@ApiParam(name = "prdParam", value = "prdParam", required = true) @RequestBody PrdParam prdParam, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(prdParam.getOrgIds());
- prdParam.setOrgIds(orgIds);
- prdParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- prdParam.setPersId(getCurrentPersId());
- prdParam.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(prdParam.getTabType())) {
- prdParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- prdParam.setNowTime(nowTime);
- prdParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findJsflPlbmList(prdParam);
- String name = "河湖四乱";
- InspPblmUtils.Export(response, "jsfl", pblmList, name);
- }
- @ApiOperation(value = "非法采砂导出问题列表-导出excel")
- @RequestMapping(value = "/page/jswaPblm/export", method = RequestMethod.POST)
- public void jswaPblmExport(@ApiParam(name = "prdParam", value = "prdParam", required = true) @RequestBody PrdParam prdParam, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(prdParam.getOrgIds());
- prdParam.setOrgIds(orgIds);
- prdParam.setOrgId(getCurrentOrgId());
- prdParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- prdParam.setPersId(getCurrentPersId());
- if (StringUtils.isBlank(prdParam.getTabType())) {
- prdParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- prdParam.setNowTime(nowTime);
- prdParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findJswaPlbmList(prdParam);
- String name = "非法采砂";
- InspPblmUtils.Export(response, "jswa", pblmList, name);
- }
- @ApiOperation(value = "水保督查导出问题列表-导出excel")
- @RequestMapping(value = "/page/prdPblm/export", method = RequestMethod.POST)
- public void prdPblmExport(@ApiParam(name = "prdParam", value = "prdParam", required = true) @RequestBody PrdParam prdParam, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(prdParam.getOrgIds());
- prdParam.setOrgIds(orgIds);
- prdParam.setOrgId(getCurrentOrgId());
- prdParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- prdParam.setPersId(getCurrentPersId());
- if (StringUtils.isBlank(prdParam.getTabType())) {
- prdParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- prdParam.setNowTime(nowTime);
- prdParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findPrdPlbmList(prdParam);
- String name = "水保工作核实";
- InspPblmUtils.Export(response, "prd", pblmList, name);
- }
- @ApiOperation(value = "百日攻坚(中央环保督查)问题")
- @RequestMapping(value = "/page/ecofrdPblm", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> ecofrdPblm(@RequestBody PblmParam param) {
- param.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- param.setpType("20");
- param.setOrgId(getCurrentOrgId());
- param.setPersId(getCurrentPersId());
- if (StringUtils.isBlank(param.getTabType())) {
- param.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- param.setNowTime(nowTime);
- param.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = bisInspPblmService.findPblmList(param);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "百日攻坚(中央环保督查)导出问题列表-导出excel")
- @RequestMapping(value = "/page/ecofrdPblm/export", method = RequestMethod.POST)
- public void ecofrdPblm(@ApiParam(name = "prdParam", value = "prdParam", required = true) @RequestBody PrdParam prdParam, HttpServletResponse response) {
- response.setContentType("application/binary;charset=UTF-8");
- String orgIds = InspUtils.setOrgIds(prdParam.getOrgIds());
- prdParam.setOrgIds(orgIds);
- prdParam.setOrgId(getCurrentOrgId());
- prdParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- prdParam.setPersId(getCurrentPersId());
- if (StringUtils.isBlank(prdParam.getTabType())) {
- prdParam.setTabType(CommonLabel.TAB_TYPE);
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- prdParam.setNowTime(nowTime);
- prdParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- List<BisInspPblm> pblmList = bisInspPblmDao.findEcofrdPlbmList(prdParam);
- String name = "中央环保督查问题";
- InspPblmUtils.Export(response, "ecofrd", pblmList, name);
- }
- @Autowired
- private BisBisRdwspRgstrFeeService bisBisRdwspRgstrFeeService;
- @ApiOperation(value = "获取回头看,villType传1,2,3多个用逗号分隔")
- @RequestMapping(value = "/page/rdwsp", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> rdwsp(@ApiParam(name = "pblmParam", value = "pblmParam", required = true) @RequestBody PlbmParam pblmParam) {
- pblmParam.setPresId(getCurrentPersId());
- PageInfo<BisInspPblm> inspPblmList = bisBisRdwspRgstrFeeService.findPageList(pblmParam);
- InspUtils.addLocs(inspPblmList);
- return buildSuccessResponse(inspPblmList);
- }
- @ApiOperation(value = "根据督查组id获取需要督查问题列表,分页")
- @RequestMapping(value = "/pageHaveFilePath", method = RequestMethod.POST)
- public BaseResponse<PageInfo<BisInspPblm>> pageHaveFilePath(@ApiParam(name = "bisInspPblm", value = "BisInspPblm", required = true)
- @RequestBody PlbmParam pblmParam, HttpServletRequest request) {
- pblmParam.setProvince(inspOrgService.getProvince(getCurrentOrgId()));
- pblmParam.setOrgId(getCurrentOrgId());
- if (StringUtils.isBlank(pblmParam.getTabType())) {
- pblmParam.setTabType(CommonLabel.TAB_TYPE);
- String source = request.getHeader("source");
- if (StringUtils.isNotBlank(source)) {
- pblmParam.setTabType("0");
- }
- }
- String nowTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
- String nowYear = new SimpleDateFormat("yyyy").format(new Date());
- String nowMonth = new SimpleDateFormat("yyyy-MM").format(new Date());
- pblmParam.setNowMonth(nowMonth);
- pblmParam.setNowYear(nowYear);
- pblmParam.setNowTime(nowTime);
- pblmParam.setInIdsSql(SqlUtils.getinIdsSql(getCurrentPersId(), olBisInspOrgService.getProvince(getCurrentOrgId())));
- PageInfo<BisInspPblm> inspPblmList = new PageInfo<>();
- if (BisInspEnum.VILL2020.getValue().equals(pblmParam.getObjType())) {
- inspPblmList = bisNewVillRgstrService.findPageList(pblmParam);
- } else if (BisInspEnum.VILLZHEJIANG.getValue().equals(pblmParam.getObjType())) {
- inspPblmList = bisZhejiangVillRgstrService.findPageList(pblmParam);
- } else if (BisInspEnum.MFDP.getValue().equals(pblmParam.getObjType())) {
- inspPblmList = bisInspMfdpRgstrService.findPblmPage(pblmParam);
- } else {
- inspPblmList = bisInspPblmService.findPageList(pblmParam);
- }
- List<BisInspPblm> list = inspPblmList.getList();
- for (BisInspPblm bisInspPblm : list) {
- List<String> pathList = bisInspPblmService.getPblmPath(bisInspPblm.getPblmId());
- bisInspPblm.setFilePath(pathList);
- }
- PageInfo<BisInspPblm> bisInspPblmList = new PageInfo<>(list);
- return buildSuccessResponse(bisInspPblmList);
- }
- @ApiOperation(value = "问题汇总功能增加外部问题导入 ")
- @PostMapping("/page/import")
- public BaseResponse<String> pblmImport(@RequestParam("file") MultipartFile f) {
- try {
- bisInspPblmService.excelImport(f, getCurrentPersId());
- } catch (Exception e) {
- logger.error(e.getMessage());
- }
- return buildSuccessResponse();
- }
- @ApiOperation(value = "excel导入问题查询")
- @PostMapping("/page/getImport")
- public BaseResponse<PageInfo<BisInspPblm>> getPblmListFromImport(@ApiParam(name = "PblmParam", value = "PblmParam", required = true) @RequestBody PblmParam param) {
- param.setProvince(AdLevelUtil.getAddvcd(olBisInspOrgService.getRlProvince(getCurrentOrgId())));
- param.setOrgId(getCurrentOrgId());
- List<BisInspPblm> pblmListFromImport = bisInspPblmService.getPblmListFromImport(param);
- PageInfo<BisInspPblm> bisInspPblmList = new PageInfo<>(pblmListFromImport);
- return buildSuccessResponse(bisInspPblmList);
- }
- @ApiOperation(value = "批量逻辑删除导入问题查询")
- @PostMapping("/batch/delete")
- public void batchDelete(@ApiParam(name = "PblmParam", value = "PblmParam", required = true) @RequestBody List<PblmParam> param) {
- bisInspPblmService.batchDelete(param);
- }
- @Value("${export.templatePath}")
- String excelFilePath;
- @ApiOperation(value = "下载Excel导入模板")
- @GetMapping("/page/downloadExcel")
- public void downExcelModel(HttpServletResponse response) throws Exception {
- InputStream inStream = new FileInputStream(excelFilePath + "/importPblm.xlsx");
- response.reset();
- response.setContentType("application/octet-stream; charset=UTF-8");
- response.setCharacterEncoding("utf-8");
- response.addHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("问题导入模板.xlsx", "UTF-8"));
- byte[] b = new byte[4096];
- int len;
- try {
- while ((len = inStream.read(b)) > 0)
- response.getOutputStream().write(b, 0, len);
- inStream.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- @ApiOperation(value = "128导出问题列表-导出excel")
- @RequestMapping(value = "/genrl/export", method = RequestMethod.POST)
- public void genrlExport(@ApiParam(name = "reverParam", value = "reverParam", required = true) @RequestBody ReverParam reverParam, HttpServletResponse response) {
- reverParam.setPageNum(1);
- reverParam.setPageSize(1000000);
- BaseResponse<PageInfo<BisInspPblm>> response1 = rever(reverParam);
- List<BisInspPblm> pblmList = response1.getData().getList();
- response.setContentType("application/binary;charset=UTF-8");
- InspPblmUtils.ExportProblemList(response, pblmList, "问题列表");
- }
- }
|