| | |
| | | import com.zy.common.service.erp.ErpSqlServer; |
| | | import com.zy.third.erp.entity.InDetTB; |
| | | import com.zy.third.erp.entity.InHedTB; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | |
| | | /** |
| | | * 入库单据 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class ERPInHedTBScheduler { |
| | | |
| | |
| | | |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | public void InHedTBScheduler() { |
| | | log.info("InHedTBScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | | String sqlInHed = "select * from erp_InHedTB where LKName='中扬二期'"; |
| | | List<InHedTB> inHeds = erpSqlServer.select(sqlInHed, InHedTB.class); |
| | | if (inHeds.size() > 0) { |
| | | for (InHedTB inHed : inHeds) { |
| | | System.out.println(inHed); |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + inHed.getBillNo() + "'"); |
| | | List<InDetTB> inDetTBS = erpSqlServer.selectList(InDetTB.class, condition); |