| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532 |
- 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.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.*;
- 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 = "人饮,水源地,行政村导出问题列表-导出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();
- }
- }
- }
|