rev:设备管理页面维护
This commit is contained in:
@@ -35,6 +35,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Liuxy
|
* @author Liuxy
|
||||||
@@ -321,14 +323,18 @@ public class DevicerepairrequestServiceImpl implements DevicerepairrequestServic
|
|||||||
String nickName = SecurityUtils.getCurrentNickName();
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
|
||||||
WQLObject requestTab = WQLObject.getWQLObject("EM_BI_DeviceRepairRequest"); // 设备报修单
|
WQLObject requestTab = WQLObject.getWQLObject("EM_BI_DeviceRepairRequest"); // 设备报修单
|
||||||
|
WQLObject repaiMstTab = WQLObject.getWQLObject("EM_BI_DeviceRepairMst");
|
||||||
|
|
||||||
JSONArray rows = whereJson.getJSONArray("rows");
|
JSONArray rows = whereJson.getJSONArray("rows");
|
||||||
|
|
||||||
for(int i=0;i<rows.size();i++){
|
for(int i=0;i<rows.size();i++){
|
||||||
JSONObject jo =rows.getJSONObject(i);
|
JSONObject jo =rows.getJSONObject(i);
|
||||||
String status = jo.getString("status");
|
String status = jo.getString("status");
|
||||||
if(!"01".equals(status)){
|
// if(!"01".equals(status)){
|
||||||
continue;
|
// continue;
|
||||||
|
// }
|
||||||
|
JSONArray reqMst = repaiMstTab.query("is_delete = '0' and source_bill_code = '" + jo.getString("request_code") + "'").getResultJSONArray(0);
|
||||||
|
if (reqMst!=null && reqMst.size()>0){
|
||||||
|
throw new BadRequestException("报修单已经有生成的维修单不允许直接修改:"+reqMst.getJSONObject(0).getString("repair_code"));
|
||||||
}
|
}
|
||||||
JSONObject jsonRequest = requestTab.query("request_id = '" + jo.getString("request_id") + "'").uniqueResult(0);
|
JSONObject jsonRequest = requestTab.query("request_id = '" + jo.getString("request_id") + "'").uniqueResult(0);
|
||||||
jsonRequest.put("is_passed", "0");
|
jsonRequest.put("is_passed", "0");
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import io.swagger.annotations.Api;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.TableDataInfo;
|
import org.nl.common.TableDataInfo;
|
||||||
import org.nl.common.anno.Log;
|
import org.nl.common.anno.Log;
|
||||||
import org.nl.common.utils.RedissonUtils;
|
import org.nl.common.utils.RedissonUtils;
|
||||||
@@ -126,7 +127,11 @@ public class ClassstandardController {
|
|||||||
public ResponseEntity<Object> getSuperior2(@RequestBody String param) {
|
public ResponseEntity<Object> getSuperior2(@RequestBody String param) {
|
||||||
JSONArray arr = JSONArray.parseArray(param);
|
JSONArray arr = JSONArray.parseArray(param);
|
||||||
JSONObject parse = arr.getJSONObject(0);
|
JSONObject parse = arr.getJSONObject(0);
|
||||||
JSONObject jo = WQLObject.getWQLObject("MD_PB_ClassStandard").query("class_id = '" + parse.getString("id") + "'").uniqueResult(0);
|
String id = parse.getString("id");
|
||||||
|
if (StringUtils.isEmpty(id)){
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
JSONObject jo = WQLObject.getWQLObject("MD_PB_ClassStandard").query("class_id = '" + id + "'").uniqueResult(0);
|
||||||
JSONArray maters = ClassstandardService.getSuperiorLimit(jo, new JSONArray(),parse.getString("parent_id"));
|
JSONArray maters = ClassstandardService.getSuperiorLimit(jo, new JSONArray(),parse.getString("parent_id"));
|
||||||
return new ResponseEntity<>(ClassstandardService.buildTree(maters), HttpStatus.OK);
|
return new ResponseEntity<>(ClassstandardService.buildTree(maters), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,9 +93,9 @@
|
|||||||
<el-table-column prop="hours" label="实际生产耗时(h)" width="120" :formatter="crud.formatNum0"/>
|
<el-table-column prop="hours" label="实际生产耗时(h)" width="120" :formatter="crud.formatNum0"/>
|
||||||
<el-table-column prop="theory" label="设计产能(ph)" width="120" />
|
<el-table-column prop="theory" label="设计产能(ph)" width="120" />
|
||||||
<el-table-column prop="realty" label="实际产能(ph)" width="120" />
|
<el-table-column prop="realty" label="实际产能(ph)" width="120" />
|
||||||
<el-table-column prop="realty" label="产能利用率(%)" width="120" >
|
<el-table-column label="产能利用率(%)" width="120" >
|
||||||
<template slot-scope="scope" :formatter="crud.formatNum0">
|
<template slot-scope="scope" :formatter="crud.formatNum0">
|
||||||
<span>{{ Number(scope.row.realty/scope.row.theory).toFixed(3)}}</span>
|
<span>{{ Number(scope.row.realty*100/scope.row.theory).toFixed(3)}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="orders" label="工单列表" width="150" show-overflow-tooltip/>
|
<el-table-column prop="orders" label="工单列表" width="150" show-overflow-tooltip/>
|
||||||
|
|||||||
@@ -3,11 +3,10 @@
|
|||||||
title="工序设备"
|
title="工序设备"
|
||||||
append-to-body
|
append-to-body
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
destroy-on-close
|
|
||||||
width="80%"
|
width="80%"
|
||||||
>
|
>
|
||||||
<el-card class="box-card" shadow="never">
|
<el-card class="box-card" shadow="never">
|
||||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" disabled size="mini">
|
<el-form ref="form" :inline="true" :model="form" disabled size="mini">
|
||||||
<el-form-item label="所属工序">
|
<el-form-item label="所属工序">
|
||||||
<el-input v-model="form.workprocedure_name" style="width: 120px;" />
|
<el-input v-model="form.workprocedure_name" style="width: 120px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -94,40 +93,18 @@ import qualityanilysis from '@/views/wms/analysis_manage/qlmanage/qualityanilysi
|
|||||||
import CRUD, { header, presenter } from '@crud/crud'
|
import CRUD, { header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'WorkprodureDevDialog',
|
name: 'WorkprodureDevDialog',
|
||||||
components: { rrOperation, pagination, Treeselect },
|
components: { rrOperation, pagination },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '工序设备', url: '/api/qualityanalysis/bydevice', crudMethod: { ...qualityanilysis }, optShow: {}})
|
return CRUD({ title: '工序设备', url: '/api/qualityanalysis/bydevice', crudMethod: { ...qualityanilysis }, optShow: {}})
|
||||||
},
|
},
|
||||||
mixins: [presenter(), header()],
|
mixins: [presenter(), header()],
|
||||||
dicts: ['product_area'],
|
dicts: ['product_area'],
|
||||||
props: {
|
|
||||||
dialogShow: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
workprocedureid: {
|
|
||||||
type: String
|
|
||||||
},
|
|
||||||
analysis: {
|
|
||||||
type: String
|
|
||||||
},
|
|
||||||
createtime: {
|
|
||||||
type: String
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
classes: [],
|
|
||||||
tableRadio: null,
|
|
||||||
class_idStr: null,
|
|
||||||
checkrow: null,
|
|
||||||
rows: [],
|
|
||||||
form: {
|
form: {
|
||||||
analysis: null,
|
analysis: null,
|
||||||
workprocedure_name: null,
|
workprocedure_name: null,
|
||||||
@@ -136,13 +113,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
// watch: {
|
||||||
dialogShow: {
|
// dialogShow: {
|
||||||
handler(newValue) {
|
// handler(newValue) {
|
||||||
this.dialogVisible = newValue
|
// this.dialogVisible = newValue
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
labelHead(h, { column, index }) { // 动态表头渲染
|
labelHead(h, { column, index }) { // 动态表头渲染
|
||||||
// let l = column.label.length;
|
// let l = column.label.length;
|
||||||
@@ -151,9 +128,6 @@ export default {
|
|||||||
// 然后将列标题放在一个div块中,注意块的宽度一定要100%,否则表格显示不完全
|
// 然后将列标题放在一个div块中,注意块的宽度一定要100%,否则表格显示不完全
|
||||||
return h('span', { class: 'table-head', style: { width: '100%' }}, [column.label])
|
return h('span', { class: 'table-head', style: { width: '100%' }}, [column.label])
|
||||||
},
|
},
|
||||||
clickChange(item) {
|
|
||||||
this.tableRadio = item
|
|
||||||
},
|
|
||||||
openQ(query) {
|
openQ(query) {
|
||||||
this.crud.query = query
|
this.crud.query = query
|
||||||
console.log(query)
|
console.log(query)
|
||||||
@@ -166,25 +140,9 @@ export default {
|
|||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
handleSelectionChange(val, row) {
|
|
||||||
if (this.isSingle) {
|
|
||||||
if (val.length > 1) {
|
|
||||||
this.$refs.table.clearSelection()
|
|
||||||
this.$refs.table.toggleRowSelection(val.pop())
|
|
||||||
} else {
|
|
||||||
this.checkrow = row
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onSelectAll() {
|
|
||||||
this.$refs.table.clearSelection()
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
this.crud.resetQuery(false)
|
|
||||||
this.$emit('update:dialogShow', false)
|
|
||||||
},
|
|
||||||
submit() {
|
submit() {
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
|
this.$emit('closeDialog')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
<WorkprodureDevDialog ref="WorkprodureDevDialog" :dialog-show.sync="workproduceShow" />
|
<WorkprodureDevDialog ref="WorkprodureDevDialog" :dialog-show.sync="workproduceShow" @closeDialog="resetQuery"/>
|
||||||
</div>
|
</div>
|
||||||
<div id="main2" style="width: 100%;height:350px;" />
|
<div id="main2" style="width: 100%;height:350px;" />
|
||||||
</div>
|
</div>
|
||||||
@@ -204,6 +204,9 @@ export default {
|
|||||||
this.workList = res
|
this.workList = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
resetQuery(){
|
||||||
|
this.crud.resetQuery()
|
||||||
|
},
|
||||||
bydevice(index, row) {
|
bydevice(index, row) {
|
||||||
this.workproduceShow = true
|
this.workproduceShow = true
|
||||||
this.crud.query.workprocedure_id = row.workprocedure_id
|
this.crud.query.workprocedure_id = row.workprocedure_id
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ export default {
|
|||||||
},
|
},
|
||||||
queryClassId() {
|
queryClassId() {
|
||||||
const param = {
|
const param = {
|
||||||
'class_idStr': this.class_idStr
|
'class_idStr': '2'
|
||||||
}
|
}
|
||||||
crudClassstandard.queryClassById(param).then(res => {
|
crudClassstandard.queryClassById(param).then(res => {
|
||||||
this.classes = res.content.map(obj => {
|
this.classes = res.content.map(obj => {
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ export default {
|
|||||||
},
|
},
|
||||||
queryClassId() {
|
queryClassId() {
|
||||||
const param = {
|
const param = {
|
||||||
'class_idStr': this.class_idStr
|
'class_idStr': '2'
|
||||||
}
|
}
|
||||||
crudClassstandard.queryClassById(param).then(res => {
|
crudClassstandard.queryClassById(param).then(res => {
|
||||||
this.classes = res.content.map(obj => {
|
this.classes = res.content.map(obj => {
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ export default {
|
|||||||
},
|
},
|
||||||
queryClassId() {
|
queryClassId() {
|
||||||
const param = {
|
const param = {
|
||||||
'class_idStr': this.class_idStr
|
'class_idStr': '2'
|
||||||
}
|
}
|
||||||
crudClassstandard.queryClassById(param).then(res => {
|
crudClassstandard.queryClassById(param).then(res => {
|
||||||
this.classes = res.content.map(obj => {
|
this.classes = res.content.map(obj => {
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
classes: [],
|
classes: [],
|
||||||
class_idStr: null,
|
class_idStr: '2',
|
||||||
materOpt_code: '23',
|
materOpt_code: '23',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tableRadio: null,
|
tableRadio: null,
|
||||||
@@ -238,7 +238,7 @@ export default {
|
|||||||
},
|
},
|
||||||
queryClassId() {
|
queryClassId() {
|
||||||
const param = {
|
const param = {
|
||||||
'class_idStr': this.class_idStr
|
'class_idStr': '2'
|
||||||
}
|
}
|
||||||
crudClassstandard.queryClassById(param).then(res => {
|
crudClassstandard.queryClassById(param).then(res => {
|
||||||
this.classes = res.content.map(obj => {
|
this.classes = res.content.map(obj => {
|
||||||
|
|||||||
Reference in New Issue
Block a user