| | |
| | | import com.mes.md.mapper.MachineMapper; |
| | | import com.mes.md.mapper.TaskingMapper; |
| | | import com.mes.md.service.ProjectService; |
| | | import com.mes.md.service.TaskingLogService; |
| | | import com.mes.md.service.TaskingService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | private MachineMapper machineMapper; |
| | | @Autowired |
| | | private TaskingMapper taskingMapper; |
| | | |
| | | @Autowired |
| | | private TaskingLogService taskingLogService; |
| | | @Autowired |
| | | private KBBTLensSortingMapper kBBTLensSortingMapper; |
| | | |
| | |
| | | .eq(Tasking::getGlassState,"正常") |
| | | .eq(Tasking::getState,"线上") |
| | | .ne(Tasking::getWorkState,"完工")); |
| | | taskingLogService.reportTaskingLog(); |
| | | return Result.build(200,"成功",deleteCount); |
| | | }catch (Exception e){ |
| | | return Result.build(199,"异常",machine); |
New file |
| | |
| | | package com.mes.md.controller; |
| | | |
| | | |
| | | import com.mes.md.service.TaskingLogService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/taskingLog") |
| | | public class TaskingLogController { |
| | | |
| | | @Autowired |
| | | TaskingLogService taskingLogService; |
| | | |
| | | @ApiOperation("提交日志以及报工数据到九牧数据库") |
| | | @PostMapping("/reportTaskingLog") |
| | | @ResponseBody |
| | | public Result reportTaskingLog(@RequestBody Map<String, String> map) { |
| | | try { |
| | | taskingLogService.reportTaskingLog(); |
| | | return Result.build(200,"提交成功",map); |
| | | }catch (Exception e) { |
| | | return Result.build(199,"提交异常",map); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("提交 设备联机记录到九牧数据库") |
| | | @PostMapping("/reportOnLine") |
| | | @ResponseBody |
| | | public Result reportOnLine(@RequestBody Map<String, String> map) { |
| | | try { |
| | | taskingLogService.reportTaskingLog(); |
| | | return Result.build(200,"提交成功",map); |
| | | }catch (Exception e) { |
| | | return Result.build(199,"提交异常",map); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("提交 设备开机记录到九牧数据库") |
| | | @PostMapping("/reportPowerOn") |
| | | @ResponseBody |
| | | public Result reportPowerOn(@RequestBody Map<String, String> map) { |
| | | try { |
| | | taskingLogService.reportTaskingLog(); |
| | | return Result.build(200,"提交成功",map); |
| | | }catch (Exception e) { |
| | | return Result.build(199,"提交异常",map); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.md.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 客户库位表 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName(value = "KBB_T_LensSorting") |
| | | public class KBBTLensSorting implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 原始任务表主键(客户提供样本) |
| | | */ |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 扫码ID |
| | | */ |
| | | @TableField(value="Barcode") |
| | | private String Barcode; |
| | | |
| | | /** |
| | | * 特性 |
| | | */ |
| | | @TableField(value="ProductionOrder") |
| | | private String ProductionOrder; |
| | | |
| | | /** |
| | | * ProductionName |
| | | */ |
| | | @TableField(value="ProductionName") |
| | | private String ProductionName; |
| | | |
| | | /** |
| | | * 库位 |
| | | */ |
| | | @TableField(value="Warehouse") |
| | | private String Warehouse; |
| | | |
| | | |
| | | // /** |
| | | // * isSelect |
| | | // */ |
| | | // @TableField(value="isSelect") |
| | | // private String isSelect; |
| | | // |
| | | // /** |
| | | // * PlanID |
| | | // */ |
| | | // @TableField(value="PlanID") |
| | | // private String PlanId; |
| | | // |
| | | // /** |
| | | // * olnID |
| | | // */ |
| | | // @TableField(value="olnID") |
| | | // private String olnId; |
| | | // |
| | | // /** |
| | | // * BomID |
| | | // */ |
| | | // @TableField(value="BomID") |
| | | // private String BomId; |
| | | // |
| | | // /** |
| | | // * SalesOrder |
| | | // */ |
| | | // @TableField(value="SalesOrder") |
| | | // private String SalesOrder; |
| | | // |
| | | // |
| | | // |
| | | // /** |
| | | // * ParentProductionOrder |
| | | // */ |
| | | // @TableField(value="ParentProductionOrder") |
| | | // private String ParentProductionOrder; |
| | | // |
| | | // /** |
| | | // * Order2020 |
| | | // */ |
| | | // @TableField(value="Order2020") |
| | | // private String Order2020; |
| | | // |
| | | // /** |
| | | // * SeparateNo |
| | | // */ |
| | | // @TableField(value="SeparateNo") |
| | | // private String SeparateNo; |
| | | // |
| | | // /** |
| | | // * SAPLineNo |
| | | // */ |
| | | // @TableField(value="SAPLineNo") |
| | | // private String SaplineNo; |
| | | // |
| | | // /** |
| | | // * Qty |
| | | // */ |
| | | // @TableField(value="Qty") |
| | | // private String Qty; |
| | | // |
| | | // /** |
| | | // * PlanQty |
| | | // */ |
| | | // @TableField(value="PlanQty") |
| | | // private String PlanQty; |
| | | // |
| | | // /** |
| | | // * BOMQty |
| | | // */ |
| | | // @TableField(value="BOMQty") |
| | | // private String Bomqty; |
| | | // |
| | | // /** |
| | | // * ApsStatus |
| | | // */ |
| | | // @TableField(value="ApsStatus") |
| | | // private String ApsStatus; |
| | | // |
| | | // /** |
| | | // * Status |
| | | // */ |
| | | // @TableField(value="Status") |
| | | // private String Status; |
| | | // |
| | | // /** |
| | | // * PlateName |
| | | // */ |
| | | // @TableField(value="PlateName") |
| | | // private String PlateName; |
| | | // |
| | | // |
| | | // |
| | | // /** |
| | | // * ItemNo |
| | | // */ |
| | | // @TableField(value="ItemNo") |
| | | // private String ItemNo; |
| | | // |
| | | // /** |
| | | // * ItemDesp |
| | | // */ |
| | | // @TableField(value="ItemDesp") |
| | | // private String ItemDesp; |
| | | // |
| | | // /** |
| | | // * Material |
| | | // */ |
| | | // @TableField(value="Material") |
| | | // private String Material; |
| | | // |
| | | // /** |
| | | // * Material_Description |
| | | // */ |
| | | // @TableField(value="Material_Description") |
| | | // private String MaterialDescription; |
| | | // |
| | | // /** |
| | | // * itmNumber |
| | | // */ |
| | | // @TableField(value="itmNumber") |
| | | // private String itmNumber; |
| | | // |
| | | // /** |
| | | // * PaintColorName |
| | | // */ |
| | | // @TableField(value="PaintColorName") |
| | | // private String PaintColorName; |
| | | // |
| | | // /** |
| | | // * PlateTypeName |
| | | // */ |
| | | // @TableField(value="PlateTypeName") |
| | | // private String PlateTypeName; |
| | | // |
| | | // /** |
| | | // * HandoverStatus |
| | | // */ |
| | | // @TableField(value="HandoverStatus") |
| | | // private String HandoverStatus; |
| | | // |
| | | // /** |
| | | // * CurrentProcessName |
| | | // */ |
| | | // @TableField(value="CurrentProcessName") |
| | | // private String CurrentProcessName; |
| | | // |
| | | // /** |
| | | // * YQSeparateNo |
| | | // */ |
| | | // @TableField(value="YQSeparateNo") |
| | | // private String YqseparateNo; |
| | | // |
| | | // /** |
| | | // * MQSeparateNo |
| | | // */ |
| | | // @TableField(value="MQSeparateNo") |
| | | // private String MqseparateNo; |
| | | // |
| | | // /** |
| | | // * Batch |
| | | // */ |
| | | // @TableField(value="Batch") |
| | | // private String Batch; |
| | | // |
| | | // /** |
| | | // * JPAttrbute |
| | | // */ |
| | | // @TableField(value="JPAttrbute") |
| | | // private String Jpattrbute; |
| | | // |
| | | // /** |
| | | // * ZongZhuangDate |
| | | // */ |
| | | // @TableField(value="ZongZhuangDate") |
| | | // private String ZongZhuangDate; |
| | | // |
| | | // /** |
| | | // * PlanStartDate |
| | | // */ |
| | | // @TableField(value="PlanStartDate") |
| | | // private String PlanStartDate; |
| | | // |
| | | // /** |
| | | // * PlanEndDate |
| | | // */ |
| | | // @TableField(value="PlanEndDate") |
| | | // private String PlanEndDate; |
| | | // |
| | | // /** |
| | | // * OrderTypeDesc |
| | | // */ |
| | | // @TableField(value="OrderTypeDesc") |
| | | // private String OrderTypeDesc; |
| | | // |
| | | // /** |
| | | // * OrderType |
| | | // */ |
| | | // @TableField(value="OrderType") |
| | | // private String OrderType; |
| | | // |
| | | // /** |
| | | // * PlanISMQ |
| | | // */ |
| | | // @TableField(value="PlanISMQ") |
| | | // private String PlanIsmq; |
| | | // |
| | | // /** |
| | | // * FactoryName |
| | | // */ |
| | | // @TableField(value="FactoryName") |
| | | // private String FactoryName; |
| | | // |
| | | // /** |
| | | // * WangongC |
| | | // */ |
| | | // @TableField(value="WangongC") |
| | | // private String WangongC; |
| | | // |
| | | // /** |
| | | // * WangongK |
| | | // */ |
| | | // @TableField(value="WangongK") |
| | | // private String WangongK; |
| | | // |
| | | // /** |
| | | // * WangongH |
| | | // */ |
| | | // @TableField(value="WangongH") |
| | | // private String WangongH; |
| | | // |
| | | // /** |
| | | // * KaiLiaoC |
| | | // */ |
| | | // @TableField(value="KaiLiaoC") |
| | | // private String KaiLiaoC; |
| | | // |
| | | // /** |
| | | // * KaiLiaoK |
| | | // */ |
| | | // @TableField(value="KaiLiaoK") |
| | | // private String KaiLiaoK; |
| | | // |
| | | // /** |
| | | // * KaiLiaoH |
| | | // */ |
| | | // @TableField(value="KaiLiaoH") |
| | | // private String KaiLiaoH; |
| | | // |
| | | // /** |
| | | // * BLCC |
| | | // */ |
| | | // @TableField(value="BLCC") |
| | | // private String Blcc; |
| | | // |
| | | // /** |
| | | // * JLCC |
| | | // */ |
| | | // @TableField(value="JLCC") |
| | | // private String Jlcc; |
| | | // |
| | | |
| | | // |
| | | // /** |
| | | // * JiaGong |
| | | // */ |
| | | // @TableField(value="JiaGong") |
| | | // private String JiaGong; |
| | | // |
| | | // /** |
| | | // * ChengXing |
| | | // */ |
| | | // @TableField(value="ChengXing") |
| | | // private String ChengXing; |
| | | // |
| | | // /** |
| | | // * TuZhuang2Date |
| | | // */ |
| | | // @TableField(value="TuZhuang2Date") |
| | | // private String TuZhuang2Date; |
| | | // |
| | | // /** |
| | | // * JiJiaDate |
| | | // */ |
| | | // @TableField(value="JiJiaDate") |
| | | // private String JiJiaDate; |
| | | // |
| | | // /** |
| | | // * CreateDate |
| | | // */ |
| | | // @TableField(value="CreateDate") |
| | | // private String CreateDate; |
| | | // |
| | | // |
| | | // |
| | | // /** |
| | | // * ScanStatus |
| | | // */ |
| | | // @TableField(value="ScanStatus") |
| | | // private String ScanStatus; |
| | | // |
| | | // /** |
| | | // * UpdateDate |
| | | // */ |
| | | // @TableField(value="UpdateDate") |
| | | // private String UpdateDate; |
| | | // |
| | | // /** |
| | | // * PlanQtySum |
| | | // */ |
| | | // @TableField(value="PlanQtySum") |
| | | // private String PlanQtySum; |
| | | // |
| | | // /** |
| | | // * SeparateNoSum |
| | | // */ |
| | | // @TableField(value="SeparateNoSum") |
| | | // private String SeparateNoSum; |
| | | // |
| | | // /** |
| | | // * OrderSum |
| | | // */ |
| | | // @TableField(value="OrderSum") |
| | | // private String OrderSum; |
| | | } |
New file |
| | |
| | | package com.mes.md.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 客户库位表 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName(value = "KBB_T_ProgramsDeviceOlnlineLog_BP") |
| | | public class KBBTProgramsDeviceOlnlineLogBP implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 原始任务表主键(客户提供样本) |
| | | */ |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | @TableField(value="deviceName") |
| | | private String deviceName; |
| | | |
| | | /** |
| | | * 类型 |
| | | */ |
| | | @TableField(value="sttName") |
| | | private String sttName; |
| | | |
| | | /** |
| | | * 时间 |
| | | */ |
| | | @TableField(value="sttDate") |
| | | private String sttDate; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @TableField(value="Remarks") |
| | | private String Remarks; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value="CreateDate") |
| | | private String CreateDate; |
| | | } |
New file |
| | |
| | | package com.mes.md.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 客户库位表 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName(value = "KBB_T_ProgramsDeviceStatusLog_BP") |
| | | public class KBBTProgramsDeviceStatusLogBP implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 原始任务表主键(客户提供样本) |
| | | */ |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | @TableField(value="deviceName") |
| | | private String deviceName; |
| | | |
| | | /** |
| | | * 类型 |
| | | */ |
| | | @TableField(value="sttName") |
| | | private String sttName; |
| | | |
| | | /** |
| | | * 时间 |
| | | */ |
| | | @TableField(value="sttDate") |
| | | private String sttDate; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @TableField(value="Remarks") |
| | | private String Remarks; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value="CreateDate") |
| | | private String CreateDate; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.md.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 工作任务明细表(工作中) |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-29 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName(value = "KBB_T_ProgramsOperationLog_BP") |
| | | public class KBBTProgramsOperationLogBP implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 客户记录表 |
| | | */ |
| | | @TableId(value = "ID", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 玻璃唯一ID(北玻)主键 |
| | | */ |
| | | private Long glassId; |
| | | |
| | | /** |
| | | * 批次号 |
| | | */ |
| | | private String batchNumber; |
| | | |
| | | /** |
| | | * 扫码ID (唯一)【板件ID】 |
| | | */ |
| | | private String scanId; |
| | | |
| | | /** |
| | | * 程序ID |
| | | */ |
| | | private String programId; |
| | | |
| | | /** |
| | | * 任务类型【定制/标准】 |
| | | */ |
| | | private String taskType; |
| | | |
| | | /** |
| | | * 长 |
| | | */ |
| | | private Double length; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * 厚 |
| | | */ |
| | | private Double thickness; |
| | | |
| | | /** |
| | | * 是否工作 |
| | | */ |
| | | private Integer isWorking; |
| | | |
| | | |
| | | /** |
| | | * 打标图纸 |
| | | */ |
| | | private String drawingMarking; |
| | | |
| | | /** |
| | | * 丝印X |
| | | */ |
| | | private Double silkScreenX; |
| | | |
| | | /** |
| | | * 丝印Y |
| | | */ |
| | | private Double silkScreenY; |
| | | |
| | | // /** |
| | | // * 是否打标 |
| | | // */ |
| | | // private Integer isMarking; |
| | | |
| | | /** |
| | | * 是否丝印 |
| | | */ |
| | | private Integer isSilkScreen; |
| | | |
| | | /** |
| | | * 任务执行状态【等待/工作/完成】 |
| | | */ |
| | | private String workState; |
| | | |
| | | // /** |
| | | // * 当前所在工艺 |
| | | // */ |
| | | // private String currentCraft; |
| | | |
| | | /** |
| | | * 当前所在工艺 id (线路ID) |
| | | */ |
| | | private Long lineConfigurationId; |
| | | |
| | | /** |
| | | * 生产状态【线上/线下】 |
| | | */ |
| | | private String state; |
| | | |
| | | /** |
| | | * 玻璃状态【正常/破损】 |
| | | */ |
| | | private String glassState; |
| | | |
| | | /** |
| | | * R角1-1(右下角) |
| | | */ |
| | | private Double r_1_1; |
| | | |
| | | /** |
| | | * R角1-2(右下角) |
| | | */ |
| | | private Double r_1_2; |
| | | |
| | | /** |
| | | * R角2-1(右上角) |
| | | */ |
| | | private Double r_2_1; |
| | | |
| | | /** |
| | | * R角2-2(右上角) |
| | | */ |
| | | private Double r_2_2; |
| | | |
| | | /** |
| | | * R角3-1(左上角) |
| | | */ |
| | | private Double r_3_1; |
| | | |
| | | /** |
| | | * R角3-2(左上角) |
| | | */ |
| | | private Double r_3_2; |
| | | |
| | | /** |
| | | * R角4-1(左下角) |
| | | */ |
| | | private Double r_4_1; |
| | | |
| | | /** |
| | | * R角4-2(左下角) |
| | | */ |
| | | private Double r_4_2; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @TableField(value="[operation record_time]") |
| | | private Date operationRecordTime; |
| | | |
| | | // /** |
| | | // * 操作者 |
| | | // */ |
| | | // private String operationRecord; |
| | | |
| | | /** |
| | | * 操作类型 【开始/结束】 |
| | | */ |
| | | @TableField(value="operation_record_mode") |
| | | private String operationMode; |
| | | // /** |
| | | // * 库位 |
| | | // */ |
| | | // private String warehouse; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value="CreateDate") |
| | | private Date createDate; |
| | | |
| | | } |
| | |
| | | */ |
| | | private Integer todayCount; |
| | | |
| | | // /** |
| | | // * 开机状态 |
| | | // */ |
| | | // private String statePowerOn; |
| | | // |
| | | // /** |
| | | // * 联机状态 |
| | | // */ |
| | | // private String stateOnLine; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.md.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 工作任务明细表(工作中) |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-29 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class TaskingLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 玻璃唯一ID(北玻)主键 |
| | | */ |
| | | private Long glassId; |
| | | |
| | | /** |
| | | * 批次号 |
| | | */ |
| | | private String batchNumber; |
| | | |
| | | /** |
| | | * 扫码ID (唯一)【板件ID】 |
| | | */ |
| | | private String scanId; |
| | | |
| | | /** |
| | | * 程序ID |
| | | */ |
| | | private String programId; |
| | | |
| | | /** |
| | | * 任务类型【定制/标准】 |
| | | */ |
| | | private String taskType; |
| | | |
| | | /** |
| | | * 任务顺序 |
| | | */ |
| | | private Integer taskSequence; |
| | | |
| | | /** |
| | | * 任务数量 |
| | | */ |
| | | private Integer taskQuantity; |
| | | |
| | | /** |
| | | * 长 |
| | | */ |
| | | private Double length; |
| | | |
| | | /** |
| | | * 宽 |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * 厚 |
| | | */ |
| | | private Double thickness; |
| | | |
| | | /** |
| | | * 点胶图纸 |
| | | */ |
| | | private String drawingGlue; |
| | | |
| | | /** |
| | | * 打标图纸 |
| | | */ |
| | | private String drawingMarking; |
| | | |
| | | /** |
| | | * 丝印X |
| | | */ |
| | | private Double silkScreenX; |
| | | |
| | | /** |
| | | * 丝印Y |
| | | */ |
| | | private Double silkScreenY; |
| | | |
| | | /** |
| | | * 是否打标 |
| | | */ |
| | | private Integer isMarking; |
| | | |
| | | /** |
| | | * 是否丝印 |
| | | */ |
| | | private Integer isSilkScreen; |
| | | |
| | | /** |
| | | * 任务执行状态【等待/工作/完成】 |
| | | */ |
| | | private String workState; |
| | | |
| | | /** |
| | | * 当前所在工艺 id (线路ID) |
| | | */ |
| | | private Long lineConfigurationId; |
| | | |
| | | /** |
| | | * 生产状态【线上/线下】 |
| | | */ |
| | | private String state; |
| | | |
| | | /** |
| | | * 玻璃状态【正常/破损】 |
| | | */ |
| | | private String glassState; |
| | | |
| | | /** |
| | | * R角1-1(右下角) |
| | | */ |
| | | private Double r_1_1; |
| | | |
| | | /** |
| | | * R角1-2(右下角) |
| | | */ |
| | | private Double r_1_2; |
| | | |
| | | /** |
| | | * R角2-1(右上角) |
| | | */ |
| | | private Double r_2_1; |
| | | |
| | | /** |
| | | * R角2-2(右上角) |
| | | */ |
| | | private Double r_2_2; |
| | | |
| | | /** |
| | | * R角3-1(左上角) |
| | | */ |
| | | private Double r_3_1; |
| | | |
| | | /** |
| | | * R角3-2(左上角) |
| | | */ |
| | | private Double r_3_2; |
| | | |
| | | /** |
| | | * R角4-1(左下角) |
| | | */ |
| | | private Double r_4_1; |
| | | |
| | | /** |
| | | * R角4-2(左下角) |
| | | */ |
| | | private Double r_4_2; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | private Date operationRecordTime; |
| | | |
| | | /** |
| | | * 操作者 |
| | | */ |
| | | private String operationRecord; |
| | | |
| | | /** |
| | | * 操作类型 【开始/结束】 |
| | | */ |
| | | private String operationMode; |
| | | /** |
| | | * 库位 |
| | | */ |
| | | private String warehouse; |
| | | |
| | | /** |
| | | * 是否已经回传给九牧 |
| | | */ |
| | | private Integer isSend; |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.md.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.md.entity.KBBTJPDrawingBP; |
| | | import com.mes.md.entity.KBBTLensSorting; |
| | | |
| | | /** |
| | | * <p> |
| | | * 原始任务表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | @DS("salve_JomooKBB") |
| | | public interface KBBTLensSortingMapper extends MPJBaseMapper<KBBTLensSorting> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.md.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.md.entity.KBBTLensSorting; |
| | | import com.mes.md.entity.KBBTProgramsDeviceOlnlineLogBP; |
| | | |
| | | /** |
| | | * <p> |
| | | * 原始任务表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | @DS("salve_JomooKBB") |
| | | public interface KBBTProgramsDeviceOlnlineLogBPMapper extends MPJBaseMapper<KBBTProgramsDeviceOlnlineLogBP> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.md.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.md.entity.KBBTProgramsDeviceOlnlineLogBP; |
| | | import com.mes.md.entity.KBBTProgramsDeviceStatusLogBP; |
| | | |
| | | /** |
| | | * <p> |
| | | * 原始任务表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | @DS("salve_JomooKBB") |
| | | public interface KBBTProgramsDeviceStatusLogBPMapper extends MPJBaseMapper<KBBTProgramsDeviceStatusLogBP> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.md.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.md.entity.KBBTProgramsDeviceStatusLogBP; |
| | | import com.mes.md.entity.KBBTProgramsOperationLogBP; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 原始任务表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | @DS("salve_JomooKBB") |
| | | public interface KBBTProgramsOperationLogBPMapper extends MPJBaseMapper<KBBTProgramsOperationLogBP> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.md.mapper; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.md.entity.Tasking; |
| | | import com.mes.md.entity.TaskingLog; |
| | | |
| | | /** |
| | | * <p> |
| | | * 工作任务操作记录明细 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | public interface TaskingLogMapper extends MPJBaseMapper<TaskingLog> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.md.service; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.mes.md.entity.KBBTJPDrawingBP; |
| | | import com.mes.md.entity.KBBTProgramsOperationLogBP; |
| | | import com.mes.md.entity.PrimitiveTask; |
| | | import com.mes.md.entity.Tasking; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 客户记录表 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | @DS("salve_JomooKBB") |
| | | public interface KBBTProgramsOperationLogBPService extends MPJBaseService<KBBTProgramsOperationLogBP> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.md.service; |
| | | |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.mes.md.entity.TaskLog; |
| | | import com.mes.md.entity.TaskingLog; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | public interface TaskingLogService extends MPJBaseService<TaskingLog> { |
| | | |
| | | /** |
| | | * 回传报工数据+ 设备玻璃过片记录给 九牧 |
| | | */ |
| | | Integer reportTaskingLog(); |
| | | } |
New file |
| | |
| | | package com.mes.md.service.impl; |
| | | |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.md.entity.KBBTJPDrawingBP; |
| | | import com.mes.md.entity.KBBTProgramsOperationLogBP; |
| | | import com.mes.md.entity.PrimitiveTask; |
| | | import com.mes.md.entity.Tasking; |
| | | import com.mes.md.mapper.KBBTJPDrawingBPMapper; |
| | | import com.mes.md.mapper.KBBTProgramsOperationLogBPMapper; |
| | | import com.mes.md.mapper.PrimitiveTaskMapper; |
| | | import com.mes.md.service.KBBTJPDrawingBPService; |
| | | import com.mes.md.service.KBBTProgramsOperationLogBPService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 磨边机设备交互记录表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | @Service |
| | | public class KBBTProgramsOperationLogBPServiceImpl extends MPJBaseServiceImpl<KBBTProgramsOperationLogBPMapper, KBBTProgramsOperationLogBP> implements KBBTProgramsOperationLogBPService { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.md.service.impl; |
| | | |
| | | import cn.smallbun.screw.core.util.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.mes.md.entity.KBBTProgramsOperationLogBP; |
| | | import com.mes.md.entity.TaskingLog; |
| | | import com.mes.md.mapper.KBBTProgramsOperationLogBPMapper; |
| | | import com.mes.md.mapper.TaskingLogMapper; |
| | | import com.mes.md.service.TaskingLogService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author wu |
| | | * @since 2024-08-28 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class TaskingLogServiceImpl extends MPJBaseServiceImpl<TaskingLogMapper, TaskingLog> implements TaskingLogService { |
| | | |
| | | @Autowired |
| | | KBBTProgramsOperationLogBPMapper kBBTProgramsOperationLogBPMapper; |
| | | |
| | | public List<TaskingLog> findTaskingLog(){ |
| | | return new ArrayList<TaskingLog>(); |
| | | } |
| | | |
| | | /** |
| | | * 回传报工数据+ 设备玻璃过片记录给 九牧 |
| | | */ |
| | | @Override |
| | | public Integer reportTaskingLog() { |
| | | TaskingLog updateTaskingLog = new TaskingLog(); |
| | | updateTaskingLog.setIsSend(1); |
| | | baseMapper.update(updateTaskingLog, new QueryWrapper<TaskingLog>().lambda(). |
| | | eq(TaskingLog::getIsSend, 0)); |
| | | List<TaskingLog> listTasking = baseMapper.selectList(new QueryWrapper<TaskingLog>().lambda() |
| | | .eq(TaskingLog::getIsSend, 1)); |
| | | // 判端是否为空 |
| | | if (CollectionUtils.isNotEmpty(listTasking)) { |
| | | // 进行拆解封装 |
| | | List<KBBTProgramsOperationLogBP> report = listTasking.stream().map(item -> { |
| | | KBBTProgramsOperationLogBP newData = new KBBTProgramsOperationLogBP(); |
| | | newData.setGlassId(item.getGlassId()); |
| | | newData.setState(item.getState()); |
| | | newData.setWorkState(item.getWorkState()); |
| | | newData.setGlassState(item.getGlassState()); |
| | | newData.setState(item.getState()); |
| | | newData.setScanId(item.getScanId()); |
| | | newData.setProgramId(item.getProgramId()); |
| | | newData.setBatchNumber(item.getBatchNumber() == null ? "" : item.getBatchNumber()); |
| | | newData.setTaskType(item.getTaskType()); |
| | | newData.setLength(item.getLength()); |
| | | newData.setWidth(item.getWidth()); |
| | | newData.setThickness(item.getThickness()); |
| | | newData.setDrawingMarking(item.getDrawingMarking()); |
| | | newData.setIsSilkScreen(item.getIsSilkScreen()); |
| | | newData.setIsWorking(1); |
| | | newData.setSilkScreenX(item.getSilkScreenX()); |
| | | newData.setSilkScreenY(item.getSilkScreenY()); |
| | | newData.setR_1_1(item.getR_1_1()); |
| | | newData.setR_1_2(item.getR_1_2()); |
| | | newData.setR_2_1(item.getR_2_1()); |
| | | newData.setR_2_2(item.getR_2_2()); |
| | | newData.setR_3_1(item.getR_3_1()); |
| | | newData.setR_3_2(item.getR_3_2()); |
| | | newData.setR_4_1(item.getR_4_1()); |
| | | newData.setR_4_2(item.getR_4_2()); |
| | | newData.setCreateDate(new Date()); |
| | | kBBTProgramsOperationLogBPMapper.insert(newData); |
| | | return newData; |
| | | }).collect(Collectors.toList()); |
| | | updateTaskingLog.setIsSend(2); |
| | | |
| | | int successfulCount = baseMapper.update(updateTaskingLog, new QueryWrapper<TaskingLog>().lambda(). |
| | | eq(TaskingLog::getIsSend, 1)); |
| | | log.info("未提交的数量:{} 提交数量: {} 成功数量:{}", listTasking.size(), report.size(), successfulCount); |
| | | return successfulCount; |
| | | } |
| | | return 0; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Tasking startMachineTask(Machine machine, String scan_id) { |
| | | List<Tasking> list=this.findMachineWorkStateTask(machine,"等待"); |
| | | //List<Tasking> list=this.findMachineWorkStateTask(machine,"等待"); |
| | | List<Tasking> list=baseMapper.selectJoinList(Tasking.class,new MPJLambdaWrapper<Tasking>() |
| | | .selectAll(Tasking.class) |
| | | .innerJoin(LineConfiguration.class,LineConfiguration::getId,Tasking::getLineConfigurationId) |
| | | .innerJoin(Machine.class,Machine::getId,LineConfiguration::getMachineId) |
| | | .eq(LineConfiguration::getMachineId,machine.getId()) |
| | | .eq(Tasking::getGlassState,"正常") |
| | | .eq(Tasking::getState,"线上") |
| | | .eq(Tasking::getScanId,scan_id) |
| | | .eq(Tasking::getWorkState,"等待") |
| | | .orderByAsc(Tasking::getTaskSequence)); |
| | | if(!list.isEmpty()){ |
| | | Tasking tasking=list.get(0); |
| | | if(scan_id.equals(tasking.getScanId())){ |
| | |
| | | List<Tasking> listTasking=baseMapper.selectList(new QueryWrapper<Tasking>().lambda() |
| | | .eq(Tasking::getScanId,scanId) |
| | | .ne(Tasking::getLineConfigurationId,113) |
| | | .ne(Tasking::getWorkState,"完工") |
| | | .ne(Tasking::getState,"线下") |
| | | .ne(Tasking::getGlassState,"破损")); |
| | | if((listTasking.size()<primitiveTaskList.get(0).getTaskQuantity())||machine.getMode()==3){ |
| | | Machine oneMachine=machineMapper.selectById(1L); |
| | | if((listTasking.size()<primitiveTaskList.get(0).getTaskQuantity())||oneMachine.getMode()==3){ |
| | | Tasking tasking=primitiveTaskService.convertListTasking(primitiveTask,lineConfiguration.getId()); |
| | | Integer taskSequence=1; |
| | | if (machine.getTodayCount()>0&&machine.getTodayCount()<5000){ |
| | |
| | | if (machine.getId()==24){ |
| | | List<KBBTLensSorting> list=kBBTLensSortingMapper.selectList(new QueryWrapper<KBBTLensSorting>().lambda() |
| | | .eq(KBBTLensSorting::getBarcode,scanId) |
| | | .notLike(KBBTLensSorting::getProductionOrder,"防碎膜")); |
| | | .notLike(KBBTLensSorting::getProductionName,"防碎膜") |
| | | .notLike(KBBTLensSorting::getProductionName,"磨砂") |
| | | .notLike(KBBTLensSorting::getProductionName,"倒角")); |
| | | if (list.size()>0){ |
| | | Warehouse=list.get(0).getWarehouse(); |
| | | } |
| | |
| | | PlcParameter mesConfirmID =plcAgreement.getPlcParameter("mesConfirmID");//确认ID |
| | | PlcParameter mesConfirm2 =plcAgreement.getPlcParameter("mesConfirm2");//手动确认字 |
| | | PlcParameter mesConfirmID2 =plcAgreement.getPlcParameter("mesConfirmID2");//手动确认ID |
| | | |
| | | PlcParameter alarmStatus =plcAgreement.getPlcParameter("alarmStatus");//报警字 |
| | | PlcParameter machineStatusWord =plcAgreement.getPlcParameter("machineStatusWord");//设备状态字 |
| | | |
| | | // if (alarmStatus.getValueInt()>0&&!"报警".equals(machine.getStatePowerOn())){ |
| | | // machine.setStatePowerOn("报警"); |
| | | // }else if(alarmStatus.getValueInt()==0&&!"报警解除".equals(machine.getStatePowerOn())){ |
| | | // machine.setStatePowerOn("报警解除"); |
| | | // } |
| | | // if (machineStatusWord.getValueInt()!=2&&!"非联机".equals(machine.getStatePowerOn())){ |
| | | // machine.setStatePowerOn("非联机"); |
| | | // }else if(machineStatusWord.getValueInt()==2&&!"联机".equals(machine.getStatePowerOn())){ |
| | | // machine.setStatePowerOn("联机"); |
| | | // } |
| | | |
| | | if (machine.getIsLog()>0){ |
| | | modbusTcp1.consoleLogInfo(plcAgreement); |
| | | } |
| | |
| | | log.info("4、发送任务 任务数据:{}, 设备状态:{}, ",machine,tasking); |
| | | String send= |
| | | HexUtil.intTo2ByteHex(1)+ |
| | | HexUtil.intTo2ByteHex(tasking.getGlassId().intValue())+ |
| | | HexUtil.intTo2ByteHex(tasking.getTaskSequence().intValue())+ |
| | | HexUtil.intTo2ByteHex(((Double)(tasking.getLength()*10)).intValue())+ |
| | | HexUtil.intTo2ByteHex(((Double)(tasking.getWidth()*10)).intValue())+ |
| | | HexUtil.intTo2ByteHex(((Double)(tasking.getThickness()*10)).intValue()); |
| | |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String sendRecord=df.format(new Date())+" "+ |
| | | tasking.getGlassId()+"-"+ |
| | | tasking.getTaskSequence()+"-"+ |
| | | tasking.getWidth()+"-"+ |
| | | tasking.getLength()+"-"+ |
| | | tasking.getThickness(); |
| | |
| | | ,tasking.getLength().intValue(),tasking.getWidth().intValue(),1); |
| | | s7objectMachine.plccontrol.writeWord(length.getAddress(), tasking.getLength().intValue()); |
| | | s7objectMachine.plccontrol.writeWord(width.getAddress(), tasking.getWidth().intValue()); |
| | | s7objectMachine.plccontrol.writeString(mesSendId.getAddress(), tasking.getGlassId().toString()); |
| | | s7objectMachine.plccontrol.writeString(mesSendId.getAddress(), tasking.getTaskSequence().toString()); |
| | | s7objectMachine.plccontrol.writeWord(mesSend.getAddress(), 1); |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String sendRecord=df.format(new Date())+" "+ |
| | |
| | | modbusTcp1.writeString(send,HexUtil.intTo2ByteHex(mesSend.getAddressStart()/2)); |
| | | log.info("发送任务发送报文内容:{},发送起始地址:{}",send,HexUtil.intTo2ByteHex(mesSend.getAddressStart()/2)); |
| | | modbusTcp1.close(); |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String sendRecord=df.format(new Date())+" "+"1 "+ loadCount; |
| | | if (sendRecords.size()>7){ |
| | | sendRecords.remove(0); |
| | | } |
| | | Map sendContentMap=new HashMap(); |
| | | sendContentMap.put("sendContent",sendRecord); |
| | | sendRecords.add(sendContentMap); |
| | | return; |
| | | } |
| | | } |
| | |
| | | ,tasking.getLength().intValue(),tasking.getWidth().intValue(),1); |
| | | s7objectMachine.plccontrol.writeWord(length.getAddress(), tasking.getLength().intValue()); |
| | | s7objectMachine.plccontrol.writeWord(width.getAddress(), tasking.getWidth().intValue()); |
| | | s7objectMachine.plccontrol.writeString(mesSendId.getAddress(), tasking.getGlassId().toString()); |
| | | s7objectMachine.plccontrol.writeString(mesSendId.getAddress(), tasking.getTaskSequence().toString()); |
| | | s7objectMachine.plccontrol.writeWord(rotateType.getAddress(), 1); |
| | | s7objectMachine.plccontrol.writeWord(mesSend.getAddress(), 1); |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | |
| | | package com.mes; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.smallbun.screw.core.util.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.md.entity.*; |
| | | import com.mes.md.mapper.*; |
| | | import com.mes.md.service.AccountService; |
| | | import com.mes.md.service.PrimitiveTaskService; |
| | | import com.mes.md.service.ProjectService; |
| | | import com.mes.md.service.TaskingService; |
| | | import com.mes.md.service.*; |
| | | import com.mes.tools.HexConversion; |
| | | import com.mes.utils.HexUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Author : yanzhixin |
| | |
| | | @Autowired |
| | | KBBTLensSortingMapper kBBTLensSortingMapper; |
| | | |
| | | @Autowired |
| | | KBBTProgramsOperationLogBPMapper kBBTProgramsOperationLogBPMapper; |
| | | |
| | | @Autowired |
| | | KBBTProgramsOperationLogBPService kBBTProgramsOperationLogBPService; |
| | | |
| | | @Autowired |
| | | TaskingLogMapper taskingLogMapper; |
| | | |
| | | @Autowired |
| | | TaskingLogService taskingLogService; |
| | | /** |
| | | * 测试 提交报工 以及玻璃数据 |
| | | */ |
| | | @Test |
| | | public void reportTaskingLog() { |
| | | taskingLogService.reportTaskingLog(); |
| | | } |
| | | /** |
| | | * 测试 扫码后库位 |
| | | */ |
| | | @Test |
| | | public void testInset() { |
| | | |
| | | // 从数据库中查询出的对象集合 |
| | | List<Tasking> listTasking = taskingMapper.selectList(new QueryWrapper<Tasking>()); |
| | | List<KBBTProgramsOperationLogBP> abc =kBBTProgramsOperationLogBPMapper.selectList(new QueryWrapper<KBBTProgramsOperationLogBP>()); |
| | | // 判端是否为空 |
| | | if (CollectionUtils.isNotEmpty(listTasking)) { |
| | | // 进行拆解封装 |
| | | List<KBBTProgramsOperationLogBP> stationDictVOS = listTasking.stream().map(item -> { |
| | | KBBTProgramsOperationLogBP newData = new KBBTProgramsOperationLogBP(); |
| | | newData.setGlassId(item.getGlassId()); |
| | | newData.setState(item.getState()); |
| | | newData.setWorkState(item.getWorkState()); |
| | | newData.setGlassState(item.getGlassState()); |
| | | newData.setState(item.getState()); |
| | | newData.setScanId(item.getScanId()); |
| | | newData.setProgramId(item.getProgramId()); |
| | | newData.setBatchNumber(item.getBatchNumber()==null?"":item.getBatchNumber()); |
| | | newData.setTaskType(item.getTaskType()); |
| | | newData.setLength(item.getLength()); |
| | | newData.setWidth(item.getWidth()); |
| | | newData.setThickness(item.getThickness()); |
| | | newData.setDrawingMarking(item.getDrawingMarking()); |
| | | //newData.setIsMarking(item.getIsMarking());//是否打标:0不打标 1打标 |
| | | newData.setIsSilkScreen(item.getIsSilkScreen()); |
| | | newData.setIsWorking(1); |
| | | newData.setSilkScreenX(item.getSilkScreenX()); |
| | | newData.setSilkScreenY(item.getSilkScreenY()); |
| | | newData.setR_1_1(item.getR_1_1()); |
| | | newData.setR_1_2(item.getR_1_2()); |
| | | newData.setR_2_1(item.getR_2_1()); |
| | | newData.setR_2_2(item.getR_2_2()); |
| | | newData.setR_3_1(item.getR_3_1()); |
| | | newData.setR_3_2(item.getR_3_2()); |
| | | newData.setR_4_1(item.getR_4_1()); |
| | | newData.setR_4_2(item.getR_4_2()); |
| | | newData.setCreateDate(new Date()); |
| | | kBBTProgramsOperationLogBPMapper.insert(newData); |
| | | return newData; |
| | | }).collect(Collectors.toList()); |
| | | log.info("保存数据是否成功:{},{}",stationDictVOS); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 测试 扫码后库位 |
| | | */ |
| | | @Test |
| | | public void testStr() { |
| | | |
| | | //创建Calendar实例 |
| | | Calendar cal = Calendar.getInstance(); |
| | | //设置当前时间 |
New file |
| | |
| | | //报警提示 |
| | | const errorInfoFuntion = async (info) => { |
| | | let infoScancode=info; |
| | | ElMessageBox.confirm( |
| | | infoScancode, |
| | | t('delivery.prompt'), |
| | | { |
| | | confirmButtonText: t('functionState.sureStart'), |
| | | cancelButtonText: t('functionState.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('functionState.cancel'), |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | //修改工作状态 【失败/正在工作/完工】 |
| | | const workStatus = async (row, state) => { |
| | | let url; |
| | | if (state == "重发") { |
| | | url = "/deviceInteraction/tasking/loseMachineTask"; |
| | | } else if (state == "正在工作") { |
| | | url = "/deviceInteraction/tasking/startMachineTask"; |
| | | } else if (state == "完工") { |
| | | url = "/deviceInteraction/tasking/finishMachineTask"; |
| | | } else { |
| | | return; |
| | | } |
| | | ElMessageBox.confirm( |
| | | t('functionState.tips'), |
| | | t('delivery.prompt'), |
| | | { |
| | | confirmButtonText: t('functionState.sure'), |
| | | cancelButtonText: t('functionState.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | //开始修改 |
| | | request.post(url, |
| | | { |
| | | "id": machineId |
| | | }).then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | ElMessage.success(res.message); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('functionState.cancel'), |
| | | }) |
| | | }) |
| | | |
| | | } |
| | | |
| | | //开工/暂停 |
| | | const machineStatus = async (state) => { |
| | | ElMessageBox.confirm( |
| | | t('functionState.tips'), |
| | | t('delivery.prompt'), |
| | | { |
| | | confirmButtonText: t('functionState.sure'), |
| | | cancelButtonText: t('functionState.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | //下线接口 |
| | | request.post("/deviceInteraction/machine/updateMachineState", |
| | | { |
| | | "id": machineId, |
| | | "state": state |
| | | }).then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | ElMessage.success(res.message); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('functionState.cancel'), |
| | | }) |
| | | }) |
| | | } |
| | | //定制/标准 |
| | | const machineMode = async (mode) => { |
| | | ElMessageBox.confirm( |
| | | t('functionState.tips'), |
| | | t('delivery.prompt'), |
| | | { |
| | | confirmButtonText: t('functionState.sure'), |
| | | cancelButtonText: t('functionState.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | //下线接口 |
| | | request.post("/deviceInteraction/machine/toggleModeMachine", |
| | | { |
| | | "id": machineId, |
| | | "mode": mode |
| | | }).then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | ElMessage.success(res.message); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('functionState.cancel'), |
| | | }) |
| | | }) |
| | | } |
| | | //破损 |
| | | const damagedTask = async (row) => { |
| | | ElMessageBox.confirm( |
| | | t('functionState.tips'), |
| | | t('delivery.prompt'), |
| | | { |
| | | confirmButtonText: t('functionState.sure'), |
| | | cancelButtonText: t('functionState.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | //下线接口 |
| | | request.post("/deviceInteraction/tasking/damagedTask", |
| | | { |
| | | "glassId": row.glassId |
| | | }).then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | ElMessage.success(res.message); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('functionState.cancel'), |
| | | }) |
| | | }) |
| | | } |
| | | //下线(拿走) |
| | | const glassDownLine = async (row) => { |
| | | ElMessageBox.confirm( |
| | | t('functionState.tips'), |
| | | t('delivery.prompt'), |
| | | { |
| | | confirmButtonText: t('functionState.sure'), |
| | | cancelButtonText: t('functionState.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | //下线接口 |
| | | request.post("/deviceInteraction/tasking/glassDownLine", |
| | | { |
| | | "glassId": row.glassId, |
| | | }).then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | ElMessage.success(res.message); |
| | | } else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('functionState.cancel'), |
| | | }) |
| | | }) |
| | | } |
| | | const topLineShow = async () => { |
| | | blind.value = true; |
| | | } |
| | | //上线 |
| | | const topLine = async (row) => { |
| | | ElMessageBox.confirm( |
| | | t('functionState.tips'), |
| | | t('delivery.prompt'), |
| | | { |
| | | confirmButtonText: t('functionState.sure'), |
| | | cancelButtonText: t('functionState.cancel'), |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | //上线接口 |
| | | request.post("/deviceInteraction/tasking/glassTopLine", |
| | | { |
| | | "glassId": row.glassId, |
| | | "lineConfigurationId": machineId |
| | | }).then((res) => { // 替换为你的API端点 |
| | | if (res.code === 200) { |
| | | ElMessage.success(res.message); |
| | | } else {n |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('functionState.cancel'), |
| | | }) |
| | | }) |
| | | } |
| | | const handleDialogClose = () => { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | import moment from "moment"; |
| | | //格式化表格时间戳 毫秒 |
| | | export function gridDateFormatter(row,column,cellValue,index){ |
| | | const daterc = row[column.property]; |
| | | //alert(daterc); |
| | | return moment(Number(daterc)).format('YYYY-MM-DD HH:mm:ss'); |
| | | } |
| | | |
| | | export function getDataSort(dataSort){ |
| | | dataSort.sort((a, b) => a.operationRecordTime - b.operationRecordTime); |
| | | } |
| | | |
| | |
| | | password: '', |
| | | }); |
| | | const blind = ref(false) |
| | | const blindMode = ref(false) |
| | | const blindModeNumber = ref('') |
| | | const errorInfo = ref(true) |
| | | const loadData = ref([]); |
| | | const findMachine = ref([]); |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | const fetchData = async () => { |
| | | //扫码回车提交 |
| | | //alert(searchs.value); |
| | | searchs.value = ""; |
| | | } |
| | | |
| | | const filterTableData = computed(() => |
| | | loadData.value.filter( |
| | | (data) => |
| | | !searchs.value || data.scanId.toLowerCase().includes(searchs.value.toLowerCase()) |
| | | ) |
| | | ) |
| | | |
| | | //下拉框模式选择 |
| | | const modevalue = ref('') |
| | | |
| | | const options = [ |
| | | { |
| | | value: '1', |
| | | label: '标准', |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '定制', |
| | | }, |
| | | { |
| | | value: '3', |
| | | label: '手动', |
| | | } |
| | | ] |
| | | //模式选择时进行处理 |
| | | const modeChange = async () => { |
| | | if(modevalue.value=='3'){ |
| | | //当是手动模式时弹窗提示 设置上片数量 |
| | | blindMode.value = true; |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | <template> |
| | | <div ref="content" style="padding:0 20px;"> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | <el-dialog v-model="blindMode" top="30vh" style="text-align: center;width: 600px;" @close="handleDialogClose"> |
| | | <!-- 手动模式输入数量 --> |
| | | <div style="text-align: none;font-size: 20px;margin-bottom: 20px;"> |
| | | 手动输入模式 |
| | | </div> |
| | | <div> |
| | | 手动输入上片数量: |
| | | <el-input v-model="blindModeNumber" style="width: 200px;" type="Number" id="blindMode" @keyup.enter="fetchData"></el-input> |
| | | </div> |
| | | <!-- <div> |
| | | <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, 2, 2)">确认</el-button> |
| | | <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, 2, 2)">取消</el-button> |
| | | </div> --> |
| | | </el-dialog> |
| | | <hr /> |
| | | <br> |
| | | <div id="search"> |
| | | <!-- 功能 --> |
| | | |
| | | <div class="flex flex-wrap gap-4 items-center"> |
| | | 上片机运行模式: |
| | | <el-select v-model="modevalue" @change="modeChange" placeholder="请选择模式" size="large" style="width: 220px"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | <span @click="modeChange" style="margin-left: 40px;">上片数量:{{ blindModeNumber}}</span> |
| | | |
| | | </div> |
| | | <br> |
| | | <el-button :type="(findMachine['state'] == '暂停' ? 'danger' : 'success')" id="ButtonMachineStatus" |
| | | @click="machineStatus((findMachine['state'] == '暂停' ? '开工' : '暂停'))">{{ findMachine['state'] == '开工' ? |
| | | $t('functionState.start') : $t('functionState.stop') }}</el-button> |
| | |
| | | <el-popover placement="bottom" title="筛选" :width="200" trigger="click"> |
| | | <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input> |
| | | <template #reference> |
| | | <el-icon><Filter /></el-icon> |
| | | <el-icon> |
| | | <Filter /> |
| | | </el-icon> |
| | | </template> |
| | | </el-popover> |
| | | <el-icon><CaretTop /></el-icon> |
| | | <el-icon><CaretBottom /></el-icon> |
| | | <el-icon> |
| | | <CaretTop /> |
| | | </el-icon> |
| | | <el-icon> |
| | | <CaretBottom /> |
| | | </el-icon> |
| | | <!-- <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input> --> |
| | | <!-- <el-input size="small" placeholder="Type to search" /> --> |
| | | </div> |