| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.modules.dnc.entity.DocInfo; |
| | | import org.jeecg.modules.dnc.entity.DocRelative; |
| | | import org.jeecg.modules.dnc.exception.ExceptionCast; |
| | |
| | | import org.jeecg.modules.dnc.mapper.DocInfoMapper; |
| | | import org.jeecg.modules.dnc.mapper.DocRelativeMapper; |
| | | import org.jeecg.modules.dnc.response.CommonCode; |
| | | |
| | | import org.jeecg.modules.dnc.service.*; |
| | | import org.jeecg.modules.dnc.service.IDeviceGroupService; |
| | | import org.jeecg.modules.dnc.service.IDeviceInfoService; |
| | | import org.jeecg.modules.dnc.service.IDocRelativeService; |
| | | import org.jeecg.modules.dnc.utils.ValidateUtil; |
| | | import org.jeecg.modules.dnc.utils.date.DateUtil; |
| | | |
| | | import org.jeecg.modules.dnc.utils.file.FileUtilS; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentService; |
| | | import org.jeecg.modules.system.service.IMdcProductionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | private IDeviceInfoService deviceInfoService; |
| | | @Autowired |
| | | private IDeviceGroupService deviceGroupService; |
| | | @Value("${securedoc.localFilePath}") |
| | | private String localFilePath; |
| | | // @Value("${securedoc.localFilePath}") |
| | | // private String localFilePath; |
| | | @Autowired |
| | | private IMdcEquipmentService iMdcEquipmentService; |
| | | @Autowired |
| | |
| | | ncTxt.setOrigFileName(info.getDocName()); |
| | | ncTxt.setOrigFileSuffix(info.getDocSuffix()); |
| | | ncTxt.setFileAddOrDelete(2); |
| | | String loFilePath = localFilePath + "\\" + ncTxt.getFileTxtName() + ".nc"; |
| | | try { |
| | | /* ObjectMapper mapper = new ObjectMapper(); |
| | | String json = mapper.writeValueAsString(ncTxt);*/ |
| | | String allList = new String(); |
| | | allList=(ncTxt.getFileTxtName()+"\n"); |
| | | allList+=(ncTxt.getFileNcName()+"\n"); |
| | | allList+=(ncTxt.getOrigFileName()+"\n"); |
| | | allList+=(ncTxt.getOrigFileSuffix()+"\n"); |
| | | allList+=(ncTxt.getFilePath()+"\n"); |
| | | allList+=(ncTxt.getEquipmentId()+"\n"); |
| | | allList+=(ncTxt.getFileAddOrDelete().toString()); |
| | | FileUtilS.fileWriterSql(loFilePath,allList); |
| | | }catch (Exception e) { |
| | | return true; |
| | | } |
| | | // String loFilePath = localFilePath + "\\" + ncTxt.getFileTxtName() + ".nc"; |
| | | // try { |
| | | // /* ObjectMapper mapper = new ObjectMapper(); |
| | | // String json = mapper.writeValueAsString(ncTxt);*/ |
| | | // String allList = new String(); |
| | | // allList=(ncTxt.getFileTxtName()+"\n"); |
| | | // allList+=(ncTxt.getFileNcName()+"\n"); |
| | | // allList+=(ncTxt.getOrigFileName()+"\n"); |
| | | // allList+=(ncTxt.getOrigFileSuffix()+"\n"); |
| | | // allList+=(ncTxt.getFilePath()+"\n"); |
| | | // allList+=(ncTxt.getEquipmentId()+"\n"); |
| | | // allList+=(ncTxt.getFileAddOrDelete().toString()); |
| | | // FileUtilS.fileWriterSql(loFilePath,allList); |
| | | // }catch (Exception e) { |
| | | // return true; |
| | | // } |
| | | } |
| | | } |
| | | return b; |