Browse Source

设备表去除

master
管理员 2 years ago
parent
commit
ca3784eb76
  1. BIN
      lms/nladmin-system/doc/sch2.xls
  2. 6
      lms/nladmin-system/src/main/java/org/nl/modules/security/rest/AuthorizationController.java
  3. 5
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/service/dto/MaterialbaseDto.java
  4. 7
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/dto/WorkorderDto.java
  5. 6
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java
  6. 4
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/MPS_PRODUCEDURE001.wql
  7. 5
      lms/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/PointServiceImpl.java
  8. 7
      lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/HnSendMaterialTask.java
  9. 10
      lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/wql/QSCH_hnSendMaterial_01.wql
  10. 4
      lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/QSCH_BASE_POINT.wql
  11. 4
      lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/SCH_Point_01.wql
  12. BIN
      lms/nladmin-system/src/main/java/org/nl/wms/wms.xls
  13. 15
      lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue
  14. 31
      lms/nladmin-ui/src/views/wms/pub/DeviceDialog.vue

BIN
lms/nladmin-system/doc/sch2.xls

Binary file not shown.

6
lms/nladmin-system/src/main/java/org/nl/modules/security/rest/AuthorizationController.java

@ -19,6 +19,7 @@ import cn.dev33.satoken.secure.SaSecureUtil;
import cn.dev33.satoken.stp.SaLoginModel; import cn.dev33.satoken.stp.SaLoginModel;
import cn.dev33.satoken.stp.StpUtil; import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.wf.captcha.base.Captcha; import com.wf.captcha.base.Captcha;
@ -160,7 +161,10 @@ public class AuthorizationController {
@ApiOperation("退出登录") @ApiOperation("退出登录")
@DeleteMapping(value = "/logout") @DeleteMapping(value = "/logout")
public ResponseEntity<Object> logout(HttpServletRequest request) { public ResponseEntity<Object> logout(HttpServletRequest request) {
onlineUserService.logout(StpUtil.getTokenValue()); String tokenValue = StpUtil.getTokenValue();
if (ObjectUtil.isNotEmpty(tokenValue)){
onlineUserService.logout(tokenValue);
}
StpUtil.logout(); StpUtil.logout();
return new ResponseEntity<>(HttpStatus.OK); return new ResponseEntity<>(HttpStatus.OK);
} }

5
lms/nladmin-system/src/main/java/org/nl/wms/basedata/service/dto/MaterialbaseDto.java

@ -26,11 +26,6 @@ public class MaterialbaseDto implements Serializable {
*/ */
private String material_code; private String material_code;
/**
* 产品编码
*/
private String product_code;
/** /**
* 物料名称 * 物料名称
*/ */

7
lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/dto/WorkorderDto.java

@ -46,9 +46,10 @@ public class WorkorderDto implements Serializable {
/** 实际生产结束时间 */ /** 实际生产结束时间 */
private String realproduceend_date; private String realproduceend_date;
/** 设备标识 */ /** 所属工序 */
private Long device_id; private String point_code;
/** 所属工序 */
private String point_name;
/** 所属工序 */ /** 所属工序 */
private String workorder_procedure; private String workorder_procedure;

6
lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java

@ -113,12 +113,6 @@ public class WorkorderServiceImpl implements WorkordeService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void create(WorkorderDto dto) { public void create(WorkorderDto dto) {
Long device_id = dto.getDevice_id();
if (ObjectUtil.isNotEmpty(device_id)) {
WQLObject deviceTab = WQLObject.getWQLObject("PDM_BI_Device");
JSONObject object = deviceTab.query("device_id = '" + device_id + "'").uniqueResult(0);
dto.setDevice_code(object.getString("device_code"));
}
Long currentUserId = SecurityUtils.getCurrentUserId(); Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName(); String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now(); String now = DateUtil.now();

4
lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/MPS_PRODUCEDURE001.wql

@ -60,12 +60,10 @@
material.material_spec, material.material_spec,
material.product_series, material.product_series,
classstandard.class_id, classstandard.class_id,
classstandard.class_name, classstandard.class_name
device.device_name
FROM FROM
PDM_BD_WORKORDER ShiftOrder PDM_BD_WORKORDER ShiftOrder
LEFT JOIN md_me_materialbase material ON material.material_id = ShiftOrder.material_id LEFT JOIN md_me_materialbase material ON material.material_id = ShiftOrder.material_id
LEFT JOIN pdm_bi_device device ON ShiftOrder.device_id = device.device_id
LEFT JOIN md_pb_classstandard classstandard ON classstandard.class_id = material.product_series LEFT JOIN md_pb_classstandard classstandard ON classstandard.class_id = material.product_series
WHERE WHERE
ShiftOrder.is_delete = '0' ShiftOrder.is_delete = '0'

5
lms/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/PointServiceImpl.java

@ -51,6 +51,7 @@ public class PointServiceImpl implements PointService {
map.put("point_status", whereJson.get("point_status")); map.put("point_status", whereJson.get("point_status"));
map.put("is_used", whereJson.get("is_used")); map.put("is_used", whereJson.get("is_used"));
map.put("point_type", whereJson.get("point_type")); map.put("point_type", whereJson.get("point_type"));
map.put("is_have_workder", whereJson.get("is_have_workder"));
map.put("name", whereJson.get("name")); map.put("name", whereJson.get("name"));
JSONObject json = WQL.getWO("QSCH_BASE_POINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point_code asc"); JSONObject json = WQL.getWO("QSCH_BASE_POINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point_code asc");
JSONArray content = json.getJSONArray("content"); JSONArray content = json.getJSONArray("content");
@ -64,7 +65,7 @@ public class PointServiceImpl implements PointService {
String point_status_explain = regionDto.getPoint_status_explain(); String point_status_explain = regionDto.getPoint_status_explain();
String point_type_explain = regionDto.getPoint_type_explain(); String point_type_explain = regionDto.getPoint_type_explain();
// 获取点位状态名称 // 获取点位状态名称
if (!ObjectUtil.isEmpty(point_status)) { /*if (!ObjectUtil.isEmpty(point_status)) {
JSONObject statusArr = new JSONObject(); JSONObject statusArr = new JSONObject();
String[] split = point_status_explain.split(","); String[] split = point_status_explain.split(",");
for ( int j = 0; j < split.length; j++) { for ( int j = 0; j < split.length; j++) {
@ -72,7 +73,7 @@ public class PointServiceImpl implements PointService {
statusArr.put(status[0], status[1]); statusArr.put(status[0], status[1]);
} }
object.put("point_status_name", statusArr.getString(point_status)); object.put("point_status_name", statusArr.getString(point_status));
} }*/
// 获取点位类型 // 获取点位类型
if (!ObjectUtil.isEmpty(point_type)) { if (!ObjectUtil.isEmpty(point_type)) {
JSONObject typeArr = new JSONObject(); JSONObject typeArr = new JSONObject();

7
lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/HnSendMaterialTask.java

@ -199,11 +199,8 @@ public class HnSendMaterialTask extends AbstractAcsTask {
//生产工单表【PDM_BD_WorkOrder】 //生产工单表【PDM_BD_WorkOrder】
WQLObject workOrderTab = WQLObject.getWQLObject("PDM_BD_WorkOrder"); WQLObject workOrderTab = WQLObject.getWQLObject("PDM_BD_WorkOrder");
//点位基础表【SCH_BASE_Point】 //判断混碾机是否存在生产中的工单
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point"); JSONObject workOrderObj = workOrderTab.query("point_code = '" + point_code1 + "' and order_status = '3' and is_delete ='0'").uniqueResult(0);
// 混碾机设备编码
String device_code = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0).getString("device_code");
JSONObject workOrderObj = workOrderTab.query("device_code = '" + device_code + "' and order_status = '3' and is_delete ='0'").uniqueResult(0);
if (ObjectUtil.isEmpty(workOrderObj)) throw new BadRequestException("该设备当前未生产或者已删除"); if (ObjectUtil.isEmpty(workOrderObj)) throw new BadRequestException("该设备当前未生产或者已删除");
SchTaskDto dto = SchTaskDto.builder() SchTaskDto dto = SchTaskDto.builder()

10
lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/wql/QSCH_hnSendMaterial_01.wql

@ -49,15 +49,10 @@
workorder.* workorder.*
FROM FROM
pdm_bd_workorder workorder pdm_bd_workorder workorder
LEFT JOIN pdm_bi_device device ON device.device_code = workorder.device_code
WHERE WHERE
workorder.order_status = '3' workorder.order_status = '3'
AND AND workorder.is_delete = '0'
workorder.is_delete = '0' AND workorder.workorder_procedure = '2'
AND
device.device_model = '4'
AND
workorder.is_delete = '0'
OPTION 输入.material_id <> "" OPTION 输入.material_id <> ""
workorder.material_id = 输入.material_id workorder.material_id = 输入.material_id
ENDOPTION ENDOPTION
@ -92,7 +87,6 @@
IF 输入.flag = "3" IF 输入.flag = "3"
QUERY QUERY
SELECT SELECT
p.point_id,
p.point_code, p.point_code,
p.point_name p.point_name
FROM FROM

4
lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/QSCH_BASE_POINT.wql

@ -20,6 +20,7 @@
输入.point_type TYPEAS s_string 输入.point_type TYPEAS s_string
输入.point_status TYPEAS s_string 输入.point_status TYPEAS s_string
输入.is_used TYPEAS s_string 输入.is_used TYPEAS s_string
输入.is_have_workder TYPEAS s_string
输入.ids TYPEAS f_string 输入.ids TYPEAS f_string
@ -61,6 +62,9 @@
OPTION 输入.region_id <> "" OPTION 输入.region_id <> ""
point.region_id = 输入.region_id point.region_id = 输入.region_id
ENDOPTION ENDOPTION
OPTION 输入.is_have_workder <> ""
point.is_have_workder = 输入.is_have_workder
ENDOPTION
OPTION 输入.ids <> "" OPTION 输入.ids <> ""
point.area_type in (输入.ids) point.area_type in (输入.ids)
ENDOPTION ENDOPTION

4
lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/SCH_Point_01.wql

@ -49,11 +49,9 @@
IF 输入.flag = "1" IF 输入.flag = "1"
PAGEQUERY PAGEQUERY
SELECT SELECT
a.*,b.device_name a.*
FROM FROM
sch_base_point a sch_base_point a
left join
pdm_base_device b on a.device_id = b.device_id
WHERE WHERE
a.is_delete = '0' a.is_delete = '0'
OPTION 输入.search <> "" OPTION 输入.search <> ""

BIN
lms/nladmin-system/src/main/java/org/nl/wms/wms.xls

Binary file not shown.

15
lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue

@ -208,11 +208,11 @@
</el-form-item> </el-form-item>
<el-form-item label="生产设备"> <el-form-item label="生产设备">
<el-input <el-input
v-model="form.device_code" v-model="form.point_code"
style="width: 200px;" style="width: 200px;"
clearable clearable
@focus="deviceShow=true" @focus="deviceShow=true"
@clear="form.device_id='', form.device_code=''" @clear="form.point_code='',form.point_name=''"
/> />
</el-form-item> </el-form-item>
<el-form-item label="计划开始时间" prop="planproducestart_date"> <el-form-item label="计划开始时间" prop="planproducestart_date">
@ -282,7 +282,8 @@
<el-table-column prop="plan_qty" label="计划数量" /> <el-table-column prop="plan_qty" label="计划数量" />
<el-table-column prop="real_qty" label="实际数量" /> <el-table-column prop="real_qty" label="实际数量" />
<el-table-column v-if="false" prop="material_id" label="物料标识" /> <el-table-column v-if="false" prop="material_id" label="物料标识" />
<el-table-column prop="device_name" label="设备" width="100" show-overflow-tooltip /> <el-table-column prop="point_code" label="设备编码" width="100" show-overflow-tooltip />
<el-table-column prop="point_name" label="设备名称" width="100" show-overflow-tooltip />
<el-table-column prop="material_code" label="物料编码" width="100" show-overflow-tooltip /> <el-table-column prop="material_code" label="物料编码" width="100" show-overflow-tooltip />
<el-table-column prop="material_name" label="物料名称" width="100" show-overflow-tooltip /> <el-table-column prop="material_name" label="物料名称" width="100" show-overflow-tooltip />
<el-table-column prop="material_spec" label="物料规格" width="100" show-overflow-tooltip /> <el-table-column prop="material_spec" label="物料规格" width="100" show-overflow-tooltip />
@ -368,8 +369,8 @@ const defaultForm = {
syscompanyid: null, syscompanyid: null,
is_delete: null, is_delete: null,
material_name: null, material_name: null,
device_id: null, point_code: null,
device_code: null, point_name: null,
is_canupdate_update: '1', is_canupdate_update: '1',
material_spec: null, material_spec: null,
sale_id: null, sale_id: null,
@ -491,8 +492,8 @@ export default {
this.form.material_spec = row.material_spec this.form.material_spec = row.material_spec
}, },
tableChanged(row) { tableChanged(row) {
this.form.device_id = row.device_id this.form.point_code = row.point_code
this.form.device_code = row.device_code this.form.point_name = row.point_name
}, },
// //
submits(row) { submits(row) {

31
lms/nladmin-ui/src/views/wms/pub/DeviceDialog.vue

@ -12,9 +12,9 @@
<el-col :span="22"> <el-col :span="22">
<el-form :inline="true" class="demo-form-inline"> <el-form :inline="true" class="demo-form-inline">
<el-form-item :inline="true" label="模糊搜索:"> <el-form-item :inline="true" label="模糊搜索:">
<el-input v-model="query.search" placeholder="请输入编码、名称" /> <el-input v-model="query.search" placeholder="请输入编码、名称"/>
</el-form-item> </el-form-item>
<rrOperation /> <rrOperation/>
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>
@ -32,21 +32,19 @@
@select-all="onSelectAll" @select-all="onSelectAll"
@current-change="clickChange" @current-change="clickChange"
> >
<el-table-column v-if="!isSingle" type="selection" width="55" /> <el-table-column v-if="!isSingle" type="selection" width="55"/>
<el-table-column v-if="isSingle" label="选择" width="55"> <el-table-column v-if="isSingle" label="选择" width="55">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio> <el-radio v-model="tableRadio" :label="scope.row"><i/></el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip /> <el-table-column prop="point_code" label="设备编码" show-overflow-tooltip/>
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip /> <el-table-column prop="point_name" label="设备名称" show-overflow-tooltip/>
<el-table-column prop="device_model" label="设备型号" show-overflow-tooltip /> <!-- <el-table-column prop="extend_code" label="外部编码" show-overflow-tooltip/>-->
<el-table-column prop="device_model" label="设备型号" show-overflow-tooltip />
<el-table-column prop="extend_code" label="外部编码" show-overflow-tooltip />
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
<pagination /> <pagination/>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button> <el-button type="primary" @click="submit"> </el-button>
@ -60,13 +58,20 @@
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 crudDevice from '@/api/wms/pdm/device' import crudPoint from '@/api/wms/sch/point'
export default { export default {
name: 'EndPointDialog', name: 'EndPointDialog',
components: { rrOperation, pagination }, components: { rrOperation, pagination },
cruds() { cruds() {
return CRUD({ title: '设备', url: 'api/device', crudMethod: { ...crudDevice }, optShow: {}}) return CRUD({
title: '点位', url: 'api/point', crudMethod: { ...crudPoint },
query: {
is_have_workder: '1'
},
optShow: {}
})
}, },
mixins: [presenter(), header()], mixins: [presenter(), header()],
props: { props: {
@ -168,7 +173,7 @@ export default {
margin-left: auto; margin-left: auto;
} }
.el-table_body tr.current-row>td { .el-table_body tr.current-row > td {
background-color: #e9e500; background-color: #e9e500;
} }
</style> </style>

Loading…
Cancel
Save