Merge branch 'master' of http://121.40.234.130:8899/root/wuHanXinRui
This commit is contained in:
@@ -16,9 +16,13 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Liuxy
|
* @author Liuxy
|
||||||
* @date 2021-12-28
|
* @date 2021-12-28
|
||||||
@@ -48,6 +52,12 @@ public class PerformancemstController {
|
|||||||
return new ResponseEntity<>(performancemstService.workLoadStatQuery(whereJson,page),HttpStatus.OK);
|
return new ResponseEntity<>(performancemstService.workLoadStatQuery(whereJson,page),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("导出数据")
|
||||||
|
@GetMapping(value = "/workloadstat/download")
|
||||||
|
public void download(HttpServletResponse response, @RequestParam Map whereJson) throws IOException {
|
||||||
|
performancemstService.download(whereJson, response);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Log("新增工作量汇报")
|
@Log("新增工作量汇报")
|
||||||
@ApiOperation("新增工作量汇报")
|
@ApiOperation("新增工作量汇报")
|
||||||
|
|||||||
@@ -94,4 +94,11 @@ public interface PerformancemstService {
|
|||||||
* 获取工作量统计表表头
|
* 获取工作量统计表表头
|
||||||
*/
|
*/
|
||||||
JSONArray getHeader();
|
JSONArray getHeader();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据
|
||||||
|
*
|
||||||
|
* @param whereJson /
|
||||||
|
*/
|
||||||
|
void download(Map whereJson, HttpServletResponse response) throws IOException;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.exception.BadRequestException;
|
import org.nl.exception.BadRequestException;
|
||||||
import org.nl.modules.security.service.dto.JwtUserDto;
|
import org.nl.modules.security.service.dto.JwtUserDto;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.utils.FileUtil;
|
||||||
import org.nl.utils.SecurityUtils;
|
import org.nl.utils.SecurityUtils;
|
||||||
import org.nl.wms.pa.Enum.TestStatusEnum;
|
import org.nl.wms.pa.Enum.TestStatusEnum;
|
||||||
import org.nl.wms.pa.service.PerformancemstService;
|
import org.nl.wms.pa.service.PerformancemstService;
|
||||||
@@ -27,7 +28,10 @@ import org.springframework.data.domain.Pageable;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -317,4 +321,11 @@ public class PerformancemstServiceImpl implements PerformancemstService {
|
|||||||
return jsonArrResult;
|
return jsonArrResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void download(Map whereJson, HttpServletResponse response) throws IOException {
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
FileUtil.downloadExcel(list, response);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,4 +43,10 @@ public class PowderOrderQueryController {
|
|||||||
public ResponseEntity<Object> getHeader() {
|
public ResponseEntity<Object> getHeader() {
|
||||||
return new ResponseEntity<>(powderOrderQueryService.getHeader(), HttpStatus.OK);
|
return new ResponseEntity<>(powderOrderQueryService.getHeader(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("导出数据")
|
||||||
|
@GetMapping(value = "/download")
|
||||||
|
public void download(HttpServletResponse response, @RequestParam Map whereJson) throws IOException {
|
||||||
|
powderOrderQueryService.download(whereJson, response);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package org.nl.wms.statistics.service;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public interface PowderOrderQueryService {
|
public interface PowderOrderQueryService {
|
||||||
@@ -19,4 +21,11 @@ public interface PowderOrderQueryService {
|
|||||||
* 获取表头
|
* 获取表头
|
||||||
*/
|
*/
|
||||||
JSONArray getHeader();
|
JSONArray getHeader();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据
|
||||||
|
*
|
||||||
|
* @param whereJson /
|
||||||
|
*/
|
||||||
|
void download(Map whereJson, HttpServletResponse response) throws IOException;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
package org.nl.wms.statistics.service.impl;
|
package org.nl.wms.statistics.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUnit;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.nl.utils.FileUtil;
|
||||||
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
||||||
import org.nl.wms.basedata.master.service.ClassstandardService;
|
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||||
import org.nl.wms.statistics.service.PowderOrderQueryService;
|
import org.nl.wms.statistics.service.PowderOrderQueryService;
|
||||||
@@ -15,9 +19,11 @@ import org.nl.wql.core.bean.WQLObject;
|
|||||||
import org.nl.wql.util.WqlUtil;
|
import org.nl.wql.util.WqlUtil;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Map;
|
import java.io.IOException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@@ -112,10 +118,6 @@ public class PowderOrderQueryServiceImpl implements PowderOrderQueryService {
|
|||||||
jsonResult4.put("prop",json.getString("material_id"));
|
jsonResult4.put("prop",json.getString("material_id"));
|
||||||
jsonResult4.put("label","物料" + NumberUtil.add(String.valueOf(i), "1") + "");
|
jsonResult4.put("label","物料" + NumberUtil.add(String.valueOf(i), "1") + "");
|
||||||
jsonResultArr.add(jsonResult4);
|
jsonResultArr.add(jsonResult4);
|
||||||
// JSONObject jsonResult5 = new JSONObject();
|
|
||||||
// jsonResult5.put("prop",json.getString("material_code")+"");
|
|
||||||
// jsonResult5.put("label","物料编码");
|
|
||||||
// jsonResultArr.add(jsonResult5);
|
|
||||||
JSONObject jsonResult6 = new JSONObject();
|
JSONObject jsonResult6 = new JSONObject();
|
||||||
jsonResult6.put("prop",json.getString("material_id")+"pcsn");
|
jsonResult6.put("prop",json.getString("material_id")+"pcsn");
|
||||||
jsonResult6.put("label","批次");
|
jsonResult6.put("label","批次");
|
||||||
@@ -149,4 +151,11 @@ public class PowderOrderQueryServiceImpl implements PowderOrderQueryService {
|
|||||||
|
|
||||||
return jsonResultArr;
|
return jsonResultArr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void download(Map whereJson, HttpServletResponse response) throws IOException {
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
FileUtil.downloadExcel(list, response);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export default {
|
|||||||
add: false,
|
add: false,
|
||||||
edit: false,
|
edit: false,
|
||||||
del: false,
|
del: false,
|
||||||
download: false,
|
download: true,
|
||||||
reset: true
|
reset: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -160,7 +160,7 @@
|
|||||||
<el-table-column prop="plan_org_name" label="申报单位" width="100" />
|
<el-table-column prop="plan_org_name" label="申报单位" width="100" />
|
||||||
<el-table-column prop="device_name" label="关键设备" width="100" />
|
<el-table-column prop="device_name" label="关键设备" width="100" />
|
||||||
<el-table-column prop="plan_finish_date" label="交货日期" width="90" />
|
<el-table-column prop="plan_finish_date" label="交货日期" width="90" />
|
||||||
<el-table-column prop="old_mark" label="牌号" />
|
<el-table-column prop="old_mark" min-width="100" label="牌号" />
|
||||||
<el-table-column prop="material_code" label="物料编码" min-width="150"/>
|
<el-table-column prop="material_code" label="物料编码" min-width="150"/>
|
||||||
<el-table-column :formatter="seriesFormat" min-width="80" prop="product_series" label="系列" />
|
<el-table-column :formatter="seriesFormat" min-width="80" prop="product_series" label="系列" />
|
||||||
<el-table-column prop="product_type_name" label="生产方式" />
|
<el-table-column prop="product_type_name" label="生产方式" />
|
||||||
|
|||||||
@@ -174,7 +174,7 @@
|
|||||||
<el-table-column prop="plan_month" label="计划月份" />
|
<el-table-column prop="plan_month" label="计划月份" />
|
||||||
<el-table-column prop="plan_finish_date" label="交货日期" width="90" />
|
<el-table-column prop="plan_finish_date" label="交货日期" width="90" />
|
||||||
<el-table-column prop="material_code" label="物料编码" min-width="150"/>
|
<el-table-column prop="material_code" label="物料编码" min-width="150"/>
|
||||||
<el-table-column prop="old_mark" label="牌号" />
|
<el-table-column prop="old_mark" min-width="100" label="牌号" />
|
||||||
<el-table-column prop="product_type_name" label="生产方式" />
|
<el-table-column prop="product_type_name" label="生产方式" />
|
||||||
<el-table-column prop="product_weight" label="需求重量" :formatter="crud.formatNum3"/>
|
<el-table-column prop="product_weight" label="需求重量" :formatter="crud.formatNum3"/>
|
||||||
<el-table-column prop="fact_weight" label="生产重量" :formatter="crud.formatNum3" width="150" align="center">
|
<el-table-column prop="fact_weight" label="生产重量" :formatter="crud.formatNum3" width="150" align="center">
|
||||||
|
|||||||
@@ -226,6 +226,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
:data="crud.data"
|
:data="crud.data"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
|
:max-height="590"
|
||||||
:highlight-current-row="true"
|
:highlight-current-row="true"
|
||||||
@selection-change="mySelectionChange"
|
@selection-change="mySelectionChange"
|
||||||
>
|
>
|
||||||
@@ -308,7 +309,12 @@ export default {
|
|||||||
name: 'workorder',
|
name: 'workorder',
|
||||||
components: { ChangeDialog, ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
components: { ChangeDialog, ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '工令', idField: 'workorder_id', url: 'api/workorder', crudMethod: { ...workorder },
|
return CRUD({ title: '工令',
|
||||||
|
props: {
|
||||||
|
// 每页数据条数
|
||||||
|
size: 20
|
||||||
|
},
|
||||||
|
idField: 'workorder_id', url: 'api/workorder', crudMethod: { ...workorder },
|
||||||
optShow: {
|
optShow: {
|
||||||
add: true,
|
add: true,
|
||||||
edit: false,
|
edit: false,
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ export default {
|
|||||||
add: false,
|
add: false,
|
||||||
edit: false,
|
edit: false,
|
||||||
del: false,
|
del: false,
|
||||||
download: false,
|
download: true,
|
||||||
reset: true
|
reset: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user