ZengTao
2024-03-31 1de52d82ec5c3fb56e095a36571ab32bfdb15ca4
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -238,7 +238,7 @@
  List<StorageCage> SelectStorageCageInfo();
  // 删除格子内玻璃信息
  @Update("update storage_cage set width=5000,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,thickness=null,glasstype=null,number=null where cell=#{cell}")
  @Update("update storage_cage set films=null,width=5000,glasswidth=null,glassheight=null,glasswidthmm=null,glassheightmm=null,thickness=null,glasstype=null,number=null where cell=#{cell}")
  void DeleteStroageCageByCell(Integer cell);
  // 修改格子玻璃数量
@@ -262,7 +262,7 @@
  StorageCage SelectStorageByCell(String cell);
  // 手动完成任务
  @Select("update storage_task set task_state=1 where id=1429")
  @Select("update storage_task set task_state=1 where id=#{id}")
  void FinishTask(Integer id);
  @Select("select gi.* from glassinfo gi inner join flowcard fc on gi.flowcard=fc.flowcard where fc.state!=2 and position(#{width} in gi.width) and position(#{height} in gi.height) and position(#{thickness} in gi.thickness) and position(#{films} in gi.films) group by gi.id")
@@ -277,14 +277,14 @@
  @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);
  @Update("update flowcard set state=#{state} where flowcard=#{flowcard}")
  void ClaimTasks(String flowcard, int state);
  @Update("update flowcard set state=#{state},line=#{line} where flowcard=#{flowcard}")
  void ClaimTasks(String flowcard, int state, int line);
  @Update("update flowcard set method=#{method} where flowcard=#{flowcard}")
  void ModeChange(String flowcard, int method);
  @Update("update queue set flowcard=#{flowcard},glasswidth=#{width},glassheight=#{height},glasstype=#{glasstype},state=1 where state<=0")
  void UpdateQueue(String flowcard, double width, double height, Integer glasstype);
  @Update("update queue set glassid=concat(#P{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);
  @Update("update glassinfo set finishnumber=ifnull(finishnumber,0)+1 where flowcard=#{flowcard} and mateid=#{mateid} and tier=#{geTier}")
  void AddGlassNo(String flowcard, Integer mateid, Integer geTier);
@@ -312,4 +312,8 @@
  @Select("select * from storage_cage where cage=#{cage} order by id desc")
  List<StorageCage> SelectStorageCageByCage(Integer cage);
  // 添加出片队列
  @Insert("INSERT INTO flowcard(`flowcard`, `totaltier`, `number`, `line`, `state`, `method`, `starttime`) "
                    +" select #{flowcard}, 0, #{number}, 0, 0, 0, now() where 0=( select count(*) from flowcard where flowcard=#{flowcard});")
  void InsertFlowcard(String flowcard, Integer number);
}