|
|
@ -125,21 +125,23 @@ public class ClientContractServiceImpl implements ClientContractService {
|
|
|
|
if (sysconfig != null && !sysconfig.getBoolean("sys_new_contract_on")) {
|
|
|
|
if (sysconfig != null && !sysconfig.getBoolean("sys_new_contract_on")) {
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
JSONObject contract = clientsContractMapper.findByClientId(client_id);
|
|
|
|
List<JSONObject> files = clientFilesMapper.findFileByClientAndType(client_id, "source_agree_file");
|
|
|
|
List<JSONObject> files = clientFilesMapper.findFileByClientAndType(client_id, "source_agree_file");
|
|
|
|
if (!CollectionUtils.isEmpty(files)) {
|
|
|
|
if (!CollectionUtils.isEmpty(files)) {
|
|
|
|
JSONObject file = files.get(0);
|
|
|
|
JSONObject file = files.get(0);
|
|
|
|
if (sysconfig.getDate("sys_new_contract_time").compareTo(file.getDate("last_update_date")) > 0) {
|
|
|
|
if (sysconfig.getDate("sys_new_contract_time").compareTo(file.getDate("last_update_date")) > 0) {
|
|
|
|
JSONObject contract = clientsContractMapper.findByClientId(client_id);
|
|
|
|
|
|
|
|
if (contract == null) {
|
|
|
|
if (contract == null) {
|
|
|
|
saveContract(client_id, new Date(), channel);
|
|
|
|
saveContract(client_id, new Date(), channel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
JSONObject contract = clientsContractMapper.findByClientId(client_id);
|
|
|
|
|
|
|
|
if (contract == null) {
|
|
|
|
if (contract == null) {
|
|
|
|
saveContract(client_id, new Date(), channel);
|
|
|
|
saveContract(client_id, new Date(), channel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (contract != null && contract.getBoolean("has_sign")) {
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (client.getBooleanValue("tax_in_surcharge")) {
|
|
|
|
if (client.getBooleanValue("tax_in_surcharge")) {
|
|
|
|
result.put("alert", true);
|
|
|
|
result.put("alert", true);
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|