Browse Source

rev:大屏操作面板

master
zhangzq 5 months ago
parent
commit
36455395aa
  1. 6
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/base/TableDataInfo.java
  2. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/JobRunner.java
  3. 8
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/controller/FabController.java
  4. 13
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/OrderMater.java
  5. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/impl/FabServiceImpl.java
  6. 2
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/SchBaseVehiclematerialgroup.java
  7. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java
  8. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.java
  9. 16
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml
  10. 5
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java
  11. 39
      lms/nladmin-system/nlsso-server/src/main/resources/config/application-dev.yml
  12. 8
      lms/nladmin-system/nlsso-server/src/main/resources/sqlDoc/sql0815.sql
  13. 8
      lms/nladmin-ui/src/views/wms/produceScreen/index.vue

6
lms/nladmin-system/nlsso-server/src/main/java/org/nl/common/base/TableDataInfo.java

@ -53,7 +53,7 @@ public class TableDataInfo<T> implements Serializable {
public static <T> TableDataInfo<T> build(IPage<T> page) {
TableDataInfo<T> rspData = new TableDataInfo<>();
rspData.setCode(HttpStatus.HTTP_OK);
rspData.setMsg("查询成功");
rspData.setMsg("操作成功");
rspData.setContent(page.getRecords());
rspData.setTotalElements(page.getTotal());
return rspData;
@ -62,7 +62,7 @@ public class TableDataInfo<T> implements Serializable {
public static <T> TableDataInfo<T> build(List<T> list) {
TableDataInfo<T> rspData = new TableDataInfo<>();
rspData.setCode(HttpStatus.HTTP_OK);
rspData.setMsg("查询成功");
rspData.setMsg("操作成功");
rspData.setContent(list);
rspData.setTotalElements(list.size());
return rspData;
@ -71,7 +71,7 @@ public class TableDataInfo<T> implements Serializable {
public static <T> TableDataInfo<T> build() {
TableDataInfo<T> rspData = new TableDataInfo<>();
rspData.setCode(HttpStatus.HTTP_OK);
rspData.setMsg("查询成功");
rspData.setMsg("操作成功");
return rspData;
}

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/JobRunner.java

@ -13,7 +13,7 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
//@Component
@RequiredArgsConstructor
@Order(100)
public class JobRunner implements ApplicationRunner {

8
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/controller/FabController.java

@ -78,8 +78,8 @@ public class FabController {
@Log("根据工序查询工单")
@GetMapping("/regionOrder")
public ResponseEntity<TableDataInfo<OrderMater>> regionOrder(String regionCode){
List<OrderMater> orderMaters = fabService.getOrderBycode(regionCode);
return new ResponseEntity(TableDataInfo.build(orderMaters), HttpStatus.OK);
List<OrderMater> structList = iSchBasePointService.getStructList(regionCode, null);
return new ResponseEntity(TableDataInfo.build(structList), HttpStatus.OK);
}
/**
@ -90,8 +90,8 @@ public class FabController {
*/
@Log("根据工单查询匹配库存")
@GetMapping("/getMaterListByOrder")
public ResponseEntity<TableDataInfo<List<PointMaterialInfo>>> getMaterListByOrder(String order,String regionCode){
List<PointMaterialInfo> structList = iSchBasePointService.getStructList(regionCode, null);
public ResponseEntity<TableDataInfo<List<OrderMater>>> getMaterListByOrder(String order,String regionCode){
List<OrderMater> structList = iSchBasePointService.getStructList(regionCode, null);
return new ResponseEntity(TableDataInfo.build(structList), HttpStatus.OK);
}

13
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/dto/OrderMater.java

@ -1,5 +1,8 @@
package org.nl.wms.ext.fab.service.dto;
import lombok.Data;
@Data
public class OrderMater {
/**
* 物料号
@ -9,6 +12,10 @@ public class OrderMater {
* 物料类型
*/
public String material_type;
/**
* 载具编码
*/
public String vehicle_code;
/**
* 订单号
*/
@ -17,6 +24,10 @@ public class OrderMater {
* 工序
*/
public String region_code;
/**
* 货位
*/
public String point_code;
/**
* 物料数量
*/
@ -24,7 +35,7 @@ public class OrderMater {
/**
* 交期时间
*/
public String dua_date;
public String due_date;
/**
* 客户编码
*/

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/fab/service/impl/FabServiceImpl.java

@ -64,7 +64,7 @@ public class FabServiceImpl {
switch (type){
case "cmt":
CallMaterVo callMaterVo = form.toJavaObject(CallMaterVo.class);
param.put("device_code",callMaterVo.getDevice_code());
param.put("device_code",callMaterVo.getPoint_code());
param.put("config_code","PcOperationCMTask");
param.put("vehicle_code",callMaterVo.getVehicle_code());
param.put("ext_data",callMaterVo);

2
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/group/service/dao/SchBaseVehiclematerialgroup.java

@ -89,7 +89,7 @@ public class SchBaseVehiclematerialgroup implements Serializable {
@ApiModelProperty(value = "是否已加工")
private Boolean has_work;
@ApiModelProperty(value = "交期时间")
private String dua_date;
private String due_date;
@ApiModelProperty(value = "车间编码")
private String workshop_code;

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.nl.common.domain.query.PageQuery;
import com.baomidou.mybatisplus.extension.service.IService;
import org.nl.wms.ext.fab.service.dto.OrderMater;
import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.point.service.dto.PointMaterialInfo;
import org.nl.wms.sch.task.service.dao.SchBaseTask;
@ -124,7 +125,7 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
* @param region_code
* @return
*/
List<PointMaterialInfo> getStructList(String region_code, String vehicle_type);
List<OrderMater> getStructList(String region_code, String vehicle_type);
/**

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.java

@ -2,6 +2,7 @@ package org.nl.wms.sch.point.service.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.nl.wms.ext.fab.service.dto.OrderMater;
import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.point.service.dto.PointMaterialInfo;
@ -22,7 +23,7 @@ public interface SchBasePointMapper extends BaseMapper<SchBasePoint> {
SchBasePoint selectByIdLock(String id);
List<PointMaterialInfo> getStructList(@Param("region_code") String region_code, @Param("vehicle_type")String vehicle_type);
List<OrderMater> getStructList(@Param("region_code") String region_code, @Param("vehicle_type")String vehicle_type);
List<String> selectByRegionCode(@Param("region_code") String region_code);

16
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/mapper/SchBasePointMapper.xml

@ -20,17 +20,16 @@
WHERE p.point_code = #{id}
FOR UPDATE
</select>
<select id="getStructList" resultType="org.nl.wms.sch.point.service.dto.PointMaterialInfo">
<select id="getStructList" resultType="org.nl.wms.ext.fab.service.dto.OrderMater">
SELECT
sch_base_point.point_code,
sch_base_point.point_name,
sch_base_point.is_lock,
sch_base_point.vehicle_code,
sch_base_vehiclematerialgroup.group_id,
sch_base_vehiclematerialgroup.material_id,
sch_base_vehiclematerialgroup.material_qty,
sch_base_vehiclematerialgroup.region_code,
sch_base_vehiclematerialgroup.workorder_code,
sch_base_vehiclematerialgroup.order_code,
sch_base_vehiclematerialgroup.due_date,
sch_base_vehiclematerialgroup.has_work
FROM
sch_base_point
inner JOIN sch_base_vehiclematerialgroup ON sch_base_point.vehicle_code = sch_base_vehiclematerialgroup.vehicle_code
@ -38,8 +37,11 @@
is_lock = FALSE
AND sch_base_point.vehicle_code IS NOT NULL
and sch_base_point.point_status = '2'
and sch_base_point.can_vehicle_type = #{vehicle_type}
AND sch_base_point.region_code = #{region_code}
<if test="vehicle_type != null and vehicle_type != ''">
and sch_base_point.can_vehicle_type = #{vehicle_type}
</if>
and has_work = false
AND sch_base_vehiclematerialgroup.region_code = #{region_code}
</select>
<select id="selectByRegionCode" resultType="java.lang.String">

5
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java

@ -26,6 +26,7 @@ import org.nl.common.utils.SecurityUtils;
import org.nl.system.service.notice.ISysNoticeService;
import org.nl.wms.database.vehicle.service.IMdBaseVehicleService;
import org.nl.wms.database.vehicle.service.dao.MdBaseVehicle;
import org.nl.wms.ext.fab.service.dto.OrderMater;
import org.nl.wms.sch.point.service.ISchBasePointService;
import org.nl.wms.sch.point.service.dao.SchBasePoint;
import org.nl.wms.sch.point.service.dao.mapper.SchBasePointMapper;
@ -461,8 +462,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
}
@Override
public List<PointMaterialInfo> getStructList(String region_code, String vehicle_type) {
List<PointMaterialInfo> structList = pointMapper.getStructList(region_code, vehicle_type);
public List<OrderMater> getStructList(String region_code, String vehicle_type) {
List<OrderMater> structList = pointMapper.getStructList(region_code, vehicle_type);
return structList;
}

39
lms/nladmin-system/nlsso-server/src/main/resources/config/application-dev.yml

@ -6,6 +6,25 @@ spring:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
dynamic:
druid:
filters:
DruidFilter,stat
initial-size: 5 #初始化时建立物理连接的个数
min-idle: 15 #最小连接池数量
maxActive: 30 #最大连接池数量
maxWait: 3000 #获取连接时最大等待时间,单位毫秒
#申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
test-while-idle: true
time-between-eviction-runs-millis: 300000 #既作为检测的间隔时间又作为test-while-idle执行的依据
min-evictable-idle-time-millis: 900000 #销毁线程时检测当前连接的最后活动时间和当前时间差大于该值时,关闭当前连接
#用来检测连接是否有效的sql
#mysql中为 select 'x'
#oracle中为 select 1 from dual
validation-query: SELECT 'x' FROM DUAL
test-on-borrow: true #申请连接时会执行validationQuery检测连接是否有效,开启会降低性能,默认为true
test-on-return: false #归还连接时会执行validationQuery检测连接是否有效,开启会降低性能,默认为true
pool-prepared-statements: true #是否缓存preparedStatement,mysql5.5+建议开启
max-pool-prepared-statement-per-connection-size: 20 #当值大于20时poolPreparedStatements会自动修改为true
primary: mysql
datasource:
mysql:
@ -20,25 +39,7 @@ spring:
# username: ${DB_USER:sa}
# password: ${DB_PWD:123}
# type: com.alibaba.druid.pool.DruidDataSource
druid:
filters:
DruidFilter,stat
initial-size: 5 #初始化时建立物理连接的个数
min-idle: 15 #最小连接池数量
maxActive: 30 #最大连接池数量
maxWait: 3000 #获取连接时最大等待时间,单位毫秒
#申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
test-while-idle: true
time-between-eviction-runs-millis: 300000 #既作为检测的间隔时间又作为test-while-idle执行的依据
min-evictable-idle-time-millis: 900000 #销毁线程时检测当前连接的最后活动时间和当前时间差大于该值时,关闭当前连接
#用来检测连接是否有效的sql
#mysql中为 select 'x'
#oracle中为 select 1 from dual
validation-query: SELECT 'x' FROM DUAL
test-on-borrow: true #申请连接时会执行validationQuery检测连接是否有效,开启会降低性能,默认为true
test-on-return: false #归还连接时会执行validationQuery检测连接是否有效,开启会降低性能,默认为true
pool-prepared-statements: true #是否缓存preparedStatement,mysql5.5+建议开启
max-pool-prepared-statement-per-connection-size: 20 #当值大于20时poolPreparedStatements会自动修改为true
redis:
#数据库索引
database: ${REDIS_DB:2}

8
lms/nladmin-system/nlsso-server/src/main/resources/sqlDoc/sql0815.sql

@ -1,3 +1,9 @@
ALTER TABLE sch_base_vehiclematerialgroup
ADD COLUMN `due_date` varchar(63) DEFAULT null COMMENT '交期';
ADD COLUMN `has_work` tinyint(1) DEFAULT 0 COMMENT '当前工序已加工判断防止重复生产';
ADD COLUMN `has_work` tinyint(1) DEFAULT 0 COMMENT '当前工序已加工判断防止重复生产';
-- 添加任务配置:pc操作
INSERT INTO `sch_base_taskconfig`(`config_id`, `config_code`, `config_name`, `route_plan_code`, `task_qf_type`, `acs_task_type`, `task_name`, `task_type`, `task_direction`, `priority`, `task_create_max_num`, `task_issue_max_num`, `is_auto_issue`, `start_region_str`, `next_region_str`, `start_point_pre`, `next_region_pre`, `is_check_workorder`, `is_check_start_lock`, `is_immediate_create`, `is_check_next_lock`, `is_start_auto`, `is_next_auto`, `is_lock_start`, `is_lock_next`, `request_param`, `response_param`, `is_group_congrol_issue_seq`, `unfinish_notify_time`, `sql_param`, `workshop_code`, `remark`, `is_used`, `is_delete`, `create_id`, `create_name`, `create_time`, `update_id`, `update_name`, `update_time`) VALUES ('1821425240866164741', 'PcOperationCNTask', 'pc呼叫空托', NULL, '1', '1', 'pc呼叫空托', '1', '2', '1', 1, 1, 1, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 1, 1, 0, 1, NULL, NULL, 0, 0, NULL, 'A1', NULL, 1, 0, '1', '管理员', '2024-08-08 13:56:32', '1', '管理员', '2024-08-08 17:17:54');
INSERT INTO `sch_base_taskconfig`(`config_id`, `config_code`, `config_name`, `route_plan_code`, `task_qf_type`, `acs_task_type`, `task_name`, `task_type`, `task_direction`, `priority`, `task_create_max_num`, `task_issue_max_num`, `is_auto_issue`, `start_region_str`, `next_region_str`, `start_point_pre`, `next_region_pre`, `is_check_workorder`, `is_check_start_lock`, `is_immediate_create`, `is_check_next_lock`, `is_start_auto`, `is_next_auto`, `is_lock_start`, `is_lock_next`, `request_param`, `response_param`, `is_group_congrol_issue_seq`, `unfinish_notify_time`, `sql_param`, `workshop_code`, `remark`, `is_used`, `is_delete`, `create_id`, `create_name`, `create_time`, `update_id`, `update_name`, `update_time`) VALUES ('1821425465571807242', 'PcOperationCMTask', 'pc呼叫满托', NULL, '1', '1', 'pc呼叫满托', '1', '2', '1', 1, 1, 1, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 1, 1, 1, 1, NULL, NULL, 0, 0, NULL, 'A1', NULL, 1, 0, '1', '管理员', '2024-08-08 13:57:26', '1', '管理员', '2024-08-09 08:58:16');
INSERT INTO `sch_base_taskconfig`(`config_id`, `config_code`, `config_name`, `route_plan_code`, `task_qf_type`, `acs_task_type`, `task_name`, `task_type`, `task_direction`, `priority`, `task_create_max_num`, `task_issue_max_num`, `is_auto_issue`, `start_region_str`, `next_region_str`, `start_point_pre`, `next_region_pre`, `is_check_workorder`, `is_check_start_lock`, `is_immediate_create`, `is_check_next_lock`, `is_start_auto`, `is_next_auto`, `is_lock_start`, `is_lock_next`, `request_param`, `response_param`, `is_group_congrol_issue_seq`, `unfinish_notify_time`, `sql_param`, `workshop_code`, `remark`, `is_used`, `is_delete`, `create_id`, `create_name`, `create_time`, `update_id`, `update_name`, `update_time`) VALUES ('1821425816614080543', 'PcOperationSNTTask', 'pc送空托盘', NULL, '2', '1', 'pc送空托盘', '1', '1', '1', 1, 1, 1, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 1, 0, 0, 0, NULL, NULL, 0, 0, NULL, 'A1', NULL, 1, 0, '1', '管理员', '2024-08-08 13:58:49', '1', '管理员', '2024-08-08 16:17:58');
INSERT INTO `sch_base_taskconfig`(`config_id`, `config_code`, `config_name`, `route_plan_code`, `task_qf_type`, `acs_task_type`, `task_name`, `task_type`, `task_direction`, `priority`, `task_create_max_num`, `task_issue_max_num`, `is_auto_issue`, `start_region_str`, `next_region_str`, `start_point_pre`, `next_region_pre`, `is_check_workorder`, `is_check_start_lock`, `is_immediate_create`, `is_check_next_lock`, `is_start_auto`, `is_next_auto`, `is_lock_start`, `is_lock_next`, `request_param`, `response_param`, `is_group_congrol_issue_seq`, `unfinish_notify_time`, `sql_param`, `workshop_code`, `remark`, `is_used`, `is_delete`, `create_id`, `create_name`, `create_time`, `update_id`, `update_name`, `update_time`) VALUES ('1821426120634011644', 'PcOperationSMTTask', 'pc送满下料', NULL, '2', '1', 'pc送满下料', '1', '1', '1', 3, 3, 1, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 1, 1, 0, 0, NULL, NULL, 0, 0, NULL, 'A1', NULL, 1, 0, '1', '管理员', '2024-08-08 14:00:02', '1', '管理员', '2024-08-08 15:31:51');

8
lms/nladmin-ui/src/views/wms/produceScreen/index.vue

@ -91,12 +91,12 @@
@current-change="handleCurrentChange1"
>
<el-table-column
prop="value"
prop="label"
label="设备号"
/>
<el-table-column
prop="label"
label="设备名称"
prop="value"
label="设备工序"
/>
</el-table>
</div>
@ -140,7 +140,7 @@
label="物料数量"
/>
<el-table-column
prop="plan_date"
prop="due_date"
label="交期时间"
/>
<el-table-column

Loading…
Cancel
Save