| | |
| | | package com.mes.uppattenusage.controller; |
| | | |
| | | |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.uppattenusage.entity.OptimizeUpPattenUsage; |
| | | import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.uppattenusage.service.UpPattenUsageService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-04-18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/up-patten-usage") |
| | | @Slf4j |
| | | public class UpPattenUsageController { |
| | | |
| | | @Autowired |
| | | private UpPattenUsageService upPattenUsageService; |
| | | @Autowired |
| | | private GlassInfoService glassInfoService; |
| | | @ApiOperation("显示正在出片的工程信息") |
| | | @GetMapping("/prioritylist") //查询现在上片机的玻璃信息 |
| | | public Result<List<UpPattenUsage>> prioritylist() { |
| | | List<UpPattenUsage> glass = upPattenUsageService.prioritylist(1); |
| | | log.info("显示工位上的玻璃信息:{}", glass); |
| | | return Result.build(200, "", glass); |
| | | } |
| | | |
| | | @ApiOperation("点击选择工程保存后进行调用,传入工程号") |
| | | @GetMapping("/saveUpPattenUsage") //查询现在上片机的玻璃信息 |
| | | public Result<Integer> saveUpPattenUsage(String engineeringId) { |
| | | List<UpPattenUsage> upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineeringId); |
| | | log.info("将查询出的UpPattenUsage数据保存到数据库表里"); |
| | | upPattenUsageService.saveUpPattenUsage(upPattenUsages); |
| | | log.info("从PP表查询glassinfo的数据并保存到表里"); |
| | | List<GlassInfo> glassinfo=glassInfoService.selectGlassInfo(engineeringId); |
| | | return Result.build(200, "", 200); |
| | | } |
| | | } |
| | | // |
| | | //import com.mes.uppattenusage.service.GlassInfoService; |
| | | //import com.mes.uppattenusage.entity.OptimizeUpPattenUsage; |
| | | //import com.mes.uppattenusage.entity.UpPattenUsage; |
| | | //import com.mes.glassinfo.entity.GlassInfo; |
| | | //import com.mes.uppattenusage.service.UpPattenUsageService; |
| | | //import com.mes.utils.Result; |
| | | //import io.swagger.annotations.ApiOperation; |
| | | //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; |
| | | // |
| | | ///** |
| | | // * <p> |
| | | // * 前端控制器 |
| | | // * </p> |
| | | // * |
| | | // * @author zhoush |
| | | // * @since 2024-04-18 |
| | | // */ |
| | | //@RestController |
| | | //@RequestMapping("/up-patten-usage") |
| | | //@Slf4j |
| | | //public class UpPattenUsageController { |
| | | // |
| | | // @Autowired |
| | | // private UpPattenUsageService upPattenUsageService; |
| | | // @Autowired |
| | | // private GlassInfoService glassInfoService; |
| | | // @ApiOperation("显示正在出片的工程信息") |
| | | // @GetMapping("/prioritylist") //查询现在上片机的玻璃信息 |
| | | // public Result<List<UpPattenUsage>> prioritylist() { |
| | | // List<UpPattenUsage> glass = upPattenUsageService.prioritylist(1); |
| | | // log.info("显示工位上的玻璃信息:{}", glass); |
| | | // return Result.build(200, "", glass); |
| | | // } |
| | | // |
| | | // @ApiOperation("点击选择工程保存后进行调用,传入工程号") |
| | | // @GetMapping("/saveUpPattenUsage") //查询现在上片机的玻璃信息 |
| | | // public Result<Integer> saveUpPattenUsage(String engineeringId) { |
| | | // List<UpPattenUsage> upPattenUsages = upPattenUsageService.selectSaveUpPattenUsage(engineeringId); |
| | | // log.info("将查询出的UpPattenUsage数据保存到数据库表里"); |
| | | // upPattenUsageService.saveUpPattenUsage(upPattenUsages); |
| | | // log.info("从PP表查询glassinfo的数据并保存到表里"); |
| | | // List<GlassInfo> glassinfo=glassInfoService.selectGlassInfo(engineeringId); |
| | | // return Result.build(200, "", 200); |
| | | // } |
| | | //} |
| | | |