61747a14819075bf6da2c1597b6c22e22e026686..871d4095b07cedacb7fbef4c38d64982f539c404
2024-05-09 fei.wang
测试提交
871d40 对比 | 目录
2024-04-15 fei.wang
1111
cef5f7 对比 | 目录
已修改10个文件
185 ■■■■ 文件已修改
src/main/java/com/flow/controller/BangZhuController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/flow/controller/DuanxinlogController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/flow/controller/ZongInvoicesController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/flow/controller/orderController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/flow/service/BangZhuService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/flow/service/impl/BangZhuServiceImpl.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/flow/service/impl/ZongInvoiceServiceImpl.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/flow/service/zongInvoicesService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/webapp/page/Fuwuqi.jsp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/webapp/page/Gongs.jsp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/flow/controller/BangZhuController.java
@@ -15,6 +15,8 @@
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -32,7 +34,7 @@
    }
    @PostMapping({"addBangZhu"})
    public void addBang(Bangzhu bangzhu, HttpServletResponse response) throws IOException {
    public void addBang(Bangzhu bangzhu, HttpServletResponse response) throws IOException, TencentCloudSDKException {
        Date date = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        bangzhu.setFkdata(formatter.format(date));
src/main/java/com/flow/controller/DuanxinlogController.java
@@ -94,7 +94,7 @@
            queryWrapper3.eq("none", "0");
            queryWrapper3.eq("companyName", fuwuqiList.get(i).getCompany());
            Company companyList = (companyMapper).selectOne(queryWrapper3);
            SimpleDateFormat date2 = new SimpleDateFormat("yyyy-MM-dd");
            SimpleDateFormat date2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date date = new Date();
            Date endDay = date2.parse(fuwuqiList.get(i).getEnddate());//结束时间
            Long starTime = date.getTime();
@@ -103,7 +103,7 @@
            //不足一天的算作一天,因此在到期天数上加1
            if (+num11 / 24 / 60 / 60 / 1000 == 19 | +num11 / 24 / 60 / 60 / 1000 == 9 | +num11 / 24 / 60 / 60 / 1000 == 4 | +num11 / 24 / 60 / 60 / 1000 == 0) {
                String dispatchDate = this.duanxinlogService.userdate(fuwuqiList.get(i).getServername());
                SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
                SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                String dtext = formatter.format(date);
                if (dispatchDate == null || !dtext.equals(dispatchDate)) {
@@ -184,8 +184,8 @@
     */
//    @EnableScheduling
//    @Scheduled(cron = "*/10 * * * * ?")//测试10秒执行一次
    @Scheduled(cron = "0 49 10 * * ?")
//    @Scheduled(cron = "0 0 */1 * * ?")//一小时执行一次
//    @Scheduled(cron = "0 49 10 * * ?")
    @Scheduled(cron = "0 0 */1 * * ?")//一小时执行一次
    public void sms() throws Exception {
        System.out.println("短信定时器执行============》》》》》》》》》》》》》》》》");
        //查询数据库中所有的引擎数据
@@ -205,7 +205,7 @@
                queryWrapper4.eq("companyabbname", cardList.get(i).getCompany());
                companyList = (companyMapper).selectOne(queryWrapper4);
            }
            SimpleDateFormat date2 = new SimpleDateFormat("yyyy-MM-dd");
            SimpleDateFormat date2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date date = new Date();
            Date endDay = date2.parse(cardList.get(i).getEnddate());//结束时间
            Long starTime = date.getTime();
@@ -214,7 +214,7 @@
            if (+num11 / 24 / 60 / 60 / 1000 == 19 | +num11 / 24 / 60 / 60 / 1000 == 9 | +num11 / 24 / 60 / 60 / 1000 == 4 | +num11 / 24 / 60 / 60 / 1000 == 0) {
                String dispatchDate = this.duanxinlogService.userdate(cardList.get(i).getCardnumber());
//                    String dispatchDate = this.duanxinlogService.userdate(cardList.get(i).getCardnumber());
                SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
                SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                String dtext = formatter.format(date);
                if (dispatchDate == null || !dtext.equals(dispatchDate)) {
                    String randomNumber = new String();
src/main/java/com/flow/controller/ZongInvoicesController.java
@@ -24,6 +24,7 @@
import java.util.Random;
import java.util.UUID;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
@@ -61,7 +62,7 @@
    }
    @PostMapping({"zongfpadd"})
    public int zongfpadd(Zonginvoices zonginvoices) {
    public int zongfpadd(Zonginvoices zonginvoices) throws TencentCloudSDKException {
        return this.zongInvoicesService.zongfpadd(zonginvoices);
    }
src/main/java/com/flow/controller/orderController.java
@@ -188,8 +188,7 @@
            duanxinlog.setIdentification(value1);
            duanxinlog.setReceiver(value1);
            duanxinlog.setNumber(phoneNumberSet1[0]);
//            duanxinlog.setContent("尊敬的用户,您好!您有流量卡将于"+cardList.get(i).getEnddate()+"到期,为避免影响您的正常使用请及时续费,您可登录华星智控公司物联网管理平台查询详情续费,如有疑问可咨询我公司客服人员,祝您生活愉快!"
//            );
            duanxinlog.setContent("公司名称:"+value1+",充值时间:"+formattedTime+",充值总金额:"+String.valueOf(formattedMones)+",充值卡号数量:"+String.valueOf(values.length));
            this.duanxinlogService.addDuanxinlog(duanxinlog);
        } catch (TencentCloudSDKException var30) {
            System.out.println(var30.toString());
@@ -302,8 +301,7 @@
            duanxinlog.setIdentification(value1);
            duanxinlog.setReceiver(value1);
            duanxinlog.setNumber(phoneNumberSet1[0]);
//            duanxinlog.setContent("尊敬的用户,您好!您有流量卡将于"+cardList.get(i).getEnddate()+"到期,为避免影响您的正常使用请及时续费,您可登录华星智控公司物联网管理平台查询详情续费,如有疑问可咨询我公司客服人员,祝您生活愉快!"
//            );
       duanxinlog.setContent("公司名称:"+value1+",充值时间:"+formattedTime+",充值总金额:"+String.valueOf(formattedMones)+",充值卡号数量:"+String.valueOf(values.length));
            this.duanxinlogService.addDuanxinlog(duanxinlog);
        } catch (TencentCloudSDKException var30) {
            System.out.println(var30.toString());
src/main/java/com/flow/service/BangZhuService.java
@@ -8,9 +8,10 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.flow.pojo.Bangzhu;
import com.github.pagehelper.PageInfo;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
public interface BangZhuService extends IService<Bangzhu> {
    void addBang(Bangzhu var1);
    void addBang(Bangzhu var1) throws TencentCloudSDKException;
    PageInfo<Bangzhu> findBangZhu(Integer var1, Integer var2);
src/main/java/com/flow/service/impl/BangZhuServiceImpl.java
@@ -8,21 +8,92 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.flow.mapper.BangZhuMapper;
import com.flow.mapper.ManagerMapper;
import com.flow.pojo.Bangzhu;
import com.flow.pojo.Duanxinlog;
import com.flow.pojo.Manager;
import com.flow.service.BangZhuService;
import com.flow.service.DuanxinlogService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.sms.v20210111.SmsClient;
import com.tencentcloudapi.sms.v20210111.models.SendSmsRequest;
import com.tencentcloudapi.sms.v20210111.models.SendSmsResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class BangZhuServiceImpl extends ServiceImpl<BangZhuMapper, Bangzhu> implements BangZhuService {
    private String SecretId = "AKIDrjZOI4e6KLZu9FAsSRN8eOwSt52lbMBz";
    private String SecretKey = "xnRtHUL3YqdMyOLVSBjKkz1pQoxujS4d";
    @Autowired
    ManagerMapper managerMapper;
    @Autowired
    DuanxinlogService duanxinlogService;
    public BangZhuServiceImpl() {
    }
    public void addBang(Bangzhu bangzhu) {
    public void addBang(Bangzhu bangzhu) throws TencentCloudSDKException {
        Credential cred = new Credential(this.SecretId, this.SecretKey);
        HttpProfile httpProfile = new HttpProfile();
        httpProfile.setEndpoint("sms.tencentcloudapi.com");
        ClientProfile clientProfile = new ClientProfile();
        clientProfile.setHttpProfile(httpProfile);
        SmsClient client = new SmsClient(cred, "ap-beijing", clientProfile);
        SendSmsRequest req = new SendSmsRequest();
//        String[] phoneNumberSet1 = new String[]{"15210640466"};
//        req.setPhoneNumberSet(phoneNumberSet1);
        QueryWrapper sms = new QueryWrapper();
        sms.eq("none", "0");
        sms.eq("smsreception", "1");
        List<Manager> managerList = (managerMapper).selectList(sms);
        String phone = new String();
        for (int s=0;s<managerList.size();s++){
//                        System.out.println(managerList.get(s).getPhone());
//                        phoneNumberSet1[s] = managerList.get(s).getPhone();
            String[] phoneNumberSet12  = {managerList.get(s).getPhone()};
            System.out.println(phoneNumberSet12);
            req.setPhoneNumberSet(phoneNumberSet12);
            if (s+1==managerList.size()){
                phone+=managerList.get(s).getPhone();
            }else{
                phone+=managerList.get(s).getPhone()+",";
            }
            req.setSmsSdkAppId("1400838975");
            req.setSignName("北京华星北斗智控");
            req.setTemplateId("2127737");
            String[] templateParamSet1 = {String.valueOf(bangzhu.getCompany())};
            req.setTemplateParamSet(templateParamSet1);
            // 返回的resp是一个SendSmsResponse的实例,与请求对象对应
            SendSmsResponse resp = client.SendSms(req);
            System.out.println(SendSmsResponse.toJsonString(resp));
        }
//        req.setSmsSdkAppId("1400838975");
//        req.setSignName("北京华星北斗智控");
//        req.setTemplateId("2127736");
//            String[] templateParamSet1 = new String[]{cardNum};
//            req.setTemplateParamSet(templateParamSet1);
//            SendSmsResponse resp = client.SendSms(req);
//            System.out.println(SendSmsResponse.toJsonString(resp));
        Duanxinlog duanxinlog = new Duanxinlog();
        duanxinlog.setIdentification("留言短信提示");
        duanxinlog.setReceiver(bangzhu.getCompany());
        duanxinlog.setNumber(phone);
        duanxinlog.setContent(bangzhu.getCompany()+"提交了问题工单,请及时处理。");
        this.duanxinlogService.addDuanxinlog(duanxinlog);
        ((BangZhuMapper)this.baseMapper).insert(bangzhu);
    }
src/main/java/com/flow/service/impl/ZongInvoiceServiceImpl.java
@@ -11,18 +11,33 @@
import com.flow.mapper.ManagerMapper;
import com.flow.mapper.TbFuwuqiMapper;
import com.flow.mapper.zongInvoicesMapper;
import com.flow.pojo.Chongzhi;
import com.flow.pojo.Manager;
import com.flow.pojo.TbFuwuqi;
import com.flow.pojo.Zonginvoices;
import com.flow.pojo.*;
import com.flow.service.DuanxinlogService;
import com.flow.service.zongInvoicesService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import java.util.List;
import java.util.Random;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.sms.v20210111.SmsClient;
import com.tencentcloudapi.sms.v20210111.models.SendSmsRequest;
import com.tencentcloudapi.sms.v20210111.models.SendSmsResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class ZongInvoiceServiceImpl extends ServiceImpl<zongInvoicesMapper, Zonginvoices> implements zongInvoicesService {
    private String SecretId = "AKIDrjZOI4e6KLZu9FAsSRN8eOwSt52lbMBz";
    private String SecretKey = "xnRtHUL3YqdMyOLVSBjKkz1pQoxujS4d";
    @Autowired
    ManagerMapper managerMapper;
    @Autowired
    DuanxinlogService duanxinlogService;
    public ZongInvoiceServiceImpl() {
    }
@@ -45,7 +60,57 @@
        return info;
    }
    public int zongfpadd(Zonginvoices zonginvoices) {
    public int zongfpadd(Zonginvoices zonginvoices) throws TencentCloudSDKException {
        Credential cred = new Credential(this.SecretId, this.SecretKey);
        HttpProfile httpProfile = new HttpProfile();
        httpProfile.setEndpoint("sms.tencentcloudapi.com");
        ClientProfile clientProfile = new ClientProfile();
        clientProfile.setHttpProfile(httpProfile);
        SmsClient client = new SmsClient(cred, "ap-beijing", clientProfile);
        SendSmsRequest req = new SendSmsRequest();
//        String[] phoneNumberSet1 = new String[]{"15210640466"};
//        req.setPhoneNumberSet(phoneNumberSet1);
        QueryWrapper sms = new QueryWrapper();
        sms.eq("none", "0");
        sms.eq("smsreception", "1");
        List<Manager> managerList = (managerMapper).selectList(sms);
        String phone = new String();
        for (int s=0;s<managerList.size();s++){
//                        System.out.println(managerList.get(s).getPhone());
//                        phoneNumberSet1[s] = managerList.get(s).getPhone();
            String[] phoneNumberSet12  = {managerList.get(s).getPhone()};
            System.out.println(phoneNumberSet12);
            req.setPhoneNumberSet(phoneNumberSet12);
            if (s+1==managerList.size()){
                phone+=managerList.get(s).getPhone();
            }else{
                phone+=managerList.get(s).getPhone()+",";
            }
            req.setSmsSdkAppId("1400838975");
            req.setSignName("北京华星北斗智控");
            req.setTemplateId("2127736");
            String[] templateParamSet1 = {String.valueOf(zonginvoices.getCompany())};
            req.setTemplateParamSet(templateParamSet1);
            // 返回的resp是一个SendSmsResponse的实例,与请求对象对应
            SendSmsResponse resp = client.SendSms(req);
            System.out.println(SendSmsResponse.toJsonString(resp));
        }
//        req.setSmsSdkAppId("1400838975");
//        req.setSignName("北京华星北斗智控");
//        req.setTemplateId("2127736");
//            String[] templateParamSet1 = new String[]{cardNum};
//            req.setTemplateParamSet(templateParamSet1);
//            SendSmsResponse resp = client.SendSms(req);
//            System.out.println(SendSmsResponse.toJsonString(resp));
        Duanxinlog duanxinlog = new Duanxinlog();
        duanxinlog.setIdentification("申请开发票");
        duanxinlog.setReceiver(zonginvoices.getFptt());
        duanxinlog.setNumber(phone);
        duanxinlog.setContent(zonginvoices.getFptt()+"提交了开具发票申请,请及时处理。");
        this.duanxinlogService.addDuanxinlog(duanxinlog);
        return ((zongInvoicesMapper)this.baseMapper).insert(zonginvoices);
    }
src/main/java/com/flow/service/zongInvoicesService.java
@@ -10,13 +10,14 @@
import com.flow.pojo.TbFuwuqi;
import com.flow.pojo.Zonginvoices;
import com.github.pagehelper.PageInfo;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
public interface zongInvoicesService extends IService<Zonginvoices> {
    PageInfo<Zonginvoices> findinvoicesjilu(Integer var1, Integer var2);
    PageInfo<Zonginvoices> findinvoicesjilu(Integer var1, Integer var2, Zonginvoices var3);
    int zongfpadd(Zonginvoices var1);
    int zongfpadd(Zonginvoices var1) throws TencentCloudSDKException;
    Zonginvoices findsqnum(Zonginvoices var1);
src/webapp/page/Fuwuqi.jsp
@@ -50,7 +50,7 @@
            <input type="text" name="company" style="width: 150px"  placeholder="请输入所属公司" lay-affix="clear" class="layui-input">
        </div>
    </div>
    <button style="position: relative;top: 25px;z-index: 999;width: 70px;left: -400px" id="relo" class="layui-btn layui-btn-normal" lay-filter="demo-table-search1">刷新</button>
    <button style="position: relative;top: 25px;z-index: 999;width: 70px;left: -410px" id="relo" class="layui-btn layui-btn-normal" lay-filter="demo-table-search1">刷新</button>
    <button style="position: relative;top: 25px;z-index: 999;width: 80px;left: 90px" class="layui-btn layui-btn-normal" lay-submit lay-filter="demo-table-search" lay-event="getselect" id="select">查询</button>
</form>
<%--<script type="text/html" >--%>
src/webapp/page/Gongs.jsp
@@ -47,7 +47,7 @@
    </button>
    </form>
    <script type="text/html"  >
<%--    <script type="text/html"  >--%>
        <div style="margin-left: 0px;" id="toolbarDemo">
            <button class="layui-btn " id="btn-add" lay-event="getadd">新增</button>
            <button class="layui-btn   layui-btn-warm" id="btn-update" lay-event="getUpdate">修改</button>
@@ -55,7 +55,7 @@
        </div>
    </script>
<%--    </script>--%>
    <script type="text/html" id="toolbarDemo1">
        <div style="margin-left: 35px;">
            <button class="layui-btn layui-btn-warm" lay-event="getUpdate">修改</button>