Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+2
@@ -153,4 +153,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||
List<SysUser> getPPEmployeeList(@Param("thirdType") String thirdType);
|
||||
|
||||
void updateByIdPP (SysUser sysUser);
|
||||
|
||||
List<SysUser> getListUserName();
|
||||
}
|
||||
|
||||
+4
@@ -222,4 +222,8 @@
|
||||
id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getListUserName" resultType="com.jero.modules.system.entity.SysUser">
|
||||
select * from sys_user
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
+369
-17
@@ -28,6 +28,7 @@ import com.jero.modules.dummy.enums.DummyInventoryBaseFieldEnum;
|
||||
import com.jero.modules.dummy.service.impl.DummyLogEOServiceImpl;
|
||||
import com.jero.modules.dummy.util.DeepCopyListUtil;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
|
||||
import com.jero.modules.project.enums.ProjectInventoryFieldEnum;
|
||||
import com.jero.modules.split.common.FileUnZip;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
@@ -513,9 +514,9 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
if(CollectionUtils.isNotEmpty(baseList)){
|
||||
String title = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
title = "类别,检验项目,配置项,WVTA ID,*编号,*责任领域,交付物类型";
|
||||
title = "*类别,*检验项目,*配置项,*WVTA ID,*编号,*责任领域,*交付物类型";
|
||||
}else{
|
||||
title = "Category,Inspection Items,Configuration Item,WVTA ID,*Number,*Responsible Field,Deliverable Type";
|
||||
title = "*Category,*Inspection Items,*Configuration Item,*WVTA ID,*Number,*Responsible Field,*Deliverable Type";
|
||||
}
|
||||
|
||||
int pos = file.getOriginalFilename().lastIndexOf(".");
|
||||
@@ -703,12 +704,12 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
|
||||
|
||||
// //树形数据字典
|
||||
// List<SysCategory> categoryList = sysCategoryService.list();
|
||||
// //普通数据字典
|
||||
// List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
||||
// importDatas(datas, categoryList, dictItemList, zipEntryName,saveDirectory,authDummyInventoryInfoEO);
|
||||
String cut = authDummyInventoryInfoEO.getCut();
|
||||
importDisposeData(datas,cut);
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
//普通数据字典
|
||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsAll();
|
||||
importDatas(datas, categoryList, dictItemList, zipEntryName,saveDirectory,authDummyInventoryInfoEO);
|
||||
// String cut = authDummyInventoryInfoEO.getCut();
|
||||
// importDisposeData(datas,cut);
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
}else{
|
||||
@@ -720,6 +721,357 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
}
|
||||
}
|
||||
|
||||
private void importDatas(List<AuthDummyInventoryInfoEO> datas,
|
||||
List<SysCategory> categoryList, List<SysDictItem> dictItemList,
|
||||
String zipEntryName, File saveDirectory,
|
||||
AuthDummyInventoryInfoEO authDummyInventoryInfoEOTemp) {
|
||||
List<String> msgList = new ArrayList<>();
|
||||
|
||||
//模板数据验证
|
||||
msgList = dataTemplateVerify(datas, dictItemList, zipEntryName, authDummyInventoryInfoEOTemp, categoryList);
|
||||
if (msgList.size() > 0) {
|
||||
//返回报错信息
|
||||
String html = "";
|
||||
for (String s : msgList) {
|
||||
html += s + "</br>";
|
||||
}
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
throw new JeroBootException(html);
|
||||
}else {
|
||||
if (datas.size() != 0) {
|
||||
this.saveBatch(datas);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> dataTemplateVerify(List<AuthDummyInventoryInfoEO> datas,
|
||||
List<SysDictItem> dictItemList, String zipEntryName,
|
||||
AuthDummyInventoryInfoEO authDummyInventoryInfoEOTemp,
|
||||
List<SysCategory> categoryList) {
|
||||
String dictId = sysCategoryMapper.getDictId("ren4_zheng4_-_jiao1_fu4_wu4_lei4_xing2");
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> e.getSysDictId().equals(dictId)).collect(Collectors.toList());
|
||||
List<String> treeNameList = new ArrayList<>();
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
treeNameList = collect.stream().map(SysCategory::getName).collect(Collectors.toList());
|
||||
}else{
|
||||
treeNameList = collect.stream().map(SysCategory::getEnName).collect(Collectors.toList());
|
||||
}
|
||||
int i = 2;
|
||||
List<String> msgList = new ArrayList<>();
|
||||
String value = "";
|
||||
boolean flag = true;
|
||||
|
||||
//编号验证
|
||||
verifySerialNumber(datas,authDummyInventoryInfoEOTemp);
|
||||
for(AuthDummyInventoryInfoEO authDummyInventoryInfoEO :datas){
|
||||
i++;
|
||||
String errorMsg = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
errorMsg = "第" + i + "行:";
|
||||
}else{
|
||||
errorMsg = i + " line:";
|
||||
}
|
||||
//类别
|
||||
String category = authDummyInventoryInfoEO.getCategory();
|
||||
//检验项目
|
||||
String inspectionItem = authDummyInventoryInfoEO.getInspectionItem();
|
||||
//配置项
|
||||
String configItem = authDummyInventoryInfoEO.getConfigItem();
|
||||
//WVTA ID
|
||||
String wvtaId = authDummyInventoryInfoEO.getWvtaId();
|
||||
//标准编号
|
||||
String serialNumber = authDummyInventoryInfoEO.getSerialNumber();
|
||||
//责任领域
|
||||
String dutyTerritory = authDummyInventoryInfoEO.getDutyTerritoryName();
|
||||
//交付物类型
|
||||
String deliverableType = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
deliverableType = authDummyInventoryInfoEO.getDeliverableTypeName();
|
||||
}else {
|
||||
deliverableType = authDummyInventoryInfoEO.getDeliverableTypeNameEn();
|
||||
}
|
||||
|
||||
//编号必填
|
||||
flag = must(authDummyInventoryInfoEO, errorMsg, msgList, serialNumber, "编号", "Number");
|
||||
|
||||
//WVTA ID
|
||||
|
||||
if(StringUtils.isNotBlank(wvtaId)){
|
||||
if(wvtaId.length() > 100){
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "WVTA ID不能超过100个字符, ";
|
||||
}else{
|
||||
message = errorMsg + " The WVTA ID cannot contain more than 100 characters, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
} else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "WVTA ID不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The WVTA ID cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
//类别
|
||||
|
||||
if(StringUtils.isNotBlank(category)){
|
||||
if(category.length() > 100){
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "类别不能超过100个字符, ";
|
||||
}else{
|
||||
message = errorMsg + " The Category cannot contain more than 100 characters, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "类别不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Category cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
//检验项目
|
||||
|
||||
if(StringUtils.isNotBlank(inspectionItem)){
|
||||
if(inspectionItem.length() > 100){
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "检验项目不能超过100个字符, ";
|
||||
}else{
|
||||
message = errorMsg + " The InspectionItem cannot contain more than 100 characters, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "检验项目不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The InspectionItem cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
//配置项
|
||||
|
||||
if(StringUtils.isNotBlank(configItem)){
|
||||
if(configItem.length() > 100){
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "配置项不能超过100个字符, ";
|
||||
}else{
|
||||
message = errorMsg + " The ConfigItem cannot contain more than 100 characters, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "配置项不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The ConfigItem cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
//责任领域
|
||||
if(StringUtils.isNotBlank(dutyTerritory)){
|
||||
value = pullMore(dictItemList, authDummyInventoryInfoEO, errorMsg, dutyTerritory,msgList,"责任领域","Responsible Field","duty_territory");
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
authDummyInventoryInfoEO.setDutyTerritory(value);
|
||||
}
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "责任领域不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Responsible Field cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
//交付物类型
|
||||
if(StringUtils.isNotEmpty(deliverableType)){
|
||||
value = tree(categoryList,treeNameList, authDummyInventoryInfoEO, errorMsg, deliverableType,msgList,"交付物类型","Deliverable Type","deliverable_template");
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
String treeId = getTreeId(categoryList, authDummyInventoryInfoEOTemp, treeNameList, value);
|
||||
authDummyInventoryInfoEO.setDeliverableType(treeId);
|
||||
}
|
||||
}else{
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())){
|
||||
message = errorMsg + "交付物类型不能为空, ";
|
||||
}else{
|
||||
message = errorMsg + " The Deliverable Type cannot null, ";
|
||||
}
|
||||
msgList.add(message);
|
||||
}
|
||||
}
|
||||
return msgList;
|
||||
}
|
||||
|
||||
private String getTreeId(List<SysCategory> categoryList, AuthDummyInventoryInfoEO authDummyInventoryInfoEOTemp,
|
||||
List<String> treeNameList, String value) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String valueTemp : value.split(",")) {
|
||||
if (treeNameList.contains(valueTemp)) {
|
||||
List<SysCategory> sysCategoryList = new ArrayList<>();
|
||||
if (CutEnum.CN.getValue().equals(authDummyInventoryInfoEOTemp.getCut())) {
|
||||
sysCategoryList = categoryList.stream().filter(e -> e.getName().equals(valueTemp)).collect(Collectors.toList());
|
||||
} else {
|
||||
sysCategoryList = categoryList.stream().filter(e -> e.getEnName().equals(valueTemp)).collect(Collectors.toList());
|
||||
}
|
||||
if (sysCategoryList.size() != 0) {
|
||||
sb.append(sysCategoryList.get(0).getId() + ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(sb)) {
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
return substring;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String tree(List<SysCategory> categoryList, List<String> nameList,
|
||||
AuthDummyInventoryInfoEO authDummyInventoryInfoEO,
|
||||
String errorMsg, String value, List<String> msgList,
|
||||
String nameCn, String nameEn, String dictCode) {
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String s : value.split(",")) {
|
||||
if(!nameList.contains(s)){
|
||||
sb.append(s+",");
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(sb)){
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
if (CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())) {
|
||||
errorMsg += nameCn + "中的" + substring + "与数据字典不匹配, ";
|
||||
} else {
|
||||
errorMsg += nameEn + " " + substring + " does not match the data dictionary, ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}else{
|
||||
StringBuilder sbTemp = new StringBuilder();
|
||||
for (String s : value.split(",")) {
|
||||
List<SysCategory> collect = new ArrayList<>();
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
collect = categoryList.stream().filter(e -> s.equals(e.getName())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
sbTemp.append(collect.get(0).getName()+",");
|
||||
}
|
||||
}else{
|
||||
collect = categoryList.stream().filter(e -> s.equals(e.getEnName())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
sbTemp.append(collect.get(0).getEnName()+",");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(sbTemp)){
|
||||
String substring = sbTemp.substring(0, sbTemp.length() - 1);
|
||||
return substring;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String pullMore(List<SysDictItem> dictItemList, AuthDummyInventoryInfoEO authDummyInventoryInfoEO,
|
||||
String errorMsg, String value, List<String> msgList, String nameCn,
|
||||
String nameEn, String dictCode) {
|
||||
List<String> valueList = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<String> list = Arrays.asList(value.split(","));
|
||||
List<SysDictItem> sysDictItemList = new ArrayList<>();
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
sysDictItemList = dictItemList.stream().filter(e ->dictCode.equals(e.getDictCode()) && list.contains(e.getItemText())).collect(Collectors.toList());
|
||||
}else{
|
||||
sysDictItemList = dictItemList.stream().filter(e ->dictCode.equals(e.getDictCode()) && list.contains(e.getEnName())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
if(list.size() == sysDictItemList.size()){
|
||||
valueList = sysDictItemList.stream().map(SysDictItem::getItemValue).collect(Collectors.toList());
|
||||
|
||||
}else{
|
||||
//数据中有与数据字典不匹配的值
|
||||
List<String> finalValueList = valueList;
|
||||
List<String> diffList = list.stream().filter(e -> !finalValueList.contains(e)).collect(Collectors.toList());
|
||||
if (CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())) {
|
||||
errorMsg += nameCn + "中的" + StringUtils.join(diffList,",") + "与数据字典不匹配, ";
|
||||
} else {
|
||||
errorMsg += nameEn + " " + StringUtils.join(diffList,",") + " does not match the data dictionary, ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
}
|
||||
return StringUtils.join(valueList,",");
|
||||
}
|
||||
|
||||
private boolean must(AuthDummyInventoryInfoEO authDummyInventoryInfoEO,
|
||||
String errorMsg, List<String> msgList, String serialNumber,
|
||||
String nameCn, String nameEn) {
|
||||
int errorCount = 0;
|
||||
if(StringUtils.isBlank(serialNumber)){
|
||||
errorCount ++;
|
||||
if(CutEnum.CN.getValue().equals(authDummyInventoryInfoEO.getCut())){
|
||||
errorMsg += nameCn + "为必填项,不能为空, ";
|
||||
}else{
|
||||
errorMsg += nameEn + "This parameter is mandatory and cannot be empty, ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
if(errorCount == 0){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void verifySerialNumber(List<AuthDummyInventoryInfoEO> datas,
|
||||
AuthDummyInventoryInfoEO authDummyInventoryInfoEOTemp) {
|
||||
//1. 验证标准号在文档库中是否存在
|
||||
List<String> serialNumberList = datas.stream().map(AuthDummyInventoryInfoEO::getSerialNumber).collect(Collectors.toList());
|
||||
LambdaQueryWrapper<BussDocumentLibraryEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(BussDocumentLibraryEO::getSerialNumber,serialNumberList);
|
||||
List<BussDocumentLibraryEO> bussDocumentLibraryEOList = iBussDocumentLibraryEOService.list(wrapper);
|
||||
//文档库中可能存在重复的标准号
|
||||
List<String> serialNumberListTemp = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).distinct().collect(Collectors.toList());
|
||||
if(serialNumberList.size() != serialNumberListTemp.size()){
|
||||
//存在文档库没有的数据
|
||||
List<String> collect = bussDocumentLibraryEOList.stream().map(BussDocumentLibraryEO::getSerialNumber).collect(Collectors.toList());
|
||||
List<String> serialNumbers = serialNumberList.stream().filter(e -> !collect.contains(e)).collect(Collectors.toList());
|
||||
if(serialNumbers.size() > 0){
|
||||
if(CutEnum.CN.getValue().equals(datas.get(0).getCut())){
|
||||
throw new JeroBootException(StringUtils.join(serialNumbers,",")+"文档库中不存在,不能添加");
|
||||
}else{
|
||||
throw new JeroBootException(StringUtils.join(serialNumbers,",")+" does not exist in the document library and cannot be added");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for (AuthDummyInventoryInfoEO authDummyInventoryInfoEO : datas) {
|
||||
List<BussDocumentLibraryEO> collect = bussDocumentLibraryEOList.stream()
|
||||
.filter(e -> e.getSerialNumber().equals(authDummyInventoryInfoEO.getSerialNumber())).collect(Collectors.toList());
|
||||
authDummyInventoryInfoEO.setBussDocumentLibraryId(collect.get(0).getId());
|
||||
}
|
||||
}
|
||||
// //2. 验证标准号在法规清单中是否添加过
|
||||
// LambdaQueryWrapper<ProjectCertificationInventoryEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
// lambdaQueryWrapper.in(ProjectCertificationInventoryEO::getSerialNumber,serialNumberList).in(ProjectCertificationInventoryEO::getProjectLibraryId,projectCertificationInventoryEOTemp.getProjectLibraryId());
|
||||
// List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = this.list(lambdaQueryWrapper);
|
||||
// List<String> serialNumberTempList = projectCertificationInventoryEOList.stream().map(ProjectCertificationInventoryEO::getSerialNumber).collect(Collectors.toList());
|
||||
// if(projectCertificationInventoryEOList.size() > 0){
|
||||
// if(CutEnum.CN.getValue().equals(datas.get(0).getCut())){
|
||||
// throw new JeroBootException(StringUtils.join(serialNumberTempList,",")+"已存在,不能重复添加");
|
||||
// }else{
|
||||
// throw new JeroBootException(StringUtils.join(serialNumberTempList,",")+" already exists and cannot be added again");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> batchAdd(JSONObject json) {
|
||||
try {
|
||||
@@ -763,21 +1115,21 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
if (field == null) return null;
|
||||
|
||||
switch (field) {
|
||||
case "类别": return "category";
|
||||
case "检验项目": return "inspectionItem";
|
||||
case "配置项": return "configItem";
|
||||
case "WVTA ID": return "wvtaId";
|
||||
case "*类别": return "category";
|
||||
case "*检验项目": return "inspectionItem";
|
||||
case "*配置项": return "configItem";
|
||||
case "*WVTA ID": return "wvtaId";
|
||||
case "*编号" : return "serialNumber";
|
||||
case "*责任领域": return "dutyTerritoryName";
|
||||
case "交付物类型" : return "deliverableTypeName";
|
||||
case "*交付物类型" : return "deliverableTypeName";
|
||||
|
||||
case "Category" : return "Category";
|
||||
case "Inspection Items" : return"inspectionItem";
|
||||
case "Configuration Item" : return"configItem";
|
||||
case "*Category" : return "Category";
|
||||
case "*Inspection Items" : return"inspectionItem";
|
||||
case "*Configuration Item" : return"configItem";
|
||||
// case "WVTA ID" : return "wvtaId";
|
||||
case "*Number" : return "serialNumber";
|
||||
case "*Responsible Field" : return "dutyTerritoryName";
|
||||
case "Deliverable Type" : return "deliverableTypeNameEn";
|
||||
case "*Deliverable Type" : return "deliverableTypeNameEn";
|
||||
|
||||
|
||||
default: return null;
|
||||
|
||||
+6
@@ -86,6 +86,12 @@ public class OtaBaCxListController extends JeroController<OtaBaCxList, IOtaBaCxL
|
||||
cpmc = cpmc.replace("%", "\\%");
|
||||
queryWrapper.like(OtaBaCxList::getCpmc, cpmc);
|
||||
}
|
||||
|
||||
String cpxh = req.getParameter("cpmc");
|
||||
if (StringUtils.isNotBlank(cpxh)) {
|
||||
cpxh = cpxh.replace("%", "\\%");
|
||||
queryWrapper.like(OtaBaCxList::getCpxh, cpxh);
|
||||
}
|
||||
queryWrapper.orderByDesc(OtaBaCxList::getCreateTime);
|
||||
IPage<OtaBaCxList> pageList = otaBaCxListService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
|
||||
+145
-138
@@ -4,6 +4,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
||||
@@ -13,6 +14,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -22,164 +24,169 @@ import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Description: 车型备案-填写记录表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-25
|
||||
* @Date: 2023-03-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="车型备案-填写记录表")
|
||||
@Api(tags = "车型备案-填写记录表")
|
||||
@RestController
|
||||
@RequestMapping("/ota/otaBaCxTxjl")
|
||||
@Slf4j
|
||||
public class OtaBaCxTxjlController extends JeroController<OtaBaCxTxjl, IOtaBaCxTxjlService> {
|
||||
@Autowired
|
||||
private IOtaBaCxTxjlService otaBaCxTxjlService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param otaBaCxTxjl
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-分页列表查询")
|
||||
@ApiOperation(value="车型备案-填写记录表-分页列表查询", notes="车型备案-填写记录表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(OtaBaCxTxjl otaBaCxTxjl,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<OtaBaCxTxjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxTxjl, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<OtaBaCxTxjl> page = new Page<OtaBaCxTxjl>(pageNo, pageSize);
|
||||
IPage<OtaBaCxTxjl> pageList = otaBaCxTxjlService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
@Autowired
|
||||
private IOtaBaCxTxjlService otaBaCxTxjlService;
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-列表查询")
|
||||
@ApiOperation(value="车型备案-填写记录表-列表查询", notes="车型备案-填写记录表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OtaBaCxTxjl>> queryList() {
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param otaBaCxTxjl
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-分页列表查询")
|
||||
@ApiOperation(value = "车型备案-填写记录表-分页列表查询", notes = "车型备案-填写记录表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(OtaBaCxTxjl otaBaCxTxjl,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
Page<OtaBaCxTxjl> page = new Page<OtaBaCxTxjl>(pageNo, pageSize);
|
||||
String otaId = req.getParameter("otaId");
|
||||
if (StringUtils.isEmpty(otaId)) {
|
||||
return Result.OK(page);
|
||||
}
|
||||
QueryWrapper<OtaBaCxTxjl> queryWrapper = QueryGenerator.initQueryWrapper(otaBaCxTxjl, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<OtaBaCxTxjl> pageList = otaBaCxTxjlService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-列表查询")
|
||||
@ApiOperation(value = "车型备案-填写记录表-列表查询", notes = "车型备案-填写记录表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<OtaBaCxTxjl>> queryList() {
|
||||
List<OtaBaCxTxjl> list = otaBaCxTxjlService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param otaBaCxTxjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-添加")
|
||||
@ApiOperation(value="车型备案-填写记录表-添加", notes="车型备案-填写记录表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OtaBaCxTxjl otaBaCxTxjl) {
|
||||
otaBaCxTxjlService.add(otaBaCxTxjl);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param otaBaCxTxjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-编辑")
|
||||
@ApiOperation(value="车型备案-填写记录表-编辑", notes="车型备案-填写记录表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody OtaBaCxTxjl otaBaCxTxjl) {
|
||||
otaBaCxTxjlService.editById(otaBaCxTxjl);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-通过id删除")
|
||||
@ApiOperation(value="车型备案-填写记录表-通过id删除", notes="车型备案-填写记录表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
otaBaCxTxjlService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-批量删除")
|
||||
@ApiOperation(value="车型备案-填写记录表-批量删除", notes="车型备案-填写记录表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.otaBaCxTxjlService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-通过id查询")
|
||||
@ApiOperation(value="车型备案-填写记录表-通过id查询", notes="车型备案-填写记录表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
OtaBaCxTxjl otaBaCxTxjl = otaBaCxTxjlService.queryById(id);
|
||||
if(otaBaCxTxjl==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(otaBaCxTxjl);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过otaId查询
|
||||
*
|
||||
* @param otaId
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-通过otaId查询")
|
||||
@ApiOperation(value="车型备案-填写记录表-通过otaId查询", notes="车型备案-填写记录表-通过otaId查询")
|
||||
@GetMapping(value = "/queryByOtaId")
|
||||
public Result<?> queryByOtaId(@RequestParam(name="otaId",required=true) String otaId) {
|
||||
List<OtaBaCxTxjl> otaBaCxTxjlList = otaBaCxTxjlService.queryByOtaId(otaId);
|
||||
if(otaBaCxTxjlList==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(otaBaCxTxjlList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param otaBaCxTxjl
|
||||
*/
|
||||
* 添加
|
||||
*
|
||||
* @param otaBaCxTxjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-添加")
|
||||
@ApiOperation(value = "车型备案-填写记录表-添加", notes = "车型备案-填写记录表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody OtaBaCxTxjl otaBaCxTxjl) {
|
||||
otaBaCxTxjlService.add(otaBaCxTxjl);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param otaBaCxTxjl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-编辑")
|
||||
@ApiOperation(value = "车型备案-填写记录表-编辑", notes = "车型备案-填写记录表-编辑")
|
||||
@PutMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody OtaBaCxTxjl otaBaCxTxjl) {
|
||||
otaBaCxTxjlService.editById(otaBaCxTxjl);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-通过id删除")
|
||||
@ApiOperation(value = "车型备案-填写记录表-通过id删除", notes = "车型备案-填写记录表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||
otaBaCxTxjlService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-批量删除")
|
||||
@ApiOperation(value = "车型备案-填写记录表-批量删除", notes = "车型备案-填写记录表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
this.otaBaCxTxjlService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-通过id查询")
|
||||
@ApiOperation(value = "车型备案-填写记录表-通过id查询", notes = "车型备案-填写记录表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
OtaBaCxTxjl otaBaCxTxjl = otaBaCxTxjlService.queryById(id);
|
||||
if (otaBaCxTxjl == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(otaBaCxTxjl);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过otaId查询
|
||||
*
|
||||
* @param otaId
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "车型备案-填写记录表-通过otaId查询")
|
||||
@ApiOperation(value = "车型备案-填写记录表-通过otaId查询", notes = "车型备案-填写记录表-通过otaId查询")
|
||||
@GetMapping(value = "/queryByOtaId")
|
||||
public Result<?> queryByOtaId(@RequestParam(name = "otaId", required = true) String otaId) {
|
||||
List<OtaBaCxTxjl> otaBaCxTxjlList = otaBaCxTxjlService.queryByOtaId(otaId);
|
||||
if (otaBaCxTxjlList == null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(otaBaCxTxjlList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param otaBaCxTxjl
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, OtaBaCxTxjl otaBaCxTxjl) {
|
||||
return super.exportXls(request, otaBaCxTxjl, OtaBaCxTxjl.class, "车型备案-填写记录表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, OtaBaCxTxjl.class);
|
||||
|
||||
+33
-2
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.ota.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -8,11 +9,13 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.ota.entity.OtaBaCxList;
|
||||
import com.jero.modules.ota.entity.OtaBaSjList;
|
||||
import com.jero.modules.ota.service.IOtaBaSjListService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -55,9 +58,37 @@ public class OtaBaSjListController extends JeroController<OtaBaSjList, IOtaBaSjL
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<OtaBaSjList> queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjList, req.getParameterMap());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<OtaBaSjList> page = new Page<OtaBaSjList>(pageNo, pageSize);
|
||||
LambdaQueryWrapper<OtaBaSjList> queryWrapper = new LambdaQueryWrapper<>();
|
||||
String cpdjbh = req.getParameter("cpdjbh");
|
||||
if (StringUtils.isNotBlank(cpdjbh)) {
|
||||
cpdjbh = cpdjbh.replace("%", "\\%");
|
||||
queryWrapper.like(OtaBaSjList::getCpdjbh, cpdjbh);
|
||||
}
|
||||
String ggpc = req.getParameter("ggpc");
|
||||
if (StringUtils.isNotBlank(ggpc)) {
|
||||
ggpc = ggpc.replace("%", "\\%");
|
||||
queryWrapper.like(OtaBaSjList::getGgpc, ggpc);
|
||||
}
|
||||
|
||||
String cpsb = req.getParameter("cpsb");
|
||||
if (StringUtils.isNotBlank(cpsb)) {
|
||||
cpsb = cpsb.replace("%", "\\%");
|
||||
queryWrapper.like(OtaBaSjList::getCpsb, cpsb);
|
||||
}
|
||||
|
||||
String cpmc = req.getParameter("cpmc");
|
||||
if (StringUtils.isNotBlank(cpmc)) {
|
||||
cpmc = cpmc.replace("%", "\\%");
|
||||
queryWrapper.like(OtaBaSjList::getCpmc, cpmc);
|
||||
}
|
||||
|
||||
String cpxh = req.getParameter("cpmc");
|
||||
if (StringUtils.isNotBlank(cpxh)) {
|
||||
cpxh = cpxh.replace("%", "\\%");
|
||||
queryWrapper.like(OtaBaSjList::getCpxh, cpxh);
|
||||
}
|
||||
|
||||
IPage<OtaBaSjList> pageList = otaBaSjListService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
+1
@@ -114,6 +114,7 @@ public class OtaBaSjGgnrfs implements Serializable {
|
||||
/**告知用户方式(可多选)*/
|
||||
@Excel(name = "告知用户方式(可多选)", width = 15)
|
||||
@ApiModelProperty(value = "告知用户方式(可多选)")
|
||||
@Dict(dicCode = "user_notification_mode")
|
||||
private java.lang.String gzyhfs;
|
||||
|
||||
/**用户告知相关文件*/
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.jero.modules.ota.entity;
|
||||
|
||||
import com.jero.modules.extRepo.entity.ERFTreeData;
|
||||
import com.jero.modules.ota.service.impl.OtaBaSjSjmbclServiceImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class VinObj {
|
||||
|
||||
|
||||
String vin;
|
||||
String cx;
|
||||
String gglx;
|
||||
Date scrq;
|
||||
String scrqStr;
|
||||
|
||||
public String getVin() {
|
||||
return vin;
|
||||
}
|
||||
|
||||
public void setVin(String vin) {
|
||||
this.vin = vin;
|
||||
}
|
||||
|
||||
public String getCx() {
|
||||
return cx;
|
||||
}
|
||||
|
||||
public void setCx(String cx) {
|
||||
this.cx = cx;
|
||||
}
|
||||
|
||||
public String getGglx() {
|
||||
return gglx;
|
||||
}
|
||||
|
||||
public void setGglx(String gglx) {
|
||||
this.gglx = gglx;
|
||||
}
|
||||
|
||||
public Date getScrq() {
|
||||
return scrq;
|
||||
}
|
||||
|
||||
public void setScrq(Date scrq) {
|
||||
this.scrq = scrq;
|
||||
}
|
||||
|
||||
public String getScrqStr() {
|
||||
return scrqStr;
|
||||
}
|
||||
|
||||
public void setScrqStr(String scrqStr) {
|
||||
this.scrqStr = scrqStr;
|
||||
}
|
||||
|
||||
}
|
||||
+46
-46
@@ -22,44 +22,44 @@ public enum OtaTitleEnum {
|
||||
TXZD("txzd", "通信终端", "communication_terminal"),
|
||||
CDOTASJ("cdotasj", "车端OTA升级管理系统", "0"),
|
||||
|
||||
BHSJB("bhsjb", "保护升级包", "2"),
|
||||
BHCLBB("bhclbb", "保护车辆版本", "2"),
|
||||
CLGXNL("clgxnl", "车辆更新能力", "2"),
|
||||
CLSJTJ("clsjtj", "车辆升级条件", "2"),
|
||||
CLSJDL("clsjdl", "车辆升级所需电量", "2"),
|
||||
SJBHAQ("sjbhaq", "升级保护车辆安全", "2"),
|
||||
SJANTJ("sjantj", "升级所满足的安全条件", "2"),
|
||||
SJSBAQ("sjsbaq", "升级失败安全状态", "2"),
|
||||
SJGG("sjgg", "升级公告", "2"),
|
||||
SJZT("sjzt", "升级结果状态", "2"),
|
||||
BHSJB("bhsjb", "激光雷达-应保护升级包的真实性和完整性,以合理地防止其受到损害,并合理地防止无效升级", "2"),
|
||||
BHCLBB("bhclbb", "激光雷达-应保护车辆上的软件版本(集),防止未经授权的修改", "2"),
|
||||
CLGXNL("clgxnl", "升级功能要求-车辆应具备更新软件版本(集)的能力,应通过使用电子通信接口,至少用过标准接口(如OBD端口),以标准化的方式易于读取", "2"),
|
||||
CLSJTJ("clsjtj", "升级功能要求-应确保车辆在执行软件升级之前满足先决条件", "2"),
|
||||
CLSJDL("clsjdl", "升级功能要求-应确保只有当车辆有充足电量完成升级过程时,才能执行软件升级(包括可能恢复到以前版本或使车辆进入安全状态所需的电量)", "2"),
|
||||
SJBHAQ("sjbhaq", "升级功能要求-当执行升级可能影响车辆安全时,应在升级执行过程中通过技术手段确保车辆安全", "2"),
|
||||
SJANTJ("sjantj", "升级功能要求-若升级的执行影响驾驶安全,至少应满足: (a)确保升级执行期间无法驾驶车辆; (b)确保驾驶员不能使用任何可能影响车辆安全或成功执行升级的车辆功能", "2"),
|
||||
SJSBAQ("sjsbaq", "升级功能要求-车辆能够恢复到以前的可用版本,或确保车辆处于安全状态。", "2"),
|
||||
SJGG("sjgg", "用户告知要求-在升级执行前,应告知车辆用户升级信息,告知的信息应包括: (a)升级目的; (b)车辆功能升级所实施的任何变更; (c)完成升级执行的预计时间; (d)升级执行期间可能不可用的任何车辆功能; (e)可能帮助车辆用户安全执行升级的任何指导信息。", "2"),
|
||||
SJZT("sjzt", "用户告知要求-在执行升级后,车辆应: (a)告知车辆用户车辆升级的结果(成功或失败); (b)若升级成功,告知车辆用户已实施的变更,用户手册(如果适用)的任何相关更新。", "2"),
|
||||
|
||||
BHJZ("bhjz", "保护机制", "protection_mechanism"),
|
||||
FSXJZ("fsxjz", "防失效机制", "fail_safe_mechanism"),
|
||||
SJSBCS("sjsbcs", "升级失败措施", "upgrade_failure"),
|
||||
BHJZ("bhjz", "真实性、完整性保护机制", "protection_mechanism"),
|
||||
FSXJZ("fsxjz", "防失效保护机制", "fail_safe_mechanism"),
|
||||
SJSBCS("sjsbcs", "升级失败后车辆安全措施", "upgrade_failure"),
|
||||
XXAQJZ("xxaqjz", "信息安全机制", "Information_security_mechanism"),
|
||||
|
||||
XTLB("xtlb", "系统类别", "0"),
|
||||
SFKSJ("sfksj", "是否可升级", "2"),
|
||||
SJBGCS("sjbgcs", "升级变更技术参数", "0"),
|
||||
TPT("tpt", "系统电子控制器架构拓扑图", "0"),
|
||||
SJBGCS("sjbgcs", "升级可能变更的《公告》技术参数", "0"),
|
||||
//TPT("tpt", "系统-电子控制器架构拓扑图(附件需含拓扑图介绍)", "0"),
|
||||
KZQMC("kzqmc", "电子控制器名称", "0"),
|
||||
AQWZXDJ("aqwzxdj", "安全完整性等级", "0"),
|
||||
AQWZXDJ("aqwzxdj", "电子控制器汽车安全完整性等级(ASIL)", "0"),
|
||||
KZQSCQY("kzqscqy", "电子控制器生产企业", "0"),
|
||||
KZQXH("kzqxh", "电子控制器型号", "0"),
|
||||
YJBBXX("yjbbxx", "硬件版本信息", "0"),
|
||||
CSRJBBH("csrjbbh", "初始软件版本号", "0"),
|
||||
CSRJBWZSJ("csrjbwzsj", "初始软件包完整数据", "0"),
|
||||
SJSFYX("sjsfyx", "升级是否影响整车安全、节能、环保、防盗等", "0"),
|
||||
CSRJBWZSJ("csrjbwzsj", "初始软件包的完整性验证数据", "0"),
|
||||
SJSFYX("sjsfyx", "升级是否影响整车安全、节能、环保、防盗等性能", "0"),
|
||||
CZXTLX("czxtlx", "操作系统类型", "0"),
|
||||
CZXTSCQY("czxtscqy", "操作系统生产企业", "0"),
|
||||
CZXTBBH("czxtbbh", "操作系统版本号", "0"),
|
||||
CZXTBBH("czxtbbh", "软件版本号", "0"),
|
||||
|
||||
GNMC("gnmc", "功能名称", "0"),
|
||||
PZQK("pzqk", "配置情况", "2"),
|
||||
JSZDHJB("jszdhjb", "驾驶自动化级别", "driving_automation_level"),
|
||||
SJGGCS("sjggcs", "升级可能变更的《公告》技术参数", "0"),
|
||||
GNMS("gnms", "功能描述", "0"),
|
||||
SYTJ("sytj", "适用条件", "0"),
|
||||
SYTJ("sytj", "适用条件(边界条件)", "0"),
|
||||
RJKFQY("rjkfqy", "软件开发企业", "0"),
|
||||
CSYZSJ("csyzsj", "初始软件包的完整性验证数据", "0"),
|
||||
FJ("fj", "附件", "0"),
|
||||
@@ -120,19 +120,19 @@ public enum OtaTitleEnum {
|
||||
CZTX_BBH("cztxBbh", "车载通信系统-版本号", "0"),
|
||||
CZTX_KFQY("cztxKfqy", "车载通信系统-软件开发企业", "0"),
|
||||
JSFZCZJ_PZ("jsfzczjPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-配置", "2"),
|
||||
JSFZCZJ_MC("jsfzczjMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-名称", "0"),
|
||||
JSFZCZJ_MC("jsfzczjMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-操纵件名称", "0"),
|
||||
JSFZCZJ_YJXH("jsfzczjYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-硬件规格型号", "0"),
|
||||
JSFZCZJ_SCQY("jsfzczjScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-生产企业", "0"),
|
||||
JSFZZSQ_PZ("jsfzzsqPz", "驾驶辅助系统操纵件、指示器及信号装置- 驾驶辅助功能指示器/信号装置-配置", "2"),
|
||||
JSFZZSQ_MC("jsfzzsqMc", "驾驶辅助系统操纵件、指示器及信号装置- 驾驶辅助功能指示器/信号装置-名称", "0"),
|
||||
JSFZZSQ_YJXH("jsfzzsqYjxh", "驾驶辅助系统操纵件、指示器及信号装置- 驾驶辅助功能指示器/信号装置-硬件规格型号", "0"),
|
||||
JSFZZSQ_SCQY("jsfzzsqScqy", "驾驶辅助系统操纵件、指示器及信号装置- 驾驶辅助功能指示器/信号装置-生产企业", "0"),
|
||||
JSFZZSQ_PZ("jsfzzsqPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-配置", "2"),
|
||||
JSFZZSQ_MC("jsfzzsqMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-指示器/信号装置名称", "0"),
|
||||
JSFZZSQ_YJXH("jsfzzsqYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-硬件规格型号", "0"),
|
||||
JSFZZSQ_SCQY("jsfzzsqScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-生产企业", "0"),
|
||||
FXPTSTS_PZ("fxptstsPz", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-配置", "2"),
|
||||
FXPTSTS_MC("fxptstsMc", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-名称", "0"),
|
||||
FXPTSTS_MC("fxptstsMc", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-指示器/信号装置名称", "0"),
|
||||
FXPTSTS_YJXH("fxptstsYjxh", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-硬件规格型号", "0"),
|
||||
FXPTSTS_SCQY("fxptstsScqy", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-生产企业", "0"),
|
||||
JSYZYLTS_PZ("jsyzyltsPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-配置", "2"),
|
||||
JSYZYLTS_MC("jsyzyltsMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-名称", "0"),
|
||||
JSYZYLTS_MC("jsyzyltsMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-指示器/信号装置名称", "0"),
|
||||
JSYZYLTS_YJXH("jsyzyltsYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-硬件规格型号", "0"),
|
||||
JSYZYLTS_SCQY("jsyzyltsScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-生产企业", "0"),
|
||||
DSSAD_PZ("dssadPz", "自动驾驶数据记录系统(DSSAD)-系统配置", "2"),
|
||||
@@ -154,23 +154,23 @@ public enum OtaTitleEnum {
|
||||
BABH("babh", "备案编号", "0"),
|
||||
BAPC("bapc", "备案批次", "0"),
|
||||
ZSL("zsl", "总数量", "0"),
|
||||
SCRQKS("scrqks", "生产日期开始", "0"),
|
||||
SCRQJS("scrqjs", "生产日期结束", "0"),
|
||||
SCRQKS("scrqks", "生产日期开始", "3"),
|
||||
SCRQJS("scrqjs", "生产日期结束", "3"),
|
||||
VIN_LIST("vinList", "VIN码清单", "0"),
|
||||
SJMD("sjmd", "升级目的", "uipgrade_purpose"),
|
||||
SFBGCS("sfbgcs", "是否变更对应车型的《公告》技术参数", "0"),
|
||||
JSXNBH("jsxnbh", "是否涉及性能变化", "0"),
|
||||
FHGD("fhgd", "是否符合国家法律、行政法规、规章规定,以及道路机动车辆公告管理相关国家技术标准及安全技术条件等", "0"),
|
||||
ZDJSXG("zdjsxg", "是否涉及汽车自动驾驶功能相关升级", "0"),
|
||||
JRXXG("jrxxg", "兼容性评估相关", "0"),
|
||||
SFBGCS("sfbgcs", "是否变更对应车型的《公告》技术参数", "2"),
|
||||
JSXNBH("jsxnbh", "是否涉及性能变化", "2"),
|
||||
FHGD("fhgd", "是否符合国家法律、行政法规、规章规定,以及道路机动车辆公告管理相关国家技术标准及安全技术条件等", "2"),
|
||||
ZDJSXG("zdjsxg", "是否涉及汽车自动驾驶功能相关升级", "2"),
|
||||
JRXXG("jrxxg", "兼容性评估相关", "2"),
|
||||
ZXSJ("zxsj", "如何执行升级", "conditions_upgrades"),
|
||||
AQJZ("aqjz", "升级失败或中断后,车辆采取的安全机制", "upgrade_failed"),
|
||||
SFYXAQ("sfyxaq", "升级活动是否影响车辆安全", "0"),
|
||||
YHQR("yhqr", "升级活动是否提供用户确认选项", "0"),
|
||||
SFYXAQ("sfyxaq", "升级活动是否影响车辆安全", "2"),
|
||||
YHQR("yhqr", "升级活动是否提供用户确认选项", "2"),
|
||||
SJBCS("sjbcs", "升级包测试", "package_test"),
|
||||
AQKKX("aqkkx", "是杏已验证确认在线升级活动的安全性和可靠性", "0"),
|
||||
BGFJ("bgfj", "提供变更或扩展后的《公告》批次及证明材料", "0"),
|
||||
CLFJ("clfj", "提供证明材料", "0"),
|
||||
AQKKX("aqkkx", "是否已验证确认在线升级活动的安全性和可靠性", "2"),
|
||||
// BGFJ("bgfj", "提供变更或扩展后的《公告》批次及证明材料", "0"),
|
||||
// CLFJ("clfj", "提供证明材料", "0"),
|
||||
XTMC("xtmc", "系统名称", "0"),
|
||||
SJQBGCS("sjqbgcs", "升级前已变更《公告》参数的对应调整", "0"),
|
||||
SJHBGCS("sjhbgcs", "升级后已变更《公告》参数的对应调整", "0"),
|
||||
@@ -193,14 +193,14 @@ public enum OtaTitleEnum {
|
||||
SJKY("sjky", "升级执行期问,车辆是否可用", "0"),
|
||||
SJBKYGN("sjbkygn", "升级执行期间不可用的车辆功能", "0"),
|
||||
ZDXX("zdxx", "帮助车辆用户安全执行升级的任何指导信息", "0"),
|
||||
SJSFCG("sjsfcg", "告知用户升级成功或失败", "0"),
|
||||
GZBG("gzbg", "告知实施的变更", "0"),
|
||||
GZSCNR("gzscnr", "告知了对用户手册的全部更新内容", "0"),
|
||||
GZYHFS("gzyhfs", "告知用户方式(可多选)", "0"),
|
||||
XGWJ("xgwj", "用户告知相关文件", "0"),
|
||||
SJSFCG("sjsfcg", "告知用户升级成功或失败", "2"),
|
||||
GZBG("gzbg", "告知实施的变更", "2"),
|
||||
GZSCNR("gzscnr", "告知了对用户手册的全部更新内容", "2"),
|
||||
GZYHFS("gzyhfs", "告知用户方式(可多选)", "user_notification_mode"),
|
||||
// XGWJ("xgwj", "用户告知相关文件", "0"),
|
||||
RWMC("rwmc", "任务名称", "0"),
|
||||
SJFBSJ("sjfbsj", "升级发布时间", "0"),
|
||||
SJJZSJ("sjjzsj", "升级计划截止时间", "0");
|
||||
SJFBSJ("sjfbsj", "升级发布时间", "3"),
|
||||
SJJZSJ("sjjzsj", "升级计划截止时间", "3");
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
+38
-35
@@ -2,60 +2,63 @@ package com.jero.modules.ota.service;
|
||||
|
||||
import com.jero.modules.ota.entity.OtaBaSjGnxtwh;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 车型备案-功能系统维护
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-28
|
||||
* @Date: 2023-03-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IOtaBaSjGnxtwhService extends IService<OtaBaSjGnxtwh> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaSjGnxtwh
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaSjGnxtwh
|
||||
* @return
|
||||
*/
|
||||
void add(OtaBaSjGnxtwh otaBaSjGnxtwh);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otaBaSjGnxtwh
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otaBaSjGnxtwh
|
||||
* @return
|
||||
*/
|
||||
void editById(OtaBaSjGnxtwh otaBaSjGnxtwh);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
OtaBaSjGnxtwh queryById(String id);
|
||||
|
||||
String queryGnxtByKzq(String kzq);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<OtaBaSjGnxtwh> queryList();
|
||||
}
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
|
||||
}
|
||||
for (String oId : oldAttMap.keySet()) {
|
||||
if (!newAttMap.containsKey(oId)) {
|
||||
reList.add(cu.delAttRecord(otaBaCxAqcs.getOtaId(), OtaModuleEnum.CX_AQCS, "证明材料", newAttMap.get(oId)));
|
||||
reList.add(cu.delAttRecord(otaBaCxAqcs.getOtaId(), OtaModuleEnum.CX_AQCS, "证明材料", oldAttMap.get(oId)));
|
||||
}
|
||||
}
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
|
||||
+8
-10
@@ -18,7 +18,7 @@ import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||
import com.jero.modules.ota.utils.ComparisonUtil;
|
||||
import com.jero.modules.ota.utils.ImportFileUtil;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
@@ -111,15 +111,13 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KZXSJDJSFZGNMCYCS, OtaTitleEnum.GNMC.getName(), oldList, newList, sysDictService);
|
||||
saveOrUpdateBatch(newList);
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
String fj = (String) json.get("fj");
|
||||
if (StringUtils.isNotEmpty(fj)) {
|
||||
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId);
|
||||
if (ObjectUtils.isNotEmpty(otaBaCxList)) {
|
||||
otaBaCxList.setZxsjjsfj(fj);
|
||||
otaBaCxListService.editById(otaBaCxList);
|
||||
}
|
||||
}
|
||||
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId);
|
||||
String oldFjStr = otaBaCxList.getZxsjjsfj();
|
||||
otaBaCxList.setZxsjjsfj(fj);
|
||||
otaBaCxListService.editById(otaBaCxList);
|
||||
reList.addAll(cu.comparisonRecord(otaId, fj, oldFjStr, OtaModuleEnum.CX_KZXSJDJSFZGNMCYCS, "附件", ossFileService));
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +193,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
}
|
||||
|
||||
private List<OtaBaCxKsjjsmccs> getByOtaId(String otaId) {
|
||||
if(org.apache.commons.lang3.StringUtils.isEmpty(otaId)){
|
||||
if (StringUtils.isEmpty(otaId)) {
|
||||
return null;
|
||||
}
|
||||
LambdaQueryWrapper<OtaBaCxKsjjsmccs> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
+76
-18
@@ -32,6 +32,8 @@ import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -108,27 +110,83 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, OtaTitleEnum.XTLB.getName(), oldList, newList, sysDictService);
|
||||
saveOrUpdateBatch(newList);
|
||||
|
||||
|
||||
for (OtaBaCxKsjxtmccs newMccs:newList) {
|
||||
String newTpt = newMccs.getTpt();
|
||||
if(StringUtils.isNotEmpty(newTpt)){
|
||||
|
||||
|
||||
Map<String, OtaBaCxKsjxtmccs> newMap = newList.stream().collect(Collectors.toMap(OtaBaCxKsjxtmccs::getId, Function.identity()));
|
||||
Map<String, OtaBaCxKsjxtmccs> oldMap = oldList.stream().collect(Collectors.toMap(OtaBaCxKsjxtmccs::getId, Function.identity()));
|
||||
for (String nId : newMap.keySet()) {
|
||||
if (oldMap.containsKey(nId)) {
|
||||
String newTptStr = newMap.get(nId).getTpt();
|
||||
if (StringUtils.isNotEmpty(newTptStr)) {
|
||||
String[] newTpts = newTptStr.split(",");
|
||||
String oldTptStr = oldMap.get(nId).getTpt();
|
||||
for (String nt : newTpts) {
|
||||
if (StringUtils.isEmpty(oldTptStr) || !oldTptStr.contains(nt)) {
|
||||
List<OSSFile> fileList = ossFileService.getFileInfos(nt);
|
||||
if (ObjectUtils.isNotEmpty(fileList)) {
|
||||
for (OSSFile f : fileList) {
|
||||
reList.add(cu.addAttRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, newMap.get(nId).getXtlb() + "-系统-电子控制器架构拓扑图(附件需含拓扑图介绍)", f.getFileName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (String oId : oldMap.keySet()) {
|
||||
if (newMap.containsKey(oId)) {
|
||||
String oldTptStr = oldMap.get(oId).getTpt();
|
||||
if (StringUtils.isNotEmpty(oldTptStr)) {
|
||||
String[] oldTpts = oldTptStr.split(",");
|
||||
String newTptStr = newMap.get(oId).getTpt();
|
||||
for (String ot : oldTpts) {
|
||||
if (StringUtils.isEmpty(newTptStr) || !newTptStr.contains(ot)) {
|
||||
List<OSSFile> fileList = ossFileService.getFileInfos(ot);
|
||||
if (ObjectUtils.isNotEmpty(fileList)) {
|
||||
for (OSSFile f : fileList) {
|
||||
reList.add(cu.delAttRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, oldMap.get(oId).getXtlb() + "-系统-电子控制器架构拓扑图(附件需含拓扑图介绍)", f.getFileName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String fj = (String) json.get("fj");
|
||||
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId);
|
||||
String oldFjStr = otaBaCxList.getZxsjxtfj();
|
||||
otaBaCxList.setZxsjxtfj(fj);
|
||||
otaBaCxListService.editById(otaBaCxList);
|
||||
String[] newFjList = {};
|
||||
if (StringUtils.isNotEmpty(fj)) {
|
||||
newFjList = fj.split(",");
|
||||
}
|
||||
for (String nf : newFjList) {
|
||||
if (StringUtils.isEmpty(oldFjStr) || !oldFjStr.contains(nf)) {
|
||||
List<OSSFile> fileList = ossFileService.getFileInfos(nf);
|
||||
if (ObjectUtils.isNotEmpty(fileList)) {
|
||||
for (OSSFile f : fileList) {
|
||||
reList.add(cu.addAttRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, "附件", f.getFileName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
String[] oldFjList = {};
|
||||
if (StringUtils.isNotEmpty(oldFjStr)) {
|
||||
oldFjList = oldFjStr.split(",");
|
||||
}
|
||||
for (String of : oldFjList) {
|
||||
if (StringUtils.isEmpty(fj) || !fj.contains(of)) {
|
||||
List<OSSFile> fileList = ossFileService.getFileInfos(of);
|
||||
if (ObjectUtils.isNotEmpty(fileList)) {
|
||||
for (OSSFile f : fileList) {
|
||||
reList.add(cu.delAttRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, "附件", f.getFileName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
String fj = (String) json.get("fj");
|
||||
if (StringUtils.isNotEmpty(fj)) {
|
||||
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId);
|
||||
if (ObjectUtils.isNotEmpty(otaBaCxList)) {
|
||||
otaBaCxList.setZxsjxtfj(fj);
|
||||
otaBaCxListService.editById(otaBaCxList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -203,7 +261,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
}
|
||||
|
||||
private List<OtaBaCxKsjxtmccs> getByOtaId(String otaId) {
|
||||
if(org.apache.commons.lang3.StringUtils.isEmpty(otaId)){
|
||||
if (org.apache.commons.lang3.StringUtils.isEmpty(otaId)) {
|
||||
return null;
|
||||
}
|
||||
LambdaQueryWrapper<OtaBaCxKsjxtmccs> queryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -381,7 +439,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
startRow++;
|
||||
}
|
||||
Row row = s.getRow(startRow);
|
||||
if(null == row){
|
||||
if (null == row) {
|
||||
row = s.createRow(startRow);
|
||||
}
|
||||
Cell cell = row.createCell(0);
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl<OtaBaCxZxsjyqMapper, O
|
||||
}
|
||||
for (String oId : oldAttMap.keySet()) {
|
||||
if (!newAttMap.containsKey(oId)) {
|
||||
reList.add(cu.delAttRecord(otaBaCxZxsjyq.getOtaId(), OtaModuleEnum.CX_ZXSJYQ, "证明材料", newAttMap.get(oId)));
|
||||
reList.add(cu.delAttRecord(otaBaCxZxsjyq.getOtaId(), OtaModuleEnum.CX_ZXSJYQ, "证明材料", oldAttMap.get(oId)));
|
||||
}
|
||||
}
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
|
||||
+12
-9
@@ -1,10 +1,9 @@
|
||||
package com.jero.modules.ota.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.ota.entity.AttachmentEO;
|
||||
import com.jero.modules.ota.entity.OtaBaCxAqcs;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
||||
import com.jero.modules.ota.entity.OtaBaSjGgnrfs;
|
||||
import com.jero.modules.ota.enums.OtaModuleEnum;
|
||||
@@ -18,16 +17,13 @@ import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 升级备案-用户告知内容及方式
|
||||
@@ -50,6 +46,9 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -61,8 +60,10 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
|
||||
Date now = new Date();
|
||||
if (null != otaBaSjGgnrfs) {
|
||||
OtaBaSjGgnrfs otaBaSjGgnrfsOld = this.getByOtaId(otaBaSjGgnrfs.getOtaId());
|
||||
String oldFjStr = "";
|
||||
if (null != otaBaSjGgnrfsOld) {
|
||||
otaBaSjGgnrfs.setId(otaBaSjGgnrfsOld.getId());
|
||||
oldFjStr = otaBaSjGgnrfsOld.getXgwj();
|
||||
} else {
|
||||
otaBaSjGgnrfs.setCreateTime(now);
|
||||
}
|
||||
@@ -73,6 +74,8 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
|
||||
otaBaSjGgnrfsOld = new OtaBaSjGgnrfs();
|
||||
}
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaSjGgnrfs.getOtaId(), OtaModuleEnum.SJ_YHGZNRFS, otaBaSjGgnrfsOld, otaBaSjGgnrfs, sysDictService);
|
||||
|
||||
reList.addAll(cu.comparisonRecord(otaBaSjGgnrfs.getOtaId(), otaBaSjGgnrfs.getXgwj(), oldFjStr, OtaModuleEnum.SJ_YHGZNRFS, "附件", ossFileService));
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
}
|
||||
}
|
||||
|
||||
+61
-43
@@ -4,26 +4,28 @@ import com.jero.modules.ota.entity.OtaBaSjGnxtwh;
|
||||
import com.jero.modules.ota.mapper.OtaBaSjGnxtwhMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaSjGnxtwhService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 车型备案-功能系统维护
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-03-28
|
||||
* @Date: 2023-03-28
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class OtaBaSjGnxtwhServiceImpl extends ServiceImpl<OtaBaSjGnxtwhMapper, OtaBaSjGnxtwh> implements IOtaBaSjGnxtwhService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaSjGnxtwh
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param otaBaSjGnxtwh
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(OtaBaSjGnxtwh otaBaSjGnxtwh) {
|
||||
Date now = new Date();
|
||||
otaBaSjGnxtwh.setCreateTime(now);
|
||||
@@ -31,58 +33,74 @@ public class OtaBaSjGnxtwhServiceImpl extends ServiceImpl<OtaBaSjGnxtwhMapper, O
|
||||
save(otaBaSjGnxtwh);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otaBaSjGnxtwh
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param otaBaSjGnxtwh
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(OtaBaSjGnxtwh otaBaSjGnxtwh) {
|
||||
Date now = new Date();
|
||||
Date now = new Date();
|
||||
otaBaSjGnxtwh.setUpdateTime(now);
|
||||
saveOrUpdate(otaBaSjGnxtwh);
|
||||
saveOrUpdate(otaBaSjGnxtwh);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OtaBaSjGnxtwh queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String queryGnxtByKzq(String kzq) {
|
||||
List<OtaBaSjGnxtwh> list = list();
|
||||
for (OtaBaSjGnxtwh wh : list) {
|
||||
String[] strs = wh.getDykzq().split(",");
|
||||
for (String str : strs) {
|
||||
if (str.equals(kzq)) {
|
||||
return wh.getGnxt();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OtaBaSjGnxtwh> queryList() {
|
||||
return list();
|
||||
}
|
||||
|
||||
+28
-4
@@ -18,6 +18,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -48,9 +49,6 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
@Autowired
|
||||
private IOtaBaSjSjmbclService otaBaSjSjmbclService;
|
||||
|
||||
@Autowired
|
||||
private IOtaBaCxAqcsService otaBaCxAqcsService;
|
||||
|
||||
@Autowired
|
||||
private IOtaBaSjSjxtbhService otaBaSjSjxtbhService;
|
||||
|
||||
@@ -60,6 +58,9 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
@Autowired
|
||||
private IOtaBaSjGgnrfsService otaBaSjGgnrfsService;
|
||||
|
||||
@Autowired
|
||||
private IOtaBaSjSjyxpgService otaBaSjSjyxpgService;
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -170,7 +171,8 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
String otaId = mbcx.getOtaId();
|
||||
if (StringUtils.isNotEmpty(otaId)) {
|
||||
otaBaSjSjmbclService.parseFileList(fileList, otaId, cut);
|
||||
otaBaCxAqcsService.parseFileList(fileList, otaId, cut);
|
||||
otaBaSjSjmbcxService.parseFileList(fileList, otaId, cut);
|
||||
otaBaSjSjyxpgService.parseFileList(fileList, otaId, cut);
|
||||
otaBaSjSjxtbhService.parseFileList(fileList, otaId, cut);
|
||||
otaBaSjSjfzbhService.parseFileList(fileList, otaId, cut);
|
||||
otaBaSjGgnrfsService.parseFileList(fileList, otaId, cut);
|
||||
@@ -181,6 +183,28 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
|
||||
@Override
|
||||
public void exportData(String otaId, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
String cut = "cn";
|
||||
File template = new File(templatePath + "在线升级活动备案.zip");
|
||||
File exportFile = ImportFileUtil.copyZip(ImportFileUtil.createMfileByFile(template), cut, uploadPath);
|
||||
|
||||
File jbxxFile = ImportFileUtil.findFile(exportFile, "本次升级涉及的目标车辆.xlsx");
|
||||
otaBaSjSjmbclService.exportData(jbxxFile, otaId, cut);
|
||||
|
||||
File sjmbcxFile = ImportFileUtil.findFile(exportFile, "升级目标车型.xlsx");
|
||||
otaBaSjSjmbcxService.exportData(sjmbcxFile, otaId, cut);
|
||||
|
||||
File pgFile = ImportFileUtil.findFile(exportFile, "升级影响评估.docx");
|
||||
otaBaSjSjyxpgService.exportData(pgFile, otaId, cut);
|
||||
|
||||
File sjSjxtbhFile = ImportFileUtil.findFile(exportFile, "本次升级的系统名称与变更参数.docx");
|
||||
otaBaSjSjxtbhService.exportData(sjSjxtbhFile, otaId, cut);
|
||||
|
||||
File sjfzbhFile = ImportFileUtil.findFile(exportFile, "本次升级的驾驶辅助功能与参数变化.docx");
|
||||
otaBaSjSjfzbhService.exportData(sjfzbhFile, otaId, cut);
|
||||
|
||||
String outPath = uploadPath + "/在线升级活动备案" + System.currentTimeMillis() + ".zip";
|
||||
FileOutputStream fos1 = new FileOutputStream(outPath);
|
||||
ImportFileUtil.toZip(exportFile.getCanonicalPath(), fos1, true);
|
||||
ImportFileUtil.exportTemplate(response, outPath);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-8
@@ -107,15 +107,14 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJJSMCBH, OtaTitleEnum.GNMC.getName(), oldList, newList, sysDictService);
|
||||
saveOrUpdateBatch(newList);
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
String fj = (String) json.get("fj");
|
||||
if (StringUtils.isNotEmpty(fj)) {
|
||||
OtaBaSjList otaBaSjList = otaBaSjListService.queryById(otaId);
|
||||
if (ObjectUtils.isNotEmpty(otaBaSjList)) {
|
||||
otaBaSjList.setSjjsfj(fj);
|
||||
otaBaSjListService.editById(otaBaSjList);
|
||||
}
|
||||
}
|
||||
OtaBaSjList otaBaSjList = otaBaSjListService.queryById(otaId);
|
||||
String oldFjStr = otaBaSjList.getSjjsfj();
|
||||
otaBaSjList.setSjjsfj(fj);
|
||||
otaBaSjListService.editById(otaBaSjList);
|
||||
reList.addAll(cu.comparisonRecord(otaId, fj, oldFjStr, OtaModuleEnum.SJ_SJJSMCBH, "附件", ossFileService));
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+96
-12
@@ -1,14 +1,21 @@
|
||||
package com.jero.modules.ota.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.ota.entity.*;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
||||
import com.jero.modules.ota.entity.OtaBaSjSjmbcl;
|
||||
import com.jero.modules.ota.entity.OtaBaSjSjmbcx;
|
||||
import com.jero.modules.ota.entity.VinObj;
|
||||
import com.jero.modules.ota.enums.OtaModuleEnum;
|
||||
import com.jero.modules.ota.mapper.OtaBaSjSjmbclMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||
import com.jero.modules.ota.service.IOtaBaSjListService;
|
||||
import com.jero.modules.ota.service.IOtaBaSjLsjlService;
|
||||
import com.jero.modules.ota.service.IOtaBaSjSjmbclService;
|
||||
import com.jero.modules.ota.service.IOtaBaSjSjmbcxService;
|
||||
import com.jero.modules.ota.utils.CSVUtil;
|
||||
import com.jero.modules.ota.utils.ComparisonUtil;
|
||||
import com.jero.modules.ota.utils.ImportFileUtil;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
@@ -21,17 +28,13 @@ import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 升级备案-升级目标车辆
|
||||
@@ -42,6 +45,8 @@ import javax.servlet.http.HttpServletResponse;
|
||||
@Service
|
||||
public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, OtaBaSjSjmbcl> implements IOtaBaSjSjmbclService {
|
||||
|
||||
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
|
||||
|
||||
@Value(value = "${ota.templatePath}")
|
||||
private String templatePath;
|
||||
|
||||
@@ -54,6 +59,13 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
|
||||
@Autowired
|
||||
private IOtaBaCxTxjlService otaBaCxTxjlService;
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
@Autowired
|
||||
private IOtaBaSjSjmbcxService otaBaSjSjmbcxService;
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -64,9 +76,13 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
|
||||
public void add(OtaBaSjSjmbcl otaBaSjSjmbcl) {
|
||||
Date now = new Date();
|
||||
if (null != otaBaSjSjmbcl) {
|
||||
String newFj = otaBaSjSjmbcl.getCsv();
|
||||
String oldFjStr = "";
|
||||
|
||||
OtaBaSjSjmbcl otaBaSjSjmbclOld = this.getByOtaId(otaBaSjSjmbcl.getOtaId());
|
||||
if (null != otaBaSjSjmbclOld) {
|
||||
otaBaSjSjmbcl.setId(otaBaSjSjmbclOld.getId());
|
||||
oldFjStr = otaBaSjSjmbclOld.getCsv();
|
||||
} else {
|
||||
otaBaSjSjmbcl.setCreateTime(now);
|
||||
}
|
||||
@@ -78,6 +94,7 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
|
||||
otaBaSjSjmbclOld = new OtaBaSjSjmbcl();
|
||||
}
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaSjSjmbcl.getOtaId(), OtaModuleEnum.SJ_SJMBCL, otaBaSjSjmbclOld, otaBaSjSjmbcl, sysDictService);
|
||||
reList.addAll(cu.comparisonRecord(otaBaSjSjmbcl.getOtaId(), newFj, oldFjStr, OtaModuleEnum.SJ_SJMBCL, "附件", ossFileService));
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
}
|
||||
}
|
||||
@@ -173,14 +190,80 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
|
||||
if (null == upFile) {
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
OtaBaSjSjmbcl mbcl = parseFile(upFile, cut);
|
||||
OtaBaSjSjmbcl mbcl = parseFile(upFile, otaId, cut);
|
||||
mbcl.setOtaId(otaId);
|
||||
add(mbcl);
|
||||
return mbcl;
|
||||
}
|
||||
|
||||
private OtaBaSjSjmbcl parseFile(File upFile, String cut) {
|
||||
private OtaBaSjSjmbcl parseFile(File upFile, String otaId, String cut) throws Exception {
|
||||
OtaBaSjSjmbcl mbcl = new OtaBaSjSjmbcl();
|
||||
OtaBaSjSjmbcx mbcx = otaBaSjSjmbcxService.queryByOtaId(otaId, "");
|
||||
if (ObjectUtils.isNotEmpty(mbcx) && StringUtils.isNotEmpty(mbcx.getCpxh())) {
|
||||
String cx = mbcx.getCpxh();
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
|
||||
int rows = s.getPhysicalNumberOfRows();
|
||||
List<VinObj> vinList = new ArrayList<>();
|
||||
for (int i = 1; i < rows; i++) {
|
||||
VinObj vinObj = new VinObj();
|
||||
Row row = s.getRow(i);
|
||||
Cell cell = row.getCell(0);
|
||||
vinObj.setVin(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(1);
|
||||
vinObj.setCx(ImportFileUtil.getCellValue(cell, wb));
|
||||
if (!cx.equals(vinObj.getCx())) {
|
||||
continue;
|
||||
}
|
||||
cell = row.getCell(2);
|
||||
vinObj.setGglx(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(3);
|
||||
vinObj.setScrq(cell.getDateCellValue());
|
||||
vinObj.setScrqStr(sdf.format(vinObj.getScrq()));
|
||||
vinList.add(vinObj);
|
||||
|
||||
}
|
||||
|
||||
|
||||
mbcl.setOtaId(otaId);
|
||||
if (ObjectUtils.isNotEmpty(vinList)) {
|
||||
// 匿名比较器排序
|
||||
Collections.sort(vinList, new Comparator<VinObj>() {
|
||||
@Override
|
||||
public int compare(VinObj p1, VinObj p2) {
|
||||
return p1.getScrq().compareTo(p2.getScrq());
|
||||
}
|
||||
});
|
||||
mbcl.setZsl(String.valueOf(vinList.size()));
|
||||
mbcl.setScrqks(vinList.get(0).getScrq());
|
||||
mbcl.setScrqjs(vinList.get(vinList.size() - 1).getScrq());
|
||||
// 匿名比较器排序
|
||||
Collections.sort(vinList, new Comparator<VinObj>() {
|
||||
@Override
|
||||
public int compare(VinObj p1, VinObj p2) {
|
||||
return p1.getVin().compareTo(p2.getVin());
|
||||
}
|
||||
});
|
||||
mbcl.setVinList(vinList.get(0).getVin() + "-" + vinList.get(vinList.size() - 1).getVin());
|
||||
|
||||
//生成VIN码文件
|
||||
LinkedHashMap map = new LinkedHashMap();
|
||||
map.put("1", "VIN");
|
||||
List exportData = new ArrayList<Map>();
|
||||
Map vrow = null;
|
||||
for (int i = 0; i < vinList.size(); i++) {
|
||||
vrow = new LinkedHashMap<String, String>();
|
||||
vrow.put("1", vinList.get(i).getVin());
|
||||
exportData.add(vrow);
|
||||
}
|
||||
String fileName = "VIN码.csv";
|
||||
File file = CSVUtil.createCSVFile(exportData, map, uploadPath + System.currentTimeMillis(), fileName);
|
||||
String filePath = uploadPath + "/" + file.getName();
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(ImportFileUtil.createMfileByFile(file), "/ota", "", CutEnum.CN.getValue());
|
||||
mbcl.setCsv(ossFile.getId());
|
||||
}
|
||||
}
|
||||
return mbcl;
|
||||
}
|
||||
|
||||
@@ -195,4 +278,5 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
|
||||
public void exportData(File file, String otaId, String cut) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+28
-15
@@ -11,11 +11,12 @@ import com.jero.modules.ota.enums.OtaModuleEnum;
|
||||
import com.jero.modules.ota.enums.OtaTitleEnum;
|
||||
import com.jero.modules.ota.mapper.OtaBaSjSjxtbhMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||
import com.jero.modules.ota.service.IOtaBaSjGnxtwhService;
|
||||
import com.jero.modules.ota.service.IOtaBaSjSjxtbhService;
|
||||
import com.jero.modules.ota.utils.ComparisonUtil;
|
||||
import com.jero.modules.ota.utils.ImportFileUtil;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
@@ -52,6 +53,9 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
@Autowired
|
||||
private IOtaBaSjGnxtwhService otaBaSjGnxtwhService;
|
||||
|
||||
@Value(value = "${ota.templatePath}")
|
||||
private String templatePath;
|
||||
|
||||
@@ -221,7 +225,8 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
oldList = new ArrayList<>();
|
||||
}
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJXTMCBH, OtaTitleEnum.SJKZQMC.getName(), oldList, newList, sysDictService);
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJXTMCBH, OtaTitleEnum.XTMC.getName(), oldList, newList, sysDictService);
|
||||
deleteByOtaId(otaId);
|
||||
saveOrUpdateBatch(newList);
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
}
|
||||
@@ -233,30 +238,38 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
int rows = s.getPhysicalNumberOfRows();
|
||||
for (int i = 4; i < rows; i++) {
|
||||
Row row = s.getRow(i);
|
||||
Cell cell = row.getCell(0);
|
||||
OtaBaSjSjxtbh xtbh = new OtaBaSjSjxtbh();
|
||||
cell = row.getCell(1);
|
||||
xtbh.setOtaId(otaId);
|
||||
Row row = s.getRow(i);
|
||||
Cell cell = row.getCell(2);
|
||||
String kzq = ImportFileUtil.getCellValue(cell, wb);
|
||||
if (StringUtils.isNotEmpty(kzq)) {
|
||||
xtbh.setSjkzqmc(kzq);
|
||||
String gnxt = otaBaSjGnxtwhService.queryGnxtByKzq(kzq);
|
||||
if (StringUtils.isNotEmpty(gnxt)) {
|
||||
xtbh.setXtmc(gnxt);
|
||||
}
|
||||
}
|
||||
|
||||
cell = row.getCell(0);
|
||||
xtbh.setSjqbgcs(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(2);
|
||||
cell = row.getCell(1);
|
||||
xtbh.setSjhbgcs(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(3);
|
||||
xtbh.setSjkzqmc(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(4);
|
||||
xtbh.setYjbb(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(5);
|
||||
cell = row.getCell(4);
|
||||
xtbh.setSjqrjbb(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(6);
|
||||
cell = row.getCell(5);
|
||||
xtbh.setSjhrjbb(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(7);
|
||||
cell = row.getCell(6);
|
||||
xtbh.setSjqczxt(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(8);
|
||||
cell = row.getCell(7);
|
||||
xtbh.setSjhczxt(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(9);
|
||||
cell = row.getCell(8);
|
||||
xtbh.setSjbyzsj(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(10);
|
||||
cell = row.getCell(9);
|
||||
xtbh.setSjbdx(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(11);
|
||||
cell = row.getCell(10);
|
||||
xtbh.setSfcfsj(ImportFileUtil.getCellValue(cell, wb));
|
||||
xtbh.setCreateTime(now);
|
||||
xtbh.setUpdateTime(now);
|
||||
|
||||
+39
-2
@@ -3,6 +3,7 @@ package com.jero.modules.ota.service.impl;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.ota.entity.*;
|
||||
import com.jero.modules.ota.enums.OtaModuleEnum;
|
||||
import com.jero.modules.ota.mapper.OtaBaSjSjyxpgMapper;
|
||||
@@ -13,11 +14,17 @@ import com.jero.modules.ota.utils.ImportFileUtil;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -49,6 +56,9 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
@Value(value = "${ota.uploadPath}")
|
||||
private String uploadPath;
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService ossFileService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -59,9 +69,18 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
public void add(OtaBaSjSjyxpg otaBaSjSjyxpg) {
|
||||
Date now = new Date();
|
||||
if (null != otaBaSjSjyxpg) {
|
||||
|
||||
String newYzcl = otaBaSjSjyxpg.getBgfj();
|
||||
String oldYzcl = "";
|
||||
|
||||
String newZmcl = otaBaSjSjyxpg.getClfj();
|
||||
String oldZmcl = "";
|
||||
|
||||
OtaBaSjSjyxpg otaBaSjSjyxpgOld = this.getByOtaId(otaBaSjSjyxpg.getOtaId());
|
||||
if (null != otaBaSjSjyxpgOld) {
|
||||
otaBaSjSjyxpg.setId(otaBaSjSjyxpgOld.getId());
|
||||
oldYzcl = otaBaSjSjyxpgOld.getBgfj();
|
||||
oldZmcl = otaBaSjSjyxpgOld.getClfj();
|
||||
} else {
|
||||
otaBaSjSjyxpg.setCreateTime(now);
|
||||
}
|
||||
@@ -72,6 +91,8 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
otaBaSjSjyxpgOld = new OtaBaSjSjyxpg();
|
||||
}
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), OtaModuleEnum.SJ_SJYXPG, otaBaSjSjyxpgOld, otaBaSjSjyxpg, sysDictService);
|
||||
reList.addAll(cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), newYzcl, oldYzcl, OtaModuleEnum.SJ_SJMBCL, "验证材料", ossFileService));
|
||||
reList.addAll(cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), newZmcl, oldZmcl, OtaModuleEnum.SJ_SJMBCL, "证明材料", ossFileService));
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
}
|
||||
}
|
||||
@@ -162,8 +183,24 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
return sjyxpg;
|
||||
}
|
||||
|
||||
private OtaBaSjSjyxpg parseFile(File upFile, String cut) {
|
||||
private OtaBaSjSjyxpg parseFile(File upFile, String cut) throws Exception {
|
||||
OtaBaSjSjyxpg sjyxpg = new OtaBaSjSjyxpg();
|
||||
InputStream is = new FileInputStream(upFile);
|
||||
XWPFDocument doc = new XWPFDocument(is);
|
||||
List<XWPFTable> tables = doc.getTables();
|
||||
String sjmdStr = tables.get(1).getRow(0).getCell(2).getText();
|
||||
if (StringUtils.isNotEmpty(sjmdStr)) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String[] strs = sjmdStr.split("、");
|
||||
for (int i = 0; i < strs.length; i++) {
|
||||
if (i >= strs.length - 1) {
|
||||
sb.append(sysDictService.queryDictItemByValue("uipgrade_purpose", strs[i], cut));
|
||||
} else {
|
||||
sb.append(sysDictService.queryDictItemByValue("uipgrade_purpose", strs[i], cut)).append(",");
|
||||
}
|
||||
}
|
||||
sjyxpg.setSjmd(sb.toString());
|
||||
}
|
||||
return sjyxpg;
|
||||
}
|
||||
|
||||
@@ -171,7 +208,7 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
|
||||
public OtaBaSjSjyxpg parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("车型基本信息.xlsx")) {
|
||||
if (f.getName().equals("升级影响评估.docx")) {
|
||||
upFile = f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
package com.jero.modules.ota.utils;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
|
||||
/**
|
||||
* 文件操作
|
||||
*/
|
||||
public class CSVUtil {
|
||||
|
||||
/**
|
||||
* 生成为CVS文件
|
||||
*
|
||||
* @param exportData 源数据List
|
||||
* @param map csv文件的列表头map
|
||||
* @param outPutPath 文件路径
|
||||
* @param fileName 文件名称
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static File createCSVFile(List exportData, LinkedHashMap map,
|
||||
String outPutPath, String fileName) {
|
||||
File csvFile = null;
|
||||
BufferedWriter csvFileOutputStream = null;
|
||||
try {
|
||||
// 定义文件名格式并创建
|
||||
File file = new File(outPutPath);
|
||||
if (!file.exists()) {
|
||||
file.mkdir();
|
||||
}
|
||||
csvFile = new File(outPutPath + "/" + fileName);
|
||||
System.out.println("csvFile:" + csvFile);
|
||||
// UTF-8使正确读取分隔符","
|
||||
csvFileOutputStream = new BufferedWriter(
|
||||
new OutputStreamWriter(
|
||||
new FileOutputStream(csvFile), "UTF-8"), 1024);
|
||||
System.out.println("csvFileOutputStream:" + csvFileOutputStream);
|
||||
// 写入文件头部
|
||||
for (Iterator propertyIterator = map.entrySet().iterator();
|
||||
propertyIterator.hasNext(); ) {
|
||||
java.util.Map.Entry propertyEntry =
|
||||
(java.util.Map.Entry) propertyIterator.next();
|
||||
csvFileOutputStream.write(
|
||||
"" + (String) propertyEntry.getValue() != null ?
|
||||
(String) propertyEntry.getValue() : "" + "");
|
||||
if (propertyIterator.hasNext()) {
|
||||
csvFileOutputStream.write(",");
|
||||
}
|
||||
}
|
||||
csvFileOutputStream.newLine();
|
||||
// 写入文件内容
|
||||
for (Iterator iterator = exportData.iterator(); iterator.hasNext(); ) {
|
||||
Object row = (Object) iterator.next();
|
||||
for (Iterator propertyIterator = map.entrySet().iterator();
|
||||
propertyIterator.hasNext(); ) {
|
||||
java.util.Map.Entry propertyEntry =
|
||||
(java.util.Map.Entry) propertyIterator.next();
|
||||
csvFileOutputStream.write((String) BeanUtils.getProperty(
|
||||
row, (String) propertyEntry.getKey()));
|
||||
if (propertyIterator.hasNext()) {
|
||||
csvFileOutputStream.write(",");
|
||||
}
|
||||
}
|
||||
if (iterator.hasNext()) {
|
||||
csvFileOutputStream.newLine();
|
||||
}
|
||||
}
|
||||
csvFileOutputStream.flush();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
csvFileOutputStream.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return csvFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
*
|
||||
* @param response
|
||||
* @param csvFilePath 文件路径
|
||||
* @param fileName 文件名称
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void exportFile(HttpServletResponse response,
|
||||
String csvFilePath, String fileName)
|
||||
throws IOException {
|
||||
response.setContentType("application/csv;charset=UTF-8");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=" +
|
||||
URLEncoder.encode(fileName, "UTF-8"));
|
||||
|
||||
InputStream in = null;
|
||||
try {
|
||||
in = new FileInputStream(csvFilePath);
|
||||
int len = 0;
|
||||
byte[] buffer = new byte[1024];
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
OutputStream out = response.getOutputStream();
|
||||
while ((len = in.read(buffer)) > 0) {
|
||||
out.write(new byte[]{(byte) 0xEF, (byte) 0xBB, (byte) 0xBF});
|
||||
out.write(buffer, 0, len);
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
System.out.println(e);
|
||||
} finally {
|
||||
if (in != null) {
|
||||
try {
|
||||
in.close();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除该目录filePath下的所有文件
|
||||
*
|
||||
* @param filePath 文件目录路径
|
||||
*/
|
||||
public static void deleteFiles(String filePath) {
|
||||
File file = new File(filePath);
|
||||
if (file.exists()) {
|
||||
File[] files = file.listFiles();
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
if (files[i].isFile()) {
|
||||
files[i].delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单个文件
|
||||
*
|
||||
* @param filePath 文件目录路径
|
||||
* @param fileName 文件名称
|
||||
*/
|
||||
public static void deleteFile(String filePath, String fileName) {
|
||||
File file = new File(filePath);
|
||||
if (file.exists()) {
|
||||
File[] files = file.listFiles();
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
if (files[i].isFile()) {
|
||||
if (files[i].getName().equals(fileName)) {
|
||||
files[i].delete();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试数据
|
||||
*
|
||||
* @param args
|
||||
*/
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public static void main(String[] args) {
|
||||
List exportData = new ArrayList<Map>();
|
||||
Map row1 = new LinkedHashMap<String, String>();
|
||||
row1.put("1", "11");
|
||||
exportData.add(row1);
|
||||
row1 = new LinkedHashMap<String, String>();
|
||||
row1.put("1", "21");
|
||||
exportData.add(row1);
|
||||
LinkedHashMap map = new LinkedHashMap();
|
||||
map.put("1", "第一列");
|
||||
|
||||
String path = "c:/export/";
|
||||
String fileName = "文件导出";
|
||||
File file = CSVUtil.createCSVFile(exportData, map, path, fileName);
|
||||
String fileName2 = file.getName();
|
||||
System.out.println("文件名称:" + fileName2);
|
||||
}
|
||||
}
|
||||
+42
@@ -1,5 +1,7 @@
|
||||
package com.jero.modules.ota.utils;
|
||||
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
||||
import com.jero.modules.ota.enums.OtaModuleEnum;
|
||||
import com.jero.modules.ota.enums.OtaTitleEnum;
|
||||
@@ -8,6 +10,7 @@ import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -18,11 +21,46 @@ import java.util.List;
|
||||
* @param <T>
|
||||
*/
|
||||
public class ComparisonUtil<T> {
|
||||
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
|
||||
public ComparisonUtil() {
|
||||
}
|
||||
|
||||
|
||||
public List<OtaBaCxTxjl> comparisonRecord(String otaId, String newFj, String oldFjStr, OtaModuleEnum otaModuleEnum, String title, IOSSFileService ossFileService) {
|
||||
List<OtaBaCxTxjl> reList = new ArrayList<>();
|
||||
String[] newFjList = {};
|
||||
if (StringUtils.isNotEmpty(newFj)) {
|
||||
newFjList = newFj.split(",");
|
||||
}
|
||||
for (String nf : newFjList) {
|
||||
if (StringUtils.isEmpty(oldFjStr) || !oldFjStr.contains(nf)) {
|
||||
List<OSSFile> fileList = ossFileService.getFileInfos(nf);
|
||||
if (ObjectUtils.isNotEmpty(fileList)) {
|
||||
for (OSSFile f : fileList) {
|
||||
reList.add(addAttRecord(otaId, otaModuleEnum, title, f.getFileName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
String[] oldFjList = {};
|
||||
if (StringUtils.isNotEmpty(oldFjStr)) {
|
||||
oldFjList = oldFjStr.split(",");
|
||||
}
|
||||
for (String of : oldFjList) {
|
||||
if (StringUtils.isEmpty(newFj) || !newFj.contains(of)) {
|
||||
List<OSSFile> fileList = ossFileService.getFileInfos(of);
|
||||
if (ObjectUtils.isNotEmpty(fileList)) {
|
||||
for (OSSFile f : fileList) {
|
||||
reList.add(delAttRecord(otaId, otaModuleEnum, title, f.getFileName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return reList;
|
||||
}
|
||||
|
||||
public OtaBaCxTxjl addAttRecord(String otaId, OtaModuleEnum otaModuleEnum, String title, String attName) {
|
||||
String content = title + "中添加了附件:'" + attName;
|
||||
OtaBaCxTxjl jl = new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content);
|
||||
@@ -192,6 +230,10 @@ public class ComparisonUtil<T> {
|
||||
res = "否";
|
||||
}
|
||||
}
|
||||
} else if ("3".equals(ote.getType())) {
|
||||
if (ObjectUtils.isNotEmpty(newVal)) {
|
||||
res = sdf.format(newVal);
|
||||
}
|
||||
} else {
|
||||
newVal = field.get(clazz);
|
||||
if (ObjectUtils.isNotEmpty(newVal)) {
|
||||
|
||||
+21
-20
@@ -65,28 +65,28 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
private String sysOrgCode;
|
||||
|
||||
/**类别*/
|
||||
@Excel(name = "类别", width = 15)
|
||||
@Excel(name = "类别", width = 20)
|
||||
@ApiModelProperty(value = "类别")
|
||||
private String category;
|
||||
|
||||
/**检验项目*/
|
||||
@Excel(name = "检验项目", width = 15)
|
||||
@Excel(name = "检验项目", width = 20)
|
||||
@ApiModelProperty(value = "检验项目")
|
||||
private String inspectionItem;
|
||||
|
||||
/**配置项*/
|
||||
@Excel(name = "配置项", width = 15)
|
||||
@Excel(name = "配置项", width = 20)
|
||||
@ApiModelProperty(value = "配置项")
|
||||
@Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4")
|
||||
private String configItem;
|
||||
|
||||
/**WVTA ID*/
|
||||
@Excel(name = "WVTA ID", width = 15)
|
||||
@Excel(name = "WVTA ID", width = 20)
|
||||
@ApiModelProperty(value = "WVTA ID")
|
||||
private String wvtaId;
|
||||
|
||||
/**标准编号*/
|
||||
@Excel(name = "*标准编号", width = 15)
|
||||
@Excel(name = "*标准编号", width = 20)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private String serialNumber;
|
||||
|
||||
@@ -94,7 +94,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
private String dutyTerritory;
|
||||
/**责任领域名称**/
|
||||
@Excel(name = "*责任领域", width = 15)
|
||||
@Excel(name = "*责任领域", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyTerritoryName;
|
||||
/**责任领域名称-英文**/
|
||||
@@ -105,7 +105,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "工程接口人")
|
||||
private String sdt;
|
||||
/**工程接口人名称**/
|
||||
@Excel(name = "工程接口人", width = 15)
|
||||
@Excel(name = "工程接口人", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String sdtName;
|
||||
|
||||
@@ -113,7 +113,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "责任人")
|
||||
private String dutyPerson;
|
||||
/**责任人名称**/
|
||||
@Excel(name = "责任人", width = 15)
|
||||
@Excel(name = "责任人", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyPersonName;
|
||||
|
||||
@@ -121,7 +121,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "交付物类型")
|
||||
private String deliverableType;
|
||||
// 交付物类型名称
|
||||
@Excel(name = "交付物类型", width = 15)
|
||||
@Excel(name = "交付物类型", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String deliverableTypeName;
|
||||
// 交付物类型名称-英文
|
||||
@@ -144,16 +144,16 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
private String deliverableTemplate;
|
||||
/**交付物模板名称**/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "交付物模板", width = 15)
|
||||
@Excel(name = "交付物模板", width = 20)
|
||||
private String deliverableTemplateName;
|
||||
|
||||
/**交付结果*/
|
||||
@Excel(name = "交付结果", width = 15)
|
||||
@Excel(name = "交付结果", width = 20)
|
||||
@ApiModelProperty(value = "交付结果")
|
||||
private String deliveryResult;
|
||||
|
||||
/**截止日期*/
|
||||
@Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd")
|
||||
@Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
@@ -162,31 +162,32 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "流程状态")
|
||||
private String flowStatus;
|
||||
// 流程状态展示名称
|
||||
@Excel(name = "流程状态", width = 15)
|
||||
@Excel(name = "流程状态", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String flowStatusName;
|
||||
|
||||
/**报告编号*/
|
||||
@Excel(name = "报告编号", width = 15)
|
||||
@Excel(name = "报告编号", width = 20)
|
||||
@ApiModelProperty(value = "报告编号")
|
||||
private String reportNumber;
|
||||
|
||||
/**产品型号*/
|
||||
@Excel(name = "产品型号", width = 15)
|
||||
@Excel(name = "产品型号", width = 20)
|
||||
@ApiModelProperty(value = "产品型号")
|
||||
private String productModel;
|
||||
|
||||
/**生产企业名称*/
|
||||
@Excel(name = "生产企业名称", width = 15)
|
||||
@Excel(name = "生产企业名称", width = 20)
|
||||
@ApiModelProperty(value = "生产企业名称")
|
||||
private String productionEnterpriseName;
|
||||
|
||||
/**认证进度*/
|
||||
@Excel(name = "认证进度", width = 15)
|
||||
|
||||
@ApiModelProperty(value = "认证进度")
|
||||
private String certificationProgress;
|
||||
|
||||
/**认证进度展示名称**/
|
||||
@Excel(name = "认证进度", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String certificationProgress_dictText;
|
||||
|
||||
@@ -214,7 +215,7 @@ public class ProjectCertificationInventoryEO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String excelName;
|
||||
|
||||
// @Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd")
|
||||
// @TableField(exist = false)
|
||||
// private String endTimeStr;
|
||||
// @Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
|
||||
@TableField(exist = false)
|
||||
private String endTimeStr;
|
||||
}
|
||||
|
||||
+29
-17
@@ -63,28 +63,28 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
private java.lang.String sysOrgCode;
|
||||
|
||||
/**类别*/
|
||||
@Excel(name = "Category", width = 15)
|
||||
@Excel(name = "Category", width = 20)
|
||||
@ApiModelProperty(value = "类别")
|
||||
private java.lang.String category;
|
||||
|
||||
/**检验项目*/
|
||||
@Excel(name = "Inspection Items", width = 15)
|
||||
@Excel(name = "Inspection Items", width = 20)
|
||||
@ApiModelProperty(value = "检验项目")
|
||||
private java.lang.String inspectionItem;
|
||||
|
||||
/**配置项*/
|
||||
@Excel(name = "Configuration Item", width = 15)
|
||||
@Excel(name = "Configuration Item", width = 20)
|
||||
@ApiModelProperty(value = "配置项")
|
||||
@Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4")
|
||||
private java.lang.String configItem;
|
||||
|
||||
/**WVTA ID*/
|
||||
@Excel(name = "WVTA ID", width = 15)
|
||||
@Excel(name = "WVTA ID", width = 20)
|
||||
@ApiModelProperty(value = "WVTA ID")
|
||||
private java.lang.String wvtaId;
|
||||
|
||||
/**标准编号*/
|
||||
@Excel(name = "*Standard No", width = 15)
|
||||
@Excel(name = "*Standard No", width = 20)
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
private java.lang.String serialNumber;
|
||||
|
||||
@@ -92,7 +92,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
private java.lang.String dutyTerritory;
|
||||
/**责任领域名称**/
|
||||
@Excel(name = "*Responsible Field", width = 15)
|
||||
@Excel(name = "*Responsible Field", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyTerritoryName;
|
||||
/**责任领域名称-英文**/
|
||||
@@ -103,7 +103,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "工程接口人")
|
||||
private java.lang.String sdt;
|
||||
/**工程接口人名称**/
|
||||
@Excel(name = "Eng. Interface", width = 15)
|
||||
@Excel(name = "Eng. Interface", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String sdtName;
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "责任人")
|
||||
private java.lang.String dutyPerson;
|
||||
/**责任人名称**/
|
||||
@Excel(name = "Assignee", width = 15)
|
||||
@Excel(name = "Assignee", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String dutyPersonName;
|
||||
|
||||
@@ -119,7 +119,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "交付物类型")
|
||||
private java.lang.String deliverableType;
|
||||
// 交付物类型名称
|
||||
@Excel(name = "Deliverable Type", width = 15)
|
||||
@Excel(name = "Deliverable Type", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String deliverableTypeName;
|
||||
// 交付物类型名称-英文
|
||||
@@ -142,16 +142,16 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
private java.lang.String deliverableTemplate;
|
||||
/**交付物模板名称**/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "交付物模板", width = 15)
|
||||
@Excel(name = "Deliverable Template", width = 40)
|
||||
private String deliverableTemplateName;
|
||||
|
||||
/**交付结果*/
|
||||
@Excel(name = "Deliverables Result", width = 15)
|
||||
@Excel(name = "Deliverables Result", width = 20)
|
||||
@ApiModelProperty(value = "交付结果")
|
||||
private java.lang.String deliveryResult;
|
||||
|
||||
/**截止日期*/
|
||||
@Excel(name = "Due Date", width = 15, format = "yyyy-MM-dd")
|
||||
@Excel(name = "Due Date", width = 20, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
@@ -161,32 +161,33 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
@ApiModelProperty(value = "流程状态")
|
||||
private java.lang.String flowStatus;
|
||||
// 流程状态展示名称
|
||||
@Excel(name = "Process Status", width = 15)
|
||||
@Excel(name = "Process Status", width = 20)
|
||||
@TableField(exist = false)
|
||||
private String flowStatusName;
|
||||
|
||||
/**报告编号*/
|
||||
@Excel(name = "Report No", width = 15)
|
||||
@Excel(name = "Report No", width = 20)
|
||||
@ApiModelProperty(value = "报告编号")
|
||||
private java.lang.String reportNumber;
|
||||
|
||||
/**产品型号*/
|
||||
@Excel(name = "Product Model", width = 15)
|
||||
@Excel(name = "Product Model", width = 20)
|
||||
@ApiModelProperty(value = "产品型号")
|
||||
private java.lang.String productModel;
|
||||
|
||||
/**生产企业名称*/
|
||||
@Excel(name = "Name Of Manufacturer", width = 15)
|
||||
@Excel(name = "Name Of Manufacturer", width = 40)
|
||||
@ApiModelProperty(value = "生产企业名称")
|
||||
private java.lang.String productionEnterpriseName;
|
||||
|
||||
/**认证进度*/
|
||||
@Excel(name = "Homologation Progress", width = 15)
|
||||
|
||||
@ApiModelProperty(value = "认证进度")
|
||||
private java.lang.String certificationProgress;
|
||||
|
||||
/**认证进度展示名称**/
|
||||
@TableField(exist = false)
|
||||
@Excel(name = "Homologation Progress", width = 40)
|
||||
private String certificationProgress_dictText;
|
||||
|
||||
// @Excel(name = "认证进度备注", width = 15)
|
||||
@@ -205,4 +206,15 @@ public class ProjectCertificationInventoryEOEn implements Serializable {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String roleCode;
|
||||
|
||||
/**值类型,对应SysCategoryValueTypeEnum中value**/
|
||||
@TableField(exist = false)
|
||||
private String valueType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String excelName;
|
||||
|
||||
// @Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd")
|
||||
@TableField(exist = false)
|
||||
private String endTimeStr;
|
||||
}
|
||||
|
||||
+1
@@ -20,6 +20,7 @@ public enum JumpLinkEnum {
|
||||
DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"),
|
||||
CERTIFICATION_INVENTORY_LINK("认证清单链接","5","/ProjectDetails?id=","&type=106"),
|
||||
TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""),
|
||||
FGRW_TO_DO_CENTER_LINK("项目法规任务待办中心链接","2","/projectRegulationTasks",""),
|
||||
FGPG_TODO_CENTER_LINK("法规评估任务待办中心链接","88","/regulatoryAssessmentTasks",""),
|
||||
XMCS_TODO_CENTER_LINK("项目参数任务待办中心链接","99","/projectParameterTasks",""),
|
||||
COMPLIANCE_PROCESS_DETAIL_LINK("符合性流程明细页路由","2","/taskListProcess",""),
|
||||
|
||||
-1
@@ -21,7 +21,6 @@ public enum ProjectRoleEnum {
|
||||
MANAGER("manage","11",""),
|
||||
ADMIN("系统管理员","12",""),
|
||||
VIEWER("Viewer","13",""),
|
||||
DUTYPERSON("责任人","14","")
|
||||
;
|
||||
|
||||
String name;
|
||||
|
||||
+30
@@ -21,6 +21,7 @@ import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -69,6 +70,8 @@ public class InventoryAffirmJob implements Job {
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
@@ -124,6 +127,15 @@ public class InventoryAffirmJob implements Job {
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE4.getValue(),params);
|
||||
}
|
||||
// 当天结束的
|
||||
@@ -143,6 +155,15 @@ public class InventoryAffirmJob implements Job {
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE4.getValue(),params);
|
||||
}
|
||||
// 逾期的
|
||||
@@ -162,6 +183,15 @@ public class InventoryAffirmJob implements Job {
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE4.getValue(),params);
|
||||
}
|
||||
}
|
||||
|
||||
+70
@@ -22,6 +22,7 @@ import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||
@@ -69,6 +70,9 @@ public class TaskAffirmJob implements Job {
|
||||
@Autowired
|
||||
private IProjectLawsInventoryEOService projectLawsInventoryEOService;
|
||||
|
||||
@Autowired
|
||||
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
|
||||
@@ -131,6 +135,17 @@ public class TaskAffirmJob implements Job {
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
params.put("flowTypeCn","设计符合性流程");
|
||||
params.put("flowTypeEn","Design Compliance Process");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(),params);
|
||||
}
|
||||
// 当天结束的
|
||||
@@ -152,6 +167,17 @@ public class TaskAffirmJob implements Job {
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
params.put("flowTypeCn","设计符合性流程");
|
||||
params.put("flowTypeEn","Design Compliance Process");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(),params);
|
||||
}
|
||||
// 逾期的
|
||||
@@ -173,6 +199,17 @@ public class TaskAffirmJob implements Job {
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
params.put("flowTypeCn","设计符合性流程");
|
||||
params.put("flowTypeEn","Design Compliance Process");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION5.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -209,6 +246,17 @@ public class TaskAffirmJob implements Job {
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
params.put("flowTypeCn","验证符合性流程");
|
||||
params.put("flowTypeEn","Validation Compliance Process");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(),params);
|
||||
}
|
||||
// 当天结束的
|
||||
@@ -230,6 +278,17 @@ public class TaskAffirmJob implements Job {
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
params.put("flowTypeCn","验证符合性流程");
|
||||
params.put("flowTypeEn","Validation Compliance Process");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(),params);
|
||||
}
|
||||
// 逾期的
|
||||
@@ -251,6 +310,17 @@ public class TaskAffirmJob implements Job {
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
params.put("flowTypeCn","验证符合性流程");
|
||||
params.put("flowTypeEn","Validation Compliance Process");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION5.getValue(),params);
|
||||
}
|
||||
}
|
||||
|
||||
+48
@@ -21,6 +21,7 @@ import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
@@ -62,6 +63,9 @@ public class VerifyComplianceJob implements Job {
|
||||
@Autowired
|
||||
private IProjectTaskInventoryEOService projectTaskInventoryEOService;
|
||||
|
||||
@Autowired
|
||||
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@@ -120,6 +124,17 @@ public class VerifyComplianceJob implements Job {
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
|
||||
@@ -140,6 +155,17 @@ public class VerifyComplianceJob implements Job {
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
|
||||
@@ -160,6 +186,17 @@ public class VerifyComplianceJob implements Job {
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
// 逾期的
|
||||
@@ -179,6 +216,17 @@ public class VerifyComplianceJob implements Job {
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION3.getValue(),params);
|
||||
}
|
||||
}
|
||||
|
||||
+48
@@ -21,6 +21,7 @@ import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
@@ -71,6 +72,9 @@ public class designComplianceJob implements Job {
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
|
||||
@Autowired
|
||||
private IProjectLibraryBaseService projectLibraryBaseService;
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
@Override
|
||||
@@ -120,6 +124,17 @@ public class designComplianceJob implements Job {
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
|
||||
@@ -140,6 +155,17 @@ public class designComplianceJob implements Job {
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
|
||||
@@ -160,6 +186,17 @@ public class designComplianceJob implements Job {
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
// 逾期的
|
||||
@@ -179,6 +216,17 @@ public class designComplianceJob implements Job {
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.projectLawsInventoryEOService.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.projectLawsInventoryEOService.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION3.getValue(),params);
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -25,4 +25,5 @@ public interface ProjectLibraryBaseMapper extends BaseMapper<ProjectLibraryBase>
|
||||
/**根据id查询*/
|
||||
List<ProjectLibraryBase> queryById(String id);
|
||||
|
||||
ProjectLibraryBase selectProjectName(@Param("projectLibraryId") String projectLibraryId);
|
||||
}
|
||||
|
||||
+11
@@ -279,4 +279,15 @@
|
||||
</where>
|
||||
order by plb.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectProjectName" resultType="com.jero.modules.project.entity.ProjectLibraryBase">
|
||||
SELECT
|
||||
concat( pni.project_name, '-', pyni.year_name ) AS project_name
|
||||
FROM
|
||||
project_library_base plb
|
||||
LEFT JOIN project_name_info pni ON plb.project_name_id = pni.id
|
||||
LEFT JOIN project_year_name_info pyni ON plb.year_name_id = pyni.id
|
||||
WHERE
|
||||
plb.id = #{projectLibraryId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+8
@@ -209,6 +209,14 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
|
||||
Map<String, Object> getProjectLawsInventoryLinkHrefFeishu(String projectLibraryId, String PRN_CN, String PRN_EN);
|
||||
|
||||
/**
|
||||
* 获取待办中心跳转链接
|
||||
* @param projectLibraryId
|
||||
* @param todoCenterParams
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getToDoCenterLinkHrefFeishu(String projectLibraryId, Map<String,Object> todoCenterParams);
|
||||
|
||||
/**
|
||||
* 法规清单根据清单确认截至日期顺序排序
|
||||
* @param projectLawsInventoryEOS
|
||||
|
||||
+138
-29
@@ -45,6 +45,7 @@ import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.enums.SysCategoryValueTypeEnum;
|
||||
import com.jero.modules.system.mapper.SysCategoryMapper;
|
||||
import com.jero.modules.system.mapper.SysRoleMapper;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysCategoryService;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
@@ -155,6 +156,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
private IProjectRelatedPersonnelService iProjectRelatedPersonnelService;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -740,6 +743,16 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
data.setCertificationProgress_dictText(certificationProgress_dictText);
|
||||
}
|
||||
// String GetEndTime = String.valueOf(data.getEndTime());
|
||||
// if(StringUtils.isNotEmpty(GetEndTime)){
|
||||
// Date endTime = new Date();
|
||||
// if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
// endTime = data.getEndTime();
|
||||
// }else {
|
||||
// endTime = data.getEndTime();
|
||||
// }
|
||||
// data.setEndTimeStr(String.valueOf(endTime));
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2965,11 +2978,17 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
//工程接口人engineeringInterfacePerson
|
||||
String sdt = projectCertificationInventoryEO.getSdtName();
|
||||
//责任人
|
||||
String dutyPerson = projectCertificationInventoryEO.getDutyPersonName();
|
||||
String dutyPerson = projectCertificationInventoryEO.getDutyPersonName();;
|
||||
//交付物类型
|
||||
String deliverableType = projectCertificationInventoryEO.getDeliverableTypeName();
|
||||
String deliverableType = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
deliverableType = projectCertificationInventoryEO.getDeliverableTypeName();
|
||||
}else {
|
||||
deliverableType = projectCertificationInventoryEO.getDeliverableTypeNameEn();
|
||||
}
|
||||
|
||||
//截止时间
|
||||
Date endTime = projectCertificationInventoryEO.getEndTime();
|
||||
String endTime = projectCertificationInventoryEO.getEndTimeStr();
|
||||
|
||||
//文件
|
||||
//交付物模板
|
||||
@@ -3089,7 +3108,12 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
//工程接口人
|
||||
List<Map<String, String>> mapPersonList = (List<Map<String, String>>) objectMap.get("engineeringInterfacePersonList");
|
||||
//所有人
|
||||
List<Map<String, String>> allPersonList = (List<Map<String, String>>) objectMap.get("allPersonList");
|
||||
// List<Map<String, String>> allPersonList = (List<Map<String, String>>) objectMap.get("allPersonList");
|
||||
|
||||
List<SysUser> listUserName = new ArrayList<>();
|
||||
listUserName = sysUserMapper.getListUserName();
|
||||
listUserName = listUserName.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
|
||||
String nameCn = "";
|
||||
String nameEn = "";
|
||||
@@ -3113,7 +3137,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
nameCn = "责任人";
|
||||
nameEn = "Assignee";
|
||||
//验证人员是否存在
|
||||
personnelVerify(projectCertificationInventoryEO, errorMsg, msgList, dutyPerson, allPersonList,nameCn,nameEn, com.jero.modules.project.enums.ProjectRoleEnum.DUTYPERSON.getValue());
|
||||
personDutyPerson(projectCertificationInventoryEO, errorMsg, msgList, dutyPerson, listUserName,nameCn,nameEn);
|
||||
}else {
|
||||
String message = "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEOTemp.getCut())){
|
||||
@@ -3146,12 +3170,19 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
projectCertificationInventoryEO.setDeliverableTemplate(value);
|
||||
}
|
||||
//截止时间
|
||||
SimpleDateFormat sd = new SimpleDateFormat();
|
||||
String endTimeStr = sd.format(endTime);
|
||||
if(StringUtils.isNotBlank(endTimeStr)){
|
||||
// SimpleDateFormat sd = new SimpleDateFormat();
|
||||
// String endTimeStr = sd.format(endTime);
|
||||
if(StringUtils.isNotBlank(endTime)){
|
||||
flag = dateVerify(projectCertificationInventoryEO, errorMsg, endTime,msgList,"截止时间","Due Date");
|
||||
if(flag){
|
||||
projectCertificationInventoryEO.setEndTime(projectCertificationInventoryEO.getEndTime());
|
||||
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = null;
|
||||
try {
|
||||
date = sd.parse(endTime);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
projectCertificationInventoryEO.setEndTime(date);
|
||||
}
|
||||
}else{
|
||||
String message = "";
|
||||
@@ -3187,14 +3218,14 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
|
||||
private boolean dateVerify(ProjectCertificationInventoryEO projectCertificationInventoryEO,
|
||||
String errorMsg, Date field, List<String> msgList, String nameCn, String nameEn) {
|
||||
String errorMsg, String field, List<String> msgList, String nameCn, String nameEn) {
|
||||
|
||||
//判断格式是否正确
|
||||
boolean flag = true;
|
||||
if(ObjectUtils.isNotEmpty(field)){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String format = sdf.format(field);
|
||||
if (!DateUtils.isValidDate(format)) {
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// String format = sdf.format(field);
|
||||
if (!DateUtils.isValidDate(field)) {
|
||||
flag = false;
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn + "格式不正确, 正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日";
|
||||
@@ -3203,6 +3234,24 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
Date now = new Date();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
long longnow = now.getTime();
|
||||
try {
|
||||
Date date = sdf.parse(field);
|
||||
long longdate = date.getTime();
|
||||
if(longnow>longdate){
|
||||
flag = false;
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn + "不能导入今天之前的日期";
|
||||
}else{
|
||||
errorMsg += nameEn + " Cannot import dates before today ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
@@ -3315,7 +3364,39 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private void personDutyPerson(ProjectCertificationInventoryEO projectCertificationInventoryEO,
|
||||
String errorMsg, List<String> msgList, String regulationOwnerId,
|
||||
List<SysUser> listUserName ,String nameCn, String nameEn){
|
||||
//单选
|
||||
if(regulationOwnerId.contains(",")){
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn + "导入只能填写一个用户名, ";
|
||||
}else{
|
||||
errorMsg += "Only one user name can be entered for"+ nameEn +"import, ";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
|
||||
int count =0;
|
||||
for(SysUser name : listUserName){
|
||||
if(StringUtils.isNotEmpty(name.getUsername())){
|
||||
if(name.getUsername().equals(regulationOwnerId)){
|
||||
count++;
|
||||
String id = name.getId();
|
||||
projectCertificationInventoryEO.setDutyPerson(id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count==0){
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
errorMsg += nameCn+regulationOwnerId+"与所有人员名单不匹配";
|
||||
}else{
|
||||
errorMsg += nameEn+regulationOwnerId+"does not match a person with all person list";
|
||||
}
|
||||
msgList.add(errorMsg);
|
||||
}
|
||||
}
|
||||
private void personnelVerify(ProjectCertificationInventoryEO projectCertificationInventoryEO,
|
||||
String errorMsg, List<String> msgList, String regulationOwnerId,
|
||||
List<Map<String, String>> mapList, String nameCn, String nameEn, String fieldNumber) {
|
||||
@@ -3337,8 +3418,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
count ++;
|
||||
if(com.jero.modules.project.enums.ProjectRoleEnum.ENGINEERING_INTERFACE_PERSON.getValue().equals(fieldNumber)){
|
||||
projectCertificationInventoryEO.setSdt(stringStringMap.get("value"));
|
||||
}else if(com.jero.modules.project.enums.ProjectRoleEnum.DUTYPERSON.getValue().equals(fieldNumber)){
|
||||
projectCertificationInventoryEO.setDutyPerson(stringStringMap.get("value"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3456,12 +3535,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
List<OSSFile> fileInfos = getOssFiles(dataList);
|
||||
//处理文件名称
|
||||
|
||||
String fileName = "";
|
||||
for (int i = 0; i < dataList.size(); i++) {
|
||||
if(StringUtils.isNotEmpty(dataList.get(i).getDeliveryResult())){
|
||||
String fileName = ossFileService.getFileInfos(dataList.get(i).getDeliveryResult()).stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
|
||||
dataList.get(i).setDeliveryResult(fileName);
|
||||
|
||||
}
|
||||
if(StringUtils.isNotEmpty(dataList.get(i).getDeliverableTemplate())){
|
||||
String deliverableTemplateName = template(fileInfos, dataList.get(i).getDeliverableTemplate());
|
||||
dataList.get(i).setDeliverableTemplateName(deliverableTemplateName);
|
||||
@@ -3482,6 +3557,30 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
fileTemp.mkdirs();
|
||||
//文件
|
||||
exportFile(dataList,fileInfos);
|
||||
|
||||
for(int i =0 ;i<dataList.size();i++){
|
||||
if(dataList.get(i).getValueType().equals(SysCategoryValueTypeEnum.FILE.getValue())){
|
||||
if(StringUtils.isNotEmpty(dataList.get(i).getDeliveryResult())){
|
||||
fileName = ossFileService.getFileInfos(dataList.get(i).getDeliveryResult()).stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(","));
|
||||
dataList.get(i).setDeliveryResult(fileName);
|
||||
|
||||
}
|
||||
}else if(dataList.get(i).getValueType().equals(SysCategoryValueTypeEnum.TEXT.getValue())){
|
||||
if(StringUtils.isNotEmpty(dataList.get(i).getDeliveryResult())){
|
||||
fileName = dataList.get(i).getDeliveryResult();
|
||||
dataList.get(i).setDeliveryResult(fileName);
|
||||
}
|
||||
}else if(dataList.get(i).getValueType().equals(SysCategoryValueTypeEnum.NA.getValue())){
|
||||
fileName = "";
|
||||
dataList.get(i).setDeliveryResult(fileName);
|
||||
}else if(dataList.get(i).getValueType().equals(SysCategoryValueTypeEnum.SELECT.getValue())) {
|
||||
if (StringUtils.isNotEmpty(dataList.get(i).getDeliveryResult())) {
|
||||
fileName = dataList.get(i).getDeliveryResult();
|
||||
dataList.get(i).setDeliveryResult(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String excelName = projectCertificationInventoryEO.getExcelName()+".xlsx";
|
||||
// String excelName = "";
|
||||
// if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
@@ -3540,15 +3639,22 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
for(ProjectCertificationInventoryEO projectCertificationInventoryEO : dataList){
|
||||
String deliverableTemplate = projectCertificationInventoryEO.getDeliverableTemplate();
|
||||
String serialNumber = projectCertificationInventoryEO.getSerialNumber();
|
||||
String deliveryResult = projectCertificationInventoryEO.getDeliveryResult();
|
||||
if(StringUtils.isBlank(serialNumber)){
|
||||
continue;
|
||||
}
|
||||
List<OSSFile> deliverableTemplateFileList = new ArrayList<>();
|
||||
List<OSSFile> deliveryResultList = new ArrayList<>();
|
||||
List<OSSFile> oSSFileList = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(deliverableTemplate)){
|
||||
deliverableTemplateFileList = fileInfos.stream().filter(e -> deliverableTemplate.contains(e.getId())).collect(Collectors.toList());
|
||||
oSSFileList.addAll(deliverableTemplateFileList);
|
||||
}
|
||||
if(StringUtils.isNotBlank(deliveryResult) && projectCertificationInventoryEO.getValueType().equals(SysCategoryValueTypeEnum.FILE.getValue())){
|
||||
deliveryResultList = fileInfos.stream().filter(e -> deliveryResult.contains(e.getId())).collect(Collectors.toList());
|
||||
oSSFileList.addAll(deliveryResultList);
|
||||
|
||||
}
|
||||
if(oSSFileList.size() != 0){
|
||||
String fileNowPath = uploadpath + "/tempZip/" + serialNumber;
|
||||
File file = new File(fileNowPath);
|
||||
@@ -3594,6 +3700,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
if(StringUtils.isNotBlank(projectCertificationInventoryEO.getDeliverableTemplate())){
|
||||
fileIdList.add(projectCertificationInventoryEO.getDeliverableTemplate());
|
||||
}
|
||||
if(StringUtils.isNotBlank(projectCertificationInventoryEO.getDeliveryResult())){
|
||||
fileIdList.add(projectCertificationInventoryEO.getDeliveryResult());
|
||||
}
|
||||
}
|
||||
//查询所有的文件
|
||||
List<OSSFile> fileInfos = new ArrayList<>();
|
||||
@@ -3679,8 +3788,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
case "*交付物类型": return "deliverableTypeName";
|
||||
case "交付物模板": return "deliverableTemplateName";
|
||||
case "交付结果": return "deliveryResult";
|
||||
case "*截止日期": return "endTime";
|
||||
// case "*截止日期": return "endTimeStr";
|
||||
case "截止日期": return "endTime";
|
||||
case "*截止日期": return "endTimeStr";
|
||||
case "流程状态": return "flowStatus";
|
||||
case "报告编号": return "reportNumber";
|
||||
case "产品型号": return "productModel";
|
||||
@@ -3697,8 +3806,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
case "*Deliverable Type": return "deliverableTypeNameEn";
|
||||
case "Deliverable Template": return "deliverableTemplateName";
|
||||
case "Deliverables Result": return "deliveryResult";
|
||||
case "*Due Date": return "endTime";
|
||||
// case "*Due Date": return "endTimeStr";
|
||||
case "Due Date": return "endTime";
|
||||
case "*Due Date": return "endTimeStr";
|
||||
case "Process Status": return "flowStatus";
|
||||
case "Report No": return "reportNumber";
|
||||
case "Product Model": return "productModel";
|
||||
@@ -3728,19 +3837,19 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
title = "*类别,*检验项目,*配置项,*WVTA ID," +
|
||||
"*标准编号,*责任领域,*工程接口人,*责任人," +
|
||||
"*交付物类型,交付物模板,*截止日期";
|
||||
"*交付物类型,交付物模板,*截止日期,报告编号,产品型号,生产企业名称";
|
||||
}else {
|
||||
title = "*Category,*Inspection Items,*Configuration Item,*WVTA ID," +
|
||||
"*Standard No,*Responsible Field,*Eng. Interface,*Assignee," +
|
||||
"*Deliverable Type,Deliverable Template,*Due Date";
|
||||
"*Deliverable Type,Deliverable Template,*Due Date,Report No,Product Model,Name Of Manufacturer";
|
||||
}
|
||||
|
||||
List<String> list = Arrays.asList(title.split(","));
|
||||
int index = 0;
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
index = list.indexOf("*截止日期") + 1;
|
||||
index = list.indexOf("生产企业名称") + 1;
|
||||
}else{
|
||||
index = list.indexOf("*Due Date") + 1;
|
||||
index = list.indexOf("Name Of Manufacturer") + 1;
|
||||
}
|
||||
|
||||
//创建临时文件夹
|
||||
@@ -3760,7 +3869,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
cellStyleTemp.setWrapText(true);//自动换行
|
||||
|
||||
CellRangeAddress region =
|
||||
new CellRangeAddress(1, 1, 0, 10); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
|
||||
new CellRangeAddress(1, 1, 0, 13); //参数1:起始行 参数2:终止行 参数3:起始列 参数4:终止列
|
||||
sheet.addMergedRegion(region);
|
||||
String explain= "";
|
||||
if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){
|
||||
|
||||
+200
-22
@@ -303,6 +303,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectLawsInventoryEOTemp.setStandId(dummyInventoryInfoEO.getBussDocumentLibraryId());
|
||||
projectLawsInventoryEOTemp.setDesignFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
|
||||
projectLawsInventoryEOTemp.setVerifyFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
|
||||
projectLawsInventoryEOTemp.setCreateTime(new Date());
|
||||
projectLawsInventoryEOTemp.setUpdateTime(new Date());
|
||||
projectLawsInventoryEOS.add(projectLawsInventoryEOTemp);
|
||||
}
|
||||
}else{
|
||||
@@ -327,6 +329,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
projectLawsInventoryEOTemp.setStandId(dummyInventoryInfoEO.getBussDocumentLibraryId());
|
||||
projectLawsInventoryEOTemp.setDesignFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
|
||||
projectLawsInventoryEOTemp.setVerifyFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue());
|
||||
projectLawsInventoryEOTemp.setCreateTime(new Date());
|
||||
projectLawsInventoryEOTemp.setUpdateTime(new Date());
|
||||
projectLawsInventoryEOS.add(projectLawsInventoryEOTemp);
|
||||
}
|
||||
}
|
||||
@@ -668,6 +672,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",Arrays.asList(regulationOwnerId.split(",")));
|
||||
params.put("serialNumbers",projectLawsInventoryOld.getSerialNumber());
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLawsInventoryEO.getProjectLibraryId());
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -687,6 +702,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",Arrays.asList(regulationOwnerId.split(",")));
|
||||
params.put("serialNumbers",projectLawsInventoryOld.getSerialNumber());
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLawsInventoryEO.getProjectLibraryId());
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -706,6 +732,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",Arrays.asList(regulationOwnerId.split(",")));
|
||||
params.put("serialNumbers",projectLawsInventoryOld.getSerialNumber());
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLawsInventoryEO.getProjectLibraryId());
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -732,6 +769,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",Arrays.asList(projectLawsInventoryOld.getDesignDutyId().split(",")));
|
||||
params.put("serialNumbers",projectLawsInventoryOld.getSerialNumber());
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLawsInventoryEO.getProjectLibraryId());
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -757,6 +805,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",Arrays.asList(projectLawsInventoryOld.getDesignDutyId().split(",")));
|
||||
params.put("serialNumbers",projectLawsInventoryOld.getSerialNumber());
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLawsInventoryEO.getProjectLibraryId());
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -786,6 +845,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",Arrays.asList(regulationOwnerId.split(",")));
|
||||
params.put("serialNumbers",projectLawsInventoryEO.getSerialNumber());
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLawsInventoryEO.getProjectLibraryId());
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
|
||||
@@ -807,6 +877,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",Arrays.asList(regulationOwnerId.split(",")));
|
||||
params.put("serialNumbers",projectLawsInventoryEO.getSerialNumber());
|
||||
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLawsInventoryEO.getProjectLibraryId());
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -3066,6 +3147,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
// workFlowSendMsg(jsonObject);
|
||||
Map<String,Object> prarams = (Map<String, Object>) jsonObject.get("params");
|
||||
String templateId = jsonObject.getString("templateId");
|
||||
|
||||
String projectLibraryId = (String) prarams.get("projectLibraryId");
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
prarams.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
prarams.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
this.sendMessageByTemplateId(templateId,prarams);
|
||||
}
|
||||
|
||||
@@ -6157,6 +6249,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
paramsMsg.put("endTime",endTime);
|
||||
paramsMsg.put("userIdList",userIdList);
|
||||
paramsMsg.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
paramsMsg.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
paramsMsg.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE2.getValue(),paramsMsg);
|
||||
}
|
||||
return Result.OK("变更成功!");
|
||||
@@ -9524,6 +9626,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE1.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -9566,6 +9677,16 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE2.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -9604,6 +9725,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.DESIGN_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -9643,6 +9775,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE2.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -9681,6 +9822,17 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
// String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取待办中心 - 飞书跳转链接
|
||||
Map<String,Object> todoCenterParams = new HashMap<>();
|
||||
todoCenterParams.put("projectNameCn",PRN_CN);
|
||||
Map<String, Object> hrefFeishuMap = this.getToDoCenterLinkHrefFeishu(projectLibraryBase.getId(), todoCenterParams);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.VALIDATION_COMPLIANCE_CONFIRMATION1.getValue(),params);
|
||||
}
|
||||
}
|
||||
@@ -10454,15 +10606,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String cut = json.getString("cut");
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
|
||||
// studio信息
|
||||
SysUser studioUserInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
|
||||
);
|
||||
|
||||
String ids = json.getString("ids");
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
@@ -10531,6 +10674,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("projectLibraryId",projectLibraryId);
|
||||
params.put("endTime",inventoryAffirmDueDate);
|
||||
params.put("userIdList",userIdList);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE1.getValue(),params);
|
||||
|
||||
return Result.OK("发起清单确认成功!");
|
||||
@@ -10542,15 +10694,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String cut = json.getString("cut");
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
|
||||
// studio信息
|
||||
SysUser studioUserInfo = this.sysUserMapper.selectOne(
|
||||
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
|
||||
);
|
||||
|
||||
String ids = json.getString("ids");
|
||||
QueryWrapper<ProjectLawsInventoryEO> queryWrapper = new QueryWrapper<>();
|
||||
if(StringUtils.isEmpty(ids)){
|
||||
@@ -10609,6 +10752,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE2.getValue(),params);
|
||||
|
||||
return Result.OK("撤回成功!");
|
||||
@@ -10668,6 +10820,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime",endTime);
|
||||
params.put("userIdList",userIdList);
|
||||
params.put("serialNumbers",serialNumbers);
|
||||
|
||||
// 获取法规清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN,PRN_EN);
|
||||
params.put("hrefFeishu_CN",(String)hrefFeishuMap.get("hrefFeishu_CN"));
|
||||
params.put("hrefFeishu_EN",(String)hrefFeishuMap.get("hrefFeishu_EN"));
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_LIST_RELEASE3.getValue(),params);
|
||||
return Result.OK("退回成功!");
|
||||
}
|
||||
@@ -10725,16 +10883,15 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String contentEn = (String) params.get("contentEn");
|
||||
String flowTypeCn = (String) params.get("flowTypeCn");
|
||||
String flowTypeEn = (String) params.get("flowTypeEn");
|
||||
String hrefFeishu_CN = (String) params.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) params.get("hrefFeishu_EN");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
|
||||
String PRN_EN = projectLibraryBase.getProjectNameEn();//项目名称 英文
|
||||
String PRN_CN = projectLibraryBase.getProjectNameCn();//项目名称 中文
|
||||
|
||||
// 获取认证清单 - 飞书跳转链接
|
||||
Map<String, Object> hrefFeishuMap = this.getProjectLawsInventoryLinkHrefFeishu(projectLibraryBase.getId(), PRN_CN, PRN_EN);
|
||||
String hrefFeishu_CN = (String) hrefFeishuMap.get("hrefFeishu_CN");
|
||||
String hrefFeishu_EN = (String) hrefFeishuMap.get("hrefFeishu_EN");
|
||||
|
||||
try {
|
||||
for (String userId : userIdList) {
|
||||
String thirdId = this.sysUserService.getUserThirdIdByUserId(userInfoList,userId);
|
||||
@@ -10792,6 +10949,27 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getToDoCenterLinkHrefFeishu(String projectLibraryId, Map<String,Object> todoCenterParams) {
|
||||
// String projectNameCn = (String) todoCenterParams.get("projectNameCn");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.getBaseMapper().selectProjectName(projectLibraryId);
|
||||
String projectNameCn = projectLibraryBase.getProjectName();
|
||||
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
|
||||
String hrefFeishu_CN = backUrl
|
||||
+ JumpLinkEnum.FGRW_TO_DO_CENTER_LINK.getLink() + "?projectName=" + projectNameCn;
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu_EN = backUrl
|
||||
+ JumpLinkEnum.FGRW_TO_DO_CENTER_LINK.getLink() + "?projectName=" + projectNameCn;
|
||||
|
||||
result.put("hrefFeishu_CN",hrefFeishu_CN);
|
||||
result.put("hrefFeishu_EN",hrefFeishu_EN);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lawsInventoryEOListSortByInventoryAffirmDueDate(List<ProjectLawsInventoryEO> projectLawsInventoryEOS) {
|
||||
Collections.sort(projectLawsInventoryEOS, new Comparator<ProjectLawsInventoryEO>() {
|
||||
|
||||
+6
-3
@@ -46,7 +46,8 @@
|
||||
pi.project_laws_inventory_id,
|
||||
pi.buss_document_library_id,
|
||||
pi.acti_proc_inst_id,
|
||||
pni.project_name,
|
||||
<!--pni.project_name,-->
|
||||
concat( pni.project_name, '-', pyni.year_name ) AS project_name,
|
||||
pyni.year_name,
|
||||
pli.serial_number,
|
||||
pli.title,
|
||||
@@ -115,7 +116,8 @@
|
||||
pi.project_laws_inventory_id,
|
||||
pi.buss_document_library_id,
|
||||
pi.acti_proc_inst_id,
|
||||
pni.project_name,
|
||||
<!--pni.project_name,-->
|
||||
concat( pni.project_name, '-', pyni.year_name ) AS project_name,
|
||||
pyni.year_name,
|
||||
pli.serial_number,
|
||||
pli.title,
|
||||
@@ -165,7 +167,8 @@
|
||||
pi.project_laws_inventory_id,
|
||||
pi.buss_document_library_id,
|
||||
pi.acti_proc_inst_id,
|
||||
pni.project_name,
|
||||
<!--pni.project_name,-->
|
||||
concat( pni.project_name, '-', pyni.year_name ) AS project_name,
|
||||
pyni.year_name,
|
||||
'--' as serial_number,
|
||||
'--' as standard_info,
|
||||
|
||||
+2
-1
@@ -566,7 +566,8 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
||||
projectVersion = data.getProjectVersion();
|
||||
}
|
||||
|
||||
data.setProjectName(data.getProjectName() + "-" + data.getYearName() + "-" + targetMarket + "-" + projectVersion);
|
||||
//data.setProjectName(data.getProjectName() + "-" + data.getYearName() + "-" + targetMarket + "-" + projectVersion);
|
||||
data.setProjectName(data.getProjectName() + "-" + targetMarket + "-" + projectVersion);
|
||||
}
|
||||
|
||||
//设置任务清单明细表id
|
||||
|
||||
+22
-22
@@ -10,7 +10,7 @@
|
||||
{{$t('templateDownload')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model class="formAdd" ref="ruleForm" :model="form" :rules="rules">
|
||||
<a-row :gutter="24">
|
||||
@@ -20,7 +20,7 @@
|
||||
<span class="title-text-text" :title="$t('selectTheVehicleTemplate')">{{$t('selectTheVehicleTemplate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dutyTerritory">
|
||||
<a-select :disabled="disabled" class="box-input" v-model="form.cxmb" allowClear :placeholder="$t('PleaseSelect')" @change="update">
|
||||
<a-select :disabled="disabled" class="box-input" v-model="form.cxmb" allowClear :placeholder="$t('PleaseSelect')" @change="update">
|
||||
<a-select-option v-for="(item , key ) in selectListMb" :key="key" :value="item.id" >
|
||||
{{ item.cpdjbh }}
|
||||
</a-select-option>
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text-add">
|
||||
<div class="title-text-add plus">
|
||||
@@ -82,7 +82,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input disabled class="box-input" :placeholder="$t('pleaseEnter')" :title='form.cpsb' v-model="form.cpsb" :max-length="50"></a-input>
|
||||
|
||||
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -93,7 +93,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input disabled class="box-input" :placeholder="$t('pleaseEnter')" :title='form.cpmc' v-model="form.cpmc" :max-length="50"></a-input>
|
||||
|
||||
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -104,7 +104,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input disabled class="box-input" :placeholder="$t('pleaseEnter')" :title='form.cpxh' v-model="form.cpxh" :max-length="50"></a-input>
|
||||
|
||||
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -143,7 +143,7 @@
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
@@ -192,7 +192,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
this.getSelect()
|
||||
this.getData()
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
// 模板下载
|
||||
handleModule() {
|
||||
@@ -220,7 +220,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
this.form=res.result
|
||||
if(res.result.dllx1==null){
|
||||
this.form.dllx1=undefined
|
||||
|
||||
|
||||
}
|
||||
if(res.result.dllx2==null){
|
||||
this.form.dllx2=undefined
|
||||
@@ -233,7 +233,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
}
|
||||
this.$forceUpdate()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -258,7 +258,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
next(){
|
||||
this.save()
|
||||
@@ -266,8 +266,8 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
if(valid){
|
||||
this.$emit('basicInformationForm')
|
||||
}})
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
getSelect(){
|
||||
getAction('/ota/otaBaCxList/list').then(res=>{
|
||||
@@ -279,7 +279,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
obj=item
|
||||
this.selectListPc.push(obj)
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -306,12 +306,12 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
}else{
|
||||
this. projectNameList2=['其他']
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
changeId(value,option){
|
||||
this.selectListPc.map(item=>{
|
||||
if(item.id==value){
|
||||
this.form.cpsb = item.cpsb
|
||||
this.form.cpsb = item.cpsb
|
||||
this.form.cpmc = item.cpmc
|
||||
this.form.cpxh = item.cpxh
|
||||
getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:'',otaId:item.id}).then(res=>{
|
||||
@@ -338,9 +338,9 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
}
|
||||
|
||||
.box-title-text-add {
|
||||
line-height: 1.4;
|
||||
//line-height: 1.4;
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title-text-add {
|
||||
@@ -354,7 +354,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
//line-height: 20px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
@@ -368,7 +368,7 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
//line-height: 42px;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@@ -400,11 +400,11 @@ import ImportFile from '@/components/ImportFileData/index'
|
||||
}
|
||||
.plus{
|
||||
margin-top: 5px;
|
||||
line-height: 1.4 !important;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.plus2{
|
||||
word-break: break-all;
|
||||
line-height: 1.3;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.Required {
|
||||
color: red;
|
||||
|
||||
+14
-10
@@ -145,7 +145,7 @@
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text-add">
|
||||
<div class="plus">
|
||||
<div class="title-text-add">
|
||||
<span class="title-text-text" :title="$t('usernotificationmode')">{{$t('usernotificationmode')}}</span>
|
||||
</div>
|
||||
@@ -160,7 +160,7 @@
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text-add">
|
||||
<div class="plus">
|
||||
<div class="title-text-add">
|
||||
<span class="title-text-text" :title="$t('userinformstherelevantfile')">{{$t('userinformstherelevantfile')}}</span>
|
||||
</div>
|
||||
@@ -246,7 +246,7 @@ export default {
|
||||
})
|
||||
},
|
||||
getData(){
|
||||
|
||||
|
||||
let otaIdT=localStorage.getItem('otaIdT')
|
||||
if(otaIdT==null){
|
||||
otaIdT=''
|
||||
@@ -257,11 +257,11 @@ export default {
|
||||
}
|
||||
getAction('/ota/otaBaSjGgnrfs/queryByOtaId',{otaIdT:otaIdT,otaId:otaId}).then(res=>{
|
||||
if(res.code == 200){
|
||||
|
||||
|
||||
this.formInline= res.result ==null ? {
|
||||
sjky:'车辆解闭锁功能可用,但不可驾驶',
|
||||
sjbkygn:'除解闭锁均不可用'
|
||||
} :res.result
|
||||
} :res.result
|
||||
this.formInline.id=res.result.id
|
||||
this.$forceUpdate()
|
||||
}
|
||||
@@ -305,9 +305,9 @@ export default {
|
||||
}
|
||||
|
||||
.box-title-text-add {
|
||||
line-height: 1.4;
|
||||
//line-height: 1.4;
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
}
|
||||
h1{
|
||||
font-weight: 700;
|
||||
@@ -322,9 +322,9 @@ h1{
|
||||
margin-right: 16px;
|
||||
//overflow: hidden;
|
||||
//text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
//white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
//line-height: 42px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ h1{
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
//line-height: 42px;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@@ -371,4 +371,8 @@ h1{
|
||||
left: 40%;
|
||||
text-align: center!important;
|
||||
}
|
||||
|
||||
.plus{
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
+28
-25
@@ -19,7 +19,7 @@
|
||||
<span class="title-text-text" :title="$t('selectTheVehicleTemplate')">{{$t('selectTheVehicleTemplate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dutyTerritory">
|
||||
|
||||
|
||||
<a-select :disabled="disabled" class="box-input" v-model="form.cxmb" allowClear :placeholder="$t('PleaseSelect')" @change="changeId">
|
||||
<a-select-option v-for="(item , key ) in selectList" :key="key" :value="item.id" >
|
||||
{{ item.value }}
|
||||
@@ -34,7 +34,7 @@
|
||||
<span class="title-text-text" :title="$t('theNameOfFirm')">{{$t('theNameOfFirm')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input
|
||||
<a-input
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
class="box-input"
|
||||
@@ -52,12 +52,12 @@
|
||||
<span class="title-text-text" :title="$t('registrationnumber')">{{$t('registrationnumber')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="djbh">
|
||||
|
||||
<a-input
|
||||
|
||||
<a-input
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.djbh'
|
||||
class="box-input"
|
||||
class="box-input"
|
||||
:placeholder="$t('pleaseEnter')"
|
||||
v-model.trim="form.djbh">
|
||||
</a-input>
|
||||
@@ -87,7 +87,7 @@
|
||||
<span class="title-text-text" :title="$t('noticebatch')">{{$t('noticebatch')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dutyTerritory">
|
||||
<a-input
|
||||
<a-input
|
||||
:max-length="500"
|
||||
:disabled="disabled"
|
||||
:title='form.ggpc'
|
||||
@@ -104,7 +104,7 @@
|
||||
<span class="title-text-text" :title="$t('producttrademark')">{{$t('producttrademark')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input
|
||||
<a-input
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.cpsb'
|
||||
@@ -121,7 +121,7 @@
|
||||
<span class="title-text-text" :title="$t('productname')">{{$t('productname')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input
|
||||
<a-input
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.cpmc'
|
||||
@@ -130,7 +130,7 @@
|
||||
v-model="form.cpmc">
|
||||
</a-input>
|
||||
</a-form-model-item>
|
||||
|
||||
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
@@ -139,7 +139,7 @@
|
||||
<span class="title-text-text" :title="$t('productModel')">{{$t('productModel')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input
|
||||
<a-input
|
||||
:max-length="50"
|
||||
:disabled="disabled"
|
||||
:title='form.cpxh'
|
||||
@@ -153,7 +153,7 @@
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text-add">
|
||||
<div class="title-text-add">
|
||||
<span class="title-text-text" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span>
|
||||
<span class="title-text-text plus3" :title="$t('Vehicledynamictype')">{{$t('Vehicledynamictype')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" style="width: 38%">
|
||||
<a-select class="box-input" v-model="form.dllx1" :disabled="disabled" :placeholder="$t('PleaseSelect')" @change="changeSelect($event,target)">
|
||||
@@ -179,7 +179,7 @@
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text-add">
|
||||
<div>
|
||||
<div class="title-text-add plus">
|
||||
<span class="title-text-text " :title="$t('communicationTerminal')">{{$t('communicationTerminal')}}</span>
|
||||
</div>
|
||||
@@ -195,7 +195,7 @@
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text-add">
|
||||
<div>
|
||||
<div class="title-text-add plus">
|
||||
<span class="title-text-text" :title="$t('otaUpgradeManagementSystem')">{{$t('otaUpgradeManagementSystem')}}</span>
|
||||
</div>
|
||||
@@ -261,7 +261,7 @@ import { message } from 'ant-design-vue'
|
||||
otaId:'',
|
||||
rules:{
|
||||
djbh:[
|
||||
{
|
||||
{
|
||||
required: true,
|
||||
message:this.$t('registrationnumber')+this.$t('cannotEmpty'),
|
||||
trigger:'blur'
|
||||
@@ -280,7 +280,7 @@ import { message } from 'ant-design-vue'
|
||||
localStorage.removeItem('otaId')
|
||||
localStorage.removeItem('otaIdT')
|
||||
localStorage.setItem('otaIdT',value)
|
||||
|
||||
|
||||
this.getData()
|
||||
},
|
||||
// 模板下载
|
||||
@@ -344,8 +344,8 @@ import { message } from 'ant-design-vue'
|
||||
this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
next(){
|
||||
this.$refs.ruleForm.validate(valid=>{
|
||||
@@ -354,10 +354,10 @@ import { message } from 'ant-design-vue'
|
||||
setTimeout(()=>{
|
||||
this.$emit('basicInformationForm')
|
||||
},1000)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
save(){
|
||||
this.$refs.ruleForm.validate(valid=>{
|
||||
@@ -387,7 +387,7 @@ import { message } from 'ant-design-vue'
|
||||
}else{
|
||||
this. projectNameList2=['其他']
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
update(){
|
||||
this.$forceUpdate()
|
||||
@@ -406,7 +406,7 @@ import { message } from 'ant-design-vue'
|
||||
.box-title-text-add {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title-text-add {
|
||||
@@ -420,7 +420,7 @@ import { message } from 'ant-design-vue'
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
//line-height: 42px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ import { message } from 'ant-design-vue'
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
//line-height: 42px;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@@ -477,11 +477,14 @@ import { message } from 'ant-design-vue'
|
||||
}
|
||||
.plus{
|
||||
margin-top: 5px;
|
||||
line-height: 1.4 !important;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.plus2{
|
||||
width: 134px;
|
||||
margin-top: 5px;
|
||||
line-height: 1.4 !important;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.plus3{
|
||||
word-break: break-word;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user