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