Merge branch 'dev_20230216' of E:\futianxiangmu\foton-slrs-system-rest with conflicts.
This commit is contained in:
+5
-1
@@ -416,6 +416,10 @@ public class SarBussionessStandController extends BaseController<SarBussionessSt
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "|SarBussionessStand|清空附件 重新挂靠")
|
||||
@GetMapping("/emptyFileAnewStorage")
|
||||
public ResponseMessage emptyFileAnewStorage (){
|
||||
return sarBussionessStandEOService.emptyFileAnewStorage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ public interface ISarBussionessStandService extends IService<SarBussionessStand>
|
||||
|
||||
void checkFileByEncrypt();
|
||||
|
||||
//导入
|
||||
ResponseMessage<SarBussionessStand> importSarBussionessStandFile(MultipartFile file) throws Exception;
|
||||
ResponseMessage<SarBussionessStand> importSarBussionessStand(List<Map<String, String>> dataList, String filepath)throws Exception;
|
||||
|
||||
}
|
||||
|
||||
|
||||
+53
@@ -2695,6 +2695,59 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
/*
|
||||
//1:数据迁移方案
|
||||
//方案一:清空附件 重新挂靠
|
||||
//1.流程:
|
||||
//a.备份并清空新系统中标准下附件
|
||||
//识别老系统中原文标签下标准对应新系统标准数据
|
||||
//b.将老系统中原文附件迁移至新系统存储空间,涉及到文件的复制和转码(其中转码失败率比较高,需要一定时间)
|
||||
//c.对应的文件路径储存在新系统数据库中,并且对应挂靠新系统中标准的发布稿原文下
|
||||
//d.搜索中心的刷新
|
||||
//
|
||||
//2.关联关系
|
||||
//新系统中数据表sar_standards_info表的BUILD_ID字段,对应老系统中数据表kmpro_addon34表的lore_doc_id字段
|
||||
//
|
||||
//老系统中
|
||||
//kmpro_addon34表,记录所有标准信息
|
||||
//lore_depot_sort表中Sign字段可以看出是原文或译文
|
||||
//lore_attache表中记录附件名称和路径
|
||||
//
|
||||
//新系统中
|
||||
//sar_standards_info表,记录所有海外标准信息
|
||||
//sar_buss_stand_attr_info表,记录标准对应附件(目前只有发布稿原文的字段,没有发布稿译文的存储字段。。)
|
||||
//att_file_01——att_file_10表,记录附件对应存储位置
|
||||
//
|
||||
|
||||
:
|
||||
*/
|
||||
@Override
|
||||
public ResponseMessage emptyFileAnewStorage() {
|
||||
//一: 进行数据备份 包含新系统数据备份,老系统数据备份 以及 本地备份 线上备份。
|
||||
//二: 对老系统中的三张表 进行迁移
|
||||
/*
|
||||
一:在老系统的数据库中的表进行迁移 然后根据迁移的数据
|
||||
二:查询出老系统的数据
|
||||
1:查询 出来所有的数据
|
||||
2: 查询出来以后 进行联查 三表进行联查 关联其中的数据 获得全部数据
|
||||
3: 查询出 海标标准和国内标准的全部数据 特点是 BUILD_ID 字段不能为空 因为 这个字段代表了和新老数据库的关系
|
||||
4: 查询出 企业标准的全部数据 特点依旧是 DUILD_Id 字段不能为空
|
||||
|
||||
三: 进行数据关联
|
||||
1:先跟 海外和国内的数据 进行对比 找到 kmpro_addon34表的lore_doc_id字段 与 新系统中数据表sar_standards_info表的BUILD_ID字段,
|
||||
2:对应老系统中数据表kmpro_addon34表的lore_doc_id字段 相同则进入
|
||||
四:关联数据的文件存储
|
||||
1: 判断能不能找到
|
||||
2: 如果能找到 则重新存入,
|
||||
3: 鉴定是否是原文 还是 译文 进行分类存储 或者进行标识存储
|
||||
4: 数据库增加字段,与老系统进行对应
|
||||
|
||||
数据存储的时候,建立一种表 这张表存储的数据是 需要转码的文件
|
||||
五: 数据对应上 以后 要进行换换 线上进行预览 (待)
|
||||
六: es数据进行同步
|
||||
*/
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package com.adc.da.slrs.sarStandTranslate.controller;
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.slrs.StandardQA.entity.AskUser;
|
||||
import com.adc.da.slrs.sarStandTranslate.entity.SarStandTranslate;
|
||||
import com.adc.da.slrs.sarStandTranslate.service.SarStandTranslateService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.adc.da.util.http.ResponseMessage;
|
||||
import com.adc.da.util.http.Result;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONArray;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author gjb
|
||||
* @since 2023/2/23
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "流程中心-标准需求(翻译)申请流程")
|
||||
@RequestMapping("/${restPath}/sarStandTranslate")
|
||||
@Slf4j
|
||||
public class SarStandTranslateController extends BaseController<SarStandTranslate> {
|
||||
|
||||
@Autowired
|
||||
private SarStandTranslateService sarStandTranslateService;
|
||||
|
||||
/**
|
||||
* 流程中心,标准需求翻译申请 发起
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addSarStandTranslate")
|
||||
public ResponseMessage addSarStandTranslate(@RequestBody SarStandTranslate sarStandTranslate){
|
||||
sarStandTranslate.setId(UUIDUtils.randomUUID20());
|
||||
if(sarStandTranslateService.save(sarStandTranslate)){
|
||||
return Result.success("200","添加成功",sarStandTranslate);
|
||||
}else {
|
||||
return Result.error("-1","添加失败",null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程中心,标准需求翻译审核 回填
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/selectSarStandTranslate")
|
||||
public ResponseMessage selectSarStandTranslate(String id){
|
||||
SarStandTranslate byId = sarStandTranslateService.getById(id);
|
||||
if(byId!=null){
|
||||
return Result.success("200",null,byId);
|
||||
}else {
|
||||
return Result.error("-1","失败",null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程中心,标准需求翻译申请 审核
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/updateSarStandTranslate")
|
||||
public ResponseMessage updateSarStandTranslate(@RequestBody SarStandTranslate sarStandTranslate){
|
||||
if(sarStandTranslateService.updateById(sarStandTranslate)){
|
||||
return Result.success("200","成功",sarStandTranslate);
|
||||
}else {
|
||||
return Result.error("-1","失败",null);
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.adc.da.slrs.sarStandTranslate.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandTranslate.entity.SarStandTranslate;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author gjb
|
||||
* @since 2023-02-23
|
||||
*/
|
||||
public interface SarStandTranslateDao extends BaseMapper<SarStandTranslate> {
|
||||
}
|
||||
+101
-1
@@ -1,4 +1,104 @@
|
||||
package com.adc.da.slrs.sarStandTranslate.entity;
|
||||
|
||||
public class SarStandTranslate {
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
* 标准需求翻译申请表
|
||||
* @author gjb
|
||||
* @since 2023-02-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarStandTranslate对象", description="")
|
||||
public class SarStandTranslate extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "申请人")
|
||||
@TableField("PRORPSER_NAME")
|
||||
private String proposerName;
|
||||
|
||||
@ApiModelProperty(value = "申请单位")
|
||||
@TableField("PRORPSER_UNIT")
|
||||
private String proposerUnit;
|
||||
|
||||
// @ApiModelProperty(value = "联系电话")
|
||||
// @TableField("PHONE")
|
||||
// private String phone;
|
||||
//
|
||||
// @ApiModelProperty(value = "邮箱")
|
||||
// @TableField("MAIL")
|
||||
// private String mail;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
@TableField("TYPE")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
@TableField("STAND_NUMBER")
|
||||
private String standNumber;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@TableField("STAND_NAME")
|
||||
private String standName;
|
||||
|
||||
@ApiModelProperty(value = "需求时间")
|
||||
@TableField("NEED_TIME")
|
||||
private String needTime;
|
||||
|
||||
@ApiModelProperty(value = "页数/字数")
|
||||
@TableField("NUMBER_WORDS")
|
||||
private String numberWords;
|
||||
|
||||
@ApiModelProperty(value = "原语言")
|
||||
@TableField("INITIAL_LANGUAGE")
|
||||
private String initialLanguage;
|
||||
|
||||
@ApiModelProperty(value = "目标语言")
|
||||
@TableField("GOAL_LANGUAGE")
|
||||
private String goalLanguage;
|
||||
|
||||
@ApiModelProperty(value = "费用出资项目目的项目名称")
|
||||
@TableField("COST_GOAL_PROECT_NAME")
|
||||
private String costGoalProectName;
|
||||
|
||||
@ApiModelProperty(value = "费用出资项目目的项目编号科目")
|
||||
@TableField("COST_GOAL_PROECT_NUMBER")
|
||||
private String costGoalProectNumber;
|
||||
|
||||
@ApiModelProperty(value = "是否批准")
|
||||
@TableField("RATIFY")
|
||||
private String ratify;
|
||||
|
||||
@ApiModelProperty(value = "申请理由")
|
||||
@TableField("REASON")
|
||||
private String reason;
|
||||
|
||||
@ApiModelProperty(value = "驳回理由")
|
||||
@TableField("NOT_REASON")
|
||||
private String notReason;
|
||||
|
||||
@ApiModelProperty(value = "费用")
|
||||
@TableField("COST")
|
||||
private String cost;
|
||||
|
||||
@ApiModelProperty(value = "审核人")
|
||||
@TableField("AUDIT")
|
||||
private String audit;
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandTranslate.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandTranslate.entity.SarStandTranslate;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
public interface SarStandTranslateService extends IService<SarStandTranslate> {
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.adc.da.slrs.sarStandTranslate.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandTranslate.dao.SarStandTranslateDao;
|
||||
import com.adc.da.slrs.sarStandTranslate.entity.SarStandTranslate;
|
||||
import com.adc.da.slrs.sarStandTranslate.service.SarStandTranslateService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Service
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class SarStandTranslateServiceImpl extends ServiceImpl<SarStandTranslateDao, SarStandTranslate> implements SarStandTranslateService {
|
||||
|
||||
@Autowired
|
||||
private SarStandTranslateDao sarStandTranslateDao;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user