kongdeqiang
2023-06-05 bb344d8e73bf3a6825f21584609649cb5d5042f5
src/main/java/com/boying/job/YCGetEticketScheduled.java
@@ -17,6 +17,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
@@ -37,7 +38,7 @@
    private SystemConfigProperties systemConfigProperties;
    private Boolean taskFlag = false;
    //@Scheduled(cron = "0 0/1 * * * ?")
    @Scheduled(cron = "0 0/1 * * * ?")
    public void execute() throws Exception {
        if (taskFlag == true) {
            System.out.println("正在运行,强制退出-------》");
@@ -46,6 +47,7 @@
        QueryWrapper<OrderRecord> wrapper = new QueryWrapper<>();
        wrapper.lambda()
                .eq(OrderRecord::getTicketStatus, 2)
                .eq(OrderRecord::getType,1)
                .orderByDesc(OrderRecord::getCreateTime);
        List<OrderRecord> list = orderRecordService.list(wrapper);
        if (list.size() > 0) {
@@ -98,6 +100,7 @@
            directTicket.setChecker("乔宁");
            directTicket.setPayinfo(json);
            directTicket.setState(1);
            directTicket.setBilltypeid("1252");
            String jsonStr = JSON.toJSONString(directTicket, SerializerFeature.WriteDateUseDateFormat);
            Map<String, Object> map = JSON.parseObject(jsonStr, new TypeReference<Map<String, Object>>() {});
@@ -119,6 +122,7 @@
                orderRecord.setEinvoiceid((String) mapTypes.get("einvoiceid"));
                orderRecord.setEinvoicefilename((String) mapTypes.get("einvoicefilename"));
                orderRecord.setBillfiletype(1);
                orderRecord.setBizCode(l);
                txt += orderRecord+",\n";
                writeTxt(txt);