56627
This commit is contained in:
+61
-56
@@ -136,24 +136,28 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
List<LawsDto> data = new ArrayList<>();
|
||||
if (CollectionUtils.isEmpty(standExcelVo.getIds())){
|
||||
List<String> list= sarLawsAttrDetailedListDao.selectLawsId2(standExcelVo.getId());
|
||||
if (CollectionUtils.isEmpty(list)) return;
|
||||
data=sarLawsAttrDetailedListDao.selectLawsByIdE(list);
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
data = sarLawsAttrDetailedListDao.selectLawsByIdE(list);
|
||||
}
|
||||
}else {
|
||||
data=sarLawsAttrDetailedListDao.selectLawsByIdE(standExcelVo.getIds());
|
||||
}
|
||||
if ("1".equals(type)){
|
||||
List<String> lawsIds=new ArrayList<>();
|
||||
SarFindDto sarFindDto=new SarFindDto();
|
||||
if (!CollectionUtils.isEmpty(data)) {
|
||||
if ("1".equals(type)) {
|
||||
List<String> lawsIds = new ArrayList<>();
|
||||
SarFindDto sarFindDto = new SarFindDto();
|
||||
sarFindDto.setId(standExcelVo.getId());
|
||||
data.forEach(lawsDto -> {lawsIds.add(lawsDto.getId());});
|
||||
List<LawsDto> list = sarLawsAttrDetailedListDao.selectLawsById(lawsIds,sarFindDto);
|
||||
for (LawsDto lawsDto:data){
|
||||
if (StringUtils.isNoneEmpty(lawsDto.getApplyArctic())){
|
||||
data.forEach(lawsDto -> {
|
||||
lawsIds.add(lawsDto.getId());
|
||||
});
|
||||
List<LawsDto> list = sarLawsAttrDetailedListDao.selectLawsById(lawsIds, sarFindDto);
|
||||
for (LawsDto lawsDto : data) {
|
||||
if (StringUtils.isNoneEmpty(lawsDto.getApplyArctic())) {
|
||||
lawsDto.setApplyArctic(lawsDto.getApplyArctic());
|
||||
}
|
||||
QueryWrapper<SarLawsAttrDetailedList> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("stand_id",lawsDto.getId())
|
||||
.eq("detailed_list_id",sarFindDto.getId());
|
||||
queryWrapper.eq("stand_id", lawsDto.getId())
|
||||
.eq("detailed_list_id", sarFindDto.getId());
|
||||
List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists = sarLawsAttrDetailedListDao.selectList(queryWrapper);
|
||||
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getSsrq()) && "null" != sarLawsAttrDetailedLists.get(0).getSsrq()) {
|
||||
lawsDto.setSSRQ(sarLawsAttrDetailedLists.get(0).getSsrq());
|
||||
@@ -170,24 +174,24 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
}
|
||||
}
|
||||
//适用车型
|
||||
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
|
||||
List<Map<String, String>> typeApplicable = (List<Map<String, String>>)map.get("ENERGYTYPES");
|
||||
for (LawsDto list1:data){
|
||||
if (StringUtils.isNotBlank(list1.getTypeApplicable()) && list1.getTypeApplicable().contains(",")){
|
||||
Map<String, Object> map = iDicTypeEOService.getDicTypeListCode();
|
||||
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+",");
|
||||
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();
|
||||
String completedString = builder.delete(builder.length() - 1, builder.length()).toString();
|
||||
list1.setTypeApplicable(completedString);
|
||||
}else {
|
||||
} else {
|
||||
for (Map<String, String> map1 : typeApplicable) {
|
||||
if (map1.get("value").equals(list1.getTypeApplicable())) {
|
||||
list1.setTypeApplicable(map1.get("label"));
|
||||
@@ -197,23 +201,23 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
}
|
||||
}
|
||||
//能源类型
|
||||
List<Map<String, String>> nylx = (List<Map<String, String>>)map.get("NYLXCLASS");
|
||||
for (LawsDto list1:data){
|
||||
if (StringUtils.isNotBlank(list1.getNYLX()) && list1.getNYLX().contains(",")){
|
||||
List<Map<String, String>> nylx = (List<Map<String, String>>) map.get("NYLXCLASS");
|
||||
for (LawsDto list1 : data) {
|
||||
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+",");
|
||||
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();
|
||||
String completedString = builder.delete(builder.length() - 1, builder.length()).toString();
|
||||
list1.setNYLX(completedString);
|
||||
}else {
|
||||
} else {
|
||||
for (Map<String, String> map1 : nylx) {
|
||||
if (map1.get("value").equals(list1.getNYLX())) {
|
||||
list1.setNYLX(map1.get("label"));
|
||||
@@ -223,27 +227,27 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
}
|
||||
}
|
||||
//责任部门
|
||||
List<Map<String, String>> zrbn = (List<Map<String, String>>)map.get("ZRBMCLASS");
|
||||
for (LawsDto list1:data){
|
||||
if (StringUtils.isNotBlank(list1.getZRBM()) && list1.getZRBM().contains(",")){
|
||||
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+",");
|
||||
for (String s : split) {
|
||||
for (Map<String, String> map1 : zrbn) {
|
||||
if (map1.get("value").equals(s)) {
|
||||
s = map1.get("label");
|
||||
builder.append(s + ",");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
String completedString = builder.delete(builder.length()-1,builder.length()).toString();
|
||||
String completedString = builder.delete(builder.length() - 1, builder.length()).toString();
|
||||
list1.setZRBM(completedString);
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
System.out.println(e);
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
for (Map<String, String> map1 : zrbn) {
|
||||
if (map1.get("value").equals(list1.getZRBM())) {
|
||||
list1.setZRBM(map1.get("label"));
|
||||
@@ -253,33 +257,33 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
}
|
||||
}
|
||||
//产品线
|
||||
List<Map<String, String>> sycpx = (List<Map<String, String>>)map.get("SYCPXCLASS");
|
||||
for (LawsDto list1:data){
|
||||
if (list1.getSSRQ()!=null){
|
||||
List<Map<String, String>> sycpx = (List<Map<String, String>>) map.get("SYCPXCLASS");
|
||||
for (LawsDto list1 : data) {
|
||||
if (list1.getSSRQ() != null) {
|
||||
list1.setSSRQ(list1.getSSRQ());
|
||||
}
|
||||
if (list1.getZCCSSRQGJ()!=null){
|
||||
if (list1.getZCCSSRQGJ() != null) {
|
||||
list1.setZCCSSRQGJ(list1.getZCCSSRQGJ());
|
||||
}
|
||||
if (list1.getXCXSSRQGJ()!=null){
|
||||
if (list1.getXCXSSRQGJ() != null) {
|
||||
list1.setXCXSSRQGJ(list1.getXCXSSRQGJ());
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(list1.getSYCPX()) && list1.getSYCPX().contains(",")){
|
||||
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+",");
|
||||
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();
|
||||
String completedString = builder.delete(builder.length() - 1, builder.length()).toString();
|
||||
list1.setSYCPX(completedString);
|
||||
}else {
|
||||
} else {
|
||||
for (Map<String, String> map1 : sycpx) {
|
||||
if (map1.get("value").equals(list1.getSYCPX())) {
|
||||
list1.setSYCPX(map1.get("label"));
|
||||
@@ -288,6 +292,7 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
EasyExcel.write(response.getOutputStream(), LawsDto.class).useDefaultStyle(false).autoCloseStream(Boolean.FALSE).sheet("sheet1")
|
||||
.doWrite(data);
|
||||
|
||||
Reference in New Issue
Block a user