|
|
@@ -87,8 +87,8 @@ public class VendorServiceImpl implements VendorService{
|
|
|
if(null == record || Status.NOT_UPLOAD.value() == record.getStatus()) {
|
|
|
record = info.covert();
|
|
|
//发送邮件前先进行判断,每天每个供应商只发送一封邮件(判断在erp已经做了,这边暂时不判断)
|
|
|
- List<ErpInviteRecord> inviteRecords = getRecord(record.getVendname());
|
|
|
- if(inviteRecords.size() == 0) {
|
|
|
+ List<ErpInviteRecord> inviteRecords = getRecord(record.getVendname().trim());
|
|
|
+ if(CollectionUtils.isEmpty(inviteRecords)) {
|
|
|
// 发送邮件或短信成功才进行保存
|
|
|
if(record.getVenduseremail() != null && record.getVenduseremail().contains("@") && !record.getVenduseremail().matches(CHINESE_REGEXP)) {
|
|
|
Map<String, Object> model = new HashMap<String, Object>();
|
|
|
@@ -164,7 +164,7 @@ public class VendorServiceImpl implements VendorService{
|
|
|
private List<ErpInviteRecord> getRecord(String name) {
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
// 判断是否是当天的单据
|
|
|
- String sql = "select * from invitation_tplrecord where ve_name = '" + name +"' and substr(ve_date, 1, 10) = '"
|
|
|
+ String sql = "select * from invitation_tplrecord where ve_name = '" + name + "' and substr(ve_date, 1, 10) = '"
|
|
|
+ simpleDateFormat.format(new Date()) + "'";
|
|
|
List<ErpInviteRecord> records = commonDao.query(sql, ErpInviteRecord.class);
|
|
|
return records;
|