master
wangning 7 years ago
parent 1e380cc65a
commit 759c752455

@ -3123,33 +3123,32 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (PartnerRole.getRole(account.getIntValue("role")) == PartnerRole.CASHIER) { if (PartnerRole.getRole(account.getIntValue("role")) == PartnerRole.CASHIER) {
result.put("is_ordinary", true); result.put("is_ordinary", true);
if (!expire && waring) { if (!expire && waring) {
String [] key = {result.getString("expire_days")}; String[] key = { result.getString("expire_days") };
result.put("contract_info",editContractOrdinaryWaring(key,config.getString("sys_contract_ordinary_waring"))); result.put("contract_info", editContractOrdinaryWaring(key, config.getString("sys_contract_ordinary_waring")));
} }
if (expire) { if (expire) {
result.put("contract_info",config.getString("sys_contract_ordinary_info")); result.put("contract_info", config.getString("sys_contract_ordinary_info"));
} }
return result; return result;
} } else {
if (!(PartnerRole.getRole(account.getIntValue("role")) == PartnerRole.CASHIER)) { result.put("contract_info", config.getString("sys_contract_info"));
result.put("is_ordinary", false); result.put("is_ordinary", false);
if (!expire && waring) { if (!expire && waring) {
String[] key = {result.getString("expire_days")}; String[] key = { result.getString("expire_days") };
result.put("contract_info", editContractOrdinaryWaring(key, config.getString("sys_contract_waring"))); result.put("contract_info", editContractOrdinaryWaring(key, config.getString("sys_contract_waring")));
} }
if (expire) { if (expire) {
result.put("contract_info", config.getString("sys_contract_info")); result.put("contract_info", config.getString("sys_contract_info"));
} }
JSONObject file = clientContractService.getOrGenerateSourceAgreement(account.getIntValue("client_id"));
result.put("file_url", file.getString("file_value"));
return result; return result;
} }
JSONObject file = clientContractService.getOrGenerateSourceAgreement(account.getIntValue("client_id"));
result.put("file_url", file.getString("file_value"));
result.put("contract_info", config.getString("sys_contract_info"));
return result;
} }
private String editContractOrdinaryWaring(String[] key, String sourceStr) { private String editContractOrdinaryWaring(String[] key, String sourceStr) {
if(StringUtils.isEmpty(sourceStr) || ArrayUtils.isEmpty(key)){ if (StringUtils.isEmpty(sourceStr) || ArrayUtils.isEmpty(key)) {
return ""; return "";
} }
for (int i = 0; i < key.length; i++) { for (int i = 0; i < key.length; i++) {

Loading…
Cancel
Save