Merge branch 'develop_1' into 'develop_master'
update:标准征求意见增加字段 See merge request !61
This commit is contained in:
+2
@@ -56,6 +56,8 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
|
|||||||
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getZccssrq())){
|
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getZccssrq())){
|
||||||
lawsDto.setZCCSSRQGJ(sarLawsAttrDetailedLists.get(0).getZccssrq());
|
lawsDto.setZCCSSRQGJ(sarLawsAttrDetailedLists.get(0).getZccssrq());
|
||||||
}
|
}
|
||||||
|
if ("INLAND".equals(lawsDto.getStandType()))lawsDto.setStandType("INLAND_STAND");
|
||||||
|
if ("FOREIGN".equals(lawsDto.getStandType()))lawsDto.setStandType("FOREIGN_STAND");
|
||||||
}
|
}
|
||||||
//适用车型
|
//适用车型
|
||||||
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
|
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
|
||||||
|
|||||||
+2
-5
@@ -4,9 +4,7 @@ package com.adc.da.slrs.sarStandIdea.controller;
|
|||||||
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.slrs.sarStandIdea.dao.SarPublicIdeaAllDao;
|
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
import com.adc.da.slrs.sarStandIdea.entity.*;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.GetExcelDto;
|
|
||||||
import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaAllServiceImpl;
|
import com.adc.da.slrs.sarStandIdea.service.Impl.SarPublicIdeaAllServiceImpl;
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
@@ -18,7 +16,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import com.adc.da.base.web.BaseController;
|
import com.adc.da.base.web.BaseController;
|
||||||
@@ -51,7 +48,7 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
|||||||
@ApiOperation(value = "查询全部意见")
|
@ApiOperation(value = "查询全部意见")
|
||||||
@GetMapping("/getAllStand")
|
@GetMapping("/getAllStand")
|
||||||
public ResponseMessage getAllStand(DetAllStandDto detAllStandDto){
|
public ResponseMessage getAllStand(DetAllStandDto detAllStandDto){
|
||||||
IPage<SarPublicIdeaAll> publicList =sarPublicIdeaAllImpl.selectAll(detAllStandDto);
|
IPage<SarPublicIdeaAllSUD> publicList =sarPublicIdeaAllImpl.selectAll(detAllStandDto);
|
||||||
return Result.success("200",publicList);
|
return Result.success("200",publicList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,40 +1,12 @@
|
|||||||
package com.adc.da.slrs.sarStandIdea.entity;
|
package com.adc.da.slrs.sarStandIdea.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class DetAllStandDto {
|
public class DetAllStandDto {
|
||||||
Integer page;
|
Integer page;
|
||||||
Integer size;
|
Integer size;
|
||||||
String cid;
|
String cid;
|
||||||
String userId;
|
String userId;
|
||||||
|
String endTime;
|
||||||
public Integer getPage() {
|
|
||||||
return page;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPage(Integer page) {
|
|
||||||
this.page = page;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getSize() {
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSize(Integer size) {
|
|
||||||
this.size = size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserId() {
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCid() {
|
|
||||||
return cid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCid(String cid) {
|
|
||||||
this.cid = cid;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,5 +57,8 @@ public class SarPublicIdea extends BaseEntity {
|
|||||||
@TableField("category_flag")
|
@TableField("category_flag")
|
||||||
private String categoryFlag;
|
private String categoryFlag;
|
||||||
|
|
||||||
|
@TableField("stand_id")
|
||||||
|
private String standId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package com.adc.da.slrs.sarStandIdea.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* //用于增删查改的判断
|
||||||
|
*
|
||||||
|
* @author ZhangZhiYuan
|
||||||
|
* @date 2021-07-27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SarPublicIdeaAllSUD extends SarPublicIdeaAll{
|
||||||
|
public Integer ideaKey;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.adc.da.slrs.sarStandIdea.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* //用于查询标准关联信息
|
||||||
|
*
|
||||||
|
* @author ZhangZhiYuan
|
||||||
|
* @date 2021-07-27
|
||||||
|
*/
|
||||||
|
public class SarPublicIdeaDto {
|
||||||
|
private String id;
|
||||||
|
private String category;
|
||||||
|
private String cid;
|
||||||
|
private String cname;
|
||||||
|
private Date startTime;
|
||||||
|
private Date endTime;
|
||||||
|
private String categoryFlag;
|
||||||
|
private String standId;
|
||||||
|
// private String ;
|
||||||
|
}
|
||||||
+2
-1
@@ -4,6 +4,7 @@ package com.adc.da.slrs.sarStandIdea.service;
|
|||||||
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||||
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAllSUD;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
public interface ISarPublicIdeaAllService extends IService<SarPublicIdeaAll> {
|
public interface ISarPublicIdeaAllService extends IService<SarPublicIdeaAll> {
|
||||||
|
|
||||||
|
|
||||||
IPage<SarPublicIdeaAll> selectAll(DetAllStandDto detAllStandDto);
|
IPage<SarPublicIdeaAllSUD> selectAll(DetAllStandDto detAllStandDto);
|
||||||
String add(SarPublicIdeaAll sarPublicIdeaAll);
|
String add(SarPublicIdeaAll sarPublicIdeaAll);
|
||||||
String updateById(SarPublicIdeaAll sarPublicIdeaAll, String autUserid);
|
String updateById(SarPublicIdeaAll sarPublicIdeaAll, String autUserid);
|
||||||
String delete(DelStandDto delStandDto);
|
String delete(DelStandDto delStandDto);
|
||||||
|
|||||||
+29
-11
@@ -1,12 +1,12 @@
|
|||||||
package com.adc.da.slrs.sarStandIdea.service.Impl;
|
package com.adc.da.slrs.sarStandIdea.service.Impl;
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.lang.Snowflake;
|
import com.adc.da.slrs.sarLawsDetailedList.Util.BeanConverUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
|
||||||
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao;
|
import com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
import com.adc.da.slrs.sarStandIdea.entity.DelStandDto;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
import com.adc.da.slrs.sarStandIdea.entity.DetAllStandDto;
|
||||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||||
|
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAllSUD;
|
||||||
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaAllService;
|
import com.adc.da.slrs.sarStandIdea.service.ISarPublicIdeaAllService;
|
||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -14,17 +14,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.apache.poi.ss.usermodel.*;
|
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.servlet.ServletOutputStream;
|
import java.text.ParseException;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.*;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,14 +40,36 @@ public class SarPublicIdeaAllServiceImpl extends ServiceImpl<SarPublicIdeaAllDao
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<SarPublicIdeaAll> selectAll(DetAllStandDto detAllStandDto){
|
public IPage<SarPublicIdeaAllSUD> selectAll(DetAllStandDto detAllStandDto){
|
||||||
|
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
Date Time = null;
|
||||||
|
try {
|
||||||
|
Time = sdf.parse(detAllStandDto.getEndTime());
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
||||||
wrapper.eq("CID",detAllStandDto.getCid());
|
wrapper.eq("CID",detAllStandDto.getCid());
|
||||||
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(),detAllStandDto.getSize());
|
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(),detAllStandDto.getSize());
|
||||||
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
||||||
System.out.println("总条数"+userIPage.getTotal());
|
System.out.println("总条数"+userIPage.getTotal());
|
||||||
System.out.println("总页数"+userIPage.getPages());
|
System.out.println("总页数"+userIPage.getPages());
|
||||||
return userIPage;
|
List<SarPublicIdeaAll> list= userIPage.getRecords();
|
||||||
|
List<SarPublicIdeaAllSUD> list1 = new ArrayList<>();
|
||||||
|
list1 = BeanConverUtil.converList(list, SarPublicIdeaAllSUD.class);
|
||||||
|
for (SarPublicIdeaAllSUD sud:list1){
|
||||||
|
if (Time.compareTo(new Date())>=0)sud.setIdeaKey(0);
|
||||||
|
else {sud.setIdeaKey(1);}
|
||||||
|
}
|
||||||
|
IPage<SarPublicIdeaAllSUD> userIPage1 = new Page<>();
|
||||||
|
userIPage1.setPages(userIPage.getPages());
|
||||||
|
userIPage1.setSize(userIPage.getSize());
|
||||||
|
userIPage1.setTotal(userIPage.getTotal());
|
||||||
|
userIPage1.setCurrent(userIPage.getCurrent());
|
||||||
|
userIPage1.setRecords(list1);
|
||||||
|
return userIPage1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+2
-3
@@ -49,9 +49,8 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl<SarPublicIdeaDao, SarP
|
|||||||
QueryWrapper<SarPublicIdea> list = new QueryWrapper<>();
|
QueryWrapper<SarPublicIdea> list = new QueryWrapper<>();
|
||||||
list.like(StringUtils.isNotEmpty(category),"category",category)
|
list.like(StringUtils.isNotEmpty(category),"category",category)
|
||||||
.like(StringUtils.isNotEmpty(cname),"cname",cname)
|
.like(StringUtils.isNotEmpty(cname),"cname",cname)
|
||||||
.ge(start!=null,"start_time",start).
|
.ge(start!=null,"start_time",start)
|
||||||
le(end!=null,"end_time",end);
|
.le(end!=null,"end_time",end);
|
||||||
|
|
||||||
Page<SarPublicIdea> page = new Page<>(p,size);
|
Page<SarPublicIdea> page = new Page<>(p,size);
|
||||||
IPage<SarPublicIdea> userIPage = sarPublicIdeaDao.selectPage(page, list);
|
IPage<SarPublicIdea> userIPage = sarPublicIdeaDao.selectPage(page, list);
|
||||||
System.out.println("总条数"+userIPage.getTotal());
|
System.out.println("总条数"+userIPage.getTotal());
|
||||||
|
|||||||
Reference in New Issue
Block a user