| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.xml.crypto.Data; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | |
| | | } |
| | | //记录处理记录 |
| | | public void updateDefective( DefectiveProducts defective,DefectiveProductsHistory defectiveHis, List<MultipartFile> multipartFileList) { |
| | | defectiveHis.setRecordTime(new Date()); |
| | | Date date=new Date(); |
| | | defectiveHis.setRecordTime(date); |
| | | String recordTime=ActionUtil.sdfwithFTP.format(date); |
| | | String delName = ActionUtil.getUser().getName(); |
| | | Integer delId =ActionUtil.getUser().getId().intValue(); |
| | | defectiveHis.setDelId(delId); |
| | | String time = ActionUtil.sdfwithday.format(defective.getStartTime()); |
| | | String rootFile = CommonUtil.getRootFile(); |
| | | if(multipartFileList!=null && multipartFileList.size()!=0){ |
| | | String defectiveDirSuffix = "defective" + File.separator + defective.getSenderName() + File.separator + time + File.separator+delName+File.separator; |
| | | String defectiveDirSuffix = "defective" + File.separator + defective.getSenderName() + File.separator + time + File.separator |
| | | +delName+File.separator+recordTime+File.separator; |
| | | String feedbackDir = rootFile + defectiveDirSuffix; |
| | | File fileDir = new File(feedbackDir); |
| | | if (!fileDir.exists()) { |