Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# UI-Project/src/views/UnLoadGlass/loadmachinerack.vue
39个文件已修改
1 文件已重命名
30个文件已添加
14个文件已删除
| | |
| | | export default { |
| | | serverUrl: "localhost:8083", |
| | | serverUrl2: "localhost:8081/mesModuleTools" |
| | | serverUrl: "localhost:8085", |
| | | serverUrl2: "localhost:8085" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | https: false, |
| | | proxy: { |
| | | '/api': { |
| | | target: 'http://localhost:8081/', |
| | | target: 'http://localhost:8080/mesModuleTools', |
| | | changeOrigin: true, |
| | | rewrite: (path) => path.replace(/^\/api/, '/'), |
| | | }, |
| | | '/api2': { |
| | | target: 'http://localhost:8081/mesModuleTools', |
| | | target: 'http://localhost:8085/mesModuleTools', |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/api2': '', |
| | |
| | | package com.mes.mapper;
|
| | |
|
| | | import com.baomidou.dynamic.datasource.annotation.DS;
|
| | | import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.mes.entity.DownGlassInfo;
|
| | |
| | | @Component
|
| | | @Repository
|
| | | @InterceptorIgnore(tenantLine = "true")
|
| | | @DS("hangzhoumes") // 指定使用 hangzhoumes 数据源
|
| | | public interface DownWorkstationMapper extends BaseMapper<DownWorkstation> {
|
| | | //根据工位ID和设备ID更新工位状态
|
| | | @Update("UPDATE down_workstation SET work_state = #{workState} " +
|
| | |
| | | package com.mes.common.config; |
| | | |
| | | import com.alibaba.druid.pool.DruidDataSource; |
| | | import com.baomidou.mybatisplus.annotation.DbType; |
| | | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; |
| | | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; |
| | | import org.apache.ibatis.session.SqlSessionFactory; |
| | | import org.mybatis.spring.SqlSessionFactoryBean; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.sql.DataSource; |
| | | |
| | | |
| | | /** |
| | |
| | | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); |
| | | interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); |
| | | return interceptor; |
| | | } |
| | | |
| | | @Resource |
| | | private DataSourceProperties dataSourceProperties; |
| | | |
| | | |
| | | @Bean(name = "dataSource") |
| | | public DataSource dataSource() { |
| | | |
| | | DruidDataSource dataSource = new DruidDataSource(); |
| | | dataSource.setUrl(dataSourceProperties.getUrl()); |
| | | dataSource.setDriverClassName(dataSourceProperties.getDriverClassName()); |
| | | dataSource.setUsername(dataSourceProperties.getUsername()); |
| | | dataSource.setPassword(dataSourceProperties.getPassword()); |
| | | |
| | | return dataSource; |
| | | |
| | | } |
| | | |
| | | public SqlSessionFactory sqlSessionFactory() throws Exception { |
| | | SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); |
| | | sqlSessionFactoryBean.setDataSource(dataSource()); |
| | | return sqlSessionFactoryBean.getObject(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/optimize-detail") |
| | | public class OptimizeDetailController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.pp.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/optimize-layout") |
| | | public class OptimizeLayoutController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.pp.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/optimize-project") |
| | | public class OptimizeProjectController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.pp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class OptimizeDetail implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private String projectNo; |
| | | |
| | | /** |
| | | * 流程卡号 |
| | | */ |
| | | private String processId; |
| | | |
| | | /** |
| | | * 层 |
| | | */ |
| | | private Integer layer; |
| | | |
| | | /** |
| | | * 序号 |
| | | */ |
| | | private Integer orderSort; |
| | | |
| | | /** |
| | | * 版图id |
| | | */ |
| | | private Integer stockId; |
| | | |
| | | /** |
| | | * 版图序 |
| | | */ |
| | | private Integer stockNumber; |
| | | |
| | | /** |
| | | * 图号 |
| | | */ |
| | | private Integer graphNo; |
| | | |
| | | /** |
| | | * 小片编号 |
| | | */ |
| | | private String glassId; |
| | | |
| | | /** |
| | | * 小片ID |
| | | */ |
| | | private Integer polysId; |
| | | |
| | | /** |
| | | * 小片宽(加磨量) |
| | | */ |
| | | private Double pWidth; |
| | | |
| | | /** |
| | | * 小片高(加磨量) |
| | | */ |
| | | private Double pHeight; |
| | | |
| | | /** |
| | | * 小片宽 |
| | | */ |
| | | private Double width; |
| | | |
| | | /** |
| | | * 小片高 |
| | | */ |
| | | private Double height; |
| | | |
| | | /** |
| | | * x坐标 |
| | | */ |
| | | private Double xAxis; |
| | | |
| | | /** |
| | | * y坐标 |
| | | */ |
| | | private Double yAxis; |
| | | |
| | | /** |
| | | * 钢化版图编号(架号) |
| | | */ |
| | | private Integer heatLayoutId; |
| | | |
| | | private String h; |
| | | |
| | | private String g; |
| | | |
| | | private String r; |
| | | |
| | | private String glassPoint; |
| | | |
| | | @TableField("intRemark") |
| | | private Integer intremark; |
| | | |
| | | @TableField("strRemark") |
| | | private String strremark; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class OptimizeLayout implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 工程号 |
| | | */ |
| | | private String projectNo; |
| | | |
| | | /** |
| | | * 原片ID |
| | | */ |
| | | private Integer stockId; |
| | | |
| | | private Double width; |
| | | |
| | | private Double height; |
| | | |
| | | private Double realwidth; |
| | | |
| | | private Double realheight; |
| | | |
| | | /** |
| | | * 切裁率 |
| | | */ |
| | | private String usageRate; |
| | | |
| | | /** |
| | | * 物料编码 |
| | | */ |
| | | private String stockCode; |
| | | |
| | | /** |
| | | * 上修边 |
| | | */ |
| | | private String upTrim; |
| | | |
| | | /** |
| | | * 下 |
| | | */ |
| | | private String downTrim; |
| | | |
| | | /** |
| | | * 左 |
| | | */ |
| | | private String leftTrim; |
| | | |
| | | /** |
| | | * 右 |
| | | */ |
| | | private String rightTrim; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 小片数 |
| | | */ |
| | | private String glassCount; |
| | | |
| | | /** |
| | | * 小片面积 |
| | | */ |
| | | private String glassArea; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private Integer creater; |
| | | |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("intRemark") |
| | | private Integer intremark; |
| | | |
| | | @TableField("strRemark") |
| | | private String strremark; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class OptimizeProject implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 自增:<优化-工程> |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 工程编号 |
| | | */ |
| | | private String projectNo; |
| | | |
| | | /** |
| | | * 工程项目名 |
| | | */ |
| | | private String projectName; |
| | | |
| | | /** |
| | | * 玻璃膜系 |
| | | */ |
| | | private String glassType; |
| | | |
| | | /** |
| | | * 玻璃厚度 |
| | | */ |
| | | private String glassThickness; |
| | | |
| | | /** |
| | | * 工程种类 |
| | | */ |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 状态: -2删除; -1默认; 1流程卡创建; 2第一次优化保存; 10钢化推荐创建保存; 20优化结果保存 |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 总数 |
| | | */ |
| | | private Integer glassTotal; |
| | | |
| | | /** |
| | | * 总面积 |
| | | */ |
| | | private Double glassTotalArea; |
| | | |
| | | /** |
| | | * 流程卡数量 |
| | | */ |
| | | private Integer processQty; |
| | | |
| | | /** |
| | | * 循环落架数 |
| | | */ |
| | | private Integer guidance; |
| | | |
| | | /** |
| | | * 第一次使用原料数 |
| | | */ |
| | | private Integer fristStockQty; |
| | | |
| | | /** |
| | | * 第一次平均切裁率 |
| | | */ |
| | | private String fristCutPct; |
| | | |
| | | /** |
| | | * 使用的原料数 |
| | | */ |
| | | private Integer rawStockQty; |
| | | |
| | | /** |
| | | * 使用的原料面积 |
| | | */ |
| | | private String rawStockArea; |
| | | |
| | | /** |
| | | * 平均切裁率 |
| | | */ |
| | | private String avgCutPct; |
| | | |
| | | /** |
| | | * 有效切裁率 |
| | | */ |
| | | private String validCutPct; |
| | | |
| | | /** |
| | | * 尾片切裁率 |
| | | */ |
| | | private String lastCutPct; |
| | | |
| | | /** |
| | | * g混排程度 |
| | | */ |
| | | private String chaosPct; |
| | | |
| | | /** |
| | | * g最大装载率 |
| | | */ |
| | | private String maxLoadPct; |
| | | |
| | | /** |
| | | * g最大面积 |
| | | */ |
| | | private String maxArea; |
| | | |
| | | /** |
| | | * g最大数量 |
| | | */ |
| | | private Integer maxQty; |
| | | |
| | | /** |
| | | * g上片宽 |
| | | */ |
| | | private Float loadWidth; |
| | | |
| | | /** |
| | | * g上片长 |
| | | */ |
| | | private Float loadLength; |
| | | |
| | | /** |
| | | * x间隔 |
| | | */ |
| | | private Float xSpace; |
| | | |
| | | /** |
| | | * y间隔 |
| | | */ |
| | | private Float ySpace; |
| | | |
| | | /** |
| | | * g平均装载率 |
| | | */ |
| | | private Float loadRate; |
| | | |
| | | /** |
| | | * 流程卡集合 |
| | | */ |
| | | private String processCards; |
| | | |
| | | /** |
| | | * g总炉数 |
| | | */ |
| | | private Integer furnacesQty; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | private String creater; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | private LocalDateTime updateTime; |
| | | |
| | | /** |
| | | * 预留,使用需注明 |
| | | */ |
| | | @TableField("intRemark") |
| | | private Integer intremark; |
| | | |
| | | /** |
| | | * 预留,使用需注明 |
| | | */ |
| | | @TableField("strRemark") |
| | | private String strremark; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Mapper |
| | | public interface OptimizeDetailMapper extends BaseMapper<OptimizeDetail> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Mapper |
| | | public interface OptimizeLayoutMapper extends BaseMapper<OptimizeLayout> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Mapper |
| | | public interface OptimizeProjectMapper extends BaseMapper<OptimizeProject> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface OptimizeDetailService extends IService<OptimizeDetail> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface OptimizeLayoutService extends IService<OptimizeLayout> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface OptimizeProjectService extends IService<OptimizeProject> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service.impl; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.pp.entity.OptimizeDetail; |
| | | import com.mes.pp.mapper.OptimizeDetailMapper; |
| | | import com.mes.pp.service.OptimizeDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Service |
| | | @DS("pp") |
| | | public class OptimizeDetailServiceImpl extends ServiceImpl<OptimizeDetailMapper, OptimizeDetail> implements OptimizeDetailService { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service.impl; |
| | | |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.pp.entity.OptimizeLayout; |
| | | import com.mes.pp.mapper.OptimizeLayoutMapper; |
| | | import com.mes.pp.service.OptimizeLayoutService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Service |
| | | @DS("pp") |
| | | public class OptimizeLayoutServiceImpl extends ServiceImpl<OptimizeLayoutMapper, OptimizeLayout> implements OptimizeLayoutService { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.pp.service.impl; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.pp.entity.OptimizeProject; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import com.mes.pp.service.OptimizeProjectService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Service |
| | | @DS("pp") |
| | | public class OptimizeProjectServiceImpl extends ServiceImpl<OptimizeProjectMapper, OptimizeProject> implements OptimizeProjectService { |
| | | |
| | | } |
| | |
| | | * @since 2024-04-11 |
| | | */ |
| | | @RestController |
| | | @CrossOrigin |
| | | @RequestMapping("/userinfo") |
| | | public class SysUserController { |
| | | |
File was renamed from hangzhoumesParent/common/springsecurity/src/main/java/com/mes/common/config/MyCorsConfig.java |
| | |
| | | package com.mes.common.config; |
| | | package com.mes.config; |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.cors.CorsConfiguration; |
| | | import org.springframework.web.cors.reactive.CorsWebFilter; |
| | | import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource; |
| | | import org.springframework.web.servlet.config.annotation.CorsRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | */ |
| | | @Configuration |
| | | public class MyCorsConfig { |
| | | |
| | | @Bean |
| | | public WebMvcConfigurer corsConfigurer() { |
| | | return new WebMvcConfigurer() { |
| | | @Override |
| | | public void addCorsMappings(CorsRegistry registry) { |
| | | registry.addMapping("/**"); |
| | | } |
| | | }; |
| | | } |
| | | public CorsWebFilter corsFilter() { |
| | | |
| | | @Bean |
| | | public CorsWebFilter corsWebFilter() { |
| | | UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); |
| | | |
| | | CorsConfiguration corsConfiguration = new CorsConfiguration(); |
| | | |
| | | //1、配置跨域 |
| | | //允许哪些头跨域 |
| | | corsConfiguration.addAllowedHeader("*"); |
| | | // 允许哪些方式跨域 get post delete 等方式 |
| | | corsConfiguration.addAllowedMethod("*"); |
| | | //允许哪些请求来源跨域 * 任意来源 |
| | | corsConfiguration.addAllowedOrigin("*"); |
| | | // 是否允许携带cooker跨域 |
| | | corsConfiguration.setAllowCredentials(true); |
| | | |
| | | //注册跨越配置 /**配置请求路径 |
| | | source.registerCorsConfiguration("/**", corsConfiguration); |
| | | return new CorsWebFilter(source); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | - StripPrefix=2 |
| | | |
| | | - id: cacheVerticalGlass |
| | | uri: http://127.0.0.1:8082 |
| | | uri: lb://cacheVerticalGlass |
| | | predicates: |
| | | - Path=/api/cacheVerticalGlass/** |
| | | filters: |
| | | - StripPrefix=2 |
| | | |
| | | - id: loadGlass |
| | | uri: http://127.0.0.1:8083 |
| | | uri: lb://loadGlass |
| | | predicates: |
| | | - Path=/api/loadGlass/** |
| | | filters: |
| | | - StripPrefix=2 |
| | | |
| | | - id: temperingGlass |
| | | uri: http://127.0.0.1:8084 |
| | | uri: lb://temperingGlass |
| | | predicates: |
| | | - Path=/api/temperingGlass/** |
| | | filters: |
| | | - StripPrefix=2 |
| | | |
| | | - id: unLoadGlass |
| | | uri: http://127.0.0.1:8085 |
| | | uri: lb://unLoadGlass |
| | | predicates: |
| | | - Path=/api/unLoadGlass/** |
| | | filters: |
| | |
| | | <scope>test</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.mes</groupId> |
| | | <artifactId>servicebase</artifactId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <scope>compile</scope> |
| | | <groupId>com.github.yulichang</groupId> |
| | | <artifactId>mybatis-plus-join</artifactId> |
| | | <version>1.1.6</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | |
| | | package com.mes.edgstoragecage.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface EdgStorageCageDetailsMapper extends BaseMapper<EdgStorageCageDetails> { |
| | | public interface EdgStorageCageDetailsMapper extends MPJBaseMapper<EdgStorageCageDetails> { |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface EdgStorageCageDetailsService extends IService<EdgStorageCageDetails> { |
| | | //获取全部 磨边前缓存笼信息 |
| | | public List<Map> getEdgStorageInfos(); |
| | | //修改 笼内数据 |
| | | public List<Map> setEdgStorageInfos(); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface EdgStorageCageService extends IService<EdgStorageCage> { |
| | | |
| | | //查询笼内空格 |
| | | public List<EdgStorageCage> selectCacheEmpty(); |
| | | |
| | | //查询笼内出片顺序详情 |
| | | public List<EdgStorageCage> selectCacheOut(); |
| | | |
| | | //查询笼内详情 |
| | | public List<Map> selectCacheInfos(); |
| | | |
| | | //添加理片笼信息 传入glassid |
| | | public boolean insertCacheInfo(String glassid); |
| | | |
| | | //修改理片笼内信息 |
| | | public boolean updateCacheInfo(String cacheId); |
| | | |
| | | //删除理片笼内信息 |
| | | public boolean deleteCacheInfo(String cacheId); |
| | | } |
| | |
| | | package com.mes.edgstoragecage.service.impl; |
| | | |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.github.yulichang.wrapper.MPJAbstractLambdaWrapper; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageDetailsMapper; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageDetailsService; |
| | | import com.mes.taskcache.mapper.HangzhouMesMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class EdgStorageCageDetailsServiceImpl extends ServiceImpl<EdgStorageCageDetailsMapper, EdgStorageCageDetails> implements EdgStorageCageDetailsService { |
| | | //获取全部数据 |
| | | @Autowired |
| | | private HangzhouMesMapper hangzhouMesMapper; |
| | | @Autowired |
| | | private EdgStorageCageDetailsMapper edgStorageCageDetailsMapper; |
| | | |
| | | //获取磨边前缓存理片笼信息 |
| | | @Override |
| | | public List<Map> getEdgStorageInfos(){ |
| | | List<Map> map=edgStorageCageDetailsMapper.selectJoinList( |
| | | Map.class,new MPJQueryWrapper<EdgStorageCage>().selectAll(EdgStorageCage.class) |
| | | .select("a.c","a.d") |
| | | .leftJoin("ab a on t.id=a.id") |
| | | .le("a.id","1") |
| | | ); |
| | | return map; |
| | | }; |
| | | |
| | | @Override |
| | | public List<Map> setEdgStorageInfos(){ |
| | | return hangzhouMesMapper.selectCachInfo(); |
| | | }; |
| | | |
| | | |
| | | } |
| | |
| | | package com.mes.edgstoragecage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageMapper; |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageDetailsMapper; |
| | | import com.mes.edgstoragecage.service.EdgStorageCageService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class EdgStorageCageServiceImpl extends ServiceImpl<EdgStorageCageMapper, EdgStorageCage> implements EdgStorageCageService { |
| | | |
| | | @Autowired |
| | | EdgStorageCageMapper edgStorageCageMapper; |
| | | @Autowired |
| | | EdgStorageCageDetailsMapper edgStorageCageDetailsMapper; |
| | | |
| | | @Override |
| | | //查询笼内空格 EdgStorageCage as esc left join EdgStorageCageDetails as escd esc.device_id=escd.device_id |
| | | public List<EdgStorageCage> selectCacheEmpty(){ |
| | | List<EdgStorageCage> listEdgStorageCage= edgStorageCageMapper.selectList(null); |
| | | ; |
| | | List<EdgStorageCageDetails> orderList = listEdgStorageCage.stream() |
| | | .flatMap(user -> edgStorageCageDetailsMapper.selectList( |
| | | new QueryWrapper<EdgStorageCageDetails>().eq("user_id", user.getId())).stream() |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | |
| | | return listEdgStorageCage; |
| | | } |
| | | |
| | | @Override |
| | | //查询笼内出片任务 |
| | | public List<EdgStorageCage> selectCacheOut(){ |
| | | List<EdgStorageCage> list= new ArrayList<EdgStorageCage>(); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | //理片缓存详情 |
| | | public List<Map> selectCacheInfos(){ |
| | | List<Map> mapList=new ArrayList<>(); |
| | | return mapList; |
| | | } |
| | | |
| | | @Override |
| | | //添加理片笼信息 传入glassid |
| | | public boolean insertCacheInfo(String glassid){ |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | //修改理片笼内信息 |
| | | public boolean updateCacheInfo(String cacheId){ |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | //删除理片笼内信息 |
| | | public boolean deleteCacheInfo(String cacheId){ |
| | | return false; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | |
| | | */ |
| | | public interface GlassInfoService extends IService<GlassInfo> { |
| | | |
| | | public List<GlassInfo> selectAll(); |
| | | public List<GlassInfo> selectId(String glassId); |
| | | public List<GlassInfo> selectFlowcardId(String flowcard_id); |
| | | } |
| | |
| | | package com.mes.glassinfo.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.mapper.GlassInfoMapper; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class GlassInfoServiceImpl extends ServiceImpl<GlassInfoMapper, GlassInfo> implements GlassInfoService { |
| | | |
| | | @Autowired |
| | | GlassInfoMapper glassInfoMapper; |
| | | |
| | | //根据ID 获取小片数据 |
| | | @Override |
| | | public List<GlassInfo> selectId(String glassId){ |
| | | QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<GlassInfo>(); |
| | | queryWrapper.eq("id",glassId); |
| | | return glassInfoMapper.selectList(queryWrapper); |
| | | }; |
| | | |
| | | //获取全部小片数据 |
| | | @Override |
| | | public List<GlassInfo> selectAll(){ |
| | | return glassInfoMapper.selectList(null); |
| | | }; |
| | | |
| | | //根据工程 获取小片数据 |
| | | @Override |
| | | public List<GlassInfo> selectFlowcardId(String flowcardId){ |
| | | QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<GlassInfo>(); |
| | | queryWrapper.eq("flowcardId",flowcardId); |
| | | return glassInfoMapper.selectList(queryWrapper); |
| | | }; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.taskcache.entity.TaskCache; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | |
| | | */ |
| | | public interface TaskCacheService extends IService<TaskCache> { |
| | | |
| | | //添加理片笼任务 |
| | | public boolean insertTaskCache(); |
| | | |
| | | //查询磨边任务 |
| | | public List<TaskCache> selectEdgInfo(String line); |
| | | |
| | | //查询理片任务 |
| | | public List<TaskCache> selectCacheInfo(); |
| | | |
| | | //查询全部任务 |
| | | public List<TaskCache> selectAll(); |
| | | |
| | | //查询进片任务 |
| | | public List<TaskCache> selectInputTaskCache(); |
| | | |
| | | //查询出片任务 |
| | | public List<TaskCache> selectOutTaskCache(); |
| | | |
| | | //查询 A09 或 A10 最新的一片 出片任务 |
| | | public boolean selectLastOutCacheInfo(); |
| | | } |
| | |
| | | import com.mes.taskcache.service.TaskCacheService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | |
| | | @Service |
| | | public class TaskCacheServiceImpl extends ServiceImpl<TaskCacheMapper, TaskCache> implements TaskCacheService { |
| | | |
| | | //添加理片笼任务 |
| | | @Override |
| | | public boolean insertTaskCache(){ |
| | | return false; |
| | | } |
| | | |
| | | //查询磨边任务 |
| | | @Override |
| | | public List<TaskCache> selectEdgInfo(String line) { |
| | | return null; |
| | | } |
| | | //查询理片任务 |
| | | @Override |
| | | public List<TaskCache> selectCacheInfo(){ |
| | | return null; |
| | | } |
| | | //查询全部任务 |
| | | @Override |
| | | public List<TaskCache> selectAll() { |
| | | return null; |
| | | } |
| | | //查询进片任务 |
| | | @Override |
| | | public List<TaskCache> selectInputTaskCache(){ |
| | | return null; |
| | | } |
| | | |
| | | //查询出片任务 |
| | | @Override |
| | | public List<TaskCache> selectOutTaskCache(){ |
| | | return null; |
| | | } |
| | | |
| | | //查询 A09 或 A10 最新的一片 出片任务 |
| | | @Override |
| | | public boolean selectLastOutCacheInfo(){ |
| | | return false; |
| | | } |
| | | } |
| | |
| | | port: 8081 |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: beibo.123/ |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 大理片笼信息 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @ApiModel("大理片笼信息") |
| | | @RestController |
| | | @RequestMapping("/bigStorageCage") |
| | | public class BigStorageCageController { |
| | |
| | | @Autowired |
| | | private BigStorageCageService bigStorageCageService; |
| | | |
| | | //todo: 实例代码 待删除 |
| | | @ApiOperation("测试") |
| | | @GetMapping("/index") |
| | | public String index() { |
| | | return "hello world"; |
| | | } |
| | | // public Result<BigStorageCageDetails> feedGlass(GlassInfo glassInfo, BigStorageCageDetails bigStorageCageDetails){ |
| | | // |
| | | // } |
| | | |
| | | @ApiOperation("理片笼信息") |
| | | @GetMapping("/bigStorageCage") |
| | | public List<BigStorageCage> querybigStorageCageDetail() { |
| | | return bigStorageCageService.querybigStorageCageDetail(); |
| | | public Result<List<BigStorageCage>> querybigStorageCageDetail() { |
| | | return Result.success(bigStorageCageService.querybigStorageCageDetail()); |
| | | } |
| | | |
| | | @ApiOperation("手动完成任务") |
| | | @GetMapping("/finishTask") |
| | | public void finishTask(int type, int id) { |
| | | @PostMapping("/finishTask") |
| | | public Result<String> finishTask(int type, int id) { |
| | | // bigStorageCageDetailsService.FinishTask(); |
| | | return Result.success("success"); |
| | | } |
| | | } |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | private BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | |
| | | @ApiOperation("理片笼详情") |
| | | @GetMapping("/bigStorageCageDetails") |
| | | @PostMapping("/bigStorageCageDetails") |
| | | public List<BigStorageCageDetails> bigStorageCageDetails() { |
| | | return bigStorageCageDetailsService.list(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import feign.Param; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public interface BigStorageCageService extends IService<BigStorageCage> { |
| | | |
| | | void updateRemainWidth(int Slot); |
| | | void updateRemainWidth(int slot); |
| | | |
| | | BigStorageCageDetails feedGlass(GlassInfo glassInfo, BigStorageCageDetails bigStorageCageDetails); |
| | | |
| | | boolean outGlass(); |
| | | |
| | | List<BigStorageCage> querybigStorageCageDetail(); |
| | | |
| | | |
| | | } |
| | |
| | | @Resource |
| | | private BigStorageCageMapper bigStorageCageMapper; |
| | | |
| | | @Override |
| | | public boolean getTemperingGlass() { |
| | | //获取笼子内所有版图号 |
| | | List<String> temperingIdList = bigStorageCageMapper.selectTemperingId(); |
| | | for (String temperingId : temperingIdList |
| | | ) { |
| | | |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | |
| | | import com.mes.bigstorage.mapper.BigStorageCageMapper; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | @Service |
| | | @Slf4j |
| | | public class BigStorageCageServiceImpl extends ServiceImpl<BigStorageCageMapper, BigStorageCage> implements BigStorageCageService { |
| | | @Resource |
| | | private BigStorageCageMapper bigStorageCageMapper; |
| | | |
| | | @Resource |
| | | private BigStorageCageDetailsMapper bigStorageCageDetailsMapper; |
| | |
| | | bigStorageCageDetails.setSlot(layoutSlotInfo.getSlot()); |
| | | |
| | | //2、有符合条件的格子活片序为1时 |
| | | log.info("有符合条件的格子活片序为1时"); |
| | | if (layoutSlotInfo.getSlot() != null) { |
| | | bigStorageCageDetails.setSlot(layoutSlotInfo.getSlot()); |
| | | } else { |
| | |
| | | bigStorageCage.setRemainWidth(width); |
| | | UpdateWrapper<BigStorageCage> bigStorageCageWrapper = new UpdateWrapper<>(); |
| | | bigStorageCageWrapper.eq("remain_width", width); |
| | | bigStorageCageMapper.update(bigStorageCage, bigStorageCageWrapper); |
| | | baseMapper.update(bigStorageCage, bigStorageCageWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<BigStorageCage> querybigStorageCageDetail() { |
| | | //1、获取大理片笼信息 |
| | | List<BigStorageCage> bigStorageCages = bigStorageCageMapper.selectList(null); |
| | | List<BigStorageCage> bigStorageCages = baseMapper.selectList(null); |
| | | log.info("1、获取大理片笼信息完成,获取到的数据{}", bigStorageCages.size()); |
| | | //2获取理片笼所有信息 |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = bigStorageCageDetailsMapper.selectList(null); |
New file |
| | |
| | | package com.mes.userinfo.controller; |
| | | |
| | | |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.bigstoragetask.service.BigStorageCageFeedTaskService; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @ApiModel("进片任务信息") |
| | | @RestController |
| | | @RequestMapping("/userinfo/big-storage-cage-feed-task") |
| | | public class BigStorageCageFeedTaskController { |
| | | |
| | | @Autowired |
| | | private BigStorageCageFeedTaskService bigStorageCageFeedTaskService; |
| | | @ApiOperation("进片任务信息") |
| | | @GetMapping("/querybigStorageCageTask") |
| | | public List<BigStorageCageFeedTask> querybigStorageCageFeedTask(int taskState) { |
| | | return bigStorageCageFeedTaskService.querybigStorageCageFeedTask(taskState); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.userinfo.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.bigstoragetask.service.BigStorageCageOutTaskService; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @ApiModel("出片任务信息") |
| | | @RestController |
| | | @RequestMapping("/userinfo/big-storage-cage-out-task") |
| | | public class BigStorageCageOutTaskController { |
| | | |
| | | @Autowired |
| | | private BigStorageCageOutTaskService bigStorageCageOutTaskService; |
| | | @ApiOperation("进片任务信息") |
| | | @GetMapping("/querybigStorageCageTask") |
| | | public List<BigStorageCageOutTask> querybigStorageCageOutTask(int taskState) { |
| | | return bigStorageCageOutTaskService.querybigStorageCageOutTask(taskState); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.bigstoragetask.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class BigStorageCageFeedTask implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private Integer tragetSlot; |
| | | |
| | | private Integer taskType; |
| | | |
| | | private Integer taskState; |
| | | |
| | | private Integer line; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.bigstoragetask.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class BigStorageCageOutTask implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | private Integer startSlot; |
| | | |
| | | private Integer endSlot; |
| | | |
| | | private Integer trainNumber; |
| | | |
| | | private Integer serialNumber; |
| | | |
| | | private Integer taskState; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.bigstoragetask.mapper; |
| | | |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface BigStorageCageFeedTaskMapper extends BaseMapper<BigStorageCageFeedTask> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.bigstoragetask.mapper; |
| | | |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface BigStorageCageOutTaskMapper extends BaseMapper<BigStorageCageOutTask> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.bigstoragetask.service; |
| | | |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface BigStorageCageFeedTaskService extends IService<BigStorageCageFeedTask> { |
| | | |
| | | void addFeedTask(BigStorageCageDetails slotInfo, Integer plcFeedReqLine, int taskType); |
| | | |
| | | List<BigStorageCageFeedTask> querybigStorageCageFeedTask(int taskState); |
| | | } |
New file |
| | |
| | | package com.mes.bigstoragetask.service; |
| | | |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface BigStorageCageOutTaskService extends IService<BigStorageCageOutTask> { |
| | | |
| | | List<BigStorageCageOutTask> querybigStorageCageOutTask(int taskState); |
| | | } |
New file |
| | |
| | | package com.mes.bigstoragetask.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper; |
| | | import com.mes.bigstoragetask.service.BigStorageCageFeedTaskService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Service |
| | | public class BigStorageCageFeedTaskServiceImpl extends ServiceImpl<BigStorageCageFeedTaskMapper, BigStorageCageFeedTask> implements BigStorageCageFeedTaskService { |
| | | |
| | | @Override |
| | | public void addFeedTask(BigStorageCageDetails slotInfo, Integer plcFeedReqLine, int taskType){ |
| | | BigStorageCageFeedTask bigStorageCageFeedTask=new BigStorageCageFeedTask(); |
| | | bigStorageCageFeedTask.setId(slotInfo.getId()); |
| | | bigStorageCageFeedTask.setTaskState(0); |
| | | bigStorageCageFeedTask.setLine(plcFeedReqLine); |
| | | bigStorageCageFeedTask.setTragetSlot(slotInfo.getSlot()); |
| | | bigStorageCageFeedTask.setTaskType(taskType); |
| | | baseMapper.insert(bigStorageCageFeedTask); |
| | | } |
| | | |
| | | @Override |
| | | public List<BigStorageCageFeedTask> querybigStorageCageFeedTask(int taskState){ |
| | | LambdaQueryWrapper<BigStorageCageFeedTask> getFeedTaskWrapper=new LambdaQueryWrapper<>(); |
| | | getFeedTaskWrapper.eq(BigStorageCageFeedTask::getTaskState,1); |
| | | return baseMapper.selectList(getFeedTaskWrapper); |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.bigstoragetask.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageOutTaskMapper; |
| | | import com.mes.bigstoragetask.service.BigStorageCageOutTaskService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Service |
| | | public class BigStorageCageOutTaskServiceImpl extends ServiceImpl<BigStorageCageOutTaskMapper, BigStorageCageOutTask> implements BigStorageCageOutTaskService { |
| | | |
| | | @Override |
| | | public List<BigStorageCageOutTask> querybigStorageCageOutTask(int taskState){ |
| | | LambdaQueryWrapper<BigStorageCageOutTask> getOutTaskWrapper=new LambdaQueryWrapper<>(); |
| | | getOutTaskWrapper.eq(BigStorageCageOutTask::getTaskState,taskState); |
| | | return baseMapper.selectList(getOutTaskWrapper); |
| | | } |
| | | } |
| | |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class PlcStorageCage extends Thread { |
| | | |
| | |
| | | //传入玻璃id |
| | | GlassInfo glassInfo = glassInfoService.getById(plcFeedGlassid); |
| | | |
| | | BigStorageCageDetails SlotInfo = bigStorageCageService.feedGlass(glassInfo, bigStorageCageDetails); |
| | | if (SlotInfo != null) { |
| | | BigStorageCageDetails slotInfo = bigStorageCageService.feedGlass(glassInfo, bigStorageCageDetails); |
| | | if (slotInfo != null) { |
| | | //plc任务发送字 |
| | | } |
| | | } |
New file |
| | |
| | | package com.mes.userinfo.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/task-cache") |
| | | public class TaskCacheController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.edgstoragetask.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | public class TaskCache implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID编号 |
| | | */ |
| | | @TableId("ID") |
| | | private String id; |
| | | |
| | | /** |
| | | * 起始 |
| | | */ |
| | | private String startCell; |
| | | |
| | | /** |
| | | * 目标 |
| | | */ |
| | | private String endCell; |
| | | |
| | | /** |
| | | * 任务类型 1:进 2:出 |
| | | */ |
| | | private String taskType; |
| | | |
| | | /** |
| | | * 任务状态 0 未开始 1已完成 |
| | | */ |
| | | private String taskStauts; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.edgstoragetask.mapper; |
| | | |
| | | import com.mes.edgstoragetask.entity.TaskCache; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface TaskCacheMapper extends BaseMapper<TaskCache> { |
| | | |
| | | } |
New file |
| | |
| | | package com.mes.edgstoragetask.service; |
| | | |
| | | import com.mes.edgstoragetask.entity.TaskCache; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | public interface TaskCacheService extends IService<TaskCache> { |
| | | |
| | | int judgeTasktype(); |
| | | } |
New file |
| | |
| | | package com.mes.edgstoragetask.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper; |
| | | import com.mes.edgstoragetask.entity.TaskCache; |
| | | import com.mes.edgstoragetask.mapper.TaskCacheMapper; |
| | | import com.mes.edgstoragetask.service.TaskCacheService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-16 |
| | | */ |
| | | @Qualifier("") |
| | | @Service |
| | | public class TaskCacheServiceImpl extends ServiceImpl<TaskCacheMapper, TaskCache> implements TaskCacheService { |
| | | @Resource |
| | | private BigStorageCageFeedTaskMapper bigStorageCageFeedTaskMapper; |
| | | @Override |
| | | public int judgeTasktype(){ |
| | | //判断根据当前卧转立任务与磨边线任务判断是否启动卧转立 |
| | | // for (int i=1;i<=2;i++){ |
| | | // //查询卧转立当前任务 |
| | | // int width=5000; |
| | | // int num=0; |
| | | // List<BigStorageCageFeedTask> bgStorageCageFeedTask =bigStorageCageFeedTaskMapper.(); |
| | | // //查询磨边线当前任务 |
| | | // LambdaQueryWrapper<TaskCache> taskCacheWrapper=new LambdaQueryWrapper<>(); |
| | | // taskCacheWrapper.eq(TaskCache::getTaskStauts,"0"); |
| | | // List<TaskCache> taskCacheList=taskCacheService.list(taskCacheWrapper); |
| | | // //判断当前线路还需要再上几片才能满足小车宽度 |
| | | // for (TaskCache taskCache:taskCacheList |
| | | // ) { |
| | | // if(taskCache.getId().equals("1")){ |
| | | // //进片车宽度减去小片宽度 |
| | | // } |
| | | // } |
| | | // //片数小于等于2时另一条线卧转立启动 |
| | | // log.info("发送卧转立启动信号"); |
| | | // } |
| | | return 0; |
| | | } |
| | | } |
| | |
| | | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: beibo.123/ |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: beibo.123/ |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | port: 8084 |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8&characterEncoding=utf-8&useSSL=false |
| | | username: root |
| | | password: beibo.123/ |
| | | dynamic: |
| | | primary: hangzhoumes #设置默认的数据源或者数据源组,默认值即为master |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | hangzhoumes: |
| | | url: jdbc:mysql://10.153.19.150:3306/hangzhoumes?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | package com.mes; |
| | | |
| | | import com.mes.tools.WebSocketServer; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2024/4/7 14:36RRRR |
| | | * @Description: |
| | | */ |
| | | @Slf4j |
| | | @SpringBootApplication |
| | | @EnableSwagger2 |
| | | @EnableDiscoveryClient |
| | | @MapperScan(basePackages = "com.mes.*.mapper") |
| | | public class UnLoadGlassApplication { |
| | |
| | | @RequestMapping("/downGlassInfo") |
| | | public class DownGlassInfoController { |
| | | |
| | | @Autowired |
| | | private DownGlassInfoService downGlassInfoService; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | public Integer getMaxSequenceByFlowCardId(String flowCardId) { |
| | | QueryWrapper<DownGlassInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("flow_card_id", flowCardId); |
| | | queryWrapper.select("MAX(sequence)"); // 选择最大序号 |
| | | queryWrapper.orderByDesc("sequence"); // 按照序号倒序排序 |
| | | queryWrapper.select("sequence").last("LIMIT 1"); // 选择最大序号并限制结果为1条记录 |
| | | DownGlassInfo downGlassInfo = baseMapper.selectOne(queryWrapper); |
| | | if (downGlassInfo != null) { |
| | | return downGlassInfo.getSequence(); // 返回最大序号 |
| | | return downGlassInfo.getSequence(); |
| | | } |
| | | return 0; // 如果没有找到记录,返回0或者其他适当的值 |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public void insertDownGlassInfo(DownGlassInfo downGlassInfo) { |
| | | baseMapper.insert(downGlassInfo); |
| | |
| | | @RequestMapping("/downStorageCage") |
| | | public class DownStorageCageController { |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is null order by escd.slot") |
| | | List<DownStorageCageDetails> SelectCacheLeisure(); |
| | | |
| | | // 查询笼子内出片任务 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot WHERE escd.slot IS NOT NULL order by escd.tempering_layout_id,escd.tempering_feed_sequence") |
| | | List<DownStorageCageDetails> SelectCacheOut(); |
| | | // 查询符合工位的出片玻璃 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot left join down_workstation as dw on escd.flow_card_id=dw.flow_card_id WHERE escd.slot IS NOT NULL and dw.workstation_id BETWEEN #{start} and #{end} order by escd.tempering_layout_id,escd.tempering_feed_sequence") |
| | | List<DownStorageCageDetails> SelectCacheOut(int start,int end); |
| | | |
| | | // 查询笼子内信息 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot order by esc.slot") |
| | | List<DownStorageCageDetails> SelectCachInfo(); |
| | | |
| | | // 查询可进此片玻璃的栅格号 |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null escd.tempering_layout_id=#{tempering_layout_id} and escd.tempering_feed_sequence<#{tempering_feed_sequence} and esc.remain_width-#{width}>0 order by escd.tempering_feed_sequence") |
| | | @Select("select escd.* from down_storage_cage as esc LEFT JOIN down_storage_cage_details as escd on esc.slot=escd.slot where escd.slot is not null and escd.tempering_layout_id=#{tempering_layout_id} and escd.tempering_feed_sequence<#{tempering_feed_sequence} and esc.remain_width-#{width}>0 order by escd.tempering_feed_sequence") |
| | | List<DownStorageCageDetails> SelectIsExistIntoCache(Integer tempering_layout_id, Integer tempering_feed_sequence, |
| | | double width); |
| | | |
| | |
| | | // List<DownGlassTask> SelectOutCacheInfo(); |
| | | |
| | | // 查询 A06 或 A11 最新的一片 出片任务 |
| | | @Select("select * from down_glass_task where task_type='2' and task_stauts='2' and end_cell=#{EndCell} limit 1") |
| | | GlassInfo SelectLastOutCacheInfo(String EndCell); |
| | | // @Select("select * from down_glass_task where task_type='2' and task_stauts='2' and end_cell=#{EndCell} limit 1") |
| | | // GlassInfo SelectLastOutCacheInfo(String EndCell); |
| | | |
| | | // 修改笼子内信息 |
| | | // @Update("update") |
| | |
| | | import com.mes.common.S7control; |
| | | import com.mes.device.PlcParameterObject; |
| | | |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | import com.mes.downglassinfo.service.DownGlassTaskService; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.mapper.DownStorageCageDetailsMapper; |
| | | import com.mes.downworkstation.mapper.DownWorkstationMapper; |
| | |
| | | private DownStorageCageDetailsMapper selectInfo; |
| | | private GlassInfoService GlassInfoService; |
| | | private DownStorageCageDetailsService downStorageCageDetailsService; |
| | | private DownGlassTaskService downGlassTaskService; |
| | | |
| | | /** |
| | | * @param Number |
| | |
| | | //2.回复 1进片 |
| | | DownStorageCageDetails item=list.get(0); |
| | | selectInfo.insertCacheTask(GlassInfo.getId()+"","0",item.getSlot()+"","1",GlassInfo.getWidth(),GlassInfo.getHeight(),GlassInfo.getFilmsid(),GlassInfo.getThickness(),GlassInfo.getFlowcardId()); |
| | | |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | return true; |
| | | } |
| | |
| | | return false; |
| | | } |
| | | //理片 出 |
| | | public boolean processOut(){ |
| | | //查询任务 |
| | | String G06=S7control.getinstance().ReadWord("DB14.56", 1).get(0)+""; |
| | | String G11=S7control.getinstance().ReadWord("DB14.58", 1).get(0)+""; |
| | | String G13=S7control.getinstance().ReadWord("DB14.58", 1).get(0)+""; |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | List<DownStorageCageDetails> list=selectInfo.SelectCacheOut(); |
| | | //其他情况条件 如:后续设备故障禁止理片出片 等 |
| | | boolean isOut=true; |
| | | if (list.size()>0&&isOut) { |
| | | DownStorageCageDetails item=list.get(0); |
| | | // |
| | | if(G06=="0"&&G11=="1"){ |
| | | //出到 G06 |
| | | public boolean processOut() { |
| | | // 查询任务 |
| | | String G06 = S7control.getinstance().ReadWord("DB14.56", 1).get(0) + ""; |
| | | String G11 = S7control.getinstance().ReadWord("DB14.58", 1).get(0) + ""; |
| | | String G13 = S7control.getinstance().ReadWord("DB14.58", 1).get(0) + ""; |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | List<DownStorageCageDetails> list = selectInfo.SelectCacheOut(1, 5); |
| | | List<DownStorageCageDetails> list2 = selectInfo.SelectCacheOut(6, 10); |
| | | List<DownStorageCageDetails> list3 = selectInfo.SelectCacheOut(1, 10); |
| | | |
| | | selectInfo.insertCacheTask(item.getGlassId()+"","0","06","2",item.getWidth(),item.getHeight(),item.getFilmsid(),item.getThickness(),item.getFlowCardId()); |
| | | // 按照顺序符合前端出片 |
| | | if (!list.isEmpty()) { |
| | | DownStorageCageDetails item = list.get(0); |
| | | if (G06.equals("0") && G11.equals("1")) { |
| | | // 出到 G06 |
| | | selectInfo.insertCacheTask(item.getGlassId() + "", "0", "06", "2", item.getWidth(), item.getHeight(), item.getFilmsid(), item.getThickness(), item.getFlowCardId()); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "1"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | }else if(G06=="1"&&G11=="0"){ |
| | | //出到 G11 |
| | | |
| | | selectInfo.insertCacheTask(item.getGlassId()+"","0","11","2",item.getWidth(),item.getHeight(),item.getFilmsid(),item.getThickness(),item.getFlowCardId()); |
| | | } |
| | | // 按照顺序符合后端出片 |
| | | } else if (!list2.isEmpty()) { |
| | | DownStorageCageDetails item2 = list2.get(0); |
| | | if (G06.equals("1") && G11.equals("0")) { |
| | | // 出到 G11 |
| | | selectInfo.insertCacheTask(item2.getGlassId() + "", "0", "11", "2", item2.getWidth(), item2.getHeight(), item2.getFilmsid(), item2.getThickness(), item2.getFlowCardId()); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), "2"); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | }else if(G06=="0"&&G11=="0"){ |
| | | //都允许 G04/G05 上一片是否和此片玻璃尺寸尺寸相同 |
| | | String endcell="06"; |
| | | String SendEndcell="1"; |
| | | boolean If_=false; |
| | | GlassInfo glassInfo06= selectInfo.SelectLastOutCacheInfo("06"); |
| | | GlassInfo glassInfo11= selectInfo.SelectLastOutCacheInfo("11"); |
| | | GlassInfo glassInfo13= selectInfo.SelectLastOutCacheInfo("13"); |
| | | if(glassInfo06!=null&& glassInfo11.getWidth().equals(item.getWidth()) && glassInfo06.getHeight().equals(item.getHeight())){ |
| | | endcell="11"; |
| | | SendEndcell="2"; |
| | | }else if(item.getHeight()>=3440&&item.getWidth()>=1440){ |
| | | //其他条件人工处理 |
| | | } |
| | | // 超出尺寸优先人工出片 人工处理 |
| | | } else if (!list3.isEmpty()) { |
| | | DownStorageCageDetails item3 = list3.get(0); |
| | | if (item3.getHeight() >= 3440 && item3.getWidth() >= 1440) { |
| | | |
| | | } |
| | | String endcell = "06"; |
| | | String SendEndcell = "1"; |
| | | |
| | | selectInfo.insertCacheTask(item.getGlassId()+"","0",endcell,"2",item.getWidth(),item.getHeight(),item.getFilmsid(),item.getThickness(),item.getFlowCardId()); |
| | | selectInfo.insertCacheTask(item3.getGlassId() + "", "0", endcell, "2", item3.getWidth(), item3.getHeight(), item3.getFilmsid(), item3.getThickness(), item3.getFlowCardId()); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.28").getAddress(), SendEndcell); |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter("DB14.20").getAddress(), "1"); |
| | | return true; |
| | | } |
| | | } |
| | | //返回结果 |
| | | |
| | | // 返回结果 |
| | | return false; |
| | | } |
| | | |
| | | //查询是否绑定架子 |
| | | // public boolean selectFlowCardId(String FlowCardId){ |
| | | // |
| | |
| | | */ |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/downWorkstation") |
| | | @RequestMapping("/api/unLoadGlass") |
| | | public class DownWorkstationController { |
| | | |
| | | @Autowired |
| | |
| | | package com.mes.downworkstation.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | |
| | | private Integer workState; |
| | | |
| | | |
| | | private Integer total_quantity; |
| | | @TableField("total_quantity") |
| | | private Integer totalquantity; |
| | | |
| | | @TableField("racks_number") |
| | | private Integer Racksnumber; |
| | | |
| | | |
| | |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Mapper |
| | | |
| | | @Repository |
| | | @InterceptorIgnore(tenantLine = "true") |
| | | // 指定使用 hangzhoumes 数据源 |
| | | @DS("hangzhoumes") // 指定使用 hangzhoumes 数据源 |
| | | |
| | | public interface DownWorkstationMapper extends BaseMapper<DownWorkstation> { |
| | | |
| | | |
| | |
| | | List<DownWorkstation> selectdownWorkstationstate(); |
| | | |
| | | |
| | | @Select("SELECT flow_card_id,filmsid,width,height,thickness FROM down_glass_task WHERE task_stauts = 1;") |
| | | List<DownGlassTask> selectunloadingtaskstate(); |
| | | // @Select("SELECT flow_card_id,filmsid,width,height,thickness FROM down_glass_task WHERE task_stauts = 1;") |
| | | // List<DownGlassTask> selectunloadingtaskstate(); |
| | | //更新落架数量 |
| | | // @Update("UPDATE down_workstation SET racks_number = #{racksNumber} " + |
| | | // "WHERE flow_card_id = #{flowCardId}") |
| | |
| | | downGlassInfoService = WebSocketServer.applicationContext.getBean(DownGlassInfoService.class);
|
| | | downGlassInfoMapper = WebSocketServer.applicationContext.getBean(DownGlassInfoMapper.class);
|
| | | downGlassTaskService = WebSocketServer.applicationContext.getBean(DownGlassTaskService.class);
|
| | | List<DownGlassTask> taskdownGlassInf = downWorkstationMapper.selectunloadingtaskstate();
|
| | | List<DownGlassTask> taskdownGlassInf = downGlassTaskService.getUnloadingTaskState();
|
| | | //
|
| | |
|
| | |
|
| | |
| | | if (taskdownWorkstation != null && !taskdownWorkstation.isEmpty()) {
|
| | | //,如果已经绑定则更新已落架数量,并且删除下片任务表中的记录
|
| | | for (DownWorkstation downWorkstation : taskdownWorkstation) {
|
| | |
|
| | | //更新下片工位表中已落架数量
|
| | | downWorkstationService.updateracksnumber(downWorkstation.getFlowCardId(), downWorkstation.getRacksnumber() + 1);
|
| | |
|
| | | //更新机械任务表中状态为0
|
| | | downWorkstationTaskService.updateTaskStateToZero(downWorkstation.getFlowCardId());
|
| | | //删除下片任务表中的记录
|
| | |
| | | .eq("workstation_id", workstationId); |
| | | |
| | | DownWorkstation result = baseMapper.selectOne(queryWrapper); |
| | | return result != null ? result.getTotal_quantity() : 0; |
| | | return result != null ? result.getTotalquantity() : 0; |
| | | } |
| | | |
| | | // @Override |
| | |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | |
| | | # sqlserver: |
| | | # url: jdbc:sqlserver://localhost:1433;databaseName=hangzhoumes |
| | | # username: sa |
| | | # password: beibo.123/ |
| | | # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | port: 6379 |
| | | password: 123456 |
| | | mybatis-plus: |
| | | |
| | | mapper-locations: classpath*:mapper/sqlserver/*.xml |
| | | mapper-locations: classpath*:mapper/**/*.xml |
| | | |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | # 设置 MyBatis 日志级别为 ERROR |