wuyouming666
2023-12-11 a487e1560cddf1d8b3e7372d9791b9589e9af96c
springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java
@@ -6,17 +6,23 @@
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoProperties.Storage;
import org.springframework.stereotype.Service;
import com.example.springboot.common.Result;
import com.example.springboot.component.S7control;
import com.example.springboot.entity.Out_slice;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.mapper.HomeMapper;
import com.example.springboot.mapper.SpianMapper;
@Service
public class OutSliceServive {
  @Autowired
  private HomeMapper homeMapper;
  @Autowired
  private SpianMapper spianMapper;
  @Autowired
  private JdbcConnections jdbcConnections;
@@ -43,15 +49,20 @@
    return listoutslice;
  }
public Result CompleteQueue(String id, String frameid) {
  homeMapper.CompleteQueue(id);
  Short num=homeMapper.SelectCountByFrameNo(frameid);
  if(num==0){
    homeMapper.CompleteQueueByFrameNo(frameid);
  public Result CompleteQueue(String id, String frameid, String glassid) {
    homeMapper.CompleteQueue(id);
    Short num = homeMapper.SelectCountByFrameNo(frameid);
    if (num == 0) {
      homeMapper.CompleteQueueByFrameNo(frameid);
    }
    StorageCage storageCage = homeMapper.SelectGlassInfo(glassid);
    spianMapper.UpdataOutCage1(storageCage.getGlassWidth(), storageCage.getCage(), storageCage.getCell());
    homeMapper.UpdateCageTask2(glassid);
    S7control.getinstance().WriteWord("DB105.12", (short) 0);
    Map<String, Object> map = new HashMap<>();
    map.put("message", "200");
    return Result.success(map);
  }
  Map<String, Object> map = new HashMap<>();
  map.put("message", "200");
  return Result.success(map);
}
}