kongzy
2023-11-28 59d9ea33f503e363f2e2941c7c00cc9dd9d9d1c7
src/main/java/com/nanometer/smartlab/email/EmailSendSchedule.java
@@ -138,7 +138,7 @@
            content.append("</body></html>");
            try {
                EmailSend.sendArrivalEmail(revicerList,content.toString());
                EmailSend.sendArrivalEmail(revicerList,content.toString(),"-待补货试剂");
                //  发送成功,更新邮件发送状态为:已发送
            } catch (BusinessException e) {
                //  发送失败,更新邮件发送状态为:发送失败
@@ -165,6 +165,7 @@
    * @date 2021/8/19 9:06
    */
    @Scheduled(cron = "0 0 2 * * ?")
//    @Scheduled(cron = "0/5 * * * * ?") //每隔5秒执行一次
    public void ReagentPriceSend(){
        //0.限制在姑苏实验室
        if (StringUtils.isBlank(reagentApi) || reagentApi.length() == 0) return;
@@ -204,8 +205,8 @@
                BigDecimal goodsCostPrice = goodJson.getBigDecimal("goodsCostPrice");
                BigDecimal price = reagent.getPrice();
                //保留两位
                BigDecimal price_afterDiscount = SALE_85.multiply(price).setScale(2, RoundingMode.HALF_UP);
                if (price_afterDiscount.compareTo(goodsCostPrice) != 0) {
                BigDecimal price_afterDiscount = SALE_85.multiply(goodsCostPrice).setScale(2, RoundingMode.HALF_UP);
                if (price_afterDiscount.compareTo(price) > 0) {
                    sendDataList.add(new JSONObject() {{
                        put("goodsName", goodsName);
                        put("goodsCostPrice", goodsCostPrice);
@@ -241,7 +242,7 @@
                //发送邮件
                EmailSend.sendArrivalEmail(Collections.singletonList(admin.getEmail()),content.toString());
                EmailSend.sendArrivalEmail(Collections.singletonList(admin.getEmail()),content.toString(),"-国药试剂价格变动");
                    //  发送成功,更新邮件发送状态为:已发送
        } catch (BusinessException e) {