Compare commits
1 Commits
deng
...
deng-relea
| Author | SHA1 | Date | |
|---|---|---|---|
| 6738104534 |
@ -387,7 +387,8 @@ public class KpiPlanController {
|
|||||||
@RequestMapping("/export.do")
|
@RequestMapping("/export.do")
|
||||||
public void export(HttpServletRequest request, HttpServletResponse response,
|
public void export(HttpServletRequest request, HttpServletResponse response,
|
||||||
@RequestParam(value = "periodTypeName", required = false) String periodTypeList,
|
@RequestParam(value = "periodTypeName", required = false) String periodTypeList,
|
||||||
@RequestParam(value = "positionType", required = false) String positonTypeList) throws IOException {
|
@RequestParam(value = "positionType", required = false) String positonTypeList,
|
||||||
|
@RequestParam(value = "ids", required = false) String ids) throws IOException {
|
||||||
// 摘自列表查询接口 start
|
// 摘自列表查询接口 start
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
String id = cu.getId();
|
String id = cu.getId();
|
||||||
@ -399,6 +400,10 @@ public class KpiPlanController {
|
|||||||
if (StringUtils.isNotBlank(positonTypeList) && !"null".equals(positonTypeList)) {
|
if (StringUtils.isNotBlank(positonTypeList) && !"null".equals(positonTypeList)) {
|
||||||
wherestr += " and j.level_type = " + positonTypeList;
|
wherestr += " and j.level_type = " + positonTypeList;
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(ids)) {
|
||||||
|
String idstr = ids.replace("'", "").replace(",", "','");
|
||||||
|
wherestr += " and p.id in ('" + idstr + "')";
|
||||||
|
}
|
||||||
wherestr += "and p.create_user_id ='" + id + "'";
|
wherestr += "and p.create_user_id ='" + id + "'";
|
||||||
|
|
||||||
List<KpiPlan> list = kpiPlanService.selectListByWhere(wherestr + orderstr);
|
List<KpiPlan> list = kpiPlanService.selectListByWhere(wherestr + orderstr);
|
||||||
|
|||||||
@ -134,6 +134,12 @@ public class SewageController {
|
|||||||
public String dosave(HttpServletRequest request,Model model,
|
public String dosave(HttpServletRequest request,Model model,
|
||||||
@ModelAttribute Sewage sewage) {
|
@ModelAttribute Sewage sewage) {
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
|
String contractNumber = sewage.getContractNumber() == null ? null : sewage.getContractNumber().trim();
|
||||||
|
sewage.setContractNumber(contractNumber);
|
||||||
|
if (this.sewageService.existsByContractNumber(contractNumber)) {
|
||||||
|
model.addAttribute("result", "{\"res\":\"合同编号已存在,不可重复\"}");
|
||||||
|
return "result";
|
||||||
|
}
|
||||||
sewage.setId(CommUtil.getUUID());
|
sewage.setId(CommUtil.getUUID());
|
||||||
int result = this.sewageService.save(sewage);
|
int result = this.sewageService.save(sewage);
|
||||||
String resultstr = "{\"res\":\""+result+"\",\"id\":\""+sewage.getId()+"\"}";
|
String resultstr = "{\"res\":\""+result+"\",\"id\":\""+sewage.getId()+"\"}";
|
||||||
@ -193,6 +199,12 @@ public class SewageController {
|
|||||||
public String doupdate(HttpServletRequest request,Model model,
|
public String doupdate(HttpServletRequest request,Model model,
|
||||||
@ModelAttribute Sewage sewage) {
|
@ModelAttribute Sewage sewage) {
|
||||||
User cu = (User) request.getSession().getAttribute("cu");
|
User cu = (User) request.getSession().getAttribute("cu");
|
||||||
|
String contractNumber = sewage.getContractNumber() == null ? null : sewage.getContractNumber().trim();
|
||||||
|
sewage.setContractNumber(contractNumber);
|
||||||
|
if (this.sewageService.existsByContractNumberExcludeId(contractNumber, sewage.getId())) {
|
||||||
|
model.addAttribute("result", "{\"res\":\"合同编号已存在,不可重复\"}");
|
||||||
|
return "result";
|
||||||
|
}
|
||||||
int result = this.sewageService.update(sewage);
|
int result = this.sewageService.update(sewage);
|
||||||
String resstr="{\"res\":\""+result+"\",\"id\":\""+sewage.getId()+"\"}";
|
String resstr="{\"res\":\""+result+"\",\"id\":\""+sewage.getId()+"\"}";
|
||||||
model.addAttribute("result", resstr);
|
model.addAttribute("result", resstr);
|
||||||
@ -348,7 +360,8 @@ public class SewageController {
|
|||||||
@RequestMapping(value = "downloadExcelFun.do")
|
@RequestMapping(value = "downloadExcelFun.do")
|
||||||
public ModelAndView downloadExcelFun(HttpServletRequest request,
|
public ModelAndView downloadExcelFun(HttpServletRequest request,
|
||||||
HttpServletResponse response, Model model) throws IOException {
|
HttpServletResponse response, Model model) throws IOException {
|
||||||
this.sewageService.outExcelFun(response);
|
String ids = request.getParameter("ids");
|
||||||
|
this.sewageService.outExcelFun(response, ids);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1252,22 +1252,15 @@ public class WorkorderDetailController {
|
|||||||
@RequestMapping("/doExportRepair.do")
|
@RequestMapping("/doExportRepair.do")
|
||||||
public ModelAndView doExportRepair(HttpServletRequest request,
|
public ModelAndView doExportRepair(HttpServletRequest request,
|
||||||
HttpServletResponse response, Model model,
|
HttpServletResponse response, Model model,
|
||||||
@RequestParam(value = "ids") String ids,
|
@RequestParam(value = "ids", required = false) String ids,
|
||||||
@RequestParam(value = "type") String type) throws IOException {
|
@RequestParam(value = "type") String type) throws IOException {
|
||||||
if (ids != null && !ids.equals("")) {
|
String whereStr = buildExportWhereByIdsAndType(ids, type);
|
||||||
String[] id = ids.split(",");
|
|
||||||
String workorderDetailsIds = "";
|
|
||||||
for (String s : id) {
|
|
||||||
workorderDetailsIds += "'" + s + "',";
|
|
||||||
}
|
|
||||||
String whereStr = "where id in (" + workorderDetailsIds.substring(0, workorderDetailsIds.length() - 1) + ")";
|
|
||||||
try {
|
try {
|
||||||
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
||||||
this.workorderDetailService.doExportRepair(response, workorderDetails, type);
|
this.workorderDetailService.doExportRepair(response, workorderDetails, type);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1292,22 +1285,15 @@ public class WorkorderDetailController {
|
|||||||
@RequestMapping("/doExportRepairJS.do")
|
@RequestMapping("/doExportRepairJS.do")
|
||||||
public ModelAndView doExportRepairJS(HttpServletRequest request,
|
public ModelAndView doExportRepairJS(HttpServletRequest request,
|
||||||
HttpServletResponse response, Model model,
|
HttpServletResponse response, Model model,
|
||||||
@RequestParam(value = "ids") String ids,
|
@RequestParam(value = "ids", required = false) String ids,
|
||||||
@RequestParam(value = "type") String type) throws IOException {
|
@RequestParam(value = "type") String type) throws IOException {
|
||||||
if (ids != null && !ids.equals("")) {
|
String whereStr = buildExportWhereByIdsAndType(ids, type);
|
||||||
String[] id = ids.split(",");
|
|
||||||
String workorderDetailsIds = "";
|
|
||||||
for (String s : id) {
|
|
||||||
workorderDetailsIds += "'" + s + "',";
|
|
||||||
}
|
|
||||||
String whereStr = "where id in (" + workorderDetailsIds.substring(0, workorderDetailsIds.length() - 1) + ")";
|
|
||||||
try {
|
try {
|
||||||
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
||||||
this.workorderDetailService.doExportRepairJS(response, workorderDetails, type);
|
this.workorderDetailService.doExportRepairJS(response, workorderDetails, type);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1332,26 +1318,47 @@ public class WorkorderDetailController {
|
|||||||
@RequestMapping("/doExportMain.do")
|
@RequestMapping("/doExportMain.do")
|
||||||
public ModelAndView doExportMain(HttpServletRequest request,
|
public ModelAndView doExportMain(HttpServletRequest request,
|
||||||
HttpServletResponse response, Model model,
|
HttpServletResponse response, Model model,
|
||||||
@RequestParam(value = "ids") String ids,
|
@RequestParam(value = "ids", required = false) String ids,
|
||||||
@RequestParam(value = "type") String type) throws IOException {
|
@RequestParam(value = "type") String type) throws IOException {
|
||||||
if (ids != null && !ids.equals("")) {
|
String whereStr = buildExportWhereByIdsAndType(ids, type);
|
||||||
String[] id = ids.split(",");
|
|
||||||
String workorderDetailsIds = "";
|
|
||||||
for (String s : id) {
|
|
||||||
workorderDetailsIds += "'" + s + "',";
|
|
||||||
}
|
|
||||||
String whereStr = "where id in (" + workorderDetailsIds.substring(0, workorderDetailsIds.length() - 1) + ")";
|
|
||||||
// System.out.println(whereStr);
|
|
||||||
try {
|
try {
|
||||||
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
List<WorkorderDetail> workorderDetails = workorderDetailService.selectListByWhere(whereStr);
|
||||||
this.workorderDetailService.doExportMain(response, workorderDetails, type);
|
this.workorderDetailService.doExportMain(response, workorderDetails, type);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String buildExportWhereByIdsAndType(String ids, String type) {
|
||||||
|
String normalizedIds = normalizeIds(ids);
|
||||||
|
if (!normalizedIds.isEmpty()) {
|
||||||
|
String[] idArr = normalizedIds.split(",");
|
||||||
|
StringBuilder idBuilder = new StringBuilder();
|
||||||
|
for (String item : idArr) {
|
||||||
|
String id = item.trim();
|
||||||
|
if (id.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (idBuilder.length() > 0) {
|
||||||
|
idBuilder.append(",");
|
||||||
|
}
|
||||||
|
idBuilder.append("'").append(id).append("'");
|
||||||
|
}
|
||||||
|
if (idBuilder.length() > 0) {
|
||||||
|
return "where id in (" + idBuilder + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "where type = '" + type + "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
private String normalizeIds(String ids) {
|
||||||
|
if (ids == null || ids.trim().isEmpty()) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return ids.replace("'", "").replace(" ", "").replaceAll(",+$", "");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日历中弹出指定日期的 维修单
|
* 日历中弹出指定日期的 维修单
|
||||||
*
|
*
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.sipai.entity.sparepart.Sewage;
|
|||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public class SewageDao extends CommDaoImpl<Sewage> {
|
public class SewageDao extends CommDaoImpl<Sewage> {
|
||||||
@ -17,4 +18,12 @@ public class SewageDao extends CommDaoImpl<Sewage> {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer selectCountByContractNumber(String contractNumber) {
|
||||||
|
return getSqlSession().selectOne(this.getMappernamespace() + "." + Thread.currentThread().getStackTrace()[1].getMethodName(), contractNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer selectCountByContractNumberExcludeId(Map<String, String> params) {
|
||||||
|
return getSqlSession().selectOne(this.getMappernamespace() + "." + Thread.currentThread().getStackTrace()[1].getMethodName(), params);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -312,6 +312,17 @@
|
|||||||
delete from TB_Sewage_Source
|
delete from TB_Sewage_Source
|
||||||
${where}
|
${where}
|
||||||
</delete>
|
</delete>
|
||||||
|
<select id="selectCountByContractNumber" resultType="java.lang.Integer" parameterType="java.lang.String" >
|
||||||
|
select count(1)
|
||||||
|
from TB_Sewage_Source
|
||||||
|
where contract_number = #{contractNumber,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<select id="selectCountByContractNumberExcludeId" resultType="java.lang.Integer" parameterType="java.util.Map" >
|
||||||
|
select count(1)
|
||||||
|
from TB_Sewage_Source
|
||||||
|
where contract_number = #{contractNumber,jdbcType=VARCHAR}
|
||||||
|
and id != #{id,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
<select id="selectDistinctCityByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
<select id="selectDistinctCityByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
||||||
select Distinct [city] as [city]
|
select Distinct [city] as [city]
|
||||||
from TB_Sewage_Source
|
from TB_Sewage_Source
|
||||||
|
|||||||
@ -26,8 +26,11 @@ import java.io.InputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import static org.apache.poi.ss.usermodel.CellType.STRING;
|
import static org.apache.poi.ss.usermodel.CellType.STRING;
|
||||||
|
|
||||||
@ -142,6 +145,28 @@ public class SewageService implements CommService<Sewage> {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean existsByContractNumber(String contractNumber) {
|
||||||
|
if (contractNumber == null || contractNumber.trim().isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Integer count = SewageDao.selectCountByContractNumber(contractNumber.trim());
|
||||||
|
return count != null && count > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean existsByContractNumberExcludeId(String contractNumber, String id) {
|
||||||
|
if (contractNumber == null || contractNumber.trim().isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (id == null || id.trim().isEmpty()) {
|
||||||
|
return existsByContractNumber(contractNumber);
|
||||||
|
}
|
||||||
|
Map<String, String> params = new HashMap<String, String>();
|
||||||
|
params.put("contractNumber", contractNumber.trim());
|
||||||
|
params.put("id", id.trim());
|
||||||
|
Integer count = SewageDao.selectCountByContractNumberExcludeId(params);
|
||||||
|
return count != null && count > 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xls文件数据转换
|
* xls文件数据转换
|
||||||
*
|
*
|
||||||
@ -298,6 +323,10 @@ public class SewageService implements CommService<Sewage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void outExcelFun(HttpServletResponse response) throws IOException {
|
public void outExcelFun(HttpServletResponse response) throws IOException {
|
||||||
|
outExcelFun(response, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void outExcelFun(HttpServletResponse response, String ids) throws IOException {
|
||||||
String fileName = "金山卫污水厂纳管企业表.xls";
|
String fileName = "金山卫污水厂纳管企业表.xls";
|
||||||
String title = "纳管企业";
|
String title = "纳管企业";
|
||||||
// 声明一个工作薄
|
// 声明一个工作薄
|
||||||
@ -428,7 +457,7 @@ public class SewageService implements CommService<Sewage> {
|
|||||||
// smcell.setCellStyle(tipStyle);
|
// smcell.setCellStyle(tipStyle);
|
||||||
// smcell.setCellValue("注:日期格式(xxxx-xx-xx或xxxx/xx/xx), 班组类型,班组, 班次(根据系统配置名称填写),模式(填写巡检菜单里面的巡检模式) 排版日期,班组类型,班组,班次,模式都为必填项(集控班组可不填模式)。");
|
// smcell.setCellValue("注:日期格式(xxxx-xx-xx或xxxx/xx/xx), 班组类型,班组, 班次(根据系统配置名称填写),模式(填写巡检菜单里面的巡检模式) 排版日期,班组类型,班组,班次,模式都为必填项(集控班组可不填模式)。");
|
||||||
|
|
||||||
List<Sewage> list = this.selectListByWhere("where 1=1 order by contract_order asc");
|
List<Sewage> list = this.selectListByWhere(buildExportWhere(ids));
|
||||||
int n = 1;
|
int n = 1;
|
||||||
if (list != null && list.size() > 0) {
|
if (list != null && list.size() > 0) {
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
@ -577,6 +606,29 @@ public class SewageService implements CommService<Sewage> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String buildExportWhere(String ids) {
|
||||||
|
String orderBy = " order by contract_order asc";
|
||||||
|
if (ids == null || ids.trim().isEmpty()) {
|
||||||
|
return "where 1=1" + orderBy;
|
||||||
|
}
|
||||||
|
String[] arr = ids.split(",");
|
||||||
|
List<String> idList = new ArrayList<String>();
|
||||||
|
for (String item : arr) {
|
||||||
|
if (item == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String id = item.trim();
|
||||||
|
if (!id.isEmpty() && id.matches("[A-Za-z0-9-]+")) {
|
||||||
|
idList.add("'" + id + "'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (idList.isEmpty()) {
|
||||||
|
return "where 1=1" + orderBy;
|
||||||
|
}
|
||||||
|
String idstr = String.join(",", idList);
|
||||||
|
return "where id in (" + idstr + ")" + orderBy;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取树,三层结构,processSection为根节点,sewage为子节点
|
* 获取树,三层结构,processSection为根节点,sewage为子节点
|
||||||
*
|
*
|
||||||
|
|||||||
@ -296,8 +296,18 @@
|
|||||||
function exportExcel() {
|
function exportExcel() {
|
||||||
var periodTypeName = $('#periodTypeList').val();
|
var periodTypeName = $('#periodTypeList').val();
|
||||||
var positionType = $('#positionTypeList').val();
|
var positionType = $('#positionTypeList').val();
|
||||||
|
let checkedItems = $("#table").bootstrapTable('getSelections');
|
||||||
|
let ids = "";
|
||||||
|
$.each(checkedItems, function (index, item) {
|
||||||
|
ids += item.id + ",";
|
||||||
|
});
|
||||||
|
if (ids !== "") {
|
||||||
|
ids = ids.substring(0, ids.length - 1);
|
||||||
|
window.open(ext.contextPath + "/kpi/kpiPlan/export.do?periodTypeName=" + periodTypeName + "&positionType=" + positionType + "&ids=" + encodeURIComponent(ids));
|
||||||
|
} else {
|
||||||
window.open(ext.contextPath + "/kpi/kpiPlan/export.do?periodTypeName=" + periodTypeName + "&positionType=" + positionType);
|
window.open(ext.contextPath + "/kpi/kpiPlan/export.do?periodTypeName=" + periodTypeName + "&positionType=" + positionType);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -400,8 +400,18 @@
|
|||||||
|
|
||||||
//导出
|
//导出
|
||||||
function downloadExcelFun() {
|
function downloadExcelFun() {
|
||||||
|
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||||
|
var ids = "";
|
||||||
|
$.each(checkedItems, function(index, item){
|
||||||
|
ids += item.id + ",";
|
||||||
|
});
|
||||||
|
if(ids !== ""){
|
||||||
|
ids = ids.substring(0, ids.length - 1);
|
||||||
|
window.open(ext.contextPath + "/sparepart/sewage/downloadExcelFun.do?ids=" + encodeURIComponent(ids));
|
||||||
|
}else{
|
||||||
window.open(ext.contextPath + "/sparepart/sewage/downloadExcelFun.do");
|
window.open(ext.contextPath + "/sparepart/sewage/downloadExcelFun.do");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||||
|
|||||||
@ -418,10 +418,6 @@
|
|||||||
|
|
||||||
var getExs = function () {
|
var getExs = function () {
|
||||||
var datas = selectionIds.toString();
|
var datas = selectionIds.toString();
|
||||||
if (datas === "") {
|
|
||||||
showAlert('d', '请选中之后导出', 'mainAlertdiv');
|
|
||||||
} else {
|
|
||||||
// window.open(ext.contextPath + "/workorder/workorderDetail/doExportMain.do?ids=" + datas + "&type=maintain");
|
|
||||||
var params = {
|
var params = {
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
ids: datas,
|
ids: datas,
|
||||||
@ -429,7 +425,6 @@
|
|||||||
};
|
};
|
||||||
postExcelFile(params, ext.contextPath + '/workorder/workorderDetail/doExportMain.do');
|
postExcelFile(params, ext.contextPath + '/workorder/workorderDetail/doExportMain.do');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function postExcelFile(params, url) { //params是post请求需要的参数,url是请求url地址
|
function postExcelFile(params, url) { //params是post请求需要的参数,url是请求url地址
|
||||||
var form = document.createElement("form");
|
var form = document.createElement("form");
|
||||||
|
|||||||
@ -117,21 +117,14 @@
|
|||||||
//金山项目导出(暂时不用)
|
//金山项目导出(暂时不用)
|
||||||
var getExs_JS = function () {
|
var getExs_JS = function () {
|
||||||
var datas = selectionIds;
|
var datas = selectionIds;
|
||||||
if (datas == 0) {
|
|
||||||
showAlert('d', '请选中之后导出', 'mainAlertdiv');
|
|
||||||
} else {
|
|
||||||
window.open(ext.contextPath + "/workorder/workorderDetail/doExportRepairJS.do?ids=" + datas + "&type=repair");
|
window.open(ext.contextPath + "/workorder/workorderDetail/doExportRepairJS.do?ids=" + datas + "&type=repair");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出excel
|
* 导出excel
|
||||||
*/
|
*/
|
||||||
var getExs = function () {
|
var getExs = function () {
|
||||||
var datas = selectionIds;
|
var datas = selectionIds;
|
||||||
if (datas == 0) {
|
|
||||||
showAlert('d', '请选中之后导出', 'mainAlertdiv');
|
|
||||||
} else {
|
|
||||||
var params = {
|
var params = {
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
ids: datas,
|
ids: datas,
|
||||||
@ -139,7 +132,6 @@
|
|||||||
};
|
};
|
||||||
postExcelFile(params, ext.contextPath + '/workorder/workorderDetail/doExportRepair.do');
|
postExcelFile(params, ext.contextPath + '/workorder/workorderDetail/doExportRepair.do');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function postExcelFile(params, url) { //params是post请求需要的参数,url是请求url地址
|
function postExcelFile(params, url) { //params是post请求需要的参数,url是请求url地址
|
||||||
var form = document.createElement("form");
|
var form = document.createElement("form");
|
||||||
|
|||||||
Reference in New Issue
Block a user