|
@@ -15,8 +15,10 @@ import org.jeecg.config.JeecgBaseConfig;
|
|
import org.jeecg.modules.costModelList.convert.CostModelListConvert;
|
|
import org.jeecg.modules.costModelList.convert.CostModelListConvert;
|
|
import org.jeecg.modules.costModelList.dto.CostModelListAddDTO;
|
|
import org.jeecg.modules.costModelList.dto.CostModelListAddDTO;
|
|
import org.jeecg.modules.costModelList.dto.CostModelListUpdateDTO;
|
|
import org.jeecg.modules.costModelList.dto.CostModelListUpdateDTO;
|
|
|
|
+import org.jeecg.modules.costModelList.dto.FileDTO;
|
|
import org.jeecg.modules.costModelList.entity.CostModelList;
|
|
import org.jeecg.modules.costModelList.entity.CostModelList;
|
|
import org.jeecg.modules.costModelList.service.ICostModelListService;
|
|
import org.jeecg.modules.costModelList.service.ICostModelListService;
|
|
|
|
+import org.jeecg.modules.costModelList.vo.CostModelListQueryVO;
|
|
import org.jeecg.modules.costModelXmxqCl.entity.CostModelXmxqCl;
|
|
import org.jeecg.modules.costModelXmxqCl.entity.CostModelXmxqCl;
|
|
import org.jeecg.modules.costModelXmxqCl.service.ICostModelXmxqClService;
|
|
import org.jeecg.modules.costModelXmxqCl.service.ICostModelXmxqClService;
|
|
import org.jeecg.modules.costModelXmxqWx.entity.CostModelXmxqWx;
|
|
import org.jeecg.modules.costModelXmxqWx.entity.CostModelXmxqWx;
|
|
@@ -27,10 +29,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
-import java.util.Arrays;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.Map;
|
|
|
|
-import java.util.Objects;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @Description: 成本模型
|
|
* @Description: 成本模型
|
|
@@ -131,17 +130,43 @@ public class CostModelListController extends JeecgController<CostModelList, ICos
|
|
wxService.removeByMap(columnMap);
|
|
wxService.removeByMap(columnMap);
|
|
|
|
|
|
//计算并导入数据
|
|
//计算并导入数据
|
|
- Result<CostModelList> result1 = clService.importExcel1(xmId, xmName, clfUrl, CostModelXmxqCl.class);
|
|
|
|
|
|
+ Result<CostModelList> result2 = clService.importExcel1(xmId, xmName, wxfUrl, CostModelXmxqCl.class);
|
|
}
|
|
}
|
|
|
|
|
|
costModelList.setXmName(xmName);
|
|
costModelList.setXmName(xmName);
|
|
- costModelList.setClfUrl(clfUrl1);
|
|
|
|
- costModelList.setWxfUrl(wxfUrl1);
|
|
|
|
costModelListService.updateById(costModelList);
|
|
costModelListService.updateById(costModelList);
|
|
return Result.OK("编辑成功!");
|
|
return Result.OK("编辑成功!");
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * 成本模型——-编辑前查询
|
|
|
|
+ *
|
|
|
|
+ * @param id
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ //@AutoLog(value = "成本模型-通过id查询")
|
|
|
|
+ @ApiOperation(value="成本模型——-编辑前查询", notes="成本模型——-编辑前查询")
|
|
|
|
+ @GetMapping(value = "/queryByIdBeforeEdit")
|
|
|
|
+ public Result<CostModelListQueryVO> queryByIdBeforeEdit(@RequestParam(name="id",required=true) String id) {
|
|
|
|
+ CostModelList costModelList = costModelListService.getById(id);
|
|
|
|
+ if(costModelList!=null) {
|
|
|
|
+ List<FileDTO> wxfurl = new ArrayList<>();
|
|
|
|
+ FileDTO fileDTO = new FileDTO();
|
|
|
|
+ fileDTO.setFilePath(costModelList.getWxfUrl());
|
|
|
|
+ wxfurl.add(fileDTO);
|
|
|
|
+
|
|
|
|
+ List<FileDTO> clfurl = new ArrayList<>();
|
|
|
|
+ FileDTO fileDTO1 = new FileDTO();
|
|
|
|
+ fileDTO1.setFilePath(costModelList.getClfUrl());
|
|
|
|
+ clfurl.add(fileDTO1);
|
|
|
|
+
|
|
|
|
+ CostModelListQueryVO vo = CostModelListConvert.INSTANCE.toCostModelListQueryVO(costModelList,wxfurl,clfurl);
|
|
|
|
+
|
|
|
|
+ return Result.OK(vo);
|
|
|
|
+ }else return Result.error("未找到对应数据");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
* 分页列表查询
|
|
* 分页列表查询
|
|
*
|
|
*
|
|
* @param costModelList
|
|
* @param costModelList
|