Merge branch 'develop_1' into 'develop_master'

Develop 1

See merge request !42
This commit is contained in:
王夏晖
2021-07-22 08:32:12 +00:00
24 changed files with 548 additions and 115 deletions
@@ -13,7 +13,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@FeignClient(value = "bat-wkflow") @FeignClient(value = "bat-wkflow-wh")
//@FeignClient(value = "shan") //@FeignClient(value = "shan")
public interface workFlowFeignClient { public interface workFlowFeignClient {
@@ -3,7 +3,7 @@
# 数据库配置 # 数据库配置
#============================================= #=============================================
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
spring.datasource.url = jdbc:mysql://39.100.23.127:3306/foton_slrs_test?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false spring.datasource.url = jdbc:mysql://10.96.10.171 :3306/foton_slrs_test?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false
spring.datasource.username = root spring.datasource.username = root
spring.datasource.password = root spring.datasource.password = root
@@ -11,14 +11,14 @@ spring.datasource.password = root
#============================================== #==============================================
# 应用设置 # 应用设置
spring.application.name=FotonLAWSSystem spring.application.name=BAT-WKFLOW-WH
application.code=20200101 application.code=20200101
application.center=1 application.center=1
#============================================== #==============================================
#Eruept #Eruept
eureka.client.allow-redirects=true eureka.client.allow-redirects=true
eureka.client.register-with-eureka=true eureka.client.register-with-eureka=true
eureka.client.service-url.defaultZone=http://101.36.227.25:8761/eureka/ eureka.client.service-url.defaultZone=http://10.96.10.171:8761/eureka/
#============================================== #==============================================
# 邮箱配置1 # 邮箱配置1
@@ -43,7 +43,7 @@ spring.mail.port=587
#spring.rabbitmq.username=uat_pcms #spring.rabbitmq.username=uat_pcms
#spring.rabbitmq.password=VxsBLL5bJruwzXfS #spring.rabbitmq.password=VxsBLL5bJruwzXfS
# spring.rabbitmq.publisher-confirms=true # spring.rabbitmq.publisher-confirms=true
spring.rabbitmq.host=192.168.10.248 spring.rabbitmq.host=192.168.1.109
spring.rabbitmq.port=5672 spring.rabbitmq.port=5672
spring.rabbitmq.username=ca spring.rabbitmq.username=ca
spring.rabbitmq.password=cs986432 spring.rabbitmq.password=cs986432
@@ -25,11 +25,11 @@ spring.mail.port=587
# ============================================== # ==============================================
# rabbitMQ # rabbitMQ
# ============================================== # ==============================================
spring.rabbitmq.host=rabbitmq-cluster-01.vs.test.geely.svc #
spring.rabbitmq.host=192.168.1.109
spring.rabbitmq.port=5672 spring.rabbitmq.port=5672
spring.rabbitmq.virtual-host=uat_pcms spring.rabbitmq.username=ca
spring.rabbitmq.username=uat_pcms spring.rabbitmq.password=cs986432
spring.rabbitmq.password=VxsBLL5bJruwzXfS
# spring.rabbitmq.publisher-confirms=true # spring.rabbitmq.publisher-confirms=true
# ============================================== # ==============================================
@@ -25,11 +25,15 @@ spring.mail.port=587
# ============================================== # ==============================================
# rabbitMQ # rabbitMQ
# ============================================== # ==============================================
spring.rabbitmq.host=rabbitmq-cluster-01.vs.test.geely.svc spring.rabbitmq.host=192.168.1.109
spring.rabbitmq.port=5672 spring.rabbitmq.port=5672
spring.rabbitmq.virtual-host=uat_pcms spring.rabbitmq.username=ca
spring.rabbitmq.username=uat_pcms spring.rabbitmq.password=cs986432
spring.rabbitmq.password=VxsBLL5bJruwzXfS #spring.rabbitmq.host=rabbitmq-cluster-01.vs.test.geely.svc
#spring.rabbitmq.port=5672
#spring.rabbitmq.virtual-host=uat_pcms
#spring.rabbitmq.username=uat_pcms
#spring.rabbitmq.password=VxsBLL5bJruwzXfS
# spring.rabbitmq.publisher-confirms=true # spring.rabbitmq.publisher-confirms=true
# ============================================== # ==============================================
@@ -39,7 +39,7 @@ eureka.client.fetch-registry=true
#eureka.client.service-url.defaultZone=http://127.0.0.1:8671/eureka/ #eureka.client.service-url.defaultZone=http://127.0.0.1:8671/eureka/
#eureka.client.service-url.defaultZone=http://10.5.116.172:8672/eureka/ #eureka.client.service-url.defaultZone=http://10.5.116.172:8672/eureka/
eureka.client.service-url.defaultZone=http://101.36.227.25:8761/eureka/ eureka.client.service-url.defaultZone=http://10.96.10.171:8761/eureka/
# 请求连接的超时时间 默认的时间为 1 秒 # 请求连接的超时时间 默认的时间为 1 秒
ribbon.ConnectTimeout=500000 ribbon.ConnectTimeout=500000
@@ -3,15 +3,14 @@ package com.adc.da.slrs.sarLawsAttrDetailedList.controller;
import com.adc.da.att.entity.AttFileEO; import com.adc.da.att.entity.AttFileEO;
import com.adc.da.att.service.IAttFileEOService; import com.adc.da.att.service.IAttFileEOService;
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.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao; import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.*; import com.adc.da.slrs.sarLawsAttrDetailedList.entity.*;
import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListService; import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListService;
import com.adc.da.sys.service.IDicTypeEOService;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -25,6 +24,7 @@ import java.io.IOException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
@@ -46,6 +46,8 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
private IAttFileEOService attFileEOService; private IAttFileEOService attFileEOService;
@Autowired @Autowired
private SarLawsAttrDetailedListDao sarLawsAttrDetailedListDao; private SarLawsAttrDetailedListDao sarLawsAttrDetailedListDao;
@Autowired
private IDicTypeEOService iDicTypeEOService;
@@ -59,8 +61,8 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
**/ **/
@ApiOperation(value = "查询标准信息") @ApiOperation(value = "查询标准信息")
@GetMapping("/selectLawsById") @GetMapping("/selectLawsById")
public ResponseMessage selectLawsById(@RequestParam(defaultValue = "1")int Page, @RequestParam(defaultValue = "10") int Size, String id,String standName){ public ResponseMessage selectLawsById(SarFindDto sarFindDto){
List<LawsDto> laws = iSarLawsAttrDetailedList.selectLaws(id,Page-1,Size,standName); List<LawsDto> laws = iSarLawsAttrDetailedList.selectLaws(sarFindDto);
return Result.success("200",laws); return Result.success("200",laws);
} }
@@ -85,6 +87,26 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
public ResponseMessage selectByStandId(@RequestParam(defaultValue = "1")int Page, @RequestParam(defaultValue = "10") int Size, String id){ public ResponseMessage selectByStandId(@RequestParam(defaultValue = "1")int Page, @RequestParam(defaultValue = "10") int Size, String id){
return null; return null;
} }
/**
*
* @param sarLawsAttrDetailedList
* @return
* @author zzy
* date 2021-07-20
**/
@ApiOperation(value = "修改日期")
@PostMapping("/setTimes")
public ResponseMessage setTimes(SarLawsAttrDetailedList sarLawsAttrDetailedList){
int a=iSarLawsAttrDetailedList.setTimes(sarLawsAttrDetailedList);
return Result.success("200",a);
}
@ApiOperation(value = "根据标准查询时间")
@GetMapping
public ResponseMessage selectTimes(String id){
Map<String ,List<StandTimeDto>> map = iSarLawsAttrDetailedList.selectTimes(id);
return Result.success("200",map);
}
/** /**
@@ -114,29 +136,120 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
}else { }else {
data=sarLawsAttrDetailedListDao.selectLawsById(standExcelVo.getIds(),null); data=sarLawsAttrDetailedListDao.selectLawsById(standExcelVo.getIds(),null);
} }
for (LawsDto lawsDto:data){ //适用车型
if (StringUtils.isNoneBlank(sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()).toString())){ Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
lawsDto.setTypeApplicable(sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()).toString()); List<Map<String, String>> typeApplicable = (List<Map<String, String>>)map.get("ENERGYTYPES");
for (LawsDto list1:data){
if (StringUtils.isNotBlank(list1.getTypeApplicable()) && list1.getTypeApplicable().contains(",")){
String[] split = list1.getTypeApplicable().split(",");
StringBuilder builder = new StringBuilder();
for (String s:split){
for (Map<String,String> map1:typeApplicable) {
if (map1.get("value").equals(s)){
s=map1.get("label");
builder.append(s+",");
break;
}
}
}
String completedString = builder.delete(builder.length()-1,builder.length()).toString();
list1.setTypeApplicable(completedString);
}else {
for (Map<String, String> map1 : typeApplicable) {
if (map1.get("value").equals(list1.getTypeApplicable())) {
list1.setTypeApplicable(map1.get("label"));
break;
}
}
} }
} }
List<StandExcelDto> standExcelDtos = new ArrayList<>(); //能源类型
for (LawsDto lawsDto:data){ List<Map<String, String>> nylx = (List<Map<String, String>>)map.get("NYLXCLASS");
StandExcelDto standExcelDto = StandExcelDto.builder() for (LawsDto list1:data){
.standNumber(lawsDto.getStandNumber()) if (StringUtils.isNotBlank(list1.getNYLX()) && list1.getNYLX().contains(",")){
.standName(lawsDto.getStandName()) String[] split = list1.getNYLX().split(",");
.standEnName(lawsDto.getStandEnName()) StringBuilder builder = new StringBuilder();
.typeApplicable(lawsDto.getTypeApplicable()) for (String s:split){
.NYLX(lawsDto.getNYLX()) for (Map<String,String> map1:nylx) {
.putTime(lawsDto.getPutTime()) if (map1.get("value").equals(s)){
.newCarTime(lawsDto.getXCXSSRQGJ()) s=map1.get("label");
.nowCarTime(lawsDto.getZCCSSRQGJ()) builder.append(s+",");
.ZRBM(lawsDto.getZRBM()) break;
.SYCPX(lawsDto.getSYCPX()) }
.CYCVPPSBM(lawsDto.getCYCVPPSBM()) }
.CYCVPPSCN(lawsDto.getCYCVPPSCN()) }
.KCCVPPSBM(lawsDto.getKCCVPPSBM()) String completedString = builder.delete(builder.length()-1,builder.length()).toString();
.KCCVPPSCN(lawsDto.getKCCVPPSCN()) list1.setNYLX(completedString);
.build(); }else {
for (Map<String, String> map1 : nylx) {
if (map1.get("value").equals(list1.getNYLX())) {
list1.setNYLX(map1.get("label"));
break;
}
}
}
}
//责任部门
List<Map<String, String>> zrbn = (List<Map<String, String>>)map.get("ZRBMCLASS");
for (LawsDto list1:data){
if (StringUtils.isNotBlank(list1.getZRBM()) && list1.getZRBM().contains(",")){
String[] split = list1.getZRBM().split(",");
StringBuilder builder = new StringBuilder();
for (String s:split){
for (Map<String,String> map1:zrbn) {
if (map1.get("value").equals(s)){
s=map1.get("label");
builder.append(s+",");
break;
}
}
}
String completedString = builder.delete(builder.length()-1,builder.length()).toString();
list1.setZRBM(completedString);
}else {
for (Map<String, String> map1 : zrbn) {
if (map1.get("value").equals(list1.getZRBM())) {
list1.setZRBM(map1.get("label"));
break;
}
}
}
}
//产品线
List<Map<String, String>> sycpx = (List<Map<String, String>>)map.get("SYCPXCLASS");
for (LawsDto list1:data){
if (list1.getPutTime()!=null){
list1.setPutTime(list1.getPutTime().substring(0,10));
}
if (list1.getZCCSSRQGJ()!=null){
list1.setZCCSSRQGJ(list1.getZCCSSRQGJ().substring(0,10));
}
if (list1.getXCXSSRQGJ()!=null){
list1.setXCXSSRQGJ(list1.getXCXSSRQGJ().substring(0,10));
}
if (StringUtils.isNotBlank(list1.getSYCPX()) && list1.getSYCPX().contains(",")){
String[] split = list1.getSYCPX().split(",");
StringBuilder builder = new StringBuilder();
for (String s:split){
for (Map<String,String> map1:sycpx) {
if (map1.get("value").equals(s)){
s=map1.get("label");
builder.append(s+",");
break;
}
}
}
String completedString = builder.delete(builder.length()-1,builder.length()).toString();
list1.setSYCPX(completedString);
}else {
for (Map<String, String> map1 : sycpx) {
if (map1.get("value").equals(list1.getSYCPX())) {
list1.setSYCPX(map1.get("label"));
break;
}
}
}
} }
EasyExcel.write(response.getOutputStream(), LawsDto.class).useDefaultStyle(false).autoCloseStream(Boolean.FALSE).sheet("sheet1") EasyExcel.write(response.getOutputStream(), LawsDto.class).useDefaultStyle(false).autoCloseStream(Boolean.FALSE).sheet("sheet1")
.doWrite(data); .doWrite(data);
@@ -2,6 +2,7 @@ package com.adc.da.slrs.sarLawsAttrDetailedList.dao;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto; import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarLawsAttrDetailedList; import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarLawsAttrDetailedList;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandRegionalTimeDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@@ -25,8 +26,8 @@ public interface SarLawsAttrDetailedListDao extends BaseMapper<SarLawsAttrDetail
List<LawsDto> selectLawsById(@Param("param1") List<String> LawsIds, @Param("standName") String standName); List<LawsDto> selectLawsById(@Param("param1") List<String> LawsIds, @Param("standName") String standName);
//根据标准id查出数据 //根据标准id查出数据
List<LawsDto> selectLawsByIdC(@Param("param1") List<String> LawsIds, @Param("standName") String standName,@Param("standType")String standType); List<LawsDto> selectLawsByIdC(@Param("param1") List<String> LawsIds, @Param("standName") String standName,@Param("standType")String standType);
//查询适用车型 //查询时间
List<String> selectTypeApplicable(@Param("param1") String LawsId); List<StandRegionalTimeDto> selectTimes(String standId);
List<String> selectLawsId2(String standId); List<String> selectLawsId2(String standId);
Boolean insertList(@Param("sarLawsAttrDetailedLists") List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists); Boolean insertList(@Param("sarLawsAttrDetailedLists") List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists);
Boolean deleteByStandId(String standId); Boolean deleteByStandId(String standId);
@@ -1,7 +1,10 @@
package com.adc.da.slrs.sarLawsAttrDetailedList.entity; package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@@ -12,7 +15,7 @@ import lombok.NoArgsConstructor;
/** /**
* //Dto,用于从标准主表中查询和检索信息 * //Dto,用于从标准主表中查询和检索信息
* 主表还未完善需修改 *
* *
* @author ZhangZhiYuan * @author ZhangZhiYuan
* date 2021-06-16 * date 2021-06-16
@@ -21,6 +24,7 @@ import lombok.NoArgsConstructor;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@ExcelIgnoreUnannotated
public class LawsDto { public class LawsDto {
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private String id; private String id;
@@ -42,14 +46,17 @@ public class LawsDto {
@ColumnWidth(16) @ColumnWidth(16)
@ExcelProperty(value = "标准实施日期", index = 5) @ExcelProperty(value = "标准实施日期", index = 5)
@ApiModelProperty(value = "标准实施日期") @ApiModelProperty(value = "标准实施日期")
@DateTimeFormat("yyyy年MM月dd日")
private String putTime; private String putTime;
@ColumnWidth(16) @ColumnWidth(16)
@ExcelProperty(value = "新车型实施日期", index = 6) @ExcelProperty(value = "新车型实施日期", index = 6)
@ApiModelProperty(value = "新车型实施日期") @ApiModelProperty(value = "新车型实施日期")
@DateTimeFormat("yyyy年MM月dd日")
private String XCXSSRQGJ; private String XCXSSRQGJ;
@ColumnWidth(16) @ColumnWidth(16)
@ExcelProperty(value = "在产车实施日期", index = 7) @ExcelProperty(value = "在产车实施日期", index = 7)
@ApiModelProperty(value = "在产车实施日期") @ApiModelProperty(value = "在产车实施日期")
@DateTimeFormat("yyyy年MM月dd日")
private String ZCCSSRQGJ; private String ZCCSSRQGJ;
@ExcelProperty(value = "责任部门", index = 8) @ExcelProperty(value = "责任部门", index = 8)
@ApiModelProperty(value = "责任部门") @ApiModelProperty(value = "责任部门")
@@ -0,0 +1,31 @@
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 高级检索
*
* @author ZhangZhiYuan
* @date 2021-07-22
*/
@Data
public class SarFindDto {
private int Page;
private int Size;
private String id;
private String standName;
private String standNumber;
private String standEnName;
private String typeApplicable;
private String NYLX;
private String putTime;
private String XCXSSRQGJ;
private String ZCCSSRQGJ;
private String ZRBM;
private String SYCPX;
}
@@ -43,5 +43,16 @@ public class SarLawsAttrDetailedList extends BaseEntity {
@TableField(value = "number") @TableField(value = "number")
private String number; private String number;
@ApiModelProperty(value = "标准实施日期")
@TableField(value = "putTime")
private String putTime;
@ApiModelProperty(value = "新车型实施日期")
@TableField(value = "xcxssrq")
private String xcxssrq;
@ApiModelProperty(value = "在产车实施日期")
@TableField(value = "zccssrq")
private String zccssrq;
} }
@@ -0,0 +1,22 @@
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* //TODO 添加类、接口描述
*
* @author ZhangZhiYuan
* @date 2021-07-21
*/
@Data
public class StandRegionalTimeDto {
@ApiModelProperty(value = "国家")
private String country;
@ApiModelProperty(value = "实施日期")
private String putTime;
@ApiModelProperty(value = "在产车实施日期")
private String zccssrq;
@ApiModelProperty(value = "新车型实施日期")
private String xcxssrq;
}
@@ -0,0 +1,20 @@
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* //TODO 添加类、接口描述
*
* @author ZhangZhiYuan
* @date 2021-07-21
*/
@Data
public class StandTimeDto {
@ApiModelProperty(value = "实施日期")
private String putTime;
@ApiModelProperty(value = "在产车实施日期")
private String zccssrq;
@ApiModelProperty(value = "新车型实施日期")
private String xcxssrq;
}
@@ -1,12 +1,12 @@
package com.adc.da.slrs.sarLawsAttrDetailedList.service; package com.adc.da.slrs.sarLawsAttrDetailedList.service;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarLawsAttrDetailedList; import com.adc.da.slrs.sarLawsAttrDetailedList.entity.*;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto; import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandExcelVo;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
@@ -18,8 +18,10 @@ import java.util.List;
*/ */
public interface ISarLawsAttrDetailedListService extends IService<SarLawsAttrDetailedList> { public interface ISarLawsAttrDetailedListService extends IService<SarLawsAttrDetailedList> {
List<LawsDto> selectLaws(String standId, Integer Page, Integer Size,String standName); List<LawsDto> selectLaws(SarFindDto sarFindDto);
Boolean insertDetailedList(String id,String[] lawsIds); Boolean insertDetailedList(String id,List<TimeDto> timeDto);
Boolean updateDetailedLaws(String id,String[] lawsIds); Boolean updateDetailedLaws(String id,List<TimeDto> timeDtos);
void exportExcel(HttpServletResponse response, StandExcelVo standExcelVo); void exportExcel(HttpServletResponse response, StandExcelVo standExcelVo);
int setTimes(SarLawsAttrDetailedList sarLawsAttrDetailedList);
Map<String ,List<StandTimeDto>> selectTimes(String id);
} }
@@ -1,10 +1,10 @@
package com.adc.da.slrs.sarLawsAttrDetailedList.service.impl; package com.adc.da.slrs.sarLawsAttrDetailedList.service.impl;
import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao; import com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto; import com.adc.da.slrs.sarLawsAttrDetailedList.entity.*;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.SarLawsAttrDetailedList;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandExcelVo;
import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListService; import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListService;
import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
import com.adc.da.sys.service.IDicTypeEOService;
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;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -16,7 +16,9 @@ import org.springframework.util.CollectionUtils;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
@@ -31,19 +33,107 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
@Autowired @Autowired
SarLawsAttrDetailedListDao sarLawsAttrDetailedListDao; SarLawsAttrDetailedListDao sarLawsAttrDetailedListDao;
@Autowired
private IDicTypeEOService iDicTypeEOService;
//从主表中查询信息 //从主表中查询信息
@Override @Override
public List<LawsDto> selectLaws(String standId, Integer Page, Integer Size,String standName) { public List<LawsDto> selectLaws(SarFindDto sarFindDto) {
List<String> lawsIds = sarLawsAttrDetailedListDao.selectLawsId(standId,Page,Size); List<String> lawsIds = sarLawsAttrDetailedListDao.selectLawsId(sarFindDto.getId(),(sarFindDto.getPage())-1,sarFindDto.getSize());
if (CollectionUtils.isEmpty(lawsIds)){ if (CollectionUtils.isEmpty(lawsIds)){
return null; return null;
} }
List<LawsDto> list = sarLawsAttrDetailedListDao.selectLawsById(lawsIds,standName); List<LawsDto> list = sarLawsAttrDetailedListDao.selectLawsById(lawsIds,sarFindDto.getStandName());
for (LawsDto lawsDto:list){ for (LawsDto lawsDto:list){
if (sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()).size()!=0){ QueryWrapper<SarLawsAttrDetailedList> queryWrapper = new QueryWrapper<>();
lawsDto.setTypeApplicable(StringUtils.join(sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()), ",")); queryWrapper.eq("stand_id",lawsDto.getId())
System.out.println(StringUtils.join(sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()), ",")); .eq("detailed_list_id",sarFindDto.getId());
List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists = sarLawsAttrDetailedListDao.selectList(queryWrapper);
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getPutTime())){
lawsDto.setPutTime(sarLawsAttrDetailedLists.get(0).getPutTime());
}
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getXcxssrq())){
lawsDto.setXCXSSRQGJ(sarLawsAttrDetailedLists.get(0).getXcxssrq());
}
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getZccssrq())){
lawsDto.setZCCSSRQGJ(sarLawsAttrDetailedLists.get(0).getZccssrq());
}
}
//适用车型
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
List<Map<String, String>> typeApplicable = (List<Map<String, String>>)map.get("ENERGYTYPES");
for (LawsDto list1:list){
if (StringUtils.isNotBlank(list1.getTypeApplicable()) && list1.getTypeApplicable().contains(",")){
String[] split = list1.getTypeApplicable().split(",");
StringBuilder builder = new StringBuilder();
for (String s:split){
for (Map<String,String> map1:typeApplicable) {
if (map1.get("value").equals(s)){
s=map1.get("label");
builder.append(s+",");
break;
}
}
}
String completedString = builder.delete(builder.length()-1,builder.length()).toString();
list1.setTypeApplicable(completedString);
}
}
//能源类型
List<Map<String, String>> nylx = (List<Map<String, String>>)map.get("NYLXCLASS");
for (LawsDto list1:list){
if (StringUtils.isNotBlank(list1.getNYLX()) && list1.getNYLX().contains(",")){
String[] split = list1.getNYLX().split(",");
StringBuilder builder = new StringBuilder();
for (String s:split){
for (Map<String,String> map1:nylx) {
if (map1.get("value").equals(s)){
s=map1.get("label");
builder.append(s+",");
break;
}
}
}
String completedString = builder.delete(builder.length()-1,builder.length()).toString();
list1.setNYLX(completedString);
}
}
//责任部门
List<Map<String, String>> zrbn = (List<Map<String, String>>)map.get("ZRBMCLASS");
for (LawsDto list1:list){
if (StringUtils.isNotBlank(list1.getZRBM()) && list1.getZRBM().contains(",")){
String[] split = list1.getZRBM().split(",");
StringBuilder builder = new StringBuilder();
for (String s:split){
for (Map<String,String> map1:zrbn) {
if (map1.get("value").equals(s)){
s=map1.get("label");
builder.append(s+",");
break;
}
}
}
String completedString = builder.delete(builder.length()-1,builder.length()).toString();
list1.setZRBM(completedString);
}
}
//产品线
List<Map<String, String>> sycpx = (List<Map<String, String>>)map.get("SYCPXCLASS");
for (LawsDto list1:list){
if (StringUtils.isNotBlank(list1.getSYCPX()) && list1.getSYCPX().contains(",")){
String[] split = list1.getSYCPX().split(",");
StringBuilder builder = new StringBuilder();
for (String s:split){
for (Map<String,String> map1:sycpx) {
if (map1.get("value").equals(s)){
s=map1.get("label");
builder.append(s+",");
break;
}
}
}
String completedString = builder.delete(builder.length()-1,builder.length()).toString();
list1.setSYCPX(completedString);
} }
} }
return list; return list;
@@ -51,17 +141,20 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
//向清单表和主表中的关联表插入信息 //向清单表和主表中的关联表插入信息
@Override @Override
public Boolean insertDetailedList(String standId, String[] lawsIds) { public Boolean insertDetailedList(String standId, List<TimeDto> timeDto) {
if (lawsIds.length !=0 && lawsIds!=null){ if (null !=timeDto && !timeDto.isEmpty()){
try { try {
List<SarLawsAttrDetailedList> attrDetailedLists = new ArrayList<>(); List<SarLawsAttrDetailedList> attrDetailedLists = new ArrayList<>();
int a=0; int a=0;
for (String lawsId:lawsIds){ for (TimeDto timeDto1:timeDto){
SarLawsAttrDetailedList sarLawsAttrDetailedList = SarLawsAttrDetailedList.builder() SarLawsAttrDetailedList sarLawsAttrDetailedList = SarLawsAttrDetailedList.builder()
.id(UUIDUtils.randomUUID20()) .id(UUIDUtils.randomUUID20())
.standId(lawsId) .standId(timeDto1.getStandId())
.detailedListId(standId) .detailedListId(standId)
.number(String.valueOf(a)) .number(String.valueOf(a))
.putTime(timeDto1.getPutTime())
.xcxssrq(timeDto1.getXcxssrqgj())
.zccssrq(timeDto1.getZccssrqgj())
.build(); .build();
attrDetailedLists.add(sarLawsAttrDetailedList); attrDetailedLists.add(sarLawsAttrDetailedList);
a++; a++;
@@ -77,12 +170,12 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
//修改关联表中的信息,先删除后修改 //修改关联表中的信息,先删除后修改
@Override @Override
public Boolean updateDetailedLaws(String id, String[] lawsIds) { public Boolean updateDetailedLaws(String id,List<TimeDto> timeDto) {
try { try {
QueryWrapper<SarLawsAttrDetailedList> wrapper = new QueryWrapper<>(); QueryWrapper<SarLawsAttrDetailedList> wrapper = new QueryWrapper<>();
wrapper.eq("detailed_list_id",id); wrapper.eq("detailed_list_id",id);
sarLawsAttrDetailedListDao.delete(wrapper); sarLawsAttrDetailedListDao.delete(wrapper);
insertDetailedList(id,lawsIds); insertDetailedList(id,timeDto);
return true; return true;
} catch (Exception e) { } catch (Exception e) {
return false; return false;
@@ -94,5 +187,31 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
} }
@Override
public int setTimes(SarLawsAttrDetailedList sarLawsAttrDetailedList) {
return sarLawsAttrDetailedListDao.updateById(sarLawsAttrDetailedList);
}
@Override
public Map<String, List<StandTimeDto>> selectTimes(String id) {
List<StandRegionalTimeDto> standRegionalTimeDto= sarLawsAttrDetailedListDao.selectTimes(id);
Map<String, List<StandTimeDto>> mapList = new HashMap<String, List<StandTimeDto>>();
for (StandRegionalTimeDto s:standRegionalTimeDto){
List<StandTimeDto> list;
if (mapList.containsKey(s.getCountry())){
list = mapList.get(s.getCountry());
}else {
list = new ArrayList<>();
}
StandTimeDto standTimeDto = new StandTimeDto();
standTimeDto.setPutTime(s.getPutTime());
standTimeDto.setXcxssrq(s.getXcxssrq());
standTimeDto.setZccssrq(s.getZccssrq());
list.add(standTimeDto);
mapList.put(s.getCountry(),list);
}
return mapList;
}
} }
@@ -65,7 +65,7 @@ public class SarLawsDetailedListController extends BaseController<SarLawsDetaile
**/ **/
@ApiOperation(value = "增加清单") @ApiOperation(value = "增加清单")
@PostMapping("/insertList") @PostMapping("/insertList")
public ResponseMessage insertList(AddDetailedDto addDetailedDto) { public ResponseMessage insertList( AddDetailedDto addDetailedDto) {
String src = sarLawsDetailedListService.add(addDetailedDto); String src = sarLawsDetailedListService.add(addDetailedDto);
return Result.success(src); return Result.success(src);
} }
@@ -1,11 +1,7 @@
package com.adc.da.slrs.sarLawsDetailedList.entity; package com.adc.da.slrs.sarLawsDetailedList.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import java.util.Collection;
/** /**
* //TODO 添加类、接口描述 * //TODO 添加类、接口描述
@@ -38,4 +34,11 @@ public class AddDetailedDto {
private String fileIds; private String fileIds;
@ApiModelProperty(value = "要添加的清单id") @ApiModelProperty(value = "要添加的清单id")
private String inforlist; private String inforlist;
@ApiModelProperty(value = "实施时间")
private String inforlist1;
@ApiModelProperty(value = "在产车实施时间")
private String inforlist2;
@ApiModelProperty(value = "新车型实施时间")
private String inforlist3;
} }
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* //TODO 添加类、接口描述 * //TODO 添加类、接口描述
@@ -58,4 +59,13 @@ public class DetailedUpDto {
@ApiModelProperty(value = "清单详情") @ApiModelProperty(value = "清单详情")
private String remark; private String remark;
@ApiModelProperty(value = "实施时间")
private String inforlist1;
@ApiModelProperty(value = "在产车实施时间")
private String inforlist2;
@ApiModelProperty(value = "新车型实施时间")
private String inforlist3;
} }
@@ -13,6 +13,6 @@ import java.util.List;
*/ */
@Data @Data
public class IdListDto { public class IdListDto {
@ApiModelProperty("未符合项ID列表") @ApiModelProperty("ID列表")
private List<String> Ids; private List<String> Ids;
} }
@@ -0,0 +1,28 @@
package com.adc.da.slrs.sarLawsDetailedList.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* //TODO 添加类、接口描述
*
* @author ZhangZhiYuan
* @date 2021-07-21
*/
@Data
public class TimeDto {
@ApiModelProperty(value = "标准id")
private String standId;
@ApiModelProperty(value = "实施日期")
private String putTime;
@ApiModelProperty(value = "在产车实施日期")
private String zccssrqgj;
@ApiModelProperty(value = "新车型实施日期")
private String xcxssrqgj;
}
@@ -8,6 +8,7 @@ import com.adc.da.slrs.sarLawsDetailedList.dao.SarLawsDetailedListDao;
import com.adc.da.slrs.sarLawsDetailedList.entity.AddDetailedDto; import com.adc.da.slrs.sarLawsDetailedList.entity.AddDetailedDto;
import com.adc.da.slrs.sarLawsDetailedList.entity.SarLawsDetailedList; import com.adc.da.slrs.sarLawsDetailedList.entity.SarLawsDetailedList;
import com.adc.da.slrs.sarLawsDetailedList.entity.DetailedUpDto; import com.adc.da.slrs.sarLawsDetailedList.entity.DetailedUpDto;
import com.adc.da.slrs.sarLawsDetailedList.entity.TimeDto;
import com.adc.da.slrs.sarLawsDetailedList.service.ISarLawsDetailedListService; import com.adc.da.slrs.sarLawsDetailedList.service.ISarLawsDetailedListService;
import com.adc.da.sys.service.IDicTypeEOService; import com.adc.da.sys.service.IDicTypeEOService;
import com.adc.da.util.UUIDUtils; import com.adc.da.util.UUIDUtils;
@@ -89,8 +90,42 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
else {sarLawsDetailedList.setUpdatePeople(getUserName());} else {sarLawsDetailedList.setUpdatePeople(getUserName());}
sarLawsDetailedListDao.insert(sarLawsDetailedList); sarLawsDetailedListDao.insert(sarLawsDetailedList);
addDetailedDto.setInforlist(addDetailedDto.getInforlist().substring(1,addDetailedDto.getInforlist().length()-1)); addDetailedDto.setInforlist(addDetailedDto.getInforlist().substring(1,addDetailedDto.getInforlist().length()-1));
String[] split = addDetailedDto.getInforlist().split(","); List<TimeDto> timeDto = new ArrayList<>();
service.insertDetailedList(sarLawsDetailedList.getId(),split); if (addDetailedDto.getInforlist().indexOf(",") >= 0){
String[] id = addDetailedDto.getInforlist().split(",");
String[] putTime = addDetailedDto.getInforlist1().split(",");
String[] zcc = addDetailedDto.getInforlist2().split(",");
String[] xcx = addDetailedDto.getInforlist3().split(",");
for (int a =0;a< id.length;a++){
TimeDto dto = new TimeDto();
dto.setStandId(id[a]);
if ("\"".equals(putTime[a])){
dto.setPutTime(null);
}else {
dto.setPutTime(putTime[a]);
}
if ("\"".equals(putTime[a])){
dto.setXcxssrqgj(null);
}else {
dto.setXcxssrqgj(xcx[a]);
}
if ("\"".equals(putTime[a])){
dto.setZccssrqgj(null);
}else {
dto.setZccssrqgj(zcc[a]);
}
timeDto.add(dto);
}
}else {
TimeDto dto = new TimeDto();
dto.setStandId(addDetailedDto.getInforlist());
dto.setPutTime(addDetailedDto.getInforlist1());
dto.setXcxssrqgj(addDetailedDto.getInforlist2());
dto.setZccssrqgj(addDetailedDto.getInforlist3());
timeDto.add(dto);
}
service.insertDetailedList(sarLawsDetailedList.getId(),timeDto);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@@ -194,11 +229,42 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
else list.setFileIds(detailedUpDto.getFileIds()); else list.setFileIds(detailedUpDto.getFileIds());
sarLawsDetailedListDao.updateById(list); sarLawsDetailedListDao.updateById(list);
if (null!=detailedUpDto.getInforlist()) { detailedUpDto.setInforlist(detailedUpDto.getInforlist().substring(1,detailedUpDto.getInforlist().length()-1));
detailedUpDto.setInforlist(detailedUpDto.getInforlist().substring(1, detailedUpDto.getInforlist().length() - 1)); List<TimeDto> timeDto = new ArrayList<>();
String[] split = detailedUpDto.getInforlist().split(","); if (detailedUpDto.getInforlist().indexOf(",") >= 0){
service.updateDetailedLaws(detailedUpDto.getId(), split); String[] id = detailedUpDto.getInforlist().split(",");
String[] putTime = detailedUpDto.getInforlist1().split(",");
String[] zcc = detailedUpDto.getInforlist2().split(",");
String[] xcx = detailedUpDto.getInforlist3().split(",");
for (int a =0;a< id.length;a++){
TimeDto dto = new TimeDto();
dto.setStandId(id[a]);
if ("\"".equals(putTime[a])){
dto.setPutTime(null);
}else {
dto.setPutTime(putTime[a]);
}
if ("\"".equals(putTime[a])){
dto.setXcxssrqgj(null);
}else {
dto.setXcxssrqgj(xcx[a]);
}
if ("\"".equals(putTime[a])){
dto.setZccssrqgj(null);
}else {
dto.setZccssrqgj(zcc[a]);
}
timeDto.add(dto);
}
}else {
TimeDto dto = new TimeDto();
dto.setStandId(detailedUpDto.getInforlist());
dto.setPutTime(detailedUpDto.getInforlist1());
dto.setXcxssrqgj(detailedUpDto.getInforlist2());
dto.setZccssrqgj(detailedUpDto.getInforlist3());
timeDto.add(dto);
} }
service.updateDetailedLaws(detailedUpDto.getId(), timeDto);
return "修改成功"; return "修改成功";
} }
@@ -150,12 +150,6 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
list = null; list = null;
}else { }else {
list = sarLawsAttrDetailedListDao.selectLawsByIdC(standId,findStandDto.getStandName(), findStandDto.getStandType()); list = sarLawsAttrDetailedListDao.selectLawsByIdC(standId,findStandDto.getStandName(), findStandDto.getStandType());
for (LawsDto lawsDto:list){
if (sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()).size()!=0){
lawsDto.setTypeApplicable(StringUtils.join(sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()), ","));
System.out.println(StringUtils.join(sarLawsAttrDetailedListDao.selectTypeApplicable(lawsDto.getId()), ","));
}
}
} }
IPage<LawsDto> page1=new Page<>(); IPage<LawsDto> page1=new Page<>();
page1.setRecords(list); page1.setRecords(list);
@@ -6,9 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* <p> * <p>
@@ -18,6 +16,9 @@ import java.util.List;
* @author super_liu * @author super_liu
* @since 2021-06-15 * @since 2021-06-15
*/ */
@Mapper
public interface SarStandUnqualifiedDao extends BaseMapper<SarStandUnqualified> { public interface SarStandUnqualifiedDao extends BaseMapper<SarStandUnqualified> {
IPage<SarStandUnqualified> getAllDatasByPage(Page page,@Param("sar") SarStandUnqualifiedPage sarStandUnqualified); IPage<SarStandUnqualified> getAllDatasByPage(Page page,@Param("sar") SarStandUnqualifiedPage sarStandUnqualified);
} }
@@ -10,10 +10,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
@@ -40,28 +41,28 @@ public class SarStandUnqualifiedServiceImpl extends ServiceImpl<SarStandUnqualif
*/ */
@Override @Override
public IPage<SarStandUnqualified> getSarStandUnqualifiedPage(SarStandUnqualifiedPage sarStandUnqualifiedPage) { public IPage<SarStandUnqualified> getSarStandUnqualifiedPage(SarStandUnqualifiedPage sarStandUnqualifiedPage) {
// QueryWrapper<SarStandUnqualified> sarStandUnqualifiedQueryWrapper=new QueryWrapper<>(); QueryWrapper<SarStandUnqualified> sarStandUnqualifiedQueryWrapper=new QueryWrapper<>();
// if(sarStandUnqualifiedPage.getStandId()!=null){ if(sarStandUnqualifiedPage.getStandId()!=null){
// sarStandUnqualifiedQueryWrapper.and(wrapper->wrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%")); sarStandUnqualifiedQueryWrapper
//// sarStandUnqualifiedQueryWrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%"); .like("stand_id",sarStandUnqualifiedPage.getStandId())
// } .like("stand_name",sarStandUnqualifiedPage.getStandId());
// //仅查询未关闭的 // sarStandUnqualifiedQueryWrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%");
// sarStandUnqualifiedQueryWrapper.eq("close_state",1); }
// if(sarStandUnqualifiedPage.getProductName()!=null){ //仅查询未关闭的
// sarStandUnqualifiedQueryWrapper.like("product_name","%"+sarStandUnqualifiedPage.getProductName()+"%"); sarStandUnqualifiedQueryWrapper.eq("close_state",1);
// } if(sarStandUnqualifiedPage.getProductName()!=null){
// if(sarStandUnqualifiedPage.getResponsibleUnit()!=null){ sarStandUnqualifiedQueryWrapper.like("product_name",sarStandUnqualifiedPage.getProductName());
// sarStandUnqualifiedQueryWrapper.eq("responsible_unit",sarStandUnqualifiedPage.getResponsibleUnit()); }
// } if(sarStandUnqualifiedPage.getResponsibleUnit()!=null){
// Page<SarStandUnqualified> standUnqualifiedPage=new Page<>(); sarStandUnqualifiedQueryWrapper.eq("responsible_unit",sarStandUnqualifiedPage.getResponsibleUnit());
// //判断前端是否提供页码和每页条数 }
// if(sarStandUnqualifiedPage.getCurrent()!=null&&sarStandUnqualifiedPage.getSize()!=null){ Page<SarStandUnqualified> standUnqualifiedPage=new Page<>();
// standUnqualifiedPage=new Page<>(sarStandUnqualifiedPage.getCurrent(),sarStandUnqualifiedPage.getSize()); //判断前端是否提供页码和每页条数
// } if(sarStandUnqualifiedPage.getCurrent()!=null
Page pag = new Page(); && sarStandUnqualifiedPage.getSize()!=null){
pag.setCurrent(sarStandUnqualifiedPage.getCurrent()).setSize(sarStandUnqualifiedPage.getSize()); standUnqualifiedPage=new Page<>(sarStandUnqualifiedPage.getCurrent(),sarStandUnqualifiedPage.getSize());
}
return sarStandUnqualifiedDao.getAllDatasByPage(pag,sarStandUnqualifiedPage); return sarStandUnqualifiedDao.selectPage(standUnqualifiedPage,sarStandUnqualifiedQueryWrapper);
} }
/** /**
@@ -73,14 +74,14 @@ public class SarStandUnqualifiedServiceImpl extends ServiceImpl<SarStandUnqualif
public IPage<SarStandUnqualified> getSarStandUnqualifiedHistoryPage(SarStandUnqualifiedPage sarStandUnqualifiedPage) { public IPage<SarStandUnqualified> getSarStandUnqualifiedHistoryPage(SarStandUnqualifiedPage sarStandUnqualifiedPage) {
QueryWrapper<SarStandUnqualified> sarStandUnqualifiedQueryWrapper=new QueryWrapper<>(); QueryWrapper<SarStandUnqualified> sarStandUnqualifiedQueryWrapper=new QueryWrapper<>();
if(sarStandUnqualifiedPage.getStandId()!=null){ if(sarStandUnqualifiedPage.getStandId()!=null){
sarStandUnqualifiedQueryWrapper.and(wrapper->wrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%")); sarStandUnqualifiedQueryWrapper.and(wrapper->wrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name",sarStandUnqualifiedPage.getStandId()));
// sarStandUnqualifiedQueryWrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%"); // sarStandUnqualifiedQueryWrapper.eq("stand_id",sarStandUnqualifiedPage.getStandId()).or().like("stand_name","%"+sarStandUnqualifiedPage.getStandId()+"%");
} }
//仅查询关闭的 //仅查询关闭的
sarStandUnqualifiedQueryWrapper.eq("close_state",2); sarStandUnqualifiedQueryWrapper.eq("close_state",2);
if(sarStandUnqualifiedPage.getProductName()!=null){ if(sarStandUnqualifiedPage.getProductName()!=null){
sarStandUnqualifiedQueryWrapper.like("product_name","%"+sarStandUnqualifiedPage.getProductName()+"%"); sarStandUnqualifiedQueryWrapper.like("product_name",sarStandUnqualifiedPage.getProductName());
} }
if(sarStandUnqualifiedPage.getResponsibleUnit()!=null){ if(sarStandUnqualifiedPage.getResponsibleUnit()!=null){
sarStandUnqualifiedQueryWrapper.eq("responsible_unit",sarStandUnqualifiedPage.getResponsibleUnit()); sarStandUnqualifiedQueryWrapper.eq("responsible_unit",sarStandUnqualifiedPage.getResponsibleUnit());
@@ -3,7 +3,7 @@
<mapper namespace="com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao"> <mapper namespace="com.adc.da.slrs.sarLawsAttrDetailedList.dao.SarLawsAttrDetailedListDao">
<select id="selectLawsById" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto"> <select id="selectLawsById" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
SELECT a.ID,a.STAND_NUMBER,a.STAND_NAME,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQGJ,b.ZCCSSRQGJ,b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN SELECT a.ID,a.STAND_NUMBER,a.STAND_NAME,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQGJ,b.ZCCSSRQGJ,b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.CLLX as typeApplicable
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
a.ID = b.STAND_ID a.ID = b.STAND_ID
<where> <where>
@@ -47,7 +47,7 @@
WHERE ID =#{param1,jdbcType=VARCHAR} WHERE ID =#{param1,jdbcType=VARCHAR}
</select> </select>
<select id="selectLawsByIdC" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto"> <select id="selectLawsByIdC" resultType="com.adc.da.slrs.sarLawsAttrDetailedList.entity.LawsDto">
SELECT a.ID,a.STAND_NUMBER,a.STAND_NAME,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQGJ,b.ZCCSSRQGJ,b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN,b.ZRGCS as responsibleEngineer SELECT a.ID,a.STAND_NUMBER,a.STAND_NAME,a.STAND_EN_NAME,b.NYLX,a.PUT_TIME,b.XCXSSRQGJ,b.ZCCSSRQGJ,b.ZRBM,b.SYCPX,b.CYCVPPSBM,b.CYCVPPSCN,b.KCCVPPSBM,b.KCCVPPSCN
FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on FROM sar_standards_info a LEFT JOIN sar_stand_attr_info b on
a.ID = b.STAND_ID a.ID = b.STAND_ID
<where> <where>