| | |
| | | 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 org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | @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(Date date) { |
| | | System.out.println(date); |
| | | public R syncNewIfs(String date) { |
| | | String key = "syncPart_lock"+ SecurityUtils.getUser().getId(); |
| | | if (redisTemplate.hasKey(key)) { |
| | | throw new RuntimeException("有同步任务正在处理"); |