| | |
| | | import com.zy.common.utils.excel.matcode.MatCodeExcel; |
| | | import com.zy.common.utils.excel.matcode.MatCodeExcelListener; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.system.entity.Role; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | matCode.setModiTime(new Date()); |
| | | matCode.setAppeUser(getUserId()); |
| | | matCode.setAppeTime(new Date()); |
| | | matCode.setMatNo(UUID.randomUUID().toString().replaceAll("-", "")); |
| | | // matCode.setMatNo(UUID.randomUUID().toString().replaceAll("-", "")); |
| | | matCodeService.insert(matCode); |
| | | return R.ok(); |
| | | } |
| | |
| | | @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "产品代号数据导出") |
| | | public void export(@RequestParam(required = false) String fileName, |
| | | @RequestParam(required = false) Integer rowCount, |
| | | @RequestParam(required = false) String ids, |
| | | HttpServletResponse response) throws Exception { |
| | | List<MatCode> list = matCodeService.selectList(new EntityWrapper<>()); |
| | | List<MatCode> list = null; |
| | | if(!Cools.isEmpty(ids)){ |
| | | list = matCodeService.selectList(new EntityWrapper<MatCode>().last("where mat_no in (" + ids + ")")); |
| | | }else{ |
| | | list = matCodeService.selectList(new EntityWrapper<>()); |
| | | } |
| | | // List<MatCode> list = matCodeService.selectList(new EntityWrapper<>()); |
| | | List<MatCodeExcel> excels = new ArrayList<>(); |
| | | for (MatCode matCode : list) { |
| | | MatCodeExcel excel = VersionUtils.getExcel(matCode); |