¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.andon.entity.AndonButtonConfig; |
| | | import org.jeecg.modules.andon.service.IAndonButtonConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * @Description: å®ç¯æé®é
ç½® |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="å®ç¯æé®é
ç½®") |
| | | @RestController |
| | | @RequestMapping("/andonbuttonconfig/andonButtonConfig") |
| | | @Slf4j |
| | | public class AndonButtonConfigController extends JeecgController<AndonButtonConfig, IAndonButtonConfigService> { |
| | | @Autowired |
| | | private IAndonButtonConfigService andonButtonConfigService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param andonButtonConfig |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "å®ç¯æé®é
ç½®-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="å®ç¯æé®é
ç½®-å页å表æ¥è¯¢", notes="å®ç¯æé®é
ç½®-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<AndonButtonConfig>> queryPageList(AndonButtonConfig andonButtonConfig, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<AndonButtonConfig> queryWrapper = QueryGenerator.initQueryWrapper(andonButtonConfig, req.getParameterMap()); |
| | | Page<AndonButtonConfig> page = new Page<AndonButtonConfig>(pageNo, pageSize); |
| | | IPage<AndonButtonConfig> pageList = andonButtonConfigService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param andonButtonConfig |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯æé®é
ç½®-æ·»å ") |
| | | @ApiOperation(value="å®ç¯æé®é
ç½®-æ·»å ", notes="å®ç¯æé®é
ç½®-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_button_config:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody AndonButtonConfig andonButtonConfig) { |
| | | andonButtonConfigService.save(andonButtonConfig); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param andonButtonConfig |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯æé®é
ç½®-ç¼è¾") |
| | | @ApiOperation(value="å®ç¯æé®é
ç½®-ç¼è¾", notes="å®ç¯æé®é
ç½®-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_button_config:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody AndonButtonConfig andonButtonConfig) { |
| | | andonButtonConfigService.updateById(andonButtonConfig); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯æé®é
ç½®-éè¿idå é¤") |
| | | @ApiOperation(value="å®ç¯æé®é
ç½®-éè¿idå é¤", notes="å®ç¯æé®é
ç½®-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_button_config:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | andonButtonConfigService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯æé®é
ç½®-æ¹éå é¤") |
| | | @ApiOperation(value="å®ç¯æé®é
ç½®-æ¹éå é¤", notes="å®ç¯æé®é
ç½®-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_button_config:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.andonButtonConfigService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "å®ç¯æé®é
ç½®-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value="å®ç¯æé®é
ç½®-éè¿idæ¥è¯¢", notes="å®ç¯æé®é
ç½®-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<AndonButtonConfig> queryById(@RequestParam(name="id",required=true) String id) { |
| | | AndonButtonConfig andonButtonConfig = andonButtonConfigService.getById(id); |
| | | if(andonButtonConfig==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(andonButtonConfig); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param andonButtonConfig |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:andon_button_config:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, AndonButtonConfig andonButtonConfig) { |
| | | return super.exportXls(request, andonButtonConfig, AndonButtonConfig.class, "å®ç¯æé®é
ç½®"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("andon_button_config:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, AndonButtonConfig.class); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.andon.entity.AndonOrder; |
| | | import org.jeecg.modules.andon.service.IAndonOrderService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * @Description: å®ç¯å·¥å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="å®ç¯å·¥å") |
| | | @RestController |
| | | @RequestMapping("/andonorder/andonOrder") |
| | | @Slf4j |
| | | public class AndonOrderController extends JeecgController<AndonOrder, IAndonOrderService> { |
| | | @Autowired |
| | | private IAndonOrderService andonOrderService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param andonOrder |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "å®ç¯å·¥å-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="å®ç¯å·¥å-å页å表æ¥è¯¢", notes="å®ç¯å·¥å-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<AndonOrder>> queryPageList(AndonOrder andonOrder, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<AndonOrder> queryWrapper = QueryGenerator.initQueryWrapper(andonOrder, req.getParameterMap()); |
| | | Page<AndonOrder> page = new Page<AndonOrder>(pageNo, pageSize); |
| | | IPage<AndonOrder> pageList = andonOrderService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param andonOrder |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯å·¥å-æ·»å ") |
| | | @ApiOperation(value="å®ç¯å·¥å-æ·»å ", notes="å®ç¯å·¥å-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_order:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody AndonOrder andonOrder) { |
| | | andonOrderService.save(andonOrder); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param andonOrder |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯å·¥å-ç¼è¾") |
| | | @ApiOperation(value="å®ç¯å·¥å-ç¼è¾", notes="å®ç¯å·¥å-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_order:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody AndonOrder andonOrder) { |
| | | andonOrderService.updateById(andonOrder); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯å·¥å-éè¿idå é¤") |
| | | @ApiOperation(value="å®ç¯å·¥å-éè¿idå é¤", notes="å®ç¯å·¥å-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_order:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | andonOrderService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯å·¥å-æ¹éå é¤") |
| | | @ApiOperation(value="å®ç¯å·¥å-æ¹éå é¤", notes="å®ç¯å·¥å-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_order:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.andonOrderService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "å®ç¯å·¥å-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value="å®ç¯å·¥å-éè¿idæ¥è¯¢", notes="å®ç¯å·¥å-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<AndonOrder> queryById(@RequestParam(name="id",required=true) String id) { |
| | | AndonOrder andonOrder = andonOrderService.getById(id); |
| | | if(andonOrder==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(andonOrder); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param andonOrder |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:andon_order:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, AndonOrder andonOrder) { |
| | | return super.exportXls(request, andonOrder, AndonOrder.class, "å®ç¯å·¥å"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("andon_order:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, AndonOrder.class); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.andon.entity.AndonResponseConfig; |
| | | import org.jeecg.modules.andon.service.IAndonResponseConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * @Description: å®ç¯ååºé
ç½® |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Api(tags="å®ç¯ååºé
ç½®") |
| | | @RestController |
| | | @RequestMapping("/andonresponseconfig/andonResponseConfig") |
| | | @Slf4j |
| | | public class AndonResponseConfigController extends JeecgController<AndonResponseConfig, IAndonResponseConfigService> { |
| | | @Autowired |
| | | private IAndonResponseConfigService andonResponseConfigService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param andonResponseConfig |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "å®ç¯ååºé
ç½®-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="å®ç¯ååºé
ç½®-å页å表æ¥è¯¢", notes="å®ç¯ååºé
ç½®-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<IPage<AndonResponseConfig>> queryPageList(AndonResponseConfig andonResponseConfig, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<AndonResponseConfig> queryWrapper = QueryGenerator.initQueryWrapper(andonResponseConfig, req.getParameterMap()); |
| | | Page<AndonResponseConfig> page = new Page<AndonResponseConfig>(pageNo, pageSize); |
| | | IPage<AndonResponseConfig> pageList = andonResponseConfigService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param andonResponseConfig |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯ååºé
ç½®-æ·»å ") |
| | | @ApiOperation(value="å®ç¯ååºé
ç½®-æ·»å ", notes="å®ç¯ååºé
ç½®-æ·»å ") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_response_config:add") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody AndonResponseConfig andonResponseConfig) { |
| | | andonResponseConfigService.save(andonResponseConfig); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param andonResponseConfig |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯ååºé
ç½®-ç¼è¾") |
| | | @ApiOperation(value="å®ç¯ååºé
ç½®-ç¼è¾", notes="å®ç¯ååºé
ç½®-ç¼è¾") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_response_config:edit") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<String> edit(@RequestBody AndonResponseConfig andonResponseConfig) { |
| | | andonResponseConfigService.updateById(andonResponseConfig); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯ååºé
ç½®-éè¿idå é¤") |
| | | @ApiOperation(value="å®ç¯ååºé
ç½®-éè¿idå é¤", notes="å®ç¯ååºé
ç½®-éè¿idå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_response_config:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
| | | andonResponseConfigService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å®ç¯ååºé
ç½®-æ¹éå é¤") |
| | | @ApiOperation(value="å®ç¯ååºé
ç½®-æ¹éå é¤", notes="å®ç¯ååºé
ç½®-æ¹éå é¤") |
| | | //@RequiresPermissions("org.jeecg.modules:andon_response_config:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.andonResponseConfigService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | //@AutoLog(value = "å®ç¯ååºé
ç½®-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value="å®ç¯ååºé
ç½®-éè¿idæ¥è¯¢", notes="å®ç¯ååºé
ç½®-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<AndonResponseConfig> queryById(@RequestParam(name="id",required=true) String id) { |
| | | AndonResponseConfig andonResponseConfig = andonResponseConfigService.getById(id); |
| | | if(andonResponseConfig==null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | return Result.OK(andonResponseConfig); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param andonResponseConfig |
| | | */ |
| | | //@RequiresPermissions("org.jeecg.modules:andon_response_config:exportXls") |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, AndonResponseConfig andonResponseConfig) { |
| | | return super.exportXls(request, andonResponseConfig, AndonResponseConfig.class, "å®ç¯ååºé
ç½®"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | //@RequiresPermissions("andon_response_config:importExcel") |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, AndonResponseConfig.class); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Description: å®ç¯æé®é
ç½® |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("andon_button_config") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="andon_button_config对象", description="å®ç¯æé®é
ç½®") |
| | | public class AndonButtonConfig implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**åå»ºæ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "åå»ºæ¥æ") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "æ´æ°æ¥æ") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | /**å®ç¯åç§°*/ |
| | | @Excel(name = "å®ç¯åç§°", width = 15) |
| | | @ApiModelProperty(value = "å®ç¯åç§°") |
| | | private String buttonName; |
| | | /**å®ç¯ç¼ç */ |
| | | @Excel(name = "å®ç¯ç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "å®ç¯ç¼ç ") |
| | | private String buttonCode; |
| | | /**å级ååºæ¶é¿(åé)*/ |
| | | @Excel(name = "å级ååºæ¶é¿(åé)", width = 15) |
| | | @ApiModelProperty(value = "å级ååºæ¶é¿(åé)") |
| | | private Integer upgradeResponseDuration; |
| | | /**å级å¤çæ¶é¿(åé)*/ |
| | | @Excel(name = "å级å¤çæ¶é¿(åé)", width = 15) |
| | | @ApiModelProperty(value = "å级å¤çæ¶é¿(åé)") |
| | | private Integer upgradeProcessDuration; |
| | | /**äºæ¬¡å级ååºæ¶é¿(åé)*/ |
| | | @Excel(name = "äºæ¬¡å级ååºæ¶é¿(åé)", width = 15) |
| | | @ApiModelProperty(value = "äºæ¬¡å级ååºæ¶é¿(åé)") |
| | | private Integer secondUpgradeResponseDuration; |
| | | /**äºæ¬¡å级å¤çæ¶é¿(åé)*/ |
| | | @Excel(name = "äºæ¬¡å级å¤çæ¶é¿(åé)", width = 15) |
| | | @ApiModelProperty(value = "äºæ¬¡å级å¤çæ¶é¿(åé)") |
| | | private Integer secondUpgradeProcessDuration; |
| | | /**å®ç¯æé®ç¶æ*/ |
| | | @Excel(name = "å®ç¯æé®ç¶æ", width = 15, dicCode = "button_status") |
| | | @Dict(dicCode = "button_status") |
| | | @ApiModelProperty(value = "å®ç¯æé®ç¶æ") |
| | | private String buttonStatus; |
| | | /**夿³¨*/ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Description: å®ç¯å·¥å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("andon_order") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="andon_order对象", description="å®ç¯å·¥å") |
| | | public class AndonOrder implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**åå»ºæ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "åå»ºæ¥æ") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "æ´æ°æ¥æ") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | /**产线ID*/ |
| | | @Excel(name = "产线ID", width = 15) |
| | | @ApiModelProperty(value = "产线ID") |
| | | @Dict(dictTable = "base_factory", dicCode = "id", dicText = "factory_name") |
| | | private String factoryId; |
| | | /**å®ç¯ç±»å*/ |
| | | @Excel(name = "å®ç¯ç±»å", width = 15) |
| | | @ApiModelProperty(value = "å®ç¯ç±»å") |
| | | @Dict(dictTable = "andon_button_config", dicCode = "id", dicText = "button_name") |
| | | private String buttonId; |
| | | /**å®ç¯äºº*/ |
| | | @Excel(name = "å®ç¯äºº", width = 15) |
| | | @ApiModelProperty(value = "å®ç¯äºº") |
| | | private String operator; |
| | | /**å®ç¯æ¶é´*/ |
| | | @Excel(name = "å®ç¯æ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "å®ç¯æ¶é´") |
| | | private Date operateTime; |
| | | /**å®ç¯ç级*/ |
| | | @Excel(name = "å®ç¯ç级", width = 15, dicCode = "andon_level") |
| | | @Dict(dicCode = "andon_level") |
| | | @ApiModelProperty(value = "å®ç¯ç级") |
| | | private String andonLevel; |
| | | /**ååºäºº*/ |
| | | @Excel(name = "ååºäºº", width = 15) |
| | | @ApiModelProperty(value = "ååºäºº") |
| | | private String responder; |
| | | /**ååºæ¶é´*/ |
| | | @Excel(name = "ååºæ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "ååºæ¶é´") |
| | | private Date responseTime; |
| | | /**å¤ç人*/ |
| | | @Excel(name = "å¤ç人", width = 15) |
| | | @ApiModelProperty(value = "å¤ç人") |
| | | private String processor; |
| | | /**å¤ç宿æ¶é´*/ |
| | | @Excel(name = "å¤ç宿æ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "å¤ç宿æ¶é´") |
| | | private Date processTime; |
| | | /**å®ç¯ç¶æ*/ |
| | | @Excel(name = "å®ç¯ç¶æ", width = 15, dicCode = "order_status") |
| | | @Dict(dicCode = "order_status") |
| | | @ApiModelProperty(value = "å®ç¯ç¶æ") |
| | | private String orderStatus; |
| | | /**é®é¢æè¿°*/ |
| | | @Excel(name = "é®é¢æè¿°", width = 15) |
| | | @ApiModelProperty(value = "é®é¢æè¿°") |
| | | private String problemDescreption; |
| | | /**å¤çç»ææè¿°*/ |
| | | @Excel(name = "å¤çç»ææè¿°", width = 15) |
| | | @ApiModelProperty(value = "å¤çç»ææè¿°") |
| | | private String resolutionDescreption; |
| | | /**å¤çç»æå¾ç*/ |
| | | @Excel(name = "å¤çç»æå¾ç", width = 15) |
| | | @ApiModelProperty(value = "å¤çç»æå¾ç") |
| | | private String imageFiles; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Description: å®ç¯ååºé
ç½® |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Data |
| | | @TableName("andon_response_config") |
| | | @Accessors(chain = true) |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="andon_response_config对象", description="å®ç¯ååºé
ç½®") |
| | | public class AndonResponseConfig implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /**主é®*/ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /**å建人*/ |
| | | @ApiModelProperty(value = "å建人") |
| | | private String createBy; |
| | | /**åå»ºæ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "åå»ºæ¥æ") |
| | | private Date createTime; |
| | | /**æ´æ°äºº*/ |
| | | @ApiModelProperty(value = "æ´æ°äºº") |
| | | private String updateBy; |
| | | /**æ´æ°æ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "æ´æ°æ¥æ") |
| | | private Date updateTime; |
| | | /**å 餿 è®°*/ |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | /**产线ID*/ |
| | | @Excel(name = "产线ID", width = 15) |
| | | @ApiModelProperty(value = "产线ID") |
| | | @Dict(dictTable = "base_factory", dicCode = "id", dicText = "factory_name") |
| | | private String factoryId; |
| | | /**å®ç¯ç±»å*/ |
| | | @Excel(name = "å®ç¯ç±»å", width = 15) |
| | | @ApiModelProperty(value = "å®ç¯ç±»å") |
| | | @Dict(dictTable = "andon_button_config", dicCode = "id", dicText = "button_name") |
| | | private String buttonId; |
| | | /**åå§ååºäºº*/ |
| | | @Excel(name = "åå§ååºäºº", width = 15) |
| | | @ApiModelProperty(value = "åå§ååºäºº") |
| | | private String firsterResponder; |
| | | /**äºçº§ååºäºº(åçº§ä¸æ¬¡)*/ |
| | | @Excel(name = "äºçº§ååºäºº(åçº§ä¸æ¬¡)", width = 15) |
| | | @ApiModelProperty(value = "äºçº§ååºäºº(åçº§ä¸æ¬¡)") |
| | | private String secondResponder; |
| | | /**ä¸çº§ååºäºº(å级两次)*/ |
| | | @Excel(name = "ä¸çº§ååºäºº(å级两次)", width = 15) |
| | | @ApiModelProperty(value = "ä¸çº§ååºäºº(å级两次)") |
| | | private String thirdResponder; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.andon.entity.AndonButtonConfig; |
| | | |
| | | /** |
| | | * @Description: å®ç¯æé®é
ç½® |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface AndonButtonConfigMapper extends BaseMapper<AndonButtonConfig> { |
| | | AndonButtonConfig getAndonButtonById(@Param("id") String id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.andon.entity.AndonOrder; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: å®ç¯å·¥å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface AndonOrderMapper extends BaseMapper<AndonOrder> { |
| | | List<AndonOrder> getAndonOrdersExceptYWC(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.andon.entity.AndonResponseConfig; |
| | | |
| | | /** |
| | | * @Description: å®ç¯ååºé
ç½® |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface AndonResponseConfigMapper extends BaseMapper<AndonResponseConfig> { |
| | | AndonResponseConfig getAndonResponseConfigByFactoryIdAndButtonId(@Param("factoryId") String factoryId, @Param("buttonId") String buttonId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.andon.mapper.AndonButtonConfigMapper"> |
| | | <select id="getAndonButtonById" resultType="org.jeecg.modules.andon.entity.AndonButtonConfig"> |
| | | SELECT * FROM andon_button_config WHERE id = #{id} and del_flag = 0 and button_status = 'å¯ç¨' |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.andon.mapper.AndonOrderMapper"> |
| | | <select id="getAndonOrdersExceptYWC" resultType="org.jeecg.modules.andon.entity.AndonOrder"> |
| | | SELECT * FROM andon_order WHERE order_status != '3' and del_flag = 0 |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.andon.mapper.AndonResponseConfigMapper"> |
| | | <select id="getAndonResponseConfigByFactoryIdAndButtonId" resultType="org.jeecg.modules.andon.entity.AndonResponseConfig"> |
| | | SELECT * FROM andon_response_config WHERE factory_id = #{factoryId} AND button_id = #{buttonId} AND del_flag = 0 |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.andon.entity.AndonButtonConfig; |
| | | |
| | | /** |
| | | * @Description: å®ç¯æé®é
ç½® |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IAndonButtonConfigService extends IService<AndonButtonConfig> { |
| | | AndonButtonConfig getAndonButtonById(String id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.andon.entity.AndonOrder; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: å®ç¯å·¥å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IAndonOrderService extends IService<AndonOrder> { |
| | | //å·²å®æç¶æé¤å¤ |
| | | List<AndonOrder> getAndonOrdersExceptYWC(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.andon.entity.AndonResponseConfig; |
| | | |
| | | /** |
| | | * @Description: å®ç¯ååºé
ç½® |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | public interface IAndonResponseConfigService extends IService<AndonResponseConfig> { |
| | | AndonResponseConfig getAndonResponseConfigByFactoryIdAndButtonId(String factoryId, String buttonId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.jeecg.modules.andon.entity.AndonButtonConfig; |
| | | import org.jeecg.modules.andon.mapper.AndonButtonConfigMapper; |
| | | import org.jeecg.modules.andon.service.IAndonButtonConfigService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @Description: å®ç¯æé®é
ç½® |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class AndonButtonConfigServiceImpl extends ServiceImpl<AndonButtonConfigMapper, AndonButtonConfig> implements IAndonButtonConfigService { |
| | | |
| | | @Override |
| | | public AndonButtonConfig getAndonButtonById(String id) { |
| | | return baseMapper.getAndonButtonById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.jeecg.modules.andon.service.IAndonOrderService; |
| | | import org.jeecg.modules.andon.entity.AndonOrder; |
| | | import org.jeecg.modules.andon.mapper.AndonOrderMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: å®ç¯å·¥å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class AndonOrderServiceImpl extends ServiceImpl<AndonOrderMapper, AndonOrder> implements IAndonOrderService { |
| | | |
| | | @Override |
| | | public List<AndonOrder> getAndonOrdersExceptYWC() { |
| | | return baseMapper.getAndonOrdersExceptYWC(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.andon.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.jeecg.modules.andon.entity.AndonResponseConfig; |
| | | import org.jeecg.modules.andon.mapper.AndonResponseConfigMapper; |
| | | import org.jeecg.modules.andon.service.IAndonResponseConfigService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @Description: å®ç¯ååºé
ç½® |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-10 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class AndonResponseConfigServiceImpl extends ServiceImpl<AndonResponseConfigMapper, AndonResponseConfig> implements IAndonResponseConfigService { |
| | | |
| | | @Override |
| | | public AndonResponseConfig getAndonResponseConfigByFactoryIdAndButtonId(String factoryId, String buttonId) { |
| | | return baseMapper.getAndonResponseConfigByFactoryIdAndButtonId(factoryId,buttonId); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.quartz.job; |
| | | |
| | | import org.jeecg.modules.andon.entity.AndonButtonConfig; |
| | | import org.jeecg.modules.andon.entity.AndonOrder; |
| | | import org.jeecg.modules.andon.entity.AndonResponseConfig; |
| | | import org.jeecg.modules.andon.service.IAndonButtonConfigService; |
| | | import org.jeecg.modules.andon.service.IAndonOrderService; |
| | | import org.jeecg.modules.andon.service.IAndonResponseConfigService; |
| | | import org.quartz.Job; |
| | | import org.quartz.JobExecutionContext; |
| | | import org.quartz.JobExecutionException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | //org.jeecg.modules.quartz.job.AndonJob |
| | | public class AndonJob implements Job { |
| | | private static final String ANDON_STATUS_DXY = "1"; |
| | | private static final String ANDON_STATUS_DCL = "2"; |
| | | private static final String ANDON_STATUS_YWC = "3"; |
| | | @Autowired |
| | | @Lazy |
| | | private IAndonOrderService andonOrderService; |
| | | @Autowired |
| | | @Lazy |
| | | private IAndonButtonConfigService andonButtonConfigService; |
| | | @Autowired |
| | | @Lazy |
| | | private IAndonResponseConfigService andonResponseConfigService; |
| | | |
| | | @Override |
| | | public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { |
| | | LocalDateTime currentTime = LocalDateTime.now(); |
| | | List<AndonOrder> andonOrdersExceptYWC = andonOrderService.getAndonOrdersExceptYWC(); |
| | | for (AndonOrder andonOrder : andonOrdersExceptYWC) { |
| | | AndonResponseConfig andonResponseConfig = andonResponseConfigService.getAndonResponseConfigByFactoryIdAndButtonId(andonOrder.getFactoryId(), andonOrder.getButtonId()); |
| | | AndonButtonConfig andonButtonConfig = andonButtonConfigService.getAndonButtonById(andonOrder.getButtonId()); |
| | | System.out.println("andonOrder----"+andonOrder.getId()+"----andonResponseConfig----"+andonResponseConfig.getId()+"-----"+"andonButtonConfig----"+andonButtonConfig.getId()); |
| | | levelUpgradeOne(andonOrder, andonResponseConfig, andonButtonConfig, currentTime); |
| | | levelUpgradeTwo(andonOrder, andonResponseConfig, andonButtonConfig, currentTime); |
| | | levelProcessOne(andonOrder, andonResponseConfig, andonButtonConfig, currentTime); |
| | | levelProcessTwo(andonOrder, andonResponseConfig, andonButtonConfig, currentTime); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 夿äºçº§ååºå级 |
| | | * 妿å®ç¯å·¥åååºæ¶é´è¶
è¿ä¸çº§ååºæ¶é¿è¿ä¸ºç©ºï¼åè¯´ææªååº |
| | | */ |
| | | public void levelUpgradeOne(AndonOrder andonOrder, AndonResponseConfig andonResponseConfig, AndonButtonConfig andonButtonConfig, LocalDateTime currentTime) { |
| | | if (andonOrder.getAndonLevel().equals("1") && andonOrder.getOrderStatus().equals(ANDON_STATUS_DXY)) { |
| | | //å®ç¯æ¶é´ |
| | | Date operateTime = andonOrder.getOperateTime(); |
| | | //ååºæ¶é¿ ï¼åéï¼ |
| | | Integer upgradeResponseDuration = andonButtonConfig.getUpgradeResponseDuration(); |
| | | LocalDateTime timeoutTime = operateTime.toInstant() |
| | | .atZone(ZoneId.systemDefault()) |
| | | .toLocalDateTime() |
| | | .plusMinutes(upgradeResponseDuration); |
| | | if (currentTime.isAfter(timeoutTime)) { |
| | | //ååºæ¶é´è¶
è¿ä¸çº§ååºæ¶é¿ï¼åçº§ä¸æ¬¡,å¹¶æéï¼æ¨¡æåéé£ä¹¦æ¶æ¯ï¼ |
| | | andonOrder.setAndonLevel("2"); |
| | | andonOrderService.saveOrUpdate(andonOrder); |
| | | //TODO åéé£ä¹¦æ¶æ¯ï¼è¿å为模æéè¦ææ¥å£æè½å¼åï¼ |
| | | System.out.println("åå§ååºäºº"+andonResponseConfig.getFirsterResponder()+"æªååºï¼"+"å®ç¯å·¥åï¼" + andonOrder.getId() + "å·²å级äºçº§ååº,å¹¶åæ¶æ¯ç»äºçº§ååºäºº"+andonResponseConfig.getSecondResponder()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 夿ä¸çº§ååºå级 |
| | | * å®ç¯å·¥åååºæ¶é´è¶
è¿äºçº§ååºæ¶é¿è¿ä¸ºç©ºï¼åè¯´ææªååº |
| | | */ |
| | | public void levelUpgradeTwo(AndonOrder andonOrder, AndonResponseConfig andonResponseConfig, AndonButtonConfig andonButtonConfig, LocalDateTime currentTime) { |
| | | if (andonOrder.getAndonLevel().equals("2") && andonOrder.getOrderStatus().equals(ANDON_STATUS_DXY)) { |
| | | Date operateTime = andonOrder.getOperateTime(); |
| | | Integer upgradeResponseDuration = andonButtonConfig.getSecondUpgradeResponseDuration(); |
| | | LocalDateTime timeoutTime = operateTime.toInstant() |
| | | .atZone(ZoneId.systemDefault()) |
| | | .toLocalDateTime() |
| | | .plusMinutes(upgradeResponseDuration); |
| | | if (currentTime.isAfter(timeoutTime)) { |
| | | //ååºæ¶é´è¶
è¿ä¸çº§ååºæ¶é¿ï¼åçº§ä¸æ¬¡,å¹¶æéï¼æ¨¡æåéé£ä¹¦æ¶æ¯ï¼ |
| | | andonOrder.setAndonLevel("3"); |
| | | andonOrderService.saveOrUpdate(andonOrder); |
| | | //TODO åéé£ä¹¦æ¶æ¯ï¼è¿å为模æéè¦ææ¥å£æè½å¼åï¼ |
| | | System.out.println("äºçº§ååºäºº"+andonResponseConfig.getSecondResponder()+"æªååºï¼"+"å®ç¯å·¥åï¼" + andonOrder.getId() + "å·²å级ä¸çº§ååº,å¹¶åæ¶æ¯ç»ä¸çº§ååºäºº"+andonResponseConfig.getThirdResponder()); |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * 夿äºçº§å¤çå级 |
| | | * å®ç¯å·¥åååºæ¶é´è¶
è¿äºçº§å¤çæ¶é¿è¿ä¸ºç©ºï¼åè¯´ææªååº |
| | | */ |
| | | public void levelProcessOne(AndonOrder andonOrder, AndonResponseConfig andonResponseConfig, AndonButtonConfig andonButtonConfig, LocalDateTime currentTime){ |
| | | if (andonOrder.getAndonLevel().equals("1") && andonOrder.getOrderStatus().equals(ANDON_STATUS_DCL)) { |
| | | Date responseTime = andonOrder.getResponseTime(); |
| | | Integer upgradeProcessDuration = andonButtonConfig.getUpgradeProcessDuration(); |
| | | LocalDateTime timeoutTime = responseTime.toInstant() |
| | | .atZone(ZoneId.systemDefault()) |
| | | .toLocalDateTime() |
| | | .plusMinutes(upgradeProcessDuration); |
| | | if (currentTime.isAfter(timeoutTime)) { |
| | | //å¤çæ¶é´è¶
è¿ä¸çº§å¤çæ¶é¿ï¼åçº§ä¸æ¬¡,å¹¶æéï¼æ¨¡æåéé£ä¹¦æ¶æ¯ï¼ |
| | | andonOrder.setAndonLevel("2"); |
| | | andonOrderService.saveOrUpdate(andonOrder); |
| | | //TODO åéé£ä¹¦æ¶æ¯ï¼è¿å为模æéè¦ææ¥å£æè½å¼åï¼ |
| | | System.out.println("ä¸çº§å¤ç人"+andonResponseConfig.getFirsterResponder()+"æªå¤çï¼"+"å®ç¯å·¥åï¼" + andonOrder.getId() + "å·²å级äºçº§å¤ç,å¹¶åæ¶æ¯ç»äºçº§å¤ç人"+andonResponseConfig.getSecondResponder()); |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * 夿ä¸çº§å¤çå级 |
| | | * å®ç¯å·¥åååºæ¶é´è¶
è¿äºçº§å¤çæ¶é¿è¿ä¸ºç©ºï¼åè¯´ææªååº |
| | | */ |
| | | public void levelProcessTwo(AndonOrder andonOrder, AndonResponseConfig andonResponseConfig, AndonButtonConfig andonButtonConfig, LocalDateTime currentTime){ |
| | | if (andonOrder.getAndonLevel().equals("2") && andonOrder.getOrderStatus().equals(ANDON_STATUS_DCL)) { |
| | | Date responseTime = andonOrder.getResponseTime(); |
| | | Integer secondUpgradeProcessDuration = andonButtonConfig.getSecondUpgradeProcessDuration(); |
| | | LocalDateTime timeoutTime = responseTime.toInstant() |
| | | .atZone(ZoneId.systemDefault()) |
| | | .toLocalDateTime() |
| | | .plusMinutes(secondUpgradeProcessDuration); |
| | | if (currentTime.isAfter(timeoutTime)) { |
| | | //å¤çæ¶é´è¶
è¿ä¸çº§å¤çæ¶é¿ï¼åçº§ä¸æ¬¡,å¹¶æéï¼æ¨¡æåéé£ä¹¦æ¶æ¯ï¼ |
| | | andonOrder.setAndonLevel("3"); |
| | | andonOrderService.saveOrUpdate(andonOrder); |
| | | //TODO åéé£ä¹¦æ¶æ¯ï¼è¿å为模æéè¦ææ¥å£æè½å¼åï¼ |
| | | System.out.println("äºçº§å¤ç人"+andonResponseConfig.getSecondResponder()+"æªå¤çï¼"+"å®ç¯å·¥åï¼" + andonOrder.getId() + "å·²å级ä¸çº§å¤ç,å¹¶åæ¶æ¯ç»ä¸çº§å¤ç人"+andonResponseConfig.getThirdResponder()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |