|  |  | 
 |  |  | import com.zy.asrs.entity.Mat; | 
 |  |  | import com.zy.asrs.entity.MatPrint; | 
 |  |  | import com.zy.asrs.entity.OrderDetl; | 
 |  |  | import com.zy.asrs.entity.param.BatchMatsUpdateParam; | 
 |  |  | import com.zy.asrs.entity.param.EmptyPlateOutParam; | 
 |  |  | import com.zy.asrs.entity.result.KeyValueVo; | 
 |  |  | import com.zy.asrs.service.MatService; | 
 |  |  | 
 |  |  |         mat.setCreateTime(now); | 
 |  |  |         mat.setUpdateBy(getUserId()); | 
 |  |  |         mat.setUpdateTime(now); | 
 |  |  |         mat.setLocType(mat.getTagId()); | 
 |  |  |         mat.setStatus(1); | 
 |  |  |         if (!matService.insert(mat)) { | 
 |  |  |             throw new CoolException("添加失败,请联系管理员"); | 
 |  |  | 
 |  |  |             return R.error(); | 
 |  |  |         } | 
 |  |  |         mat.setUpdateBy(getUserId()); | 
 |  |  |         mat.setLocType(mat.getTagId()); | 
 |  |  |         mat.setUpdateTime(new Date()); | 
 |  |  |         matService.updateById(mat); | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @PostMapping("mat/batch/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R batchUpdate(@RequestBody BatchMatsUpdateParam params) { | 
 |  |  |  | 
 |  |  |         return  matService.batchInfo(params); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/mat/delete/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R delete(@RequestParam String param){ |