|
@@ -137,9 +137,9 @@ public class TechnologyArchivesService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @Description 根据工号或者身份证号查询基本信息
|
|
|
+ * @Description 根据工号或者身份证号或姓名查询基本信息
|
|
|
* @Author hsh
|
|
|
- * @param text 工号或者身份证号
|
|
|
+ * @param text 工号或者身份证号或姓名
|
|
|
* @return TechnologyArchivesMain
|
|
|
* @Date 2024/7/8 10:51
|
|
|
*/
|
|
@@ -162,6 +162,11 @@ public class TechnologyArchivesService {
|
|
|
if(null != m2){
|
|
|
return ResultVoUtil.success(m2);
|
|
|
}
|
|
|
+ //添加姓名搜索
|
|
|
+ TechnologyArchivesMain m3 = mainDao.selectTechnologyArchivesMainBySocialNo(m.getName());
|
|
|
+ if(null != m3){
|
|
|
+ return ResultVoUtil.success(m3);
|
|
|
+ }
|
|
|
return ResultVoUtil.success(m);
|
|
|
}
|
|
|
|
|
@@ -238,6 +243,36 @@ public class TechnologyArchivesService {
|
|
|
return ResultVoUtil.success(list);
|
|
|
}
|
|
|
|
|
|
+ //查找图片
|
|
|
+ public ResultVo<Map<String,Object>> selectImage1(String socialNo, String getTime) {
|
|
|
+ //为每张图片设置编号
|
|
|
+// for(int i = 0; i < imagelist.size(); i++){
|
|
|
+// imagelist.get(i).setImagenum(i+1); //从1开始计数
|
|
|
+// }
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ Map<String, Object> imgMap = firstDao.selectImage(socialNo, getTime);
|
|
|
+ map.put("data", imgMap);
|
|
|
+ return ResultVoUtil.success(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ //删除图片
|
|
|
+ public ResultVo<Map<String,Object>> deleteImage1(String socialNo, String getTime) {
|
|
|
+ if (StringUtil.isBlank(socialNo) || StringUtil.isBlank(getTime)) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有身份证号或者批准时间,请检查!");
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Object> resultMap = new HashMap<>();
|
|
|
+ try{
|
|
|
+ int num = firstDao.deleteImage(socialNo, getTime);
|
|
|
+ if(num == 0){
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "删除图片失败!");
|
|
|
+ }
|
|
|
+ resultMap.put("cg", "删除图片成功!");
|
|
|
+ return ResultVoUtil.success(resultMap);
|
|
|
+ } catch(Exception e){
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "删除图片失败!");
|
|
|
+ }
|
|
|
+ }
|
|
|
/**
|
|
|
* @Description 更新专业技术职称晋升情况
|
|
|
* @Author hsh
|
|
@@ -278,8 +313,7 @@ public class TechnologyArchivesService {
|
|
|
//职称证书图片
|
|
|
@Value("${is-prod}")
|
|
|
private boolean isProd;
|
|
|
-
|
|
|
- public ResultVo<JSONObject> putCertificateImage(MultipartFile file, String socialNo) {
|
|
|
+ public ResultVo<JSONObject> putCertificateImage(MultipartFile file,String getTime) {
|
|
|
|
|
|
String uploadDir;
|
|
|
if (isProd) {
|
|
@@ -303,10 +337,11 @@ public class TechnologyArchivesService {
|
|
|
if (fileName != null) {
|
|
|
filePath = uploadPath.resolve(fileName);
|
|
|
}
|
|
|
+ //
|
|
|
Files.copy(file.getInputStream(), filePath, StandardCopyOption.REPLACE_EXISTING);
|
|
|
- log.info("文件:{}, socialNo:{}", file.getName(), socialNo);
|
|
|
+ log.info("文件:{}", fileName);
|
|
|
String url = "http://172.16.30.8:8077/certificateImage/" + fileName;
|
|
|
- int num =firstDao.updateCertificateImage(socialNo,url);
|
|
|
+ firstDao.updateCertificateImage(getTime,url);
|
|
|
js.put("url", url);
|
|
|
js.put("name", fileName);
|
|
|
return ResultVoUtil.success(js);
|
|
@@ -1624,6 +1659,7 @@ public class TechnologyArchivesService {
|
|
|
} else {
|
|
|
// 查询所有的文档
|
|
|
String sfz = null;
|
|
|
+ String xm = null;
|
|
|
if(StringUtil.notBlank(vo.getText())){
|
|
|
TechnologyArchivesMain mainSelf = mainDao.selectTechnologyArchivesMainBySocialNo(vo.getText());
|
|
|
if(null == mainSelf || StringUtil.isBlank(mainSelf.getSocialNo())){
|
|
@@ -1637,6 +1673,7 @@ public class TechnologyArchivesService {
|
|
|
if(StringUtil.isBlank(sfz)){
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有检索到查询技术档案的身份证信息,请检查!");
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
if(t.getTableName().endsWith("main")){
|
|
|
if(StringUtil.notBlank(sql)){
|
|
@@ -1786,7 +1823,11 @@ public class TechnologyArchivesService {
|
|
|
List<HeadInfo> sortHeadInfo = headInfoList.stream().sorted(Comparator.comparing(HeadInfo::getSort)).collect(Collectors.toList());
|
|
|
|
|
|
// 导出
|
|
|
- ExcelUtil.exportExcelReport(response, list, sortHeadInfo, exportName);
|
|
|
+ if(true){
|
|
|
+ ExcelUtil.exportExcelReport(response, list, sortHeadInfo, exportName);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
map.put("code", 0);
|
|
|
map.put("massage", "导出成功!");
|