| | |
| | | import com.chinaztt.mes.basic.excel.PartData; |
| | | import com.chinaztt.mes.basic.excel.PartUploadListener; |
| | | import com.chinaztt.mes.basic.service.PartService; |
| | | import com.chinaztt.mes.common.util.JsonUtil; |
| | | import com.chinaztt.mes.common.wrapper.QueryWrapperUtil; |
| | | import com.chinaztt.ztt.admin.api.entity.SysDictItem; |
| | | import com.chinaztt.ztt.admin.api.feign.RemoteDictService; |
| | | import com.chinaztt.ztt.common.core.util.R; |
| | | import com.chinaztt.ztt.common.log.annotation.SysLog; |
| | | import com.chinaztt.ztt.common.security.annotation.Inner; |
| | | import com.chinaztt.ztt.common.security.util.SecurityUtils; |
| | | import com.xxl.job.core.handler.annotation.XxlJob; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @GetMapping("/page") |
| | | @PreAuthorize("@pms.hasPermission('basic_part_view')") |
| | | public R getPartPage(Page page, Part part, Long bomId) { |
| | | //System.out.println(bomId); |
| | | //System.out.println(part); |
| | | System.out.println(JsonUtil.jsonToString(page)); |
| | | return R.ok(partService.getPartPage(page, QueryWrapperUtil.gen(part), bomId)); |
| | | } |
| | | /** |
| | |
| | | } |
| | | partService.syncPart(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | //@InitBinder |
| | | //protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { |
| | | // //System.out.println(request.getParameter("date")); |
| | | // DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); |
| | | // CustomDateEditor editor = new CustomDateEditor(df, true);//true表示允许为空,false反之 |
| | | // binder.registerCustomEditor(Date.class, editor); |
| | | //} |
| | | |
| | | @ApiOperation(value = "同步Ifs", notes = "同步Ifs") |
| | | @PostMapping("/syncNewIfs") |
| | | //@XxlJob("syncPart") |
| | | public R syncNewIfs(String date) { |
| | | String key = "syncPart_lock"+ SecurityUtils.getUser().getId(); |
| | | if (redisTemplate.hasKey(key)) { |
| | | throw new RuntimeException("有同步任务正在处理"); |
| | | } |
| | | return R.ok(partService.syncNewIfs(date)); |
| | | } |
| | | /** |
| | | * 分页查询已关联检测模板的零件 |
| | |
| | | /** |
| | | * 根据零件号和零件描述查询库存信息接口 |
| | | * |
| | | * @param part 零件 |
| | | * @param 零件 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "根据零件号和零件描述查询库存信息接口", notes = "根据零件号和零件描述查询库存信息接口") |