|
|
|
|
@ -1,29 +1,14 @@
|
|
|
|
|
package com.aucma.dms.service.impl;
|
|
|
|
|
|
|
|
|
|
//import com.hw.common.core.constant.DmsConstants;
|
|
|
|
|
//import com.hw.common.core.exception.ServiceException;
|
|
|
|
|
//import com.hw.common.core.utils.DateUtils;
|
|
|
|
|
//import com.aucma.dms.domain.BaseAttachInfo;
|
|
|
|
|
//import com.aucma.dms.domain.DmsKnowledgeRepair;
|
|
|
|
|
//import com.aucma.dms.mapper.BaseAttachInfoMapper;
|
|
|
|
|
//import com.aucma.dms.mapper.DmsKnowledgeRepairMapper;
|
|
|
|
|
//import com.aucma.dms.service.IDmsKnowledgeRepairService;
|
|
|
|
|
//import com.hw.system.api.domain.SysFile;
|
|
|
|
|
|
|
|
|
|
import com.aucma.common.constant.DmsConstants;
|
|
|
|
|
import com.aucma.common.exception.ServiceException;
|
|
|
|
|
import com.aucma.common.utils.DateUtils;
|
|
|
|
|
import com.aucma.dms.domain.BaseAttachInfo;
|
|
|
|
|
import com.aucma.dms.domain.DmsKnowledgeRepair;
|
|
|
|
|
import com.aucma.dms.mapper.BaseAttachInfoMapper;
|
|
|
|
|
import com.aucma.dms.mapper.DmsKnowledgeRepairMapper;
|
|
|
|
|
import com.aucma.dms.service.IDmsKnowledgeRepairService;
|
|
|
|
|
import com.aucma.framework.web.domain.server.SysFile;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -38,8 +23,8 @@ public class DmsKnowledgeRepairServiceImpl implements IDmsKnowledgeRepairService
|
|
|
|
|
@Autowired
|
|
|
|
|
private DmsKnowledgeRepairMapper dmsKnowledgeRepairMapper;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private BaseAttachInfoMapper baseAttachInfoMapper;
|
|
|
|
|
/* @Autowired
|
|
|
|
|
private BaseAttachInfoMapper baseAttachInfoMapper;*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询维修知识库
|
|
|
|
|
@ -51,7 +36,7 @@ public class DmsKnowledgeRepairServiceImpl implements IDmsKnowledgeRepairService
|
|
|
|
|
public DmsKnowledgeRepair selectDmsKnowledgeRepairByKnowledgeRepairId(Long knowledgeRepairId)
|
|
|
|
|
{
|
|
|
|
|
DmsKnowledgeRepair dmsKnowledgeRepair = dmsKnowledgeRepairMapper.selectDmsKnowledgeRepairByKnowledgeRepairId(knowledgeRepairId);
|
|
|
|
|
List<String> baseAttachInfos = baseAttachInfoMapper.selectListBaseAttachInfos(DmsConstants.MES_BASE_ATTACH_INFO_KNOWLEDGEREPAIR,dmsKnowledgeRepair.getKnowledgeRepairId());
|
|
|
|
|
/* List<String> baseAttachInfos = baseAttachInfoMapper.selectListBaseAttachInfos(DmsConstants.MES_BASE_ATTACH_INFO_KNOWLEDGEREPAIR,dmsKnowledgeRepair.getKnowledgeRepairId());
|
|
|
|
|
List<SysFile> sysFiles = new ArrayList<SysFile>();
|
|
|
|
|
|
|
|
|
|
// for (String string:baseAttachInfos){
|
|
|
|
|
@ -59,7 +44,7 @@ public class DmsKnowledgeRepairServiceImpl implements IDmsKnowledgeRepairService
|
|
|
|
|
// sysFile.setUrl(string);
|
|
|
|
|
// sysFiles.add(sysFile);
|
|
|
|
|
// }
|
|
|
|
|
dmsKnowledgeRepair.setSystemFiles(sysFiles);
|
|
|
|
|
dmsKnowledgeRepair.setSystemFiles(sysFiles);*/
|
|
|
|
|
return dmsKnowledgeRepair;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -92,9 +77,10 @@ public class DmsKnowledgeRepairServiceImpl implements IDmsKnowledgeRepairService
|
|
|
|
|
dmsKnowledgeRepair.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
dmsKnowledgeRepair.setIsFlag("1");
|
|
|
|
|
int i = dmsKnowledgeRepairMapper.insertDmsKnowledgeRepair(dmsKnowledgeRepair);
|
|
|
|
|
//存储图片
|
|
|
|
|
|
|
|
|
|
/* //存储图片
|
|
|
|
|
List<String> fileUrls = dmsKnowledgeRepair.getFileUrls();
|
|
|
|
|
batchInsertInstanceFiles(fileUrls, dmsKnowledgeRepair.getKnowledgeRepairId());
|
|
|
|
|
batchInsertInstanceFiles(fileUrls, dmsKnowledgeRepair.getKnowledgeRepairId());*/
|
|
|
|
|
|
|
|
|
|
return i;
|
|
|
|
|
}
|
|
|
|
|
@ -118,13 +104,14 @@ public class DmsKnowledgeRepairServiceImpl implements IDmsKnowledgeRepairService
|
|
|
|
|
}
|
|
|
|
|
dmsKnowledgeRepair.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
int i = dmsKnowledgeRepairMapper.updateDmsKnowledgeRepair(dmsKnowledgeRepair);
|
|
|
|
|
baseAttachInfoMapper.deleteListBaseAttachInfos(DmsConstants.MES_BASE_ATTACH_INFO_KNOWLEDGEREPAIR,dmsKnowledgeRepair.getKnowledgeRepairId());
|
|
|
|
|
|
|
|
|
|
// baseAttachInfoMapper.deleteListBaseAttachInfos(DmsConstants.MES_BASE_ATTACH_INFO_KNOWLEDGEREPAIR,dmsKnowledgeRepair.getKnowledgeRepairId());
|
|
|
|
|
//存储图片
|
|
|
|
|
List<String> fileUrls = dmsKnowledgeRepair.getFileUrls();
|
|
|
|
|
/* List<String> fileUrls = dmsKnowledgeRepair.getFileUrls();
|
|
|
|
|
if(fileUrls!=null) {
|
|
|
|
|
batchInsertInstanceFiles(fileUrls, dmsKnowledgeRepair.getKnowledgeRepairId());
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
return i;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -152,7 +139,7 @@ public class DmsKnowledgeRepairServiceImpl implements IDmsKnowledgeRepairService
|
|
|
|
|
return dmsKnowledgeRepairMapper.deleteDmsKnowledgeRepairByKnowledgeRepairId(knowledgeRepairId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void batchInsertInstanceFiles(List<String> fileUrls, Long knowledgeLubeId ) {
|
|
|
|
|
/* public void batchInsertInstanceFiles(List<String> fileUrls, Long knowledgeLubeId ) {
|
|
|
|
|
if (fileUrls != null && !fileUrls.isEmpty()) {
|
|
|
|
|
|
|
|
|
|
List<BaseAttachInfo> baseAttachInfos = new ArrayList<>();
|
|
|
|
|
@ -167,5 +154,5 @@ public class DmsKnowledgeRepairServiceImpl implements IDmsKnowledgeRepairService
|
|
|
|
|
}
|
|
|
|
|
baseAttachInfoMapper.batchDmsKnowLedgeLubeFile(baseAttachInfos);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
|