优化
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
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
<el-date-picker
|
||||
v-model="query.nowstart_date"
|
||||
type="date"
|
||||
value-format=“yyyy-MM-dd”
|
||||
style="width: 200px"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
v-model="query.nowstart_date"
|
||||
type="date"
|
||||
style="width: 200px"
|
||||
value-format=“yyyy-MM-dd”
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
<el-checkbox v-model="query.checked">启用</el-checkbox>
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.workorder_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="workorder_type" :formatter="bill_typeFormat" min-width="75" label="工令类型" />
|
||||
<el-table-column prop="remark" min-width="200" label="备注"/>
|
||||
<el-table-column :formatter="stateFormat" min-width="75" prop="status" label="工令状态" />
|
||||
<el-table-column prop="material_code" min-width="130" label="物料编码"/>
|
||||
<el-table-column :formatter="seriesFormat" min-width="80" prop="product_series_id" label="系列" />
|
||||
@@ -155,7 +155,7 @@
|
||||
<el-table-column prop="bill_qty" min-width="90" label="开单总重量" :formatter="crud.formatNum3" />
|
||||
<el-table-column :formatter="create_modeFormat" min-width="160" prop="create_mode" label="生成方式" />
|
||||
<el-table-column prop="qty_unit_name" min-width="80" label="单位"/>
|
||||
<el-table-column prop="remark" min-width="200" label="备注"/>
|
||||
<el-table-column prop="workorder_type" :formatter="bill_typeFormat" min-width="75" label="工令类型" />
|
||||
<el-table-column prop="formula_time" min-width="135" label="开单时间"/>
|
||||
<el-table-column prop="formula_name" min-width="80" label="开单人"/>
|
||||
</el-table>
|
||||
|
||||
@@ -123,15 +123,15 @@
|
||||
<el-table-column fixed="left" prop="device_code" label="设备编码" min-width="85" />
|
||||
<el-table-column fixed="left" prop="device_name" label="设备名称" min-width="170" />
|
||||
<el-table-column fixed="left" prop="extend_code" label="设备自编码" min-width="100" />
|
||||
<el-table-column fixed="left" prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="70" />
|
||||
<el-table-column fixed="left" prop="maintenancecycle" label="单据类型" :formatter="formatTypeName" min-width="70" />
|
||||
<el-table-column fixed="left" prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="70" />
|
||||
<el-table-column fixed="left" prop="plan_start_date" label="计划维修日期" min-width="95" />
|
||||
<el-table-column fixed="left" prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="75" />
|
||||
<el-table-column fixed="left" prop="maintenancecycle" label="单据类型" :formatter="formatTypeName" min-width="75" />
|
||||
<el-table-column fixed="left" prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="75" />
|
||||
<el-table-column fixed="left" prop="plan_start_date" label="计划维修日期" min-width="100" />
|
||||
<el-table-column prop="fault_desc" label="故障描述" min-width="200" />
|
||||
<el-table-column prop="remark" label="备注" min-width="200" />
|
||||
<el-table-column prop="input_optname" label="制单人" min-width="90" />
|
||||
<el-table-column prop="input_time" label="制单时间" min-width="140" />
|
||||
<el-table-column prop="update_optname" label="维修人" min-width="150" />
|
||||
<el-table-column prop="estimaterepair_times" label="修复时间(h)" min-width="100" />
|
||||
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
||||
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
||||
<el-table-column prop="confirm_optname" label="确认人" min-width="90" />
|
||||
@@ -139,7 +139,8 @@
|
||||
<el-table-column prop="audit_optname" label="审核人" min-width="90" />
|
||||
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
||||
<el-table-column prop="source_bill_code" label="源单号" min-width="120px" />
|
||||
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="90" />
|
||||
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="100" />
|
||||
<el-table-column prop="remark" label="备注" min-width="200" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
|
||||
Reference in New Issue
Block a user