|
|
|
@ -1865,7 +1865,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
ByteArrayOutputStream bos = pdu.templetPdfBos(file);
|
|
|
|
|
stream = new ByteArrayInputStream(bos.toByteArray());
|
|
|
|
|
JSONObject fileRes = attachmentClient.uploadFile(stream, clientMoniker + "_agreement.pdf", false);
|
|
|
|
|
importAgreeFile(clientMoniker, manager, fileRes.getString("url"));
|
|
|
|
|
importAgreeFile(clientMoniker, manager, fileRes.getString("url"),false);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("合同制作出现问题:", e);
|
|
|
|
|
} finally {
|
|
|
|
@ -1875,7 +1875,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional
|
|
|
|
|
public void getAggregateAgreeFile(String clientMoniker, JSONObject manager) throws Exception {
|
|
|
|
|
public void getAggregateAgreeFile(String clientMoniker, JSONObject manager,boolean renewal) throws Exception {
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
@ -1933,7 +1933,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
InputStream stream = new ByteArrayInputStream(bos.toByteArray());
|
|
|
|
|
JSONObject fileRes = attachmentClient.uploadFile(stream, clientMoniker + "_" + System.currentTimeMillis() + "_agreement.pdf", false);
|
|
|
|
|
if (fileRes != null) {
|
|
|
|
|
importAgreeFile(clientMoniker, manager, fileRes.getString("url"));
|
|
|
|
|
importAgreeFile(clientMoniker, manager, fileRes.getString("url"),renewal);
|
|
|
|
|
}
|
|
|
|
|
stream.close();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
@ -2019,7 +2019,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional
|
|
|
|
|
public void importAgreeFile(String clientMoniker, JSONObject manager, String sourceFile) {
|
|
|
|
|
public void importAgreeFile(String clientMoniker, JSONObject manager, String sourceFile,boolean renewal) {
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
@ -2048,8 +2048,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
file.put("file_id", existFile.getString("file_id"));
|
|
|
|
|
clientFilesMapper.update(file);
|
|
|
|
|
}
|
|
|
|
|
client.put("open_status", 2);
|
|
|
|
|
clientMapper.update(client);
|
|
|
|
|
if(!renewal) {
|
|
|
|
|
client.put("open_status", 2);
|
|
|
|
|
clientMapper.update(client);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (manager != null) {
|
|
|
|
|
saveClientAuditProcess(client.getIntValue("client_id"), 1, 2, "Compliance合同制作中", manager);
|
|
|
|
|