update contract Abnormal process

master
wangning 7 years ago
parent 481fa42eb5
commit 68c896aae2

@ -245,6 +245,8 @@ public interface ClientManager {
void setSkipClearing(String clientMoniker, Boolean skip_clearing);
void setSkipContract(String clientMoniker, Boolean skip_contract);
void enableGatewayUpgrade(String clientMoniker, boolean gatewayUpgrade);
void setCustomerSurchargeRate(String clientMoniker, BigDecimal customer_surcharge_rate);

@ -2839,6 +2839,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientInfoCacheSupport.clearClientCache(clientId);
}
@Override
public void setSkipContract(String clientMoniker, Boolean skip_contract) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject update = new JSONObject();
int clientId = client.getIntValue("client_id");
update.put("client_id", clientId);
update.put("skip_contract", skip_contract);
clientMapper.update(update);
clientInfoCacheSupport.clearClientCache(clientId);
}
@Override
public void enableGatewayUpgrade(String clientMoniker, boolean gatewayUpgrade) {
JSONObject client = getClientInfoByMoniker(clientMoniker);

@ -533,4 +533,10 @@ public class PartnerManageController {
public void confirmSourceAgreeFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientContractService.confirmSourceAgreement(account.getIntValue("client_id"),account.getString("account_id"),"PC");
}
@ManagerMapping(value = "/{clientMoniker}/skip_contract", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF})
public void skipContract(@PathVariable String clientMoniker, @RequestBody JSONObject skip_clearing) {
clientManager.setSkipClearing(clientMoniker, skip_clearing.getBooleanValue("skip_contract"));
}
}

@ -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();

@ -1,6 +1,6 @@
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.schema-name=royalpay_production
spring.datasource.host=192.168.99.100:3306
spring.datasource.host=192.168.0.49:3306
spring.datasource.url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
spring.datasource.username=root
spring.datasource.password=root

@ -151,7 +151,7 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
});
};
//$scope.getAgStatus();
$scope.getAgStatus();
$scope.refundNotice = {counts: 0};
$scope.openRefundNotice = false;
$scope.showRefundNotice = function () {

Loading…
Cancel
Save