|
@@ -1,14 +1,40 @@
|
|
|
package cn.com.ctop.common.module.service.impl;
|
|
|
|
|
|
import cn.com.ctop.common.module.constant.CosConstant;
|
|
|
-import cn.com.ctop.common.module.entity.*;
|
|
|
-import cn.com.ctop.common.module.enums.MaterialSupplierEnum;
|
|
|
+import cn.com.ctop.common.module.entity.MaterialAscription;
|
|
|
+import cn.com.ctop.common.module.entity.MaterialCutFrame;
|
|
|
+import cn.com.ctop.common.module.entity.MaterialImageInfo;
|
|
|
+import cn.com.ctop.common.module.entity.MaterialInfo;
|
|
|
+import cn.com.ctop.common.module.entity.MaterialParameter;
|
|
|
+import cn.com.ctop.common.module.entity.MaterialTag;
|
|
|
+import cn.com.ctop.common.module.entity.MaterialTagInfo;
|
|
|
+import cn.com.ctop.common.module.entity.Project;
|
|
|
+import cn.com.ctop.common.module.entity.SupplierWatermark;
|
|
|
+import cn.com.ctop.common.module.entity.TagInfo;
|
|
|
+import cn.com.ctop.common.module.entity.TencentWatermarkTemplate;
|
|
|
+import cn.com.ctop.common.module.entity.VideoWatermarkTask;
|
|
|
import cn.com.ctop.common.module.mapper.MaterialAscriptionMapper;
|
|
|
import cn.com.ctop.common.module.mapper.MaterialInfoMapper;
|
|
|
import cn.com.ctop.common.module.mapper.MaterialParameterMapper;
|
|
|
import cn.com.ctop.common.module.mapper.MaterialTagMapper;
|
|
|
-import cn.com.ctop.common.module.service.*;
|
|
|
-import cn.com.ctop.common.module.utils.*;
|
|
|
+import cn.com.ctop.common.module.service.IMaterialCutFrameService;
|
|
|
+import cn.com.ctop.common.module.service.IMaterialImageInfoService;
|
|
|
+import cn.com.ctop.common.module.service.IMaterialInfoService;
|
|
|
+import cn.com.ctop.common.module.service.IMaterialTagInfoService;
|
|
|
+import cn.com.ctop.common.module.service.IProjectService;
|
|
|
+import cn.com.ctop.common.module.service.ISupplierWatermarkService;
|
|
|
+import cn.com.ctop.common.module.service.ISysUserService;
|
|
|
+import cn.com.ctop.common.module.service.ITagInfoService;
|
|
|
+import cn.com.ctop.common.module.service.ITencentWatermarkTemplateService;
|
|
|
+import cn.com.ctop.common.module.service.IVideoWatermarkTaskService;
|
|
|
+import cn.com.ctop.common.module.utils.Check;
|
|
|
+import cn.com.ctop.common.module.utils.CloudVideoProcessUtil;
|
|
|
+import cn.com.ctop.common.module.utils.CosUtils;
|
|
|
+import cn.com.ctop.common.module.utils.LoadFileUtil;
|
|
|
+import cn.com.ctop.common.module.utils.PropertiesUtils;
|
|
|
+import cn.com.ctop.common.module.utils.ResultMapUtils;
|
|
|
+import cn.com.ctop.common.module.utils.StatusCode;
|
|
|
+import cn.com.ctop.common.module.utils.StringUtils;
|
|
|
import cn.com.ctop.common.module.vo.ResFileDTO;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -38,7 +64,12 @@ import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.net.URLDecoder;
|
|
|
import java.nio.channels.FileChannel;
|
|
|
-import java.util.*;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.UUID;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
|
|
|
@@ -580,15 +611,15 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
|
if (null != clipId && !"".equals(clipId.trim())) {
|
|
|
materialAscription.setClipId(clipId);
|
|
|
}
|
|
|
- String shotId = ascription.getString("shotId");
|
|
|
- if(!Check.isNull(shotId)){
|
|
|
+ String shotId = ascription.getString("shotId");
|
|
|
+ if (!Check.isNull(shotId)) {
|
|
|
materialAscription.setShotId(shotId);
|
|
|
SysUser shot = userService.getById(shotId);
|
|
|
String shotCode = userService.getRoleCodeByUserId(shotId);
|
|
|
- if("designTeamLeader".equals(shotCode)){
|
|
|
+ if ("designTeamLeader".equals(shotCode)) {
|
|
|
materialAscription.setShotLeaderId(shotId);
|
|
|
materialAscription.setShotLeaderName(shot.getRealname());
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
materialAscription.setShotLeaderId(shot.getLeaderId());
|
|
|
materialAscription.setShotLeaderName(shot.getLeaderName());
|
|
|
}
|
|
@@ -766,15 +797,15 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
|
materialAscription.setClipId(clipId);
|
|
|
}
|
|
|
|
|
|
- String shotId = ascription.getString("shotId");
|
|
|
- if(!Check.isNull(shotId)){
|
|
|
+ String shotId = ascription.getString("shotId");
|
|
|
+ if (!Check.isNull(shotId)) {
|
|
|
materialAscription.setShotId(shotId);
|
|
|
SysUser shot = userService.getById(shotId);
|
|
|
String shotCode = userService.getRoleCodeByUserId(shotId);
|
|
|
- if("designTeamLeader".equals(shotCode)){
|
|
|
+ if ("designTeamLeader".equals(shotCode)) {
|
|
|
materialAscription.setShotLeaderId(shotId);
|
|
|
materialAscription.setShotLeaderName(shot.getRealname());
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
materialAscription.setShotLeaderId(shot.getLeaderId());
|
|
|
materialAscription.setShotLeaderName(shot.getLeaderName());
|
|
|
}
|
|
@@ -1036,24 +1067,28 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
|
setList.add(materialInfo);
|
|
|
}
|
|
|
}
|
|
|
- List<JSONObject> kuaiShouCostList = materialParameterMapper.getKuaiShouVideoCostList(md5List);
|
|
|
- List<JSONObject> bytedanceCostList = materialParameterMapper.getBytedanceVideoCostList(md5List);
|
|
|
-
|
|
|
- Map<String,BigDecimal> kuaishouMap = new HashMap<>();
|
|
|
+ List<JSONObject> kuaiShouCostList = null;
|
|
|
+ List<JSONObject> bytedanceCostList = null;
|
|
|
+ if (!Check.isNull(md5List)) {
|
|
|
+ kuaiShouCostList = materialParameterMapper.getKuaiShouVideoCostList(md5List);
|
|
|
+ bytedanceCostList = materialParameterMapper.getBytedanceVideoCostList(md5List);
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, BigDecimal> kuaishouMap = new HashMap<>();
|
|
|
for (int i = 0; i < kuaiShouCostList.size(); i++) {
|
|
|
JSONObject jsonObject = kuaiShouCostList.get(i);
|
|
|
- kuaishouMap.put(jsonObject.getString("signature"),jsonObject.getBigDecimal("charges"));
|
|
|
+ kuaishouMap.put(jsonObject.getString("signature"), jsonObject.getBigDecimal("charges"));
|
|
|
}
|
|
|
|
|
|
- Map<String,BigDecimal> bytedanceMap = new HashMap<>();
|
|
|
+ Map<String, BigDecimal> bytedanceMap = new HashMap<>();
|
|
|
for (int i = 0; i < bytedanceCostList.size(); i++) {
|
|
|
JSONObject jsonObject = bytedanceCostList.get(i);
|
|
|
- bytedanceMap.put(jsonObject.getString("signature"),jsonObject.getBigDecimal("charges"));
|
|
|
+ bytedanceMap.put(jsonObject.getString("signature"), jsonObject.getBigDecimal("charges"));
|
|
|
}
|
|
|
|
|
|
- for (int i = 0; i <setList.size() ; i++) {
|
|
|
+ for (int i = 0; i < setList.size(); i++) {
|
|
|
MaterialInfo materialInfo = setList.get(i);
|
|
|
- if(!Check.isNullMap(kuaishouMap)){
|
|
|
+ if (!Check.isNullMap(kuaishouMap)) {
|
|
|
if (!Check.isNull(kuaishouMap.get(materialInfo.getCode()))) {
|
|
|
materialInfo.setCost(kuaishouMap.get(materialInfo.getCode()));
|
|
|
} else {
|
|
@@ -1061,7 +1096,7 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(!Check.isNullMap(bytedanceMap)){
|
|
|
+ if (!Check.isNullMap(bytedanceMap)) {
|
|
|
if (!Check.isNull(bytedanceMap.get(materialInfo.getCode()))) {
|
|
|
materialInfo.setBytedanceCost(bytedanceMap.get(materialInfo.getCode()));
|
|
|
} else {
|