Merge remote-tracking branch 'origin/develop_master' into develop_1
This commit is contained in:
+2
@@ -34,4 +34,6 @@ public interface SarBussStandFileDao extends BaseMapper<SarBussStandFile> {
|
|||||||
int insertSelective(SarBussStandFile sarBussStandFile);
|
int insertSelective(SarBussStandFile sarBussStandFile);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(SarBussStandFile sarBussStandFile);
|
int updateByPrimaryKeySelective(SarBussStandFile sarBussStandFile);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(String value);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -2,6 +2,8 @@ package com.adc.da.slrs.sarBussStandItems.dao;
|
|||||||
|
|
||||||
import com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems;
|
import com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -11,6 +13,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
* @author super_liu
|
* @author super_liu
|
||||||
* @since 2021-07-25
|
* @since 2021-07-25
|
||||||
*/
|
*/
|
||||||
|
@Repository
|
||||||
public interface SarBussStandItemsDao extends BaseMapper<SarBussStandItems> {
|
public interface SarBussStandItemsDao extends BaseMapper<SarBussStandItems> {
|
||||||
|
|
||||||
|
int deleteByStandIdAndFileType(@Param("standId") String standId, @Param("fileType") String fileType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+69
-7
@@ -1,6 +1,7 @@
|
|||||||
package com.adc.da.slrs.sarBussionessStand.controller;
|
package com.adc.da.slrs.sarBussionessStand.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.adc.da.common.ReadExcel;
|
||||||
import com.adc.da.person.service.IPersonCollectEOService;
|
import com.adc.da.person.service.IPersonCollectEOService;
|
||||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||||
@@ -14,33 +15,45 @@ import com.adc.da.http.PageInfo;
|
|||||||
import com.adc.da.http.ResponseMessage;
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.http.Result;
|
import com.adc.da.http.Result;
|
||||||
import com.adc.da.util.LoginUserUtil;
|
import com.adc.da.util.LoginUserUtil;
|
||||||
|
import com.adc.da.util.exception.AdcDaBaseException;
|
||||||
|
import com.adc.da.util.utils.IOUtils;
|
||||||
import com.adc.da.util.utils.StringUtils;
|
import com.adc.da.util.utils.StringUtils;
|
||||||
|
import com.adc.da.utils.util.BussStandExportUtil;
|
||||||
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 企业标准信息表 前端控制器
|
* 企业标准信息表 前端控制器
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author super_liu
|
* @author super_liu
|
||||||
* @since 2021-07-13
|
* @since 2021-07-13
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@Api(tags = "福田标准法规--企业标准信息")
|
@Api(tags = "福田标准法规--企业标准信息")
|
||||||
@RequestMapping("/${restPath}/lawss/sarBussionessStand")
|
@RequestMapping("/${restPath}/lawss/sarBussionessStand")
|
||||||
public class SarBussionessStandController extends BaseController<SarBussionessStand> {
|
public class SarBussionessStandController extends BaseController<SarBussionessStand> {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(SarBussionessStandController.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISarBussionessStandService sarBussionessStandEOService;
|
private ISarBussionessStandService sarBussionessStandEOService;
|
||||||
|
|
||||||
@@ -57,6 +70,54 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IDicTypeEOService dicTypeEOService;
|
private IDicTypeEOService dicTypeEOService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "|SarBussionessStandEO|删除")
|
||||||
|
@PostMapping("deleteSarBussionessStand")
|
||||||
|
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||||
|
// @RequiresPermissions("lawss:sarBussionessStand:delete")
|
||||||
|
public ResponseMessage delete(String ids) throws Exception {
|
||||||
|
SarBussionessStandEOPage sarBussionessStandEOPage = new SarBussionessStandEOPage();
|
||||||
|
sarBussionessStandEOPage.setIdlist(ids.split(","));
|
||||||
|
ResponseMessage<SarBussionessStand> result = sarBussionessStandEOService.deleteSarBussionessStand(sarBussionessStandEOPage);
|
||||||
|
logger.info("delete from SAR_BUSSIONESS_STAND where id = {}", ids);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将查询出来的数据导出到EXCEL表格中
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
* @author gaoyan
|
||||||
|
* date 2018-09-04
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "|SarBussionessStandEO|导出excel")
|
||||||
|
@GetMapping(value = "/exportSarBussionessStand")
|
||||||
|
public void exportSarBussionessStand(String exportContent, String exportType, String exportName,String userId, HttpServletResponse response, HttpServletRequest request)throws Exception {
|
||||||
|
OutputStream os = null;
|
||||||
|
Workbook workbook = null;
|
||||||
|
try {
|
||||||
|
if(StringUtils.isEmpty(exportName)||exportName.equals("null")){
|
||||||
|
exportName="企业标准库";
|
||||||
|
}
|
||||||
|
response.setHeader("Content-Disposition",
|
||||||
|
"attachment; filename=" + ReadExcel.encodeFileName(exportName+".xlsx",request));
|
||||||
|
response.setContentType("application/force-download");
|
||||||
|
//导出数据
|
||||||
|
List<SarBussionessStand> datas = sarBussionessStandEOService.getSarBussionessStand(exportType,exportContent,userId);
|
||||||
|
workbook = BussStandExportUtil.exportDatas(datas);
|
||||||
|
os = response.getOutputStream();
|
||||||
|
workbook.write(os);
|
||||||
|
os.flush();
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error(e.getMessage(), e);
|
||||||
|
throw new AdcDaBaseException("下载文件失败,请重试");
|
||||||
|
} finally {
|
||||||
|
IOUtils.closeQuietly(os);
|
||||||
|
if (workbook != null) {
|
||||||
|
workbook.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "|SarBussionessStandEO|企业标准修改")
|
@ApiOperation(value = "|SarBussionessStandEO|企业标准修改")
|
||||||
@PostMapping(value = "/updateSarBussionessStand")
|
@PostMapping(value = "/updateSarBussionessStand")
|
||||||
//401问题2021-03-31暂时注释掉 liuhuiwen
|
//401问题2021-03-31暂时注释掉 liuhuiwen
|
||||||
@@ -206,3 +267,4 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
@@ -95,5 +95,8 @@ public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
|||||||
|
|
||||||
int updateByPrimaryKeySelectiveTimeNotNull(SarBussionessStand sarBussionessStandEO);
|
int updateByPrimaryKeySelectiveTimeNotNull(SarBussionessStand sarBussionessStandEO);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(SarBussionessStand sarBussionessStandEO);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
@@ -1,5 +1,6 @@
|
|||||||
package com.adc.da.slrs.sarBussionessStand.service;
|
package com.adc.da.slrs.sarBussionessStand.service;
|
||||||
|
|
||||||
|
import com.adc.da.http.ResponseMessage;
|
||||||
import com.adc.da.search.entity.SarBussionessStandEO;
|
import com.adc.da.search.entity.SarBussionessStandEO;
|
||||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||||
@@ -17,6 +18,10 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface ISarBussionessStandService extends IService<SarBussionessStand> {
|
public interface ISarBussionessStandService extends IService<SarBussionessStand> {
|
||||||
|
|
||||||
|
ResponseMessage<SarBussionessStand> deleteSarBussionessStand(SarBussionessStandEOPage page) throws Exception;
|
||||||
|
|
||||||
|
List<SarBussionessStand> getSarBussionessStand(String exportType, String exportContent,String userId) throws Exception;
|
||||||
|
|
||||||
SarBussionessStand updateSarBussionessStand(SarBussionessStand sarBussionessStandEO) throws Exception;
|
SarBussionessStand updateSarBussionessStand(SarBussionessStand sarBussionessStandEO) throws Exception;
|
||||||
|
|
||||||
List<SarBussionessStand> selectStandardsByStandNumber(String replaceStandNum);
|
List<SarBussionessStand> selectStandardsByStandNumber(String replaceStandNum);
|
||||||
@@ -29,3 +34,4 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
|
|||||||
|
|
||||||
List<SarBussionessStand> getSarBussionStandPage(SarBussionessStandEOPage page) throws Exception;
|
List<SarBussionessStand> getSarBussionStandPage(SarBussionessStandEOPage page) throws Exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
@@ -6,16 +6,22 @@ import com.adc.da.common.ConvertMqEO;
|
|||||||
import com.adc.da.common.SarTypeEnum;
|
import com.adc.da.common.SarTypeEnum;
|
||||||
import com.adc.da.common.SelectionTypeEnum;
|
import com.adc.da.common.SelectionTypeEnum;
|
||||||
import com.adc.da.common.UseModuleEnum;
|
import com.adc.da.common.UseModuleEnum;
|
||||||
|
import com.adc.da.http.ResponseMessage;
|
||||||
|
import com.adc.da.http.Result;
|
||||||
import com.adc.da.mq.CreateMQService;
|
import com.adc.da.mq.CreateMQService;
|
||||||
import com.adc.da.mq.CreateStandMQService;
|
import com.adc.da.mq.CreateStandMQService;
|
||||||
|
import com.adc.da.person.dao.PersonCollectEODao;
|
||||||
import com.adc.da.person.entity.TsPersonCollect;
|
import com.adc.da.person.entity.TsPersonCollect;
|
||||||
import com.adc.da.person.page.PersonCollectEOPage;
|
import com.adc.da.person.page.PersonCollectEOPage;
|
||||||
import com.adc.da.person.service.IPersonCollectEOService;
|
import com.adc.da.person.service.IPersonCollectEOService;
|
||||||
|
import com.adc.da.search.entity.StandLawsEO;
|
||||||
|
import com.adc.da.search.service.StandLawsSearchService;
|
||||||
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
||||||
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
||||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||||
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
||||||
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
||||||
|
import com.adc.da.slrs.sarBussStandItems.dao.SarBussStandItemsDao;
|
||||||
import com.adc.da.slrs.sarBussStandMenu.dao.SarBussStandMenuDao;
|
import com.adc.da.slrs.sarBussStandMenu.dao.SarBussStandMenuDao;
|
||||||
import com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu;
|
import com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu;
|
||||||
import com.adc.da.slrs.sarBussStandVal.dao.SarBussStandValDao;
|
import com.adc.da.slrs.sarBussStandVal.dao.SarBussStandValDao;
|
||||||
@@ -27,6 +33,7 @@ import com.adc.da.slrs.sarResource.entity.TsResource;
|
|||||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||||
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
import com.adc.da.slrs.sarStandAttrInfo.dao.SarStandAttrInfoDao;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||||
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarAdvanceSearchVO;
|
||||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||||
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
|
||||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||||
@@ -38,6 +45,7 @@ import com.adc.da.sys.util.LoginUserUtil;
|
|||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
import com.adc.da.utils.util.FieldConvertUtil;
|
import com.adc.da.utils.util.FieldConvertUtil;
|
||||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||||
|
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
@@ -120,6 +128,12 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISarUpdLogService sarUpdLogEOService;
|
private ISarUpdLogService sarUpdLogEOService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITsResourceService sarMenuEOService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PersonCollectEODao personCollectEODao;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SarBussStandAttrInfoDao sarBussStandAttrInfoEODao;
|
private SarBussStandAttrInfoDao sarBussStandAttrInfoEODao;
|
||||||
|
|
||||||
|
|||||||
+19
-18
@@ -11,6 +11,7 @@ import com.adc.da.mq.CreateStandMQService;
|
|||||||
import com.adc.da.person.dao.PersonCollectEODao;
|
import com.adc.da.person.dao.PersonCollectEODao;
|
||||||
import com.adc.da.person.dao.PersonShareEODao;
|
import com.adc.da.person.dao.PersonShareEODao;
|
||||||
import com.adc.da.person.service.IPersonCollectEOService;
|
import com.adc.da.person.service.IPersonCollectEOService;
|
||||||
|
import com.adc.da.search.entity.StandLawsEO;
|
||||||
import com.adc.da.search.service.StandLawsSearchService;
|
import com.adc.da.search.service.StandLawsSearchService;
|
||||||
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
||||||
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
||||||
@@ -1284,30 +1285,30 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
|||||||
sarStandPutTimeEODao.deleteByStandId(id);
|
sarStandPutTimeEODao.deleteByStandId(id);
|
||||||
//删除文件详情表数据
|
//删除文件详情表数据
|
||||||
sarStandFileEODao.deleteByStandId(id);
|
sarStandFileEODao.deleteByStandId(id);
|
||||||
// List<SarStandFile> listFile = sarStandFileEODao.selectFileByStandId(id);
|
|
||||||
// if (listFile != null) {
|
|
||||||
// if (!listFile.isEmpty()) {
|
|
||||||
// for (int f = 0; f < listFile.size(); f++) {
|
|
||||||
// //删除文件信息表数据
|
|
||||||
// sarFileInfoEODao.deleteByfileId(listFile.get(f).getId());
|
|
||||||
// //删除转换表ot_convert数据
|
|
||||||
// otConvertEODao.deleteByAttId(listFile.get(f).getAttId());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//删除代替关系
|
//删除代替关系
|
||||||
|
List<SarStandFile> listFile = sarStandFileEODao.selectFileByStandId(id);
|
||||||
|
if (listFile != null) {
|
||||||
|
if (!listFile.isEmpty()) {
|
||||||
|
for (int f = 0; f < listFile.size(); f++) {
|
||||||
|
//删除文件信息表数据
|
||||||
|
// sarFileInfoEODao.deleteByfileId(listFile.get(f).getId());
|
||||||
|
//删除转换表ot_convert数据
|
||||||
|
otConvertEODao.deleteByAttId(listFile.get(f).getAttId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
updateStandReplaceConnect(getDelStandInfoList);
|
updateStandReplaceConnect(getDelStandInfoList);
|
||||||
//删除收藏表中数据
|
//删除收藏表中数据
|
||||||
personCollectEODao.deleteByResId(id);
|
personCollectEODao.deleteByResId(id);
|
||||||
// 删除分享表中数据
|
// 删除分享表中数据
|
||||||
personShareEODao.deleteByResId(id);
|
personShareEODao.deleteByResId(id);
|
||||||
// if(elasflag) {
|
if(elasflag) {
|
||||||
// //删除成功后,将索引中对应数据删除
|
//删除成功后,将索引中对应数据删除
|
||||||
// StandLawsEO standLawsEO = new StandLawsEO();
|
StandLawsEO standLawsEO = new StandLawsEO();
|
||||||
// standLawsEO.setId(sarStandardsInfoEO.getId());
|
standLawsEO.setId(sarStandardsInfoEO.getId());
|
||||||
// standLawsEO.setType("stand");
|
standLawsEO.setType("stand");
|
||||||
// sarStandAndLawsEOService.deleteFomrIndex(standLawsEO);
|
standLawsSearchService.deleteStandLawsSearch(standLawsEO);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
return countResult;
|
return countResult;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,144 @@
|
|||||||
|
package com.adc.da.utils.util;
|
||||||
|
|
||||||
|
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||||
|
import com.adc.da.slrs.sarStandAttrDetails.entity.SarStandAttrDetails;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.poi.ss.usermodel.*;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 标准导出工具
|
||||||
|
* @Author: yangxuenan
|
||||||
|
* date: 2020/9/16 14:09
|
||||||
|
*/
|
||||||
|
public class BussStandExportUtil {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(BussStandExportUtil.class);
|
||||||
|
|
||||||
|
|
||||||
|
public static Workbook exportDatas (List<SarBussionessStand> datas) {
|
||||||
|
Workbook workbook = new XSSFWorkbook();
|
||||||
|
try {
|
||||||
|
StringBuilder attrBud = new StringBuilder();
|
||||||
|
List<SarStandAttrDetails> detailsEOList = InitStandAttrUtil.bussAttrFieldList;
|
||||||
|
Map<String,String> attrInfoMap = new HashMap<>();
|
||||||
|
for (SarStandAttrDetails detailsEO : detailsEOList) {
|
||||||
|
if (!InitStandAttrUtil.fileFieldListBuss.contains(detailsEO.getAttrField())) {
|
||||||
|
attrBud.append(detailsEO.getAttrName() + ",");
|
||||||
|
attrInfoMap.put(detailsEO.getAttrName(),detailsEO.getAttrField());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String header = FieldConvertUtil.exportBaseFieldNamesBuss + "," + attrBud.toString();
|
||||||
|
//创建工作表对象
|
||||||
|
Sheet sheet = workbook.createSheet();
|
||||||
|
// 创建头部
|
||||||
|
createHeader(workbook,sheet,header);
|
||||||
|
// 创建数据
|
||||||
|
createDatas(workbook,sheet,datas,header,attrInfoMap);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
return workbook;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void createHeader(Workbook workbook,Sheet sheet,String header){
|
||||||
|
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
||||||
|
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
Row rowHeader = sheet.createRow(0);//开始创建标题行
|
||||||
|
if (StringUtils.isNotBlank(header)) {
|
||||||
|
String[] headerArr = header.split(",");
|
||||||
|
for (int i=0;i < headerArr.length; i++) {
|
||||||
|
rowHeader.createCell(i).setCellValue(headerArr[i]);
|
||||||
|
// rowHeader.createCell(i).setCellStyle(cellStyle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void createDatas(Workbook workbook,Sheet sheet,List<SarBussionessStand> datas,
|
||||||
|
String header,Map<String,String> attrInfoMap) throws Exception{
|
||||||
|
CellStyle cellStyle = workbook.createCellStyle();//初始化单元格格式对象
|
||||||
|
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||||
|
if (datas != null && !datas.isEmpty()) {
|
||||||
|
for (int i=0;i < datas.size(); i++) {
|
||||||
|
SarBussionessStand sarStandardsInfoEO = datas.get(i);
|
||||||
|
Row row = sheet.createRow(i+1);
|
||||||
|
String[] headerArr = header.split(",");
|
||||||
|
int sheetNum = 0;
|
||||||
|
for (String headerName : headerArr) {
|
||||||
|
String value = getValueByName(headerName,sarStandardsInfoEO,attrInfoMap);
|
||||||
|
if (StringUtils.isBlank(value) || "null".equals(value)) {
|
||||||
|
value = "";
|
||||||
|
}
|
||||||
|
row.createCell(sheetNum).setCellValue(value);
|
||||||
|
sheetNum++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据表头返回相应值
|
||||||
|
public static String getValueByName (String name,SarBussionessStand sarStandardsInfoEO,Map<String,String> attrInfoMap) throws Exception{
|
||||||
|
String value = "";
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
Map<String,Object> attrValueMap = sarStandardsInfoEO.getAttrInfoMap();
|
||||||
|
switch (name) {
|
||||||
|
case "企标类别":
|
||||||
|
value = sarStandardsInfoEO.getStandSortShow();
|
||||||
|
break;
|
||||||
|
case "企标编号":
|
||||||
|
value = sarStandardsInfoEO.getStandCode();
|
||||||
|
break;
|
||||||
|
case "中文名称":
|
||||||
|
value = sarStandardsInfoEO.getStandName();
|
||||||
|
break;
|
||||||
|
case "英文名称":
|
||||||
|
value = sarStandardsInfoEO.getStandEnName();
|
||||||
|
break;
|
||||||
|
case "标准状态":
|
||||||
|
value = sarStandardsInfoEO.getStandStatusShow();
|
||||||
|
break;
|
||||||
|
case "标准实施日期":
|
||||||
|
if (sarStandardsInfoEO.getPutTime() != null) {
|
||||||
|
String issueTime = sdf.format(sarStandardsInfoEO.getPutTime());
|
||||||
|
value = issueTime;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "代替企标编号":
|
||||||
|
value = sarStandardsInfoEO.getReplaceStandNum();
|
||||||
|
break;
|
||||||
|
case "被代替企标编号":
|
||||||
|
value = sarStandardsInfoEO.getReplacedStandNum();
|
||||||
|
break;
|
||||||
|
case "发布日期":
|
||||||
|
if (sarStandardsInfoEO.getIssueTime() != null) {
|
||||||
|
String issueTime = sdf.format(sarStandardsInfoEO.getIssueTime());
|
||||||
|
value = issueTime;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "复审日期":
|
||||||
|
String field1 = attrInfoMap.get(name);
|
||||||
|
if (attrValueMap != null) {
|
||||||
|
value = String.valueOf(attrValueMap.get(field1));
|
||||||
|
if (value.length()>10){
|
||||||
|
value = value.substring(0,10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
String field = attrInfoMap.get(name);
|
||||||
|
if (attrValueMap != null) {
|
||||||
|
value = String.valueOf(attrValueMap.get(field));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+380
@@ -1,5 +1,385 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.adc.da.slrs.sarBussStandItems.dao.SarBussStandItemsDao">
|
<mapper namespace="com.adc.da.slrs.sarBussStandItems.dao.SarBussStandItemsDao">
|
||||||
|
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems" >
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="modify_time" property="modifyTime" />
|
||||||
|
<result column="creation_time" property="creationTime" />
|
||||||
|
<result column="valid_flag" property="validFlag" />
|
||||||
|
<result column="remarks" property="remarks" />
|
||||||
|
<result column="responsible_unit" property="responsibleUnit" />
|
||||||
|
<result column="energy_kind" property="energyKind" />
|
||||||
|
<result column="apply_arctic" property="applyArctic" />
|
||||||
|
<result column="tack_time" property="tackTime" />
|
||||||
|
<result column="parts" property="parts" />
|
||||||
|
<result column="items_name" property="itemsName" />
|
||||||
|
<result column="items_num" property="itemsNum" />
|
||||||
|
<result column="stand_id" property="standId" />
|
||||||
|
<result column="MAINPOINTS_IMPEMENTATION" property="mainPointImplementation"/>
|
||||||
|
<result column="TERMS_CONDITIONS" property="termsConditions"/>
|
||||||
|
<result column="fo" property="fo" />
|
||||||
|
<result column="duty_engineer" property="dutyEngineer" />
|
||||||
|
<result column="svpps" property="svpps" />
|
||||||
|
<result column="claim_type" property="claimType" />
|
||||||
|
<result column="bus_stand_cover" property="busStandCover" />
|
||||||
|
<result column="file_type" property="fileType" />
|
||||||
|
<result column="claimTypeShow" property="claimTypeShow" />
|
||||||
|
<result column="dutyEngineerShow" property="dutyEngineerShow" />
|
||||||
|
<result column="responsibleUnitShow" property="responsibleUnitShow" />
|
||||||
|
<result column="foShow" property="foShow"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- SAR_BUSS_STAND_ITEMS table all fields -->
|
||||||
|
<sql id="Base_Column_List" >
|
||||||
|
SAR_BUSS_STAND_ITEMS.modify_time, SAR_BUSS_STAND_ITEMS.creation_time, SAR_BUSS_STAND_ITEMS.valid_flag, SAR_BUSS_STAND_ITEMS.remarks, responsible_unit, energy_kind, apply_arctic, tack_time, parts, items_name, items_num, SAR_BUSS_STAND_ITEMS.stand_id, SAR_BUSS_STAND_ITEMS.id,SAR_BUSS_STAND_ITEMS.MAINPOINTS_IMPEMENTATION,SAR_BUSS_STAND_ITEMS.TERMS_CONDITIONS,
|
||||||
|
tsFo.UNAME as foShow,SAR_BUSS_STAND_ITEMS.duty_engineer,SAR_BUSS_STAND_ITEMS.svpps,
|
||||||
|
SAR_BUSS_STAND_ITEMS.claim_type,SAR_BUSS_STAND_ITEMS.bus_stand_cover,SAR_BUSS_STAND_ITEMS.file_type,dicClaimType.DIC_TYPE_NAME as claimTypeShow,tsdutyEngineer.UNAME as dutyEngineerShow
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 查询条件 -->
|
||||||
|
<sql id="Base_Where_Clause">
|
||||||
|
left join TS_DICTYPE dicClaimType on (dicClaimType.dic_type_code = SAR_BUSS_STAND_ITEMS.claim_type and dicClaimType.dic_id is
|
||||||
|
not null and dicClaimType.valid_flag = 0)
|
||||||
|
left join TS_USER tsdutyEngineer on (tsdutyEngineer.USID = SAR_BUSS_STAND_ITEMS.duty_engineer and tsdutyEngineer.valid_flag=0
|
||||||
|
and tsdutyEngineer.DISABLE_FLAG=0)
|
||||||
|
left join TS_USER tsFo on (tsFo.USID = SAR_BUSS_STAND_ITEMS.fo and tsFo.valid_flag=0
|
||||||
|
and tsFo.DISABLE_FLAG=0)
|
||||||
|
where 1=1
|
||||||
|
<trim suffixOverrides="," >
|
||||||
|
<if test="modifyTime != null" >
|
||||||
|
and modify_time ${modifyTimeOperator} #{modifyTime}
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime1 != null" >
|
||||||
|
and modify_time >= #{modifyTime1}
|
||||||
|
</if>
|
||||||
|
<if test="modifyTime2 != null" >
|
||||||
|
and modify_time <= #{modifyTime2}
|
||||||
|
</if>
|
||||||
|
<if test="creationTime != null" >
|
||||||
|
and creation_time ${creationTimeOperator} #{creationTime}
|
||||||
|
</if>
|
||||||
|
<if test="creationTime1 != null" >
|
||||||
|
and creation_time >= #{creationTime1}
|
||||||
|
</if>
|
||||||
|
<if test="creationTime2 != null" >
|
||||||
|
and creation_time <= #{creationTime2}
|
||||||
|
</if>
|
||||||
|
<if test="validFlag != null" >
|
||||||
|
and SAR_BUSS_STAND_ITEMS.valid_flag ${validFlagOperator} #{validFlag}
|
||||||
|
</if>
|
||||||
|
<if test="remarks != null" >
|
||||||
|
and remarks ${remarksOperator} #{remarks}
|
||||||
|
</if>
|
||||||
|
<if test="responsibleUnit != null" >
|
||||||
|
and responsible_unit ${responsibleUnitOperator} #{responsibleUnit}
|
||||||
|
</if>
|
||||||
|
<if test="energyKind != null" >
|
||||||
|
and energy_kind ${energyKindOperator} #{energyKind}
|
||||||
|
</if>
|
||||||
|
<if test="applyArctic != null" >
|
||||||
|
and apply_arctic ${applyArcticOperator} #{applyArctic}
|
||||||
|
</if>
|
||||||
|
<if test="tackTime != null" >
|
||||||
|
and tack_time ${tackTimeOperator} #{tackTime}
|
||||||
|
</if>
|
||||||
|
<if test="tackTime1 != null" >
|
||||||
|
and tack_time >= #{tackTime1}
|
||||||
|
</if>
|
||||||
|
<if test="tackTime2 != null" >
|
||||||
|
and tack_time <= #{tackTime2}
|
||||||
|
</if>
|
||||||
|
<if test="parts != null" >
|
||||||
|
and SAR_BUSS_STAND_ITEMS.parts like concat(concat('%', #{parts}),'%')
|
||||||
|
</if>
|
||||||
|
<if test="nameOrRequest != null" >
|
||||||
|
and (SAR_BUSS_STAND_ITEMS.items_name like concat(concat('%', #{nameOrRequest}),'%') or SAR_BUSS_STAND_ITEMS.TERMS_CONDITIONS like concat(concat('%', #{nameOrRequest}),'%'))
|
||||||
|
</if>
|
||||||
|
<if test="itemsName != null" >
|
||||||
|
and items_name ${itemsNameOperator} #{itemsName}
|
||||||
|
</if>
|
||||||
|
<if test="itemsNum != null" >
|
||||||
|
and items_num ${itemsNumOperator} #{itemsNum}
|
||||||
|
</if>
|
||||||
|
<if test="standId != null" >
|
||||||
|
and SAR_BUSS_STAND_ITEMS.stand_id ${standIdOperator} #{standId}
|
||||||
|
</if>
|
||||||
|
<if test="id != null" >
|
||||||
|
and SAR_BUSS_STAND_ITEMS.id ${idOperator} #{id}
|
||||||
|
</if>
|
||||||
|
<if test="idlist != null">
|
||||||
|
and SAR_BUSS_STAND_ITEMS.id in
|
||||||
|
<foreach collection="idlist" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="fileType != null" >
|
||||||
|
and SAR_BUSS_STAND_ITEMS.file_type = #{fileType}
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 插入记录 -->
|
||||||
|
<insert id="insert" parameterType="com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems" >
|
||||||
|
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||||
|
SELECT SEQ_SAR_BUSS_STAND_ITEMS.NEXTVAL FROM DUAL
|
||||||
|
</selectKey> -->
|
||||||
|
insert into SAR_BUSS_STAND_ITEMS(<include refid="Base_Column_List" />)
|
||||||
|
values (#{modifyTime, jdbcType=TIMESTAMP}, #{creationTime, jdbcType=TIMESTAMP}, #{validFlag, jdbcType=INTEGER}, #{remarks, jdbcType=CLOB}, #{responsibleUnit, jdbcType=VARCHAR}, #{energyKind, jdbcType=VARCHAR}, #{applyArctic, jdbcType=VARCHAR}, #{tackTime, jdbcType=TIMESTAMP}, #{parts, jdbcType=VARCHAR}, #{itemsName, jdbcType=VARCHAR}, #{itemsNum, jdbcType=VARCHAR}, #{standId, jdbcType=VARCHAR}, #{id, jdbcType=VARCHAR})
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 动态插入记录 主键是序列 -->
|
||||||
|
<insert id="insertSelective" parameterType="com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems" >
|
||||||
|
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||||
|
SELECT SEQ_SAR_BUSS_STAND_ITEMS.NEXTVAL FROM DUAL
|
||||||
|
</selectKey> -->
|
||||||
|
insert into SAR_BUSS_STAND_ITEMS
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||||
|
<if test="modifyTime != null" >modify_time,</if>
|
||||||
|
<if test="creationTime != null" >creation_time,</if>
|
||||||
|
<if test="validFlag != null" >valid_flag,</if>
|
||||||
|
<if test="remarks != null" >remarks,</if>
|
||||||
|
<if test="responsibleUnit != null" >responsible_unit,</if>
|
||||||
|
<if test="energyKind != null" >energy_kind,</if>
|
||||||
|
<if test="applyArctic != null" >apply_arctic,</if>
|
||||||
|
<if test="tackTime != null" >tack_time,</if>
|
||||||
|
<if test="parts != null" >parts,</if>
|
||||||
|
<if test="itemsName != null" >items_name,</if>
|
||||||
|
<if test="itemsNum != null" >items_num,</if>
|
||||||
|
<if test="standId != null" >stand_id,</if>
|
||||||
|
<if test="id != null" >id,</if>
|
||||||
|
<if test="mainPointImplementation != null">MAINPOINTS_IMPEMENTATION,</if>
|
||||||
|
<if test="termsConditions != null">TERMS_CONDITIONS,</if>
|
||||||
|
|
||||||
|
<if test="fo != null" >fo,</if>
|
||||||
|
<if test="dutyEngineer != null" >duty_engineer,</if>
|
||||||
|
<if test="svpps != null" >svpps,</if>
|
||||||
|
<if test="claimType != null" >claim_type,</if>
|
||||||
|
<if test="busStandCover != null">bus_stand_cover,</if>
|
||||||
|
<if test="fileType != null">file_type</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||||
|
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||||
|
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||||
|
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
|
||||||
|
<if test="remarks != null" >#{remarks, jdbcType=CLOB},</if>
|
||||||
|
<if test="responsibleUnit != null" >#{responsibleUnit, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="energyKind != null" >#{energyKind, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="applyArctic != null" >#{applyArctic, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="tackTime != null" >#{tackTime, jdbcType=TIMESTAMP},</if>
|
||||||
|
<if test="parts != null" >#{parts, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="itemsName != null" >#{itemsName, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="itemsNum != null" >#{itemsNum, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="standId != null" >#{standId, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="mainPointImplementation != null">#{mainPointImplementation, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="termsConditions != null">#{termsConditions, jdbcType=VARCHAR},</if>
|
||||||
|
|
||||||
|
<if test="fo != null" >#{fo, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="dutyEngineer != null" >#{dutyEngineer, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="svpps != null" >#{svpps, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="claimType != null" >#{claimType, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="busStandCover != null" >#{busStandCover, jdbcType=VARCHAR},</if>
|
||||||
|
<if test="fileType != null" >#{fileType, jdbcType=VARCHAR}</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 根据pk,修改记录-->
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.adc.da.slrs.sarBussStandItems.entity.SarBussStandItems" >
|
||||||
|
update SAR_BUSS_STAND_ITEMS
|
||||||
|
set modify_time = #{modifyTime},
|
||||||
|
creation_time = #{creationTime},
|
||||||
|
valid_flag = #{validFlag},
|
||||||
|
remarks = #{remarks},
|
||||||
|
responsible_unit = #{responsibleUnit},
|
||||||
|
energy_kind = #{energyKind},
|
||||||
|
apply_arctic = #{applyArctic},
|
||||||
|
tack_time = #{tackTime},
|
||||||
|
parts = #{parts},
|
||||||
|
items_name = #{itemsName},
|
||||||
|
items_num = #{itemsNum},
|
||||||
|
stand_id = #{standId}
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 修改记录,只修改只不为空的字段 -->
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.slrs.sarBussStandItems.page.SarBussStandItemsEOPage" >
|
||||||
|
update SAR_BUSS_STAND_ITEMS
|
||||||
|
<set >
|
||||||
|
<if test="modifyTime != null" >
|
||||||
|
modify_time = #{modifyTime},
|
||||||
|
</if>
|
||||||
|
<if test="creationTime != null" >
|
||||||
|
creation_time = #{creationTime},
|
||||||
|
</if>
|
||||||
|
<if test="validFlag != null" >
|
||||||
|
valid_flag = #{validFlag},
|
||||||
|
</if>
|
||||||
|
<if test="remarks != null" >
|
||||||
|
remarks = #{remarks},
|
||||||
|
</if>
|
||||||
|
<if test="responsibleUnit != null" >
|
||||||
|
responsible_unit = #{responsibleUnit},
|
||||||
|
</if>
|
||||||
|
<if test="energyKind != null" >
|
||||||
|
energy_kind = #{energyKind},
|
||||||
|
</if>
|
||||||
|
<if test="applyArctic != null" >
|
||||||
|
apply_arctic = #{applyArctic},
|
||||||
|
</if>
|
||||||
|
<if test="tackTime != null" >
|
||||||
|
tack_time = #{tackTime},
|
||||||
|
</if>
|
||||||
|
<if test="tackTime == null">
|
||||||
|
tack_time = null,
|
||||||
|
</if>
|
||||||
|
<if test="parts != null" >
|
||||||
|
parts = #{parts},
|
||||||
|
</if>
|
||||||
|
<if test="itemsName != null" >
|
||||||
|
items_name = #{itemsName},
|
||||||
|
</if>
|
||||||
|
<if test="itemsNum != null" >
|
||||||
|
items_num = #{itemsNum},
|
||||||
|
</if>
|
||||||
|
<if test="standId != null" >
|
||||||
|
stand_id = #{standId},
|
||||||
|
</if>
|
||||||
|
<if test="mainPointImplementation != null">
|
||||||
|
MAINPOINTS_IMPEMENTATION = #{mainPointImplementation},
|
||||||
|
</if>
|
||||||
|
<if test="termsConditions != null">
|
||||||
|
TERMS_CONDITIONS = #{termsConditions},
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<if test="fo != null" >
|
||||||
|
fo = #{fo},
|
||||||
|
</if>
|
||||||
|
<if test="dutyEngineer != null" >
|
||||||
|
duty_engineer = #{dutyEngineer},
|
||||||
|
</if>
|
||||||
|
<if test="svpps != null" >
|
||||||
|
svpps = #{svpps},
|
||||||
|
</if>
|
||||||
|
<if test="claimType != null" >
|
||||||
|
claim_type = #{claimType},
|
||||||
|
</if>
|
||||||
|
<if test="busStandCover != null" >
|
||||||
|
bus_stand_cover = #{busStandCover},
|
||||||
|
</if>
|
||||||
|
<if test="fileType != null" >
|
||||||
|
file_type = #{fileType},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 根据id查询 SAR_BUSS_STAND_ITEMS -->
|
||||||
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||||
|
select <include refid="Base_Column_List" />
|
||||||
|
from SAR_BUSS_STAND_ITEMS
|
||||||
|
where id = #{value}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 删除记录 -->
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from SAR_BUSS_STAND_ITEMS
|
||||||
|
where id = #{value}
|
||||||
|
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<!-- SAR_BUSS_STAND_ITEMS 列表总数-->
|
||||||
|
<select id="queryByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||||
|
select count(1) from SAR_BUSS_STAND_ITEMS
|
||||||
|
<include refid="Base_Where_Clause"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询SAR_BUSS_STAND_ITEMS列表 -->
|
||||||
|
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||||
|
select * from
|
||||||
|
(select tmp_tb.* from
|
||||||
|
(select <include refid="Base_Column_List" /> from SAR_BUSS_STAND_ITEMS
|
||||||
|
<include refid="Base_Where_Clause"/>
|
||||||
|
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||||
|
${pager.orderCondition}
|
||||||
|
</if>
|
||||||
|
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||||
|
select SAR_BUSS_STAND_ITEMS.*,
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_BUSS_STAND_ITEM_VAL.property_type separator ',')
|
||||||
|
FROM
|
||||||
|
SAR_BUSS_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_BUSS_STAND_ITEM_VAL.property_value and TS_DICTYPE.dic_id is not null)
|
||||||
|
WHERE
|
||||||
|
SAR_BUSS_STAND_ITEM_VAL.ITEM_ID = SAR_BUSS_STAND_ITEMS.id
|
||||||
|
AND SAR_BUSS_STAND_ITEM_VAL.property_type = 'APPLY_ARCTIC'
|
||||||
|
) AS applyArcticShow,
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_BUSS_STAND_ITEM_VAL.property_type separator ',')
|
||||||
|
FROM
|
||||||
|
SAR_BUSS_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_BUSS_STAND_ITEM_VAL.property_value and TS_DICTYPE.dic_id is not null)
|
||||||
|
WHERE
|
||||||
|
SAR_BUSS_STAND_ITEM_VAL.ITEM_ID = SAR_BUSS_STAND_ITEMS.id
|
||||||
|
AND SAR_BUSS_STAND_ITEM_VAL.property_type = 'ENERGY_KIND'
|
||||||
|
) AS energyKindShow,
|
||||||
|
TS_ORG.ORG_NAME as responsibleUnitShow
|
||||||
|
from SAR_BUSS_STAND_ITEMS left join TS_ORG on SAR_BUSS_STAND_ITEMS.RESPONSIBLE_UNIT = TS_ORG.ID
|
||||||
|
<include refid="Base_Where_Clause"/>
|
||||||
|
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||||
|
${pager.orderCondition}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="querySarBussStandItemsList" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarBussStandItems.page.SarBussStandItemsEOPage">
|
||||||
|
select * from
|
||||||
|
(select tmp_tb.* from
|
||||||
|
(
|
||||||
|
select <include refid="Base_Column_List"/>,
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_BUSS_STAND_ITEM_VAL.property_type separator ',')
|
||||||
|
FROM
|
||||||
|
SAR_BUSS_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_BUSS_STAND_ITEM_VAL.property_value and TS_DICTYPE.dic_id is not null)
|
||||||
|
WHERE
|
||||||
|
SAR_BUSS_STAND_ITEM_VAL.ITEM_ID = SAR_BUSS_STAND_ITEMS.id
|
||||||
|
AND SAR_BUSS_STAND_ITEM_VAL.property_type = 'APPLY_ARCTIC'
|
||||||
|
) AS applyArcticShow,
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
group_concat(TS_DICTYPE.DIC_TYPE_NAME ORDER BY SAR_BUSS_STAND_ITEM_VAL.property_type separator ',')
|
||||||
|
FROM
|
||||||
|
SAR_BUSS_STAND_ITEM_VAL left join TS_DICTYPE on (TS_DICTYPE.dic_type_code = SAR_BUSS_STAND_ITEM_VAL.property_value and TS_DICTYPE.dic_id is not null)
|
||||||
|
WHERE
|
||||||
|
SAR_BUSS_STAND_ITEM_VAL.ITEM_ID = SAR_BUSS_STAND_ITEMS.id
|
||||||
|
AND SAR_BUSS_STAND_ITEM_VAL.property_type = 'ENERGY_KIND'
|
||||||
|
) AS energyKindShow,
|
||||||
|
TS_ORG.ORG_NAME as responsibleUnitShow
|
||||||
|
from SAR_BUSS_STAND_ITEMS left join TS_ORG on SAR_BUSS_STAND_ITEMS.RESPONSIBLE_UNIT = TS_ORG.id
|
||||||
|
|
||||||
|
<include refid="Base_Where_Clause"/>
|
||||||
|
ORDER BY SAR_BUSS_STAND_ITEMS,modify_time,SAR_BUSS_STAND_ITEMS.id
|
||||||
|
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||||
|
</select>
|
||||||
|
<select id="querySarBussStandItemsListCount" resultType="java.lang.Integer" parameterType="com.adc.da.slrs.sarBussStandItems.page.SarBussStandItemsEOPage">
|
||||||
|
select count(1) from SAR_BUSS_STAND_ITEMS left join TS_ORG on SAR_BUSS_STAND_ITEMS.RESPONSIBLE_UNIT = TS_ORG.id
|
||||||
|
<include refid="Base_Where_Clause"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectItemByItemNum" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarBussStandItems.page.SarBussStandItemsEOPage">
|
||||||
|
select *
|
||||||
|
from SAR_BUSS_STAND_ITEMS
|
||||||
|
where valid_flag = '0' and items_num = #{itemsNum} and stand_id = #{standId} and file_type = #{fileType}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<delete id="deleteByStandIdAndFileType" parameterType="java.lang.String">
|
||||||
|
delete from SAR_BUSS_STAND_ITEMS
|
||||||
|
where stand_id = #{standId}
|
||||||
|
<if test="fileType != null">
|
||||||
|
and file_type = #{fileType}
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.adc.da.person.entity.TsPersonCollect;
|
|||||||
import com.adc.da.person.page.PersonCollectEOPage;
|
import com.adc.da.person.page.PersonCollectEOPage;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ import java.util.List;
|
|||||||
* <b>日期:</b> 2018-09-03 <br>
|
* <b>日期:</b> 2018-09-03 <br>
|
||||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||||
*/
|
*/
|
||||||
|
@Repository
|
||||||
public interface PersonCollectEODao extends BaseMapper<TsPersonCollect> {
|
public interface PersonCollectEODao extends BaseMapper<TsPersonCollect> {
|
||||||
|
|
||||||
public List<TsPersonCollect> queryByList(BasePage page);
|
public List<TsPersonCollect> queryByList(BasePage page);
|
||||||
|
|||||||
Reference in New Issue
Block a user