Merge remote-tracking branch 'origin/develop_master' into develop_master

This commit is contained in:
super_liu
2021-08-18 16:31:16 +08:00
9 changed files with 37 additions and 48 deletions
@@ -22,7 +22,7 @@ import java.util.List;
public interface SarLawsAttrDetailedListDao extends BaseMapper<SarLawsAttrDetailedList> {
//根据清单id,查出标准的id并排序
List<String> selectLawsId(@Param("standId") String standId,@Param("param3") Integer page,@Param("param2") Integer size,@Param("sar") SarFindDto sarFindDto);
List<String> selectLawsId(@Param("standId") String standId,@Param("param3") Integer page,@Param("param2") Integer size);
//根据标准id查出数据
List<LawsDto> selectLawsById(@Param("param1") List<String> LawsIds, @Param("sarFindDto") SarFindDto sarFindDto);
//根据标准id查出数据用于清单查询
@@ -23,8 +23,5 @@ public class SarFindDto {
// private String ZCCSSRQGJ;
private String zrbm;
private String sycpx;
private String standSort;
private String standType;
private String standNumber;
}
@@ -29,7 +29,7 @@ public class StandExcelDto {
@ApiModelProperty(value = "能源类型")
private String NYLX;
@ApiModelProperty(value = "标准实施日期")
private String SSRQ;
private String putTime;
@ApiModelProperty(value = "新车型实施日期")
private String newCarTime;
@ApiModelProperty(value = "在产车实施日期")
@@ -45,7 +45,7 @@ public class SarLawsAttrDetailedListServiceImpl extends ServiceImpl<SarLawsAttrD
wrapper.eq("detailed_list_id", sarFindDto.getId());
IPage<SarLawsAttrDetailedList> selectPage = sarLawsAttrDetailedListDao.selectPage(pageRes,wrapper);
//查询标准id
List<String> lawsIds = sarLawsAttrDetailedListDao.selectLawsId(sarFindDto.getId(),(sarFindDto.getPage())-1,sarFindDto.getSize(),sarFindDto);
List<String> lawsIds = sarLawsAttrDetailedListDao.selectLawsId(sarFindDto.getId(),(sarFindDto.getPage())-1,sarFindDto.getSize());
if (CollectionUtils.isEmpty(lawsIds)){
return null;
}
@@ -61,64 +61,64 @@ public class SarStandardComplianceAssessResultController {
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME,type");
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
queryWrapper.like("STAND_NAME",eo.getStandName().trim());
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
}
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
queryWrapper.like("STAND_NUMBER",eo.getStandNumber().trim());
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
}
if (eo.getType() != null && !eo.getType().trim().equals("")) {
queryWrapper.like("type",eo.getType().trim());
queryWrapper.like("type", eo.getType().trim());
}
IPage<SarStandardComplianceProductAssess> page = iSarStandardComplianceProductAssessService.page(iPage, queryWrapper);
while(page.getRecords().remove(null));
while (page.getRecords().remove(null)) ;
return Result.success(page);
}else {
if(eo.getPosition()==1){
} else {
if (eo.getPosition() == 1) {
QueryWrapper<SarInterpretationNationalStandard> queryWrapper = new QueryWrapper<>();
IPage<SarInterpretationNationalStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME,type");
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
queryWrapper.like("STAND_NAME",eo.getStandName().trim());
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
}
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
queryWrapper.like("STAND_NUMBER",eo.getStandNumber().trim());
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
}
// if (eo.getType() != null && !eo.getType().trim().equals("")) {
// queryWrapper.like("type",eo.getType().trim());
// }
IPage<SarInterpretationNationalStandard> page = iSarInterpretationNationalStandardService.page(iPage, queryWrapper);
while(page.getRecords().remove(null));
while (page.getRecords().remove(null)) ;
return Result.success(page);
}else{
} else {
QueryWrapper<SarInterpretationForeignStandard> queryWrapper = new QueryWrapper<>();
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
queryWrapper.select("distinct STAND_ID, STAND_NUMBER, STAND_NAME, STAND_TYPE, INTERPRETATION_TIME,type");
if (eo.getStandName() != null && !eo.getStandName().trim().equals("")) {
queryWrapper.like("STAND_NAME",eo.getStandName().trim());
queryWrapper.like("STAND_NAME", eo.getStandName().trim());
}
if (eo.getStandNumber() != null && !eo.getStandNumber().trim().equals("")) {
queryWrapper.like("STAND_NUMBER",eo.getStandNumber().trim());
queryWrapper.like("STAND_NUMBER", eo.getStandNumber().trim());
}
// if (eo.getType() != null && !eo.getType().trim().equals("")) {
// queryWrapper.like("type",eo.getType().trim());
// }
IPage<SarInterpretationForeignStandard> page = iSarInterpretationForeignStandardService.page(iPage, queryWrapper);
while(page.getRecords().remove(null));
while (page.getRecords().remove(null)) ;
return Result.success(page);
}
}
}
private static class InsertEntity<T>{
private static class InsertEntity<T> {
List<Map> entityList;
T eo;
}
@ApiOperation(value="(插入/更新)标准清单")
@ApiOperation(value = "(插入/更新)标准清单")
@PostMapping("/standard")
public ResponseMessage insertStandard(@RequestBody InsertEntity<SarStandardsInfoEO> insertEntity) throws InvocationTargetException, IllegalAccessException {
@@ -128,27 +128,27 @@ public class SarStandardComplianceAssessResultController {
List<SarStandardComplianceProductAssess> entityList = new ArrayList<>();
for (int i = 0; i < insertEntity.entityList.size(); i++) {
SarStandardComplianceProductAssess obj=new SarStandardComplianceProductAssess();
SarStandardComplianceProductAssess obj = new SarStandardComplianceProductAssess();
BeanUtils.populate(obj, insertEntity.entityList.get(i));
entityList.add(obj);
}
iSarStandardComplianceProductAssessService.saveOrUpdateBatch(entityList);
}else {
if(eo.getPosition()==1){
} else {
if (eo.getPosition() == 1) {
List<SarInterpretationNationalStandard> entityList = new ArrayList<>();
for (int i = 0; i < insertEntity.entityList.size(); i++) {
SarInterpretationNationalStandard obj=new SarInterpretationNationalStandard();
SarInterpretationNationalStandard obj = new SarInterpretationNationalStandard();
BeanUtils.populate(obj, insertEntity.entityList.get(i));
entityList.add(obj);
}
iSarInterpretationNationalStandardService.saveOrUpdateBatch(entityList);
}else{
} else {
List<SarInterpretationForeignStandard> entityList = new ArrayList<>();
for (int i = 0; i < insertEntity.entityList.size(); i++) {
SarInterpretationForeignStandard obj=new SarInterpretationForeignStandard();
SarInterpretationForeignStandard obj = new SarInterpretationForeignStandard();
BeanUtils.populate(obj, insertEntity.entityList.get(i));
entityList.add(obj);
}
@@ -166,7 +166,7 @@ public class SarStandardComplianceAssessResultController {
public ResponseMessage<IPage<SarStandardComplianceProductAssess>> selectProduct(SarStandardComplianceProductAssessEO eo) throws Exception {
IPage<SarStandardComplianceProductAssess> iPage = new Page<>(eo.getCurrent(), eo.getSize());
QueryWrapper<SarStandardComplianceProductAssess> queryWrapper = new QueryWrapper<>();
if (eo.getType() !=null) queryWrapper.eq("type",eo.getType());
if (eo.getType() != null) queryWrapper.eq("type", eo.getType());
if (eo.getProductName() != null) queryWrapper.like("product_name", eo.getProductName());
if (eo.getStandId() != null) queryWrapper.like("STAND_ID", eo.getStandId());
if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
@@ -192,22 +192,22 @@ public class SarStandardComplianceAssessResultController {
@ApiOperation(value = "条件查询技术审核符合性清单")
@GetMapping("/interpretation")
public ResponseMessage<Object> selectNationalStandard(InterpretationEO eo) throws Exception {
if (eo.getPosition()==1) {
if (eo.getPosition() == 1) {
IPage<SarInterpretationNationalStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
QueryWrapper<SarInterpretationNationalStandard> queryWrapper = new QueryWrapper<>();
if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
if(eo.getStandId()!=null)queryWrapper.eq("STAND_ID",eo.getStandId());
if (eo.getStandId() != null) queryWrapper.eq("STAND_ID", eo.getStandId());
IPage<SarInterpretationNationalStandard> page = iSarInterpretationNationalStandardService.page(iPage, queryWrapper);
while(page.getRecords().remove(null));
while (page.getRecords().remove(null)) ;
return Result.success(page);
} else {
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
QueryWrapper<SarInterpretationForeignStandard> queryWrapper = new QueryWrapper<>();
if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
if(eo.getStandId()!=null)queryWrapper.eq("STAND_ID",eo.getStandId());
if (eo.getStandId() != null) queryWrapper.eq("STAND_ID", eo.getStandId());
IPage<SarInterpretationForeignStandard> page = iSarInterpretationForeignStandardService.page(iPage, queryWrapper);
while(page.getRecords().remove(null));
while (page.getRecords().remove(null)) ;
return Result.success(page);
}
@@ -220,11 +220,11 @@ public class SarStandardComplianceAssessResultController {
InterpretationEO eo = insertEntity.eo;
if (eo.getPosition()==1) {
if (eo.getPosition() == 1) {
List<SarInterpretationNationalStandard> entityList = new ArrayList<>();
for (int i = 0; i < insertEntity.entityList.size(); i++) {
SarInterpretationNationalStandard obj=new SarInterpretationNationalStandard();
SarInterpretationNationalStandard obj = new SarInterpretationNationalStandard();
BeanUtils.populate(obj, insertEntity.entityList.get(i));
entityList.add(obj);
}
@@ -232,10 +232,9 @@ public class SarStandardComplianceAssessResultController {
} else {
List<SarInterpretationForeignStandard> entityList = new ArrayList<>();
for (int i = 0; i < insertEntity.entityList.size(); i++) {
SarInterpretationForeignStandard obj=new SarInterpretationForeignStandard();
SarInterpretationForeignStandard obj = new SarInterpretationForeignStandard();
BeanUtils.populate(obj, insertEntity.entityList.get(i));
entityList.add(obj);
}
@@ -91,10 +91,6 @@ public class SarStandardComplianceProductAssess extends BaseEntity {
@ApiModelProperty(value = "在产产品合规信息")
private String productionCompliance;
@ApiModelProperty(value = "在产产品不合规信息")
@TableField("production_non_compliance")
private String productionNonCompliance;
@ApiModelProperty(value = "在产产品不合规应对措施")
private String productionCountermeasures;
@@ -117,10 +113,6 @@ public class SarStandardComplianceProductAssess extends BaseEntity {
@TableField("clause_name")
private String clauseName;
@ApiModelProperty(value = "流程UUID")
@TableField("type")
private String type;
private String id;