Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
# Conflicts:
# hangzhoumesParent/moduleService/UnLoadGlassModule/pom.xml
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/DownGlassTaskService.java
# hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassTaskServiceImpl.java
| | |
| | | <artifactId>hangzhoumesParent</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | |
| | | <artifactId>common</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | |
| | | * @since 2024-04-16 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/optimize-detail") |
| | | @RequestMapping("/optimize-detail") |
| | | public class OptimizeDetailController { |
| | | |
| | | } |
| | |
| | | * @since 2024-04-16 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/optimize-layout") |
| | | @RequestMapping("/optimize-layout") |
| | | public class OptimizeLayoutController { |
| | | |
| | | } |
| | |
| | | @RestController |
| | | @RequestMapping("/optimizeProject") |
| | | @Slf4j |
| | | |
| | | public class OptimizeProjectController { |
| | | @Autowired |
| | | //获取待选择的工程号 |
| | |
| | | @PostMapping("/saveProject") //显示工程选择信息 |
| | | public Result<List<OptimizeProject>> saveProject(@RequestBody OptimizeRequest optimizeRequest) { |
| | | log.info("获取选择好的工程id进行查询数据后保存"); |
| | | List<OptimizeProject> glass = optimizeProjectService.saveProject(optimizeRequest); |
| | | log.info("显示工程选择信息后进行保存:{}", glass); |
| | | List<OptimizeProject> glass = optimizeProjectService.selectSaveProject(optimizeRequest); |
| | | log.info("显示工程选择信息后保存到upPattenUsage表:{}", glass); |
| | | optimizeProjectService.insetupPattenUsage(glass); |
| | | //void insetProject(glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 查询可领取的任务工程信息 |
| | | * |
| | | * @return |
| | | */ |
| | | List<OptimizeProject> listByState(OptimizeRequest optimizeRequest); |
| | | |
| | | /** |
| | | * 查询保存到原片使用详情表的数据 |
| | | * |
| | | * @return |
| | | */ |
| | | List<OptimizeProject> saveProject(OptimizeRequest optimizeRequest); |
| | | |
| | | List<OptimizeProject> selectSaveProject(OptimizeRequest optimizeRequest); |
| | | /** |
| | | * 将工程信息保存到原片使用详情表 |
| | | * |
| | | * @return |
| | | */ |
| | | void insetProject(OptimizeProject glass); |
| | | void insetupPattenUsage(List<OptimizeProject> glass); |
| | | } |
| | |
| | | import com.mes.pp.entity.request.OptimizeRequest; |
| | | import com.mes.pp.mapper.OptimizeProjectMapper; |
| | | import com.mes.pp.service.OptimizeProjectService; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.uppattenusage.mapper.UpPattenUsageMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Slf4j |
| | | public class OptimizeProjectServiceImpl extends ServiceImpl<OptimizeProjectMapper, OptimizeProject> implements OptimizeProjectService { |
| | | |
| | | |
| | | @Resource |
| | | UpPattenUsageMapper upPattenUsageMapper; |
| | | @Override |
| | | public List<OptimizeProject> listByState(OptimizeRequest optimizeRequest) { |
| | | log.info("将参数传入到查询类里,工程号做非空判断模糊查询"); |
| | |
| | | |
| | | |
| | | @Override |
| | | public void insetProject(OptimizeProject glass) { |
| | | |
| | | public void insetupPattenUsage(List<OptimizeProject> glass) { |
| | | log.info("循环查询结果保存到UpPattenUsage表中"); |
| | | for (OptimizeProject project : glass) { |
| | | UpPattenUsage upPattenUsage = new UpPattenUsage(); |
| | | upPattenUsage.setEngineeringId(project.getProjectNo()); |
| | | upPattenUsage.setFilmsId(project.getGlassType()); |
| | | upPattenUsage.setState(project.getState()); |
| | | upPattenUsageMapper.insert(upPattenUsage); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<OptimizeProject> saveProject(OptimizeRequest optimizeRequest) { |
| | | public List<OptimizeProject> selectSaveProject(OptimizeRequest optimizeRequest) { |
| | | log.info("将参数传入到查询类里,工程号做非空判断模糊查询"); |
| | | |
| | | log.info("返回工程信息"); |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @since 2024-04-18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/up-patten-usage") |
| | | @RequestMapping("/up-patten-usage") |
| | | @Slf4j |
| | | public class UpPattenUsageController { |
| | | |
| | |
| | | log.info("显示工位上的玻璃信息:{}", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @ApiOperation("点击选择工程保存后进行调用,传入工程号") |
| | | @GetMapping("/saveUpPattenUsage") //查询现在上片机的玻璃信息 |
| | | public Result<List<UpPattenUsage>> saveUpPattenUsage(@RequestBody String engineeringId) { |
| | | List<UpPattenUsage> glass = upPattenUsageService.saveUpPattenUsage(engineeringId); |
| | | log.info("显示工位上的玻璃信息:{}", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | } |
| | | |
| | |
| | | /** |
| | | * 膜系id |
| | | */ |
| | | private Integer filmsId; |
| | | private String filmsId; |
| | | |
| | | /** |
| | | * 宽 |
| | |
| | | */ |
| | | public interface UpPattenUsageService extends IService<UpPattenUsage> { |
| | | List<UpPattenUsage> prioritylist(int state); |
| | | |
| | | List<UpPattenUsage> saveUpPattenUsage(String engineeringId); |
| | | } |
| | | |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return this.list(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<UpPattenUsage> saveUpPattenUsage(String engineeringId) { |
| | | List<UpPattenUsage> list = this.list(); |
| | | if (engineeringId != null) { |
| | | LambdaQueryWrapper<UpPattenUsage> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(UpPattenUsage::getEngineeringId,engineeringId); |
| | | return this.list(wrapper); |
| | | } |
| | | return Collections.emptyList(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | <artifactId>common</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | |
| | | <artifactId>hangzhoumesParent</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | |
| | | <artifactId>moduleService</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | |
| | | <artifactId>junit</artifactId> |
| | | <scope>test</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.yulichang</groupId> |
| | | <artifactId>mybatis-plus-join</artifactId> |
| | | <version>1.1.6</version> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.github.yulichang</groupId>--> |
| | | <!-- <artifactId>mybatis-plus-join-boot-starter</artifactId>--> |
| | | <!-- <artifactId>mybatis-plus-join</artifactId>--> |
| | | <!-- <version>1.1.6</version>--> |
| | | <!-- </dependency>--> |
| | | <dependency> |
| | | <groupId>com.github.yulichang</groupId> |
| | | <artifactId>mybatis-plus-join-boot-starter</artifactId> |
| | | <version>1.4.12</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <properties> |
| | |
| | | package com.mes.edgstoragecage.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface EdgStorageCageDetailsService extends IService<EdgStorageCageDetails> { |
| | | public interface EdgStorageCageDetailsService extends MPJBaseService<EdgStorageCageDetails> { |
| | | |
| | | /** |
| | | * 识别 破损/拿走 |
| | |
| | | package com.mes.edgstoragecage.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.github.yulichang.base.MPJBaseService; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | public interface EdgStorageCageService extends IService<EdgStorageCage> { |
| | | public interface EdgStorageCageService extends MPJBaseService<EdgStorageCage> { |
| | | |
| | | //查询笼内空格 |
| | | List<Map> selectCacheEmpty(); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCageDetails; |
| | | import com.mes.edgstoragecage.mapper.EdgStorageCageDetailsMapper; |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Service |
| | | public class EdgStorageCageDetailsServiceImpl extends ServiceImpl<EdgStorageCageDetailsMapper, EdgStorageCageDetails> implements EdgStorageCageDetailsService { |
| | | public class EdgStorageCageDetailsServiceImpl extends MPJBaseServiceImpl<EdgStorageCageDetailsMapper, EdgStorageCageDetails> implements EdgStorageCageDetailsService { |
| | | //获取全部数据 |
| | | @Autowired |
| | | private EdgStorageCageDetailsMapper edgStorageCageDetailsMapper; |
| | | |
| | | //识别 破损/拿走 |
| | | public boolean identWorn(String glassid, int ControlsId) { |
| | | List<EdgStorageCageDetails> edgStorageCageDetails = edgStorageCageDetailsMapper.selectList(new QueryWrapper<EdgStorageCageDetails>().eq("glassid", glassid)); |
| | | if (edgStorageCageDetails.size() == 1) { |
| | | edgStorageCageDetailsMapper.update(edgStorageCageDetails.get(0), new QueryWrapper<EdgStorageCageDetails>().eq("glassid", glassid)); |
| | | return true; |
| | | } |
| | | // List<EdgStorageCageDetails> edgStorageCageDetails = edgStorageCageDetailsMapper.selectList(new QueryWrapper<EdgStorageCageDetails>().eq("glassid", glassid)); |
| | | // if (edgStorageCageDetails.size() == 1) { |
| | | // edgStorageCageDetailsMapper.update(edgStorageCageDetails.get(0), new QueryWrapper<EdgStorageCageDetails>().eq("glassid", glassid)); |
| | | // return true; |
| | | // } |
| | | return false; |
| | | } |
| | | |
| | | //获取 切割当前版图 |
| | | @Override |
| | | public List<Map> selectCutTerritory() { |
| | | List<Map> list = edgStorageCageDetailsMapper.selectJoinList( |
| | | Map.class, new MPJQueryWrapper<EdgStorageCageDetails>().selectAll(EdgStorageCageDetails.class) |
| | | .select("escd.glass_id", "escd.flow_card_id", "escd.width", "escd.height") |
| | | .leftJoin("glass_info gi on t.layout_sequence=gi.pattern_sequence and t.engineering_id=gi.engineer_id") |
| | | .leftJoin("edg_storage_cage_details escd on gi.id=escd.glass_id") |
| | | .eq("state", 1) |
| | | .orderByAsc("t.layout_sequence") |
| | | ); |
| | | return list; |
| | | // List<Map> list = edgStorageCageDetailsMapper.selectJoinList( |
| | | // Map.class, new MPJQueryWrapper<EdgStorageCageDetails>().selectAll(EdgStorageCageDetails.class) |
| | | // .select("escd.glass_id", "escd.flow_card_id", "escd.width", "escd.height") |
| | | // .leftJoin("glass_info gi on t.layout_sequence=gi.pattern_sequence and t.engineering_id=gi.engineer_id") |
| | | // .leftJoin("edg_storage_cage_details escd on gi.id=escd.glass_id") |
| | | // .eq("state", 1) |
| | | // .orderByAsc("t.layout_sequence") |
| | | // ); |
| | | // return list; |
| | | |
| | | return null; |
| | | } |
| | | |
| | | //获取 工程下的当前版图 |
| | | @Override |
| | | public List<Map> selectCurrentCutTerritory(String current) { |
| | | List<Map> list = edgStorageCageDetailsMapper.selectJoinList( |
| | | Map.class, new MPJQueryWrapper<EdgStorageCageDetails>().selectAll(EdgStorageCageDetails.class) |
| | | .select("escd.glass_id", "escd.flow_card_id", "escd.width", "escd.height") |
| | | .leftJoin("glass_info gi on t.layout_sequence=gi.pattern_sequence and t.engineering_id=gi.engineer_id") |
| | | .leftJoin("edg_storage_cage_details escd on gi.id=escd.glass_id") |
| | | .eq("t.engineering_id", current) |
| | | .orderByAsc("t.layout_sequence") |
| | | ); |
| | | return list; |
| | | // List<Map> list = edgStorageCageDetailsMapper.selectJoinList( |
| | | // Map.class, new MPJQueryWrapper<EdgStorageCageDetails>().selectAll(EdgStorageCageDetails.class) |
| | | // .select("escd.glass_id", "escd.flow_card_id", "escd.width", "escd.height") |
| | | // .leftJoin("glass_info gi on t.layout_sequence=gi.pattern_sequence and t.engineering_id=gi.engineer_id") |
| | | // .leftJoin("edg_storage_cage_details escd on gi.id=escd.glass_id") |
| | | // .eq("t.engineering_id", current) |
| | | // .orderByAsc("t.layout_sequence") |
| | | // ); |
| | | // return list; |
| | | return null; |
| | | } |
| | | |
| | | ; |
| | |
| | | package com.mes.edgstoragecage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.edgstoragecage.entity.EdgStorageCage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | * @since 2024-04-07 |
| | | */ |
| | | @Service |
| | | public class EdgStorageCageServiceImpl extends ServiceImpl<EdgStorageCageMapper, EdgStorageCage> implements EdgStorageCageService { |
| | | public class EdgStorageCageServiceImpl extends MPJBaseServiceImpl<EdgStorageCageMapper, EdgStorageCage> implements EdgStorageCageService { |
| | | |
| | | @Autowired |
| | | EdgStorageCageMapper edgStorageCageMapper; |
| | |
| | | @Override |
| | | //查询笼内空格 |
| | | public List<Map> selectCacheEmpty(){ |
| | | List<Map> map=edgStorageCageMapper.selectJoinList( |
| | | Map.class,new MPJQueryWrapper<EdgStorageCage>().selectAll(EdgStorageCage.class) |
| | | .select("escd.glass_id","escd.flow_card_id","escd.width","escd.height") |
| | | .leftJoin("edg_storage_cage_details escd on t.device_id=escd.device_id and t.slot=escd.slot") |
| | | .isNull("escd.slot") |
| | | ); |
| | | return map; |
| | | // List<Map> map=edgStorageCageMapper.selectJoinList( |
| | | // Map.class,new MPJQueryWrapper<EdgStorageCage>().selectAll(EdgStorageCage.class) |
| | | // .select("escd.glass_id","escd.flow_card_id","escd.width","escd.height") |
| | | // .leftJoin("edg_storage_cage_details escd on t.device_id=escd.device_id and t.slot=escd.slot") |
| | | // .isNull("escd.slot") |
| | | // ); |
| | | // return map; |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | //查询笼内出片任务 按钢化版图号+版图内序号 |
| | | public List<Map> selectCacheOut(){ |
| | | List<Map> list= upPattenUsageMapper.selectJoinList( |
| | | Map.class,new MPJQueryWrapper<UpPattenUsage>().selectAll(UpPattenUsage.class) |
| | | .select("escd.glass_id","escd.flow_card_id","escd.width","escd.height") |
| | | .leftJoin("edg_storage_cage_details escd on t.device_id=escd.device_id and t.slot=escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .orderByAsc("escd.tempering_layout_id","escd.tempering_feed_sequence") |
| | | ); |
| | | return list; |
| | | // List<Map> list= upPattenUsageMapper.selectJoinList( |
| | | // Map.class,new MPJQueryWrapper<UpPattenUsage>().selectAll(UpPattenUsage.class) |
| | | // .select("escd.glass_id","escd.flow_card_id","escd.width","escd.height") |
| | | // .leftJoin("edg_storage_cage_details escd on t.device_id=escd.device_id and t.slot=escd.slot") |
| | | // .isNotNull("escd.slot") |
| | | // .orderByAsc("escd.tempering_layout_id","escd.tempering_feed_sequence") |
| | | // ); |
| | | // return list; |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | //理片缓存详情 |
| | | public List<Map> selectEdgStorageCages(){ |
| | | List<Map> map=edgStorageCageMapper.selectJoinList( |
| | | Map.class,new MPJQueryWrapper<EdgStorageCage>().selectAll(EdgStorageCage.class) |
| | | .select("escd.glass_id","escd.flow_card_id","escd.width","escd.height") |
| | | .leftJoin("edg_storage_cage_details escd on t.device_id=escd.device_id and t.slot=escd.slot") |
| | | ); |
| | | return map; |
| | | // List<Map> map=edgStorageCageMapper.selectJoinList( |
| | | // Map.class,new MPJQueryWrapper<EdgStorageCage>().selectAll(EdgStorageCage.class) |
| | | // .select("escd.glass_id","escd.flow_card_id","escd.width","escd.height") |
| | | // .leftJoin("edg_storage_cage_details escd on t.device_id=escd.device_id and t.slot=escd.slot") |
| | | // ); |
| | | // return map; |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Autowired |
| | | private GlassInfoServiceImpl GlassInfoServiceImpl; |
| | | |
| | | @PostMapping("/selectId") // 查询切割版图信息-根据 工程号 |
| | | @PostMapping("/selectId") // |
| | | @ResponseBody |
| | | public Result selectId(String ProcessId) { |
| | | List<GlassInfo> list = GlassInfoServiceImpl.selectId(ProcessId); |
| | | return Result.build(200,"成功",list); |
| | | } |
| | | |
| | | @PostMapping("/selectAll") // 查询切割版图信息-根据 工程号 |
| | | @PostMapping("/selectAll") // |
| | | @ResponseBody |
| | | public Result selectAll() { |
| | | List<GlassInfo> list = GlassInfoServiceImpl.selectAll(); |
| | | return Result.build(200,"成功",list); |
| | | } |
| | | |
| | | @PostMapping("/selectFlowCardId") // 查询切割版图信息-根据 工程号 |
| | | @PostMapping("/selectFlowCardId") // |
| | | @ResponseBody |
| | | public Result selectFlowCardId(String flowCardId) { |
| | | List<GlassInfo> list = GlassInfoServiceImpl.selectFlowCardId(flowCardId); |
| | |
| | | <artifactId>moduleService</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | |
| | | |
| | | |
| | | 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; |
| | |
| | | */ |
| | | @ApiModel("进片任务信息") |
| | | @RestController |
| | | @RequestMapping("/userinfo/big-storage-cage-feed-task") |
| | | @RequestMapping("/big-storage-cage-feed-task") |
| | | public class BigStorageCageFeedTaskController { |
| | | |
| | | @Autowired |
| | |
| | | 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 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; |
| | |
| | | */ |
| | | @ApiModel("出片任务信息") |
| | | @RestController |
| | | @RequestMapping("/userinfo/big-storage-cage-out-task") |
| | | @RequestMapping("/big-storage-cage-out-task") |
| | | public class BigStorageCageOutTaskController { |
| | | |
| | | @Autowired |
| | |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | |
| | | * @since 2024-04-16 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/userinfo/task-cache") |
| | | @RequestMapping("/task-cache") |
| | | public class TaskCacheController { |
| | | |
| | | } |
| | |
| | | <artifactId>moduleService</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | |
| | | |
| | | //新增工位信息修改一条工位信息,接收实例类字段为宽高厚膜系数量工位id |
| | | //删除工位信息也用这个,除了工位id玻璃信息传null |
| | | @ApiOperation("修改工位表增加玻璃信息或者删除玻璃信息") |
| | | @ApiOperation("修改工位表增加玻璃信息或者删除玻璃信息,传递Upworkstation类,只修改宽高厚数量膜系") |
| | | @PostMapping("/updateGlassMessage") |
| | | @ResponseBody |
| | | public void updateGlassMessage(@RequestBody UpWorkstation upwork) { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | <artifactId>moduleService</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | |
| | | <artifactId>moduleService</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | |
| | | <version>2.8.9</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>com.github.yulichang</groupId> |
| | | <artifactId>mybatis-plus-join</artifactId> |
| | | <version>1.1.6</version> |
| | | <version>1.2.4</version> |
| | | </dependency> |
| | | |
| | | |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>com.microsoft.sqlserver</groupId> |
| | | <artifactId>sqljdbc4</artifactId> |
| | | <version>4.0</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | package com.mes.downglassinfo.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableId(value = "id") |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | package com.mes.downglassinfo.mapper; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.downglassinfo.entity.DownGlassTask; |
| | | |
| | |
| | | * @author zhoush |
| | | * @since 2024-04-07 |
| | | */ |
| | | @DS("salve_hangzhoumes") |
| | | public interface DownGlassTaskMapper extends BaseMapper<DownGlassTask> { |
| | | |
| | | |
| | |
| | | |
| | | List<DownGlassTask> getUnloadingTaskState(); |
| | | |
| | | void updateTaskStateToZero(String flowCardId); |
| | | void updateTaskStateToZero(long id); |
| | | |
| | | void deleteTask(String flowCardId); |
| | | void deleteTask(long id); |
| | | |
| | | DownGlassTask selectLastOutCacheInfo(String endCell); |
| | | |
| | | Integer insertCacheTask(long id, String start, String end, String type, double width, double height, String filmsId, double thickness, String flowCardId); |
| | | Integer insertCacheTask(Long id, String start, String end, String type, double width, double height, String filmsId, double thickness, String flowCardId); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void updateTaskStateToZero(String flowCardId) { |
| | | public void updateTaskStateToZero(long id) { |
| | | UpdateWrapper<DownGlassTask> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("task_stauts", 0).eq("flow_card_id", flowCardId); |
| | | updateWrapper.set("task_stauts", 0).eq("id", id); |
| | | baseMapper.update(null, updateWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteTask(String flowCardId) { |
| | | public void deleteTask(long id) { |
| | | LambdaQueryWrapper<DownGlassTask> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(DownGlassTask::getFlowCardId, flowCardId); |
| | | queryWrapper.eq(DownGlassTask::getId, id); |
| | | |
| | | baseMapper.delete(queryWrapper); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertCacheTask(long id, String start, String end, String type, double width, double height, String filmsId, double thickness, String flowCardId) { |
| | | public Integer insertCacheTask(Long id, String start, String end, String type, double width, double height, String filmsId, double thickness, String flowCardId) { |
| | | DownGlassTask glassInfo = new DownGlassTask(); |
| | | glassInfo.setId(id); |
| | | glassInfo.setStartCell(start); |
| | |
| | | |
| | | |
| | | |
| | | // public void identify(String Number) { |
| | | // //查询任务 |
| | | // PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(), (short) 1); |
| | | // String s = S7control.getinstance().ReadWord("DB14.26", 1).get(0) + ""; |
| | | // boolean isexist = isExist(Number); |
| | | // if (isexist) { |
| | | // //存在逻辑 1.添加信息 2.回复PLC存在 |
| | | // //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 1); |
| | | // } else { |
| | | // //不存在逻辑 1.回复PLC不存在 |
| | | // //S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToGaStatus").getAddress(),(short) 2); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | public void process() { |
| | | String result = S7control.getinstance().ReadWord("DB14.0", 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); |
| | | List<DownStorageCageDetails> list = downStorageCageService.getCacheOut(1, 5); |
| | | List<DownStorageCageDetails> list2 = downStorageCageService.getCacheOut(6, 10); |
| | | List<DownStorageCageDetails> list3 = downStorageCageService.getCacheOut(1, 10); |
| | | // 优先 超出尺寸优先人工出片 人工处理 |
| | | if (!list3.isEmpty()) { |
| | | DownStorageCageDetails item3 = list3.get(0); |
| | |
| | | // 返回结果 |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | .leftJoin("glass_info gi on dw.flow_card_id = gi.flowcard_id and gi.flowcard_id=escd.flow_card_id ") |
| | | .isNotNull("escd.slot") |
| | | .between("dw.workstation_id", start, end) |
| | | .orderByDesc("gi.width, gi.height, escd.tempering_layout_id") |
| | | .orderByDesc("escd.width") |
| | | .orderByDesc("escd.height") |
| | | ); |
| | | return list; |
| | | } |
| | |
| | | |
| | | downWorkstationTaskService.insertdownWorkstationtask(newdownGlassInfo); |
| | | //更新下片任务表状态为0 |
| | | downGlassTaskService.updateTaskStateToZero(downGlassInfo.getFlowCardId()); |
| | | downGlassTaskService.updateTaskStateToZero(downGlassInfo.getId()); |
| | | |
| | | sequence++; // 递增顺序字段值 |
| | | |
| | |
| | | //更新下片工位表中已落架数量 |
| | | downWorkstationService.updateracksnumber(downWorkstation.getFlowCardId(), downWorkstation.getRacksnumber() + 1); |
| | | //更新机械任务表中状态为0 |
| | | downWorkstationTaskService.updateTaskStateToZero(downWorkstation.getFlowCardId()); |
| | | downWorkstationTaskService.updateTaskStateToZero(downWorkstation.getId()); |
| | | |
| | | //删除下片任务表中的记录 |
| | | downGlassTaskService.deleteTask(downWorkstation.getFlowCardId()); |
| | | downGlassTaskService.deleteTask(downWorkstation.getId()); |
| | | |
| | | } |
| | | } |
| | |
| | | public interface DownWorkstationTaskService extends IService<DownWorkstationTask> { |
| | | void insertdownWorkstationtask(DownGlassInfo downGlassInfo); |
| | | |
| | | void updateTaskStateToZero(String flowCardId); |
| | | void updateTaskStateToZero(long Id); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void updateTaskStateToZero(String flowCardId) { |
| | | public void updateTaskStateToZero(long id) { |
| | | UpdateWrapper<DownWorkstationTask> updateWrapper = new UpdateWrapper<>(); |
| | | updateWrapper.set("state", 0).eq("flow_card_id", flowCardId); |
| | | updateWrapper.set("state", 0).eq("id", id); |
| | | |
| | | baseMapper.update(null, updateWrapper); |
| | | } |
| | |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | salve_hangzhoumes: |
| | | url: jdbc:sqlserver://10.153.19.150:1433;databasename=hangzhoumes |
| | | username: sa |
| | | password: beibo.123/ |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | cloud: |
| | | nacos: |
| | | discovery: |
| | |
| | | <artifactId>hangzhoumesParent</artifactId> |
| | | <groupId>com.mes</groupId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-parent</artifactId> |
| | | <version>2.1.8.RELEASE</version> |
| | | <relativePath/> |
| | | </parent> |
| | | |
| | | <properties> |