| | |
| | | |
| | | import com.zy.asrs.entity.result.WrkTraceVo; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.FileSaveExampleUtil; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/order/insert/file/auth") |
| | | @ManagerAuth |
| | | public R insertFile(@RequestParam("orderId") String orderId,@RequestParam MultipartFile file){ |
| | | String[] split = orderId.split("-"); |
| | | int id = Integer.parseInt(split[1]); |
| | | System.out.println("---开始---"); |
| | | String savePath = "D:/crm/plan/file/"+id+"/"; // 指定保存文件的路径 |
| | | try{ |
| | | FileSaveExampleUtil.saveFile(file, savePath); |
| | | }catch (Exception e){ |
| | | return R.error(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |