add:工单看板

This commit is contained in:
zhangzq
2024-02-26 15:12:52 +08:00
parent a77500f2d8
commit b3ba7056e1
12 changed files with 132 additions and 9 deletions

View File

@@ -141,7 +141,9 @@ public class WQLCore {
//开始加载系统默认wql根目录
System.out.println("开始水煎"+System.currentTimeMillis());
isSuccess = loadWQL(WQLCore.ROOT);
System.out.println("jieshu水煎"+System.currentTimeMillis());
return isSuccess;

View File

@@ -173,7 +173,6 @@ public class WqlUtil{
str = str.substring(str.indexOf(beginStr) + 1, str.indexOf(endStr));
}
catch(Exception arg3) {
arg3.printStackTrace();
}
return str;
}

View File

@@ -5,9 +5,12 @@ import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.nl.modules.wql.core.bean.ResultBean;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil;
@@ -16,10 +19,19 @@ import org.nl.wms.ext_manage.bigScreen.service.BigScreenService;
import org.nl.wms.ext_manage.bigScreen.service.dto.*;
import org.nl.wms.product_manage.service.device.IPdmBiDeviceService;
import org.nl.wms.product_manage.service.device.dao.PdmBiDevice;
import org.nl.wms.product_manage.service.workorder.IPdmProduceWorkorderService;
import org.nl.wms.product_manage.service.workprocedure.IPdmBiWorkprocedureService;
import org.nl.wms.system_manage.service.dict.ISysDictService;
import org.nl.wms.system_manage.service.dict.dao.Dict;
import org.nl.wms.system_manage.service.param.ISysParamService;
import org.nl.wms.system_manage.service.param.dao.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
@@ -27,6 +39,15 @@ import java.util.*;
@RequiredArgsConstructor
@Slf4j
public class BigScreenServiceImpl implements BigScreenService, ApplicationAutoInitial {
@Autowired
private IPdmBiWorkprocedureService workprocedureService;
@Autowired
private final IPdmProduceWorkorderService workorderService;
@Autowired
private ISysDictService dictService;
@Autowired
private IPdmBiDeviceService deviceService;
List<TodayandplannumDto> todayandplannumDtos = new ArrayList<>();
YearinoutDto yearinoutDtos = new YearinoutDto();
List<SupplyDto> supplyDtos = new ArrayList<>();
@@ -90,10 +111,49 @@ public class BigScreenServiceImpl implements BigScreenService, ApplicationAutoIn
return returnjo;
}
public static void main(String[] args) {
String str = "{\"code\":\"1\",\"desc\":\"查询成功\",\"result\":{\"screenname\":\"车间下料看板\",\"arr1\":[{\"workprocedure_name\":\"盘管双斜口下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"5\",\"device_num\":\"5\"},{\"workprocedure_name\":\"直管双斜口下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"1\",\"device_num\":\"1\"},{\"workprocedure_name\":\"盘管无屑下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"1\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"3\",\"device_num\":\"4\"},{\"workprocedure_name\":\"直管无屑下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"1\",\"device_num\":\"1\"}],\"arr2\":[{\"produceschedule_date\":\"2021-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"推弯一体机加工\",\"sysdic_name\":\"弯头工段\",\"worksection_type_scode\":\"01\",\"finishproduce_qty\":\"0\",\"produce_qty\":\"4200\",\"waiting_qty\":\"4200\",\"progress_qty\":\"0\"},{\"produceschedule_date\":\"2020-09-16\",\"produceorder_code\":\"0916014\",\"workprocedure_name\":\"盘管无屑下料\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"3500\",\"produce_qty\":\"3500\",\"waiting_qty\":\"0\",\"progress_qty\":\"100\"},{\"produceschedule_date\":\"2020-12-31\",\"produceorder_code\":\"1231013\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"790\",\"produce_qty\":\"3500\",\"waiting_qty\":\"2710\",\"progress_qty\":\"23\"},{\"produceschedule_date\":\"2020-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"4225\",\"produce_qty\":\"6000\",\"waiting_qty\":\"1775\",\"progress_qty\":\"70\"}],\"jo3\":{\"sumproduce_qty\":\"0\",\"sumfinishproduce_qty\":\"0\",\"sumproducing_qty\":\"0\",\"sumweek_qty\":\"0\"},\"arr4\":[{\"device_name\":\"L28\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:30\"},{\"device_name\":\"1-L22\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:24\"},{\"device_name\":\"L22-2\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:21\"},{\"device_name\":\"L22-1\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:20\"}],\"arr5\":[[\"product\",\"昨日\",\"今日\"],[\"盘管双斜口\",\"2\",\"2\"],[\"直管双斜口\",\"1\",\"1\"],[\"盘管无屑\",\"1\",\"1\"],[\"直管无屑\",\"0\",\"0\"]],\"jo6\":{\"sumproduce_orderqty\":\"\",\"sumfinishproduce_orderqty\":\"\",\"sumproducing_orderqty\":\"\"},\"arr7\":[{\"count\":\"0\",\"date\":\"07-10\"},{\"count\":\"0\",\"date\":\"07-11\"},{\"count\":\"0\",\"date\":\"07-12\"},{\"count\":\"0\",\"date\":\"07-13\"},{\"count\":\"0\",\"date\":\"07-14\"},{\"count\":\"0\",\"date\":\"07-15\"},{\"count\":\"0\",\"date\":\"07-16\"}]}}";
JSONObject jsonObject = JSONObject.parseObject(str);
String cdeo = jsonObject.getString("cdeo");
}
@Override
public JSONObject workScreen(JSONObject param) {
String web_flag = param.getString("web_flag");
String str = "";
/**
* 1。配置web_flag对应工序id
* 2.数据库查看当前工序设备,
* 3.查询设备对应工单信息
* 4.查询设备故障记录表
* 5.统计周工单
*/
if (StringUtils.isNotEmpty(param.getString("web_flag"))){
Dict one = dictService.getOne(new UpdateWrapper<Dict>()
.eq("code", "WEB_FLAG")
.eq("label", param.getString("web_flag")));
String screenname = one.getName();
List<String> ids = new ArrayList<>();
if (StringUtils.isNotEmpty(one.getPara1())){
ids.add(one.getPara1());
}
if (StringUtils.isNotEmpty(one.getPara2())){
ids.add(one.getPara2());
}
if (StringUtils.isNotEmpty(one.getPara3())){
ids.add(one.getPara3());
}
//查询所有工序设备列表: private Boolean is_delete;
//
// /**
// * 是否在用
// */
// private Boolean is_used;
List<PdmBiDevice> list = deviceService.list(new QueryWrapper<PdmBiDevice>()
.in("workprocedure_id", ids)
.eq("is_delete", false));
}
String str = null;
String web_flag="1";
//1车间下料看板
if ("1".equals(web_flag)) {
str = "{\"code\":\"1\",\"desc\":\"查询成功\",\"result\":{\"screenname\":\"车间下料看板\",\"arr1\":[{\"workprocedure_name\":\"盘管双斜口下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"5\",\"device_num\":\"5\"},{\"workprocedure_name\":\"直管双斜口下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"1\",\"device_num\":\"1\"},{\"workprocedure_name\":\"盘管无屑下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"1\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"3\",\"device_num\":\"4\"},{\"workprocedure_name\":\"直管无屑下料\",\"device_runningnum\":\"0\",\"device_errornum\":\"0\",\"device_waitingnum\":\"0\",\"shutdownnum\":\"1\",\"device_num\":\"1\"}],\"arr2\":[{\"produceschedule_date\":\"2021-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"推弯一体机加工\",\"sysdic_name\":\"弯头工段\",\"worksection_type_scode\":\"01\",\"finishproduce_qty\":\"0\",\"produce_qty\":\"4200\",\"waiting_qty\":\"4200\",\"progress_qty\":\"0\"},{\"produceschedule_date\":\"2020-09-16\",\"produceorder_code\":\"0916014\",\"workprocedure_name\":\"盘管无屑下料\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"3500\",\"produce_qty\":\"3500\",\"waiting_qty\":\"0\",\"progress_qty\":\"100\"},{\"produceschedule_date\":\"2020-12-31\",\"produceorder_code\":\"1231013\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"790\",\"produce_qty\":\"3500\",\"waiting_qty\":\"2710\",\"progress_qty\":\"23\"},{\"produceschedule_date\":\"2020-05-06\",\"produceorder_code\":\"0506009\",\"workprocedure_name\":\"三通拉伸\",\"sysdic_name\":\"综合工段\",\"worksection_type_scode\":\"02\",\"finishproduce_qty\":\"4225\",\"produce_qty\":\"6000\",\"waiting_qty\":\"1775\",\"progress_qty\":\"70\"}],\"jo3\":{\"sumproduce_qty\":\"0\",\"sumfinishproduce_qty\":\"0\",\"sumproducing_qty\":\"0\",\"sumweek_qty\":\"0\"},\"arr4\":[{\"device_name\":\"L28\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:30\"},{\"device_name\":\"1-L22\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:24\"},{\"device_name\":\"L22-2\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:21\"},{\"device_name\":\"L22-1\",\"devicestatus_name\":\"急停报警\",\"update_date\":\" 00:00:20\"}],\"arr5\":[[\"product\",\"昨日\",\"今日\"],[\"盘管双斜口\",\"2\",\"2\"],[\"直管双斜口\",\"1\",\"1\"],[\"盘管无屑\",\"1\",\"1\"],[\"直管无屑\",\"0\",\"0\"]],\"jo6\":{\"sumproduce_orderqty\":\"\",\"sumfinishproduce_orderqty\":\"\",\"sumproducing_orderqty\":\"\"},\"arr7\":[{\"count\":\"0\",\"date\":\"07-10\"},{\"count\":\"0\",\"date\":\"07-11\"},{\"count\":\"0\",\"date\":\"07-12\"},{\"count\":\"0\",\"date\":\"07-13\"},{\"count\":\"0\",\"date\":\"07-14\"},{\"count\":\"0\",\"date\":\"07-15\"},{\"count\":\"0\",\"date\":\"07-16\"}]}}";

View File

@@ -0,0 +1,38 @@
package org.nl.wms.pda_manage.pda.controller.a3wash;
import cn.dev33.satoken.annotation.SaIgnore;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.TableDataInfo;
import org.nl.common.anno.Log;
import org.nl.wms.staging_manage.service.conveyor.dao.SchConveyorPosition;
import org.nl.wms.storage_manage.semimanage.service.structIvt.dao.StIvtStructivtBcp;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/*
* @author ZZQ
* @Date 2024/2/26 10:20
*/
@RestController
@RequestMapping("/api/pda/cacheconveyoor")
@Slf4j
@SaIgnore
public class CacheConveyorContorller {
/**
* 半成品数据库:/api/bcp/hr/bypda
* @param param
* @return
*/
@PostMapping("/call")
@Log("缓存线叫料")
public ResponseEntity<Object> conveyor(@RequestBody StIvtStructivtBcp param,@RequestParam("target") String target){
StIvtStructivtBcp bcp = new StIvtStructivtBcp();
return new ResponseEntity<>(HttpStatus.OK);
}
}

View File

@@ -56,6 +56,8 @@ public class ZdWashController {
@Autowired
private IMdPbStoragevehicleextService storagevehicleextService;
@PostMapping("/conveyor")
@Log("查询输送线")
public ResponseEntity<Object> conveyor(@RequestBody JSONObject param){

View File

@@ -35,5 +35,12 @@ public interface IPdmBiDeviceService extends IService<PdmBiDevice> {
*/
PdmBiDevice getDeviceByPointCode(String PointCode);
/**
* 查询维修中的设备
* @param param设备列表device_code
* @return
*/
List<Map> repairList(Map param);
}

View File

@@ -23,5 +23,7 @@ public interface PdmBiDeviceMapper extends BaseMapper<PdmBiDevice> {
List<Map> workproceduceDevicesWeight(Map<String,Object> query);
List<Map> repairList(Map query);
PdmBiDevice getDeviceByPoint(String pointCode);
}

View File

@@ -71,4 +71,12 @@
left join sch_base_point on sch_base_point.device_code = pdm_bi_device.device_code
where sch_base_point.point_code = #{pointCode}
</select>
<select id="repairList" resultType="java.util.Map">
select ef.device_code from EM_BI_DeviceRepairMst rp
left join em_bi_equipmentfile ef on rp.devicerecord_id=ef.devicerecord_id
where 99 > rp.invstatus
<if test="device_code != null and device_code != ''">
and ef.device_code in #{device_code}
</if>
</select>
</mapper>

View File

@@ -52,4 +52,9 @@ public class PdmBiDeviceServiceImpl extends ServiceImpl<PdmBiDeviceMapper, PdmBi
public PdmBiDevice getDeviceByPointCode(String PointCode) {
return this.baseMapper.getDeviceByPoint(PointCode);
}
@Override
public List<Map> repairList(Map param) {
return this.baseMapper.repairList(param);
}
}

View File

@@ -7,9 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import java.io.Serializable;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.*;
/**
* <p>
@@ -22,6 +20,8 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("st_ivt_structivt_bcp")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class StIvtStructivtBcp implements Serializable {

View File

@@ -31,7 +31,7 @@ import java.util.Map;
* @since 2023-05-10
*/
@RestController
@RequestMapping("/api/bcp/hr")
@RequestMapping("cc")
public class StIvtStructivtHrBcpController {
@Autowired

View File

@@ -79,7 +79,7 @@
<springProfile name="dev3">
<root level="info">
<root level="debug">
<!-- <appender-ref ref="asyncLuceneAppender"/>-->
<appender-ref ref="CONSOLE"/>
</root>