Commit 638278cc by jiang'yun

修改

parent 20b31340
...@@ -228,7 +228,7 @@ public class SjDjjcController extends BaseController ...@@ -228,7 +228,7 @@ public class SjDjjcController extends BaseController
@PreAuthorize("@ss.hasPermi('designInformation:sjDjjc:importData')") @PreAuthorize("@ss.hasPermi('designInformation:sjDjjc:importData')")
@PostMapping("/importData") @PostMapping("/importData")
@ResponseBody @ResponseBody
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception public AjaxResult importData(MultipartFile file, boolean updateSupport,String jh) throws Exception
{ {
XSSFWorkbook workbook = null; XSSFWorkbook workbook = null;
try { try {
...@@ -237,7 +237,6 @@ public class SjDjjcController extends BaseController ...@@ -237,7 +237,6 @@ public class SjDjjcController extends BaseController
// 获取井基础信息表,下标从0开始 // 获取井基础信息表,下标从0开始
XSSFSheet sheet = workbook.getSheetAt(0); XSSFSheet sheet = workbook.getSheetAt(0);
int lastRowNum = sheet.getLastRowNum(); int lastRowNum = sheet.getLastRowNum();
String jh ="";
// 通过循环,逐行取出表中每行数据 // 通过循环,逐行取出表中每行数据
for(int i=0;i<=lastRowNum;i++){ for(int i=0;i<=lastRowNum;i++){
//跳过第一行 //跳过第一行
...@@ -250,10 +249,10 @@ public class SjDjjcController extends BaseController ...@@ -250,10 +249,10 @@ public class SjDjjcController extends BaseController
continue; continue;
} }
SjDjjc info=new SjDjjc(); SjDjjc info=new SjDjjc();
jh=new DataFormatter().formatCellValue(row.getCell(0)); // jh=new DataFormatter().formatCellValue(row.getCell(0));
if(StringUtils.isEmpty(jh)){ // if(StringUtils.isEmpty(jh)){
return AjaxResult.error("井基础信息中第"+(i+1)+"行井号不能为空"); // return AjaxResult.error("井基础信息中第"+(i+1)+"行井号不能为空");
} // }
info.setJh(jh); info.setJh(jh);
String jb=new DataFormatter().formatCellValue(row.getCell(1)); String jb=new DataFormatter().formatCellValue(row.getCell(1));
......
...@@ -249,9 +249,9 @@ public class Jsaa extends BaseEntity ...@@ -249,9 +249,9 @@ public class Jsaa extends BaseEntity
//完井开始日期 //完井开始日期
private String wjrqks; private String wjsjks;
//完井结束日期 //完井结束日期
private String wjrqjs; private String wjsjjs;
//井数量 //井数量
private Integer jsl; private Integer jsl;
......
...@@ -132,9 +132,11 @@ public class DjdcServiceImpl implements DjdcService { ...@@ -132,9 +132,11 @@ public class DjdcServiceImpl implements DjdcService {
Jswa jswapa=new Jswa(); Jswa jswapa=new Jswa();
jswapa.setJh(item.getJh()); jswapa.setJh(item.getJh());
jswapa.setJs(item.getJs()); jswapa.setJs(item.getJs());
Jswa md=jswaMapper.selectMd(jswapa); if(item.getJs()!=null){
if(md!=null){ Jswa md=jswaMapper.selectMd(jswapa);
item.setZjymd(md.getMd()); if(md!=null){
item.setZjymd(md.getMd());
}
} }
Map<Integer, Integer> valueCountMap = new TreeMap<>(); // 使用TreeMap自动按值排序 Map<Integer, Integer> valueCountMap = new TreeMap<>(); // 使用TreeMap自动按值排序
......
...@@ -178,11 +178,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -178,11 +178,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="cyc != null and cyc != ''"> and cyc = #{cyc}</if> <if test="cyc != null and cyc != ''"> and cyc = #{cyc}</if>
<if test="czds != null "> and czds = #{czds}</if> <if test="czds != null "> and czds = #{czds}</if>
<if test="sjcw != null and sjcw != ''"> and sjcw = #{sjcw}</if> <if test="sjcw != null and sjcw != ''"> and sjcw = #{sjcw}</if>
<if test="wjrqks!=null and wjrqks!=''"> <if test="wjsjks!=null and wjsjks!=''">
and to_char(WJRQ,'YYYY')>=#{wjrqks} and to_char(WJRQ,'YYYY')>=#{wjsjks}
</if> </if>
<if test="wjrqjs!=null and wjrqjs!=''"> <if test="wjsjjs!=null and wjsjjs!=''">
and to_char(WJRQ,'YYYY')&lt;=#{wjrqjs} and to_char(WJRQ,'YYYY')&lt;=#{wjsjjs}
</if> </if>
</where> </where>
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment