| | |
| | | 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("-", "")); |
| | | matCodeService.insert(matCode); |
| | | return R.ok(); |
| | | } |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping("/matType/auth") |
| | | public R type(){ |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (int i = 1; i < 4; i++) { |
| | | Map<String, Object> item = new HashMap<>(); |
| | | item.put("id",i+""); |
| | | if (i == 1){ |
| | | item.put("value","原材料"); |
| | | } |
| | | if (i == 2){ |
| | | item.put("value","成品"); |
| | | } |
| | | if (i == 3){ |
| | | item.put("value","半成品"); |
| | | } |
| | | result.add(item); |
| | | } |
| | | |
| | | return R.ok(result); |
| | | } |
| | | } |