|
|
|
@ -2141,7 +2141,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
file.put("last_update_by", manager.getString("display_name"));
|
|
|
|
|
}
|
|
|
|
|
JSONObject contract = clientsContractMapper.findByClientId(client.getIntValue("client_id"));
|
|
|
|
|
if (contract == null || now.compareTo(contract.getDate("expiry_date")) > 0 || existFile == null || existFile.isEmpty()) {
|
|
|
|
|
if (contract == null || now.compareTo(contract.getDate("expiry_date")) > 0 ||!contract.getBoolean("has_sign")|| existFile == null || existFile.isEmpty()) {
|
|
|
|
|
clientFilesMapper.save(file);
|
|
|
|
|
} else {
|
|
|
|
|
file.put("file_id", existFile.getString("file_id"));
|
|
|
|
@ -3239,13 +3239,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getCheckClientInfo(int client_id, String account_id) {
|
|
|
|
|
JSONObject result = clientContractService.getClientContractExpire(client_id);
|
|
|
|
|
public JSONObject getCheckClientInfo(int client_id, String account_id, String channel) {
|
|
|
|
|
JSONObject result = null;
|
|
|
|
|
JSONObject expireInfo = clientContractService.getClientContractExpire(client_id,channel);
|
|
|
|
|
JSONObject account = clientAccountMapper.findById(account_id);
|
|
|
|
|
if (PartnerRole.getRole(account.getIntValue("role")) == PartnerRole.CASHIER) {
|
|
|
|
|
result.put("alert", false);
|
|
|
|
|
return result;
|
|
|
|
|
} else {
|
|
|
|
|
if(result.getBoolean("alert")){
|
|
|
|
|
if(expireInfo.getBoolean("alert")){
|
|
|
|
|
result = new JSONObject();
|
|
|
|
|
result.put("content","Dear Valued Merchants,\n" +
|
|
|
|
|
"\n" +
|
|
|
|
|
"\n" +
|
|
|
|
|