diff --git a/lms/nladmin-system/doc/sch2.xls b/lms/nladmin-system/doc/sch2.xls deleted file mode 100644 index 4085eed..0000000 Binary files a/lms/nladmin-system/doc/sch2.xls and /dev/null differ diff --git a/lms/nladmin-system/src/main/java/org/nl/modules/security/rest/AuthorizationController.java b/lms/nladmin-system/src/main/java/org/nl/modules/security/rest/AuthorizationController.java index 69a12ec..779fc1c 100644 --- a/lms/nladmin-system/src/main/java/org/nl/modules/security/rest/AuthorizationController.java +++ b/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.StpUtil; import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; import com.wf.captcha.base.Captcha; @@ -160,7 +161,10 @@ public class AuthorizationController { @ApiOperation("退出登录") @DeleteMapping(value = "/logout") public ResponseEntity logout(HttpServletRequest request) { - onlineUserService.logout(StpUtil.getTokenValue()); + String tokenValue = StpUtil.getTokenValue(); + if (ObjectUtil.isNotEmpty(tokenValue)){ + onlineUserService.logout(tokenValue); + } StpUtil.logout(); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/service/dto/MaterialbaseDto.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/service/dto/MaterialbaseDto.java index ebea3eb..4e2cd84 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/service/dto/MaterialbaseDto.java +++ b/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 product_code; - /** * 物料名称 */ diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/dto/WorkorderDto.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/dto/WorkorderDto.java index ab88c38..867232a 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/dto/WorkorderDto.java +++ b/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 Long device_id; - + /** 所属工序 */ + private String point_code; + /** 所属工序 */ + private String point_name; /** 所属工序 */ private String workorder_procedure; diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java index 8addcce..a0c2f2f 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java @@ -113,12 +113,6 @@ public class WorkorderServiceImpl implements WorkordeService { @Override @Transactional(rollbackFor = Exception.class) 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(); String nickName = SecurityUtils.getCurrentNickName(); String now = DateUtil.now(); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/MPS_PRODUCEDURE001.wql b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/MPS_PRODUCEDURE001.wql index 634533b..ba8370e 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/MPS_PRODUCEDURE001.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/wql/MPS_PRODUCEDURE001.wql @@ -60,12 +60,10 @@ material.material_spec, material.product_series, classstandard.class_id, - classstandard.class_name, - device.device_name + classstandard.class_name FROM PDM_BD_WORKORDER ShiftOrder 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 WHERE ShiftOrder.is_delete = '0' diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/PointServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/PointServiceImpl.java index 9979689..a3dd7f3 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/service/impl/PointServiceImpl.java +++ b/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("is_used", whereJson.get("is_used")); map.put("point_type", whereJson.get("point_type")); + map.put("is_have_workder", whereJson.get("is_have_workder")); map.put("name", whereJson.get("name")); JSONObject json = WQL.getWO("QSCH_BASE_POINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point_code asc"); JSONArray content = json.getJSONArray("content"); @@ -64,7 +65,7 @@ public class PointServiceImpl implements PointService { String point_status_explain = regionDto.getPoint_status_explain(); String point_type_explain = regionDto.getPoint_type_explain(); // 获取点位状态名称 - if (!ObjectUtil.isEmpty(point_status)) { + /*if (!ObjectUtil.isEmpty(point_status)) { JSONObject statusArr = new JSONObject(); String[] split = point_status_explain.split(","); for ( int j = 0; j < split.length; j++) { @@ -72,7 +73,7 @@ public class PointServiceImpl implements PointService { statusArr.put(status[0], status[1]); } object.put("point_status_name", statusArr.getString(point_status)); - } + }*/ // 获取点位类型 if (!ObjectUtil.isEmpty(point_type)) { JSONObject typeArr = new JSONObject(); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/HnSendMaterialTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/HnSendMaterialTask.java index a3575be..48649d9 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/HnSendMaterialTask.java +++ b/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】 WQLObject workOrderTab = WQLObject.getWQLObject("PDM_BD_WorkOrder"); - //点位基础表【SCH_BASE_Point】 - WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point"); - // 混碾机设备编码 - 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); + //判断混碾机是否存在生产中的工单 + JSONObject workOrderObj = workOrderTab.query("point_code = '" + point_code1 + "' and order_status = '3' and is_delete ='0'").uniqueResult(0); if (ObjectUtil.isEmpty(workOrderObj)) throw new BadRequestException("该设备当前未生产或者已删除"); SchTaskDto dto = SchTaskDto.builder() diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/wql/QSCH_hnSendMaterial_01.wql b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/wql/QSCH_hnSendMaterial_01.wql index 6eaab6f..c5ed9e8 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/wql/QSCH_hnSendMaterial_01.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/sendMaterial/wql/QSCH_hnSendMaterial_01.wql @@ -49,15 +49,10 @@ workorder.* FROM pdm_bd_workorder workorder - LEFT JOIN pdm_bi_device device ON device.device_code = workorder.device_code WHERE workorder.order_status = '3' - AND - workorder.is_delete = '0' - AND - device.device_model = '4' - AND - workorder.is_delete = '0' + AND workorder.is_delete = '0' + AND workorder.workorder_procedure = '2' OPTION 输入.material_id <> "" workorder.material_id = 输入.material_id ENDOPTION @@ -92,7 +87,6 @@ IF 输入.flag = "3" QUERY SELECT - p.point_id, p.point_code, p.point_name FROM diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/QSCH_BASE_POINT.wql b/lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/QSCH_BASE_POINT.wql index bdf9d1a..4c07f81 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/QSCH_BASE_POINT.wql +++ b/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_status TYPEAS s_string 输入.is_used TYPEAS s_string + 输入.is_have_workder TYPEAS s_string 输入.ids TYPEAS f_string @@ -61,6 +62,9 @@ OPTION 输入.region_id <> "" point.region_id = 输入.region_id ENDOPTION + OPTION 输入.is_have_workder <> "" + point.is_have_workder = 输入.is_have_workder + ENDOPTION OPTION 输入.ids <> "" point.area_type in (输入.ids) ENDOPTION diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/SCH_Point_01.wql b/lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/SCH_Point_01.wql index 7f179c7..7f6764a 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/SCH_Point_01.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/SCH_Point_01.wql @@ -49,11 +49,9 @@ IF 输入.flag = "1" PAGEQUERY SELECT - a.*,b.device_name + a.* FROM sch_base_point a - left join - pdm_base_device b on a.device_id = b.device_id WHERE a.is_delete = '0' OPTION 输入.search <> "" diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls b/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls index 0b414ae..1fb6073 100644 Binary files a/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls and b/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls differ diff --git a/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue b/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue index ccec58a..7165edc 100644 --- a/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue +++ b/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue @@ -208,11 +208,11 @@ @@ -282,7 +282,8 @@ - + + @@ -368,8 +369,8 @@ const defaultForm = { syscompanyid: null, is_delete: null, material_name: null, - device_id: null, - device_code: null, + point_code: null, + point_name: null, is_canupdate_update: '1', material_spec: null, sale_id: null, @@ -491,8 +492,8 @@ export default { this.form.material_spec = row.material_spec }, tableChanged(row) { - this.form.device_id = row.device_id - this.form.device_code = row.device_code + this.form.point_code = row.point_code + this.form.point_name = row.point_name }, // 下发 submits(row) { diff --git a/lms/nladmin-ui/src/views/wms/pub/DeviceDialog.vue b/lms/nladmin-ui/src/views/wms/pub/DeviceDialog.vue index 22b2363..645e334 100644 --- a/lms/nladmin-ui/src/views/wms/pub/DeviceDialog.vue +++ b/lms/nladmin-ui/src/views/wms/pub/DeviceDialog.vue @@ -12,9 +12,9 @@ - + - + @@ -32,21 +32,19 @@ @select-all="onSelectAll" @current-change="clickChange" > - + - - - - - + + + - + 取 消 确 定 @@ -60,13 +58,20 @@ import CRUD, { header, presenter } from '@crud/crud' import rrOperation from '@crud/RR.operation' import pagination from '@crud/Pagination' -import crudDevice from '@/api/wms/pdm/device' +import crudPoint from '@/api/wms/sch/point' export default { name: 'EndPointDialog', components: { rrOperation, pagination }, 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()], props: { @@ -168,7 +173,7 @@ export default { margin-left: auto; } -.el-table_body tr.current-row>td { +.el-table_body tr.current-row > td { background-color: #e9e500; }