|
@@ -39,6 +39,7 @@ public class MaterialUploadTaskServiceImpl extends ServiceImpl<MaterialUploadTas
|
|
|
|
|
|
@Override
|
|
|
public JSONObject submitTask(JSONObject json) {
|
|
|
+ System.err.println(json);
|
|
|
JSONObject returnJson = new JSONObject();
|
|
|
try {
|
|
|
if (Check.isNull(json)) {
|
|
@@ -64,6 +65,12 @@ public class MaterialUploadTaskServiceImpl extends ServiceImpl<MaterialUploadTas
|
|
|
if (Check.isNull(userName)) {
|
|
|
throw new Exception("请传入登录人姓名");
|
|
|
}
|
|
|
+ Integer isMultiagent = json.getInteger("isMultiagent");
|
|
|
+ if (Check.isNull(isMultiagent)) {
|
|
|
+ throw new Exception("请传入主体信息");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
Map<String, JSONObject> useMap = new HashMap<>();
|
|
|
List<MaterialUploadTask> tasksList = new ArrayList<>();
|
|
|
Integer shieldBackwardSwitch = null;
|
|
@@ -86,11 +93,20 @@ public class MaterialUploadTaskServiceImpl extends ServiceImpl<MaterialUploadTas
|
|
|
}
|
|
|
userId = accountJson.getLong("userId");
|
|
|
accountId = accountJson.getLong("accountId");
|
|
|
- Integer count = materialUploadTaskMapper.getCountByUserIdAndMd5(userId, signature);
|
|
|
- if (count > 0) {
|
|
|
- getUseMap(useMap, userId, materialName, signature);
|
|
|
- continue;
|
|
|
+ if (isMultiagent == 1) {
|
|
|
+ Integer count = materialUploadTaskMapper.getCountByUserIdAndMd5(userId, signature);
|
|
|
+ if (count > 0) {
|
|
|
+ getUseMap(useMap, userId, materialName, signature);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ } else if (isMultiagent == 2) {
|
|
|
+ Integer count = materialUploadTaskMapper.getCountByaccountIdAndMd5(userId, accountId, signature);
|
|
|
+ if (count > 0) {
|
|
|
+ getUseMap(useMap, userId, materialName, signature);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
shieldBackwardSwitch = json.getInteger("shieldBackwardSwitch");
|
|
|
} else if (mediaId == 1 || mediaId == 3) {
|
|
|
accountId = accountArray.getLong(i);
|