wu
2024-10-26 328f9b1f7a046378ef5d8f2b8337770fff372cc7
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -246,7 +246,7 @@
  void updateStroageCageByCell(Integer cell, Integer num);
  // 计算格子内剩余宽度
  @Update("update storage_cage set width=5000-if(glasswidth is null,0,glasswidth+50)*number where cell=#{cell}")
  @Update("update storage_cage set width=5000-if(glasswidth is null,0,glasswidth+300)*number where cell=#{cell}")
  void UpdateStroageCageWidthByCell(Integer cell);
  // 根据任务类型获取任务
@@ -274,8 +274,11 @@
  @Select("select * from flowcard where state!=2")
  List<Flowcard> SelectOrderTask();
  @Select("select gi.*,sum(sc.number) as cageno from glassinfo gi left join storage_cage sc on gi.glasstype=sc.glasstype where gi.flowcard=#{flowcard} group by gi.id order by gi.mateid,gi.tier")
  // @Select("select gi.*,sum(sc.number) as cageno from glassinfo gi left join storage_cage sc on gi.glasstype=sc.glasstype where gi.flowcard=#{flowcard} group by gi.id order by gi.mateid,gi.tier")
  // List<GlassInfo> SelectOrderView(String flowcard);
  @Select("select gi.id, gi.glasstype, gi.mateid, gi.glassid, gi.tier, gi.films, gi.width, gi.height, gi.thickness, gi.number, gi.finishnumber, gi.sumtier, gi.measurenumber,sum(sc.number) as cageno from glassinfo gi left join storage_cage sc on gi.glasstype=sc.glasstype where gi.flowcard=#{flowcard} group by gi.id order by gi.mateid,gi.tier")
  List<GlassInfo> SelectOrderView(String flowcard);
  @Update("update flowcard set state=#{state},line=#{line} where flowcard=#{flowcard}")
  void ClaimTasks(String flowcard, int state, int line);
@@ -286,6 +289,15 @@
  
  @Update("update flowcard set orderstate=#{orderstate} where flowcard=#{flowcard}")
  void StartChange(String flowcard,int orderstate);
  @Select("select orderstate from flowcard  where flowcard=#{flowcard} limit 1")
  int selectStartChange(String flowcard);
  @Delete("DELETE from flowcard  where flowcard=#{flowcard}")
  int deleteFlowcard(String flowcard);
  @Delete("DELETE from glassinfo  where flowcard=#{flowcard}")
  int deleteGlassinfo(String flowcard);
  @Update("update queue set glassid=concat(#{flowcard},'-',#{tier}),flowcard=#{flowcard},glasswidth=#{width},glassheight=#{height},glasstype=#{glasstype},thickness=#{thickness},state=1 where state<=0")
  void UpdateQueue(String flowcard, double width, double height, Integer glasstype, Double thickness, Integer tier);
@@ -303,9 +315,12 @@
  // 最大玻璃类型
  @Select("select max(glasstype)+1 from glassinfo")
  Integer SelectMaxType();
    // 最大玻璃类型
    @Select("select glasstype from glassinfo where CONCAT(width,'_',height,'_',thickness,'_',films)=#{key} limit 1")
    Integer SelectMaxTypes(String key);
  // 查询全部玻璃类型
  @Select("select CONCAT(IFNULL(width,''),'_',IFNULL(height,''),'_',IFNULL(thickness,''),'_',IFNULL(films,'')) as type,glasstype from glassinfo GROUP BY width,height,thickness,films")
  @Select("select CONCAT(IFNULL(width,''),'_',IFNULL(height,''),'_',IFNULL(thickness,''),'_',IFNULL(films,'')) as type,glasstype from glassinfo GROUP BY width,height,thickness,films,glasstype")
  List<Map> SelectType();
  // 查询总层数