|
|
|
@ -98,10 +98,10 @@ public class ClientContractServiceImpl implements ClientContractService {
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new NotFoundException("merchant not found");
|
|
|
|
|
}
|
|
|
|
|
JSONObject rateExpire = getClientContractExpire(client_id);
|
|
|
|
|
boolean expire = rateExpire.getBoolean("rate_expire");
|
|
|
|
|
boolean waring = rateExpire.getBoolean("rate_waring");
|
|
|
|
|
boolean old_contract = rateExpire.getBoolean("old_contract");
|
|
|
|
|
// JSONObject rateExpire = getClientContractExpire(client_id);
|
|
|
|
|
// boolean expire = rateExpire.getBoolean("rate_expire");
|
|
|
|
|
// boolean waring = rateExpire.getBoolean("rate_waring");
|
|
|
|
|
// boolean old_contract = rateExpire.getBoolean("old_contract");
|
|
|
|
|
JSONObject contract = clientsContractMapper.findByClientId(client_id);
|
|
|
|
|
if (contract == null) {
|
|
|
|
|
throw new BadRequestException("generate contract first");
|
|
|
|
@ -130,6 +130,8 @@ public class ClientContractServiceImpl implements ClientContractService {
|
|
|
|
|
clientRateMapper.saveRate(p);
|
|
|
|
|
});
|
|
|
|
|
clientManager.setClientTaxInSurcharge(client.getString("client_moniker"), false);
|
|
|
|
|
clientManager.setSkipContract(client.getString("client_moniker"), true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -155,6 +157,9 @@ public class ClientContractServiceImpl implements ClientContractService {
|
|
|
|
|
if (sysconfig != null && !sysconfig.getBoolean("sys_new_contract_on")) {
|
|
|
|
|
return defaultResult;
|
|
|
|
|
}
|
|
|
|
|
if(client.getBooleanValue("skip_contract")){
|
|
|
|
|
return defaultResult;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<JSONObject> rateInfo = clientRateMapper.minExpiryTime(client_id, null);
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|