Merge remote-tracking branch 'origin/develop_1' into develop_master
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@ public class AddDetailedDto {
|
||||
@ApiModelProperty(value = "上传的附件")
|
||||
private MultipartFile[] files;
|
||||
@ApiModelProperty(value = "要添加的清单id")
|
||||
private String[] lawsIds;
|
||||
private String inforlist;
|
||||
|
||||
|
||||
public MultipartFile getFiles(int i) {
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ public class DetailedUpDto {
|
||||
private String reNewPeople;
|
||||
|
||||
@ApiModelProperty(value = "要添加的清单id")
|
||||
private String[] lawsIds;
|
||||
private String inforlist;
|
||||
|
||||
@ApiModelProperty(value = "清单详情")
|
||||
private String remark;
|
||||
|
||||
+36
-4
@@ -9,6 +9,7 @@ import com.adc.da.slrs.sarLawsDetailedList.entity.AddDetailedDto;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.SarLawsDetailedList;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.entity.DetailedUpDto;
|
||||
import com.adc.da.slrs.sarLawsDetailedList.service.ISarLawsDetailedListService;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -19,8 +20,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -41,6 +41,8 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
private SarLawsAttrDetailedListDao sarLawsAttrDetailedListDao;
|
||||
@Autowired
|
||||
private SarLawsAttrDetailedListServiceImpl service;
|
||||
@Autowired
|
||||
private IDicTypeEOService iDicTypeEOService;
|
||||
|
||||
@Override
|
||||
public String del(List<String> idList) {
|
||||
@@ -81,7 +83,8 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
break;
|
||||
}
|
||||
sarLawsDetailedListDao.insert(sarLawsDetailedList);
|
||||
service.insertDetailedList(sarLawsDetailedList.getId(),addDetailedDto.getLawsIds());
|
||||
String[] split = addDetailedDto.getInforlist().split(",");
|
||||
service.insertDetailedList(sarLawsDetailedList.getId(),split);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -109,6 +112,34 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
wrapper.eq("sort_key",sortKey);
|
||||
Page<SarLawsDetailedList> page = new Page<>(pages, size);
|
||||
IPage<SarLawsDetailedList> userIPage = sarLawsDetailedListDao.selectPage(page, wrapper);
|
||||
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
|
||||
List<SarLawsDetailedList> list= userIPage.getRecords();
|
||||
List<Map<String, String>> arr = (List<Map<String, String>>)map.get("COUNTRY");
|
||||
for (SarLawsDetailedList list1:list){
|
||||
if (list1.getCountryArea().contains(",")){
|
||||
String[] split = list1.getCountryArea().split(",");
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (String s:split){
|
||||
for (Map<String,String> map1:arr) {
|
||||
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.setCountryArea(completedString);
|
||||
}else {
|
||||
for (Map<String,String> map1:arr) {
|
||||
if (map1.get("value").equals(list1.getCountryArea())){
|
||||
list1.setCountryArea(map1.get("label"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
userIPage.setRecords(list);
|
||||
System.out.println("总条数" + userIPage.getTotal());
|
||||
System.out.println("总页数" + userIPage.getPages());
|
||||
return userIPage;
|
||||
@@ -158,7 +189,8 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
else list.setDetailedListState(detailedUpDto.getDetailedListState());
|
||||
|
||||
sarLawsDetailedListDao.updateById(list);
|
||||
service.updateDetailedLaws(detailedUpDto.getId(), detailedUpDto.getLawsIds());
|
||||
String[] split = detailedUpDto.getInforlist().split(",");
|
||||
service.updateDetailedLaws(detailedUpDto.getId(), split);
|
||||
return "修改成功";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user