|
@@ -16,6 +16,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.domain.entity.InvestigateDisposition;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
+import com.ruoyi.common.utils.PageUtils;
|
|
|
import com.ruoyi.common.utils.SendSmsUtils;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
|
@@ -84,14 +85,26 @@ public class InvestigateTableServiceImpl implements IInvestigateTableService {
|
|
|
*/
|
|
|
@Override
|
|
|
public TableDataInfo selectInvestigateTableListData(InvestigateTable investigateTable) {
|
|
|
+ //先去查询分页的考察团id;
|
|
|
List<InvestigateTable> investigateTables = investigateTableMapper.selectInvestigateTableList(investigateTable);
|
|
|
- List<InvestigateTable> investigateTables1 = investigateTableMapper.selectInvestigateTableList(investigateTable);
|
|
|
-
|
|
|
+ List<InvestigateTable> investigateTablesAll = new ArrayList<>();
|
|
|
+ if (investigateTables != null && investigateTables.size() > 0) {
|
|
|
+ StringBuilder sb = new StringBuilder("");
|
|
|
+ //获取考察团的id
|
|
|
+ for (InvestigateTable table : investigateTables) {
|
|
|
+ Long investigateTableId = table.getInvestigateTableId();
|
|
|
+ sb.append(investigateTableId).append(",");
|
|
|
+ }
|
|
|
+ String substring = sb.substring(0,sb.length() - 1);
|
|
|
+ //查询考察团全部信息
|
|
|
+ investigateTable.setInvestigateTableIds(substring);
|
|
|
+ investigateTablesAll = investigateTableMapper.selectInvestigateTableListALL(investigateTable);
|
|
|
+ }
|
|
|
TableDataInfo rspData = new TableDataInfo();
|
|
|
rspData.setCode(HttpStatus.SUCCESS);
|
|
|
rspData.setMsg("查询成功");
|
|
|
- rspData.setRows(investigateTables);
|
|
|
- rspData.setTotal(new PageInfo(investigateTables1).getSize());
|
|
|
+ rspData.setRows(investigateTablesAll);
|
|
|
+ rspData.setTotal(new PageInfo(investigateTableMapper.selectInvestigateTableList(investigateTable)).getSize());
|
|
|
return rspData;
|
|
|
}
|
|
|
|
|
@@ -124,13 +137,13 @@ public class InvestigateTableServiceImpl implements IInvestigateTableService {
|
|
|
|
|
|
if (investigateDispositionTableList != null && investigateDispositionTableList.size() > 0) {
|
|
|
|
|
|
- insertInvestigateDispositionTable(investigateTableId,investigateDispositionTableList);
|
|
|
+ insertInvestigateDispositionTable(investigateTableId, investigateDispositionTableList);
|
|
|
}
|
|
|
//单独查询考察点信息,新增到关联表
|
|
|
String investigateDispositionIds = investigateTable.getInvestigateDispositionIds();
|
|
|
List<InvestigateDispositionTable> investigateDispositionTableListKaoCha = new ArrayList<>();
|
|
|
- if (StringUtils.isNotEmpty(investigateDispositionIds)){
|
|
|
- for (String investigateDispositionId: investigateDispositionIds.split(",")) {
|
|
|
+ if (StringUtils.isNotEmpty(investigateDispositionIds)) {
|
|
|
+ for (String investigateDispositionId : investigateDispositionIds.split(",")) {
|
|
|
InvestigateDispositionTable investigateDispositionTable = new InvestigateDispositionTable();
|
|
|
investigateDispositionTable.setInvestigateTableId(investigateTableId);
|
|
|
InvestigateDisposition investigateDisposition = investigateDispositionMapper.selectInvestigateDispositionByInvestigateDispositionId(Long.parseLong(investigateDispositionId));
|
|
@@ -153,7 +166,7 @@ public class InvestigateTableServiceImpl implements IInvestigateTableService {
|
|
|
* @return 结果
|
|
|
*/
|
|
|
|
|
|
- private void insertInvestigateDispositionTable(Long investigateTableId,List<InvestigateDispositionTable> investigateDispositionTableList) {
|
|
|
+ private void insertInvestigateDispositionTable(Long investigateTableId, List<InvestigateDispositionTable> investigateDispositionTableList) {
|
|
|
for (InvestigateDispositionTable investigateDispositionTable : investigateDispositionTableList) {
|
|
|
investigateDispositionTable.setInvestigateTableId(investigateTableId);
|
|
|
//获取HTML文件
|
|
@@ -269,7 +282,6 @@ public class InvestigateTableServiceImpl implements IInvestigateTableService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
//删除原先的考察配置与考察主表关联表信息
|
|
|
investigateDispositionTableMapper.deleteInvestigateDispositionTableByInvestigateTableId(investigateTable.getInvestigateTableId());
|
|
|
|
|
@@ -279,15 +291,15 @@ public class InvestigateTableServiceImpl implements IInvestigateTableService {
|
|
|
if (investigateDispositionTableList != null && investigateDispositionTableList.size() > 0) {
|
|
|
for (InvestigateDispositionTable investigateDispositionTable : investigateDispositionTableList) {
|
|
|
String url = investigateDispositionTable.getUrl();
|
|
|
- String path= url.replace("/profile",getProfile());
|
|
|
+ String path = url.replace("/profile", getProfile());
|
|
|
//todo 删除服务器文件
|
|
|
try {
|
|
|
- Runtime.getRuntime().exec("rm -f "+path);
|
|
|
+ Runtime.getRuntime().exec("rm -f " + path);
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
- insertInvestigateDispositionTable(investigateTableId,investigateDispositionTableList);
|
|
|
+ insertInvestigateDispositionTable(investigateTableId, investigateDispositionTableList);
|
|
|
}
|
|
|
|
|
|
return investigateTableMapper.updateInvestigateTable(investigateTable);
|