|
|
@ -1618,7 +1618,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// depositoryManagerByQyWx.append(depositoryManager.getWorkwechat()+",");
|
|
|
// depositoryManagerByQyWx.append(depositoryManager.getWorkwechat()+",");
|
|
|
} |
|
|
} |
|
|
depositoryManagerByQyWx.append("PangFuZhen,"); |
|
|
depositoryManagerByQyWx.append("PangFuZhen,"); |
|
|
// JSONObject jsonObject = qyWxOperationService.sendCcMessageToUsers(depositoryManagerByQyWx.toString(), record.getId(), userAgent);
|
|
|
JSONObject jsonObject = qyWxOperationService.sendCcMessageToUsers(depositoryManagerByQyWx.toString(), record.getId(), userAgent); |
|
|
|
|
|
|
|
|
// 删除redis中本订单
|
|
|
// 删除redis中本订单
|
|
|
redisTemplate.delete("record:" + record.getId()); |
|
|
redisTemplate.delete("record:" + record.getId()); |
|
|
@ -1742,15 +1742,15 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 添加子订单到redis中
|
|
|
// 添加子订单到redis中
|
|
|
redisTemplate.opsForHash().putAll(minRecordKey, minRecord); |
|
|
redisTemplate.opsForHash().putAll(minRecordKey, minRecord); |
|
|
// 开启线程向仓库管理员发送消息
|
|
|
// 开启线程向仓库管理员发送消息
|
|
|
/*new Thread(new Runnable() { |
|
|
new Thread(new Runnable() { |
|
|
@Override |
|
|
@Override |
|
|
public void run() { |
|
|
public void run() { |
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(),userAgent); |
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(),userAgent); |
|
|
} |
|
|
} |
|
|
}).start();*/ |
|
|
}).start(); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
/*for (int i = 0; i < depositoryIdList.size(); i++) { |
|
|
for (int i = 0; i < depositoryIdList.size(); i++) { |
|
|
Object o = minIdByDepository.get("depository" + depositoryIdList.get(i)); |
|
|
Object o = minIdByDepository.get("depository" + depositoryIdList.get(i)); |
|
|
if (o != null) { |
|
|
if (o != null) { |
|
|
List<Integer> minIdList = (List<Integer>) o; |
|
|
List<Integer> minIdList = (List<Integer>) o; |
|
|
@ -1777,7 +1777,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
} else { |
|
|
} else { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
}*/ |
|
|
} |
|
|
|
|
|
|
|
|
// 将主订单插入到redis中
|
|
|
// 将主订单插入到redis中
|
|
|
redisTemplate.opsForHash().put("record:" + recordP.getId(), "minRecord", minRecordByMain.toString()); |
|
|
redisTemplate.opsForHash().put("record:" + recordP.getId(), "minRecord", minRecordByMain.toString()); |
|
|
@ -1967,7 +1967,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
QyWxUid.append("PangFuZhen,"); |
|
|
QyWxUid.append("PangFuZhen,"); |
|
|
map.put("depositoryManager", depositoryManager.toString()); |
|
|
map.put("depositoryManager", depositoryManager.toString()); |
|
|
// 向仓储中心负责人发送新的消息
|
|
|
// 向仓储中心负责人发送新的消息
|
|
|
/*new Thread(new Runnable() { |
|
|
new Thread(new Runnable() { |
|
|
@Override |
|
|
@Override |
|
|
public void run() { |
|
|
public void run() { |
|
|
JSONObject jsonObject = qyWxOperationService.sendQyWxToApplicationOutMessage(QyWxUid.toString(), ObjectFormatUtil.toInteger(id), false, userAgent); |
|
|
JSONObject jsonObject = qyWxOperationService.sendQyWxToApplicationOutMessage(QyWxUid.toString(), ObjectFormatUtil.toInteger(id), false, userAgent); |
|
|
@ -1981,7 +1981,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// 设置过期时间为三天
|
|
|
// 设置过期时间为三天
|
|
|
redisTemplate.expire("user:" + userToken.getNumber() + ":QyWxOutId:" + id, 72, TimeUnit.HOURS); |
|
|
redisTemplate.expire("user:" + userToken.getNumber() + ":QyWxOutId:" + id, 72, TimeUnit.HOURS); |
|
|
} |
|
|
} |
|
|
}).start();*/ |
|
|
}).start(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
@ -1994,7 +1994,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
|
|
|
|
|
|
// 开启线程更改其他用户卡片模板样式
|
|
|
// 开启线程更改其他用户卡片模板样式
|
|
|
String finalResult = result; |
|
|
String finalResult = result; |
|
|
/*new Thread(new Runnable() { |
|
|
new Thread(new Runnable() { |
|
|
@Override |
|
|
@Override |
|
|
public void run() { |
|
|
public void run() { |
|
|
// 获取responseCode(key为申请人number)
|
|
|
// 获取responseCode(key为申请人number)
|
|
|
@ -2025,7 +2025,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
s = "PangFuZhen,"; |
|
|
s = "PangFuZhen,"; |
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toInteger(id), s, userAgent, 1); |
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toInteger(id), s, userAgent, 1); |
|
|
} |
|
|
} |
|
|
}).start();*/ |
|
|
}).start(); |
|
|
} else { |
|
|
} else { |
|
|
String result = ""; |
|
|
String result = ""; |
|
|
// 开启线程更改其他用户卡片模板样式
|
|
|
// 开启线程更改其他用户卡片模板样式
|
|
|
@ -2112,16 +2112,16 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
redisTemplate.opsForHash().putAll(minRecordKey, minRecord); |
|
|
redisTemplate.opsForHash().putAll(minRecordKey, minRecord); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*// 开启线程向仓库管理员发送消息
|
|
|
// 开启线程向仓库管理员发送消息
|
|
|
new Thread(new Runnable() { |
|
|
new Thread(new Runnable() { |
|
|
@Override |
|
|
@Override |
|
|
public void run() { |
|
|
public void run() { |
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(), userAgent); |
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(), userAgent); |
|
|
} |
|
|
} |
|
|
}).start();*/ |
|
|
}).start(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* for (int i = 0; i < depositoryIdList.size(); i++) { |
|
|
for (int i = 0; i < depositoryIdList.size(); i++) { |
|
|
Object o = minIdByDepository.get("depository" + depositoryIdList.get(i)); |
|
|
Object o = minIdByDepository.get("depository" + depositoryIdList.get(i)); |
|
|
if (o != null) { |
|
|
if (o != null) { |
|
|
List<Integer> minIdList = (List<Integer>) o; |
|
|
List<Integer> minIdList = (List<Integer>) o; |
|
|
@ -2169,7 +2169,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
s = "PangFuZhen,"; |
|
|
s = "PangFuZhen,"; |
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toInteger(id), s, userAgent, 1); |
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toInteger(id), s, userAgent, 1); |
|
|
} |
|
|
} |
|
|
}).start();*/ |
|
|
}).start(); |
|
|
|
|
|
|
|
|
// 将主订单插入到redis中
|
|
|
// 将主订单插入到redis中
|
|
|
redisTemplate.opsForHash().put("record:" + record.getId(), "minRecord", minRecordByMain.toString()); |
|
|
redisTemplate.opsForHash().put("record:" + record.getId(), "minRecord", minRecordByMain.toString()); |
|
|
@ -2182,7 +2182,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
} |
|
|
} |
|
|
// 开启线程更改其他用户卡片模板样式
|
|
|
// 开启线程更改其他用户卡片模板样式
|
|
|
String finalResult = result; |
|
|
String finalResult = result; |
|
|
/*new Thread(new Runnable() { |
|
|
new Thread(new Runnable() { |
|
|
@Override |
|
|
@Override |
|
|
public void run() { |
|
|
public void run() { |
|
|
// 获取responseCode(key为申请人number)
|
|
|
// 获取responseCode(key为申请人number)
|
|
|
@ -2192,7 +2192,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
String responseCode = (String) redisTemplate.opsForHash().get(key, "responseCode"); |
|
|
String responseCode = (String) redisTemplate.opsForHash().get(key, "responseCode"); |
|
|
qyWxOperationService.updateTemplateCard(responseCode, userToken.getName(), finalResult, userAgent); |
|
|
qyWxOperationService.updateTemplateCard(responseCode, userToken.getName(), finalResult, userAgent); |
|
|
} |
|
|
} |
|
|
}).start();*/ |
|
|
}).start(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2251,7 +2251,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
} |
|
|
} |
|
|
QyWxUid.append("PangFuZhen" + ","); |
|
|
QyWxUid.append("PangFuZhen" + ","); |
|
|
map.put("depositoryManager", depositoryManager.toString()); |
|
|
map.put("depositoryManager", depositoryManager.toString()); |
|
|
/*// 向仓储中心负责人发送新的消息
|
|
|
// 向仓储中心负责人发送新的消息
|
|
|
JSONObject jsonObject = qyWxOperationService.sendQyWxToApplicationOutMessage(QyWxUid.toString(), ObjectFormatUtil.toInteger(outId), false, userAgent); |
|
|
JSONObject jsonObject = qyWxOperationService.sendQyWxToApplicationOutMessage(QyWxUid.toString(), ObjectFormatUtil.toInteger(outId), false, userAgent); |
|
|
// 将当前返回结果保存到redis中
|
|
|
// 将当前返回结果保存到redis中
|
|
|
Map<String, Object> QyWxMessageMap = new HashMap<>(); |
|
|
Map<String, Object> QyWxMessageMap = new HashMap<>(); |
|
|
@ -2260,7 +2260,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
// key user:300450:QyWxOut:1
|
|
|
// key user:300450:QyWxOut:1
|
|
|
redisTemplate.opsForHash().putAll("user:" + userByPort.getNumber() + ":QyWxOutId:" + outId, QyWxMessageMap); |
|
|
redisTemplate.opsForHash().putAll("user:" + userByPort.getNumber() + ":QyWxOutId:" + outId, QyWxMessageMap); |
|
|
// 设置过期时间为三天
|
|
|
// 设置过期时间为三天
|
|
|
redisTemplate.expire("user:" + userByPort.getNumber() + ":QyWxOutId:" + outId, 72, TimeUnit.HOURS);*/ |
|
|
redisTemplate.expire("user:" + userByPort.getNumber() + ":QyWxOutId:" + outId, 72, TimeUnit.HOURS); |
|
|
} else { |
|
|
} else { |
|
|
updateInventoryForOutRefused(recordP); |
|
|
updateInventoryForOutRefused(recordP); |
|
|
// 如果点击的是驳回
|
|
|
// 如果点击的是驳回
|
|
|
@ -2346,16 +2346,16 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
minRecord.put("manager", minRecordManage.toString()); |
|
|
minRecord.put("manager", minRecordManage.toString()); |
|
|
// 添加子订单到redis中
|
|
|
// 添加子订单到redis中
|
|
|
redisTemplate.opsForHash().putAll(minRecordKey, minRecord); |
|
|
redisTemplate.opsForHash().putAll(minRecordKey, minRecord); |
|
|
/*// 开启线程向仓库管理员发送消息
|
|
|
// 开启线程向仓库管理员发送消息
|
|
|
new Thread(new Runnable() { |
|
|
new Thread(new Runnable() { |
|
|
@Override |
|
|
@Override |
|
|
public void run() { |
|
|
public void run() { |
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(), userAgent); |
|
|
JSONObject jsonObject = qyWxOperationService.sendNotificationToDepositoryManager(QyWxUid.toString(), applicationOutRecordMin.getId(), userAgent); |
|
|
} |
|
|
} |
|
|
}).start();*/ |
|
|
}).start(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/*for (int i = 0; i < depositoryIdList.size(); i++) { |
|
|
for (int i = 0; i < depositoryIdList.size(); i++) { |
|
|
Object o = minIdByDepository.get("depository" + depositoryIdList.get(i)); |
|
|
Object o = minIdByDepository.get("depository" + depositoryIdList.get(i)); |
|
|
if (o != null) { |
|
|
if (o != null) { |
|
|
List<Integer> minIdList = (List<Integer>) o; |
|
|
List<Integer> minIdList = (List<Integer>) o; |
|
|
@ -2382,7 +2382,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { |
|
|
} else { |
|
|
} else { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
}*/ |
|
|
} |
|
|
// 将主订单插入到redis中
|
|
|
// 将主订单插入到redis中
|
|
|
redisTemplate.opsForHash().put("record:" + recordP.getId(), "minRecord", minRecordByMain.toString()); |
|
|
redisTemplate.opsForHash().put("record:" + recordP.getId(), "minRecord", minRecordByMain.toString()); |
|
|
map.put("state", "仓储中心负责人审核通过"); |
|
|
map.put("state", "仓储中心负责人审核通过"); |
|
|
|