优化
This commit is contained in:
@@ -493,9 +493,15 @@ public class DeviceBigScreenServiceImpl implements DeviceBigScreenService {
|
||||
} catch (Exception e){
|
||||
json.put("device_oee", "0");
|
||||
}
|
||||
device_all_time = NumberUtil.div(device_all_time, "60").toString();
|
||||
// 7.维修时间
|
||||
json.put("device_time", device_all_time);
|
||||
|
||||
try {
|
||||
device_all_time = NumberUtil.div(device_all_time, "60").toString();
|
||||
// 7.维修时间
|
||||
json.put("device_time", NumberUtil.round(device_all_time, 2).toString());
|
||||
} catch (Exception e){
|
||||
json.put("device_time", "0");
|
||||
}
|
||||
|
||||
|
||||
resultArr.add(json);
|
||||
}
|
||||
|
||||
@@ -125,6 +125,6 @@ public class CheckController {
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
public void download(HttpServletResponse response,@RequestParam Map whereJson) throws IOException {
|
||||
checkService.download(checkService.getOutBillDtl(whereJson), response);
|
||||
checkService.download(whereJson, response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,9 +88,9 @@ public interface CheckService {
|
||||
|
||||
/**
|
||||
* 导出
|
||||
* @param rows
|
||||
* @param whereJson
|
||||
* @param response
|
||||
* @throws IOException
|
||||
*/
|
||||
void download(JSONArray rows, HttpServletResponse response) throws IOException;
|
||||
void download(Map whereJson, HttpServletResponse response) throws IOException;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.wms.st.instor.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
@@ -621,8 +622,13 @@ public class CheckServiceImpl implements CheckService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void download(JSONArray rows, HttpServletResponse response) throws IOException {
|
||||
public void download(Map whereJson, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
whereJson.put("flag", "22");
|
||||
JSONArray rows = WQL.getWO("QST_IVT_CHECK")
|
||||
.addParamMap((HashMap) whereJson)
|
||||
.process()
|
||||
.getResultJSONArray(0);
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
JSONObject jo = rows.getJSONObject(i);
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
@@ -635,8 +641,8 @@ public class CheckServiceImpl implements CheckService {
|
||||
map.put("载具号", jo.getString("storagevehicle_code"));
|
||||
map.put("物料编码", jo.getString("material_code"));
|
||||
map.put("物料名称", jo.getString("material_name"));
|
||||
map.put("桶数", jo.getString("base_qty"));
|
||||
map.put("盘点桶数", jo.getString("fac_qty"));
|
||||
map.put("桶数", jo.getIntValue("base_qty"));
|
||||
map.put("盘点桶数", jo.getIntValue("fac_qty"));
|
||||
map.put("单位", jo.getString("qty_unit_name"));
|
||||
String check_result = jo.getString("check_result");
|
||||
if (check_result.equals("0")) {
|
||||
@@ -668,6 +674,12 @@ public class CheckServiceImpl implements CheckService {
|
||||
} else if (process_type.equals("1")) {
|
||||
map.put("异常处理方式", "实物为准");
|
||||
}
|
||||
map.put("桶号", jo.getString("bucketunique"));
|
||||
if (StrUtil.isNotEmpty(jo.getString("storage_qty"))) {
|
||||
map.put("桶重量", NumberUtil.round(jo.getString("storage_qty"),3).toString());
|
||||
}else{
|
||||
map.put("桶重量", "");
|
||||
}
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
|
||||
@@ -132,6 +132,39 @@
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "22"
|
||||
QUERY
|
||||
SELECT
|
||||
CheckDtl.*,
|
||||
struct.struct_code,
|
||||
struct.sect_code,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
bucketrecord.bucketunique,
|
||||
bucketrecord.storage_qty
|
||||
FROM
|
||||
ST_IVT_CheckDtl CheckDtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = CheckDtl.material_id
|
||||
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = CheckDtl.struct_id
|
||||
LEFT JOIN md_pb_bucketrecord bucketrecord ON bucketrecord.storagevehicle_code = CheckDtl.storagevehicle_code
|
||||
AND bucketrecord.material_id = CheckDtl.material_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND bucketrecord.STATUS = '03'
|
||||
OPTION 输入.check_id <> ""
|
||||
CheckDtl.check_id = 输入.check_id
|
||||
ENDOPTION
|
||||
OPTION 输入.checkdtl_id <> ""
|
||||
CheckDtl.checkdtl_id = 输入.checkdtl_id
|
||||
ENDOPTION
|
||||
OPTION 输入.status <> ""
|
||||
CheckDtl.status <= 输入.status
|
||||
ENDOPTION
|
||||
order by CheckDtl.seq_no
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "3"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
|
||||
@@ -438,7 +438,7 @@
|
||||
FROM
|
||||
pdm_bi_workorder wo
|
||||
WHERE
|
||||
wo.`status` < 50
|
||||
wo.`status` < 40
|
||||
AND is_delete = '0'
|
||||
OPTION 输入.begin_time <> ""
|
||||
wo.planstart_time like 输入.begin_time
|
||||
|
||||
Reference in New Issue
Block a user