|
|
@@ -507,6 +507,7 @@ public class EquipmentResourceLibrary extends Controller {
|
|
|
public String sendMail() throws Exception {
|
|
|
Long sat_sharematerialid = content.getLongValue("sat_sharematerialid");
|
|
|
String email = content.getStringValue("email");
|
|
|
+ JSONArray attachmentids = content.getJSONArray("attachmentids");
|
|
|
|
|
|
if (!Parameter.get(siteid, "remind_mail").equalsIgnoreCase("1")) {
|
|
|
return getErrReturnObject().setErrMsg("邮件功能未开启").toString();
|
|
|
@@ -516,8 +517,8 @@ public class EquipmentResourceLibrary extends Controller {
|
|
|
if (rows.isEmpty()) {
|
|
|
return getErrReturnObject().setErrMsg("数据不存在").toString();
|
|
|
}
|
|
|
-
|
|
|
- Rows rowsAtt = Attachment.get(this, "sat_sharematerial", sat_sharematerialid);
|
|
|
+ //Rows rowsAtt = Attachment.get(this, "sat_sharematerial", sat_sharematerialid);
|
|
|
+ Rows rowsAtt = Attachment.get(this,attachmentids.toArray(new Long[]{}));
|
|
|
|
|
|
EmailContent emailContent = new EmailContent();
|
|
|
emailContent.addText(rows.get(0).getString("content"));
|